* fix(subagent): restore shared concurrency guidance from #8698
Restore the change removed when master was rolled back.
Cherry-picked from 014aa1659bcd0ba3cf5d2b4c096773f01f56ec50.
* refactor(ui-tool): clarify subagent member parsing
The plugin_manager description now says that an applied change is in
effect and needs no restart, so models stop inferring restart needs
from other evidence.
Refs #8614
master moved the `workingDirectory` projection-key declaration to
`src/types.ts`; this branch's `workspaceRoot` key follows it there. The three
recorded scenarios master added (`session-list-tools`,
`computer-use-cua-driver-mcp-ptc`, `sdk/subagent-dsh-sdk-empty-route`) drop the
removed `working_directory` tool and the delegation `cwd` parameter from their
sidecars.
The kind skills tell the model to end its answer with an `action-card`
fenced block. The card projection reads the first valid block of a turn
from the answer text and names the card by its assistant message id; it
still reads `propose_action` cards and `callId` decision records of older
Sessions. The Web plugin hides the block through the Chat Markdown fence
slot, and the card still appears below the answer.
Removes the `propose_action` tool, its skill-load tracking and the
`queuedMessageLimit` configuration, and renames card ids to `cardId`.
The model has one tool for entering a worktree, as Claude Code's
EnterWorktree: `enter_worktree({ name?, from? })`. When the pool of the
checkout the Session is in holds a registered worktree of that name, the call
enters it and changes neither Git state nor files. Otherwise it creates a new
branch and checkout from `from`, HEAD by default, and enters it. `from` asks
for a new worktree, so it fails with `WORKTREE_ALREADY_EXISTS` when the name is
taken; a call without a name always creates one. The result adds `created`.
`create_worktree` is removed. `ctx.worktrees.create` and `enter` keep their
behavior: the tool calls `enter` first and `create` only on
`WORKTREE_NOT_FOUND`, so Host callers such as the forge panel still create.
The upgrade guide `create-worktree-tool-merged` covers the removed tool name.
master replaced `cordis_inspect_list` and `cordis_inspect_query` with
`cordis_inspect`, which changed the same tool lists this branch edits. The
conflicted recordings take master's side and drop `working_directory` again:
`advanced-toolchain` and the two Web recommendation scenarios by refresh, the
six Python single-file runtime logs by removing the one list entry. The Web
collapse-timing count is 33.
`ctx.worktrees.enter(agent, { name })` and the model tool `enter_worktree`
move a Session into an existing worktree in the pool of the checkout it works
in. The directory must resolve inside that pool and be a registered worktree
of the repository; otherwise the call fails with the new code
`WORKTREE_NOT_FOUND` and the Session stays where it is. Entry changes neither
Git state nor files.
Each entry appends a `plugin:worktree/entered` record. `exit` reads it to
return the Session to the checkout it entered from, so `exit_worktree` now
also leaves entered worktrees. Archive reclamation still removes only
checkouts a Session created. The `worktree` projection keeps one entry per
entered directory; its state version is 2.
The recorded worktree scenario enters the first worktree again, reads the
file it wrote there, and leaves.
Update the full-text instruction assertions, the run_code tool-schema and system-prompt sidecars of the session, SDK, and Web snapshots, the cua-mcp expected tools, the generated tool catalog with its Chinese pair, and the ptc-runtime-node README pair.
Replace the optional `workspace` marker on `working-directory/change` with a
separate `workspace-root/change` event. The directory service records the new
event for every change. `working-directory/change` keeps master's payload, is
tagged @deprecated, and has no writer.
The current-directory projection folds both events and the workspace-root
projection folds only the new one, so a stored Session keeps its original
project as its root. The Session format version is unchanged and no migration
runs; the persistence record for the marker is replaced by one for the new
event.
Add a Web snapshot that restores a cold ordinary Session in another
directory through the Session controller, keeps the second delivery live,
and rejects an archived target. Keep subagent exports unchanged by building
the agent-message attribution in the tool. Rewrite the tool, user, and group
documentation for the Web-only row, move the disposed-input upgrade guide to
v0.2.2-rc.2, drop the removed service pages and guide, and regenerate the
catalogs.
Remove the model-facing working_directory tool and the cwd parameter of the
subagent tools, so only Host operations move a Session's directory. Every
change the service records carries `workspace: true`, and the workspace root
is the directory of the last marked change, or the original project. The
anchor field, the anchor list, relocate, inherit, and anchorsOf are gone;
get, ensure, set, and rootOf remain.
A change without the marker, recorded while the model could move the
directory, moves only the current directory, so stored Sessions keep the
root they had.
- worktree: create enters the checkout through set; exit returns the Session
to the source checkout of the recorded worktree that contains its directory,
and exit_worktree exposes it to the model.
- subagent: a child starts in the parent's workspace root or a Host-chosen
directory through set.
- SDK: the working-directory methods return { cwd } again and
getWorkspaceRoot / get_workspace_root are removed.
- Recorded sessions: the worktree scenario leaves through exit_worktree and
covers recovery from a removed worktree; the two scenarios that only drove
the removed tool are deleted; three compaction scenarios lower their tuned
context window by the removed tool-schema tokens.
Drop contain_subagent from list_session: discovering subagents of a Workspace
needs either a corpus scan or the parent subagent catalog, so this version
lists only non-subagent sessions.
A workspace_id call now reads its members' headers from the Workspace
registry index through the new Workspace.sessionHeaders, so its work grows
with the member count instead of enumerating every stored Session. Unscoped
calls still enumerate the corpus headers.
user_terminal_list and user_terminal_read list terminals the user
controls, including Agent terminals the user took over, so their
descriptions now say so. The visible-terminal guidance states that
terminal_close on a taken-over terminal only removes it from the Agent's
list while its shell and processes keep running. Subagents are refused
by both tools, because their Sessions hold none of the user's terminals,
and the lines parameter is an integer schema. The README records the
sandbox policy refusal, the subagent refusal and the release behavior;
the tool catalog and the terminal-panel-tools snapshot carry the new
model-visible text.
master now rejects the @deepseek-ai/dsh-experimental- prefix for new
experimental packages, so the unreleased sidebar terminal backend becomes
@deepseek-ai/dsh-terminal-panel with plugin name terminal-panel, and its
directory joins EXPERIMENTAL_PACKAGE_NAME_EXCEPTIONS. The terminal bundle,
root devDependencies, generators, catalogs, snapshot composition and
upgrade guide use the new name; the hand-written tsconfig alias gives way
to the generated one.