Commit Graph
1120 Commits
Author SHA1 Message Date
Turtle 616f4d0a5d Merge pull request #8447 from deepseek-harness/feat/ptc-inspect-tool-render
feat(ptc): inspect tool results with their rendered text
2026-11-13 19:30:18 +08:00
Shigma ed4f31876c Merge pull request #8136 from deepseek-harness/feat/hmr-watch-patch-overlays
feat(hmr): reload --patch overlay files with the profile
2026-11-13 19:13:45 +08:00
turtle1999 18f492edbc chore: merge master into ptc inspection branch 2026-11-13 18:58:46 +08:00
imccyu 5584bb0301 Merge pull request #8426 from deepseek-harness/feat/ptc-string-literal-guidance
feat(ptc): 收窄 String.raw,文件内容改用逐行引号字符串数组
2026-11-13 18:49:22 +08:00
turtle1999 f3ed11c1a3 fix(ptc): preserve inspection across array changes and images 2026-11-13 18:41:03 +08:00
turtle1999 28f1580e64 test(ptc): assert formatted read in outer run_code results 2026-11-13 17:41:28 +08:00
Shigma 245f37b9ef Merge remote-tracking branch 'origin/master' into feat/hmr-watch-patch-overlays 2026-11-13 17:39:47 +08:00
imccyu f14fb7c76f test(ptc): sync run_code string guidance in tests, snapshots, and docs
Update the full-text instruction assertions, the run_code tool-schema and system-prompt sidecars of the session, SDK, and Web snapshots, the cua-mcp expected tools, the generated tool catalog with its Chinese pair, and the ptc-runtime-node README pair.
2026-11-13 16:12:16 +08:00
turtle1999 2f79c7386f docs(preset): describe shared runtime inspection in both modes 2026-11-13 15:45:04 +08:00
turtle1999 34d7444270 test(cordis): align standard inspection expectations 2026-11-13 15:45:04 +08:00
turtle1999 5dfda6a5f3 refactor(cordis): unify runtime inspection tool 2026-11-13 15:45:04 +08:00
turtle1999 3682913394 feat(preset): expose Cordis inspection in standard mode 2026-11-13 15:41:32 +08:00
Shigma 94d9995755 Merge pull request #7940 from deepseek-harness/refactor/cordis-include-yaml
refactor(cordis): route Include-dialect YAML through Include exports
2026-11-13 15:26:20 +08:00
Shigma e7a31d7517 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	packages/bundle/web-app/src/index.ts
#	packages/client/connection/src/index.ts
2026-11-13 14:08:25 +08:00
Shigma 37735a8013 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-11-13 14:03:58 +08:00
imccyu 71753fdf91 refactor(connection): add connection auth provider for remote connection (#8266)
* refactor(connection): extract peer authentication providers

* test(connection): cover provider lifecycle and satisfy package gates

* fix(packaging): publish authentication provider locale resources

* test(auth): use runtime login output and cover gateway admission

* fix(auth): preserve Worker requests and migrate Desktop fixtures

* refactor(auth): centralize route admission with required policy

* fix(release): align authentication providers with rc.2

* refactor(connection): keep peer lookup and source policy private

* test(gateway): cover centralized upgrade rejections

* fix(ci): authenticate homepage compression probe

* refactor(auth): let Token own API socket lifecycle

* fix(auth): prevent caching admission refusals and clarify ownership

* refactor(web): collect provider entry URLs after readiness

* refactor(webserver): name the shared entry URL event

* refactor(connection): provide authentication as a nested service

* fix(web-app): restore startup publication defaults

* fix(auth): scope web events and preserve callback flows

* docs(auth): record the implemented provider architecture

* fix(auth): require owner access for administrative routes
2026-11-12 23:14:32 +08:00
imccyu 3e1e50f774 feat(ptc): define scoped REPL top-level scopes and import base in guidance (#8275)
* feat(ptc): define scoped REPL top-level scopes and import base in guidance

The scoped REPL guidance now states the rules a program follows instead of
listing edge cases: each run_code call runs one program in its own top-level
scope, whose top-level declarations and received names are copied, not
referenced, into later programs; a program either uses a copied name or
declares it again; block-level var is discouraged because it changes which
value later programs copy; a failed program keeps earlier values. It names
the missing require and module and separates the import base, fixed at the
environment's first program, from process.cwd(), which follows each program.
Formats without top-level return say to await work before the program ends.

* test(ptc): pin the scoped REPL scope and import guidance

Update the verbatim scoped REPL guidance assertion and refresh, without a key,
the recorded run_code descriptions of the PTC and CUA scenarios whose guidance
changed: the scoped REPL rules and the "before the program ends" wording
shared by retained formats.

* test(cua-mcp): refresh the cua_run_code description for the scoped REPL guidance

The cua-mcp profile expectation landed on master after this branch's base; it lists cua_run_code with the scoped REPL execution instructions.

* fix(ptc): keep the shared scoped guidance free of a consumer tool name

The runtime execution instructions are shared by run_code and cua_run_code, so
the new sentence no longer names run_code. The Agent Note also gives the
missing top-level return as the reason for the retained-state wording, which
covers the persistent script format as well as the REPLs.

* test(ptc): pin the unchanged scoped guidance across consumers

The verbatim assertion, the three scoped tool schemas, and the cua-mcp profile
fixture follow the shared sentence, which no longer names run_code.
2026-11-12 10:02:49 +00:00
Huo Yaoyuan f21a3d1700 Fix system prompt test 2026-11-12 16:12:50 +08:00
creatixchu 8b0966c5e9 Merge master and update the MCP modifier reference 2026-11-12 12:44:57 +08:00
Shigma af95179457 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml
# Conflicts:
#	apps/web/tests/client-ui-stats-panel.e2e.ts
#	packages/experimental/cua-bundle/tests/platform.spec.ts
2026-11-11 22:31:47 +08:00
Shigma 6a0782b597 Merge remote-tracking branch 'origin/master' into feat/hmr-watch-patch-overlays
# Conflicts:
#	packages/boot/app-boot/README.i18n.yaml
2026-11-11 22:31:18 +08:00
Shigma fc1710a167 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12 2026-11-11 22:09:14 +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 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 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
imccyu 455f7a38a6 Merge pull request #8214 from deepseek-harness/split-exports-brand-strings
refactor(brand): migrate internal identity construction
2026-11-11 15:15:26 +08:00
Yichen Jiang 0c3c508ea8 feat(cua-mcp): mount the Windows provider on native Windows
The profile mounted only the macOS provider, so a Windows Host listed no cua_run_code. Add a second
provider row for @deepseek-ai/dsh-cua-windows, enabled on native Windows only, with the same fixed
screenshot target and PTC preset as the macOS row, and declare the package as an optional dependency
beside the macOS provider. The profile e2e fixture switches both native rows off. The no-provider
message names both platforms and points at the launcher's stderr.

README: Windows helper setup through the row's helperPath, with the fields a config override must
restate, and the Windows provider's limits that apply through MCP.

Not exercised on a Windows desktop. On macOS the row was forced on through a profile patch: the
Loader resolved the package, accepted the documented config, rejected an invalid one, and reached
the provider's own host check.
2026-11-11 14:02:22 +08:00
Yichen Jiang 69f53d442b test(cua-mcp): compare resolved working directories
The Windows coverage job failed on the new working-directory assertion: realpath expands the
runner's 8.3 short temporary path (RUNNER~1) while the program's process.cwd() keeps the spelling
it was started with. Both sides are now resolved before comparison in the composition test and in
the profile end-to-end test; macOS still needs the resolution because its temporary directory is a
symlink. The parsed window id is annotated as the string it has been since window ids became strings.
2026-11-11 13:37:36 +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
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
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
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
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
Yichen Jiang 2085a236cc fix(cua-mcp): refuse unlisted tools before the executor and release the Agent after a failed close
A `tools/call` that names anything but the listed `cua_run_code` registration or
`cua_reset` now fails as an unknown tool before it reaches the tool executor, so a
tool another row registers for the connection's Agent cannot be called without
being listed, and the sandbox-escalation refusal applies to every program call.
`dispose()` releases the connection's Agent even when closing the protocol server
rejects. The `cua_reset` description states that a running program is cancelled,
and an `isEscalationField` guard replaces the two type assertions.

Documentation follows the code: the README states that a Host without a provider
lists only `cua_reset`, that the Web plugin page hides the bundle while the Host
inventory still reports it, that the documented Codex configuration carries the
output budget, which client entries were exercised, that the sandbox root is the
client's launch directory, and that the registration's escalation guidance has no
effect in this profile. The unused `zod` dependency is removed.
2026-11-10 18:12:20 +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
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 14b826f062 feat(cua-mcp): serve the cua_run_code registration through low-level handlers
The MCP server no longer carries its own cua_run_code schema and description.
Each tools/list reads the connection Agent's registration from the tool
registry and projects it onto the MCP tool, checked against the protocol's
tool type, so the provider's definition is the only source and `description`
is required as it declares. The projection omits the sandbox-escalation
fields `sandbox_permissions` and `justification`, and a call naming them is
refused before execution; every other argument reaches ctx.tools.execute
unchanged inside ctx.agents.withInitiator, so DSH validates arguments and
answers unknown names. The SDK's McpServer owns tools/list and tools/call
once a tool is registered on it, so both tools use the low-level Server
handlers; cua_reset keeps its hand-written definition.

The connection's Agent is created before the stdio transport opens, so the
first listing already carries its registration, and a creation failure exits
the process instead of retrying per call. The first result of an environment
now prefaces only the cua API reference; the execution rules travel in the
tool description. A Host without a provider lists only cua_reset.

The README and Agent Note record the measured client description budgets:
Claude Code 2.1.309 forwards the first 4,096 characters of an MCP tool
description, dsh-mcp-client forwards 20,000 intact, so the API reference
stays in the first result.
2026-11-10 13:00:41 +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 9b53900b1a test(cua-mcp): refresh the first-result reference for the AX read defaults 2026-11-09 23:10:08 +08:00
Yichen Jiang 7ed4b56940 feat(cua): serve Computer Use to MCP clients from the cua-mcp profile
Add @deepseek-ai/dsh-cua-mcp, an experimental optional bundle whose
profile frontend serves cua_run_code and cua_reset over MCP stdio to
Codex, Claude Code, and other harnesses. One connection owns one Agent;
programs run through ctx.tools.execute without a model step, the first
result carries the cua API reference, and screenshots are delivered as
the request version the program observed. DSH_CUA_CONSENT selects
unattended approval or client elicitation; --print-client-config renders
the client entry for the exact installation.

Supporting changes: dsh-cua gains a configured screenshotTarget and the
ctx.cuaPrograms reset/screenshot-target service, the PTC program-tool
factory exposes createRunCodeToolHandle with reset control, and dsh
plugin gains manifest-only enable/disable verbs for installed bundles.
2026-11-09 22:52:07 +08:00
sjw1231 25d43d319a test: record error identity in expected output and session snapshots
The dsh-badge expected test pins a skill tool failure, and the
cordis-inspect-liveness, cordis-inspect-timeout, and
workspace-dependencies recordings replay inspect and workspace
dependency failures. Their tool/result events now carry the
SkillError, InspectError, and WorkspaceDependencyError identity; the
model-visible text is unchanged.

Refs #7869
2026-11-09 17:06:19 +08:00
_Kerman 724e56b286 feat(ptc): unify explicit text and image inspection 2026-11-09 15:06:09 +08:00
_Kerman 71b5e93457 test(ptc): migrate remaining inspection consumers 2026-11-09 12:48:09 +08:00
_Kerman c1783e9dff feat(ptc): select program output with Harness.inspect 2026-11-09 12:00:07 +08:00
Shigma 1a814aaab6 fix(hmr): dedupe overlay watches by real path and document overlay rereads 2026-11-08 15:42:54 +08:00
Shigma b40641aa5a feat(hmr): reload --patch overlay files with the profile 2026-11-08 15:04:12 +08:00
Dudu-0223 6cc45f22bd feat: 在内置配置中关闭 subagent 和 Team 的 interrupt 工具 (#7986)
* feat(subagent): disable interrupt tool by default

* test(subagent): update remaining default tool inventories

* fix: disable agent interruption in shipped configuration

* test: configure interruption explicitly in custom preset fixture

* test: update tool count in collapse display snapshots

* docs: clarify agent interruption opt-in and verify preset controls

* test: cover macOS CUA channel policy forwarding on every platform

* test: move CUA coverage repair to a separate master change
2026-11-07 06:55:25 +00:00
Shigma 862e699e27 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	vendor/README.md
2026-11-07 14:18:03 +08:00
Shigma 5063a24531 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml 2026-11-07 14:16:23 +08:00