Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers

Brings `enter_worktree`. This layer adds a real-sandbox test: entering an
existing worktree under read-only policy runs only confined read commands and
moves the write boundary to the worktree, and leaving moves it back. The
boundary upgrade guide names the new tool.
This commit is contained in:
LegGasai committed 2026-11-13 20:30:20 +08:00
commit bc8544140a
48 files changed
+706 -183

No files matched your search

+2
View File
@@ -422,6 +422,8 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
CreateWorktreeRequest: 'worktrees.md',
CreatedWorktree: 'worktrees.md',
CreateWorktreePhase: 'worktrees.md',
EnterWorktreeRequest: 'worktrees.md',
EnteredWorktree: 'worktrees.md',
RestoreWorktreeRequest: 'worktrees.md',
WorktreeCleanup: 'worktrees.md',
WorktreeCreation: 'worktrees.md',
+2 -1
View File
@@ -705,11 +705,12 @@ const TOOL_PACKAGES: ToolPackage[] = [
async mount(ctx) {
ctx.provide('worktrees', {
create: () => Promise.reject(new Error('gen-tool-catalog: worktree creation is unavailable during schema harvest')),
enter: () => Promise.reject(new Error('gen-tool-catalog: entering a worktree is unavailable during schema harvest')),
exit: () => Promise.reject(new Error('gen-tool-catalog: leaving a worktree is unavailable during schema harvest')),
})
await ctx.plugin(ToolWorktree)
},
note: 'Enabled through the Change requests & worktrees bundle on Web and Desktop; other profiles can select the standalone bundle. Creates a new branch and checkout from a pinned local commit under existing write permissions, then changes the Session directory. `exit_worktree` returns the Session to the source checkout; the branch and checkout remain.',
note: 'Enabled through the Change requests & worktrees bundle on Web and Desktop; other profiles can select the standalone bundle. Creates a new branch and checkout from a pinned local commit under existing write permissions, then changes the Session directory. `enter_worktree` moves the Session into an existing worktree in the pool of the checkout it works in; `exit_worktree` returns the Session to the checkout it came from; the branch and checkout remain.',
},
{
pkg: '@deepseek-ai/dsh-tool-workflow',
+10
View File
@@ -2648,6 +2648,16 @@
"symbol": "CreateWorktreePhase",
"source": "packages/experimental/worktree/src/types.ts"
},
{
"doc": "docs/subsystems/worktrees.md",
"symbol": "EnterWorktreeRequest",
"source": "packages/experimental/worktree/src/types.ts"
},
{
"doc": "docs/subsystems/worktrees.md",
"symbol": "EnteredWorktree",
"source": "packages/experimental/worktree/src/types.ts"
},
{
"doc": "docs/subsystems/worktrees.md",
"symbol": "RestoreWorktreeRequest",