Add MCP provider feature discovery#910
Conversation
|
Added real MCP HTTP end-to-end coverage for provider feature discovery. The new test calls list_provider_features through the test daemon via StreamableHTTP MCP client and verifies the provider feature value comes back from a draft session; it is not a direct registered-tool handler test.\n\nWhile making the MCP parity e2e run cleanly, I also fixed/covered stale worktree list cache behavior after MCP create_worktree/archive_worktree.\n\nVerification run locally:\n- npx vitest run packages/server/src/server/agent/mcp-server.test.ts --bail=1\n- npx vitest run packages/server/src/server/agent/mcp-parity.e2e.test.ts --bail=1\n- npm run lint\n- npm run typecheck\n- npm run format:check\n\nCommit: 136a4f8 |
|
Follow-up cleanup: I moved the unrelated MCP worktree list-cache fix into the dedicated small PR #911. This PR now stays focused on provider feature discovery.\n\nRelevant verification after cleanup:\n- npx vitest run packages/server/src/server/agent/mcp-server.test.ts --bail=1\n- npx vitest run packages/server/src/server/agent/mcp-parity.e2e.test.ts -t "list_provider_features" --bail=1\n- npm run lint\n- npm run typecheck\n- npm run format:check |
|
Small design note for review: I kept discovery as a separate This is meant to complement #909: #909 sets provider features, this PR discovers which ones are valid for a draft agent config. |
75af1f2 to
41df6f1
Compare
4aa1cd7 to
eb3a336
Compare
Summary
Follow-up to #835 and #909: add provider feature discovery to the orchestration MCP surface.
list_provider_featuresfor draft agent configurationsAgentManager.listDraftFeaturesplumbing already used by the app/WebSocket feature pickerAgentFeature[]values so orchestrators can discover feature IDs like Codexfast_modebefore setting themThis complements #909: #909 lets orchestrators set provider features, and this PR lets them discover which features are valid for a draft agent config.
Design note
I kept discovery as a separate MCP tool because it mirrors the existing app/WebSocket feature picker path and avoids overloading provider/model listing. The caller passes a draft config (
provider,cwd, optionalmodel/modeId/thinkingOptionId/featureValues) and gets back the provider-ownedAgentFeature[]shape.Tests
npx vitest run packages/server/src/server/agent/mcp-server.test.ts --bail=1npx vitest run packages/server/src/server/agent/mcp-parity.e2e.test.ts -t "list_provider_features" --bail=1npm run lintnpm run typechecknpm run format:check