Commit Graph

756 Commits

Author SHA1 Message Date
Turtle
5d3fdf3042 docs: record separate dsh build decision 2026-08-12 15:37:03 +08:00
Turtle
4c49e7109b fix(cli): separate dsh from repository build 2026-08-12 15:37:03 +08:00
Turtle
15c84cdc4b Merge pull request #2310 from deepseek-harness/refactor/cmdline-plan-trim
refactor(cmdline): run the program's own commander action instead of a plan callback
2026-08-12 13:20:30 +08:00
Turtle
54dd75a969 refactor(cmdline): run the program's own commander action instead of a plan callback
parseCmdline(ctx, program): void only adapts commander control flow to
the launcher: it parses the immutable cmdlineArgs snapshot and turns
help, version, parse errors, and action rejections into a ctx.appExit
request. App validation and the ctx.provide of the app-owned service
live in the program's own synchronous .action(), which commander runs
inside parse — program.error(...) there shares the exit path with a
grammar rejection. Deletes the CmdlinePlan export, its unread ctx
parameter, the type-unsound (() => ({}) as T) default, and the
T | undefined return with its per-caller publish guard.
2026-08-12 13:07:41 +08:00
Yichen Jiang
d4e06d6dd8 Merge pull request #2279 from deepseek-harness/worktree/preset-user-root-in-package
agent-presets owns the writable preset root instead of awaiting an app
2026-08-12 11:53:55 +08:00
Huanqi Cao
50bedaf03b Merge pull request #2234 from deepseek-harness/feat/loader-entry-disabled-interpolation
feat(loader): interpolate the entry disabled field
2026-08-12 11:40:02 +08:00
Yichen Jiang
dfa2d91dcb Merge master into worktree/preset-user-root-in-package
Overlaps master on the preset e2e, the web scaffold, and the generated
config-catalog triplet; all merged textually, so the catalog is regenerated and
its pairing hashes re-recorded rather than trusted.
2026-08-12 11:08:55 +08:00
imccyu
40af20cafe refactor(picker): split the directory-picker faces into their own packages
The browse and native backends were dual-face packages: a Node backend plus a
browser surface under one tsconfig that referenced Client packages. That put
Client projects — and through them the Client runtime — inside the Host
compiler aggregate, which builds before the generated Remote contributions
exist. Each browser half moves to its own Client package, and both backends
become Node-only.

The interaction is still one choice: the adaptive chooser mounts the backend
and its surface as a pair of Loader entries and tears both down in reverse, so
a resolved kind still swaps both faces. Compositions that pin an interaction
directly now pin the pair, and the chooser's runtime-string package list keeps
naming everything a composing app must resolve.
2026-08-11 23:33:16 +08:00
imccyu
5ca7be5dcb release(dsh): 0.0.1-rc.2 2026-08-11 22:52:39 +08:00
Yichen Jiang
925df04112 Merge pull request #2249 from deepseek-harness/worktree/minimal-profiles-bare-runtime
feat: align minimal runtime profiles
2026-08-11 21:57:03 +08:00
Tianyi Cui
cb235da37f Merge pull request #2282 from deepseek-harness/worktree/deny-deepseek-base-urls-519
fix(boot): deny DeepSeek endpoint env overrides
2026-08-11 21:55:26 +08:00
Huanqi Cao
05a8846c6e refactor(preset): trim the shell-row comments
Drop the filler and factually loose comments added with the tool-pwsh rows:
the platform expressions self-explain, the web-app overlay comment repeats
the file header, and the spec comments now state only the platform-scoped
evaluation fact.
2026-08-11 21:38:51 +08:00
Tianyi Cui
4c9c6c8217 test(cli): align endpoint fixture with boot trust 2026-08-11 21:33:06 +08:00
Yichen Jiang
1b2181dccd test: align Web minimal compaction assertion 2026-08-11 21:23:17 +08:00
Yichen Jiang
d647ce9f7d test(agent-presets): assert the derived root through the shipped bundles
The new default's whole claim is that a launcher configuring nothing still
finds a person's presets, and nothing asserted it through a real composition —
`user-root.spec.ts` plugs the service directly, and every other lane pins
`includeUserRoot: false` so the machine's home cannot decide a golden.

This lane boots the real base and web-app bundles with only the shipped root
patched in, points `$DSH_HOME` at a temp home before boot (the derived root is
resolved when the plugin is constructed), and asserts a preset placed there is
listed as `user`, reported healthy, authorable, and mountable into an agent
whose tool catalog it decides.
2026-08-11 21:18:37 +08:00
Yichen Jiang
715baae6c1 fix(agent-presets): let the invariant follow the roster it actually scans
The service moved its "is a roster composed" reads to the derived root set;
the invariant companion still read `config.roots`. In the shape this change
exists for — an app configures nothing and the roster is the harness home
alone — that made the advisory warning fire while the fail-loud invariant
stayed silent, so an agent could address a model against an empty global
layer unchecked.

