Commit Graph
2270 Commits
Author SHA1 Message Date
LegGasai f4ac78bb34 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
master moved internal identity construction to brandString (#8214) and
added the empty-catch gate with its recorded baseline (#4862); both touch
files this branch changes or moves.

Conflicts:
- packages/llm/llm-deepseek/tests/adapter.spec.ts,
  packages/llm/llm-deepseek-account/tests/provider.spec.ts,
  packages/experimental/translator/tests/paid-fixture.ts, and
  packages/web/web-search-deepseek/tests/deepseek.spec.ts: master rewrote
  the id constructor calls to brandString<T>() with type-only imports,
  while this branch replaced the hand-built account stand-ins with
  accountStub. The result keeps master's id construction and imports and
  this branch's stand-ins; the one Session this branch's own search test
  creates follows master's construction.
- packages/web/web-deepseek-api/package.json and
  packages/web/web-search-deepseek/package.json: this branch's sorted
  devDependencies plus master's dsh-brand entry.
- docs/capability-seams.md and docs/capability-seams.zh.md: master's
  cuaPrograms consumer edge and this branch's deepseekAccount consumer
  edges coexist; the pairing record is recorded again from the merged
  pair.
- docs/module-graph.md, docs/module-graph.zh.md,
  docs/persistence-schema.json, and pnpm-lock.yaml: regenerated from the
  merged sources.

Beyond the conflicts:
- scripts/empty-catch.baseline.json: master recorded two clauses under
  packages/credentials/deepseek-account, which this branch moves to
  packages/account/deepseek-account. The two keys are renamed with the
  files, as the gate requires for a moved file.
- AGENTS.md: master's checker link and this branch's account/ layout row
  together exceeded the frozen 2,080-word ceiling by one word, so the row
  reads "account/ DeepSeek".
2026-11-12 13:53:45 +08:00
LegGasai 3ca18d169f fix(account): invalidate a rejected token on the account service mounted at rejection
- deepseek-account: the request credential's reject() re-resolves the
  account service through the resolving context, so a reload between a
  request and the destination's HTTP 401 still removes the stored grant;
  without a mounted service the grant stays for the next one to reject.
  resolveToken and rejectToken become private; the e2e sign-in stand-in
  and the generated API catalog follow.
- llm-deepseek: routeCredential().resolve() publishes the grant's headers,
  value, and rejection only, keeping the adapter's onRequestError behind
  the seam.
- web-deepseek-api: a route publishing an unparsable base URL becomes a
  misconfigured source instead of throwing from readiness or dispatch.
2026-11-11 20:29:37 +08:00
LegGasai 7d83af645c docs(llm): fix route credential contracts and the package index budget
- RouteCredential.configured: the owner may read its store to answer; the
  contract no longer claims "without reading the credential's value". Same
  text in the source JSDoc, both llm-streaming type-equiv blocks, and the
  seam Agent Note.
- llm-deepseek README: replace the stale resolveAuth(connection) summary
  with the resolveAuth(connection, endpoint) contract.
- llm-deepseek-account README: the listing cache is keyed by a SHA-256 of
  the credential headers, not of the token.
- web-deepseek-api tests/routes.ts: note that composition.spec.ts covers the
  real route plugins.
- packages/README: restore the document/, credentials/, and util/ rows and
  raise the verify-doc-budgets ceiling to 1,060 for the account/ row.
2026-11-11 19:33:52 +08:00
Yichen Jiang c4dd37eb53 Merge remote-tracking branch 'origin/master' into feat/cua-mcp 2026-11-11 18:26:53 +08:00
Yichen Jiang d5e02356ea refactor(cua-mcp): reset by releasing the program environment through the runtime's owner release
cua_reset keeps its effect: only the program process is replaced, while the connection's Agent, its native connection, and its consent decisions stay. The PTC program-tool factory no longer carries a reset operation, so packages/core/tool-executor-ptc is unchanged against master. ctx.cuaPrograms exposes release(agent), the owner release of the provider's program runtime, and the MCP frontend orders its own calls around it: it cancels the running program, releases the environment, answers after the cancelled program has settled, and holds back programs that arrive during a reset. A failed release answers with an error that asks for another cua_reset; the runtime rejects programs until a release succeeds. The reset result names cua.getApp for selecting applications again.
2026-11-11 18:19:43 +08:00
Jiawei Song 0b8ee3b709 Merge pull request #8168 from deepseek-harness/refactor/tool-errors-mcp
feat(mcp,web,skill,cordis,plugin,ptc): give MCP, web, skill, inspect, plugin, and run_code tool failures error codes
2026-11-11 18:16:03 +08:00
Yichen Jiang 75f9f6ef98 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
master removed the Python PTC runtime (#8307) and rewrote three bilingual
documents this branch also edits.

Conflicts:
- docs/capability-seams.i18n.yaml, packages/core/tool-executor-ptc/README.i18n.yaml,
  and packages/experimental/README.i18n.yaml: both sides re-recorded the
  translation pairing records. The merged documents were reviewed in both
  languages and the three records recorded again from them.
2026-11-11 17:32:17 +08:00
Yichen Jiang 74c20de23f Merge remote-tracking branch 'origin/master' into fix/forge-ptc-binding
# Conflicts:
#	packages/experimental/forge-session/tests/loader-composition.spec.ts
2026-11-11 16:54:24 +08:00
Yichen Jiang 94d7eb2045 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
master renamed the macOS Computer Use provider to @deepseek-ai/dsh-cua-macos
(#8284) and moved identity construction to brandString (#8214).

Adapted to master:
- The cua-mcp profile mounts @deepseek-ai/dsh-cua-macos and declares it as the
  optional dependency; the bundle test follows the new name.
- The MCP adapter builds its Session and tool-call ids with brandString, so
  @deepseek-ai/dsh-brand becomes a runtime dependency of the package.

Conflicts:
- scripts/experimental-package-policy.ts and scripts/release/families.spec.ts:
  both sides added a row; the cua-macos, cua-mcp, and cua-windows rows coexist.
- scripts/package-dependency-policy.ts: took master's removal of the SessionId
  safe entry. longEdgeDimensions no longer sits in the safe-export list; it
  joins the existing peer-required @deepseek-ai/dsh-attachment entry, so this
  branch adds no safe-export exception.
- Generated catalogs, module graphs, and the dsh-doc package reference: took
  master and regenerated.
- Four translation pairing records: took master and re-recorded after
  reviewing both language diffs.
2026-11-11 16:31:58 +08:00
sjw1231 c670457442 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887 2026-11-11 16:25:44 +08:00
_Kerman f34250ca9b Merge pull request #8307 from deepseek-harness/xtr/remove-python-ptc-runner
refactor(ptc): remove the experimental Python runtime
2026-11-11 16:03:49 +08:00
sjw1231 e5611f8281 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/boot/plugin-market/tests/tools.spec.ts
#	packages/mcp/mcp-client/tests/mcp-client.spec.ts
#	pnpm-lock.yaml
2026-11-11 15:51:19 +08:00
sjw1231 3524a7a3e5 Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent
Resolves import conflicts with the brand-export split (#8214): value
brand factories are now brandString<T>() calls, and dsh-workflow's
WorkflowRunId is imported from its types entry. Generated persistence
and config catalogs are regenerated.
2026-11-11 15:40:30 +08:00
_Kerman da91532aaa merge: sync master into Python PTC removal 2026-11-11 15:27:25 +08:00
_Kerman d1cf1dede1 refactor(ptc): remove the experimental Python runtime 2026-11-11 15:07:01 +08:00
creatixchu 3f4704cb6d Merge master into the macOS CUA naming change 2026-11-11 14:47:24 +08:00
creatixchu a7df022dae Quote the entry ID as printed by the CLI 2026-11-11 14:44:19 +08:00
creatixchu ce1b5182bc Clarify macOS CUA migration and provider diagnostics 2026-11-11 14:43:07 +08:00
Yichen Jiang 30e56b50bb Merge remote-tracking branch 'origin/master' into fix/forge-ptc-binding
# Conflicts:
#	apps/web/tests/forge-panel.e2e.ts
2026-11-11 14:41:33 +08:00
sjw1231 4ffad712fc Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent 2026-11-11 14:39:22 +08:00
Yichen Jiang b2e064fecb Merge remote-tracking branch 'origin/master' into feat/cua-mcp
Conflicts: both sides added one adjacent entry (cua-mcp here, cua-windows on master) to
scripts/experimental-package-policy.ts, scripts/release/families.spec.ts, and tsconfig.host.json;
both entries are kept. Generated and recorded files take master's side and are regenerated: the
config catalog, the module graph, the package list, two pairing records, pnpm-lock.yaml, and the
creation-recommendations fixture.

Adaptations to master:
- @deepseek-ai/dsh-cua-mcp follows its release family to 0.2.2-rc.2.
- Window ids are strings: this branch's fixture programs and assertions pass "7".
- The retained program environment is a scoped REPL, in which a later call may declare an earlier
  name again: cua_reset no longer names declaration conflicts as its use, and the cua-mcp README
  and Agent Note state the registration's current description length.
- The cua-mcp README names the Windows provider, which this profile does not mount.
- The profile's expected reference and tool list are re-recorded.
2026-11-11 13:13:22 +08:00
sjw1231 1784d23da9 fix(workflow): keep the fatal code that ended a failed run
A fatal WorkflowError such as AGENT_CAP or ITEM_CAP was rendered to text
inside the PTC guest, so the workflow tool could only report RUN_FAILED.
WorkflowResult and the workflow/end payload now carry errorCode, the
code of the fatal error that ended an error run; the host validates it
at the process boundary and the tool fails with that code. RUN_FAILED
remains only for an error run without one: the script's own exception or
an engine runtime failure. WorkflowError narrows code to
WorkflowErrorCode.

Refs #7869
2026-11-11 13:10:55 +08:00
Yichen Jiang d429d1b00d fix(forge-session): 关联 PTC 程序内 shell 调用操作的 PR
PTC 程序内的工具调用只写 tool/ptc-dispatch-start / tool/ptc-dispatch
事件,不写 tool/call / tool/result,因此 forgeChangeRequests 投影看不到
程序内的 gh pr create/view/edit/checkout 与 git push;reference-lookup
又跳过带 parent 的嵌套调用。

- 投影折叠 bash / pwsh 的 tool/ptc-dispatch 事件,复用直接调用的绑定
  与推送规则;stateVersion 3 -> 4,旧检查点重新折叠。
- 服务对 tool/ptc-dispatch 事件触发推送发现并刷新监听方。
- 嵌套调用的不带主机数字引用排队到外层根调用结算后查询,
  使用原调用的 shell 执行环境,随根调用取消。
- 单测、Loader 真实 PTC 组合测试与 Web e2e 覆盖 PTC 路径。

Fixes #8290
2026-11-11 13:05:51 +08:00
Yichen Jiang 3a0779f905 feat(cua-mcp): serve the API reference through cua_get_api_reference and give programs a workspace
- Add the read-only cua_get_api_reference tool. It returns the provider's cua guidance for the
  connection's Agent and keeps no state. The reference no longer rides on the first program result
  of each environment: the server cannot observe a new conversation on a held connection, a
  cancelled or failed first call, or a compacted context, and the delivery flag had two writers
  without a common ordering point.
- Create the connection's Agent in a dedicated workspace: DSH_CUA_WORKSPACE, or cua-mcp/workspace
  under the Harness home. An Agent's working directory is the workspace-write root of its programs,
  so the directory a client launched the server from, which can be /, is no longer writable.
- Report startup failures on stderr and exit with code 1, including a relative workspace path and a
  workspace directory that cannot be created. The profile mounts no log sink.
- Run each program call as the Agent's maintenance activity, so Agent disposal cancels an in-flight
  call and waits for it and its nested calls to settle before the Session closes.
- Return a failed call's message without DSH's "Error: " prefix; isError already marks it.
2026-11-11 12:52:59 +08:00
LegGasai 1685f46873 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	packages/web/web/package.json
#	scripts/plugin-entry-existing-exports.ts
2026-11-11 12:52:40 +08:00
imccyu eab6beacb9 🚚 refactor(session): move Session status into client/ui-session-status
Move packages/api/session-status (@deepseek-ai/dsh-api-session-status) to
packages/client/ui-session-status (@deepseek-ai/dsh-client-ui-session-status):
the package has no Remote or Host behavior and depends on ui-session, so it
belongs to the Client group. The uiSession.sessionStatus service,
ctx.uiSession.sessionStatus, useSessionStatus, and UiSessionService keep
their names.

Add the package to the Web client's required boot entries, so startup is
rejected when the status table cannot be imported or fails to apply, as it
was when the table lived in the required ui-session entry.

Refs #4076
2026-11-11 12:16:39 +08:00
imccyu cb2910ef09 ♻️ refactor(session): move Session status into api-session-status
Move the Client Session status table (running state, the effective
pending interaction, and completion reminders) and the useSessionStatus
root hook out of ui-session into the new @deepseek-ai/dsh-api-session-status
package. The UiSessionStatus service is provided as uiSession.sessionStatus
and read as ctx.uiSession.sessionStatus through the mergeable
UiSessionService type of ctx.uiSession.

Pending-interaction registration, precedence, withdrawal, and teardown
delegation stay in ui-session unchanged; ui-session now exposes the
effective requests read-only as ctx.uiSession.pendingInteractions, which
the status table and the Conversation stop shortcut consume. ui-session no
longer depends on api-remotes.

Refs #4076
2026-11-11 12:16:37 +08:00
Yichen Jiang 8c192ad810 Merge pull request #8228 from deepseek-harness/feat/forge-extension-api
feat(forge): open change request review to plugins with lenses, line annotations, and slots
2026-11-11 12:07:19 +08:00
sjw1231 32bbcb9997 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/core/tool-executor-ptc/src/errors.ts
#	packages/core/tool-executor-ptc/src/ptc.ts
#	packages/ptc-runtime/ptc-runtime-node/src/bindings.ts
#	packages/ptc-runtime/ptc-runtime-node/src/execution.ts
#	packages/ptc-runtime/ptc-runtime-node/src/index.ts
#	packages/ptc-runtime/ptc-runtime/package.json
#	packages/ptc-runtime/ptc-runtime/tsconfig.json
#	packages/util/atomic-write/package.json
#	pnpm-lock.yaml
2026-11-11 11:48:52 +08:00
creatixchu e7950b0ca8 Align the macOS Computer Use provider package and entry names 2026-11-11 11:43:44 +08:00
Yichen Jiang f1f987c4c2 docs(forge): name what review changes reread, when annotations draw, and brand lens ids 2026-11-11 11:34:04 +08:00
Turtle ce6ab42635 Merge pull request #8225 from deepseek-harness/turtle/add-desktop-ua-suffix-e911e659413d
feat(llm): report the booted profile in the provider User-Agent
2026-11-11 09:28:02 +08:00
creatixchu 0874eb2217 fix(cua): retain macOS permission diagnostic process IDs 2026-11-10 22:22:09 +08:00
creatixchu 1a62850eec Merge master into Windows CUA branch 2026-11-10 20:21:17 +08:00
LegGasai d42563e4ba refactor(llm): publish DeepSeek route credentials through ctx.llm
`LlmAdapter.routeCredential(provider)` publishes the credential a route
currently sends: kind, resolved base URL, optional reference, a value-free
presence check, and per-endpoint grants carrying protocol headers, the bare
value, and an optional 401 invalidation. `LlmRuntime.routeCredential()`
forwards to the owning adapter.

`dsh-llm-deepseek` reads no credential: `resolveAuth(connection, endpoint)`
returns a grant or `undefined`, `missingCredential` names the failure, and
`credential` declares the publication. The route plugins own their
credentials through the new `dsh-credentials` reference helpers and the
account service's `resolveRequestCredential()`; the account route also owns
sign-out cancellation and registers a running-task report. The account
service inspects no Agents, drops its `dsh-agent` and `dsh-llm` peers, and
moves to `packages/account/`. The web providers consume route publications
and drop their dependencies on `dsh-llm-deepseek`, the route plugins, and the
Loader.

Documented in the Agent Note and the `llm-route-credential` upgrade guide.
2026-11-10 19:59:14 +08:00
Yichen Jiang c52a9b3b79 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
2026-11-10 19:08:03 +08:00
imccyu 793ce790a6 feat(ptc): add scoped REPL execution with copied top-level bindings
With replScoped: true, persistent-in-memory runs each call as a separate
VM Script in one retained context. Each call starts with copies of the
top-level bindings left by earlier calls, so a later call may declare any
earlier name again with any keyword while earlier functions and
still-running code keep their values. Results, top-level await, errors
and asynchronous failures follow the existing REPL evaluator; modules
load only through dynamic import(), resolved from the environment's first
working directory.

The control protocol moves to version 3; the upgrade guide covers
preinstalled bootstraps and the new PtcProgramFormat member. The Agent
Note records the decision and its comparison with node:repl and
vm-script, and the ptc-scoped-repl snapshot pins the model guidance.
2026-11-10 18:52:19 +08:00
creatixchu 1aefd4de11 Merge master and migrate Windows CUA callers to explicit inspection 2026-11-10 18:24:02 +08:00
creatixchu 1991fa2b22 fix(cua): address shared API, packaging and migration review 2026-11-10 18:10:43 +08:00
Yichen Jiang 1adc552f86 refactor(cua-mcp): select the profile through a plain manifest
The launcher, the plugin manager, the CLI plugin command, and the bundle
manifest type return to master: `dsh.bundle.profile`, `shippedProfileTemplate`,
and `bundleProfileName` are withdrawn, and `cua-mcp` is no longer a required
startup entry. A profile manifest that lists `@deepseek-ai/dsh-cua-mcp` as its
only bundle is the whole setup; `loadProfile` already loads an existing
manifest without a template, and the installation ships the bundle, so no pnpm
or registry access is involved. The README documents that manifest for
installed users and for the Python runtime wheel, and states that layering the
bundle over `dsh-base` is unsupported because both compositions declare the
same row ids.

The optional-bundles spec and the Web preview-boot e2e name the standalone
bundle through a `STANDALONE_PROFILE_BUNDLES` constant instead of reading a
manifest field; the cua-mcp expected-output e2e writes the documented manifest
before starting the server. The Agent Note records the bundle-declared profile
as a considered alternative, deferred until CUA leaves experimental and a
`PROFILE_TEMPLATES` entry can provide the zero-step start.
2026-11-10 16:31:20 +08:00
Turtleandsjw1231 51951b1593 feat(llm): report the booted profile in the provider User-Agent
Co-authored-by: sjw1231 <[email protected]>
2026-11-10 16:19:32 +08:00
_Kerman 4e9adccec7 Merge branch 'master' into xtr/ptc-inspect-output 2026-11-10 16:18:34 +08:00
_Kerman 5fd443618f fix(ptc): preserve raw text and cross-realm image inspection 2026-11-10 16:07:14 +08:00
Yichen Jiang 69ba85d878 Merge remote-tracking branch 'origin/master' into feat/cua-mcp 2026-11-10 16:03:41 +08:00
Turtle d79851e05d Merge pull request #8180 from deepseek-harness/feat/cua-run-code-standard
feat(cua): 为标准模式提供持久 cua_run_code 工具
2026-11-10 07:59:40 +00:00
Yichen Jiang aae5b719a9 docs(forge): document the extension API and replay a fixture extension
Add the forge subsystem's extension API section, README and cookbook
coverage, the generated Cordis, config, slot, and event catalogs, and a
recorded forge-panel e2e case that loads a fixture plugin registering a
lens, annotations, and every new slot.
2026-11-10 14:53:09 +08:00
_Kerman 86984d8358 Merge branch 'feat/cua-run-code-standard' into xtr/ptc-inspect-output 2026-11-10 14:24:26 +08:00
Yichen Jiang 985471bdcf fix(cua-mcp): document client entries instead of generating them
`--print-client-config codex|claude-code|json` is withdrawn together with the
client-config module and the static `node:sea` import that told a single-file
executable from a script launch. The browser worker image packs every optional
bundle and registers no `node:sea`, so the Cloudflare preview packer failed to
load the bundle; the README now documents the Codex `config.toml` fragment, the
`claude mcp add-json dsh_cua` command, and the generic `mcpServers` entry with
the same timeouts, tool exposure, and output budget. The frontend accepts only
`--help` besides the profile selection, and the server owns its `dsh_cua` name.

The README names the macOS helper's prepared build directory relative to the
provider package instead of as a repository path, because the gitignored
`.build` directory does not exist on a clean tree and `verify-package-paths`
rejects the reference. The expected-output e2e asserts the profile manifest
after `initialize` instead of after a configuration print.
2026-11-10 13:32:36 +08:00
Yichen Jiang 3147ec1596 feat(cua-mcp): compose the profile standalone and initialize it from the bundle declaration
The cua-mcp bundle composes its profile from one insert over the empty root
instead of layering on dsh-base, so no model adapter, prompt-side tool,
telemetry, or session-management row loads; every row is a bundle dependency.
The bundle declares the profile through dsh.bundle.profile, and app-boot's
shippedProfileTemplate initializes a missing profile from that single shipped
bundle for `dsh --profile`, the CLI `dsh plugin` command, and the plugin
manager's pnpm path. The `dsh plugin enable|disable` subcommand is withdrawn.
2026-11-10 12:00:17 +08:00
Yichen Jiang c86ba6a719 Merge remote-tracking branch 'origin/feat/cua-run-code-standard' into feat/cua-mcp
# Conflicts:
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/core/tool-executor-ptc/src/run-code.ts
#	packages/core/tool-executor-ptc/tests/run-code.spec.ts
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
#	packages/experimental/cua/tests/run-code-composition.spec.ts
2026-11-10 11:01:38 +08:00