The sandbox policy derived a linked checkout's shared Git directory from its
`.git` pointer and granted it. That put Git worktree knowledge and a
worktree-only entry (`prepare`) into a generic service. The policy now bounds
a Session by its directory and adds only configured directories and those a
Host plugin registered through `registerWritableRoot`; relative to the lower
branch its source changes in one place, the root it reads.
- `prepare`, the derivation state, its three listeners, and
`src/linked-checkout.ts` are removed.
- The worktree service creates under the Session's policy as on the lower
branch; removal and restoration swap the root for the source checkout. The
forge panel's blocker reads the Session's root alone.
- A Session that works in a linked worktree cannot write the repository's Git
directory under workspace-write without a grant. Tests pin the denial and
that a registered grant admits creation, restoration, and a commit.
Granting the Git directory of the checkout a Session works in is left to a
separate plugin that reads the layout and registers the directory.
The plugin registers once with the CLI account Service and once with the upstream skills Service instead of building the command executor, account runtime, runtime-context entry, Plugins page registration, and guide download itself. Account operations are a perform function over the Service's control and the guide handle, and the presenter takes the Service's text writer. Config keeps binDir and skillsDir; commandTimeoutMs is the cli-account row's field, skillsUrls and skillsTimeoutMs are the upstream-skills row's.
The plugin registers once with the CLI account Service and once with the upstream skills Service instead of building the command executor, account runtime, runtime-context entry, Plugins page registration, and guide download itself. Account operations are a perform function over the Service's control and the guides handle, and the presenter takes the Service's text writer. Config keeps binDir and skillsDir; commandTimeoutMs is the cli-account row's field, skillsUrls and skillsTimeoutMs are the upstream-skills row's.
The plugin registers once with the CLI account Service instead of building the command executor, account runtime, runtime-context entry, and Plugins page registration itself. Account operations are a perform function over the Service's control, and the presenter takes the Service's text writer. Config keeps only binDir; commandTimeoutMs is the cli-account row's field.