Both now read one source: `roots` exposes the resolved set, and the invariant
asks it. That decides the behavior deliberately rather than by omission — a
composition that mounts the roster now fails an unjoined agent whether its
roots were configured or derived, and `includeUserRoot: false` with no
configured roots is how a deployment keeps its agents on the host plane. Both
shapes are pinned; the derived-only case fails against the old predicate.

Three pieces of prose went stale with the first commit: the web-app bundle
comment still called the writable root an assembly fact patched in by
AppCLIEntry (removed in the profile-plugin-bundles refactor — `composeProfile`
owns it now, and only for the shipped root), and the shipped skill and its
Agent Note still called both roots "configuration". The README gains the
resolved-roster reader and the discoverable-but-undeletable preset a second
writable root produces.
2026-08-11 21:13:41 +08:00
Yichen Jiang
adfd54dc5c Merge branch 'master' into worktree/minimal-profiles-bare-runtime 2026-08-11 21:11:32 +08:00
Yichen Jiang
5c7dd6f8eb feat(agent-presets): own the writable preset root instead of awaiting an app
`Config.roots` defaulted to `[]`, so a deployment that did not patch both roots
in got a roster with none — `dsh run` once booted exactly that and failed
resolving `standard`. The user root never needed an app: `<dshHome>/.agent-presets`
is the same place in every deployment, resolvable here the way
`dsh-skill-local` resolves `<dshHome>/skills`.

The roster now derives that root itself unless `includeUserRoot` is false, and
`apps/cli` supplies only the SHIPPED root, whose path an installed app alone
can resolve. The derived root is appended after every configured root, so a
shipped id still shadows a home directory claiming it and `writableRoot()`
still prefers an explicitly configured `user` root; the set is resolved once at
construction, because a root set that changed between a `list()` and the
`copy()` acting on its answer would author into a directory the caller never
saw.

Every test that pins an exact roster now says `includeUserRoot: false` — the
machine's real harness home must not decide what a golden or an assertion
counts.
2026-08-11 21:09:35 +08:00
Huanqi Cao
ccb3e4aaac Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	scripts/verify-cordis-config.ts
2026-08-11 21:04:49 +08:00
Tianyi Cui
7583778fbd Merge branch 'worktree/schedule-conversational-after' into worktree/schedule-explicit-at
# Conflicts:
#	packages/client/runtime/README.i18n.yaml
#	packages/client/runtime/README.md
#	packages/client/runtime/README.zh.md
2026-08-11 20:34:34 +08:00
Tianyi Cui
9dc4af386d Merge branch 'master' into worktree/schedule-conversational-after 2026-08-11 20:31:49 +08:00
Huanqi Cao
32744c2b5c refactor(preset): gate tool-pwsh by platform alongside tool-bash
The web-app overlay now disables the host tool-pwsh row too, and the shipped
presets (standard/code/cordis) declare both shell tool rows with inverted
platform gates — tool-bash on POSIX, tool-pwsh on win32 — so the preset layer
exposes exactly one shell tool per host and a preset can drop or replace the
shell tool on either platform. windows-shell.spec pins both preset gates and
both host tool rows disabled in the web composition; the loader and Windows
pwsh notes are updated in place.
2026-08-11 20:21:57 +08:00
Yichen Jiang
8a29248425 Merge pull request #2268 from deepseek-harness/worktree/preset-authoring-self-validation
修正创造模式 preset 组装指导中的 4 处事实错误与失效的校验建议
2026-08-11 20:18:34 +08:00
Yichen Jiang
3fb325cfec fix(preset): state the user preset root plainly, resolve the acting path
The previous pass over-corrected: presenting both roots as unknowable made the
guidance vaguer without making it truer. Every `dsh` launcher puts authored
presets under `$DSH_HOME/.agent-presets`, so the skill and persona state that
as the answer to "where do my presets live" and reserve the read-back for the
path an agent actually opens or edits, which `copy()` already reports.
2026-08-11 20:04:32 +08:00
Huanqi Cao
3f2490a7c4 Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation 2026-08-11 20:00:54 +08:00
Tianyi Cui
e4fdd4b1e9 Merge branch 'worktree/schedule-conversational-after' into worktree/schedule-explicit-at 2026-08-11 19:57:55 +08:00
Yichen Jiang
782d670f24 fix(preset): stop presenting the preset roots as constants
Neither root is a property of the preset layer. `Config.roots` defaults to `[]`;
the two the shipped agent sees are patched in by the dsh CLI, whose user root is
`dshHomePath('.agent-presets')` and whose system root ships beside the install.
`writableRoot()` then takes the first `user` root from whatever configuration
supplied it.

