Commit Graph
7212 Commits
Author SHA1 Message Date
Yichen Jiang af7dd4e340 Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config 2026-07-30 20:29:45 +08:00
Yichen Jiang 990d1bbc35 fix(cli): declare the config-plane providers the shared base config mounts
The master merge moved the TUI composition into `apps/cli/config/base.cordis.yml`
and I carried the `settings-local` / `credentials-local` rows across without
adding them to the resolver manifest. Bare specifiers in an app config resolve
through that manifest's dependencies, so the whole tree failed to boot:

  dsh: plugin(s) failed to load: @deepseek-ai/dsh-settings-local,
  @deepseek-ai/dsh-credentials-local

which took every TUI PTY smoke with it. `verify-cordis-config` did not catch
it, so the boot smoke was the first signal.
2026-07-30 20:25:13 +08:00
Yichen Jiang 3957ce007a Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config
# Conflicts:
#	apps/cli/cordis.yml
#	apps/cli/package.json
#	apps/cli/tests/tui-keyless-smoke.e2e.ts
#	apps/web/tests/details-session-lifecycle.e2e.ts
#	apps/web/tests/snapshots/code-mode-round/ui.expected.md
#	apps/web/tests/snapshots/cordis-tool-round/ui.expected.md
#	apps/web/tests/snapshots/fresh-round-trip/ui.expected.md
#	apps/web/tests/snapshots/lifecycle-chrome/hero.expected.md
#	apps/web/tests/snapshots/lifecycle-chrome/reloaded.expected.md
#	apps/web/tests/snapshots/live-interactions/cancel.expected.md
#	apps/web/tests/snapshots/live-interactions/error-auth.expected.md
#	apps/web/tests/snapshots/live-interactions/retry.expected.md
#	apps/web/tests/snapshots/message-actions/ui.expected.md
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/seeded-history/ui.expected.md
#	apps/web/tests/snapshots/steering/mid-steer.expected.md
#	apps/web/tests/snapshots/steering/settled.expected.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/user/guide/config.i18n.yaml
#	docs/user/guide/config.md
#	docs/user/guide/config.zh.md
#	docs/user/guide/index.i18n.yaml
#	docs/user/guide/index.md
#	docs/user/guide/index.zh.md
#	examples/acp-agent/tests/snapshots/subagent-fork/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-mixed/session.2.jsonl
#	examples/cordis-agent/cordis.yml
#	examples/cordis-agent/tests/cordis-tools.e2e.ts
#	examples/headless-agent/tests/semantic-checkpoint-snapshots/tool-outcome-unknown/session.expected.jsonl
#	examples/headless-agent/tests/subagent-inheritance-snapshots/parent-override/parent.expected.jsonl
#	examples/tui-agent/code-mode.cordis.yml
#	examples/tui-agent/cordis.yml
#	packages/examples/tui-demo/README.md
#	packages/examples/tui-demo/README.zh.md
#	packages/host/apiproxy/README.i18n.yaml
#	packages/pty/tool-bash-persistent/README.i18n.yaml
#	packages/ui/tui/tests/snapshots/status-diagnostics-narrow.expected.txt
#	packages/ui/tui/tests/snapshots/status-diagnostics.expected.txt
#	pnpm-lock.yaml
#	scripts/snapshots/python-sdk-single-exe/advanced/result.json
#	scripts/snapshots/python-sdk-single-exe/advanced/session.1.jsonl
#	scripts/snapshots/python-sdk-single-exe/advanced/session.2.jsonl
#	scripts/snapshots/python-sdk-single-exe/advanced/session.jsonl
2026-07-30 20:15:40 +08:00
Yichen Jiang eae4219e04 Merge branch 'worktree-config-settings-seam' into worktree-llm-dynamic-config
# Conflicts:
#	apps/cli/README.i18n.yaml
#	apps/cli/composition.md
#	apps/cli/config/base.cordis.yml
#	apps/cli/src/app-cli-entry.ts
#	apps/cli/src/tui.ts
#	apps/cli/tests/tui-keyless-smoke.e2e.ts
#	examples/package.json
#	packages/ui/app-boot/README.i18n.yaml
#	packages/ui/app-boot/README.md
#	packages/ui/app-boot/README.zh.md
#	pnpm-lock.yaml
#	python/sdk-runtime/package.json
2026-07-30 19:46:04 +08:00
Yichen Jiang 4395268cc1 fix(ui-models): contain the card's credential probe rejection
The review named this call site with the other two, and the previous pass
missed it: the editor card's mount-time `credentials.describe` had only a
fulfillment handler, so a transport failure reached the browser as an
unhandled rejection.

