The package entry now default-exports the Host Service `ctx.cliAccounts`
and exports only types. A CLI app plugin calls `register` once with its
CLI, account, and Plugins page text; the Service adds the CLI path to
runtime context, runs the account operations, registers the account on
the Plugins page, and withdraws all of it when the plugin unloads.
`commandTimeoutMs` is one Service setting. The base bundle loads the
Service, so the package gains locale metadata and leaves the library
and optional-package lists.
* feat(forge): name worktree branches, start them from remote branches, and show changes being read
The New Session worktree option's base menu now searches local branches and
each remote's branches, pins the current branch and every remote's default
branch, and names each remote group by its repository. Its last row opens a
dialog that names the new branch, starting from `worktreePrefix` and checking
Git's branch-name rules; the Host refuses an invalid or taken name. A request
records the full ref of its base and the optional name; every attempt uses the
name.
A remote-tracking base is fetched first: the worktree service gains a
`fetch` request field and a `fetch` phase, fetching only that branch without
tags. A failed fetch leaves the message waiting with Retry, Use the last
fetched version, and Continue without a worktree; a taken name offers Rename.
While the changes view reads changes it has not shown yet, it says
"Reading changes" above file card placeholders, and the files menu names no
count.
* fix(worktree): forward only the declared create_worktree arguments
The create_worktree parameter object is open, and the tool passed it to the
worktree runtime unchanged. Now that a runtime request can ask to fetch, an
undeclared `fetch: true` from the model would have fetched, or refused a local
`from`. The tool now forwards only `name` and `from`, so it never fetches.
* docs(forge): say that only generated worktree branch names come from the Session id
* fix(forge): keep the collapsed change request status on one line
In the Session panel the collapsed card's number line kept every part at
full width inside a clipping row, so a narrow panel cut the most urgent
flag off without an ellipsis, such as "有冲突" after "3 项检查失败".
The number and status now form one MarqueeText line as wide as the row.
While the line with failed checks does not fit, they take the shorter
wording without their count; a line that still does not fit ends in an
ellipsis and crawls into view with the title while the pointer rests on
the card's head. The line measures again when its width or the fonts
change. Expanded cards keep their branch names as before.
* fix(forge): hide remote credentials and read the branch a tag shares its name with
The base menu named an unrecognized remote's group by its fetch URL as
`git remote -v` prints it, so a token in the URL, such as
`https://oauth2:[email protected]/...`, reached the browser and showed
in the menu. The group now shows the URL without its user name and password.
Inspection read the checked-out branch with `symbolic-ref --short HEAD`,
which prints `heads/main` while a tag is also named `main`; the New Session
option then requested `refs/heads/heads/main` and every worktree attempt
failed. Inspection now reads the full ref and takes the name under
`refs/heads/`, so the option, the pinned current branch, and the checkout
row name `main`. HEAD that names a ref outside `refs/heads/` reads as no
branch.
* test(worktree): set up nested remotes and line endings the CI runners' Git accepts
Git 2.55 on the CI runners refuses `git remote add team` next to an
existing `team/fork` remote; the check runs only in `git remote add`, so
the longest-remote case now writes the second remote with `git config`, as
configuration written earlier or by hand holds it. The test clone also
turns off `core.autocrlf`, as `repository` does, because the Windows
runner's global setting checked the fetched file out with CRLF.
`get(session)` is the only read of a Session's directory again. `rootOf` and
the `workspaceRoot` projection are removed: the directory relative paths
resolve from is the workspace root.
The difference the second read expressed lives in the `workingDirectory` fold.
`workspace-root/change`, the event Host moves record, sets the directory. A
stored `working-directory/change`, whose directory the model could choose, sets
it only when the directory lies inside the Session's original project; a
directory outside the project returns the Session to the project, and the next
request's context reports it. The fold state gains the original project, so
its state version is 2. The forge worktree fold reads stored changes by the
same rule.
The subagent manager resolves a child's directory as on master. The compaction
snapshot fixture records its fixed directory as a Host move.
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 generator mounts the DeepSeek Search and Fetch provider beside the web
tools. That provider requires ctx.deepseekAuth, so without the service it
never started. The generator mounts the service first.
The generated tool catalog is unchanged: the web tools' schemas do not
depend on which provider is registered.
Replace the per-message human prefix with one sentence in the child delegation context, so direct human messages keep their original content in logs, UI, titles and exports.
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.
Address review on #8238:
- Replace the Workspace.sessionHeaders property with getSessionHeaders(). The
public contract states only membership and order; the in-memory header index
is documented on the implementation.
- SessionQueryEngine now injects sessionProjections, registers the
sessionListMetadata projection in Service.init, and exposes
getListMetadata(session). Disposing the service releases the registration.
The Session API and list_session read metadata through ctx.sessionQuery;
registerSessionListMetadata and the passed reader closure are removed.
- SqliteSessionQueryEngine injects sessionProjections and chains Service.init.
- Tests: a newly attached Session appears in a later getSessionHeaders()
result; query-service disposal removes the projection; test query services
run Service.init; projection-order expectations follow the new registration
order.
The config catalog listed the two DeepSeek web providers without their
deepseekAuth injection, and the persistence catalog and the event table
pointed at line numbers of dsh-llm sources from before the credential
types left them. The capability seam table listed the web providers as
consumers of ctx.llm, ctx.credentials, and ctx.deepseekAccount; with
ctx.deepseekAuth between them, the consumers of those three services are
the loop and compaction, the authentication service and pi-ai, and the
authentication service and the account route.
Persisted type digests are unchanged: the persistence catalog diff is
source line numbers only.
`dsh-llm` exported `normalizeApiKey` and `assertUsableApiKey` for the adapters that read a key through a credential reference. The DeepSeek routes now get their key from `ctx.deepseekAuth`, which checks it with the definition `dsh-credentials` owns, so `llm-pi-ai` was the only caller left. It now uses `normalizeApiKey` and `unusableApiKeyMessage` from `dsh-credentials` and raises the same `INVALID_CREDENTIAL` failure with the same text.
`normalizeApiKey` and `assertUsableApiKey` are removed from `dsh-llm`, so the check has one Host definition. `dsh-llm` does not import it from `dsh-credentials` instead, because the dependency gate accepts that runtime import only with a reviewed policy exception.
The two DeepSeek route plugins read their own credential and published it through `ctx.llm.providerCredential()` for the web providers. Those providers now ask `ctx.deepseekAuth`, so nothing reads the publication. Each route asks the same service for the credential of its own requests: the API-key route for its key in `x-api-key`, the account route for the account sign-in, both for destinations under the origin of the route's base URL.
`LlmAdapter.providerCredential()`, `LlmRuntime.providerCredential()`, `ProviderCredential`, `ProviderCredentialGrant`, and `LlmCredentialKind` are removed from `dsh-llm`, and the `credential` option and `DeepSeekProviderCredentialOptions` from the DeepSeek transport. `DeepSeekRequestAuth` keeps the headers, the withdrawal signal, and the failure callback; its bare `value` and `reject` served only the publication.
The API-key route reports an unusable key as `INVALID_CREDENTIAL` with the text it had. Tests of the publication are replaced by tests of the deployment each route connects.
DeepSeek APIs accept the API key, the account sign-in, or both, and gain account authentication one API at a time. `ctx.deepseekAuth` gives every consumer one operation: the consumer names the kinds its API accepts and the billing its settings choose, and the service orders the kinds, binds each to the deployment its credential belongs to, and releases the request headers of the first kind that has a credential.
Model route plugins connect the deployment their settings name. Without a connection the API key is `DEEPSEEK_API_KEY` at the official API and the account sign-in goes to the deployment `DEEPSEEK_BASE_URL` names. The service depends on the credential store and, optionally, the account service, and on no consumer. Nothing consumes it yet.
Conflicts were all in generated files and pairing records: the config
catalog, the dsh-doc package list, and the README records of
packages/client and ui-conversation. Each takes master's side and is then
regenerated, so it differs from master only by this branch's entries.
Also in this merge:
- ui-session-panel follows master's release to 0.2.2-rc.3, and the
lockfile is master's plus this package.
- The web-fetch-failure-row header capture, added on master, gains the
Session panel toggle.