Tool-provider engine: lifecycle registry with MCP and memory providers #701

Closed
opened 2026-10-27 13:37:24 +00:00 by sam · 0 comments
Owner

Build the typed tool-provider capability family over the central tools registry. Providers declare a plugin manifest, lifecycle/health, and discover executable ToolEntry values. Add adapters for memory.Manager and configured MCP servers, perform MCP initialize/tools-list/tools-call, register handlers atomically with collision rollback, translate available entries to ai-sdk core.ToolSet, and wire consumers so registered tools are actually callable rather than dead daemon fields.

Design

internal/tools owns Provider and ProviderRegistry; Provider is a typed domain contract and uses the shared plugin manifest/lifecycle vocabulary. The registry owns provider registration and tool indexing while the capability host orchestrates cross-family lifecycle. Memory is adapted without changing internal/memory concurrent work. MCP provider wraps the existing stdio transport without modifying its concurrent implementation, adds protocol client behavior in new files, prefixes/sanitizes server tool names deterministically, and retains original MCP names for calls. Never advertise a tool on an execution path that cannot invoke its handler; explicitly proxy or omit tools across subprocess/NATS boundaries.

Acceptance Criteria

Provider registration is atomic and rejects duplicate provider/tool IDs without partial state. Start/discovery failure rolls back tools and lifecycle; stop removes availability and shuts providers down in reverse order. Memory provider tools appear in the central registry and execute through memory.Manager. A fake MCP server proves initialize, initialized notification where supported, tools/list discovery, tools/call execution, JSON-RPC errors, shutdown, and name mapping. Available tools convert to valid ai-sdk core.ToolSet and are used by the gateway conversational loop and supported agent execution paths; unsupported remote paths do not advertise unusable handlers. Configuration creates providers through typed factories. Focused/race tests, lint, task check, and fresh adversarial review pass subject only to documented concurrent baseline failures.


Imported from beads archie-core-1786637494393-176-72def734 · GitHub #197 · type feature · priority P2 · created 2026-08-08 · closed 2026-08-08

Build the typed tool-provider capability family over the central tools registry. Providers declare a plugin manifest, lifecycle/health, and discover executable ToolEntry values. Add adapters for memory.Manager and configured MCP servers, perform MCP initialize/tools-list/tools-call, register handlers atomically with collision rollback, translate available entries to ai-sdk core.ToolSet, and wire consumers so registered tools are actually callable rather than dead daemon fields. ### Design internal/tools owns Provider and ProviderRegistry; Provider is a typed domain contract and uses the shared plugin manifest/lifecycle vocabulary. The registry owns provider registration and tool indexing while the capability host orchestrates cross-family lifecycle. Memory is adapted without changing internal/memory concurrent work. MCP provider wraps the existing stdio transport without modifying its concurrent implementation, adds protocol client behavior in new files, prefixes/sanitizes server tool names deterministically, and retains original MCP names for calls. Never advertise a tool on an execution path that cannot invoke its handler; explicitly proxy or omit tools across subprocess/NATS boundaries. ### Acceptance Criteria Provider registration is atomic and rejects duplicate provider/tool IDs without partial state. Start/discovery failure rolls back tools and lifecycle; stop removes availability and shuts providers down in reverse order. Memory provider tools appear in the central registry and execute through memory.Manager. A fake MCP server proves initialize, initialized notification where supported, tools/list discovery, tools/call execution, JSON-RPC errors, shutdown, and name mapping. Available tools convert to valid ai-sdk core.ToolSet and are used by the gateway conversational loop and supported agent execution paths; unsupported remote paths do not advertise unusable handlers. Configuration creates providers through typed factories. Focused/race tests, lint, task check, and fresh adversarial review pass subject only to documented concurrent baseline failures. --- _Imported from beads `archie-core-1786637494393-176-72def734` · GitHub #197 · type feature · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumfeature labels 2026-10-27 13:37:24 +00:00
sam self-assigned this 2026-10-27 13:37:24 +00:00
sam closed this issue 2026-10-27 13:37:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#701