The probe is a placeholder hint ("already configured"), never a precondition
for editing, so it now renders without the hint rather than failing. Covered
by a test that fails without the handler.
2026-07-30 19:29:30 +08:00
Yichen Jiang e6483f0afc feat(settings): detect stale writers with a revision, and announce raw changes
The remaining P1 from the #939 review, plus the P2 it shares a mechanism with.

Nothing carried a version, so two tabs editing one namespace silently
overwrote each other — reproduced as tab B's `reasoning` lost to tab A's
older draft. The seam's per-namespace write queue orders writes; it cannot
tell a fresh writer from one replaying a snapshot a predecessor superseded.

Each namespace now carries a monotonic `revision` over its RAW section. A
write may send `expectedRevision`, checked at the FRONT of the queue (not at
call time, which would race the very predecessor it guards against); a
mismatch rejects with `SettingsConflictError` → `settings-conflict` on the
wire, carrying both revisions. The editor captures the revision it opened at
and, on conflict, asks the user to reopen rather than replaying its snapshot.

The same counter fixes the missing broadcast. `settings/updated` is gated on
the resolved value — correct for consumers, wrong for configuration surfaces:
storing an override equal to the composition base leaves the resolved value
alone while changing what the document says (the field is now overridden, not
inherited) and moving every open editor's revision. `settings/document-updated
(ns, revision)` fires on any raw-section change, in-process or external, and
`host/settings-changed` now rides it.

That event also closes the stale model picker: editing a provider's `models`
changes no route, so `llm/adapters-updated` never fired and an open picker
kept serving the old catalog. A change to an exposed provider namespace now
emits `host/models-changed` too — that namespace holds the catalog.

Docs: both sides of the five touched README pairs, a type-equiv block for
`SettingsPathOp`, and an Agent Note recording what the plane exposes and who
may overwrite what. The deferred wire-redaction gaps (secrets behind
union/intersection/transform, `.default(...)` in the served envelope, schema
text in rejection messages, `new Function` rehydration, pi-ai's `headers`) are
recorded as TODO(settings-wire-redaction) and in Known Limitations rather than
half-fixed.
2026-07-30 19:24:21 +08:00
Tianyi Cui 0c1285e249 Merge latest master into worktree-config-settings-seam 2026-07-30 18:55:15 +08:00
CreatixChu 2e8c82634e Merge pull request #877 from deepseek-harness/feat/directory-picker-show-hidden
feat(host): show-hidden toggle, path-draft prefix filtering, and browse-dialog polish
2026-07-30 18:53:31 +08:00
Tianyi Cui 86ddef6c01 docs: refresh settings catalog locations 2026-07-30 18:35:32 +08:00
Tianyi Cui ff364c53a2 Merge master into worktree-config-settings-seam 2026-07-30 18:31:50 +08:00
Yichen Jiang 9f996be8e3 fix(web-config): close the wire boundary, the redacted-replace data loss, and three P2s
Five findings from the #939 review, each reproduced before being fixed.

**Configuration reads are as privileged as writes.** `settings.describe`
returns every exposed namespace's configuration and `credentials.describe`
reports whether an arbitrary environment-variable name is configured and from
where — reconnaissance no anonymous caller should have. Both join
PRIVILEGED_METHODS, so the whole configuration plane is loopback-only until
real authentication exists; `trustedHosts` was never authentication. The model
catalog stays reachable: it carries no endpoints or key state, and a LAN
client's model picker legitimately needs it. Asserted over a real HTTP server,
because the Host header a browser actually sends is what decides this.

**The proxy serves only namespaces a registered model provider addresses.**
The settings seam is general — any plugin may register one — but the Web
configuration plane is the model-provider surface. Without the gate, every
future `settings.register()` would silently become remotely readable and
writable configuration. An unregistered namespace and an unexposed one answer
identically, so no caller can enumerate the registry one probe at a time.

**Path-addressed writes replace the redacted-document rebuild.** The editor
reads the REDACTED descriptor, so rebuilding a section from it and replacing
wholesale deleted every literal secret the wire never returned — reproduced as
`{baseURL, reasoning}` in, stored `apiKey` gone out. `settings.mutate` applies
set/unset ops to the section as it stands at the front of the seam's write
queue, and the client names only fields it can see, so an unseen secret is
untouched by construction rather than by care.

P2s in the same pass: `llm/adapters-updated` now contains async listener
rejections (an uncontained one escaped as unhandledRejection, contradicting
the documented "observer failures are contained"); llm-deepseek's retry-policy
swap uses the atomic `registration.replace` instead of dispose-then-register,
which published `[]` then `["deepseek-official"]` so an observer saw the
provider disappear and come back; and a transport rejection no longer strands
the page in `loading` or a card in `busy`, with removal failures surfaced on
the page banner instead of swallowed.
2026-07-30 18:30:15 +08:00
creatixchu 33bb266932 Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 18:29:37 +08:00
Tianyi Cui 3921610f5b Merge pull request #893 from deepseek-harness/feature/shared-cli-config-foundation
refactor(cli): consolidate shipped config trees
2026-07-30 18:28:30 +08:00
creatixchu bda377f6a5 Merge remote-tracking branch 'origin/feat/directory-picker-show-hidden' into feat/directory-picker-show-hidden 2026-07-30 18:09:34 +08:00
creatixchu cf21f0a1ea Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 18:08:30 +08:00
imccyu d4d5a11e8d Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 18:07:42 +08:00
Tianyi Cui 53ff5c6ef2 Merge branch 'master' into feature/shared-cli-config-foundation 2026-07-30 18:02:07 +08:00
imccyu c8658aa3d3 Merge pull request #979 from deepseek-harness/codex/composer-dock-stacking
fix(web): align composer context stack
2026-07-30 18:00:46 +08:00
Yichen Jiang b73e1811ff Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config 2026-07-30 17:39:26 +08:00
Yichen Jiang caf2db0929 Merge branch 'worktree-config-settings-seam' into worktree-llm-dynamic-config
# Conflicts:
#	packages/settings/settings-local/src/index.ts
2026-07-30 17:39:07 +08:00
Tianyi Cui 66e182b516 Merge branch 'master' into feature/shared-cli-config-foundation 2026-07-30 17:35:47 +08:00
kingwl 3d6cacc59b Merge remote-tracking branch 'origin/master' into codex/composer-dock-stacking
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-30 17:35:22 +08:00
creatixchu 295813f6eb Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 17:32:46 +08:00
imccyu aaf8fd07e0 Merge pull request #954 from deepseek-harness/codex/details-default-closed
fix(web): keep details closed by default
2026-07-30 17:28:32 +08:00
kingwl abf498b8dc fix(web): align composer context stack 2026-07-30 17:26:44 +08:00
Yichen Jiang 0a263941ef Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/event-producer-consumer.md
#	examples/headless-agent/tests/headless.snapshot.ts
#	examples/headless-agent/tests/snapshots/missing-credential/stream-json.expected.jsonl
#	packages/llm/llm-deepseek/README.i18n.yaml
#	packages/llm/llm-deepseek/src/index.ts
#	packages/llm/llm-pi-ai/README.i18n.yaml
#	packages/llm/llm-pi-ai/src/index.ts
#	packages/llm/llm/README.i18n.yaml
#	packages/llm/llm/src/index.ts
2026-07-30 17:22:44 +08:00
Turtle e3be0c5195 Merge remote-tracking branch 'origin/feature/shared-cli-config-foundation' into feature/shared-cli-config-foundation 2026-07-30 17:22:39 +08:00
Turtle 873d3cee57 chore(docs): re-record generated artifacts after the master merge 2026-07-30 17:17:49 +08:00
Tianyi Cui d8f4a0efda chore(docs): refresh merged generated records 2026-07-30 17:17:38 +08:00
creatixchu b8d9fb1ede Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 17:17:03 +08:00
imccyu 4cd5745b94 Merge branch 'master' into codex/details-default-closed 2026-07-30 17:14:51 +08:00
Yichen Jiang a90ccc4453 revert(sandbox): withdraw the credential-document read denial
The `readDenyPaths` policy field shipped in the previous commit broke Linux
confinement outright. bwrap has to create the `/dev/null` bind's mount point
inside a tree its own profile has already made read-only, so it refused the
entire confinement whenever the parent directory was absent — every host that
has not stored a credential yet, including a fresh install:

  bwrap: Can't mkdir parents for /home/runner/.dsh/.env: Read-only file system

which the executor correctly classifies as SANDBOX_UNAVAILABLE, so every
confined bash call failed closed. Landlock cannot subtract from its own `/`
read grant, so it reported `partial` enforcement on every confined call for a
file it never hid, with no way to switch the denial off (schemastery fills an
omitted array with `[]`, so empty and omitted were indistinguishable).

A protection that breaks confinement where it works and misreports it where it
does not is worse than a documented absence. Revert the field, both expressible
backends, the enforcement downgrade, and the policy default; state the residue
plainly in the credentials-local READMEs — file mode stops other OS users, not
the model — and keep the OS-keychain provider recorded as the real answer.

The narrower discipline stands: no surface hoists the credential document into
`process.env`, and the model is never handed a resolved path to it.
2026-07-30 17:09:42 +08:00
Yichen Jiang 52ae578982 test(tui): pin the personal overlay to the environment layers the CLI loads
The personal-config smoke asserted that `$DSH_HOME/.env` feeds a `!!js`
expression in the personal `config.yaml` — the hoist this branch removed so
`credentials-local` can own that document and keep stored keys rotatable.

Seed both layers instead and let one expression separate them: the welcome
prefers the personal variable, so it can only render the invoking directory's
value while the harness home's `.env` stays out of `process.env`. The negative
that made the removal worth doing is now asserted in the assembled
application, not just in the provider's unit tests.
2026-07-30 17:09:29 +08:00
Tianyi Cui abd7d57358 Merge branch 'master' into feature/shared-cli-config-foundation 2026-07-30 17:08:42 +08:00
Tianyi Cui 07e3d15d42 docs(settings): mark deferred review follow-ups 2026-07-30 17:07:29 +08:00
imccyu 6686f47945 Merge pull request #883 from deepseek-harness/feat/ask-question-gui
feat(web): answerable ask_user_question flow & workspace tooltips & hero layout & plan button
2026-07-30 17:07:18 +08:00
creatixchu 3809795fd5 Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 17:02:33 +08:00
imccyu 34d5f8f2e2 Merge branch 'master' into feat/ask-question-gui 2026-07-30 16:55:54 +08:00
imccyu f87692a5c3 test(web): anchor the group section above the HoverCard wrapper
The workspace header row is now wrapped by its HoverCard anchor span
(0b4a6196f), so the row's immediate parent no longer holds the session
subtree; the delete scenario anchors on the groupSection ancestor
instead. The flat-view and dwell failures were downstream of this one
(shared page state).
2026-07-30 16:54:43 +08:00
Turtle 3c620a0cb6 Merge remote-tracking branch 'origin/master' into feature/shared-cli-config-foundation
# Conflicts:
#	docs/cordis-catalog/services.md
#	packages/host/apiproxy/README.i18n.yaml
2026-07-30 16:53:55 +08:00
Turtle 9c5a515501 fix(example): drop the never-activated bash stack from the inheritance fixture
dsh-bash-local injects `subprocess`, which this tree never mounted, so the bash
chain sat PENDING and the bundle's tool-bash waited with it. The shared boot()
all-ACTIVE assertion now surfaces that as a load failure.

The scenario probes filesystem confinement only, so the rows are removed and the
bundle opts out with `toolBash: false`. The recorded transcript is unchanged
because bash never reached the model.
2026-07-30 16:52:14 +08:00
Tianyi Cui b987ec664a Merge pull request #941 from deepseek-harness/feat/session-inherited-boundary
feat(session): add the end-seed log boundary
2026-07-30 16:51:20 +08:00
imccyu 34c124585a fix: test 2026-07-30 16:46:50 +08:00
Yichen Jiang 8707f324c6 refactor(ui-models): render the curated fields from a narrowed adapter family
The effort field's existence check was unreachable — EFFORT_FIELD is
total over the two known families — and a coverage exemption was papering
over the branch, which the merged toolchain no longer honored. Taking the
narrowed family as a parameter makes the lookup total at the type level,
so the check and its exemption both disappear. The rendered output is
unchanged: the browser goldens replay byte-identical.
2026-07-30 16:41:44 +08:00
Yichen Jiang e7894f4152 docs(credentials): record the third-review contracts across READMEs, catalogs, and a new Agent Note
Both provider READMEs state what actually holds: credentials-local now
documents the physical-line editor, the read-modify-write under the
writer lock, and a Security boundary section saying plainly that the file
mode stops other OS users and not the model. sandbox-policy documents
readDenyPaths and its per-backend enforcement. The llm READMEs carry the
registration handle, pi-ai's credential-miss semantics, and DeepSeek's
same-generation snapshot; app-boot and the CLI README stop describing
$DSH_HOME/.env as an environment layer.

A new Agent Note records the round (and the prior seam note cross-links
it); the sandbox and core catalog pages gain readDenyPaths and
AdapterRegistrationHandle with their manifest entries. The headless
missing-credential snapshot re-records for the reworded guidance, pi-ai
gains the Loader-composition guard its twin already had, and the
deliberate provider symmetry is marked for the clone detector.
2026-07-30 16:37:28 +08:00
Tianyi Cui 9e679c89b6 Merge branch 'master' into feat/session-inherited-boundary 2026-07-30 16:30:42 +08:00
creatixchu 380b215287 Merge remote-tracking branch 'origin/master' into feat/directory-picker-show-hidden 2026-07-30 16:12:35 +08:00
Turtle 674c25a6a2 Merge remote-tracking branch 'origin/master' into feature/shared-cli-config-foundation
# Conflicts:
#	docs/tool-catalog.md
#	examples/package.json
#	packages/examples/agent-spine-demo/README.i18n.yaml
#	packages/examples/agent-spine-demo/README.zh.md
#	pnpm-lock.yaml
2026-07-30 16:11:21 +08:00
Yichen Jiang 9626c15c6b test(sandbox): carry the resolved read denials through consumer policy assertions
The policy home's resolve() now stamps readDenyPaths, so every consumer
that pins the resolved shape (bash-sandbox hand-off, tool-fs stamps)
carries it, and three uncovered branches gained real tests: landlock
reporting partial enforcement for a denial it cannot express, the
policy's default under programmatic construction, and both ambient
credential paths in llm-deepseek without a mounted seam.
2026-07-30 16:11:21 +08:00
Yichen Jiang 7606a99813 feat(sandbox): deny confined executions read access to the credential document
The credential store is 0600 under a 0700 directory, which stops other OS
users but not the model: tool processes run as the same user, so under
the shipped danger-full-access default they read it like any other file.

SandboxExecutionPolicy grows readDenyPaths, and sandbox-policy defaults
it to $DSH_HOME/.env — the exact file rather than the harness home, so
the model keeps its documented access to its own session log. Seatbelt
appends a trailing deny (last matching rule wins) and bwrap maps
/dev/null over each path after any workspace bind; Landlock grants are a
pure allow-list that cannot subtract from its own / read grant, so
confine() reports partial enforcement there instead of claiming a
boundary the process does not have.

A real-kernel Seatbelt e2e proves the shape: the same read succeeds
unconfined and fails under the denial, while a sibling file in the same
directory stays readable. Both READMEs state the residual boundary
plainly — no confining mode means no boundary — and record the OS
keychain provider as the real answer.
2026-07-30 16:02:13 +08:00