@intentic/sandbox-contract 1.430.0 → 1.432.0

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 (711) hide show
  1. package/README.md +22 -5
  2. package/dist/app-routes/app-pages.d.ts +1 -0
  3. package/dist/app-routes/app-pages.d.ts.map +1 -1
  4. package/dist/app-routes/app-pages.js +1 -0
  5. package/dist/app-routes/app-pages.js.map +1 -1
  6. package/dist/app-routes/index.d.ts +1 -0
  7. package/dist/app-routes/index.d.ts.map +1 -1
  8. package/dist/app-routes/index.js +1 -0
  9. package/dist/app-routes/index.js.map +1 -1
  10. package/dist/app-routes/return-path.d.ts +2 -0
  11. package/dist/app-routes/return-path.d.ts.map +1 -0
  12. package/dist/app-routes/return-path.js +8 -0
  13. package/dist/app-routes/return-path.js.map +1 -0
  14. package/dist/briefs/agent-ask.d.ts +10 -0
  15. package/dist/briefs/agent-ask.d.ts.map +1 -0
  16. package/dist/briefs/agent-ask.js +2 -0
  17. package/dist/briefs/agent-ask.js.map +1 -0
  18. package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
  19. package/dist/briefs/extension-update-brief.d.ts.map +1 -0
  20. package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
  21. package/dist/briefs/extension-update-brief.js.map +1 -0
  22. package/dist/chores/digest.d.ts.map +1 -1
  23. package/dist/chores/digest.js.map +1 -1
  24. package/dist/chores/index.d.ts +2 -2
  25. package/dist/chores/index.d.ts.map +1 -1
  26. package/dist/chores/index.js +1 -1
  27. package/dist/chores/index.js.map +1 -1
  28. package/dist/chores/prompt.d.ts +1 -9
  29. package/dist/chores/prompt.d.ts.map +1 -1
  30. package/dist/chores/prompt.js +1 -1
  31. package/dist/chores/prompt.js.map +1 -1
  32. package/dist/chores/stack.d.ts.map +1 -1
  33. package/dist/chores/stack.js.map +1 -1
  34. package/dist/chores/verdict.d.ts.map +1 -1
  35. package/dist/chores/verdict.js.map +1 -1
  36. package/dist/chores/workspace-scope.d.ts +1 -3
  37. package/dist/chores/workspace-scope.d.ts.map +1 -1
  38. package/dist/chores/workspace-scope.js +1 -3
  39. package/dist/chores/workspace-scope.js.map +1 -1
  40. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  41. package/dist/contracts/accounts.contract.js +2 -0
  42. package/dist/contracts/accounts.contract.js.map +1 -1
  43. package/dist/contracts/agent.contract.d.ts +1226 -12
  44. package/dist/contracts/agent.contract.d.ts.map +1 -1
  45. package/dist/contracts/agents.contract.d.ts +2665 -733
  46. package/dist/contracts/agents.contract.d.ts.map +1 -1
  47. package/dist/contracts/agents.contract.js +35 -5
  48. package/dist/contracts/agents.contract.js.map +1 -1
  49. package/dist/contracts/automations.contract.d.ts +90 -8
  50. package/dist/contracts/automations.contract.d.ts.map +1 -1
  51. package/dist/contracts/automations.contract.js +1 -0
  52. package/dist/contracts/automations.contract.js.map +1 -1
  53. package/dist/contracts/capabilities.contract.d.ts +49 -0
  54. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  55. package/dist/contracts/capabilities.contract.js +24 -1
  56. package/dist/contracts/capabilities.contract.js.map +1 -1
  57. package/dist/contracts/ci.contract.d.ts +222 -95
  58. package/dist/contracts/ci.contract.d.ts.map +1 -1
  59. package/dist/contracts/ci.contract.js +87 -26
  60. package/dist/contracts/ci.contract.js.map +1 -1
  61. package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
  62. package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
  63. package/dist/contracts/device-ci-runners.contract.js +56 -0
  64. package/dist/contracts/device-ci-runners.contract.js.map +1 -0
  65. package/dist/contracts/device-stacks.contract.d.ts +129 -0
  66. package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
  67. package/dist/contracts/device-stacks.contract.js +66 -0
  68. package/dist/contracts/device-stacks.contract.js.map +1 -0
  69. package/dist/contracts/device.contract.d.ts +74 -0
  70. package/dist/contracts/device.contract.d.ts.map +1 -1
  71. package/dist/contracts/extensions.contract.d.ts +604 -0
  72. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  73. package/dist/contracts/extensions.contract.js +11 -2
  74. package/dist/contracts/extensions.contract.js.map +1 -1
  75. package/dist/contracts/git.contract.d.ts +7 -0
  76. package/dist/contracts/git.contract.d.ts.map +1 -1
  77. package/dist/contracts/needs.contract.d.ts +1097 -18
  78. package/dist/contracts/needs.contract.d.ts.map +1 -1
  79. package/dist/contracts/offload.contract.d.ts +25 -0
  80. package/dist/contracts/offload.contract.d.ts.map +1 -1
  81. package/dist/contracts/ports.contract.d.ts +8 -0
  82. package/dist/contracts/ports.contract.d.ts.map +1 -1
  83. package/dist/contracts/ports.contract.js +6 -5
  84. package/dist/contracts/ports.contract.js.map +1 -1
  85. package/dist/contracts/remote.contract.d.ts +1 -0
  86. package/dist/contracts/remote.contract.d.ts.map +1 -1
  87. package/dist/contracts/runner.contract.d.ts +1203 -9
  88. package/dist/contracts/runner.contract.d.ts.map +1 -1
  89. package/dist/contracts/runner.contract.js +49 -2
  90. package/dist/contracts/runner.contract.js.map +1 -1
  91. package/dist/contracts/runners.contract.d.ts +16 -0
  92. package/dist/contracts/runners.contract.d.ts.map +1 -0
  93. package/dist/contracts/runners.contract.js +15 -0
  94. package/dist/contracts/runners.contract.js.map +1 -0
  95. package/dist/contracts/safety.contract.d.ts.map +1 -1
  96. package/dist/contracts/safety.contract.js +1 -0
  97. package/dist/contracts/safety.contract.js.map +1 -1
  98. package/dist/contracts/seal.contract.d.ts +100 -0
  99. package/dist/contracts/seal.contract.d.ts.map +1 -1
  100. package/dist/contracts/secrets.contract.d.ts +15 -0
  101. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  102. package/dist/contracts/secrets.contract.js +27 -1
  103. package/dist/contracts/secrets.contract.js.map +1 -1
  104. package/dist/contracts/sessions.contract.d.ts +159 -2
  105. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  106. package/dist/contracts/settings.contract.d.ts +59 -42
  107. package/dist/contracts/settings.contract.d.ts.map +1 -1
  108. package/dist/contracts/settings.contract.js +19 -0
  109. package/dist/contracts/settings.contract.js.map +1 -1
  110. package/dist/contracts/skills.contract.d.ts +6 -0
  111. package/dist/contracts/skills.contract.d.ts.map +1 -1
  112. package/dist/contracts/stack-grants.contract.d.ts +418 -0
  113. package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
  114. package/dist/contracts/stack-grants.contract.js +46 -0
  115. package/dist/contracts/stack-grants.contract.js.map +1 -0
  116. package/dist/contracts/system.contract.d.ts +516 -69
  117. package/dist/contracts/system.contract.d.ts.map +1 -1
  118. package/dist/contracts/system.contract.js +26 -45
  119. package/dist/contracts/system.contract.js.map +1 -1
  120. package/dist/contracts/usage.contract.d.ts +3 -0
  121. package/dist/contracts/usage.contract.d.ts.map +1 -1
  122. package/dist/contracts/workspace.contract.d.ts +0 -55
  123. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  124. package/dist/contracts/workspace.contract.js +0 -19
  125. package/dist/contracts/workspace.contract.js.map +1 -1
  126. package/dist/events/agent-events.d.ts +615 -8
  127. package/dist/events/agent-events.d.ts.map +1 -1
  128. package/dist/events/agent-events.js +2 -2
  129. package/dist/events/agent-events.js.map +1 -1
  130. package/dist/events/agent-transcript.d.ts +159 -2
  131. package/dist/events/agent-transcript.d.ts.map +1 -1
  132. package/dist/events/agent-words.d.ts +5 -0
  133. package/dist/events/agent-words.d.ts.map +1 -1
  134. package/dist/events/agent-words.js +22 -2
  135. package/dist/events/agent-words.js.map +1 -1
  136. package/dist/events/child-news.d.ts +32 -0
  137. package/dist/events/child-news.d.ts.map +1 -0
  138. package/dist/events/child-news.js +171 -0
  139. package/dist/events/child-news.js.map +1 -0
  140. package/dist/events/prompt-origins.d.ts +42 -0
  141. package/dist/events/prompt-origins.d.ts.map +1 -1
  142. package/dist/events/prompt-origins.js +28 -0
  143. package/dist/events/prompt-origins.js.map +1 -1
  144. package/dist/events/refusal-incidents.d.ts +1 -0
  145. package/dist/events/refusal-incidents.d.ts.map +1 -1
  146. package/dist/events/refusal-incidents.js +42 -19
  147. package/dist/events/refusal-incidents.js.map +1 -1
  148. package/dist/events/requests.d.ts +14 -0
  149. package/dist/events/requests.d.ts.map +1 -1
  150. package/dist/events/requests.js +12 -0
  151. package/dist/events/requests.js.map +1 -1
  152. package/dist/events/system-events.d.ts +98 -0
  153. package/dist/events/system-events.d.ts.map +1 -1
  154. package/dist/events/transcript.d.ts +799 -10
  155. package/dist/events/transcript.d.ts.map +1 -1
  156. package/dist/events/transcript.js +2 -1
  157. package/dist/events/transcript.js.map +1 -1
  158. package/dist/ids/conversation-ids.d.ts +1 -0
  159. package/dist/ids/conversation-ids.d.ts.map +1 -1
  160. package/dist/ids/conversation-ids.js +2 -1
  161. package/dist/ids/conversation-ids.js.map +1 -1
  162. package/dist/ids/project-id.d.ts.map +1 -1
  163. package/dist/ids/project-id.js +4 -4
  164. package/dist/ids/project-id.js.map +1 -1
  165. package/dist/ids/run-row-ids.d.ts +8 -0
  166. package/dist/ids/run-row-ids.d.ts.map +1 -0
  167. package/dist/ids/run-row-ids.js +32 -0
  168. package/dist/ids/run-row-ids.js.map +1 -0
  169. package/dist/index.d.ts +4 -4
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +4 -4
  172. package/dist/index.js.map +1 -1
  173. package/dist/models/agent-catalog.d.ts.map +1 -1
  174. package/dist/models/agent-catalog.js +3 -2
  175. package/dist/models/agent-catalog.js.map +1 -1
  176. package/dist/models/agent-lanes.d.ts.map +1 -1
  177. package/dist/models/agent-lanes.js +4 -1
  178. package/dist/models/agent-lanes.js.map +1 -1
  179. package/dist/models/agent-runtimes.d.ts.map +1 -1
  180. package/dist/models/agent-runtimes.js +2 -2
  181. package/dist/models/agent-runtimes.js.map +1 -1
  182. package/dist/models/agent-standing.d.ts +6 -1
  183. package/dist/models/agent-standing.d.ts.map +1 -1
  184. package/dist/models/agent-standing.js +1 -0
  185. package/dist/models/agent-standing.js.map +1 -1
  186. package/dist/models/model-roles.d.ts +91 -37
  187. package/dist/models/model-roles.d.ts.map +1 -1
  188. package/dist/models/model-roles.js +106 -35
  189. package/dist/models/model-roles.js.map +1 -1
  190. package/dist/models/model-setups.d.ts +10 -8
  191. package/dist/models/model-setups.d.ts.map +1 -1
  192. package/dist/models/model-setups.js +15 -15
  193. package/dist/models/model-setups.js.map +1 -1
  194. package/dist/models/providers/provider-traits.d.ts +215 -0
  195. package/dist/models/providers/provider-traits.d.ts.map +1 -0
  196. package/dist/models/providers/provider-traits.js +60 -0
  197. package/dist/models/providers/provider-traits.js.map +1 -0
  198. package/dist/netd/browser-wire.d.ts +8 -0
  199. package/dist/netd/browser-wire.d.ts.map +1 -1
  200. package/dist/netd/browser-wire.js +5 -0
  201. package/dist/netd/browser-wire.js.map +1 -1
  202. package/dist/netd/generated/wire.d.ts +42 -1
  203. package/dist/netd/generated/wire.d.ts.map +1 -1
  204. package/dist/policy/admin/admin-grant.d.ts +21 -0
  205. package/dist/policy/admin/admin-grant.d.ts.map +1 -0
  206. package/dist/policy/admin/admin-grant.js +41 -0
  207. package/dist/policy/admin/admin-grant.js.map +1 -0
  208. package/dist/policy/approvals-execution.d.ts +5 -2
  209. package/dist/policy/approvals-execution.d.ts.map +1 -1
  210. package/dist/policy/approvals-execution.js +3 -4
  211. package/dist/policy/approvals-execution.js.map +1 -1
  212. package/dist/policy/batch-runs.d.ts +1 -1
  213. package/dist/policy/batch-runs.d.ts.map +1 -1
  214. package/dist/policy/batch-runs.js +2 -1
  215. package/dist/policy/batch-runs.js.map +1 -1
  216. package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
  217. package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
  218. package/dist/policy/capabilities/capability-kinds.js +47 -0
  219. package/dist/policy/capabilities/capability-kinds.js.map +1 -0
  220. package/dist/policy/command-classes.d.ts.map +1 -1
  221. package/dist/policy/command-classes.js +3 -1
  222. package/dist/policy/command-classes.js.map +1 -1
  223. package/dist/policy/device-programs.d.ts +79 -2
  224. package/dist/policy/device-programs.d.ts.map +1 -1
  225. package/dist/policy/device-programs.js +15 -16
  226. package/dist/policy/device-programs.js.map +1 -1
  227. package/dist/policy/message-limits.d.ts.map +1 -1
  228. package/dist/policy/message-limits.js.map +1 -1
  229. package/dist/policy/org-locks.d.ts +1 -1
  230. package/dist/policy/org-locks.d.ts.map +1 -1
  231. package/dist/policy/org-locks.js +1 -0
  232. package/dist/policy/org-locks.js.map +1 -1
  233. package/dist/policy/reserved-servers.d.ts.map +1 -1
  234. package/dist/policy/reserved-servers.js +5 -1
  235. package/dist/policy/reserved-servers.js.map +1 -1
  236. package/dist/policy/role-capability.d.ts.map +1 -1
  237. package/dist/policy/role-capability.js +2 -1
  238. package/dist/policy/role-capability.js.map +1 -1
  239. package/dist/policy/shell/command-normalise.d.ts +10 -0
  240. package/dist/policy/shell/command-normalise.d.ts.map +1 -0
  241. package/dist/policy/shell/command-normalise.js +153 -0
  242. package/dist/policy/shell/command-normalise.js.map +1 -0
  243. package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
  244. package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
  245. package/dist/policy/shell/workspace-root-exclude.js +4 -0
  246. package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
  247. package/dist/protocol/doors/listener-protocol.d.ts +11 -0
  248. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  249. package/dist/protocol/doors/listener-protocol.js +5 -0
  250. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  251. package/dist/protocol/doors/loopback-proof.d.ts +8 -0
  252. package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
  253. package/dist/protocol/doors/loopback-proof.js +11 -0
  254. package/dist/protocol/doors/loopback-proof.js.map +1 -0
  255. package/dist/protocol/doors/pass-scopes.d.ts +4 -0
  256. package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
  257. package/dist/protocol/doors/pass-scopes.js +3 -0
  258. package/dist/protocol/doors/pass-scopes.js.map +1 -0
  259. package/dist/protocol/doors/runner-protocol.d.ts +187 -0
  260. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
  261. package/dist/protocol/doors/runner-protocol.js +48 -1
  262. package/dist/protocol/doors/runner-protocol.js.map +1 -1
  263. package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
  264. package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
  265. package/dist/protocol/doors/sandbox-pass.js +42 -10
  266. package/dist/protocol/doors/sandbox-pass.js.map +1 -1
  267. package/dist/protocol/doors/webext-links.d.ts.map +1 -1
  268. package/dist/protocol/doors/webext-links.js.map +1 -1
  269. package/dist/protocol/member-reach.d.ts +6 -0
  270. package/dist/protocol/member-reach.d.ts.map +1 -1
  271. package/dist/protocol/member-reach.js +24 -0
  272. package/dist/protocol/member-reach.js.map +1 -1
  273. package/dist/protocol/peer-mcp-server.d.ts +2 -0
  274. package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
  275. package/dist/protocol/peer-mcp-server.js +1 -0
  276. package/dist/protocol/peer-mcp-server.js.map +1 -1
  277. package/dist/protocol/raw/extension-protocol.d.ts +518 -0
  278. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
  279. package/dist/protocol/raw/extension-protocol.js +276 -0
  280. package/dist/protocol/raw/extension-protocol.js.map +1 -1
  281. package/dist/protocol/raw/raw-json-routes.d.ts +572 -0
  282. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  283. package/dist/protocol/raw/raw-json-routes.js +25 -2
  284. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  285. package/dist/protocol/raw/raw-routes.d.ts +245 -3
  286. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  287. package/dist/protocol/raw/raw-routes.js +79 -36
  288. package/dist/protocol/raw/raw-routes.js.map +1 -1
  289. package/dist/protocol/route-meta.d.ts.map +1 -1
  290. package/dist/protocol/route-meta.js.map +1 -1
  291. package/dist/schemas/account-routes.d.ts +176 -0
  292. package/dist/schemas/account-routes.d.ts.map +1 -0
  293. package/dist/schemas/account-routes.js +73 -0
  294. package/dist/schemas/account-routes.js.map +1 -0
  295. package/dist/schemas/activity.d.ts.map +1 -1
  296. package/dist/schemas/activity.js.map +1 -1
  297. package/dist/schemas/agent-background.d.ts +48 -0
  298. package/dist/schemas/agent-background.d.ts.map +1 -0
  299. package/dist/schemas/agent-background.js +63 -0
  300. package/dist/schemas/agent-background.js.map +1 -0
  301. package/dist/schemas/agent-land.d.ts +7 -0
  302. package/dist/schemas/agent-land.d.ts.map +1 -1
  303. package/dist/schemas/agent-land.js +11 -0
  304. package/dist/schemas/agent-land.js.map +1 -1
  305. package/dist/schemas/agent.d.ts +4 -0
  306. package/dist/schemas/agent.d.ts.map +1 -1
  307. package/dist/schemas/agent.js +4 -2
  308. package/dist/schemas/agent.js.map +1 -1
  309. package/dist/schemas/agents-list.d.ts +40 -0
  310. package/dist/schemas/agents-list.d.ts.map +1 -1
  311. package/dist/schemas/agents.d.ts +668 -17
  312. package/dist/schemas/agents.d.ts.map +1 -1
  313. package/dist/schemas/agents.js +16 -41
  314. package/dist/schemas/agents.js.map +1 -1
  315. package/dist/schemas/auto-approve.d.ts +12 -0
  316. package/dist/schemas/auto-approve.d.ts.map +1 -0
  317. package/dist/schemas/auto-approve.js +12 -0
  318. package/dist/schemas/auto-approve.js.map +1 -0
  319. package/dist/schemas/automations.d.ts +170 -27
  320. package/dist/schemas/automations.d.ts.map +1 -1
  321. package/dist/schemas/automations.js +26 -34
  322. package/dist/schemas/automations.js.map +1 -1
  323. package/dist/schemas/bridge-heads.d.ts +57 -0
  324. package/dist/schemas/bridge-heads.d.ts.map +1 -0
  325. package/dist/schemas/bridge-heads.js +22 -0
  326. package/dist/schemas/bridge-heads.js.map +1 -0
  327. package/dist/schemas/capabilities.d.ts +21 -0
  328. package/dist/schemas/capabilities.d.ts.map +1 -1
  329. package/dist/schemas/capabilities.js +6 -0
  330. package/dist/schemas/capabilities.js.map +1 -1
  331. package/dist/schemas/checkout-hooks.d.ts +24 -0
  332. package/dist/schemas/checkout-hooks.d.ts.map +1 -0
  333. package/dist/schemas/checkout-hooks.js +23 -0
  334. package/dist/schemas/checkout-hooks.js.map +1 -0
  335. package/dist/schemas/ci-deployments.d.ts +30 -0
  336. package/dist/schemas/ci-deployments.d.ts.map +1 -0
  337. package/dist/schemas/ci-deployments.js +18 -0
  338. package/dist/schemas/ci-deployments.js.map +1 -0
  339. package/dist/schemas/ci-fleet.d.ts +216 -0
  340. package/dist/schemas/ci-fleet.d.ts.map +1 -0
  341. package/dist/schemas/ci-fleet.js +87 -0
  342. package/dist/schemas/ci-fleet.js.map +1 -0
  343. package/dist/schemas/ci.d.ts +348 -21
  344. package/dist/schemas/ci.d.ts.map +1 -1
  345. package/dist/schemas/ci.js +110 -19
  346. package/dist/schemas/ci.js.map +1 -1
  347. package/dist/schemas/command-run.d.ts +29 -0
  348. package/dist/schemas/command-run.d.ts.map +1 -0
  349. package/dist/schemas/command-run.js +20 -0
  350. package/dist/schemas/command-run.js.map +1 -0
  351. package/dist/schemas/connection-hub.d.ts +3 -1
  352. package/dist/schemas/connection-hub.d.ts.map +1 -1
  353. package/dist/schemas/connection-hub.js +2 -1
  354. package/dist/schemas/connection-hub.js.map +1 -1
  355. package/dist/schemas/context-continues.d.ts.map +1 -1
  356. package/dist/schemas/context-continues.js +2 -2
  357. package/dist/schemas/context-continues.js.map +1 -1
  358. package/dist/schemas/data-protection.d.ts +15 -2
  359. package/dist/schemas/data-protection.d.ts.map +1 -1
  360. package/dist/schemas/data-protection.js +15 -23
  361. package/dist/schemas/data-protection.js.map +1 -1
  362. package/dist/schemas/device-stacks.d.ts +131 -0
  363. package/dist/schemas/device-stacks.d.ts.map +1 -1
  364. package/dist/schemas/device-stacks.js +81 -0
  365. package/dist/schemas/device-stacks.js.map +1 -1
  366. package/dist/schemas/devices.d.ts +137 -0
  367. package/dist/schemas/devices.d.ts.map +1 -1
  368. package/dist/schemas/devices.js +11 -2
  369. package/dist/schemas/devices.js.map +1 -1
  370. package/dist/schemas/environment.d.ts +1 -0
  371. package/dist/schemas/environment.d.ts.map +1 -1
  372. package/dist/schemas/environment.js +1 -0
  373. package/dist/schemas/environment.js.map +1 -1
  374. package/dist/schemas/extension-updates.d.ts +1186 -0
  375. package/dist/schemas/extension-updates.d.ts.map +1 -1
  376. package/dist/schemas/extension-updates.js +22 -4
  377. package/dist/schemas/extension-updates.js.map +1 -1
  378. package/dist/schemas/git/git.d.ts +13 -0
  379. package/dist/schemas/git/git.d.ts.map +1 -1
  380. package/dist/schemas/git/git.js +7 -7
  381. package/dist/schemas/git/git.js.map +1 -1
  382. package/dist/schemas/git/index-run.d.ts +1 -0
  383. package/dist/schemas/git/index-run.d.ts.map +1 -1
  384. package/dist/schemas/host-power.d.ts +76 -0
  385. package/dist/schemas/host-power.d.ts.map +1 -0
  386. package/dist/schemas/host-power.js +101 -0
  387. package/dist/schemas/host-power.js.map +1 -0
  388. package/dist/schemas/hosts.d.ts +365 -0
  389. package/dist/schemas/hosts.d.ts.map +1 -1
  390. package/dist/schemas/hosts.js +33 -1
  391. package/dist/schemas/hosts.js.map +1 -1
  392. package/dist/schemas/issues.d.ts +55 -225
  393. package/dist/schemas/issues.d.ts.map +1 -1
  394. package/dist/schemas/issues.js +21 -43
  395. package/dist/schemas/issues.js.map +1 -1
  396. package/dist/schemas/keyring-native.d.ts.map +1 -1
  397. package/dist/schemas/keyring-native.js +3 -1
  398. package/dist/schemas/keyring-native.js.map +1 -1
  399. package/dist/schemas/keyring.d.ts +1 -0
  400. package/dist/schemas/keyring.d.ts.map +1 -1
  401. package/dist/schemas/keyring.js +3 -1
  402. package/dist/schemas/keyring.js.map +1 -1
  403. package/dist/schemas/maintenance.d.ts.map +1 -1
  404. package/dist/schemas/maintenance.js.map +1 -1
  405. package/dist/schemas/members.d.ts.map +1 -1
  406. package/dist/schemas/members.js +2 -14
  407. package/dist/schemas/members.js.map +1 -1
  408. package/dist/schemas/metrics.d.ts +33 -0
  409. package/dist/schemas/metrics.d.ts.map +1 -1
  410. package/dist/schemas/metrics.js +26 -0
  411. package/dist/schemas/metrics.js.map +1 -1
  412. package/dist/schemas/need-kinds.d.ts +19 -0
  413. package/dist/schemas/need-kinds.d.ts.map +1 -0
  414. package/dist/schemas/need-kinds.js +7 -0
  415. package/dist/schemas/need-kinds.js.map +1 -0
  416. package/dist/schemas/needs.d.ts +868 -27
  417. package/dist/schemas/needs.d.ts.map +1 -1
  418. package/dist/schemas/needs.js +79 -9
  419. package/dist/schemas/needs.js.map +1 -1
  420. package/dist/schemas/offload.d.ts +61 -0
  421. package/dist/schemas/offload.d.ts.map +1 -1
  422. package/dist/schemas/offload.js +14 -1
  423. package/dist/schemas/offload.js.map +1 -1
  424. package/dist/schemas/outward-action.d.ts +39 -0
  425. package/dist/schemas/outward-action.d.ts.map +1 -0
  426. package/dist/schemas/outward-action.js +40 -0
  427. package/dist/schemas/outward-action.js.map +1 -0
  428. package/dist/schemas/ports.d.ts +4 -0
  429. package/dist/schemas/ports.d.ts.map +1 -1
  430. package/dist/schemas/ports.js +3 -0
  431. package/dist/schemas/ports.js.map +1 -1
  432. package/dist/schemas/providers/capacity.d.ts +6 -0
  433. package/dist/schemas/providers/capacity.d.ts.map +1 -1
  434. package/dist/schemas/providers/plan-limits.d.ts +1 -0
  435. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  436. package/dist/schemas/providers/plan-limits.js +1 -0
  437. package/dist/schemas/providers/plan-limits.js.map +1 -1
  438. package/dist/schemas/providers/refusals.d.ts +12 -0
  439. package/dist/schemas/providers/refusals.d.ts.map +1 -1
  440. package/dist/schemas/providers/refusals.js +4 -0
  441. package/dist/schemas/providers/refusals.js.map +1 -1
  442. package/dist/schemas/remote-access.d.ts +1 -0
  443. package/dist/schemas/remote-access.d.ts.map +1 -1
  444. package/dist/schemas/remote-access.js +1 -0
  445. package/dist/schemas/remote-access.js.map +1 -1
  446. package/dist/schemas/run-targets.d.ts.map +1 -1
  447. package/dist/schemas/run-targets.js +2 -1
  448. package/dist/schemas/run-targets.js.map +1 -1
  449. package/dist/schemas/runner-views.d.ts +24 -0
  450. package/dist/schemas/runner-views.d.ts.map +1 -0
  451. package/dist/schemas/runner-views.js +16 -0
  452. package/dist/schemas/runner-views.js.map +1 -0
  453. package/dist/schemas/sandbox-reach.d.ts +157 -0
  454. package/dist/schemas/sandbox-reach.d.ts.map +1 -0
  455. package/dist/schemas/sandbox-reach.js +112 -0
  456. package/dist/schemas/sandbox-reach.js.map +1 -0
  457. package/dist/schemas/secrets.d.ts +17 -0
  458. package/dist/schemas/secrets.d.ts.map +1 -1
  459. package/dist/schemas/secrets.js +12 -5
  460. package/dist/schemas/secrets.js.map +1 -1
  461. package/dist/schemas/settings-history.d.ts +1 -1
  462. package/dist/schemas/settings-history.d.ts.map +1 -1
  463. package/dist/schemas/settings-history.js +5 -4
  464. package/dist/schemas/settings-history.js.map +1 -1
  465. package/dist/schemas/settings-savings.d.ts +58 -0
  466. package/dist/schemas/settings-savings.d.ts.map +1 -1
  467. package/dist/schemas/settings-savings.js +22 -0
  468. package/dist/schemas/settings-savings.js.map +1 -1
  469. package/dist/schemas/settings.d.ts +20 -42
  470. package/dist/schemas/settings.d.ts.map +1 -1
  471. package/dist/schemas/settings.js +24 -7
  472. package/dist/schemas/settings.js.map +1 -1
  473. package/dist/schemas/stack-grants.d.ts +60 -0
  474. package/dist/schemas/stack-grants.d.ts.map +1 -0
  475. package/dist/schemas/stack-grants.js +33 -0
  476. package/dist/schemas/stack-grants.js.map +1 -0
  477. package/dist/schemas/system.d.ts +19 -0
  478. package/dist/schemas/system.d.ts.map +1 -1
  479. package/dist/schemas/system.js +9 -0
  480. package/dist/schemas/system.js.map +1 -1
  481. package/dist/schemas/terminal.d.ts +46 -0
  482. package/dist/schemas/terminal.d.ts.map +1 -1
  483. package/dist/schemas/terminal.js +19 -0
  484. package/dist/schemas/terminal.js.map +1 -1
  485. package/dist/schemas/watch-sources.d.ts +72 -0
  486. package/dist/schemas/watch-sources.d.ts.map +1 -0
  487. package/dist/schemas/watch-sources.js +88 -0
  488. package/dist/schemas/watch-sources.js.map +1 -0
  489. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  490. package/dist/schemas/workspace/workspace-search.js +1 -1
  491. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  492. package/dist/schemas/wsl-memory.d.ts +76 -0
  493. package/dist/schemas/wsl-memory.d.ts.map +1 -0
  494. package/dist/schemas/wsl-memory.js +36 -0
  495. package/dist/schemas/wsl-memory.js.map +1 -0
  496. package/dist/state/auth-state.d.ts.map +1 -1
  497. package/dist/state/auth-state.js +3 -0
  498. package/dist/state/auth-state.js.map +1 -1
  499. package/dist/state/definition.d.ts +16 -8
  500. package/dist/state/definition.d.ts.map +1 -1
  501. package/dist/state/runtime-state.d.ts +1 -1
  502. package/dist/state/runtime-state.d.ts.map +1 -1
  503. package/dist/state/runtime-state.js +1 -1
  504. package/dist/state/runtime-state.js.map +1 -1
  505. package/dist/state/workspace-state.d.ts +9 -4
  506. package/dist/state/workspace-state.d.ts.map +1 -1
  507. package/dist/state/workspace-state.js +9 -4
  508. package/dist/state/workspace-state.js.map +1 -1
  509. package/dist/sync/workspace-sync-ignores.d.ts +4 -0
  510. package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
  511. package/dist/sync/workspace-sync-ignores.js +75 -0
  512. package/dist/sync/workspace-sync-ignores.js.map +1 -0
  513. package/dist/text/pages.d.ts.map +1 -1
  514. package/dist/text/pages.js +17 -4
  515. package/dist/text/pages.js.map +1 -1
  516. package/dist/text/transcript-fold.js +2 -2
  517. package/dist/text/transcript-fold.js.map +1 -1
  518. package/package.json +5 -5
  519. package/src/app-routes/app-pages.ts +3 -0
  520. package/src/app-routes/index.ts +1 -0
  521. package/src/app-routes/return-path.ts +16 -0
  522. package/src/briefs/agent-ask.ts +23 -0
  523. package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
  524. package/src/chores/digest.ts +1 -0
  525. package/src/chores/index.ts +13 -2
  526. package/src/chores/prompt.ts +3 -18
  527. package/src/chores/stack.ts +1 -0
  528. package/src/chores/verdict.ts +1 -0
  529. package/src/chores/workspace-scope.ts +3 -8
  530. package/src/contracts/accounts.contract.ts +3 -0
  531. package/src/contracts/agents.contract.ts +41 -5
  532. package/src/contracts/automations.contract.ts +2 -0
  533. package/src/contracts/capabilities.contract.ts +31 -2
  534. package/src/contracts/ci.contract.ts +119 -37
  535. package/src/contracts/device-ci-runners.contract.ts +81 -0
  536. package/src/contracts/device-stacks.contract.ts +97 -0
  537. package/src/contracts/extensions.contract.ts +12 -1
  538. package/src/contracts/ports.contract.ts +6 -6
  539. package/src/contracts/runner.contract.ts +117 -3
  540. package/src/contracts/runners.contract.ts +19 -0
  541. package/src/contracts/safety.contract.ts +2 -0
  542. package/src/contracts/secrets.contract.ts +39 -0
  543. package/src/contracts/settings.contract.ts +26 -0
  544. package/src/contracts/stack-grants.contract.ts +51 -0
  545. package/src/contracts/system.contract.ts +36 -62
  546. package/src/contracts/workspace.contract.ts +0 -22
  547. package/src/events/agent-events.ts +3 -2
  548. package/src/events/agent-words.test.ts +19 -1
  549. package/src/events/agent-words.ts +36 -2
  550. package/src/events/child-news.test.ts +91 -0
  551. package/src/events/child-news.ts +269 -0
  552. package/src/events/prompt-origins.ts +35 -0
  553. package/src/events/refusal-incidents.ts +60 -19
  554. package/src/events/requests.ts +18 -0
  555. package/src/events/transcript.ts +10 -1
  556. package/src/ids/conversation-ids.test.ts +3 -1
  557. package/src/ids/conversation-ids.ts +6 -4
  558. package/src/ids/project-dir.test.ts +1 -1
  559. package/src/ids/project-dir.ts +1 -1
  560. package/src/ids/project-id.test.ts +14 -0
  561. package/src/ids/project-id.ts +6 -4
  562. package/src/ids/run-row-ids.test.ts +38 -0
  563. package/src/ids/run-row-ids.ts +49 -0
  564. package/src/index.ts +6 -6
  565. package/src/models/agent-catalog.test.ts +7 -4
  566. package/src/models/agent-catalog.ts +3 -2
  567. package/src/models/agent-lanes.ts +8 -1
  568. package/src/models/agent-runtimes.ts +7 -6
  569. package/src/models/agent-standing.ts +13 -0
  570. package/src/models/model-roles.test.ts +61 -4
  571. package/src/models/model-roles.ts +153 -49
  572. package/src/models/model-setups.ts +49 -26
  573. package/src/models/provider-specs.test.ts +2 -2
  574. package/src/models/providers/provider-traits.test.ts +71 -0
  575. package/src/models/providers/provider-traits.ts +144 -0
  576. package/src/netd/browser-wire.ts +13 -0
  577. package/src/netd/generated/browser-wire.json +10 -0
  578. package/src/netd/generated/netd-wire.json +224 -1
  579. package/src/netd/generated/wire.ts +18 -6
  580. package/src/netd/wire-manifests.test.ts +16 -0
  581. package/src/policy/admin/admin-grant.ts +69 -0
  582. package/src/policy/approvals-execution.ts +11 -6
  583. package/src/policy/batch-runs.ts +2 -2
  584. package/src/policy/capabilities/capability-kinds.test.ts +112 -0
  585. package/src/policy/capabilities/capability-kinds.ts +110 -0
  586. package/src/policy/command-classes.ts +5 -3
  587. package/src/policy/credential-material.ts +1 -1
  588. package/src/policy/device-programs.ts +29 -20
  589. package/src/policy/message-limits.ts +8 -4
  590. package/src/policy/org-locks.ts +1 -0
  591. package/src/policy/overlay-lint.ts +1 -1
  592. package/src/policy/reserved-servers.ts +5 -1
  593. package/src/policy/role-capability.ts +3 -1
  594. package/src/policy/shell/command-normalise.test.ts +72 -0
  595. package/src/policy/shell/command-normalise.ts +212 -0
  596. package/src/policy/shell/workspace-root-exclude.ts +11 -0
  597. package/src/policy/tests/admin-grant.test.ts +35 -0
  598. package/src/policy/tests/command-classes.test.ts +41 -0
  599. package/src/protocol/doors/listener-protocol.ts +32 -1
  600. package/src/protocol/doors/loopback-proof.ts +34 -0
  601. package/src/protocol/doors/pass-scopes.ts +12 -0
  602. package/src/protocol/doors/runner-protocol.ts +133 -4
  603. package/src/protocol/doors/sandbox-pass.test.ts +33 -1
  604. package/src/protocol/doors/sandbox-pass.ts +92 -16
  605. package/src/protocol/doors/webext-links.ts +3 -1
  606. package/src/protocol/ingress-contract.fixture.json +5 -1
  607. package/src/protocol/member-reach.test.ts +40 -1
  608. package/src/protocol/member-reach.ts +40 -0
  609. package/src/protocol/peer-mcp-server.ts +6 -0
  610. package/src/protocol/raw/extension-protocol.ts +469 -2
  611. package/src/protocol/raw/raw-json-routes.ts +45 -1
  612. package/src/protocol/raw/raw-routes.ts +133 -40
  613. package/src/protocol/route-meta.ts +4 -1
  614. package/src/schemas/account-routes.ts +126 -0
  615. package/src/schemas/activity.ts +6 -4
  616. package/src/schemas/agent-background.ts +104 -0
  617. package/src/schemas/agent-land.ts +21 -2
  618. package/src/schemas/agent.test.ts +3 -0
  619. package/src/schemas/agent.ts +10 -4
  620. package/src/schemas/agents.ts +26 -65
  621. package/src/schemas/auto-approve.ts +31 -0
  622. package/src/schemas/automations.ts +51 -42
  623. package/src/schemas/bridge-heads.ts +33 -0
  624. package/src/schemas/capabilities.ts +23 -0
  625. package/src/schemas/checkout-hooks.ts +44 -0
  626. package/src/schemas/ci-deployments.ts +26 -0
  627. package/src/schemas/ci-fleet.ts +180 -0
  628. package/src/schemas/ci.ts +185 -45
  629. package/src/schemas/command-run.ts +44 -0
  630. package/src/schemas/compose-overlay.test.ts +1 -1
  631. package/src/schemas/compose-overlay.ts +1 -1
  632. package/src/schemas/connection-hub.ts +4 -2
  633. package/src/schemas/context-continues.ts +6 -3
  634. package/src/schemas/data-protection.ts +28 -34
  635. package/src/schemas/device-stacks.ts +162 -3
  636. package/src/schemas/device-swaps.test.ts +1 -1
  637. package/src/schemas/devices.ts +31 -2
  638. package/src/schemas/egress-private.test.ts +1 -1
  639. package/src/schemas/environment.ts +4 -0
  640. package/src/schemas/extension-updates.ts +35 -7
  641. package/src/schemas/git/git.ts +14 -14
  642. package/src/schemas/host-power.test.ts +53 -0
  643. package/src/schemas/host-power.ts +173 -0
  644. package/src/schemas/hosts.test.ts +32 -0
  645. package/src/schemas/hosts.ts +86 -2
  646. package/src/schemas/intentic-os.ts +2 -2
  647. package/src/schemas/issues.ts +43 -86
  648. package/src/schemas/keyring-native.test.ts +11 -3
  649. package/src/schemas/keyring-native.ts +3 -1
  650. package/src/schemas/keyring.ts +6 -1
  651. package/src/schemas/maintenance.ts +4 -3
  652. package/src/schemas/members.ts +4 -16
  653. package/src/schemas/metrics.test.ts +9 -1
  654. package/src/schemas/metrics.ts +43 -0
  655. package/src/schemas/need-kinds.ts +13 -0
  656. package/src/schemas/needs.ts +118 -14
  657. package/src/schemas/offload.ts +37 -3
  658. package/src/schemas/outward-action.ts +47 -0
  659. package/src/schemas/ports.ts +5 -0
  660. package/src/schemas/providers/plan-limits.ts +1 -0
  661. package/src/schemas/providers/refusals.ts +9 -0
  662. package/src/schemas/remote-access.ts +3 -0
  663. package/src/schemas/run-targets.ts +2 -1
  664. package/src/schemas/runner-views.ts +27 -0
  665. package/src/schemas/sandbox-reach.ts +161 -0
  666. package/src/schemas/secrets.ts +23 -5
  667. package/src/schemas/settings-history.ts +10 -5
  668. package/src/schemas/settings-savings.ts +29 -0
  669. package/src/schemas/settings.test.ts +24 -23
  670. package/src/schemas/settings.ts +55 -22
  671. package/src/schemas/stack-grants.ts +59 -0
  672. package/src/schemas/state-plan.test.ts +1 -1
  673. package/src/schemas/state-plan.ts +2 -2
  674. package/src/schemas/system.ts +16 -1
  675. package/src/schemas/terminal.ts +28 -0
  676. package/src/schemas/updates.test.ts +1 -1
  677. package/src/schemas/updates.ts +1 -1
  678. package/src/schemas/version-seam.test.ts +4 -1
  679. package/src/schemas/watch-sources.ts +127 -0
  680. package/src/schemas/workspace/workspace-search.ts +5 -2
  681. package/src/schemas/wsl-memory.ts +59 -0
  682. package/src/state/auth-state.ts +10 -0
  683. package/src/state/runtime-state.test.ts +3 -2
  684. package/src/state/runtime-state.ts +3 -1
  685. package/src/state/update-probation.ts +1 -1
  686. package/src/state/ways-back.test.ts +1 -1
  687. package/src/state/workspace-state.test.ts +2 -0
  688. package/src/state/workspace-state.ts +21 -21
  689. package/src/sync/workspace-sync-ignores.test.ts +48 -0
  690. package/src/sync/workspace-sync-ignores.ts +143 -0
  691. package/src/text/embed.ts +2 -2
  692. package/src/text/pages.ts +34 -7
  693. package/src/text/transcript-fold.test.ts +40 -2
  694. package/src/text/transcript-fold.ts +2 -2
  695. package/dist/chores/extension-update.d.ts.map +0 -1
  696. package/dist/chores/extension-update.js.map +0 -1
  697. package/dist/contracts/chores.contract.d.ts +0 -213
  698. package/dist/contracts/chores.contract.d.ts.map +0 -1
  699. package/dist/contracts/chores.contract.js +0 -32
  700. package/dist/contracts/chores.contract.js.map +0 -1
  701. package/dist/contracts/issues.contract.d.ts +0 -95
  702. package/dist/contracts/issues.contract.d.ts.map +0 -1
  703. package/dist/contracts/issues.contract.js +0 -50
  704. package/dist/contracts/issues.contract.js.map +0 -1
  705. package/src/chores/chores.test.ts +0 -24
  706. package/src/chores/digest.test.ts +0 -27
  707. package/src/chores/probes.integration.test.ts +0 -494
  708. package/src/chores/stack.test.ts +0 -140
  709. package/src/chores/verdict.test.ts +0 -761
  710. package/src/contracts/chores.contract.ts +0 -39
  711. package/src/contracts/issues.contract.ts +0 -53
@@ -1,5 +1,6 @@
1
1
  // members: the daemon's shared-access roster (GET/POST/DELETE /members), who besides the owner reaches this sandbox
2
2
  import { z } from "zod";
3
+ import { kindsWhere } from "../policy/capabilities/capability-kinds.js";
3
4
  import type { CapabilityKind } from "./capabilities.js";
4
5
  import { entryId } from "./internal.js";
5
6
  import { type GrantedTier, GrantedTierSchema, type MemberTier, MemberTierSchema, withLegacyTier } from "./shared.js";
@@ -74,22 +75,9 @@ export type CredentialReach = z.infer<typeof CredentialReachSchema>;
74
75
  // it per turn (a mount, a variable, a signature, a gateway request). The rest are the sandbox's own machinery with no
75
76
  // value to withhold (Docker, a VPN once dialled, a mounted share, a local model, the wallet's owner-approved cards), so a
76
77
  // reach neither lists nor removes them: a switch for one would be a line on a screen.
77
- export const REACHABLE_CREDENTIAL_KINDS: readonly CapabilityKind[] = [
78
- "cli",
79
- "mcp",
80
- "browser",
81
- "identity",
82
- "ssh",
83
- "device",
84
- "phone",
85
- "webext",
86
- "plugin",
87
- "extension",
88
- // The owner's account: a person this sandbox works for may be kept from making sandboxes on it.
89
- "fleet",
90
- // Another of the owner's sandboxes: a person may be kept from handing it work.
91
- "link",
92
- ];
78
+ // The owner's account (`fleet`) and another of their sandboxes (`link`) are among them: a person may be kept from
79
+ // making sandboxes on it, or from handing one work.
80
+ export const REACHABLE_CREDENTIAL_KINDS: readonly CapabilityKind[] = kindsWhere((traits) => traits.reachable);
93
81
 