The skill and the persona stated `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`
as where authored presets live, which is only the default install's answer, and
no call reports either root: `authorable` says whether a writable one exists,
and `list()` cannot reveal a user root that is still empty. Both now keep that
path as what to tell a user asking where to look, and direct every path an agent
acts on to `list()` or `resolve()` — which is also what `copy()` already relies
on, since it chooses the writable root itself and reports the file it created.
2026-08-11 19:56:45 +08:00
Tianyi Cui
5f64b6815c Merge remote-tracking branch 'origin/master' into worktree/schedule-conversational-after
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-08-11 19:54:39 +08:00
Yichen Jiang
63b564bb4b fix(preset): cover both root-realm rejections and narrow the packaging claim
Review found two errors in the first pass.

The skill quoted `service "<name>" has been registered at <Owner>` as the
rejection for a service published into the root realm. That message only
appears when the loose name collides with one the host already supplies. A
preset publishing its OWN new service name reaches the root realm successfully
and is rejected by the mount audit instead, with `row(s) published
process-global service(s) [...]` — which is the shape a forgotten realm
actually takes. Both messages are now listed, verified by mounting one preset
of each kind.

The Agent Note claimed every harness package publishes exactly three file
patterns. 139 do; 28 also publish `lib/client.js`, 22 publish
`lib/types/**/*.js`, and `dsh-message-feedback` publishes `src`. The note now
states only the fact it needs: no package's `files` includes its README.

Also from review: the copy step no longer repeats the display name it already
set, the id rule spells out `[a-z0-9][a-z0-9-]*`, and the sandbox step says
reads need no escalation.
2026-08-11 19:49:47 +08:00
Yichen Jiang
5b3d801cb5 fix: declare minimal preset filesystem dependency 2026-08-11 19:37:01 +08:00
imccyu
04b2f7bcc9 test(web): keep the browser e2e out of the Client build graph
These e2e boot a real harness and read Host services, so they type-check in the
Host aggregate; importing a Client package there pulls its whole project — and
everything it references — into the Host build phase, where a Client project
waiting on generated artifacts cannot compile. The welcome-notice constants are
mirrored in the scaffold instead, which lets apps/cli drop the Client project
references that only served as their owner map.
2026-08-11 19:25:40 +08:00
Tianyi Cui
035f3e5a65 Merge worktree/schedule-conversational-after into worktree/schedule-explicit-at 2026-08-11 19:20:38 +08:00
Tianyi Cui
3f01ff8291 Merge remote-tracking branch 'origin/master' into worktree/schedule-conversational-after 2026-08-11 19:05:13 +08:00
Huanqi Cao
25329fcb79 Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	vendor/README.md
#	vendor/loader/src/config/entry.ts
2026-08-11 18:43:40 +08:00
Turtle
e5b8b36471 test(e2e): disable the always-on client-hmr row in the preset boot
The suite disables the webserver and browser roster rows; the reload
chain waits on both, so the activation audit failed the boot.
2026-08-11 18:01:25 +08:00
Turtle
149a5674be fix(cli): contain app-exit races in watcher setup; sync watch docs
A fast one-shot can request exit through ctx.appExit while the launcher
still awaits its watcher setup; the failure guard now also swallows the
resulting rejections when the tree is no longer live, not only on
signal shutdown. Sync the app-boot README and headless bundle comment
with unconditional patch watching, and bring the two Agent Notes still
asserting the --dev row append and the headlessIo slot current.
2026-08-11 18:01:25 +08:00
Turtle
341051603f refactor(web): remove --dev; mount the reload chain unconditionally
The client-hmr row joins the web bundle as an ordinary always-on roster
row: without a rebuild watcher rewriting client bundles it polls
unchanged files and stays idle. This deletes the --dev flag, the web
runtime's mode config, the mode-forked prompt contract, the DSH_WEB_MODE
bash variable, and the post-settlement row-creation machinery the
conditional row required. dsh web + pnpm run dev:web remains the
development loop.
2026-08-11 18:01:25 +08:00
Turtle
c598989d08 refactor(cmdline): trim the command-line seams to existing interfaces
The web runtime creates its dev-mode client-hmr row in the root tree
after Loader settlement with plain loader.create, deleting the vendored
Entry.enableRuntime state machine and dsh-cmdline's enableRow export.
Include declares the existing EntryGroup.key tree-carrier marker instead
of the EntryConfigResolver protocol (its own path stays literal; nothing
used a dynamic path). The launcher recognizes no app row: SIGTERM exits
0 on every surface, every boot watches its user patch layers, and the
headless runner exits through ctx.appExit, deleting ctx.headlessIo. Also
restores the vendor README rescope entry to the position the
rescope-vendor exact-edit anchor requires, fixing the master hygiene
regression.
2026-08-11 18:00:15 +08:00
Yichen Jiang
0b3ac6356b fix(preset): correct the composition-authoring skill and give it a real check
The `cordis` preset's `editing-cordis-compositions` skill is the only guidance
an agent has when it authors a preset, and four of its statements were false.

