Review of the consumers layer:
- `SandboxPolicyRequest.root` is removed. `resolve` answers only for a Session.
`prepare` accepts a Session or a checkout directory and returns that
checkout's validated Git administration directories. The worktree service
builds the policy of removal and restoration itself: the Session's mode and
grants, the source checkout as the root, and that checkout's derived
directories. The forge panel swaps the root for its two reads of the source
repository.
- The Git layout reads move to `src/linked-checkout.ts` with direct tests; the
security rationale stays in the README, which the function comment links.
- `resolve` and the model-visible policy share one merge of configured,
registered, and derived writable roots.
- `workspace-files` takes a live Session's root from the sandbox policy instead
of repeating its fallback chain.
- `TurnRecorder` takes a fixed directory and an explicit `moveTo`, which the
plugin calls on `workspace-root/change`; each turn keeps its own canonical
paths.
A real-sandbox test restores a missing worktree of a linked source checkout in
a process that never worked in it.
The lower branch merged master, which added a fetch of the remote base branch
to worktree creation. On this branch a Session opened in a linked checkout can
create worktrees, and the fetch writes the Git directory that checkout shares
outside its root. The fetch now runs under the policy resolved after
`prepare`, which grants that directory, as the later writes do. A real-sandbox
test fetches from a linked checkout.
The sandbox policy bounds a Session by `ctx.workingDirectory.get`. Two tests
resolve the policy for a Session that records no directory and expect the
configured sandbox root, while their directory fixture defaulted to the launch
directory. The fixture now uses the same root, as a deployment that sets the
sandbox `workspaceRoot` sets the directory service's `defaultDirectory`.
* 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.
The lower branch now ignores stored `working-directory/change` events. On this
branch the sandbox test asserts that such an event moves neither the directory
nor the write boundary, the boundary upgrade guide says so again, and the
working-directory README drops the limitation about stored subdirectories.
Earlier releases recorded both a model's `cd` and an entered worktree as
`working-directory/change`, and a log cannot tell them apart. The fold kept
such a directory when it lay inside the Session's original project. That let a
stored `cd` into a subdirectory narrow the workspace once consumers follow the
directory, and dropped a worktree outside the directory a Session was opened in.
Readers now ignore the event: a stored Session resumes in its original project,
or in the directory of its last `workspace-root/change`, and returns to a
worktree through `enter_worktree`. The fold state is the directory alone (state
version 3), and the forge worktree fold reads only `workspace-root/change`
(state version 7). Tests and Web fixtures that simulated a Host move with the
old event record `workspace-root/change`.
`session.create` records the canonical spelling of the project directory in the
Session header, and compared a later request's own spelling with it. A second
request for the same explicit Session id through a symlinked path, such as a
macOS temporary directory, failed with `session/conflict`.
The check now accepts the recorded spelling or one whose canonical form the
header records. The ACP image-offload expectation compares the model-visible
directory with the canonical spelling of the scenario directory.
The lower branch removed `rootOf` and the `workspaceRoot` projection: a Session
has one directory, read through `ctx.workingDirectory.get`. This merge moves the
consumers of this branch to that read.
- sandbox-policy, workspace-files, and workspace-changes read `get`; the
`recordedRootOf` read is removed. With the working-directory service mounted,
a Session without a header directory is bounded by that service's default
directory.
- The skill catalog, sidebar terminals, project instructions, `@` file
candidates, the LSP workspace, and skill lookup return to the lower branch's
code, which already reads the directory.
- The client helper exports `selectSessionDirectory` and `sessionDirectory`
in place of the `{ root, cwd }` pair; `WorkspaceChangesSummary` keeps `cwd`,
now the directory the turn started in.
- A stored `working-directory/change` inside the project moves the write
boundary and file views with the directory; one outside returns to the project.
`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.
The weekly review request now asks for what the user did in the current
workspace this week. In a code repository it looks only at the user's
commits this week and the pull requests the user opened that merged this
week or are still open, instead of every commit and pull request in the
repository. The tile description follows the same scope in all eight
languages.
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 empty automation page lists an eighth built-in recommendation,
Weekly review, after Daily brief. Its request asks for a Friday 16:00
task that reviews the week's changes in the current workspace, lists
unfinished work and what to do first next week, covers commits and pull
requests when the workspace is a code repository, and summarizes in the
conversation without changing workspace files. Its tile draws a
calendar with a check in the style of the other glyphs, and the copy
covers all eight UI languages.
`ConnectorAccountsRemote` repeated the signatures typert generates for
`ctx.remote.connectorAccounts`, and `settle` turned a failed Remote result
back into a rejection. The face now types `start` and `cancel` from
`ClientRemote['connectorAccounts']` and returns the Remote result. The
buttons read `ok` and report a failed result or a rejected call as the
failure notice, so the page behaves as before.