Commit Graph
195 Commits
Author SHA1 Message Date
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
_Kerman ac568aa2d2 fix(ptc): capture the native console without a module import 2026-11-09 19:16:59 +08:00
turtle1999 f0e9dc1c92 fix(cua): support clean source runs and preserve per-mode guidance 2026-11-09 18:17:56 +08:00
_Kerman e1f0a36193 fix(ptc): preserve native console methods 2026-11-09 18:17:19 +08:00
_Kerman 4510e1dc57 refactor(ptc): unify wire token parsing 2026-11-09 17:56:52 +08:00
_Kerman a2ea3970fd refactor(ptc): return ordered text and image output 2026-11-09 17:44:12 +08:00
_Kerman 1fed265b3b fix(ptc): bound binary inspection and preserve failure output 2026-11-09 17:19:48 +08:00
_Kerman b98e3d070b feat(ptc): expose attachment IDs on program images 2026-11-09 15:58:33 +08:00
_Kerman 3dbe1c126f refactor(ptc): simplify image references and CUA bridge 2026-11-09 15:57:42 +08:00
turtle1999 b9966a12a6 feat(cua): expose persistent code tool outside PTC mode 2026-11-09 15:53:22 +08:00
_Kerman 4e72e43037 chore(ptc): align fixtures and docs with simplified image handling 2026-11-09 15:42:49 +08:00
_Kerman 724e56b286 feat(ptc): unify explicit text and image inspection 2026-11-09 15:06:09 +08:00
_Kerman 790991a6c0 docs(ptc): align inspection guidance and references 2026-11-09 12:56:55 +08:00
_Kerman a2c69f36f7 fix(ptc): bump bootstrap output protocol revision 2026-11-09 12:48:09 +08:00
_Kerman e688c61aab fix(ptc): target program realms for console globals 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
Anlai Lu 41ef0fcaa9 refactor(ptc): 复用 embedded 载体的既有 process.js 启动 2026-11-06 13:51:24 +08:00
Anlai Lu 4ac6a28e68 feat(ptc): 支持 embedded 模式启用 persistent PTC 2026-11-06 12:55:15 +08:00
涂轶翔 ae24f608a6 Merge pull request #7415 from deepseek-harness/feat/windows-writable-directory-sets
fix(sandbox): keep Windows extra directory grants in file tools
2026-11-05 11:39:50 +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
Yixiang Tu 69e6199cb7 test(sandbox): canonicalize roots allocated under home 2026-11-04 16:06:17 +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
Yixiang Tu e032300b4e fix(sandbox): use current grants after failed PTC startup 2026-11-04 15:11:17 +08:00
Yixiang Tu f5dea38671 feat(sandbox): add session-scoped writable directory effects 2026-11-04 15:11:17 +08:00
_Kerman ab2bee0051 Merge remote-tracking branch 'origin/master' into xtr/ptc-timeout-step-1 2026-11-03 20:12:59 +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