Commit Graph
223 Commits
Author SHA1 Message Date
imccyu 9fae65aeea test(ptc): name the Node PTC execution mode in tests and add scoped REPL counterparts 2026-11-20 00:27:32 +08:00
imccyu 30b668495d chore(release): sync release/dsh-0.2.2 0.2.2-rc.5 to master
# Conflicts:
#	packages/client/hmr/package.json
#	packages/client/script-realm-iframe/package.json
#	packages/client/ui-jobs/package.json
#	packages/client/ui-session-panel/package.json
#	packages/experimental/action-cards/package.json
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/cua-bundle/package.json
#	packages/experimental/forge-gitlab/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
#	packages/session/tool-working-directory/package.json
#	packages/util/atomic-write/package.json
2026-11-18 18:26:56 +08:00
imccyu 9bf478edde release(dsh): 0.2.2-rc.5 2026-11-18 17:43:56 +08:00
imccyu 7400626e6e chore(release): sync release/dsh-0.2.2 0.2.2-rc.4 to master
# Conflicts:
#	packages/client/hmr/package.json
#	packages/client/script-realm-iframe/package.json
#	packages/client/ui-jobs/package.json
#	packages/client/ui-session-panel/package.json
#	packages/experimental/action-cards/package.json
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/cua-bundle/package.json
#	packages/experimental/forge-gitlab/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
#	packages/session/tool-working-directory/package.json
#	packages/util/atomic-write/package.json
2026-11-17 21:37:34 +08:00
imccyu bc3bddffbd release(dsh): 0.2.2-rc.4 2026-11-17 21:19:11 +08:00
Dudu-0223 98dce25aad fix(ptc): guard output suppression during teardown 2026-11-17 13:46:07 +08:00
Dudu-0223 08e5a9b059 Merge remote-tracking branch 'origin/master' into fix/cua-output-failures
# Conflicts:
#	apps/cli/tests/profiles/cua-mcp/expected/tools.json
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/ptc-runtime/ptc-runtime-node/README.i18n.yaml
#	packages/ptc-runtime/ptc-runtime-node/README.md
#	packages/ptc-runtime/ptc-runtime-node/README.zh.md
#	packages/ptc-runtime/ptc-runtime-node/src/bootstrap.ts
#	packages/ptc-runtime/ptc-runtime-node/src/process.ts
#	packages/ptc-runtime/ptc-runtime-node/src/protocol.ts
#	packages/ptc-runtime/ptc-runtime-node/tests/bootstrap.spec.ts
#	snapshots/sdk/cua-run-code/tool-schemas.expected.json
#	snapshots/session/cua-run-code-ptc/system-prompt.expected.md
#	snapshots/session/cua-run-code-scoped/tool-schemas.expected.json
#	snapshots/session/cua-run-code/tool-schemas.expected.json
#	snapshots/session/ptc-persistent-scoped/tool-schemas.expected.json
#	snapshots/session/ptc-persistent/tool-schemas.expected.json
#	snapshots/session/ptc-reset/tool-schemas.expected.json
#	snapshots/session/ptc-scoped-repl/tool-schemas.expected.json
#	snapshots/session/ptc-timeout-fallback/tool-schemas.expected.json
2026-11-16 12:43:20 +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 500dcf94be feat(ptc): inspect tool results with their rendered text 2026-11-13 17:21:11 +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
Dudu-0223 a1b71351f2 refactor(ptc): share output truncation paths 2026-11-13 15:59:25 +08:00
Dudu-0223 dfc7dbf648 fix(ptc): truncate output without interrupting execution 2026-11-13 15:39:03 +08:00
imccyu c9cfbcfa10 feat(ptc): limit String.raw and write file contents as quoted line arrays
Add two sentences to the Node run_code output instructions shared by every execution mode: use the raw form of a template literal only for short text whose backslashes must stay as written, write other text as ordinary strings, and write file contents as an array of quoted line strings joined with newlines.
2026-11-13 15:24:41 +08:00
imccyu ff6db9df9f Merge branch 'release/dsh-0.2.2' into master 2026-11-13 15:12:47 +08:00
imccyu 4c1cf20cb1 release(dsh): 0.2.2-rc.3 2026-11-13 13:11:59 +08:00
_Kerman 1848364e29 Merge pull request #8380 from deepseek-harness/xtr/remove-python-ptc
refactor(ptc)!: remove all Python PTC support
2026-11-12 18:26:48 +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
_Kerman 70be41c8ad refactor(ptc): reuse the existing scoped REPL prefix export 2026-11-12 17:52:48 +08:00
_Kerman 968ea6ebc0 fix(ptc): reject reserved scoped REPL binding names 2026-11-12 17:48:59 +08:00
_Kerman 656533bde1 refactor(ptc)!: remove all Python PTC support 2026-11-12 17:09:15 +08:00
sjw1231 c670457442 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887 2026-11-11 16:25:44 +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
_Kerman f141464b59 docs(ptc): clarify remaining extension support and migration 2026-11-11 15:37:46 +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
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
imccyu 4e205cd66d Merge release/dsh-0.2.2 (0.2.2-rc.2) into master
# Conflicts:
#	packages/experimental/cua-bundle/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
2026-11-11 10:34:31 +08:00
imccyu 91319233e1 release(dsh): 0.2.2-rc.2 2026-11-11 10:18:52 +08:00
imccyu 37e0924f68 Merge pull request #8257 from deepseek-harness/ptc-scoped-repl-switch
feat(ptc): run the scoped REPL by default for persistent-in-memory execution
2026-11-10 22:34:59 +08:00
imccyu c6ef2d17da fix(ptc): keep the runtime's own experimental warnings out of program output
The child filters Node's ExperimentalWarning for vm.USE_MAIN_CONTEXT_DEFAULT_LOADER
and stripTypeScriptTypes, which the runtime itself triggers; an environment
initializer that imports a module under the scoped REPL otherwise prints it into
the first call's output. Warnings that programs emit still print. The host strips
types without printing the stripTypeScriptTypes warning.
2026-11-10 18:52:20 +08:00
imccyu 561f7f1538 test(ptc): match scoped REPL filenames with platform paths
Scoped REPL programs are named resolve(<creation cwd>, '.ptc-repl-<n>.js'), so on Windows their stacks show backslash paths. Compare locations against the resolved filename instead of a hardcoded '/' separator, keeping the submission ordinal, line, and column checks.
2026-11-10 18:52:20 +08:00
imccyu 1cf3217403 fix(ptc): align scoped REPL guidance and tests with inspect output
run_code now discards completion values for TypeScript runtimes, so the
scoped REPL guidance shares the inspect output sentence with the other
modes. Tests read the output field, cover environment initialization with
copied bindings, and the ptc-scoped-repl snapshot is re-recorded with
inspect output.
2026-11-10 18:52:19 +08:00
imccyu 26cd436b86 docs(ptc): fold the scoped-repl format into the protocol 3 upgrade guide
Master's unreleased ptc-bootstrap-protocol guide already covers protocol
version 3, so the scoped-repl format, the PtcProgramFormat member and the
dsh-ssh bootstrapHash step join it instead of a second guide. Re-record the
README, Note and guide translation pairs after the rebase.
2026-11-10 18:52:19 +08:00
imccyu 5a398a9990 feat(ptc): name scoped REPL programs as hidden files in the first directory
Each call's Script filename becomes <first working directory>/.ptc-repl-<n>.js.
No file exists at that path; the directory stays because Node's default loader
resolves relative import() specifiers from the filename.
2026-11-10 18:52:19 +08:00
imccyu ba4d01126c feat(ptc): start scoped REPL var redeclarations from the earlier value
A call that declares an earlier name again only with var now gets a var
copy of the earlier value, so a var declaration that does not run, after
a throw or in an untaken branch, keeps that value as a global var does in
Node's REPL. var count = count + 1 consequently adds to the earlier value.
A function of the same name in one call takes precedence over the var.
Update the model guidance, Agent Note, READMEs, and the ptc-scoped-repl
snapshot schema.
2026-11-10 18:52:19 +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
_Kerman 7526051e60 test(ptc): sync artifact expectations with emitted newlines 2026-11-10 16:31:41 +08:00
_Kerman 5fd443618f fix(ptc): preserve raw text and cross-realm image inspection 2026-11-10 16:07:14 +08:00
_Kerman 0a398c2968 refactor(ptc): require image dependencies for inspect 2026-11-10 14:40:31 +08:00
_Kerman 86984d8358 Merge branch 'feat/cua-run-code-standard' into xtr/ptc-inspect-output 2026-11-10 14:24:26 +08:00
_Kerman 0191dbb0cf refactor(ptc): collect nested images through custom inspection 2026-11-10 13:38:43 +08:00
_Kerman 5d0106771e fix(ptc): render inspected values with Node object formatting 2026-11-10 11:58:10 +08:00
_Kerman 9e61299fdb fix(ptc): isolate image property descriptors from prototypes 2026-11-10 11:42:07 +08:00
turtle1999 d602624eb3 refactor(cua): isolate raw registration and simplify initialization 2026-11-10 11:11:58 +08:00
_Kerman 4c55f03a57 refactor(ptc): share output entry byte accounting 2026-11-10 10:47:03 +08:00
_Kerman 2bedbf2f2b fix(ptc): align JSON inspection tests and failure handling 2026-11-10 10:45:41 +08:00
_Kerman b877eb6118 fix(ptc): render inspected values as lossless JSON 2026-11-09 23:45:27 +08:00
turtle1999 26427a26e1 refactor(ptc): initialize each environment through a registered hook 2026-11-09 22:19:35 +08:00
_Kerman 4e976ee9a9 fix(ptc-runtime): retain inspected output across proxy and limit cases 2026-11-09 21:42:29 +08:00