Commit Graph
100 Commits
Author SHA1 Message Date
Tianyi Cui 8eb97ab47e Merge pull request #1344 from deepseek-harness/worktree/production-issue-automation
chore: enable Issue management automation
2026-08-03 20:03:13 +08:00
Tianyi Cui aec9e3145e chore: enable Issue management automation 2026-08-03 19:53:36 +08:00
Tianyi Cui 731f16ceb0 Merge pull request #1179 from deepseek-harness/worktree/production-issue-management
chore: add Issue management runtime
2026-08-03 17:01:37 +08:00
Tianyi Cui f3fd8e4cd3 chore: add Issue management runtime 2026-08-03 16:38:11 +08:00
Tianyi Cui 8bf606ba80 Merge pull request #1146 from deepseek-harness/fix/subagent-stack-end-result
fix(subagent/web/host/acp): end-result fixes for the continuable-subagent stack
2026-08-02 23:19:11 +08:00
Tianyi Cui 1ea72962eb Merge master into fix/subagent-stack-end-result 2026-08-02 23:13:00 +08:00
Tianyi Cui 711a33ea8d fix(web): keep known subagent chooser visible 2026-08-02 21:22:39 +08:00
Tianyi Cui da80b0e5e6 chore(docs): refresh the descriptor catalog pointer
Correcting the cold-resume module contract added one JSDoc line above SubagentDescriptorData, but the generated persistence catalog still linked the durable subagent/descriptor event payload to descriptor.ts line 36. That left a dead source pointer and made the repository documentation gate fail even though the catalog content itself was otherwise current.

Regenerate docs/persistence-catalog.md so its source link follows the declaration to line 37. This is a generated-reference correction only: it does not change the durable event vocabulary, payload shape, or runtime behavior.

Validated with pnpm run verify-persistence-catalog and git diff --cached --check; the generator reports the catalog is up to date.
2026-08-02 20:34:43 +08:00
Tianyi Cui a54eadf2f1 test(web): pin the subagent snapshot to English
The subagent conversation scenario asserts English role names and compares English accessibility goldens, but it opened a raw Playwright page while the rest of the English Web scenarios use the shared bootstrap that writes dsh.locale before client initialization. Once the subagent surface became localized, the raw page left those assertions dependent on ambient browser or persisted locale selection.

Create the page through newEnglishPage so the product sees an explicit English preference before boot, while preserving the standard 1680 by 1000 viewport. Chinese-surface scenarios continue to bypass this helper and advertise their own locale explicitly.

A fresh library build and production Vite build completed successfully. The focused assembled subagent-conversation Web suite then passed all 8 keyless replay tests against the updated singular-copy golden, and the staged diff passes formatting, lint, and whitespace hooks.
2026-08-02 20:30:01 +08:00
Tianyi Cui e4663cb10b test(web): share the subagent locale translator
The localized catalog spec introduced two package-local translation stubs: one manually looped over interpolation parameters and the other indexed the Chinese dictionary directly. That duplicates framework test plumbing and can drift from the shared lookup, fallback, and placeholder semantics used by the rest of the client suites.

Use makeTranslate from dsh-client-test-runtime as the single Chinese translator for both catalog and read-only composer assertions. Record the test-only workspace dependency in the ui-subagent manifest and lockfile; no production dependency or runtime bundle edge is added.

This removes twelve lines of local translation behavior while preserving the same Chinese assertions and exercising the shared interpolation path. Both ui-subagent test files pass with all 28 tests, the package TypeScript project checks cleanly, and the staged diff passes formatting, lint, and whitespace hooks.
2026-08-02 20:28:23 +08:00
Tianyi Cui a24f9b06e7 refactor(subagent): drop speculative effect rollback
The PR moved child scope-effect registration into the contribution-installation try/catch solely to cover a hypothetical throw, while documenting that Context.effect cannot reject for the live unpublished scope passed to apply. The change therefore added control-flow and rollback implications for a failure mode the API does not expose, without changing observable behavior.

Keep the rollback boundary focused on contribution installers, which are the operations that can actually fail and leave recorded installations to unwind. Register the child-scope cleanup effect immediately after that boundary, as before; its disposer still converges with contribution removal through the registry idempotence rules.

This is a behavior-preserving removal of unnecessary code. The focused activation-setup-registry suite passes all 11 tests, the subagent TypeScript project checks cleanly, and the staged diff passes whitespace validation.
2026-08-02 20:25:39 +08:00
Tianyi Cui ab4120ac96 docs(subagent): keep intent note current
The PR appended a superseded warning to one obsolete durability clause while leaving the same active decision record with mutually incompatible claims about Task-backed continuations, provider resume dispatch, and persistence guarantees. Because implemented Agent Notes are current authority rather than a review-history log, readers could still derive an API and ownership model that no longer exists.

Rewrite the affected decision, alternatives, and consequences in place around the activation-based implementation: ordinary starts remain holder-owned one-shot runs; continuable starts return durable child and accepted message identities; the manager owns materialization, follow-up/report routing, cold resume, and teardown; providers only contribute detached first-create data through prepareContinuable; and flush participation is observable but is not proof that a persistence backend stored state.

Keep the English and Chinese records equivalent, move the Chinese dispose glossary to its new first use, and refresh the pairing sidecar. This commit changes documentation authority only; it does not change runtime behavior.

Validated with the scoped translation-pairing writer and checker, verify-md-wrap, verify-agent-note-format, verify-agent-note-classification, and git diff --cached --check.
2026-08-02 20:25:20 +08:00
Tianyi Cui f91b4b2cdc docs(subagent): correct cold-resume parent contract
The descriptor module claimed that no parent exists during cold resume, using that as the reason maxTokens cannot be inherited. Continuable follow-up actually requires and authorizes the exact live direct parent before it loads the descriptor and materializes the child, so the stated lifecycle fact was false.

Keep the real persistence decision explicit: per-activation budgets are not durable descriptor composition. Cold resume reconstructs child options only from the curated durable fields, so it deliberately neither restores the establishing budget nor inherits the live parent current transient budget; the resumed provider and model route defaults apply.

This is a contract-only correction with no runtime change. The exported JSDoc gate remains clean.
2026-08-02 20:18:31 +08:00
Tianyi Cui 3fc4142c04 fix(web): pluralize singular subagent counts
The localized catalog exposed one count.total and one count.running string for every cardinality. The English dictionary therefore rendered both the visible trigger and its accessibility label as 1 subagents, and the assembled Web golden had begun preserving that grammar error.

Split both count families into explicit one and other keys, following the existing client locale convention. SubagentCatalogAction selects the pair from the effective descendant count; English uses subagent for one and subagents otherwise, while Chinese keeps its unchanged classifier text under the same key domain.

Add a component regression proving a single running descendant selects both singular keys. Update the real Web E2E locator and keyless assembled aria golden from 1 subagents to 1 subagent. Both ui-subagent test files pass all 28 tests and the package TypeScript project builds cleanly.
2026-08-02 20:17:34 +08:00
Tianyi Cui ac88b6e4c7 fix(acp): retain nested teardown diagnostics
ACP waits for every owned Agent disposal and throws one AggregateError when any Session teardown fails. The aggregate message embedded each rejected value with String(failure) because the connection-close logger itself renders only the outer error message. String preserves only an Error name and message, so causes and AggregateError members disappeared from the operational warning.

Render each per-session rejection with the existing errorChain diagnostic helper before joining it into the outer message. The original rejected values remain in AggregateError.errors for programmatic inspection, while the message now carries cause chains and nested aggregate members through the String-based logger.

Exercise a disposal failure containing both AggregateError members and a nested cause, while retaining the existing barrier that proves the second Session finishes disposal before any warning is emitted. All 10 ACP disposal tests pass and the ACP TypeScript project builds cleanly.
2026-08-02 20:14:46 +08:00
Tianyi Cui 7b40fd5419 perf(web): trail only membership-invalidated catalogs
refreshSubagents previously treated every overlapping caller as proof that the in-flight response was stale. Selection, menu opening, and reconnect paths can legitimately request the same catalog concurrently without any host mutation, so those reads were coalesced and then followed by an unnecessary second RPC.

Restore ordinary in-flight coalescing at the public refresh boundary. The debounced host/session-added path now owns the membership-specific stale mark: if its timer fires during an older pull, it queues one trailing request; otherwise it starts the refresh directly. Parent removal keeps its separate explicit invalidation and trailing-refresh path.

Add a regression proving two overlapping reads share one Promise and issue one RPC. Rework the membership test to start from a restored selected parent, so only the host membership frame can request the trailing pull instead of the test priming the stale bit with an unrelated duplicate read.

Validated with both focused catalog cases, all 40 SessionManager tests, and the client runtime TypeScript project build.
2026-08-02 20:13:28 +08:00
Tianyi Cui 069f2644ff fix(web): preserve removal across stale catalog pulls
The earlier removal fix invalidated parentAvailable immediately and queued a trailing subagent.list request, but it still applied the already in-flight success verbatim. That stale success reopened the composer and became the trailing request baseline. If the trailing request failed, its error snapshot preserved parentAvailable:true indefinitely.

Record a false-only parent availability override on the exact in-flight catalog request when the owner removal frame arrives. Successful and failed responses now replay that request-local invalidation before publishing a snapshot, and addressed child Sessions receive the same effective value. The trailing request therefore starts from a false baseline and a later transport or business failure cannot resurrect the removed parent.

Strengthen the regression to assert the catalog and selected child remain read-only immediately after a stale parentAvailable:true success, then fail the trailing pull and assert the error snapshot remains unavailable. The complete SessionManager test file passes all 39 tests, and the client runtime TypeScript project builds cleanly.
2026-08-02 20:11:34 +08:00
Tianyi Cui b54381f3e7 fix(agent): commit mutable setup at publication
Agent setup may await while a mutable contribution registry changes. The previous subagent path validated and committed its provisioning batch inside the setup callback. A revocation queued after that callback returned therefore treated the installation as resident and released it, even though AgentLoop had not published the child yet. AgentLoop could then admit and announce a child whose required capability had already disappeared.

Introduce AgentSetupCommit as the optional synchronous result of create and resume setup. AgentLoop now awaits setup, invokes that commit with no intervening asynchronous boundary, and only then enters the Session and Agent registries. A commit failure follows the existing private-transaction rollback, so neither identity is published and the caller can reuse the id.

Keep continuable-subagent installations provisional until this publication commit. Contribution removal still releases every installation immediately, but now marks an unpublished batch invalid so its commit rejects with ACTIVATION_SETUP_REVOKED. Once the commit succeeds, later removal remains ordinary live revocation.

Cover create and resume ordering, resume commit rejection and identity reuse, and an assembled microtask revocation that leaves only the parent Agent and Session. Update the public JSDoc, architecture flow, package contracts, current Agent Notes, Chinese counterparts, pairing records, and generated Cordis API to describe the new boundary.

Validated with the four focused Agent/subagent test files (91 tests), the isolated assembled regression, targeted TypeScript project builds, generated Cordis API freshness, export JSDoc verification, scoped translation pairing, Markdown wrapping, and Mermaid parsing.
2026-08-02 20:09:05 +08:00
Tianyi Cui baf133d134 Merge pull request #933 from deepseek-harness/codex/web-steer-support
feat(web): steer queued messages into active turns
2026-08-02 18:00:12 +08:00
Tianyi Cui 089f921663 Merge pull request #983 from deepseek-harness/codex/install-pnpm-stderr
fix(install): show pnpm version errors
2026-08-02 17:41:43 +08:00
Tianyi Cui dbe053fe08 refactor(host): share the fenced-live-agent resolution between agentFor paths
The live fast-path fence and the raced-collision catch duplicated the same
subagent-ownership classification, tripping the duplication gate. Extract
`fencedLiveAgent` so both paths resolve one live identity through the
fence identically.
2026-08-02 14:05:37 +08:00
Tianyi Cui dabb710ab3 chore(docs): refresh the module graph for the ui-subagent locale edge 2026-08-02 14:05:37 +08:00
Tianyi Cui e2982e0fcc chore(deps): record the ui-subagent locale devDependency in the lockfile 2026-08-02 14:05:37 +08:00
Tianyi Cui d004c694f1 test(web): narrow the stale-pull assertion to the root catalog's calls 2026-08-02 14:05:37 +08:00
Tianyi Cui c8b2e70988 build(web): declare the locale dependency for ui-subagent
The client plugin now consumes `ctx.locale` (dictionary registration plus
the slot `t` seat), but the package graph did not know it: no
`dshClient.inject` entry, no peer/devDependency, no tsconfig project
reference. Mirror the ui-conversation convention so the dependency graph,
HMR/preflight metadata, and standalone packaging all recognize the
`@deepseek-ai/dsh-client-locale` seam.
2026-08-02 14:05:37 +08:00
Tianyi Cui d7a70f6efa fix(host): hand a raced plain-agent winner back from agentFor
The raced-collision catch mirrored only the subagent-owned half of
ensureSession's `.catch`: a concurrent plain-agent publish winning the
identity still fell through to `internal`, where ensureSession returns
the winner. Mirror in full — classify a subagent-owned winner as
`agent-busy`, return a clean plain-agent winner directly.
2026-08-02 14:05:37 +08:00
Tianyi Cui fb6ccdff04 docs(subagent): scope report acceptance to parent resolution, not delivery
The README claimed "acceptance is governed by registry presence" as a
universal statement, but `sendReport` translates a registered parent's
send rejection into the same PARENT_UNAVAILABLE code — registry presence
governs parent *resolution*, while acceptance additionally depends on the
parent's log still admitting appends. Soften both languages to the
precise contract and re-record the pair.
2026-08-02 14:05:37 +08:00
Tianyi Cui 295e56b61e fix(web): keep removal-time availability invalidation across an in-flight pull
The `host/session-removed` invalidation flipped the owned catalog and
addressed children to `parentAvailable:false`, but a `subagent.list` pull
already in flight was requested before the removal and its ok-response
carries the pre-removal `parentAvailable:true` — the response then
overwrote both the catalog and every addressed child, resurrecting the
writable-editor-against-a-dead-continuation-owner bug the invalidation
closes, with no refresh scheduled to converge afterwards.

Mark the owner stale when a pull is in flight at removal time, so one
trailing refresh runs after the in-flight response settles and the
post-removal host truth lands. Adds a regression test: removal mid-pull,
stale ok response, trailing pull, final state stays unavailable on the
catalog and the addressed child.
2026-08-02 14:05:37 +08:00
Tianyi Cui 5c98cbd8f6 test(web): run the subagent-conversation e2e against the locale-aware copy
The ui-subagent catalog and read-only composer copy moved from hardcoded
Chinese to the locale-aware `subagent` namespace, so an en-US headless
browser now renders English. The e2e's selectors and goldens still
asserted the old hardcoded Chinese strings, leaving the scenario unable
to find the catalog trigger.

Convert the selectors to the default (en-US) render and re-record the
catalog goldens (ui, tree, nested) in English. The locale-aware parts of
the remaining goldens were already English (recorded under the en-US
default), so sidebar and fork are untouched.
2026-08-02 14:05:37 +08:00
Tianyi Cui daf9554804 refactor(subagent): scope the setup transaction to the creation callback
The setup validation and commit moved into the callback, so the outer
definite-assignment slot and its type import are no longer needed; declare
the transaction as a callback-local const.
2026-08-02 14:05:37 +08:00
Tianyi Cui e55d3e96d9 docs(subagent): re-record bilingual pairs after the stack end-result doc edits
Two pairs needed their confirmed-consistent state refreshed: the
intent-named note's supersession clause (zh link normalized to the shared
`.md` target, since the pairing contract requires identical link targets)
and the report README's acceptance-semantics rewrite (both sides edited).
Re-record both pairs so the translation-pairing gate passes.
2026-08-02 14:05:36 +08:00
Tianyi Cui 8bba72639a chore(docs): refresh the persistence catalog after the descriptor doc edit
The maxTokens contract sentences added lines above the `subagent/descriptor`
declaration, shifting its source anchor from line 32 to 36; regenerate the
catalog so the source link stays accurate.
2026-08-02 14:05:36 +08:00
Tianyi Cui df01ed926a fix(subagent): type the schema-resolved reportDelivery shape
Config() applies the schemastery default at runtime, but its return type
keeps the input's optional field, so assert the resolved shape at the
seam — keeping the dead fallback branch gone.
2026-08-02 14:05:36 +08:00
Tianyi Cui 902b46b86b feat(web): localize the subagent catalog and read-only composer copy
The catalog action (diagnostics, relative times, loading/error/retry,
mode and activity labels, branch toggles, descendant counts, tree aria)
and the read-only composer were hardcoded to Simplified Chinese, so an
English-locale session rendered mixed-language UI. Register a `subagent`
locale namespace (zh source of truth + en dictionary), declare it on both
slot registrations, thread the locale `t` seat through the components, and
mount the locale service in the plugin specs.

The UI spec's zh assertions now run against the real dictionary through a
`t` stub that interpolates `{name}` params exactly like the locale
service.
2026-08-02 14:05:36 +08:00
Tianyi Cui 3114947324 docs(subagent): correct report acceptance semantics for closing parents
The tool README claimed a "missing, disposed, or closing parent" fails
the call — but acceptance is governed by the parent's registry presence:
`resolveReportParent` only rejects when the durable parent id is absent
from the registry, so a host-owned parent already in disposal but still
registered still accepts (the pinned host-disposing-parent behavior).
The claim misled callers into treating disposal state as a delivery
signal.

Restate the contract in both languages: absence from the registry is the
only `PARENT_UNAVAILABLE` case, and a failed tool call does not prove
non-delivery — a later `tools/post-execute` veto can fail a call whose
report was already accepted, so the durable child transcript remains the
recovery source.

Adds a regression test pinning acceptance into a host-disposing but
still-registered parent, and rejection after disposal settles.
2026-08-02 14:05:36 +08:00
Tianyi Cui 5da2ac5835 docs(subagent): state that per-activation knobs are not restored on cold resume
The descriptor deliberately snapshots a curated composition field set
rather than the merge-extensible `AgentOptions`, and it already names the
per-activation exclusions (`outputSchema`). `maxTokens` is the same class
of property — it budgets one activation, and on cold resume there is no
parent to inherit a limit from, so the resumed activation runs under the
deployment defaults. Spell that out in the module contract so the
fallback is a documented decision instead of a silent surprise for
deployments that set explicit child token limits.
2026-08-02 14:05:36 +08:00
Tianyi Cui 98ccbade7e fix(subagent): drop the dead reportDelivery destructure default
`apply()` resolved the deployment config through schemastery's `Config()`,
which always fills the schema default (`quiet`, pinned by the config test),
so the `= 'quiet'` destructure fallback was dead at runtime on every path —
and as a defaulted parameter it formed a branch no test could ever
exercise against the per-file coverage gate. Remove the fallback and let
the schema be the single home of the default.
2026-08-02 14:05:36 +08:00
Tianyi Cui 879a623095 fix(subagent): cover the scope-disposal effect registration with setup rollback
The `childCtx.effect()` that routes scope disposal into `releaseChild` was
registered after the install loop's try/catch, so a hypothetical throw
from the registration itself (effect() rejects only on an inactive fiber,
which a live unpublished scope cannot be) would leak the just-installed
batch — neither the setup-rollback catch nor `releaseChild` would release
it. Move the registration inside the try so the existing rollback path
covers it; no observable behavior change.
2026-08-02 14:05:36 +08:00
Tianyi Cui 42ee4e22de fix(subagent): validate setup transactions before agent publication
`materialize` ran `setupTransaction.assertIntact()` only after
`ctx.agents.create()/resume()` resolved — but the factory publishes
`session/created` (and the persistence backend writes the descriptor seed)
inside that call, and `rollbackUnpublished()` only disposes the live
handle; the persistence seam has no delete. A setup contribution revoked
during construction therefore left a durable ghost: `startContinuable()`
rejected with `ACTIVATION_SETUP_REVOKED` and returned no child id, yet
`list_agents` surfaced a persisted `continuable` child whose log carries a
valid descriptor — so a later `send_message` could cold-resume a child the
deployment had explicitly refused to establish.

Move the validation into the creation callback, before the factory can
publish: `assertIntact()` then rejects the create/resume call itself, so
no session is ever persisted for a rejected child. Commit the batch in the
same callback so a later contribution removal releases the installation
instead of invalidating a child already being established (live
revocation, matching the resident semantics).

Pins the rollback regression test to assert that no `session/created` is
ever announced for the rejected child (the parent is created before the
listener registers), in addition to the existing registry assertion.
2026-08-02 14:05:36 +08:00
Tianyi Cui 2a3a8ff66d docs(subagent): mark the superseded flush-required clause in the intent-named note
The 2026-07-27 intent-named operations note still declared that a
continuable provider requires `flush()` to resolve `true` at its final
result boundary and maps `false`/rejection to `DURABILITY_FAILED`. The
activation-based record (2026-07-28-continuable-subagent-conversations)
superseded that contract: the manager awaits the final flush as a
best-effort barrier and deliberately ignores the boolean, because listener
participation cannot identify a persistence backend.

Active notes are the current source of truth — sync both sides of the
bilingual pair by marking the old clause superseded with a link to the
record that replaced it.
2026-08-02 14:05:36 +08:00
Tianyi Cui cb835c7ea9 fix(acp): keep per-session teardown failure reasons in the aggregate log
The connection-close teardown path threw a bare `AggregateError` whose
message counts the failed sessions, and its only production consumer logs
through `String(error)` — which renders the message alone. Compared with
the previous `Promise.all` behavior, every actual disposal failure reason
disappeared from operational logs.

Join the per-session reasons into the aggregate message, matching the
subagent seam's own aggregate disposal messages, and pin the reason in
the dispose spec's warning assertion.
2026-08-02 14:05:36 +08:00
Tianyi Cui e81267945a docs(host): refresh the stale agentFor resume-on-miss comment
The commands entry's inline comment described the old routing shape
("clients only send a sessionId for a published session") without the
ownership fence that agentFor now applies on every path — the fence's
contract home is the api/commands.ts module JSDoc, so trim the duplicate
and point at the routing shape only, keeping one home per fact.
2026-08-02 14:05:36 +08:00
Tianyi Cui c68c3dbb43 fix(host): check subagent ownership before cwd conflict in ensureSession
Explicit-id adoption of a cold session-backed subagent under a *different*
cwd answered `session-conflict` because the cwd check ran before the
persistence inspection classified the identity. The api/commands.ts
contract states explicit-id `session.create` adoption rejects
session-backed subagents with `agent-busy` — ownership is an identity
property, so it must win regardless of the requested workspace.

Reorder the stored-session branch to inspect and classify ownership
first, then enforce the cwd match, making the response match the
documented contract.
2026-08-02 14:05:36 +08:00
Tianyi Cui 468fd29e51 fix(host): classify a raced cold-resume ID collision as agent-busy
When a generic `agentFor` cold resume loses the identity to a parent's
concurrent `enter()` — the collision rejection arrives from
`ctx.agents.resume` publication after the pre-resume re-check — the error
fell through to the `internal` mapping. Clients retrying then see a
transient-looking internal failure instead of the stable ownership error
that `ensureSession`'s `.catch` already produces for the exact same
published-winner case.

Mirror that re-classification in `agentFor`'s resume error path: after the
typed errors, re-check the registry and attached store and answer
`agent-busy` when the raced winner is subagent-owned. Adds a regression
test whose resume mock publishes the subagent winner before throwing the
ID-collision error.
2026-08-02 14:05:36 +08:00
Tianyi Cui 56e252bed3 fix(host): fence the agentFor live fast path on the agent's own session
`agentFor` fenced subagent ownership through the attached session store
(`ctx.sessions.get`) and only then returned a live registered agent. A
registered agent whose session is ever absent from the attached store —
an invariant nothing in this package guarantees — would therefore be
handed out through generic Host routing unfenced, bypassing subagent
delivery entirely.

Fence `live.session` directly whenever a live agent exists, and keep the
attached-store check only for the not-live durable classification.
`ensureSession`'s race `.catch` already fences `live.session`; this makes
the fast path the same check instead of an asymmetric weaker one.
2026-08-02 14:05:36 +08:00
Tianyi Cui 4b2fa3317e perf(host): scan the own-suffix for a subagent descriptor without copying
`hasSubagentDescriptor` sliced the whole own-suffix events array on every
Agent-bound RPC — including each `session.prompt` and `sessions.models`
call on long transcripts — and `ensureSession` rescans the same suffix
after creation. Replace the slice-then-some with an indexed loop from the
seed boundary, so the classification is a plain O(suffix) read with no
allocation.
2026-08-02 14:05:36 +08:00
Tianyi Cui b2187cabf6 fix(cli): keep the core-web overlay at its documented two-tool surface
The opt-in `core-web.cordis.yml` profile promises "exactly persistent
`bash` plus `str_replace_editor`" (its header comment and `apps/cli/
README.md`), but the base registration of `tool-subagent-list-agents`
(added with the durable child catalog) was not disabled by the overlay,
so the profile actually exposed `bash`, `str_replace_editor`, and
`list_agents`. The assembled snapshot was updated to accept the third
tool, which ratified the contract break instead of fixing it.

Disable `tool-subagent-list-agents` in the overlay and restore the
snapshot's expected tool registry to the documented two tools.
2026-08-02 14:05:36 +08:00
Tianyi Cui 8431dbead3 fix(web): invalidate catalog availability when the owning parent is removed
A removed session can no longer be the delivery owner of its continuable
children, but the `host/session-removed` handler only reconciled the
removed row's own activity. `parentAvailable` was updated exclusively from
`refreshSubagents` success, and removal schedules no catalog refresh — so
after the parent's Activation detaches, an addressed child kept a writable
editor against a dead continuation owner until an unrelated refresh (or
forever, for a closed menu).

Flip `parentAvailable` to false on the owned catalog and push
`handleSubagentParentAvailable(false)` to every addressed child Session at
removal time, matching the refresh path's notification. New Session
instances already read `parentAvailable` from the catalog, so they inherit
the invalidated state.

Adds a regression test: removing the catalog's owning parent flips the
snapshot's `parentAvailable` and notifies the addressed child instance.
2026-08-02 14:05:36 +08:00
Tianyi Cui b270b3ef9f fix(web): run a trailing catalog refresh for coalesced membership changes
`refreshSubagents` single-flights per catalog owner: a request arriving
while a pull is in flight returns the in-flight promise and is silently
coalesced into it. The in-flight response was requested before the
triggering change, so it can never contain that change — a debounced
membership refresh (50ms after `host/session-added`) firing during a slow
pull therefore lost the new child, and the catalog stayed stale until an
unrelated trigger (reselection, menu reopen, reconnect).

Mark the owner stale on coalescing and re-arm one trailing pull in the
settlement `finally`, so every membership change observed during a pull is
carried by a follow-up refresh exactly once. Bounded: the trailing pull
only runs when a refresh request was actually coalesced, and a new
coalescing during the trailing pull re-marks the same set.

Adds a fake-timer regression test: a `host/session-added` debounce firing
mid-pull yields exactly two `subagent.list` calls and the catalog
eventually contains the new child.
2026-08-02 14:05:36 +08:00
Tianyi Cui f14121a4c2 refactor(subagent): narrow continuation interface 2026-08-02 04:34:17 +08:00
Tianyi Cui 48949c4576 Merge pull request #1138 from deepseek-harness/worktree/session-search-opt-in-20260802
fix(cli): keep session search tools opt-in on shipped surfaces
2026-08-02 04:26:15 +08:00
Tianyi Cui 54ef823be7 fix(cli): keep session search tools opt-in on shipped surfaces
The shipped-roster change made @deepseek-ai/dsh-tool-session-query a
default row of the shared base.cordis.yml, so the TUI and Web surfaces
put the five session-search tools in front of the model. That
contradicts the recorded opt-in stance for the model-facing session
query consumer; the ACP example remains the mounted reference.

Remove the row from the shared base, the now-dangling disabled patch in
the opt-in core-web profile, and the workspace dependency. The
ctx.sessionQuery index stays: the TUI's /resume and the Web content
search consume it directly. Both shipped-composition tests now pin the
20-tool catalog.
2026-08-02 03:56:25 +08:00
Tianyi Cui b1cf358704 Merge pull request #1134 from deepseek-harness/worktree/native-github-stacks-policy
docs: adopt native GitHub stack workflow
2026-08-02 03:24:03 +08:00
Tianyi Cui 9a07380c23 adopt native GitHub stack workflow 2026-08-02 03:17:42 +08:00
Tianyi Cui ad686ea40a Merge pull request #1130 from deepseek-harness/fix/goal-ref-shape
fix(goal): emit bare GoalRef in fold lastRef and goal/changed notifications
2026-08-02 02:52:18 +08:00
Tianyi Cui 23610c6abd fix(goal): emit bare GoalRef in fold lastRef and goal/changed notifications
goalChangeRef returned the full GoalSnapshot for every snapshot operation,
so foldGoal(...).lastRef and the goal/changed notification ref carried
objective, phase, and maxGoalRounds fields instead of the declared
GoalRef { id, revision }. Only the clear tombstone was bare. Emit an exact
{ id, revision } ref for snapshot changes and pin the contract with a
regression test covering create/edit/block notifications and the fold.
2026-08-02 02:25:24 +08:00
Tianyi Cui e10239b3fa Merge pull request #936 from deepseek-harness/worktree/repository-plugins-app
feat: configure repository plugins from DSH home
2026-08-02 01:59:07 +08:00
Tianyi Cui c96f48e176 fix(review): tolerate mid-teardown personal-watcher registration
CI caught a startup race the PTY smoke stages naturally: a TUI /exit typed
while watchPersonalPatches is still opening its watcher disposes the tree,
and the HMR effect registration rejects with INACTIVE_EFFECT, crashing an
app that exited exactly as asked. Return a no-op disposer for that exact
code; every other registration failure still propagates (covered both ways).
2026-08-02 01:29:04 +08:00
Tianyi Cui b6284c8467 fix(review): audit prepared-wrapper activation and pin generated shapes
ds-review-bot round 1 on the DSH-home integration:
- generated wrappers now inject the services their manifest needs (skills/
  tools beside loader), and loadPreparedRepository rejects a wrapper fiber
  that settles anything but ACTIVE — a composition missing a required
  service fails the repository transaction instead of committing an ACTIVE
  row over a silently PENDING child (critical finding)
- the github: source ref segment excludes '#', so 'a#b' refs fail at the
  config parser with the promised syntax instead of inside pnpm
- watchPersonalPatches re-reads the include's non-patch options per refresh
  instead of a registration-time snapshot
- the TUI smoke's cache-seeded wrapper is produced by the real
  prepareDshPlugin (cache LAYOUT stays a deliberate external pin)
- new Loader integration test drives a live repositories update through
  entry.update: generation swap, old skills removed, failed candidate
  rolled back to the previous generation
2026-08-02 01:29:04 +08:00
Tianyi Cui 2448496803 feat: configure repository plugins from DSH home 2026-08-02 01:29:04 +08:00
Tianyi Cui 0664b25cd9 fix(review): validate skill roots at mount and isolate provider default roots
ds-review-bot round 1 on the repository-plugin runtime:
- a manifest-declared skill root absent or non-directory in the installed
  package now fails the plugin load (skill-local treats a missing root as
  legitimately empty, which silently mounted a skill-less plugin)
- includeDefaultRoots: false no longer inherits $DSH_BUNDLED_SKILL_DIR, so
  isolated repository providers see only their explicit roots
- prepared wrapper baseUrl schema requires the file: scheme, failing hostile
  URLs at the declared validation boundary
- preparedPath reuses format.ts's isOutside; SERVER_NAME_PATTERN is exported
  and pinned equal to dsh-mcp-client's, with the restatement justified (the
  prepare bin keeps a zod-only module graph); the unexplained `as never`
  cast now carries its schemastery rationale
- the import-free wrapper assertion also rejects dynamic import(
- the headless fixture wrapper is regenerated by the real prepareDshPlugin
  and a drift test pins fixture == generator output
- prepareDshPlugin JSDoc states the non-atomic publish repair contract
2026-08-02 01:25:02 +08:00
Tianyi Cui a0aed8a19f fix(examples): own repository plugin startup order 2026-08-02 01:25:02 +08:00
Tianyi Cui a7b84bec68 fix(lockfile): link repository plugin to vendored Cordis 2026-08-02 01:25:02 +08:00
Tianyi Cui fa7051a9d1 feat: add static repository plugin format 2026-08-02 01:25:02 +08:00
Tianyi Cui fd4d369907 feat(cordis): add repository package cache 2026-08-02 01:25:02 +08:00
Tianyi Cui f941ba1b5f fix(review): label host-preparation failures and gate vendored lockfile links
ds-review-bot round 1: boot() now throws `host preparation failed` when
prepare() rejects before any config-tree entry mounts (the plugin-tree label
overstated), and the new hygiene gate verify-vendored-links pins the
linkWorkspacePackages fix — every vendored package name in pnpm-lock.yaml
must resolve to a workspace link with no registry copy alongside.
2026-08-02 01:25:01 +08:00
Tianyi Cui 0a297c39d3 fix(cordis): preserve concurrent loader composition 2026-08-02 01:25:01 +08:00
Tianyi Cui 2fe205f01a fix(cordis): clear omitted include patches 2026-08-02 01:25:01 +08:00
Tianyi Cui 560f3abd21 fix(vendor): link Cordis workspaces in built artifacts 2026-08-02 01:25:01 +08:00
Tianyi Cui 195f7fa9af fix(cordis): make config reload transactional 2026-08-02 01:25:01 +08:00
Tianyi Cui 52a715d303 fix(web): allow profiles without native bash env 2026-08-02 01:13:58 +08:00
Tianyi Cui 2309f97a16 chore(bash): mark bashEnv ownership FIXME 2026-08-02 00:57:15 +08:00
Tianyi Cui 00f156fcde Merge remote-tracking branch 'origin/fix/web-agent-runtime-context' into worktree/pr830-retarget-review-20260801
# Conflicts:
#	apps/cli/src/web.ts
2026-08-02 00:56:14 +08:00
Tianyi Cui 6cd9fefe88 fix(cli): register web prompt context before boot 2026-08-02 00:49:58 +08:00
Tianyi Cui 0758839b00 Merge fix/web-agent-runtime-context into fix/web-gui-feedback-loop 2026-08-01 22:15:36 +08:00
Tianyi Cui d74048345a Merge origin/master into fix/web-agent-runtime-context 2026-08-01 22:04:10 +08:00
Tianyi Cui 07202e67ba Merge pull request #1094 from deepseek-harness/worktree/default-workspace-write-ui-20260731
Default TUI and Web sessions to workspace-write
2026-08-01 20:01:48 +08:00
Tianyi Cui 95e0dc0583 Merge remote-tracking branch 'origin/master' into worktree/default-workspace-write-ui-20260731 2026-08-01 19:55:15 +08:00
Tianyi Cui 8a36dd4280 Merge pull request #1091 from deepseek-harness/feature/installer-adopt-checkout
feat(install): adopt an existing checkout into the managed layout
2026-08-01 19:51:12 +08:00
Tianyi Cui 3b9afd2f29 Merge remote-tracking branch 'origin/master' into worktree/default-workspace-write-ui-20260731 2026-08-01 19:48:47 +08:00
Tianyi Cui b02b7b2e50 Merge remote-tracking branch 'origin/master' into feature/installer-adopt-checkout 2026-08-01 19:44:12 +08:00
Tianyi Cui cb57ee9fad Merge remote-tracking branch 'origin/master' into worktree/default-workspace-write-ui-20260731 2026-08-01 19:41:42 +08:00
Tianyi Cui c3463ffd62 Merge pull request #1085 from deepseek-harness/worktree/install-interface-choice
feat(install): choose Web UI or TUI after setup
2026-08-01 19:41:04 +08:00
Tianyi Cui 09b02ab18e Merge remote-tracking branch 'origin/master' into worktree/default-workspace-write-ui-20260731 2026-08-01 19:40:17 +08:00
Tianyi Cui d24879a413 Merge branch 'master' into codex/remove-scoped-bash 2026-08-01 19:38:11 +08:00
Tianyi Cui 1d86be1b74 docs(install): correct managed-layout comments 2026-08-01 19:35:48 +08:00
Tianyi Cui 0385638a35 test: refresh translation prompt for installer docs 2026-08-01 19:35:43 +08:00
Tianyi Cui 43bbfce7ee test(web): refresh preserved queue access snapshot 2026-08-01 19:33:45 +08:00
Tianyi Cui c2171ef1f4 Merge branch 'master' into codex/goal-clear-single-flight 2026-08-01 19:33:21 +08:00
Tianyi Cui d963a36792 Merge remote-tracking branch 'origin/master' into feature/installer-adopt-checkout 2026-08-01 19:31:44 +08:00
Tianyi Cui 1892d97930 Merge origin/master into worktree/install-interface-choice 2026-08-01 18:06:49 +08:00
Tianyi Cui d0a0bb92ca Merge remote-tracking branch 'origin/master' into worktree/default-workspace-write-ui-20260731
# Conflicts:
#	apps/cli/README.i18n.yaml
2026-08-01 18:06:19 +08:00
Tianyi Cui d7289febdb Merge pull request #959 from deepseek-harness/fix/checkout-workdir-prompt
fix(prompt): distinguish checkout from workdir
2026-08-01 17:54:34 +08:00
Tianyi Cui d8980d0336 Merge pull request #1106 from deepseek-harness/feat/experimental-subcommand-gate
feat: rename experimental-meta/-upgrade to meta/upgrade behind an --experimental gate
2026-08-01 17:53:36 +08:00
Tianyi Cui 1f6f1cc32f Merge origin/master into workspace-write default
# Conflicts:
#	apps/cli/README.i18n.yaml
2026-07-31 20:44:15 +08:00
Tianyi Cui b694c33d18 Default shipped UI sessions to workspace-write 2026-07-31 20:39:53 +08:00
Tianyi Cui 5c4b701afe Merge pull request #1090 from deepseek-harness/worktree/readme-install-clone
docs: install from a repository clone
2026-07-31 20:33:55 +08:00
Tianyi Cui 2a7e659fb5 docs: install from a repository clone 2026-07-31 20:29:25 +08:00
Tianyi Cui e1c6fc3db4 Merge pull request #1032 from deepseek-harness/xtr/trajectory-timeline-polish
fix(trajectory): polish timeline timing and layering
2026-07-31 20:25:08 +08:00
Tianyi Cui 0cdf78013b Merge pull request #1087 from deepseek-harness/codex/experimental-cli-command-names
feat(cli): mark meta and upgrade commands experimental
2026-07-31 20:24:13 +08:00