toolroll 0.9.65 → 0.9.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +20 -2
  3. package/dist/acp-client.js +1 -3
  4. package/dist/agent-board.d.ts +0 -1
  5. package/dist/agent-board.js +0 -1
  6. package/dist/agent-fence.d.ts +69 -2
  7. package/dist/agent-fence.js +294 -11
  8. package/dist/agentconfig.js +4 -1
  9. package/dist/batch-checks.js +3 -2
  10. package/dist/browser/THIRD_PARTY_NOTICES.txt +46 -0
  11. package/dist/browser/terminal.js +134 -23
  12. package/dist/browser/workspace.css +2 -2
  13. package/dist/browser/workspace.js +31 -29
  14. package/dist/builder.d.ts +4 -0
  15. package/dist/builder.js +56 -37
  16. package/dist/canonical-json.d.ts +14 -0
  17. package/dist/canonical-json.js +36 -0
  18. package/dist/chat-actions.js +1 -2
  19. package/dist/chat-admission.d.ts +19 -0
  20. package/dist/chat-admission.js +22 -0
  21. package/dist/chat-channel.js +1 -1
  22. package/dist/chat-delivery.js +0 -1
  23. package/dist/chat-follow.d.ts +17 -0
  24. package/dist/chat-follow.js +32 -0
  25. package/dist/chat-messages.js +0 -1
  26. package/dist/chat-settings-page.d.ts +23 -0
  27. package/dist/chat-settings-page.js +41 -0
  28. package/dist/claim.js +3 -6
  29. package/dist/claude-print.d.ts +12 -0
  30. package/dist/claude-print.js +34 -0
  31. package/dist/cli-http.d.ts +0 -7
  32. package/dist/cli-http.js +0 -21
  33. package/dist/cli.d.ts +3 -10
  34. package/dist/cli.js +15 -24
  35. package/dist/coding-provider.js +2 -1
  36. package/dist/coding-workspace.js +1 -1
  37. package/dist/{team-cli.d.ts → connect-cli.d.ts} +5 -9
  38. package/dist/connect-cli.js +331 -0
  39. package/dist/containment.d.ts +0 -2
  40. package/dist/containment.js +2 -6
  41. package/dist/contracts/chat-actions.d.ts +0 -1
  42. package/dist/contracts/chat-content.d.ts +0 -4
  43. package/dist/contracts/chat-content.js +0 -2
  44. package/dist/contracts/chat-tables.d.ts +0 -1
  45. package/dist/contracts/cli.d.ts +0 -62
  46. package/dist/contracts/cli.js +0 -4
  47. package/dist/contracts/coding-workspace.js +1 -1
  48. package/dist/contracts/console-api.d.ts +1 -0
  49. package/dist/contracts/console-api.js +1 -0
  50. package/dist/contracts/contract.js +1 -1
  51. package/dist/contracts/flow-card.d.ts +0 -1
  52. package/dist/contracts/flow-propose.d.ts +0 -1
  53. package/dist/contracts/flow-send.js +1 -1
  54. package/dist/contracts/gateway-tools.d.ts +0 -1
  55. package/dist/contracts/integration-metadata.js +1 -1
  56. package/dist/contracts/lead-tools.d.ts +0 -1
  57. package/dist/contracts/memory-pass.d.ts +0 -1
  58. package/dist/contracts/memory-pass.js +1 -1
  59. package/dist/contracts/plan.js +1 -1
  60. package/dist/contracts/project-knowledge.js +1 -1
  61. package/dist/contracts/project-skills.d.ts +0 -1
  62. package/dist/contracts/proof.js +1 -1
  63. package/dist/contracts/recipes.js +1 -1
  64. package/dist/contracts/scope.js +1 -1
  65. package/dist/contracts/scout-report.js +1 -1
  66. package/dist/contracts/teams-callback.d.ts +0 -1
  67. package/dist/converse.d.ts +0 -6
  68. package/dist/converse.js +0 -19
  69. package/dist/daemon.js +3 -2
  70. package/dist/decision.d.ts +1 -3
  71. package/dist/deprecations.d.ts +12 -4
  72. package/dist/deprecations.js +27 -4
  73. package/dist/desktop-update-recovery.js +1 -1
  74. package/dist/desktop-update.js +3 -2
  75. package/dist/discord-chat.js +4 -15
  76. package/dist/discord-settings.d.ts +2 -6
  77. package/dist/discord-settings.js +10 -38
  78. package/dist/discord.js +12 -23
  79. package/dist/evidence.d.ts +0 -1
  80. package/dist/evidence.js +0 -3
  81. package/dist/exec.d.ts +0 -9
  82. package/dist/exec.js +3 -81
  83. package/dist/flow-actions.js +0 -3
  84. package/dist/flow-draft.d.ts +1 -3
  85. package/dist/flow-draft.js +15 -28
  86. package/dist/flow-scripts.d.ts +1 -8
  87. package/dist/flow-scripts.js +0 -13
  88. package/dist/flow-send.js +1 -1
  89. package/dist/flow-share.d.ts +0 -2
  90. package/dist/flow-share.js +1 -6
  91. package/dist/flow-steps.js +1 -1
  92. package/dist/flow-triggers.d.ts +0 -1
  93. package/dist/flow-triggers.js +1 -2
  94. package/dist/flow-unattended.js +1 -12
  95. package/dist/flows.js +1 -1
  96. package/dist/health-cli.d.ts +2 -2
  97. package/dist/health-cli.js +1 -1
  98. package/dist/invoke.d.ts +18 -3
  99. package/dist/invoke.js +142 -17
  100. package/dist/is-record.d.ts +2 -0
  101. package/dist/is-record.js +2 -0
  102. package/dist/lead-doors.d.ts +1 -5
  103. package/dist/lead-doors.js +0 -4
  104. package/dist/lead-tools.js +3 -6
  105. package/dist/live-detail.d.ts +0 -1
  106. package/dist/live-detail.js +0 -6
  107. package/dist/live-terminal.d.ts +24 -13
  108. package/dist/live-terminal.js +81 -43
  109. package/dist/live.d.ts +0 -1
  110. package/dist/live.js +1 -2
  111. package/dist/mcp-core.js +0 -2
  112. package/dist/memory-pass.js +1 -1
  113. package/dist/model-catalog.js +1 -1
  114. package/dist/modes.js +1 -12
  115. package/dist/operate.d.ts +2 -0
  116. package/dist/operate.js +436 -745
  117. package/dist/password-bearer.d.ts +0 -2
  118. package/dist/password-bearer.js +0 -4
  119. package/dist/peek-cli.js +2 -1
  120. package/dist/peek.d.ts +2 -26
  121. package/dist/peek.js +2 -168
  122. package/dist/phase-routing.d.ts +0 -4
  123. package/dist/phase-routing.js +2 -21
  124. package/dist/planner-source.d.ts +2 -1
  125. package/dist/planner-source.js +2 -12
  126. package/dist/planner.js +2 -14
  127. package/dist/process-tree.d.ts +0 -2
  128. package/dist/process-tree.js +0 -10
  129. package/dist/project-delete-ui.d.ts +6 -0
  130. package/dist/project-delete-ui.js +20 -1
  131. package/dist/project-delete.d.ts +0 -2
  132. package/dist/project-delete.js +1 -3
  133. package/dist/project-learning.d.ts +0 -14
  134. package/dist/project-skills.d.ts +0 -1
  135. package/dist/project-skills.js +0 -14
  136. package/dist/project-tools.js +2 -10
  137. package/dist/provider.d.ts +0 -17
  138. package/dist/provider.js +0 -26
  139. package/dist/pulls.d.ts +0 -2
  140. package/dist/pulls.js +0 -9
  141. package/dist/release-adapters.d.ts +9 -0
  142. package/dist/release-adapters.js +81 -4
  143. package/dist/release.d.ts +7 -1
  144. package/dist/release.js +20 -7
  145. package/dist/remote-exec.d.ts +3 -2
  146. package/dist/remote-exec.js +3 -2
  147. package/dist/repos.d.ts +0 -5
  148. package/dist/repos.js +2 -10
  149. package/dist/repository-context.d.ts +0 -2
  150. package/dist/repository-context.js +0 -4
  151. package/dist/restart-certification.d.ts +0 -2
  152. package/dist/restart-certification.js +1 -5
  153. package/dist/result-follow-ups.d.ts +1 -4
  154. package/dist/result-follow-ups.js +4 -8
  155. package/dist/result-review.d.ts +0 -2
  156. package/dist/result-review.js +0 -2
  157. package/dist/retention.d.ts +0 -1
  158. package/dist/retention.js +0 -1
  159. package/dist/review-context.d.ts +0 -1
  160. package/dist/review-context.js +1 -12
  161. package/dist/reviewer.d.ts +0 -16
  162. package/dist/reviewer.js +0 -18
  163. package/dist/run-closeout.js +2 -1
  164. package/dist/scope.d.ts +13 -0
  165. package/dist/scope.js +11 -18
  166. package/dist/scout-browser.js +2 -1
  167. package/dist/serve.js +3 -2
  168. package/dist/server/chrome.d.ts +10 -1
  169. package/dist/server/chrome.js +45 -4
  170. package/dist/server/console.css +60 -137
  171. package/dist/server/flows.js +2 -2
  172. package/dist/server/http.d.ts +2 -0
  173. package/dist/server/http.js +5 -0
  174. package/dist/server/pages.js +2 -2
  175. package/dist/server/people-tokens.js +3 -4
  176. package/dist/server/remote.js +1 -6
  177. package/dist/server/render-chat.d.ts +9 -2
  178. package/dist/server/render-chat.js +53 -7
  179. package/dist/server/render-pages.d.ts +28 -3
  180. package/dist/server/render-pages.js +78 -9
  181. package/dist/server/render-results.d.ts +0 -6
  182. package/dist/server/render-results.js +3 -9
  183. package/dist/server/render-tasks.js +6 -6
  184. package/dist/server/route-table.d.ts +0 -4
  185. package/dist/server/route-table.js +1 -6
  186. package/dist/server/settings.js +43 -22
  187. package/dist/server/task-views.js +1 -1
  188. package/dist/server/tasks.js +10 -7
  189. package/dist/setup-guide.d.ts +2 -2
  190. package/dist/skills.d.ts +0 -6
  191. package/dist/skills.js +0 -8
  192. package/dist/slack-chat.d.ts +1 -7
  193. package/dist/slack-chat.js +5 -18
  194. package/dist/slack-settings.d.ts +2 -6
  195. package/dist/slack-settings.js +10 -38
  196. package/dist/slack.js +12 -23
  197. package/dist/sleep.d.ts +2 -0
  198. package/dist/sleep.js +2 -0
  199. package/dist/store.d.ts +11 -74
  200. package/dist/store.js +36 -179
  201. package/dist/structured-output.d.ts +0 -1
  202. package/dist/structured-output.js +0 -1
  203. package/dist/subagent-work.d.ts +0 -2
  204. package/dist/subagent-work.js +0 -2
  205. package/dist/subagents.d.ts +1 -3
  206. package/dist/subagents.js +20 -33
  207. package/dist/subscription-chat.d.ts +1 -3
  208. package/dist/subscription-chat.js +2 -3
  209. package/dist/task-sizing.d.ts +1 -4
  210. package/dist/task-sizing.js +3 -10
  211. package/dist/teams-chat.js +4 -11
  212. package/dist/teams.js +12 -19
  213. package/dist/teardown-git.d.ts +22 -0
  214. package/dist/teardown-git.js +136 -2
  215. package/dist/telegram-lead.js +2 -2
  216. package/dist/telegram.js +1 -1
  217. package/dist/token-notices.d.ts +0 -11
  218. package/dist/token-notices.js +1 -5
  219. package/dist/tool-broker.d.ts +12 -0
  220. package/dist/tool-broker.js +66 -2
  221. package/dist/tool-secret-store.d.ts +0 -3
  222. package/dist/tool-secret-store.js +2 -11
  223. package/dist/toolroll-update.d.ts +0 -2
  224. package/dist/toolroll-update.js +2 -2
  225. package/dist/unfenced-test-support.d.ts +2 -0
  226. package/dist/unfenced-test-support.js +11 -0
  227. package/dist/verification-evidence.d.ts +0 -1
  228. package/dist/verification-evidence.js +0 -1
  229. package/dist/webhooks.d.ts +0 -1
  230. package/dist/webhooks.js +0 -1
  231. package/dist/workspace-ui.d.ts +0 -8
  232. package/dist/workspace-ui.js +1 -6
  233. package/dist/writes-mode.d.ts +9 -0
  234. package/dist/writes-mode.js +8 -0
  235. package/package.json +5 -1
  236. package/dist/contracts/native-census.d.ts +0 -42
  237. package/dist/contracts/native-census.js +0 -36
  238. package/dist/process-recovery-anchor.d.ts +0 -75
  239. package/dist/process-recovery-anchor.js +0 -188
  240. package/dist/process-recovery-coalition.d.ts +0 -25
  241. package/dist/process-recovery-coalition.js +0 -105
  242. package/dist/process-recovery-eligibility.d.ts +0 -179
  243. package/dist/process-recovery-eligibility.js +0 -174
  244. package/dist/process-recovery-native.d.ts +0 -161
  245. package/dist/process-recovery-native.js +0 -595
  246. package/dist/process-recovery-provenance.d.ts +0 -163
  247. package/dist/process-recovery-provenance.js +0 -292
  248. package/dist/process-recovery-services.d.ts +0 -56
  249. package/dist/process-recovery-services.js +0 -191
  250. package/dist/process-recovery-settlement.d.ts +0 -32
  251. package/dist/process-recovery-settlement.js +0 -133
  252. package/dist/process-recovery.d.ts +0 -41
  253. package/dist/process-recovery.js +0 -91
  254. package/dist/session-brief.d.ts +0 -8
  255. package/dist/session-brief.js +0 -24
  256. package/dist/session-cli.d.ts +0 -42
  257. package/dist/session-cli.js +0 -271
  258. package/dist/session-contract.d.ts +0 -183
  259. package/dist/session-contract.js +0 -122
  260. package/dist/session-remote.d.ts +0 -19
  261. package/dist/session-remote.js +0 -86
  262. package/dist/session-service.d.ts +0 -22
  263. package/dist/session-service.js +0 -157
  264. package/dist/team-cli.js +0 -692
