Commit Graph
258 Commits
Author SHA1 Message Date
gengruilin 0e856b5ebd Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-03 13:15:58 +08:00
gengruilin 07ef37ba82 refactor(mcp): follow the ctx.mcpManager rename
The base publishes the MCP manager as `ctx.mcpManager`. Inject and call
it under that key in the account UI, list its authorization endpoints
as `mcpManager/*` in the LiveShare viewer table, and update the OAuth
and composition tests and the generated configuration catalog.
2026-11-03 13:07:09 +08:00
gengruilin ef059a2e3a Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-11-03 13:03:13 +08:00
gengruilin 30bf5733d6 refactor(mcp-manager): publish the manager as ctx.mcpManager
The `ctx.mcpServers` key reads as a collection of servers, but the
service manages that collection, and ACP already uses `mcpServers` for
a plain server list. Publish the service as `ctx.mcpManager`, matching
the package name, the `mcp-manager/` event prefix, and
`ctx.pluginManager`. Remote endpoints become `mcpManager/*`; the class
keeps its name, McpServerManager.
2026-11-02 21:01:42 +08:00
gengruilin 4df2443158 Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-02 14:56:22 +08:00
gengruilin 00ed20c130 Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth
# Conflicts:
#	packages/client/README.i18n.yaml
#	snapshots/session/headless.snapshot.ts
2026-11-02 14:11:56 +08:00
gengruilin 683daea572 test(mcp): await the status reload and refresh the template snapshot after master sync 2026-11-02 11:56:58 +08:00
gengruilin 7e10357889 feat(mcp): load on-demand MCP tools per agent through a per-server loader
An mcp-client entry with toolLoading: on-demand keeps the server's tools
out of the tool registry. The server registers mcp__<server>__load_tools,
lists its tools in a system prompt section, and registers the tools an
agent loads in that agent's own scope. Each published generation carries
loaded tools forward. mcp-manager entries pass toolLoading through.
2026-10-30 15:36:58 +08:00
gengruilin abe73ad4ba Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-10-29 17:53:21 +08:00
gengruilin b95d5c992b chore(mcp-manager): match the root version and export the locale metadata 2026-10-29 17:50:08 +08:00
gengruilin ccb8d9035d fix(mcp): follow master's tool fixture, LiveShare endpoint table, and prompt changes 2026-10-29 16:34:23 +08:00
gengruilin e43a85615d Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-10-29 16:26:36 +08:00
gengruilin e7ce2d2373 fix(mcp): follow master's config hook, tool fixture, LiveShare endpoint table, and prompt changes 2026-10-29 16:24:21 +08:00
gengruilin 3ee7b6829c chore(mcp-manager): add plugin metadata in every shipped language 2026-10-29 16:11:27 +08:00
gengruilin 79a33e3211 Merge remote-tracking branch 'origin/master' into feat/mcp-manager-core 2026-10-29 16:09:47 +08:00
imccyu 00d541438b release(dsh): 0.2.2-alpha.2 2026-10-28 02:03:15 +08:00
imccyu 69c389ae11 release(dsh): 0.2.2-alpha.1 2026-10-28 00:00:58 +08:00
imccyu 3014b0af0f Merge master into DSH 0.2.1-rc.4 synchronization branch 2026-10-26 01:29:12 +08:00
imccyu 341beb33c0 release(dsh): 0.2.1-rc.4 2026-10-26 00:57:37 +08:00
imccyu 8ebf8a6218 Merge master into DSH 0.2.1 ACP stdout and view-tab tooltip sync
# Conflicts:
#	apps/cli/tests/profiles/acp/tests/stdout.expected.e2e.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/mcp/mcp-client/tests/protocol.spec.ts
2026-10-25 13:32:05 +08:00
Yichen Jiang cc4446eecc fix(mcp): keep resource-listing diagnostics off ACP stdout
The MCP SDK answers resources/list and resources/templates/list for a
server without the resources capability with an empty page, but first
writes a console.debug line to stdout. Under the ACP profile that line
lands in the JSON-RPC stream whenever the model lists resources of a
client-supplied, tools-only MCP server. Return the same empty pages
before calling the SDK, and cover it with a unit assertion and an ACP
stdout regression test.
2026-10-24 22:25:48 +08:00
imccyu 14f0b2aafe Merge master into DSH 0.2.1-rc.3 synchronization branch 2026-10-23 11:56:34 +08:00
imccyu d02ea370ee release(dsh): 0.2.1-rc.3 2026-10-23 01:11:35 +08:00
07akioni 84edeadc2b feat(i18n): add Spanish French German Russian and Portuguese 2026-10-22 19:53:52 +08:00
gengruilin 4d2418a9fd refactor(mcp): import the OAuth modules statically
The dynamic imports deferred little. dsh-credentials is already a required
peer because oauth-credentials.ts imports its values statically, and the
MCP client SDK loads @modelcontextprotocol/core at runtime anyway. Import
McpOAuthCredentials statically, export McpOAuthAuthorization from the
package entry, and drop the ./oauth subpath with its tsdown entry, chunk
file patterns, and tsconfig path.

The manager now creates the authorization owner synchronously, so the
retirement check that covered the import's await, and the test of that
window, are removed.
2026-10-21 23:16:42 +08:00
gengruilin 1b66ec65f7 fix(mcp): send the OAuth callback to the web server's own origin
The redirect URI was always http://127.0.0.1:<port>, but the Host web
server listens only on its configured address. A server bound to ::1 or
another interface, or serving TLS, never received the callback, and the
attempt waited for its authorization timeout. Build the redirect URI from
WebServer.getOrigin().
2026-10-21 23:16:42 +08:00
gengruilin 621c8a8240 refactor(mcp): drop OAuth header checks that only the manager reaches
`McpOAuthAuthorization` and `probeServer` have no caller other than the MCP
manager, which already rejects an entry that combines OAuth with an
Authorization header when it is loaded, written, or registered. The
mcp-client load check stays for standalone rows.
2026-10-21 23:16:42 +08:00
gengruilin 157986efc8 fix(mcp): send the advertised OAuth resource verbatim
The SDK authorization request carries the protected-resource metadata's
resource string verbatim. The code exchange and refresh wrapped it in
`new URL()`, whose `href` adds a trailing slash to a resource without a
path, so a server that compares the resource exactly rejected the token
request. Both now pass the stored string.
2026-10-21 23:16:42 +08:00
gengruilin b8d8b3b06c feat(mcp-manager): start, cancel, and sign out of OAuth authorization
The manager Remote adds `startAuthorization`, `cancelAuthorization`, and `signOut`, reports attempt progress in `list()` and `mcp-manager/status`, and rejects an `oauth.credentialKey` that another entry owns.
2026-10-21 23:16:30 +08:00
gengruilin 7d35674c6c feat(mcp-client): add OAuth grants, passive refresh, and explicit authorization
A Streamable HTTP entry with `oauth.credentialKey` connects with the grant saved in the credentials provider, refreshes an expired access token, and enters `waiting-authorization` with a `missing`, `expired`, `binding`, `rejected`, or `scope` reason when the grant cannot be used. `McpOAuthAuthorization` runs explicit browser authorization through the Host web server callback. The mcp-oauth-error snapshot records the tool failure the model sees.
2026-10-21 23:16:29 +08:00
_Kerman d98025a089 Merge origin/master into xtr/tool-executor-plugins 2026-10-21 18:01:55 +08:00
07akioni 11295990b5 fix(i18n): cover nested metadata and repair locale CI regressions 2026-10-21 17:00:42 +08:00
07akioni ed783066e6 fix(i18n): complete Japanese plugin metadata and guard locale coverage 2026-10-21 16:14:12 +08:00
gengruilin 9ce7b0e6f6 Revert "refactor(mcp): keep only plugin-registered servers in the MCP manager"
This reverts commit 1c45a63dd65. Settings-configured servers, credential
templates, probes, stdio and enabled entries, and the status event implement
the backend of #3371, which remains open.
2026-10-20 16:31:24 +08:00
gengruilin 5a30774840 refactor(mcp): keep only plugin-registered servers in the MCP manager
The Settings management page this manager was built for is not shipping, and
every connector plugin registers its server. Remove what only that page used:

- mcp-manager: the volatile `servers` configuration and its write-time
  validation, stdio entries, the `enabled` flag, the `probe` operation, and the
  `mcp-manager/status` event. A registration takes a Streamable HTTP `url`, and
  a `startupTimeoutMs` setting bounds each registered server's startup.
- mcp-client: `${credential:REF}` templates (`expandTemplates`), the
  `waiting-credentials` state, `probeServer`, and the exports that existed only
  for the manager's write-time validation.

The Web profile mounts the manager without injecting credentials, and the
`mcp-template-error` snapshot goes with the templates.
2026-10-20 11:19:40 +08:00
_Kerman 3b978adcec test(tools): tidy migrated fixture imports and comments 2026-10-19 16:32:04 +08:00
_Kerman 2f69e7f181 test: finish executor fixture migration and await readiness 2026-10-19 15:41:31 +08:00
_Kerman 31a49c6629 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/tool-catalog.i18n.yaml
#	packages/bundle/base/package.json
#	packages/core/agent-loop/tests/serial-listener-review.spec.ts
#	packages/core/agent-tool-presentation/package.json
#	packages/experimental/auto-review/tests/auto-review.spec.ts
#	packages/lsp/tool-lsp/package.json
#	packages/subagent/tool-subagent/tests/list-models.spec.ts
#	scripts/check-workspace-constraints.ts
#	scripts/type-equiv.manifest.json
#	tsconfig.base.json
2026-10-19 14:53:33 +08:00
_Kerman 455686626d refactor(tools): separate scoped executors from tool registration 2026-10-19 14:49:55 +08:00
gengruilin cc71597e73 docs(mcp-manager): link the entry validator by its current name 2026-10-19 11:51:31 +08:00
gengruilin 191ea92bfa chore(mcp-manager): align the package version with the 0.2.1-rc.2 release 2026-10-18 04:01:28 +08:00
gengruilin 990b8831bc merge: update the MCP manager with master
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/experimental/webworker-runtime/README.i18n.yaml
#	packages/experimental/webworker-runtime/tests/node/node-stubs.spec.ts
2026-10-18 04:01:22 +08:00
imccyu d1b9c04067 release(dsh): 0.2.1-rc.2 2026-10-17 15:10:31 +08:00
imccyu c6e89e6755 release(dsh): 0.2.1-rc.1 2026-10-16 21:39:18 +08:00
imccyu 0a49d91bb2 release: setup next release version for [email protected] 2026-10-16 16:17:09 +08:00
gengruilin d00bcae24d chore(mcp): align the MCP manager version with the 0.2.1-alpha.4 release 2026-10-16 14:19:09 +08:00
gengruilin ba0da1c4d6 merge: update MCP manager core with master
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/api/remotes/package.json
#	packages/api/remotes/src/client/index.ts
#	packages/api/remotes/tsconfig.client.json
#	packages/api/remotes/tsconfig.host.json
#	packages/experimental/webworker-runtime/README.i18n.yaml
#	packages/experimental/webworker-runtime/tests/node/node-stubs.spec.ts
#	tsconfig.base.json
2026-10-16 14:13:28 +08:00
imccyu f2235d6c02 release(dsh): 0.2.1-alpha.4 2026-10-15 20:00:58 +08:00
Yichen Jiang 36acfb1e88 release(dsh): 0.2.1-alpha.3 2026-10-14 19:38:37 +08:00
gengruilin 4b6fd16be3 chore(mcp): align the MCP manager version with the release
The master sync moved every release member to 0.2.1-alpha.2; the MCP
manager, added in this branch, kept the previous version.
2026-10-13 18:01:56 +08:00