94
82
  // WHICH AI ACCOUNTS A PERSON'S CONVERSATIONS MAY RUN ON: the model accounts that pay for a turn (a Claude or Codex
95
83
  // subscription, a routed provider's sign-in, an API-key endpoint), as distinct from the connections above, which are
@@ -1,4 +1,4 @@
1
- import { type SandboxMetrics, SandboxMetricsSchema } from "./metrics.js";
1
+ import { type DiskPressure, type SandboxMetrics, DiskPressureSchema, SandboxMetricsSchema } from "./metrics.js";
2
2
 
3
3
  // A daemon payload from before memoryBreakdown and the other optional accounting fields existed.
4
4
  const legacyMetrics = {
@@ -18,6 +18,14 @@ const legacyMetrics = {
18
18
  },
19
19
  } satisfies SandboxMetrics;
20
20
 
21
+ test("disk-pressure readings keep old payloads valid and carry an optional host drive limit", () => {
22
+ const reading: DiskPressure = { level: "critical", freeBytes: 18_500_000_000, totalBytes: 394_500_000_000, measuredAt: 1, using: [] };
23
+ expect(DiskPressureSchema.parse(reading)).toEqual(reading);
24
+ expect(
25
+ DiskPressureSchema.parse({ ...reading, limitedBy: { drive: "C:\\", driveFreeBytes: 18_500_000_000 } }).limitedBy,
26
+ ).toEqual({ drive: "C:\\", driveFreeBytes: 18_500_000_000 });
27
+ });
28
+
21
29
  describe("the metrics memory accounting contract", () => {
22
30
  test("an older payload parses unchanged without the optional breakdown or its categories", () => {
23
31
  const parsed = SandboxMetricsSchema.parse(legacyMetrics);
@@ -346,6 +346,10 @@ const StorageReportFields = z.object({
346
346
  totalBytes: z.number().describe("The history volume's total size."),
347
347
  floorBytes: z.number().describe("Space kept free before a new checkout: 2% of this volume clamped to 5–20 GiB."),
348
348
  low: z.boolean().describe("Whether available history space is below the checkout floor."),
349
+ limitedBy: z
350
+ .object({ drive: z.string(), driveFreeBytes: z.number() })
351
+ .optional()
352
+ .describe("The Windows host drive limiting free space, when a host disk hint is available."),
349
353
  })
350
354
  .optional()
351
355
  .describe("The filesystem holding conversation checkouts, independent of the workspace volume. Absent if unreadable."),
@@ -401,6 +405,10 @@ export const DiskPressureSchema = z.object({
401
405
  freeBytes: z.number().describe("Space available on the history volume at the last reading."),
402
406
  totalBytes: z.number().describe("The history volume's size."),
403
407
  measuredAt: z.number().describe("When it was read, in milliseconds; 0 before the first reading."),
408
+ limitedBy: z
409
+ .object({ drive: z.string(), driveFreeBytes: z.number() })
410
+ .optional()
411
+ .describe("The Windows host drive limiting free space, when a host disk hint is available."),
404
412
  reaped: z
405
413
  .object({
406
414
  bytes: z.number().describe("Space the removals gave back, as the volume measured it before and after."),
@@ -430,3 +438,38 @@ export const StorageCleanResultSchema = z.object({
430
438
  failed: z.number().describe("How many removals the filesystem refused."),
431
439
  });
432
440
  export type StorageCleanResult = z.infer<typeof StorageCleanResultSchema>;
441
+
442
+ /* GIVING MEMORY BACK TO THE COMPUTER THIS SANDBOX RUNS ON, ON A PERSON'S PRESS (2026-11-26). The composer says when that
443
+ computer is what is short of memory (offload.ts MachineHostSchema), and offers to free some: this sandbox reclaims
444
+ from its own cgroup now, as it does by itself while the computer is under its low line (hosts/reclaim/host-reclaim.ts
445
+ in the daemon), and Windows' Available memory is read just before and a settle after, so the answer says what Windows
446
+ actually got rather than what the sandbox let go. Inside the WSL VM most of a reclaim lands in blocks too small to
447
+ hand back, so "Windows got none of it" is an answer it can give. */
448
+ export const MemoryReclaimRefusalSchema = z.enum([
449
+ // The computer this sandbox runs on says nothing of its memory (not a Windows PC, or an agent older than the reading).
450
+ "no-host",
451
+ // The kernel here takes no reclaim (no memory.reclaim, or a read-only cgroup).
452
+ "unsupported",
453
+ // This sandbox is short of memory itself right now: reclaiming would stall its own work.
454
+ "stalling",
455
+ // This sandbox holds too little to give any back.
456
+ "small",
457
+ ]);
458
+ export type MemoryReclaimRefusal = z.infer<typeof MemoryReclaimRefusalSchema>;
459
+
460
+ export const MemoryReclaimResultSchema = z.discriminatedUnion("outcome", [
461
+ z.object({
462
+ outcome: z.literal("reclaimed"),
463
+ // What this sandbox let go inside the VM, in bytes.
464
+ givenBytes: z.number().int().nonnegative(),
465
+ // The computer, and Windows' Available memory just before and a few seconds after; `afterBytes` is absent when
466
+ // the computer stopped answering in between.
467
+ host: z.object({
468
+ name: z.string().min(1),
469
+ beforeBytes: z.number().int().nonnegative(),
470
+ afterBytes: z.number().int().nonnegative().optional(),
471
+ }),
472
+ }),
473
+ z.object({ outcome: z.literal("refused"), why: MemoryReclaimRefusalSchema }),
474
+ ]);
475
+ export type MemoryReclaimResult = z.infer<typeof MemoryReclaimResultSchema>;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+
3
+ // What a need asks for (needs.ts), one word per kind; each kind's subject and ask live in needs.ts, and the deploy
4
+ // need's in stack-grants.ts. Its own module so the list can grow without pushing needs.ts past its size.
5
+
6
+ const FIRST_KINDS = ["capability", "secret", "grant", "release", "environment", "automation", "instruction", "host-power"] as const;
7
+ export const NEED_KINDS = [...FIRST_KINDS, "claim", "route", "redirect", "deploy", "wsl-memory"] as const;
8
+ export const NeedKindSchema = z
9
+ .enum(NEED_KINDS)
10
+ .describe(
11
+ "What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended, a standing rule written into an AGENTS.md, power settings changed on the computer this sandbox runs on, a project claimed for this sandbox so the owner's other sandboxes report its problems here, a person's leave for this sandbox to act as them in another, a person's message sent on to the sandbox it was meant for, a managed stack let receive the secrets its manifest reads, or a smaller WSL VM for the PC this sandbox runs on.",
12
+ );
13
+ export type NeedKind = z.infer<typeof NeedKindSchema>;
@@ -1,20 +1,21 @@
1
1
  import { z } from "zod";
2
2
  import { KeyringShareModeSchema } from "./keyring.js";
3
- import { AutomationSchema } from "./automations.js";
3
+ import { NeedKindSchema } from "./need-kinds.js";
4
+ import { AutomationSchema, WatchKindSchema } from "./automations.js";
5
+ import { DeployNeedAskSchema, DeployNeedSchema } from "./stack-grants.js";
6
+ import { HostPowerFindingSchema } from "./host-power.js";
7
+ import { WslMemoryNeedSchema } from "./wsl-memory.js";
4
8
  import { entryId } from "./internal.js";
9
+ import { PASS_SCOPES } from "../protocol/doors/pass-scopes.js";
10
+ import { SECRET_HOSTS_MAX } from "../policy/secret-hosts.js";
11
+ import { SecretHostSchema } from "./secrets.js";
5
12
 
6
13
  // A need: something an agent cannot finish its task without that only a person can provide (a connection, a secret's
7
14
  // value, wider reach, a tool in the image). Unlike a parked card it outlives the turn that raised it: the sandbox keeps
8
15
  // it until someone answers, draws it wherever it is waiting, and wakes the conversation when it is met
9
16
  // (docs/architecture/needs.md). Every word on a need is the daemon's except `why`, the agent's own case.
10
17
 
11
- export const NEED_KINDS = ["capability", "secret", "grant", "release", "environment", "automation", "instruction"] as const;
12
- export const NeedKindSchema = z
13
- .enum(NEED_KINDS)
14
- .describe(
15
- "What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended, or a standing rule written into an AGENTS.md.",
16
- );
17
- export type NeedKind = z.infer<typeof NeedKindSchema>;
18
+ export { NEED_KINDS, type NeedKind, NeedKindSchema } from "./need-kinds.js";
18
19
 
19
20
  // `working` is a yes still being carried out: a connection whose form is open, an overlay approved but not yet built.
20
21
  export const NeedStatusSchema = z
@@ -71,6 +72,8 @@ export const SECRET_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/;
71
72
  // Group 1 is the name in both forms, so every reader that only needs the name reads both alike.
72
73
  export const SECRET_REFERENCE = /\{\{secret:([A-Za-z0-9_./-]+)(?:\|(file))?\}\}/;
73
74
 
75
+ // A secret's host guard list as a card starts it (needs/kinds/secret-need.ts in the sandbox).
76
+ const SecretHostsSchema = z.array(SecretHostSchema).max(SECRET_HOSTS_MAX);
74
77
  export const SecretNeedSchema = z.object({
75
78
  kind: z.literal("secret"),
76
79
  name: z.string().regex(SECRET_NAME).describe("The name it is stored under, and what `{{secret:NAME}}` will resolve."),
@@ -87,6 +90,12 @@ export const SecretNeedSchema = z.object({
87
90
  .boolean()
88
91
  .optional()
89
92
  .describe("A value with lines (a key file, a whole .env): the card takes it in a box with lines and keeps it exactly as pasted."),
93
+ // The agent's proposal: what a person keeps on the card starts the secret guarded, rather than off until someone acts.
94
+ hosts: SecretHostsSchema.min(1)
95
+ .optional()
96
+ .describe(
97
+ "Where it will be sent, as the agent proposes it. The card shows each host for the person to keep or drop, and the secret's host guard starts on with the ones they keep: it goes unasked only there, and anywhere else asks first.",
98
+ ),
90
99
  });
91
100
  export type SecretNeed = z.infer<typeof SecretNeedSchema>;
92
101
 
@@ -173,6 +182,9 @@ export const AutomationNeedSchema = z.object({
173
182
  automation: AutomationSchema.describe("The automation as it would be saved, switched on, the moment a person approves it."),
174
183
  replaces: z.boolean().optional().describe("An automation of this id already exists, and approving replaces it."),
175
184
  firstCheck: AutomationFirstCheckSchema.optional(),
185
+ // (2026-11-26) The declaration of the kind its source names, when an extension declares it, so the card says what the
186
+ // watch looks at in that kind's own words. Absent for a page, a guard, and from a daemon before contributed kinds.
187
+ watchKind: WatchKindSchema.optional(),
176
188
  });
177
189
  export type AutomationNeed = z.infer<typeof AutomationNeedSchema>;
178
190
 
@@ -192,6 +204,62 @@ export const InstructionNeedSchema = z.object({
192
204
  });
193
205
  export type InstructionNeed = z.infer<typeof InstructionNeedSchema>;
194
206
 
207
+ // The computer this sandbox runs on would sleep through work just booked on it (2026-11-22, host-power.ts). Raised by the
208
+ // daemon itself in the booking conversation; a yes runs `power-stay-on` and the chosen answer to a Windows Update restart
209
+ // (`remedy`). Told to nobody: a woken turn would run the booked work early.
210
+ export const HostPowerNeedSchema = z.object({
211
+ kind: z.literal("host-power"),
212
+ device: z.string().min(1).describe("The connected computer this sandbox runs on, by its device id."),
213
+ findings: z.array(HostPowerFindingSchema).describe("What its OS would do to the work, as read when the card was raised."),
214
+ dueAt: z.number().optional().describe("When the booked work that raised it is due, in milliseconds."),
215
+ utcOffsetMinutes: z.number().int().optional().describe("The computer's local time minus UTC when read: what places its findings' local hours on another clock."),
216
+ });
217
+ export type HostPowerNeed = z.infer<typeof HostPowerNeedSchema>;
218
+
219
+ // A project claimed for this sandbox (docs/architecture/account-routing.md): the owner's other sandboxes then report the
220
+ // problems they see in it here (`projects report`), into this sandbox's issues inbox. Only the owner, signed in to the
221
+ // platform, writes a claim, so the agent proposes it and the owner's press makes it; one sandbox per project on an
222
+ // account, so a claim another sandbox held moves here.
223
+ export const ClaimNeedSchema = z.object({
224
+ kind: z.literal("claim"),
225
+ project: z.string().min(1).describe("The project, as its repository: github.com/owner/repo."),
226
+ heldBy: z.string().optional().describe("The sandbox on the owner's account that claims it now, which a yes moves it from."),
227
+ });
228
+ export type ClaimNeed = z.infer<typeof ClaimNeedSchema>;
229
+
230
+ // A person's leave for this sandbox to route as them into another one (docs/architecture/account-routing.md, 2026-11-24):
231
+ // every scope but a report needs the pairing secret that person minted at the target and handed here, so the platform's
232
+ // pass alone opens nothing but an inbox. Only that person can press it: their editor, signed in to both sandboxes, mints
233
+ // the secret over there and stores it here. Met once this sandbox holds a secret for (target, person).
234
+ export const RouteNeedSchema = z.object({
235
+ kind: z.literal("route"),
236
+ target: z.string().min(1).max(40).describe("The target sandbox's tunnel id."),
237
+ targetName: z.string().max(120).describe("Its name, as the platform gave it."),
238
+ person: z.string().min(1).max(254).describe("The one person this sandbox would route as, and the only one who can allow it."),
239
+ scopes: z.array(z.enum(PASS_SCOPES)).min(1).describe("What the routing is for: drop, read or task."),
240
+ address: z.string().max(400).optional().describe("The target's address, as the platform gave it, which the card reaches it at."),
241
+ from: z.string().max(40).optional().describe("This sandbox's own tunnel id, which the target keys the pairing on."),
242
+ });
243
+ export type RouteNeed = z.infer<typeof RouteNeedSchema>;
244
+
245
+ // A person's message that reached the wrong sandbox, offered to the one it was meant for (account-routing.md, 2026-11-25).
246
+ // The words are the daemon's copy of what the person opened a turn with, never the agent's retelling, and only that
247
+ // person can press it: their editor, signed in to both, opens a chat in the target and sends the words there as they
248
+ // would by hand. No pass and no pairing travel. The platform only found the target among the sandboxes they are in.
249
+ export const REDIRECT_WORDS_MAX = 20_000;
250
+ export const RedirectNeedSchema = z.object({
251
+ kind: z.literal("redirect"),
252
+ target: z.string().min(1).max(40).describe("The target sandbox's tunnel id."),
253
+ targetName: z.string().max(120).describe("Its name, as the platform gave it."),
254
+ address: z.string().max(400).optional().describe("The target's address, as the platform gave it, which the card finds it by."),
255
+ person: z.string().min(1).max(254).describe("Whose words they are, and the only one who can send them on."),
256
+ words: z.string().max(REDIRECT_WORDS_MAX).describe("The message, exactly as the person sent it here."),
257
+ clipped: z.boolean().optional().describe("The message was longer than the card carries, so only its head goes."),
258
+ attachments: z.number().int().min(0).optional().describe("How many files went with it, which stay here."),
259
+ project: z.string().max(400).optional().describe("The project the target was found by, when it was found by its claim."),
260
+ });
261
+ export type RedirectNeed = z.infer<typeof RedirectNeedSchema>;
262
+
195
263
  export const NeedSubjectSchema = z
196
264
  .discriminatedUnion("kind", [
197
265
  CapabilityNeedSchema,
@@ -201,12 +269,17 @@ export const NeedSubjectSchema = z
201
269
  EnvironmentNeedSchema,
202
270
  AutomationNeedSchema,
203
271
  InstructionNeedSchema,
272
+ HostPowerNeedSchema,
273
+ WslMemoryNeedSchema,
274
+ ClaimNeedSchema,
275
+ RouteNeedSchema,
276
+ RedirectNeedSchema,
277
+ DeployNeedSchema,
204
278
  ])
205
279
  .describe("What exactly is asked for.");
206
280
  export type NeedSubject = z.infer<typeof NeedSubjectSchema>;
207
281
 
208
- // How the agent learned the outcome: the call it raised the need with, words into its live turn, a turn of its own, or
209
- // queued behind what the conversation was doing.
282
+ // How the agent learned the outcome: the call it raised the need with, words into its live turn, its own turn, or queued.
210
283
  export const NeedToldSchema = z.enum(["call", "turn", "queued"]);
211
284
  export type NeedTold = z.infer<typeof NeedToldSchema>;
212
285
 
@@ -264,6 +337,26 @@ export const NeedAskSchema = z.discriminatedUnion("kind", [
264
337
  file: z.string().min(1).max(400).describe("The AGENTS.md, relative to the workspace root."),
265
338
  text: z.string().trim().min(1).max(INSTRUCTION_MAX).describe("The rule, as it should read in the file."),
266
339
  }),
340
+ // The project as the agent has it: github.com/owner/repo or any remote URL of it; the daemon normalises it.
341
+ z.object({ kind: z.literal("claim"), project: z.string().trim().min(1).max(400).describe("The project's repository, or any remote URL of it.") }),
342
+ // The target as the agent has it (its name or id); the person is the one the raising conversation acts for, never named here.
343
+ z.object({
344
+ kind: z.literal("route"),
345
+ target: z.string().trim().min(1).max(120).describe("The sandbox to route into, by its name or id."),
346
+ scopes: z
347
+ .array(z.enum(PASS_SCOPES))
348
+ .min(1)
349
+ .optional()
350
+ .describe("What it is for: drop, read or task (all three when left out)."),
351
+ }),
352
+ // Where the person's message belongs, as the agent has it: a sandbox by name or id, or a project whose claim finds it.
353
+ // The words and the person are the daemon's, never named here.
354
+ z.object({
355
+ kind: z.literal("redirect"),
356
+ target: z.string().trim().min(1).max(120).optional().describe("The sandbox the message belongs in, by its name or id."),
357
+ project: z.string().trim().min(1).max(400).optional().describe("Or the project it is about: the sandbox claiming it is the target."),
358
+ }),
359
+ DeployNeedAskSchema,
267
360
  ]);
268
361
  export type NeedAsk = z.infer<typeof NeedAskSchema>;
269
362
 
@@ -304,7 +397,8 @@ export const NeedAnswerSchema = z.discriminatedUnion("kind", [
304
397
  // 2026-11-18: was `{ scope }`, a yes that lifted what the role withheld; now the role the conversation switches to.
305
398
  z.object({ kind: z.literal("grant"), role: entryId.describe("Which of the need's roles the conversation switches to.") }),
306
399
  z.object({ kind: z.literal("release") }),
307
- z.object({ kind: z.literal("approve") }),
400
+ // (2026-11-27) `remedy`: a host-power card's answer to a Windows Update restart (POWER_REMEDY); absent is the pause.
401
+ z.object({ kind: z.literal("approve"), remedy: z.enum(["update-pause", "before-sign-in"]).optional() }),
308
402
  ]);
309
403
  export type NeedAnswer = z.infer<typeof NeedAnswerSchema>;
310
404
 
@@ -329,6 +423,9 @@ export const NeedSecretInputSchema = NeedIdParamSchema.extend({
329
423
  })
330
424
  .optional()
331
425
  .describe("Keep it in the keyring on one of your computers instead of in the sandbox."),
426
+ hosts: SecretHostsSchema.optional().describe(
427
+ "The hosts you let it go to unasked, of those the agent proposed: its host guard starts on with them. Absent or empty leaves its host guard as it is, and a guard already on is never widened from here. Ignored with keepOn, whose keyring keeps its own list.",
428
+ ),
332
429
  });
333
430
  export const NeedsQuerySchema = z.object({
334
431
  conversationId: z.string().optional().describe("One conversation's needs. Absent is every conversation's."),
@@ -399,6 +496,12 @@ export const ConversationGrantSchema = z.object({
399
496
  .boolean()
400
497
  .default(false)
401
498
  .describe("Whether every request an allow-once could settle is allowed without asking, until somebody takes it back."),
499
+ // Put on from the conversation's card, read live by the card registry (schemas/auto-approve.ts): wider than
500
+ // `everything`, it answers the owner's hard rules too, and the conversations this one starts follow it.
501
+ autoApprove: z
502
+ .boolean()
503
+ .default(false)
504
+ .describe("Whether every permission it or a subagent it starts asks for is approved without asking, the owner's hard rules included."),
402
505
  // Answered on a credential gateway card, read live by the gateway as each request its rules would ask about arrives.
403
506
  rules: z
404
507
  .array(BrokerRulePassSchema)
@@ -450,6 +553,7 @@ export const StandingGrantsSchema = z.object({
450
553
  installs: z.boolean().default(false).describe("Whether its own dependency installs run without asking."),
451
554
  secrets: z.array(z.string()).default([]).describe("Secrets it may send past their host guard without asking."),
452
555
  everything: z.boolean().default(false).describe("Whether every request an allow-once could settle is allowed without asking."),
556
+ autoApprove: z.boolean().default(false).describe("Whether it and its subagents are approved without asking, the owner's hard rules included."),
453
557
  rules: z.array(BrokerRulePassSchema).default([]).describe("Credential gateway rules that no longer ask before its requests."),
454
558
  by: z.string().optional().describe("Who last allowed one of those."),
455
559
  updatedAt: z.number().optional().describe("When one of those last changed, in milliseconds."),
@@ -472,11 +576,11 @@ export type StandingGrants = z.infer<typeof StandingGrantsSchema>;
472
576
  export const ConversationGrantRevokeSchema = z.object({
473
577
  conversationId: z.string(),
474
578
  kind: z
475
- .enum(["release", "install", "secret", "everything", "rule"])
579
+ .enum(["release", "install", "secret", "everything", "auto-approve", "rule"])
476
580
  .describe(
477
- "Which kind of yes: a credential's release, letting its installs run unasked, a secret sent past its host guard, allowing everything, or a credential gateway rule that stopped asking.",
581
+ "Which kind of yes: a credential's release, letting its installs run unasked, a secret sent past its host guard, allowing everything, its auto-approve mark, or a credential gateway rule that stopped asking.",
478
582
  ),
479
- what: z.string().describe("The released credential or secret it named, or the rule's identity; empty for installs and everything."),
583
+ what: z.string().describe("The released credential or secret it named, or the rule's identity; empty for installs, everything and auto-approve."),
480
584
  capability: z.string().optional().describe("For a rule, the capability whose rule it is; a rule's identity alone does not say."),
481
585
  });
482
586
  export type ConversationGrantRevoke = z.infer<typeof ConversationGrantRevokeSchema>;
@@ -102,11 +102,37 @@ export type SessionsPlacement = z.infer<typeof SessionsPlacementSchema>;
102
102
  export const MachineStandingSchema = z.enum(["calm", "busy", "full"]);
103
103
  export type MachineStanding = z.infer<typeof MachineStandingSchema>;
104
104
 
105
- // What made a machine busy or full: memory short of what an agent needs, memory stalling, CPUs saturated, or as many
106
- // agents running as it has slots for.
107
- export const MachineStrainSchema = z.enum(["memory", "memory-stall", "cpu", "agents"]);
105
+ // What made a machine busy or full: memory short of what an agent needs, memory stalling, CPUs saturated, as many
106
+ // agents running as it has slots for, or its disk (the Windows drive under its engine, where that is tighter) too short
107
+ // for another agent's checkout and build.
108
+ export const MachineStrainSchema = z.enum(["memory", "memory-stall", "cpu", "agents", "disk"]);
108
109
  export type MachineStrain = z.infer<typeof MachineStrainSchema>;
109
110
 
111
+ /* THE COMPUTER UNDER A MACHINE, IN FIGURES ITS OWNER CAN CHECK (2026-11-26). A machine's free memory is the tighter of its
112
+ own budget and its host's room above the line under which the host counts as short (machine-facts.ts), so "1.9 GB
113
+ free" on rog was Windows' Available less a 3.1 GB line nobody could see, while the sandbox itself had 10.5 GB and the
114
+ WSL VM held 16.6 GB of Windows' memory. Said beside the verdict so the composer can name what is short: Windows' own
115
+ figures as Task Manager shows them, and the VM's share and its unused part where that computer's agent reads them.
116
+ Absent where the host says nothing of its memory (a Linux host, an agent older than the reading). */
117
+ export const MachineHostSchema = z.object({
118
+ // The computer, by the word the owner knows it by (its device card).
119
+ name: z.string().min(1),
120
+ // What Windows could hand out now (its Available memory, standby cache included), and how much it has.
121
+ availableMb: z.number().int().nonnegative(),
122
+ totalMb: z.number().int().positive(),
123
+ // The line under which it counts as short (hosts.ts hostMemoryLowBytes): never counted as room for new work.
124
+ reserveMb: z.number().int().nonnegative(),
125
+ // The WSL VM's footprint in Windows' memory, and the part of it free inside the VM but too fragmented to hand back
126
+ // (hosts.ts GuestFreeMemorySchema `strandedBytes`); each absent where that computer's agent did not read it.
127
+ vmMb: z.number().int().nonnegative().optional(),
128
+ vmUnusedMb: z.number().int().nonnegative().optional(),
129
+ // What the machine's own budget has free, before its host's room is folded in; absent where nothing measures it.
130
+ ownFreeMb: z.number().int().nonnegative().optional(),
131
+ // Whether the host's room, not the machine's own budget, is what its free memory came to: the host is what is short.
132
+ binding: z.boolean(),
133
+ });
134
+ export type MachineHost = z.infer<typeof MachineHostSchema>;
135
+
110
136
  export const MachineLoadSchema = z.object({
111
137
  standing: MachineStandingSchema,
112
138
  // Why it is not calm, strongest first; empty when it is.
@@ -117,12 +143,17 @@ export const MachineLoadSchema = z.object({
117
143
  // What its resource budget has free, and the limit that is measured against; absent where nothing measures it.
118
144
  memoryFreeMb: z.number().int().nonnegative().optional(),
119
145
  memoryLimitMb: z.number().int().positive().optional(),
146
+ // What its workspace's disk has free, by the tighter of the volume and the host drive under it.
147
+ diskFreeMb: z.number().int().nonnegative().optional(),
120
148
  // Conversations running a turn there now, and how many it holds at once (the fan-out scheduler's own slots).
121
149
  agents: z.number().int().nonnegative(),
122
150
  slots: z.number().int().positive(),
123
151
  // The share of the machine still free by its tightest measure (slots, memory, CPU), so two machines of different
124
152
  // sizes compare: 0 is none, 1 is idle.
125
153
  headroom: z.number().min(0).max(1),
154
+ // (2026-11-26) The computer it runs on, as that computer's agent last said (MachineHostSchema); absent where it says
155
+ // nothing of its memory.
156
+ host: MachineHostSchema.optional(),
126
157
  });
127
158
  export type MachineLoad = z.infer<typeof MachineLoadSchema>;
128
159
 
@@ -160,6 +191,9 @@ export const FleetAdviceSchema = z.object({
160
191
  machines: z.array(FleetMachineSchema),
161
192
  // Where a new session should start instead of here: absent while here is calm, or when no machine is better off.
162
193
  suggestion: z.object({ runner: z.string().min(1), name: z.string().min(1) }).optional(),
194
+ // (2026-11-26) Whether this sandbox could give memory back to the computer it runs on now (POST /system/memory/reclaim):
195
+ // that computer says what memory it has, and the kernel here takes a reclaim. Absent from a daemon older than it.
196
+ reclaim: z.boolean().optional(),
163
197
  });
164
198
  export type FleetAdvice = z.infer<typeof FleetAdviceSchema>;
165
199
 
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+
3
+ // POST /capabilities/{id}/outward-action: an extension's backend, about to carry out an outward action with one of its
4
+ // cards' credentials, asks the owner's action rules for the verdict. The daemon decides, records and, on a hold, drafts
5
+ // the approvals-queue item the extension carries out once a person says yes; the extension decides nothing of the rule.
6
+
7
+ // The parts every call about one action carries, for its verdict and for its outcome alike.
8
+ const OutwardActionCallSchema = z.object({
9
+ id: z.string().describe("The card whose credential it would use. Only a card the calling extension contributes."),
10
+ action: z
11
+ .string()
12
+ .min(1)
13
+ .max(100)
14
+ .describe("The action below the card's kind, as the card's manifest declares it (`message.send`): the rules' key is `<kind>.<action>`."),
15
+ conversationId: z.string().max(200).optional().describe("The conversation the action is for, as the call that asked for it named it. Absent for an approved one."),
16
+ endpoint: z.string().max(500).optional().describe("Where it goes below the service (`/me/sendMail`), for its Activity row. Never a credential."),
17
+ channel: z.string().max(500).optional().describe("Who or where it goes to, for its Activity row."),
18
+ content: z.string().max(256 * 1024).optional().describe("What it says, for its Activity row."),
19
+ });
20
+ export const OutwardActionAskSchema = OutwardActionCallSchema.extend({
21
+ hold: z
22
+ .object({
23
+ summary: z.string().min(1).max(200).describe("The approval's headline."),
24
+ details: z.string().max(64 * 1024).describe("Everything the person should read before saying yes."),
25
+ digest: z
26
+ .string()
27
+ .regex(/^[0-9a-f]{64}$/)
28
+ .describe("The SHA-256 of exactly what the extension will carry out, which it recomputes before acting."),
29
+ })
30
+ .optional()
31
+ .describe("What to put before the owner when the rules hold it. Absent, a hold is only answered, never drafted (an approved action asking again)."),
32
+ });
33
+ export const OutwardActionVerdictSchema = z.discriminatedUnion("verdict", [
34
+ z.object({ verdict: z.literal("allow").describe("Go ahead, then report how it went.") }),
35
+ z.object({ verdict: z.literal("deny"), reason: z.string().describe("The rule's reason, to say to whoever asked.") }),
36
+ z.object({
37
+ verdict: z.literal("hold"),
38
+ reason: z.string().describe("Why it waits."),
39
+ approvalId: z.string().optional().describe("The approvals-queue item drafted for it, when the ask carried one."),
40
+ }),
41
+ ]);
42
+ export type OutwardActionVerdict = z.infer<typeof OutwardActionVerdictSchema>;
43
+ // POST /capabilities/{id}/outward-action/outcome: how an allowed or approved action went, for its Activity row.
44
+ export const OutwardActionOutcomeSchema = OutwardActionCallSchema.extend({
45
+ outcome: z.enum(["ok", "error"]).describe("Whether it happened."),
46
+ error: z.string().max(2000).optional().describe("What went wrong, in the service's own words."),
47
+ });
@@ -79,6 +79,11 @@ export const PortsListSchema = z.object({
79
79
  });
80
80
  export type PortsList = z.infer<typeof PortsListSchema>;
81
81
  export const PortParamSchema = z.object({ port: z.number().int().min(1).max(65535).describe("Which port.") });
82
+ // (2026-11-23) A port on one of this sandbox's runners, for a conversation that runs there: previewed through the
83
+ // runner's uplink at an address of this sandbox's own.
84
+ export const PortForwardInputSchema = PortParamSchema.extend({
85
+ runner: z.string().min(1).optional().describe("The runner whose own port this is. Absent means a port of this sandbox."),
86
+ });
82
87
  export const PortForwardResultSchema = z.object({
83
88
  previewUrl: z
84
89
  .string()
@@ -264,6 +264,7 @@ export const AgentReplySchema = z.discriminatedUnion("kind", [
264
264
  "Once allows this call alone; always allows what the request's always-label names (a tool, a rule, a secret) for the rest of the conversation; everything allows this call and every later request in this conversation that an allow-once could settle, until it is taken back on Grants; no blocks it. A request that always asks (alwaysAsks) reads everything as once.",
265
265
  ),
266
266
  feedback: z.string().optional().describe("Why not, which goes back to the model as the reason."),
267
+ keep: z.literal(true).optional().describe("With always: the request's keepLabel answer rather than its alwaysLabel one."),
267
268
  // Whole, not a patch: effort or an account named for one model means nothing on another.
268
269
  child: ChildRunSchema.optional().describe(
269
270
  "For a request to start a subagent: what to start it on instead of what the agent asked for. It replaces the whole run (model, account, effort and the rest), not only the fields it names. Ignored with a no, and on any other request.",
@@ -63,6 +63,15 @@ export const ProviderRefusalSchema = z.object({
63
63
  .describe(
64
64
  "Set by a person rather than by a refused turn, for a plan nothing can read: believed for a day, or until unmarked or a turn on it is answered.",
65
65
  ),
66
+ // Heard from the platform rather than refused here (2026-11-24, docs/architecture/account-routing.md): another of the
67
+ // owner's sandboxes signed in to the same provider account was refused for a spent allowance. Judged as a limit
68
+ // refusal like any other, and settled the same way: a turn answered here proves the account has room again.
69
+ source: z
70
+ .enum(["another-sandbox"])
71
+ .optional()
72
+ .describe(
73
+ "Where the refusal was seen, when not here: `another-sandbox` for a spent allowance another of the owner's sandboxes on the same account reported. Absent for one this sandbox's own turn met.",
74
+ ),
66
75
  });
67
76
  export type ProviderRefusal = z.infer<typeof ProviderRefusalSchema>;
68
77
  // A routed account's per-model bench as the translator holds it: the provider's own refusal of that account on that
@@ -60,6 +60,9 @@ export const RemoteStatusSchema = z.object({
60
60
  allow: RemoteAccessAllowSchema,
61
61
  // Empty until remoted has run once since the device connected.
62
62
  monitors: z.array(RemoteAccessMonitorSchema),
63
+ // Why a computer that would show its screen here has none to show (no display and nothing to start a virtual desktop
64
+ // with, a Wayland session without PipeWire), in remoted's words naming what to install. Only while monitors is empty.
65
+ screenReason: z.string().optional(),
63
66
  // The environments a terminal can open in.
64
67
  environments: z.array(z.string()),
65
68
  terminals: z.array(RemoteTerminalSchema),
@@ -1,5 +1,6 @@
1
1
  import { STATE_DIR } from "@intentic/constants";
2
2
  import { z } from "zod";
3
+ import { CHECKOUT_HOOKS_FILE } from "./checkout-hooks.js";
3
4
  import { ArtifactNameSchema } from "./device-artifacts.js";
4
5
 
5
6
  // <repo>/.intentic/run.json declares what a repository can run, and where: in the sandbox, on the owner's own computers, or
@@ -21,7 +22,7 @@ export const HEAVY_CLASSES_FILE = `${STATE_DIR}/heavy.json`;
21
22
 
22
23
  // Project files under `.intentic/` live at each repository's root, including a project kept at the workspace root.
23
24
  // The root repo tracks them (VERSIONED_STATE_PATHS in state/workspace-state.ts), so an agent's edit lands like code.
24
- export const ROOT_PROJECT_PATHS: readonly string[] = [RUN_TARGETS_FILE, HEAVY_CLASSES_FILE];
25
+ export const ROOT_PROJECT_PATHS: readonly string[] = [RUN_TARGETS_FILE, HEAVY_CLASSES_FILE, CHECKOUT_HOOKS_FILE];
25
26
 
26
27
  const RepoPathSchema = z
27
28
  .string()
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+
3
+ // A PERSON'S LIVE VIEW OF A CONVERSATION THAT RUNS ON A RUNNER (2026-11-23), the editor's `runners.openView`. A runner is
4
+ // another machine's sandbox container; the editor only ever talks to this sandbox, whose netd carries the view's socket
5
+ // down the runner's uplink under `/system/runner-view/<runner>/…` once this daemon redeems the one-shot ticket the answer
6
+ // carries. Each dial asks again: a ticket opens one socket, for a few seconds.
7
+
8
+ export const RunnerViewKindSchema = z.enum(["terminal", "browser-view", "desktop-view"]);
9
+ export type RunnerViewKind = z.infer<typeof RunnerViewKindSchema>;
10
+
11
+ export const RunnerOpenViewInputSchema = z.object({
12
+ conversationId: z.string().min(1).describe("The conversation whose runner the view is of."),
13
+ kind: RunnerViewKindSchema.describe("A terminal, a browser window's picture, or the desktop's."),
14
+ session: z
15
+ .string()
16
+ .optional()
17
+ .describe("The terminal session, the browser window (the runner's own name for it), or the desktop window; absent for the whole desktop."),
18
+ });
19
+ export type RunnerOpenViewInput = z.infer<typeof RunnerOpenViewInputSchema>;
20
+
21
+ export const RunnerViewSchema = z.object({
22
+ runner: z.string().describe("The runner the view opens on."),
23
+ // `/system/runner-view/<runner>/system/<view>`, on this sandbox's own address.
24
+ path: z.string().describe("Where the socket opens on this sandbox's address."),
25
+ query: z.string().describe("The query the socket opens with, its ticket included; add the view's own parameters to it."),
26
+ });
27
+ export type RunnerView = z.infer<typeof RunnerViewSchema>;