package/CHANGELOG.md CHANGED
@@ -1,5 +1,98 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.68 — 2026-10-23
4
+
5
+ - **The lead chat is redesigned.** Your messages sit in grey bubbles and the
6
+ lead's replies read as plain text, with code blocks. Its work folds into one
7
+ "Worked …" line, live steps show a spinner and then a check, and anything
8
+ waiting on you carries a "Needs you" chip. The message box is one row that
9
+ grows as you type, with a send arrow (Queue while a reply runs).
10
+ - **Comment on a line of a change.** In a result's Changes tab, a pin on any
11
+ line opens a one-line comment. Enter sends it to the lead as its next
12
+ message, naming the file, line and run and quoting the line. The thread
13
+ shows it as a reference, the quoted line, and your words. On a phone the
14
+ result opens as a sheet over the chat.
15
+ - **A fenced check can build bundles from the shared dependencies.** On a Mac
16
+ the sandbox let a build look up the linked copy's folder but not list it,
17
+ so esbuild couldn't find node_modules ("could not resolve react"). That one
18
+ folder may now be listed; nothing in it is readable beyond node_modules.
19
+ The console's own browser build also resolves through the checkout's links.
20
+ - The release check passes inside the plane's macOS check sandbox: tests that
21
+ need to create a sandbox or watch other processes skip there and still run
22
+ in CI, and the browser journeys' throwaway planes run their agents inside
23
+ the check's own sandbox.
24
+ - A Claude build no longer refuses to start when a sandbox around Toolroll
25
+ hides your Claude settings file: it signs in from the keychain as before,
26
+ and a sign-in that needed the file still fails quickly and says so.
27
+ - The test suite reads its own home and temp folders, never yours, so it runs
28
+ the same on your machine and inside a check's sandbox. Tests that need a
29
+ socket path shorter than any folder the sandbox allows, and the one browser
30
+ journey that resumes a saved Claude session, skip inside the sandbox and
31
+ still run in CI.
32
+ - `toolroll release` no longer stops at merge when GitHub has already deleted
33
+ the merged branch: it looks a few times, 2 seconds apart, before calling the
34
+ delete a failure (0.9.66 and 0.9.67 both stopped there).
35
+ - Leaner code, with every feature kept (about 5,600 fewer lines). The
36
+ deprecated team and native session commands are gone, and `chat` and
37
+ `brief` without `--local` refuse when a central profile is saved.
38
+
39
+ ## 0.9.67 — 2026-10-23
40
+
41
+ - **A project's checks read their own dependencies again.** 0.9.66 began
42
+ running checks in a fenced checkout but left out the grant for the shared
43
+ install the checkout links, so any check that loaded a package failed
44
+ ("could not resolve"). The linked copy is readable again; others stay fenced.
45
+ - **Builds that write only their workspace resolve host names again on a
46
+ Mac.** 0.9.66 denied every unix socket to such a build, including the
47
+ system's DNS service, so with an open network nothing resolved (npm, git,
48
+ any fetch failed with "could not resolve host"). The DNS socket is allowed;
49
+ every other socket stays denied.
50
+ - 0.9.66 as released to the console, published: its macOS check failed on a
51
+ test whose socket path outgrew macOS's 104-byte limit in the runner's temp
52
+ folder. The test now makes its sockets under /tmp. The browser journeys'
53
+ model stand-ins also keep their call journal where a workspace-only build
54
+ may write, so the release check runs them under the default sandbox.
55
+ - `toolroll project network` takes `--open` and `--allowlist` again, and
56
+ reads `--remove <hosts>` and `--local any|none` as values: the shared flag
57
+ parser had refused the first two and read the others as switches.
58
+
59
+ ## 0.9.66 — 2026-10-22 (tagged, not published)
60
+
61
+ - **The board is live to watch.** A strip of workers sits above the lanes:
62
+ what each is building on this board, its stage and a running clock (or
63
+ offline, or no build here). A card that changes lane slides there, a new one
64
+ drops in, and a worker that picks up work lights up once — all off under
65
+ reduced motion. Building cards show three quiet steps (setting up, writing,
66
+ checking and committing) from the run's own phase, never a percent. On a phone
67
+ the lane sections now use the full width.
68
+ - **Builds write only their workspace.** A new per-project setting (Settings →
69
+ Project → Where builds write, `toolroll project writes`), sealed into each
70
+ approval: by default a build writes only its checkout and commit data, the
71
+ project's package caches, its temp folder and its agent's session files —
72
+ never your shell profile, login items, agent settings or the repository's Git
73
+ config and hooks. `anywhere` keeps the old behaviour; approvals from before
74
+ keep it too. Enforced by Seatbelt, bubblewrap and Codex's own profile.
75
+ - **Setup and check commands run in the build's fence**, with their own temp
76
+ folder and the project's caches.
77
+ - **The plane's Git on a build's checkout runs hardened** (no hooks, fsmonitor
78
+ or submodules) and refuses a checkout whose config names a command.
79
+ - **Tool servers start outside the checkout** and never run a file the build
80
+ wrote.
81
+ - **A live terminal comes back as its screen.** The server keeps each
82
+ terminal's screen (a headless xterm), so a page that reconnects gets the
83
+ screen, its last 5,000 lines and its modes — a full-screen program like
84
+ Claude Code or Codex redraws whole, never from a raw replay cut mid-sequence.
85
+ - **Terminals draw on the GPU** where the browser allows (falling back when it
86
+ doesn't), with Unicode 11 widths for emoji and wide characters.
87
+ - **`toolroll release` finishes when GitHub deletes the merged branch
88
+ itself.** A delete that fails because the branch is already gone counts as
89
+ done; one that fails while the branch is still there still stops.
90
+ - **`toolroll release` merges a Homebrew tap that runs no checks on a
91
+ change.** It no longer waits out its time limit for checks that will never
92
+ come. Any check run or commit status that does appear is still judged (each
93
+ app on its own), and a tap whose workflows run on pull requests still needs
94
+ its own GitHub Actions run to pass.
95
+
3
96
  ## 0.9.65 — 2026-10-22
4
97
 
5
98
  0.9.64 was tagged but never published: a macOS check failed on Node 24.
package/README.md CHANGED
@@ -581,8 +581,26 @@ and launch tools remain available.
581
581
 
582
582
  | | Auto | Full access |
583
583
  |---|---|---|
584
- | **Codex / OpenRouter** (any OS) | Codex's workspace sandbox (workspace writes, no network) with the fence | Codex's sandbox widened to write anywhere, with the fence; its commands reach the network only when the project's network is open |
585
- | **Claude, Gemini, ACP agents** | macOS: the agent runs inside a Seatbelt sandbox that denies the fence. Linux: inside bubblewrap. Neither (Windows, or Linux without bubblewrap): the build doesn't start, unless an instance operator allows unconfined agents | same |
584
+ | **Codex / OpenRouter** (any OS) | Codex's sandbox with the fence: writes only the checkout, its Git data and the project's caches (anywhere outside the fence, under a project set to write anywhere); no network | the same writes, with the fence; its commands reach the network only when the project's network is open |
585
+ | **Claude, Gemini, ACP agents** | macOS: inside a Seatbelt sandbox that denies the fence and writes only the checkout, its Git data, the project's caches, the run's temp folder and the agent's own session files. Linux: the same in bubblewrap, with a /tmp of its own. Neither (Windows, or Linux without bubblewrap): the build doesn't start, unless an instance operator allows unconfined agents | same |
586
+
587
+ **Where a build writes.** Each approved scope also seals where its build may
588
+ write. By default (Settings → Project → **Where builds write**, or `toolroll
589
+ project writes --repo <p> workspace`) a build writes only its checkout, its
590
+ checkout's commit data (never the repository's Git config, hooks or info, other
591
+ checkouts' data or submodules), the project's own package caches (npm, pnpm,
592
+ yarn, pip, uv, Go, Cargo, Gradle: its package managers are pointed there), the
593
+ run's temp folder, and the session files its agent CLI must keep. Your shell
594
+ profile, login items, `~/.claude` settings and everything else stay as they
595
+ are; Claude's other live sessions aren't even readable. A project whose tools
596
+ must write elsewhere can choose `anywhere` (outside the fence, as before);
597
+ approvals from before this setting keep writing anywhere, as they were approved.
598
+ The build's setup, check, follow-up and batch commands run in the same fence.
599
+ Toolroll's own Git on a build's checkout runs hardened (no hooks, fsmonitor,
600
+ submodules or signing), reads none of your global Git config but its plain values
601
+ (identity, line endings, a standard git-lfs install), and refuses a checkout
602
+ whose config includes a file or names a command; a project's tool servers can't
603
+ read the checkout and never run a file the build wrote.
586
604
 
587
605
  **The network.** Each approved scope says what its build may reach: the
588
606
  agent's provider, the package registries the project uses (npm, PyPI,
@@ -1,3 +1,4 @@
1
+ import { isRecord } from "./is-record.js";
1
2
  /**
2
3
  * The Agent Client Protocol, from the plane's side (docs/plans/acp-adapter.md).
3
4
  *
@@ -37,9 +38,6 @@ const TEXT_CAP = 2048;
37
38
  const USAGE_CAP = 8 * 1024;
38
39
  const PROTOCOL_VERSION = 1;
39
40
  const STOP_REASONS = new Set(["end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled"]);
40
- function isRecord(value) {
41
- return typeof value === "object" && value !== null && !Array.isArray(value);
42
- }
43
41
  function bounded(text, cap) {
44
42
  return text.length <= cap ? text : text.slice(0, cap);
45
43
  }
@@ -1,6 +1,5 @@
1
1
  import type { Store } from "./store.js";
2
2
  export type AgentTurn = "busy" | "idle" | "crashed";
3
- export declare const AGENT_TURNS: readonly AgentTurn[];
4
3
  export type AgentSaid = "working" | "blocked" | "done";
5
4
  /** A busy run whose transcript and activity are both this old is Stuck. */
6
5
  export declare const STUCK_AFTER_MS: number;
@@ -27,7 +27,6 @@
27
27
  * Display state, never evidence: nothing here changes a run's outcome.
28
28
  */
29
29
  import { randomBytes } from "node:crypto";
30
- export const AGENT_TURNS = ["busy", "idle", "crashed"];
31
30
  /** A busy run whose transcript and activity are both this old is Stuck. */
32
31
  export const STUCK_AFTER_MS = 4 * 60_000;
33
32
  /** With a tool call still open (a long test run is silent), it is Stuck only after this long. */
@@ -60,7 +60,7 @@ export type RunFolders = {
60
60
  };
61
61
  /** The prefixes of every launch's private folders: its tools' config, a Codex build's own home, and a Linux build's
62
62
  * network bridge (egress-bridge.ts). */
63
- export declare const RUN_FOLDER_PREFIXES: readonly ["so-tools-", "so-codex-", "so-net-"];
63
+ export declare const RUN_FOLDER_PREFIXES: readonly ["so-tools-", "so-codex-", "so-net-", "so-cmd-"];
64
64
  export declare function runFolders(own: string | null, root?: string): RunFolders;
65
65
  /**
66
66
  * What a fence gives back beside its denied paths. Each is narrow and none
@@ -80,7 +80,61 @@ export type FenceGrants = {
80
80
  runFolders?: RunFolders;
81
81
  pool?: CheckoutPool;
82
82
  network?: NetworkFence;
83
+ writes?: WriteAllowlist;
83
84
  };
85
+ export { isWritesMode, WRITES_DEFAULT, type WritesMode } from "./writes-mode.js";
86
+ /**
87
+ * The only places a `workspace` build writes: `subpaths`, each a folder (or file) writable whole, and `prefixes`, a file
88
+ * with the temporary names it is atomically replaced through, or a folder named by a pattern (a regex on macOS;
89
+ * elsewhere the path alone, when it exists). Everything else is read-only to the build; its fence's denies and read-only grants still hold inside these.
90
+ */
91
+ export type WriteAllowlist = {
92
+ subpaths: string[];
93
+ prefixes: WritePrefix[];
94
+ };
95
+ /** A file or folder named by `path` followed by what `suffix` (a regular expression, anchored at its end) allows. */
96
+ export type WritePrefix = {
97
+ path: string;
98
+ suffix: string;
99
+ };
100
+ /** Claude's transcript folder for a working folder: its path with every character but a letter or digit made `-`
101
+ * (Claude Code's own naming; a name over 200 characters gets a suffix, so it is granted by prefix). */
102
+ export declare function claudeProjectFolder(home: string, cwd: string): {
103
+ path: string;
104
+ byPrefix: boolean;
105
+ };
106
+ /**
107
+ * A folder a write grant may name: made when absent, then only as the real folder it is — never a link, nor reached
108
+ * through one (its real path is its parent's real path and its own name). A build can rewrite what it may write, so a
109
+ * folder it was given could otherwise come back as a link to anywhere and be granted, followed, on its next launch.
110
+ * Null when it isn't such a folder: nothing is granted, and the write it was for fails.
111
+ */
112
+ export declare function grantFolder(path: string, create?: boolean): string | null;
113
+ /**
114
+ * What a `workspace` build writes and what it loses (arc 2): its checkout, its checkout's Git data (less the shared
115
+ * repository's config, hooks and info, which Git runs or reads as commands), its own launch folder (its temp is there),
116
+ * its project's cache folder, the terminal devices, and only the provider state its CLI must write (measured: Claude's
117
+ * transcript folder for this checkout; Gemini's history, temp and project list; an ACP agent's own folders). The
118
+ * folders named here are made first, so the provider never has to make them where it can't. `deny` is what this
119
+ * provider must not even read (Claude's live sessions' keys).
120
+ */
121
+ export declare function writeAllowlist(options: {
122
+ provider: string;
123
+ home: string;
124
+ worktree: string;
125
+ binding: WorktreeBinding | null;
126
+ launchFolder: string | null;
127
+ cache: string | null;
128
+ }): {
129
+ writes: WriteAllowlist;
130
+ readOnly: string[];
131
+ deny: string[];
132
+ };
133
+ /** Where a project's builds keep their package caches: one folder per project (one trust domain), never used by the
134
+ * plane's own tools, below the user's cache folder. */
135
+ export declare function buildCacheFolder(repo: string, home?: string, platform?: NodeJS.Platform, env?: Readonly<Record<string, string | undefined>>): string;
136
+ /** The environment that points a build's package managers at its project's cache folder, not the user's own. */
137
+ export declare function buildCacheEnv(folder: string): Record<string, string>;
84
138
  /**
85
139
  * A launch's network confinement (egress.ts, docs/plans/agent-baseline-hardening.md arc 1). `open`: the network as it
86
140
  * always was. `allowlist`: nothing leaves the machine but through the run's own proxy (`proxyPort`); the run's tool
@@ -233,6 +287,8 @@ export declare function macosFenceProfile(fence: readonly string[], grants?: Fen
233
287
  */
234
288
  export declare function macosNetworkRules(network: NetworkFence | undefined): string[];
235
289
  export declare const SANDBOX_EXEC = "/usr/bin/sandbox-exec";
290
+ /** Where macOS's resolver (mDNSResponder) answers: every name lookup on a Mac is a message to this socket. */
291
+ export declare const MACOS_DNS_SOCKET = "/private/var/run/mDNSResponder";
236
292
  /**
237
293
  * Whether this machine can run an agent inside the macOS fence (checked once). Not from inside another
238
294
  * sandbox: a Toolroll a fenced process starts (the end-to-end journeys a flow's check zone runs) can't nest
@@ -260,4 +316,15 @@ export declare function linuxFenced(file: string, args: readonly string[], fence
260
316
  };
261
317
  /** The host's own sockets a process in a mounted filesystem could still talk to (D-Bus, the display, container
262
318
  * engines), wherever they exist here. */
263
- export declare function linuxHostSockets(uid?: number | undefined, home?: string, tmp?: string): string[];
319
+ export declare function linuxHostSockets(uid?: number | undefined, home?: string, tmp?: string, followLinks?: boolean, env?: Readonly<Record<string, string | undefined>>): string[];
320
+ /**
321
+ * What each agent's fence gives it, by permission mode: the one table README's "What an agent can reach" shows
322
+ * (fenceSummaryMarkdown; a test holds them equal).
323
+ */
324
+ export declare const FENCE_SUMMARY: readonly {
325
+ agent: string;
326
+ auto: string;
327
+ full: string;
328
+ }[];
329
+ /** FENCE_SUMMARY as README's markdown table. */
330
+ export declare function fenceSummaryMarkdown(): string;