Commit Graph
267 Commits
Author SHA1 Message Date
gengruilin 14719bb5bf test(mcp): keep the OAuth world and manager profile in the MCP packages' tests
Remove the dsh-mcp-testkit package. The OAuth world returns to
mcp-client's tests and the manager profile to mcp-manager's tests, where
mcp-manager's OAuth spec imports the OAuth world by relative path as it
did before. The manager profile now also composes the `host: true`
mcp-client entry the manager injects. The package's registrations,
paths, and catalog rows go with it.
2026-11-06 12:53:03 +08:00
gengruilin 1ae3e12fd9 fix(mcp-manager): validate client fields before reading the OAuth key
Entry validation reads `oauth.credentialKey` only after the MCP client
host has validated the entry's client configuration, and refuses OAuth
on stdio before parsing the key. A settings write whose `oauth` is not
an OAuth configuration is again refused by the schema naming
`servers.<name>.oauth`, instead of a TypeError from reading its key.
2026-11-06 03:35:14 +08:00
gengruilin 8d19b4c841 test(mcp): share the OAuth world and manager profile through dsh-mcp-testkit
The manager's OAuth tests imported mcp-client's OAuth world through a
relative path into another package, which the package surface rules forbid
for fixtures. The OAuth world and the manager profile fixture move into the
new test-support library @deepseek-ai/dsh-mcp-testkit. The MCP client and
manager tests import it by name, and both packages drop the development
dependencies that only the moved fixtures needed.
2026-11-06 03:19:21 +08:00
gengruilin 30086a0c0a refactor(mcp): reach mcp-client only through the MCP client host
The MCP manager imported validation, probe, status, and authorization values
from the mcp-client plugin entry and mounted its servers through a static
import of that entry. Plugin entries may export only what the Loader loads,
and the static references break source reloads: when mcp-client also has its
own Loader entry, a reload replaces only mcp-client, and HMR replaces the
instances the manager mounted without the manager knowing, so it keeps the
old code, reports stale status, and cannot stop the replacement instance.

An mcp-client entry loaded with `host: true` now provides
`ctx.mcpClientHost`. The host validates a server configuration through its
transport's own schema, so refusals still name the field; mounts instances
below its own Fiber; probes; and creates OAuth authorization owners from its
own context. The manager injects the host, imports only mcp-client types, and
passes `reconnect` and `oauth` to the host unresolved. Replacing the host
disposes its instances and restarts the manager against the replacement.

The Web composition mounts the host row before the manager. The entry stops
exporting probeServer, connectionStatusOf, assertTemplateSyntax,
resolveReconnectPolicy, ReconnectSchema, SERVER_NAME_PATTERN,
McpOAuthAuthorization, and OAuthSchema, and the plugin entry export list keeps
only createMcpToolDefinition for it.
2026-11-06 03:18:23 +08:00
gengruilin b0940dc2a1 Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-06 01:44:36 +08:00
imccyu 6b8d868008 chore(deps): unify zod to 4.6.6
Raise all 88 workspace zod declarations to exact 4.6.6 and move @browserbasehq/stagehand to 4.4.0, which pins the same version, so the lock keeps a single zod copy. Test expectations and the Typert consumer's node types follow the new declarations; pnpm-workspace.yaml records the release-age exemption for [email protected].
2026-11-05 11:27:26 +08:00
Turtle 38c7a9fbf4 feat(release): publish package source, declaration maps, and documentation (#5884)
* feat(release): publish package source, declaration maps, and documentation

Every release member publishes its TypeScript source and the declaration
maps that resolve into it, and @deepseek-ai/dsh publishes the repository
Markdown documentation staged from docs/ at prepack time.

The ./src/* export most members already declared now resolves for an
installed consumer, and a consumer editor follows a declaration to the
implementation. Bundled JavaScript maps stay unpublished; the vendored
family and the Desktop runtime file policy are unchanged.

Rationale: .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md

* feat(release): publish JavaScript maps and compress bundles

Every emitted JavaScript map ships beside the bundle it describes, and the
workspace build and the client preset compress bundles without mangling
identifiers.

The documentation payload now mirrors the website publication manifest and
is removed again by `postpack`; Desktop and the Python executable exclude
the published source, documentation, and maps; `clean` removes a staged
copy. Typert's publication contract gains the Remote declaration map.

* fix(release): keep node bundles readable for the worker image

The browser worker image lowers `yield*` only as a whole statement and
rewrites `for await` loops by their source layout, so compressed node-side
entries either fail that lowering or lower to unparseable code. Only the
browser bundles keep compression, which removes about a third of their text.

The bundle-purity assertion now matches the module-loader call regardless of
the quote style compression picks, and the release-pack fixture exercises
the installed package's new documentation requirement.

* feat(release): publish the whole documentation tree

`@deepseek-ai/dsh` copies `docs/` in full instead of the website's page
set: the maintainer documents, the generated migration records, the
translation guidelines, and the `*.i18n.yaml` consistency records ship
with the installed package, so the documentation's own links resolve
without a checkout.

* feat(release): publish the upgrade guides with the documentation

The staged documentation keeps the website's page set and adds every
`docs/upgrade-guide/` document, which is what an installed reader consults
when a released change breaks something. The rest of the maintainer tree
stays out.

* test(release): expect source and maps in master's new payload cases

* feat(release): keep installed docs and source readable in Desktop

Desktop keeps the published src/ and docs/ trees inside app.asar, and
every model shell call receives DSH_INSTALL_DIR and DSH_NODE_EXECUTABLE
so an agent can read them through Electron's Node mode. Staging also
generates docs/upgrade-guide/README.md, an index of the upgrade guides
grouped by the release they upgrade from.

Minified client bundles print string literals with backticks: the
worker image packer now recognizes those chunk requests, client license
banners are prepended after minification so their text survives, and
the affected artifact tests accept either quote.

* test(desktop): read archived docs through the Windows PowerShell form

Regenerate the config catalog for the shifted shell-env source line.

* test(desktop): wait for the GUI-subsystem Electron process from PowerShell

* build(release): publish source and maps from the message-quotes package

* build(release): publish source and maps from packages new on master

* build(release): publish source and maps from the tool-office package
2026-11-05 00:22:36 +08:00
imccyu abc0e7092b Merge remote-tracking branch 'origin/release/dsh-0.2.2' into merge/release-dsh-0.2.2-rc.1-to-master
# Conflicts:
#	packages/client/ui-agent-team/package.json
#	packages/client/ui-brand-official/package.json
#	packages/client/ui-open-in-app/package.json
#	packages/client/ui-settings-web-search/package.json
#	packages/experimental/agent-team-profile/package.json
#	packages/team/agent-team/package.json
#	packages/web/web-search-exa/package.json
#	packages/web/web-search-perplexity/package.json
2026-11-04 15:59:50 +08:00
imccyu 2f97f60455 release(dsh): 0.2.2-rc.1 2026-11-04 15:50:06 +08:00
imccyu 24db102f15 release(dsh): align master packages with 0.2.2-alpha.3 2026-11-03 15:13:20 +08:00
imccyu f590c13c92 Merge master into worktree-sync-dsh-0.2.2-to-master-1103b 2026-11-03 15:10:23 +08:00
imccyu 1c78d475bf release(dsh): 0.2.2-alpha.3 2026-11-03 13:37:26 +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 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 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