You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements MCP elicitation (DEVELOPMENT_PLAN §3.3, form mode), the last
browser-free MCP capability. A server can ask the user for structured input
mid-tool-call via elicitation/create; DeepCode collects it and replies.
core (mcp/client.ts):
- connectMcpServer accepts ConnectMcpOpts.elicit. When provided, the client
advertises the `elicitation` capability and registers an ElicitRequestSchema
handler that routes `{ server, message, requestedSchema }` to the host
callback, returning its { action: accept|decline|cancel, content? }.
Omitting the handler leaves the capability undeclared (servers won't elicit).
- connectAllMcpServers threads `elicit` through to every server.
cli (repl.ts):
- Provides an interactive elicit callback (via a const holder filled once
readline exists): prints the server's message, prompts for each field in
requestedSchema.properties, returns accept{content} or cancel. Headless stays
non-interactive (no handler → no elicitation).
Tests: +2 (a real spawned stdio server whose tool calls server.elicitInput →
client routes to the host handler → accepted content flows back into the tool
result; and: no handler → capability undeclared → the server's elicit errors
and the tool surfaces isError rather than hanging). Core MCP suite 31 green.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments