Commit Graph

262 Commits

Author SHA1 Message Date
Yichen Jiang
109d5b5e1c Merge remote-tracking branch 'origin/master' into worktree/fix-multi-select-custom-answer
# Conflicts:
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/question-composer/session.jsonl
#	docs/core-data-structures/user-interaction.i18n.yaml
#	packages/client/ui-question/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/ui/tui/README.i18n.yaml
#	packages/ui/user-interaction/README.i18n.yaml
2026-08-03 16:09:17 +08:00
Tianyi Cui
1ea72962eb Merge master into fix/subagent-stack-end-result 2026-08-02 23:13:00 +08:00
imccyu
d59ab5596e docs(host): align queue mirror contract 2026-08-02 17:53:07 +08:00
imccyu
a31b3eb7b8 test(host): cover queue mirror event expiry 2026-08-02 17:53:07 +08:00
imccyu
dffe955ed2 feat(web): surface and configure composer steering 2026-08-02 17:53:07 +08:00
kingwl
955a12cca4 feat(web): steer queued messages into active turns 2026-08-02 17:53:07 +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
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
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
imccyu
23680e838b fix(web): synchronize subagent navigation state 2026-08-02 12:51:11 +08:00
imccyu
b94d2f9c1d fix(web): stabilize nested subagent navigation 2026-08-02 12:51:11 +08:00
imccyu
130410bb98 fix(web): preserve subagent navigation and fork grouping 2026-08-02 12:51:11 +08:00
imccyu
8c9cd4c15d feat: optimize subagent list children query 2026-08-02 12:51:11 +08:00
Dudu-0223
9a7be21b7f fix(host): preserve subagent continuation ownership 2026-08-02 12:51:10 +08:00
imccyu
5ef5feb01a fix(web): reconcile rebased subagent contracts 2026-08-02 12:51:09 +08:00
Dudu-0223
8a518e353b feat(web): rewrite subagent conversations for FIFO activation 2026-08-02 12:51:09 +08:00
Dudu-0223
f0ab04273d fix(web): deduplicate subagent navigation 2026-08-02 12:51:09 +08:00
Dudu-0223
a27492507d feat(web): add subagent conversation transport 2026-08-02 12:51:09 +08:00
Dudu-0223
e1f7eeeb95 fix(subagent): confirm steering request admission 2026-08-02 04:34:16 +08:00
imccyu
3dfbfb4e72 Merge branch 'master' into fix/web-fork-interrupted-seq 2026-08-01 02:19:51 +08:00
kingwl
32a0e871b7 fix(web): preserve queue on stop 2026-07-31 20:51:05 +08:00
ZiyaZhang
344ad0d6fb fix(client): floor the fork anchor to a real event seq
The fork button on a stopped assistant message was inert. Frozen
interrupted nodes carry a flow-ordering seq of turnEnd.seq - 0.9, and
session.fork takes a non-negative integer on the wire, so every such
request was rejected as invalid-params before reaching the host — where
an aborted turn's logged turn/end has always made it forkable.

SessionsService.fork floors atSeq at the wire boundary. Flooring stays
inside the anchor's own turn (every turn opens with turn/start), so the
host's first-turn/end-at-or-after cut still closes on that turn.
2026-07-31 05:41:45 -07:00
Tianyi Cui
d64b032311 Merge pull request #1082 from deepseek-harness/worktree/fix-web-duplicate-folder-names-20260731
fix(workspace): allow same-basename folders in Web
2026-07-31 19:37:38 +08:00
Tianyi Cui
678ad97f9a Allow same-basename Workspace paths 2026-07-31 18:37:34 +08:00
Tianyi Cui
20cb7e7360 Merge latest master into manual compaction 2026-07-31 17:58:30 +08:00
creatixchu
dab7670207 Merge remote-tracking branch 'origin/master' into worktree/unify-workspace-add 2026-07-31 16:29:11 +08:00
creatixchu
6184ba35ca fix(web): address the review round on the one-route add flow
- lifecycle-chrome's second scaffold staged its workspace under the OUTER
  scaffold's temp root, coupling two supposedly independent worlds and
  leaving the aria scrub root wrong; it now uses its own workspaceCwd.
- The direct-open path now carries the same `flowBusy` gate that disables
  the equivalent menu entry, so an occupant re-registering mid-adoption
  cannot raise a second flow.
- A composition with no directory-picker no longer opens a zero-entry
  popover on the hero anchor: with nothing to pick and nothing to add,
  the gesture shows nothing. Both behaviors gain a unit test.
- Brought three partially superseded Agent Notes current (the native
  picker, the workspace UI product flow, and the sidebar browsing split),
  cross-linked to this decision, both languages re-recorded.
- Corrected this Note's own Testing section: the shared e2e helper stages
  and adopts its directory, it does not create one in-dialog — only
  workspace-management does. Named the client-seam and CLI-README residue
  in the follow-up TODO alongside the wire branch.
2026-07-31 16:23:49 +08:00
creatixchu
d6231007af cleanup(web): give adding a Workspace one route
Both Workspace surfaces offered "Open local folder…" and "Create a new
workspace" for one outcome. The browse occupant already carries its own
New folder affordance, so picking a directory covered creating one; the
name dialog only added a second vocabulary and a create target the
operator could neither see nor choose.

The surviving entry is named after the outcome — "Add workspace…" — and a
menu now appears only where there is something to choose between: with no
Workspace listed (the add-only sidebar header, or an empty hero list) the
anchor gesture raises the directory flow directly instead of a one-row
popover. An empty list counts as final only after the list baseline lands,
and a composition with no directory-flow occupant hides the sidebar button
rather than offering a dead one.

WorkspaceCreateFlow becomes WorkspacePickFlow (createOnly -> addOnly) and
the injected createWorkspace narrows to { path }. The host's
workspace.create({ name }) branch and `dsh web --workspace-root` lost their
last product consumer; both are marked at the call site for a follow-up.
2026-07-31 15:47:40 +08:00
Hypatia May
1114a80a45 Merge branch 'fix/web-transcript-projection' into feat/manual-compact-single-lock
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
2026-07-31 15:36:49 +08:00
imccyu
4c01550833 Merge remote-tracking branch 'origin/master' into mergebot/pr1016 2026-07-31 14:43:03 +08:00
Tianyi Cui
e371311203 Merge latest Web transcript parent into manual compaction
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/client/runtime/README.i18n.yaml
2026-07-31 14:39:20 +08:00
Tianyi Cui
6a31f5bf2a Merge finalized Web transcript parent
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-30-session-end-seed-log-boundary.i18n.yaml
2026-07-31 14:11:40 +08:00
imccyu
53ceab53b8 feat(apiproxy): workspace.archiveSession RPC and archived-sessions frame
workspace.archiveSession answers the full updated archive set;
workspace.list carries the set as the reconnect baseline; the host
stream pushes host/archived-sessions-changed full snapshots from the
domain/changed global-put branch (same posture as workspace-changed).
Unknown sessions map to the existing session-not-found code.
2026-07-31 14:08:11 +08:00
Tianyi Cui
98f48fd83a Merge finalized Web transcript parent
# Conflicts:
#	apps/cli/README.i18n.yaml
#	packages/client/runtime/README.i18n.yaml
#	packages/client/ui-trajectory/README.i18n.yaml
#	packages/client/ui-trajectory/README.zh.md
2026-07-31 13:42:47 +08:00
NI0317
cf4027afe8 Merge remote-tracking branch 'origin/master' into feature/gui-first-run-welcome
# Conflicts:
#	packages/host/apiproxy/README.i18n.yaml
2026-07-31 13:41:17 +08:00
Yichen Jiang
cb60e1759a Merge remote-tracking branch 'origin/master' into worktree/permission-default-settings
# Conflicts:
#	packages/host/apiproxy/README.i18n.yaml
2026-07-31 13:27:43 +08:00
NI0317
85d1c5e2ad Merge remote-tracking branch 'origin/master' into feature/gui-first-run-welcome
# Conflicts:
#	packages/client/ui-settings-general/src/client/index.ts
#	packages/client/ui-settings-general/src/client/locales.ts
#	packages/client/ui-settings-general/tests/apply.spec.ts
#	packages/client/ui-settings/README.i18n.yaml
#	packages/client/ui-settings/README.md
#	packages/client/ui-settings/README.zh.md
#	packages/client/ui-settings/src/client/index.ts
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/src/api-proxy.ts
2026-07-31 12:48:39 +08:00
Yichen Jiang
ee74b5b07a feat(permission): add new-session default setting 2026-07-31 12:48:19 +08:00
Hypatia May
322950487e fix(apiproxy): let commands outlive unary deadline 2026-07-31 11:51:49 +08:00
Hypatia May
01e64c6350 Merge finalized Web transcript parent 2026-07-31 09:46:32 +08:00
imccyu
2e034bbbd3 Merge remote-tracking branch 'origin/master' into mergebot/pr711
# Conflicts:
#	apps/cli/README.i18n.yaml
#	docs/module-graph.md
#	packages/client/connection/README.i18n.yaml
#	packages/client/runtime/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/src/api-proxy.ts
2026-07-31 02:02:47 +08:00
imccyu
ecbd8babc1 Merge remote-tracking branch 'origin/master' into mergebot/pr711
# Conflicts:
#	apps/cli/README.i18n.yaml
#	apps/cli/README.md
#	apps/cli/README.zh.md
#	apps/cli/cordis.yml
#	apps/cli/package.json
#	docs/config-catalog.md
#	packages/client/runtime/README.i18n.yaml
#	packages/client/runtime/src/client/contract/sessions.ts
#	packages/client/test-runtime/src/sessions.ts
#	packages/client/ui-workspace/README.i18n.yaml
#	packages/client/ui-workspace/README.md
#	packages/client/ui-workspace/README.zh.md
#	packages/client/ui-workspace/src/client/WorkspaceBrowser.tsx
#	packages/client/ui-workspace/src/client/tree.ts
#	packages/client/ui-workspace/tests/apply.spec.ts
#	packages/client/ui-workspace/tests/tree.spec.ts
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/index.ts
#	packages/host/apiproxy/tests/client-handler.spec.ts
#	packages/host/apiproxy/tests/rpc-schemas.spec.ts
#	pnpm-lock.yaml
2026-07-31 01:28:15 +08:00
Hypatia May
f3963686bd Merge final Web parent into manual compact 2026-07-31 00:38:21 +08:00
NI0317
bc69648f03 Merge updated DeepSeek onboarding base
# Conflicts:
#	packages/host/apiproxy/README.i18n.yaml
2026-07-31 00:32:40 +08:00
Yichen Jiang
307fea8ae9 Merge worktree-llm-dynamic-config (884, with latest master) into worktree-llm-web-config 2026-07-31 00:06:29 +08:00
imccyu
7c086e40be Merge branch 'master' into worktree/plan-review-layout 2026-07-30 23:48:19 +08:00