`tool-bash` was named as the worked example of a row that hides a service; it
provides nothing and injects `bashEnv` from the host's own `bash-env` row, so
following that advice strands the row behind its realm and the preset fails to
mount. The `isolate` example composed `tasks-local` with `tool-tasks`, which
the shipped compositions' own comments say breaks `run_in_background`. A string
realm label was described as pooling one instance; labels join realms and
`provide()` still throws on the second registration. Rows were to be checked
against a package README, which no harness package publishes.

Verification is now the agent's own: `standingKeyFor(id)` runs the same mount a
session start performs and rejects an unresolvable package, an invalid config, a
service in the root realm, and a row that never activated. The skill states that
`list()`'s `broken` field is a shape check that every one of those passes, ships
the `cordis_mount` plugin that reaches the roster service, and names `copy()` as
the authoring write. The prohibition on touching the shipped install is promoted
to its own section and extended to the host composition.

Fixes #2266
2026-08-11 17:43:09 +08:00
Yichen Jiang
2b5c17ab6b Merge remote-tracking branch 'origin/master' into worktree/minimal-profiles-bare-runtime
# Conflicts:
#	examples/jsonrpc-agent/README.i18n.yaml
#	examples/jsonrpc-agent/README.md
2026-08-11 15:51:03 +08:00
Huanqi Cao
2a6658252c Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.md
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.zh.md
2026-08-11 15:33:09 +08:00
Yichen Jiang
663253099d feat: align minimal runtime profiles 2026-08-11 15:19:33 +08:00
Huanqi Cao
4308f91e88 refactor(bundle): fold the Windows shell platform layer into the base rows
Entry \disabled\ interpolation makes the launcher's separate platform layer
unnecessary: the base bundle's cordis.patch.yml now gates both shell stacks
on its own rows — bash-sandbox/tool-bash disable on win32, and their twins
pwsh-sandbox/tool-pwsh mount only there with the inverted expression — so
exactly one shell stack mounts per host from one shared patch file.

windows.cordis.patch.yml and the launcher's windows-shell.ts injection (boot,
live recomposition, config dumps) are deleted, with the workspace-constraints
entry and the dsh-base exports/files entries following. The windows-shell spec
pins the effective per-platform roster through the real bundle layers, and
base.spec pins the four symmetric gates. The superseded active notes are
updated and cross-linked; the loader note records the fold itself.
2026-08-11 15:11:45 +08:00
Yichen Jiang
b06969b56f Merge remote-tracking branch 'origin/master' into worktree/preset-plane-fallout-p1
Only `docs/module-graph.*` conflicted, from master's new
`@deepseek-ai/dsh-message-feedback` package; generated, so taken from master
and regenerated.

Hook bypassed as before: the staged-pairing check hands an archived note path
to `verify-translation-pairing`. The full-corpus gate passes.
2026-08-11 14:13:32 +08:00
Huanqi Cao
f00a29111b Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation 2026-08-11 13:40:24 +08:00
Yichen Jiang
cc1cf12cb6 Merge remote-tracking branch 'origin/master' into worktree/preset-plane-fallout-p1
Generated docs (`module-graph`, `event-producer-consumer`) taken from master
and regenerated. The `cordis-inspect-jsdoc` golden likewise: master's copy is
the base, and this branch's `presentAs` per-scope rewording is re-applied on
top, since `cordis_inspect` renders that JSDoc into model-visible output.

Hook bypassed as before: the staged-pairing check hands an archived note path
to `verify-translation-pairing`. The full-corpus gate passes.
2026-08-11 12:57:58 +08:00
Turtle
d00590c707 docs: replace nonexistent repository references 2026-08-11 12:35:38 +08:00
creatixchu
10d9fd21f2 Merge remote-tracking branch 'origin/master' into feat/read-image-context 2026-08-11 12:08:33 +08:00
Turtle
67ef355800 refactor(cli): inline source launch script 2026-08-11 11:58:47 +08:00
Huanqi Cao
6fb226ea24 feat(loader): interpolate the entry disabled field
The Windows platform layer disables tool-bash and inserts the pwsh stack, but the shipped presets each mount a tool-bash row that re-enabled the tool on win32 — the session had both a PowerShell-backed bash tool and tool-pwsh, silently, because no spec pinned the composed preset layer.

The Loader now evaluates a disabled: !!js expression against the loader context at every mount decision; disabled is the only interpolated metadata field, and the raw node stays in the options so write-back keeps the !!js form. The standard/code/cordis presets gate tool-bash with process.platform === 'win32', verify-cordis-config allows expressions in disabled only, and the windows-shell spec pins the preset-level invariant.
2026-08-11 11:33:53 +08:00