@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
@@ -0,0 +1,161 @@
1
+ import { z } from "zod";
2
+ import { MemberTierSchema } from "./shared.js";
3
+
4
+ // ONE SANDBOX'S TIES TO EVERYTHING OUTSIDE IT, as the person reading may see them (GET /system/reach). The editor asks
5
+ // every sandbox an account reaches for this answer and joins them into the account's access map (Settings ▸ Access
6
+ // map, docs/architecture/accounts.md): the other sandboxes this one hands work to and takes work from, the computers
7
+ // and servers its agents reach, and whether it may create sandboxes on its owner's account. Each daemon answers for
8
+ // its own ties alone, from what it stores and enforces, so the platform never learns them.
9
+ //
10
+ // Nothing here is a credential: no token, no address path, no secret. What joins two answers is an id both sides hold:
11
+ // a sandbox's platform id (else its address's host name), a computer's machine id (else its host name), a server's
12
+ // host name. Open sets (a link's answer, a device's kind, the switches it has on) are strings rather than enums, so a
13
+ // value a newer daemon adds never fails an older editor's parse; the known values are named below.
14
+
15
+ /** What a link's far side answered the last time this sandbox asked it (`GET /link`). */
16
+ export const REACH_LINK_ANSWERS = ["answering", "silent", "revoked"] as const;
17
+ export type ReachLinkAnswer = (typeof REACH_LINK_ANSWERS)[number];
18
+
19
+ /** What kind of thing a device card connects. */
20
+ export const REACH_DEVICE_KINDS = ["computer", "phone", "browser"] as const;
21
+ export type ReachDeviceKind = (typeof REACH_DEVICE_KINDS)[number];
22
+
23
+ /**
24
+ * A device card's switches that let an agent or a person act on the machine, in the order they are said. A card's
25
+ * switch that is on and named here is listed in `grants`; `roots` and the rest are settings, not grants.
26
+ */
27
+ export const REACH_DEVICE_GRANTS = [
28
+ "shell",
29
+ "write",
30
+ "screen",
31
+ "control",
32
+ "sandboxes",
33
+ "destructive",
34
+ "admin",
35
+ "programs",
36
+ "remoteView",
37
+ "remoteControl",
38
+ "remoteTerminal",
39
+ ] as const;
40
+ export type ReachDeviceGrant = (typeof REACH_DEVICE_GRANTS)[number];
41
+
42
+ /** The grants that let whoever holds them act on the machine as themselves (run, change or drive it), not only look. */
43
+ export const REACH_DEVICE_ACTING_GRANTS: readonly ReachDeviceGrant[] = ["shell", "write", "control", "destructive", "programs", "remoteControl", "remoteTerminal", "admin"];
44
+
45
+ /** A link's terms as the taking sandbox sets them, in the words both ends of a tie read. */
46
+ export const ReachLinkTermsSchema = z.object({
47
+ tasks: z.boolean().describe("Its agents may hand that sandbox tasks."),
48
+ records: z.boolean().describe("They may read that sandbox's conversations and diagnostics."),
49
+ operate: z.boolean().describe("They may run commands and read and write files there, as its owner's terminal would."),
50
+ approve: z.boolean().describe("Each new task waits for that sandbox's owner to allow it."),
51
+ role: z.string().optional().describe("The name of the role its tasks wear there; absent, they wear none."),
52
+ });
53
+ export type ReachLinkTerms = z.infer<typeof ReachLinkTermsSchema>;
54
+
55
+ // How many other people here may use one card through their own conversations: the owner and everyone on the roster
56
+ // who runs agents here and whose own access reaches the card. Only for a reader who runs people and access.
57
+ const othersField = z
58
+ .number()
59
+ .int()
60
+ .nonnegative()
61
+ .optional()
62
+ .describe("How many other people here may have their own agents use it. Absent when the roster is not the reader's to read.");
63
+
64
+ // Whether the reader's own conversations here may use one card: they run agents here, and their access reaches it.
65
+ const yoursField = z.boolean().describe("Whether the reader's own conversations here may use it.");
66
+
67
+ /** A `link` card here: this sandbox's agents may hand work to that one, under that sandbox's terms. */
68
+ export const ReachLinkOutSchema = z.object({
69
+ card: z.string().describe("The card's id here: what this sandbox's agents hand work `to`."),
70
+ name: z.string().optional().describe("What the other sandbox is called, as pairing named it."),
71
+ sandboxId: z.string().optional().describe("The other sandbox's platform id, when pairing named it."),
72
+ host: z.string().describe("The host name of the other sandbox's address, the join key when no id was named."),
73
+ answer: z.string().describe("What it answered when last asked: answering, silent (off or unreachable) or revoked."),
74
+ terms: ReachLinkTermsSchema.optional().describe("Its terms as the other sandbox last said them; absent while it has not answered."),
75
+ yours: yoursField,
76
+ others: othersField,
77
+ });
78
+ export type ReachLinkOut = z.infer<typeof ReachLinkOutSchema>;
79
+
80
+ /** An inbound link here: that sandbox's agents may hand work to this one, under the terms this sandbox's owner set. */
81
+ export const ReachLinkInSchema = z.object({
82
+ id: z.string(),
83
+ label: z.string().describe("What the asking sandbox is called here."),
84
+ sandboxId: z.string().optional().describe("The asking sandbox's platform id, when pairing named it."),
85
+ host: z.string().optional().describe("The host name of the asking sandbox's address, when pairing named it."),
86
+ terms: ReachLinkTermsSchema.extend({
87
+ runAs: z.string().optional().describe("The name of the service its tasks act as; absent, they act for this sandbox's owner."),
88
+ }),
89
+ lastUsedAt: z.number().optional().describe("When it was last used, epoch milliseconds; absent means never."),
90
+ waiting: z.number().int().nonnegative().describe("Tasks it handed over that wait for this sandbox's owner."),
91
+ });
92
+ export type ReachLinkIn = z.infer<typeof ReachLinkInSchema>;
93
+
94
+ /** A computer, phone or browser this sandbox's agents reach through a card of its own. */
95
+ export const ReachDeviceSchema = z.object({
96
+ card: z.string(),
97
+ kind: z.string().describe("computer, phone or browser."),
98
+ label: z.string().describe("What the owner calls it."),
99
+ machineId: z.string().optional().describe("The computer's own stable id, shared by every environment on it: the join key across sandboxes."),
100
+ hostname: z.string().optional().describe("Its OS host name, the join key when it has said no machine id."),
101
+ platform: z.string().optional().describe("windows, macos, linux, android, ios."),
102
+ online: z.boolean().optional().describe("Connected now; absent where nothing could say."),
103
+ grants: z.array(z.string()).describe("The card's switches that are on (REACH_DEVICE_GRANTS)."),
104
+ yours: yoursField,
105
+ others: othersField,
106
+ });
107
+ export type ReachDevice = z.infer<typeof ReachDeviceSchema>;
108
+
109
+ /** A server this sandbox's agents sign in to over SSH. */
110
+ export const ReachServerSchema = z.object({
111
+ card: z.string(),
112
+ host: z.string().describe("The host it dials, lowercased: the join key across sandboxes."),
113
+ user: z.string().optional(),
114
+ admin: z.boolean().describe("The card holds an admin password its agents may type to sudo or su."),
115
+ yours: yoursField,
116
+ others: othersField,
117
+ });
118
+ export type ReachServer = z.infer<typeof ReachServerSchema>;
119
+
120
+ export const SandboxReachSchema = z.object({
121
+ self: z.object({
122
+ sandboxId: z.string().optional().describe("This sandbox's platform id, as its last announce was answered; absent before one."),
123
+ runsOn: z
124
+ .object({ host: z.string().optional(), os: z.string().optional() })
125
+ .optional()
126
+ .describe("The machine this copy runs on and its side, as its host named them. Only for the owner and Full access."),
127
+ org: z
128
+ .object({ id: z.string(), name: z.string() })
129
+ .optional()
130
+ .describe("The organisation whose policy this daemon enforces here; absent for a personal sandbox."),
131
+ }),
132
+ reader: z.object({
133
+ tier: MemberTierSchema.describe("The reader's tier here, as this daemon enforces it now."),
134
+ agents: z.boolean().describe("Whether the reader's conversations here run agents."),
135
+ }),
136
+ linksOut: z.array(ReachLinkOutSchema),
137
+ linksIn: z.array(ReachLinkInSchema).optional().describe("Absent below Full access: minting and reading inbound links is theirs."),
138
+ devices: z.array(ReachDeviceSchema),
139
+ servers: z.array(ReachServerSchema),
140
+ fleet: z
141
+ .object({ yours: yoursField, others: othersField })
142
+ .optional()
143
+ .describe("This sandbox holds a fleet card: its agents may create and manage sandboxes on its owner's account."),
144
+ people: z
145
+ .number()
146
+ .int()
147
+ .nonnegative()
148
+ .optional()
149
+ .describe("How many other people may sign in here, the owner included when the reader is not them. Absent when the roster is not the reader's to read."),
150
+ readAt: z.number().describe("When this answer was put together, epoch milliseconds."),
151
+ });
152
+ export type SandboxReach = z.infer<typeof SandboxReachSchema>;
153
+
154
+ /** The host name of an address, lowercased, with no scheme, port, path or credentials: the join key two answers share. */
155
+ export const reachHostOf = (address: string): string =>
156
+ address
157
+ .trim()
158
+ .toLowerCase()
159
+ .replace(/^[a-z][a-z0-9+.-]*:\/\//, "")
160
+ .replace(/^[^@/]*@/, "")
161
+ .replace(/[/:?#].*$/, "");
@@ -22,6 +22,16 @@ export const SecretKeysSchema = z.object({
22
22
  export const SecretKeyParamSchema = z.object({ key: secretKey.describe("Which secret, by name.") });
23
23
  export const SecretRevealSchema = z.object({ value: z.string().describe("The value itself. The only place in this API one is ever returned.") });
24
24
 
25
+ // (2026-11-25) A value the agent already holds the way to, moved into the store without passing through the chat or its
26
+ // own context: `secrets import NAME --stdin`, a value piped from where it lives now (another orchestrator's variables,
27
+ // a file on a server). A new name only, never one anything here holds: the agent token can add a credential and never
28
+ // replace one, so a value the owner stored cannot be swapped under the references that read it.
29
+ export const SECRET_IMPORT_MAX = 64_000;
30
+ export const SecretImportSchema = z.object({
31
+ key: secretKey.describe("The name to store it under: one nothing here holds yet."),
32
+ value: z.string().min(1).max(SECRET_IMPORT_MAX).describe("The value, as read from the command's input. Stored, never echoed or logged."),
33
+ });
34
+
25
35
  // A secret nobody has to find or paste: a session key, a webhook signing secret, a database password the task sets up
26
36
  // itself. The sandbox makes it and keeps it; the caller gets its reference and length, never the value.
27
37
  // The shortest stored value the sandbox masks wherever it appears; a shorter one masks only in a secret-like context. The
@@ -72,9 +82,9 @@ export const CredentialGateKindSchema = z
72
82
  export type CredentialGateKind = z.infer<typeof CredentialGateKindSchema>;
73
83
 
74
84
  export const CredentialLaneSchema = z
75
- .enum(["shell", "code", "browser", "session", "otp", "gateway", "ssh", "device", "desktop"])
85
+ .enum(["shell", "code", "browser", "session", "otp", "gateway", "ssh", "device", "desktop", "mcp"])
76
86
  .describe(
77
- "What the credential was about to be used for: a shell command, a script, typing into a page, mounting a connected account, one one-time code, a request the credential gateway attaches it to, a signature the sandbox's ssh agent makes with a held key, typing into a window or phone app on one of the owner's computers, or typing into a window on the sandbox's own desktop.",
87
+ "What the credential was about to be used for: a shell command, a script, typing into a page, mounting a connected account, one one-time code, a request the credential gateway attaches it to, a signature the sandbox's ssh agent makes with a held key, typing into a window or phone app on one of the owner's computers, typing into a window on the sandbox's own desktop, or an argument of a tool call to an MCP server the owner connected.",
78
88
  );
79
89
  export type CredentialLane = z.infer<typeof CredentialLaneSchema>;
80
90
 
@@ -319,14 +329,14 @@ export const SecretInventoryEntrySchema = z.object({
319
329
  .object({
320
330
  at: z.number().describe("When, in milliseconds."),
321
331
  lane: z
322
- .enum(["shell", "code", "browser", "gateway", "ssh", "device", "desktop"])
332
+ .enum(["shell", "code", "browser", "gateway", "ssh", "device", "desktop", "mcp", "deploy"])
323
333
  .describe(
324
- "How it was used: a command, a script, typed into a page, attached by the credential gateway to a request the agent sent, a key the sandbox's ssh agent signed with for the agent, typed into a window or app on one of the owner's computers, or typed into a window on the sandbox's desktop.",
334
+ "How it was used: a command, a script, typed into a page, attached by the credential gateway to a request the agent sent, a key the sandbox's ssh agent signed with for the agent, typed into a window or app on one of the owner's computers, typed into a window on the sandbox's desktop, sent in a tool call to an MCP server the owner connected, or rendered by the sandbox into a managed stack's .env or registry login as it deployed it.",
325
335
  ),
326
336
  detail: z
327
337
  .string()
328
338
  .optional()
329
- .describe("Where it went: the start of the command or script, or the site. Names and destinations only, never values."),
339
+ .describe("Where it went: the start of the command or script, the site, the MCP tool and its server's host, or the stack and the computer it was deployed to. Names and destinations only, never values."),
330
340
  approvedBy: z.string().optional().describe("Who released it for that use, when it is gated. Absent when nothing had to be approved."),
331
341
  })
332
342
  .optional()
@@ -376,3 +386,11 @@ export const SecretInventorySchema = z.object({
376
386
  .array(SecretInventoryEntrySchema)
377
387
  .describe("One entry per secret this sandbox knows about, from every place they live. No values, ever."),
378
388
  });
389
+
390
+ // (2026-11-25) A keyed mark of each named value: an HMAC under a key this sandbox keeps in its auth root, never a plain
391
+ // hash, so a mark says nothing about the value to anyone without that key. A managed deploy answers the marks of the
392
+ // values it filled (device-stacks.ts); comparing them later with these tells the Deployments extension that a stack's
393
+ // secret changed in the store, without it ever holding one. A name nothing holds answers no mark.
394
+ export const SecretMarksRequestSchema = z.object({ names: z.array(secretKey).min(1).max(200) });
395
+ export const SecretMarksResponseSchema = z.object({ marks: z.record(z.string(), z.string()) });
396
+ export type SecretMarksResponse = z.infer<typeof SecretMarksResponseSchema>;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { at, drop, dropAll, fold, isJsonObject, type JsonObject, mapValue, rename, retype, transform } from "../documents/conversions.js";
3
- import { type ModelRole, ModelRoleSchema } from "../models/model-roles.js";
3
+ import { type ModelRole, ROLES_BEFORE_CONTRIBUTIONS } from "../models/model-roles.js";
4
4
  import { setupsFromRoleLists } from "../models/model-setups.js";
5
5
  import { ModelPinSchema, type ModelPin } from "./agent.js";
6
6
  import { RESTORE_POINT_KEEP_DAYS_DEFAULT } from "./data-protection.js";
@@ -84,18 +84,20 @@ const refactorsFromChores = transform(
84
84
  // (`modelDefault`); it runs on a named setup it shares with other jobs. Jobs that held the same list share one setup, a
85
85
  // list most of whose jobs are suggested a preset becomes that preset, and a job that held none, or an empty one, is on
86
86
  // none, which runs it exactly as before: not at all. A list that does not read (a role this version does not know, a malformed pin) is left out rather than refusing
87
- // the whole file, the same reading the schema gave it.
87
+ // the whole file, the same reading the schema gave it. The jobs it reads are the table's of 2026-11-26, frozen
88
+ // (ROLES_BEFORE_CONTRIBUTIONS): six of them moved to their extensions' manifests that day, and a file this converts still
89
+ // names them.
88
90
  const PinList = z.array(ModelPinSchema);
89
91
  const holdsRoleLists = (settings: JsonObject): settings is JsonObject => Object.hasOwn(settings, "modelRoles") || Object.hasOwn(settings, "modelDefault");
90
92
  const roleListsIntoSetups = transform("folds modelRoles and modelDefault into setups (modelSetups, roleSetups)", holdsRoleLists, (settings): JsonObject => {
91
93
  const { modelRoles, modelDefault, ...rest } = settings;
92
94
  const fallback = PinList.safeParse(modelDefault);
93
95
  const lists: Partial<Record<ModelRole, ModelPin[]>> = {};
94
- for (const role of ModelRoleSchema.options) {
95
- const own = isJsonObject(modelRoles) ? PinList.safeParse(modelRoles[role]) : undefined;
96
+ for (const { id } of ROLES_BEFORE_CONTRIBUTIONS) {
97
+ const own = isJsonObject(modelRoles) ? PinList.safeParse(modelRoles[id]) : undefined;
96
98
  const list = own?.success === true ? own.data : fallback.success && fallback.data.length > 0 ? fallback.data : undefined;
97
99
  if (list !== undefined) {
98
- lists[role] = list;
100
+ lists[id] = list;
99
101
  }
100
102
  }
101
103
  const { modelSetups, roleSetups } = setupsFromRoleLists(lists);
@@ -182,4 +184,7 @@ export const SETTINGS_HISTORY = [
182
184
  ...dropAll(["iqSearch", "iqSearchHoldout"]),
183
185
  // Personas were renamed roles (2026-11-18): the switch that matches a new chat to one moves with them.
184
186
  rename("personaRouting", "roleRouting"),
187
+ // Planning fan-outs by allowance became the only way (2026-11-25): off, a second child started on an account that could
188
+ // not carry it, ran its allowance out and waited for the reset anyway. `subagentReservePercent` at 0 is the loosest plan.
189
+ ...dropAll(["subagentBudget"]),
185
190
  ] as const;
@@ -23,6 +23,35 @@ export const InputSavingsSchema = z.object({
23
23
  holdout: z.object({ cleaned: z.number(), heldOut: z.number(), measuredSavedPct: z.number().optional() }),
24
24
  // Grouped by command text: worth a handler is judged by total tokens across runs, not one outlier's size.
25
25
  gaps: z.array(z.object({ command: z.string(), commands: z.number(), tokens: z.number() })),
26
+ // Harm: per stage, of the commands it trimmed, how many the model came back for (retrieve-output of the run's raw
27
+ // file, or the same command again within K), next to the held-out conversations' own re-run share. Absent when the
28
+ // ledger has no per-conversation rows.
29
+ harm: z
30
+ .object({
31
+ K: z.number(),
32
+ perStage: z.array(
33
+ z.object({
34
+ id: z.string(),
35
+ trimmed: z.number(),
36
+ retrieved: z.number(),
37
+ reRun: z.number(),
38
+ followedUp: z.number(),
39
+ harmRate: z.number(),
40
+ }),
41
+ ),
42
+ heldOutReRun: z.object({ commands: z.number(), reRunRate: z.number() }).optional(),
43
+ caveat: z.string().optional(),
44
+ })
45
+ .optional(),
46
+ // Arm comparison: per-conversation tool calls and emitted bytes, cleaned vs held-out. Absent when fewer
47
+ // than 5 conversations per arm carry conversationHash.
48
+ arms: z
49
+ .object({
50
+ cleaned: z.object({ conversations: z.number(), medianCommands: z.number(), medianEmittedBytes: z.number() }),
51
+ heldOut: z.object({ conversations: z.number(), medianCommands: z.number(), medianEmittedBytes: z.number() }),
52
+ emittedBytesDeltaPct: z.number().optional(),
53
+ })
54
+ .optional(),
26
55
  });
27
56
  export type InputSavings = z.infer<typeof InputSavingsSchema>;
28
57
  // One arm of a turn-level experiment; mean is per turn, since the two arms never hold the same count.
@@ -1,5 +1,5 @@
1
1
  import { convertDocument } from "../documents/conversions.js";
2
- import { MODEL_ROLES, type ModelRole } from "../models/model-roles.js";
2
+ import { CORE_MODEL_ROLES, type ModelRole } from "../models/model-roles.js";
3
3
  import { rolePins } from "../models/model-setups.js";
4
4
  import { SETTINGS_HISTORY } from "./settings-history.js";
5
5
  import { RepoChecksFileSchema, RuleSchema, SandboxSettingsSchema, SandboxSettingsWriteSchema } from "./settings.js";
@@ -156,7 +156,8 @@ describe(`the retired pre-push fix role`, () => {
156
156
 
157
157
  test(`is dropped from a stored file, leaving every other job's list, and the file reads`, () => {
158
158
  const stored = { modelRoles: { "pipeline-fix": [pin], "pre-push-fix": [pin] } };
159
- expect(SandboxSettingsSchema.safeParse({ roleSetups: { "pre-push-fix": `high` } }).success).toBe(false);
159
+ // (2026-11-26) Any job's id reads since extensions declare their own, so a choice naming one nobody declares is kept.
160
+ expect(SandboxSettingsSchema.safeParse({ roleSetups: { "pre-push-fix": `high` } }).success).toBe(true);
160
161
  expect(runsOn(stored, `pipeline-fix`)).toEqual([pin]);
161
162
  });
162
163
  });
@@ -244,6 +245,7 @@ test("build output defaults: six idle hours, reaping under 15% free, full debug
244
245
  expect(defaults.buildOutputIdleHours).toBe(6);
245
246
  expect(defaults.diskReapBelowPercent).toBe(15);
246
247
  expect(defaults.leanRustBuilds).toBe(false);
248
+ expect(defaults.rustIncrementalOff).toBe(false);
247
249
  expect(SandboxSettingsSchema.safeParse({ buildOutputIdleHours: 0 }).success).toBe(false);
248
250
  expect(SandboxSettingsSchema.safeParse({ diskReapBelowPercent: 4 }).success).toBe(false);
249
251
  });
@@ -277,17 +279,21 @@ describe(`restore points' retention, renamed so a stored zero is the owner's own
277
279
  });
278
280
 
279
281
  describe(`default job setups`, () => {
280
- test(`new settings place every job on its suggested preset`, () => {
282
+ const sources = [{ provider: `claude`, ready: true, models: [`claude-haiku-4-5`, `claude-sonnet-5`, `claude-opus-5`] }] as const;
283
+
284
+ test(`new settings place no job, and every job runs on its suggested preset`, () => {
281
285
  const settings = SandboxSettingsSchema.parse({});
282
- expect(settings.roleSetups).toEqual(Object.fromEntries(MODEL_ROLES.map((role) => [role.id, role.setup])));
283
- expect(settings.roleSetups[`commit-message`]).toBe(`low`);
284
- expect(settings.roleSetups[`safety-judge`]).toBe(`medium`);
285
- expect(settings.roleSetups[`pipeline-fix`]).toBe(`high`);
286
- const sources = [{ provider: `claude`, ready: true, models: [`claude-haiku-4-5`, `claude-sonnet-5`, `claude-opus-5`] }] as const;
286
+ expect(settings.roleSetups).toBeUndefined();
287
+ expect(CORE_MODEL_ROLES.find((role) => role.id === `commit-message`)?.setup).toBe(`low`);
287
288
  expect(rolePins(settings, `commit-message`, sources)).toEqual([{ provider: `claude`, model: `claude-haiku-4-5` }]);
288
289
  expect(rolePins(settings, `safety-judge`, sources)).toEqual([{ provider: `claude`, model: `claude-sonnet-5` }]);
289
- expect(rolePins(settings, `pipeline-fix`, sources)).toEqual([{ provider: `claude`, model: `claude-opus-5` }]);
290
- expect(rolePins(settings, `pipeline-fix`, [])).toEqual([]);
290
+ expect(rolePins(settings, `safety-judge`, [])).toEqual([]);
291
+ });
292
+
293
+ test(`an extension's job runs on what its declaration suggests, and a job nobody declares on none`, () => {
294
+ const settings = SandboxSettingsSchema.parse({});
295
+ expect(rolePins(settings, `pipeline-fix`, sources, `high`)).toEqual([{ provider: `claude`, model: `claude-opus-5` }]);
296
+ expect(rolePins(settings, `pipeline-fix`, sources)).toEqual([]);
291
297
  });
292
298
 
293
299
  test(`saved assignments keep their choices and jobs left off`, () => {
@@ -295,20 +301,15 @@ describe(`default job setups`, () => {
295
301
  expect(SandboxSettingsSchema.parse({ roleSetups: { "commit-message": `high` } }).roleSetups).toEqual({ "commit-message": `high` });
296
302
  const saved = SandboxSettingsSchema.parse({ roleSetups: {} });
297
303
  expect(SandboxSettingsWriteSchema.parse({ ...saved, commandJudge: `watch` }).roleSetups).toEqual({});
298
- });
299
- });
300
-
301
- // A memory kill's answer is on to begin with where the restart switch is off: the sandbox knows the cause, and lets its
302
- // victims back one at a time once memory settles (turn-break.ts). Only the two answers it takes are written.
303
- describe(`the answer to a memory kill`, () => {
304
- test(`resumes by default, while resuming after any restart stays off`, () => {
305
- const defaults = SandboxSettingsSchema.parse({});
306
- expect(defaults.memoryKillPolicy).toBe(`resume`);
307
- expect(defaults.autoResumeOnRestart).toBe(false);
304
+ // A saved map leaves a job it does not name on none, whatever it is suggested.
305
+ expect(rolePins(saved, `commit-message`, sources)).toEqual([]);
306
+ expect(rolePins(saved, `pipeline-fix`, sources, `high`)).toEqual([]);
308
307
  });
309
308
 
310
- test(`takes wait or resume and nothing else`, () => {
311
- expect(SandboxSettingsSchema.parse({ memoryKillPolicy: `wait` }).memoryKillPolicy).toBe(`wait`);
312
- expect(SandboxSettingsSchema.safeParse({ memoryKillPolicy: `retry` }).success).toBe(false);
309
+ test(`a choice for an extension's job is kept through a save, whether or not anything declares it now`, () => {
310
+ const saved = SandboxSettingsSchema.parse({ roleSetups: { "commit-message": `low`, "deployment-fix": `medium`, "saldeo-reconcile": `high` } });
311
+ const written = SandboxSettingsWriteSchema.parse({ ...saved, commandJudge: `watch` });
312
+ expect(written.roleSetups).toEqual({ "commit-message": `low`, "deployment-fix": `medium`, "saldeo-reconcile": `high` });
313
+ expect(rolePins(written, `deployment-fix`, sources)).toEqual([{ provider: `claude`, model: `claude-sonnet-5` }]);
313
314
  });
314
315
  });
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import { claudeExperimentSettings } from "./settings-experiments.js";
4
4
  import { CommandJudgeModeSchema, ProjectInstallModeSchema } from "../policy/safety-policy.js";
5
- import { MODEL_ROLES, ModelRoleSchema } from "../models/model-roles.js";
5
+ import { ModelRoleSchema } from "../models/model-roles.js";
6
6
  import { MODEL_SETUP_ID, ModelSetupSchema } from "../models/model-setups.js";
7
7
  import { AdmissionPolicySchema, AdmissionRuleSchema } from "./command-admission.js";
8
8
  import { KeepWarmSettingsSchema } from "./keep-warm.js";
@@ -159,6 +159,14 @@ export type SkillOrigin = z.infer<typeof SkillOriginSchema>;
159
159
  // Same slug shape the SDK's loader accepts, checked here so a bad name is a refused save, not a skill that silently
160
160
  // never loads.
161
161
  export const SkillNameSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/, "a skill name is lowercase letters, digits and dashes");
162
+ // Counted from the turns that loaded the skill (a skill tool call naming it, or a read of its SKILL.md), so a skill that
163
+ // is only listed never counts. A window, not a lifetime total: the question is whether it still earns its place.
164
+ export const SKILL_USES_WINDOW_DAYS = 7;
165
+ export const SkillUsesSchema = z.object({
166
+ week: z.number().int().nonnegative().describe("Turns that loaded it in the last seven days."),
167
+ last: z.string().optional().describe("When a turn last loaded it, as an ISO time. Absent when no turn has since the count began."),
168
+ });
169
+ export type SkillUses = z.infer<typeof SkillUsesSchema>;
162
170
  export const SkillSummarySchema = z.object({
163
171
  // Qualified as `<origin>:<owner>:<name>` for anything not `own`/`builtin`.
164
172
  id: z
@@ -190,6 +198,10 @@ export const SkillSummarySchema = z.object({
190
198
  // Wider than `editable` by one case: a dropped skill isn't the owner's to edit, but is theirs to remove, with no
191
199
  // other way to short of the file tree.
192
200
  removable: z.boolean(),
201
+ // Optional for the daemon-older-than-browser seam: a sandbox from before the count answers nothing, which is not zero.
202
+ uses: SkillUsesSchema.optional().describe(
203
+ "How often turns have loaded it lately. Absent where nothing counts (a sandbox from before the count), which is not the same as never.",
204
+ ),
193
205
  });
194
206
  export type SkillSummary = z.infer<typeof SkillSummarySchema>;
195
207
  export const SkillsListSchema = z.array(SkillSummarySchema);
@@ -200,6 +212,20 @@ export const SkillBodySchema = z.object({
200
212
  name: z.string().describe("Its name."),
201
213
  // Everything after the frontmatter.
202
214
  body: z.string().describe("The instructions themselves, as written."),
215
+ // Only where the folder is what the agent reads, so a file opened from it is the file that matters: the loaded folder
216
+ // (a dropped skill, a connection's cheatsheet) or a role kit's. The owner's own skill is written through this
217
+ // contract instead, and a built-in's, an extension's or a plugin's lives outside the workspace.
218
+ folder: z
219
+ .string()
220
+ .optional()
221
+ .describe(
222
+ "The workspace-relative folder holding it, when that folder is what the agent reads. Absent for your own skills, which are written here rather than as files, and for anything kept outside the workspace.",
223
+ ),
224
+ // Defaulted for the daemon-older-than-browser seam. Relative to the skill's folder, SKILL.md left out, capped.
225
+ files: z
226
+ .array(z.string())
227
+ .default([])
228
+ .describe("The other files in its folder (references, scripts, licences), relative to it, SKILL.md left out. Capped at 50."),
203
229
  });
204
230
  export type SkillBody = z.infer<typeof SkillBodySchema>;
205
231
  export const SkillIdSchema = z.object({
@@ -393,14 +419,13 @@ export const SandboxSettingsSchema = z.object({
393
419
  .describe(
394
420
  "The model setups jobs run on: Low, Medium and High, which every sandbox has, and any you make. Each is an ordered list of models, tried in order so one spent account does not take its jobs down. A preset left out of this list, or listed without models, is worked out from the accounts you have connected. A setup runs only the jobs put on it (`roleSetups`).",
395
421
  ),
396
- // `partialRecord`, not `record`: an exhaustive one would force every settings file to list every role, and adding
397
- // one would invalidate them all. A fresh sandbox places every job on its suggested preset; an explicit
398
- // map stays as written, including an empty one or a job removed from it.
422
+ // Any job's id, an extension's too, kept as written while it is off; absent until a job is placed, every job on its
423
+ // suggestion (2026-11-26: the schema wrote the core table at the first save, leaving later extensions' jobs on none).
399
424
  roleSetups: z
400
- .partialRecord(ModelRoleSchema, z.string().regex(MODEL_SETUP_ID))
401
- .default(() => Object.fromEntries(MODEL_ROLES.map((role) => [role.id, role.setup])))
425
+ .record(ModelRoleSchema, z.string().regex(MODEL_SETUP_ID))
426
+ .optional()
402
427
  .describe(
403
- "Which setup each job runs on: commit messages, session titles, the safety judge, pipeline fixes and every other place this sandbox picks a model for you. Defaults to each job’s suggested Low, Medium or High setup. In a saved map, a job left out, or on a setup with no models, has none, so a one-shot job does not run and a whole session opens on whatever your own chat is set to.",
428
+ "Which setup each job runs on: commit messages, session titles, the safety judge, the jobs your extensions start runs for (pipeline fixes, maintenance chores) and every other place this sandbox picks a model for you. Left out, every job runs on its suggested Low, Medium or High setup. In a saved map, a job left out, or on a setup with no models, has none, so a one-shot job does not run and a whole session opens on whatever your own chat is set to. A choice for an extension's job is kept while the extension is switched off.",
404
429
  ),
405
430
  // Folded into the router's prompt (agent/prompt/chat-router.ts), never into a turn's own. Capped small on
406
431
  // purpose: the reading runs under a 5s deadline, and this text is paid for on every chat that opens on Auto.
@@ -451,6 +476,16 @@ export const SandboxSettingsSchema = z.object({
451
476
  .describe(
452
477
  "Build Rust with line tables only for debug info (CARGO_PROFILE_DEV_DEBUG and CARGO_PROFILE_TEST_DEBUG set to `line-tables-only` in agents' shells). A debug target takes less disk and backtraces keep their file and line, but a debugger sees no local variables. It overrides what a repository's own Cargo.toml says about debug info.",
453
478
  ),
479
+ // Read live into every turn's shell (agent/run/harness/turn-env.ts); off by default, since it overrides a repository's
480
+ // own incremental setting and costs repeated rebuilds of one big crate. Measured 2026-11-24 (disk I/O audit on rog):
481
+ // the shinobi-society sandbox's Rust builds wrote 173 GB of the engine's 197 GB in 4.3 h, and each checkout's
482
+ // `target/debug/incremental/` held 0.15-12 GB rewritten on every compile; sccache cannot cache incremental crates.
483
+ rustIncrementalOff: z
484
+ .boolean()
485
+ .default(false)
486
+ .describe(
487
+ "Turn off Cargo's incremental compilation (CARGO_INCREMENTAL=0 in agents' shells). Builds stop writing each checkout's `target/debug/incremental/` (0.15-12 GB per checkout, rewritten on every compile) and the compiler cache can cache the workspace's own crates too. A repeated edit and rebuild of one big crate in the same checkout recompiles that crate whole. It overrides a repository's own `[profile] incremental` and CARGO_INCREMENTAL.",
488
+ ),
454
489
  commitAttribution: commitAttributionSetting,
455
490
  // A prototype, off by default (2026-11-04): an isolated checkout's Cargo `target/` laid over a frozen copy of the main
456
491
  // checkout's, so each checkout keeps only what it compiled differently (conversations/worktrees/cargo-warm.ts).
@@ -484,15 +519,14 @@ export const SandboxSettingsSchema = z.object({
484
519
  memoryPolicy: RoomPolicySchema.default("resend").describe(
485
520
  "What happens to a message the sandbox held because it was short of memory: nothing ran, so nothing was spent. `resend` sends it by itself once memory has stayed free for a while, one held conversation at a time. `wait` holds it until somebody presses Send anyway. The sandbox-wide default; any one conversation can say otherwise.",
486
521
  ),
487
- // The one answer that re-runs a turn which RAN without being asked, on by default, where autoResumeOnRestart (below)
488
- // is off by default. The two differ in what the sandbox knows. A restart is any cause (an update, a rebuild, a crash
489
- // nobody named), and re-running everything it cut, all at once, spends the allowance on work nobody is watching and
490
- // edits files while the owner still waits for the sandbox to come back. A memory kill is one named cause the sandbox
491
- // can steer around: its turns go one at a time, only once memory has stayed free, never the turn whose own process was
492
- // the one killed, and not after a second memory kill of the same request (MEMORY_KILL_RERUNS), so what comes back is
493
- // the victims and not the runaway. Held for a press instead, every victim of the 2026-11-05 runaway sat in Attention
494
- // with "autoResumeOnRestart is off" though only one conversation had caused it; and switching autoResumeOnRestart on
495
- // to avoid that would have re-run the cause too, all at once, into a machine still recovering.
522
+ // Both this and autoResumeOnRestart (below) re-run a turn which RAN without being asked, and both are on by default;
523
+ // they differ in what the sandbox knows. A restart is any cause (an update, a rebuild, a crash nobody named), and its
524
+ // switch resumes everything it cut, short of a restart storm. A memory kill is one named cause the sandbox can steer
525
+ // around: its turns go one at a time, only once memory has stayed free, never the turn whose own process was the one
526
+ // killed, and not after a second memory kill of the same request (MEMORY_KILL_RERUNS), so what comes back is the
527
+ // victims and not the runaway. Held for a press instead, every victim of the 2026-11-05 runaway sat in Attention with
528
+ // "autoResumeOnRestart is off" though only one conversation had caused it; and resuming everything the restart cut
529
+ // would have re-run the cause too, all at once, into a machine still recovering.
496
530
  memoryKillPolicy: MemoryKillPolicySchema.default("resume").describe(
497
531
  "What happens to a turn the sandbox killed because it ran out of memory, whether only that turn was killed or the whole sandbox restarted. `resume` sends it again by itself once memory has stayed free for a while, one conversation at a time, and tells it what happened. Never a turn whose own process was the one using the memory, and never one killed for memory twice already: those wait for a press whatever this says. `wait` holds every such turn until somebody presses Continue. After a restart that ran out of memory this decides for the turns it cut, instead of the switch for resuming after a restart. The sandbox-wide default; any one conversation can say otherwise.",
498
532
  ),
@@ -539,14 +573,14 @@ export const SandboxSettingsSchema = z.object({
539
573
  ),
540
574
  // Worth it since the container is recreated on every update or environment approval — otherwise approving a
541
575
  // Dockerfile change costs the run that asked for it.
542
- // What happens when main's CI fails (ci/main-fixer.ts): its first failed job starts one fix agent, which is sent
543
- // every later failure on main until main passes, within a few turns, and a failure on the CI fleet itself is re-run
544
- // once instead. Off, it is only reported.
576
+ // Deprecated (2026-11-26): main's fix agent moved to the pipelines extension, whose own `autoRepair` setting decides.
577
+ // Kept so an owner's choice is read once more, by the hand-over that writes it into that setting
578
+ // (ci/repair-hand-over.ts); nothing else reads it. Leaves with settings.json's next major conversion.
545
579
  autoRepair: z
546
580
  .boolean()
547
581
  .default(true)
548
582
  .describe(
549
- "Whether main's CI failing is repaired without asking. The first job that fails on main starts one fix agent, without waiting for the rest of the run, and every later failure on main goes to that same agent until a run passes. It gets a few turns; when they are spent, or it finishes without changing anything (a failure that is not in the code), the failure waits for you. A failure on the CI fleet itself is re-run once instead. Off, all of it is only reported.",
583
+ "Deprecated: whether main's CI failing is repaired without asking is the Pipelines extension's own setting now. Read only to carry a choice made here into it.",
550
584
  ),
551
585
  // What another writer pushes reaches the main tree within minutes instead of at the owner's next pull
552
586
  // (git/remote/follow-origin.ts), so an agent whose work clashes with it meets the clash at its own land.
@@ -673,7 +707,7 @@ export const SandboxSettingsSchema = z.object({
673
707
  // Three separate ceilings since they stop different things: width (parallel fan-out), lifetime (per conversation),
674
708
  // depth (how far a child may delegate) — raising width alone just hits the lifetime cap sooner. Defaults mirror the
675
709
  // CLI's own unset behavior; hitting one stops the agent rather than retrying.
676
- subagentsAtOnce: z.number().min(1).max(200).default(20).describe("How many subagents may work at the same time."),
710
+ subagentsAtOnce: z.number().min(1).max(200).default(20).describe("How many subagents one conversation may run at the same time."),
677
711
  subagentsPerTurn: z.number().min(1).max(2000).default(200).describe("How many a single turn may start in total."),
678
712
  // Depth 1 means an agent may delegate but its children may not; unlike the other two, a runaway here is
679
713
  // multiplicative, not merely wide.
@@ -688,7 +722,6 @@ export const SandboxSettingsSchema = z.object({
688
722
  childRerunHorizonHours: z.number().int().min(0).max(24).default(6).describe(
689
723
  "How long a subagent refused for a spent allowance waits for the provider's reset before it goes again by itself. Past it, or at 0, it stops and its parent hears where else the work can go. One spawned with fallbacks waits at most 90 minutes and then moves to them.",
690
724
  ),
691
- subagentBudget: z.boolean().default(true).describe("Start a subagent only where an account's allowance can carry it through its windows, on the account whose allowance renews first among those that can carry it, since what is left of an allowance at its reset is lost. The rest wait as pending and start by themselves as running ones end or a window reopens. Off, every subagent starts at once, on the account that renews first or, where none carries it, the one that holds out longest."),
692
725
  subagentReservePercent: z.number().int().min(0).max(50).default(10).describe("How much of each allowance window, in points of 100, subagents leave for your own conversations: a fan-out is planned against what is left past it."),
693
726
  // Width again, for a team-chat automation rather than a turn: each thread a message lands in is a conversation of
694
727
  // its own, and threads of one automation are worked on side by side up to this many (automations/scheduler.ts in
@@ -0,0 +1,59 @@
1
+ import { z } from "zod";
2
+ import { StackNameSchema } from "./device-stacks.js";
3
+
4
+ /* WHICH SECRETS A STACK MAY RECEIVE (2026-11-25). Managed stacks are the Deployments extension's: its engine reads a
5
+ repository's stacks manifest, queues, triggers, rolls back (extensions/deployments). The one thing it cannot do is
6
+ hold a secret's value, so a managed deploy (device-stacks.ts DeviceStackManagedDeployInputSchema) sends `{{secret:…}}`
7
+ references and the daemon fills them, but only the names the OWNER granted that stack, on that computer, from that
8
+ repository. A grant lives in the auth root, where no agent and no extension can write it; an agent asks for one on a
9
+ card (a `deploy` need), the owner's press writes it, and the Deployments board's owner-only button does the same. */
10
+
11
+ // A stack, from a repository, on one computer (its device card's id): what a grant is for. Moving a stack to another
12
+ // computer, or declaring it in another repository, needs a grant of its own.
13
+ export const StackGrantRefSchema = z.object({
14
+ repo: z.string().min(1).max(500),
15
+ stack: StackNameSchema,
16
+ device: z.string().min(1).max(200),
17
+ });
18
+ export type StackGrantRef = z.infer<typeof StackGrantRefSchema>;
19
+
20
+ const SecretNameSchema = z.string().regex(/^[A-Za-z0-9_./-]{1,200}$/, "a secret's name as `{{secret:NAME}}` writes it");
21
+
22
+ export const StackGrantSchema = StackGrantRefSchema.extend({
23
+ secrets: z.array(z.string()),
24
+ grantedBy: z.string().optional(),
25
+ grantedAt: z.string(),
26
+ });
27
+ export type StackGrant = z.infer<typeof StackGrantSchema>;
28
+
29
+ export const StackGrantsResponseSchema = z.object({ grants: z.array(StackGrantSchema) });
30
+ export type StackGrantsResponse = z.infer<typeof StackGrantsResponseSchema>;
31
+
32
+ // The owner's grant: exactly these names, added to what the stack already holds there.
33
+ export const StackGrantSetSchema = StackGrantRefSchema.extend({ secrets: z.array(SecretNameSchema).min(1).max(100) });
34
+ export type StackGrantSet = z.infer<typeof StackGrantSetSchema>;
35
+
36
+ // An agent's ask: a card in its conversation listing the names; answered as a raised need is (needs.ts NeedRaisedSchema).
37
+ export const StackGrantRequestSchema = StackGrantSetSchema.extend({ why: z.string().max(280).optional() });
38
+ export type StackGrantRequest = z.infer<typeof StackGrantRequestSchema>;
39
+
40
+ // The owner's card (needs.ts, kind `deploy`). Only the owner, or someone with Full access, signed in, can press it, and
41
+ // a yes grants exactly the names the card showed, on the computer it showed.
42
+ export const DeployNeedSchema = z.object({
43
+ kind: z.literal("deploy"),
44
+ repo: z.string().min(1).max(500).describe("The repository that declares the stack, workspace-relative."),
45
+ stack: StackNameSchema.describe("The stack's name."),
46
+ device: z.string().min(1).max(200).describe("The computer it deploys to, by its device card: a grant is for that computer alone."),
47
+ deviceName: z.string().max(200).optional().describe("That computer's name, for the card."),
48
+ secrets: z.array(z.string()).describe("The secret names a yes grants it."),
49
+ ungranted: z.array(z.string()).describe("Those it has not been granted yet, when the card was raised."),
50
+ });
51
+ export type DeployNeed = z.infer<typeof DeployNeedSchema>;
52
+ // What an agent sends: the stack and the names (`secrets grant-stack`).
53
+ export const DeployNeedAskSchema = z.object({
54
+ kind: z.literal("deploy"),
55
+ repo: z.string().min(1).max(500),
56
+ stack: StackNameSchema,
57
+ device: z.string().min(1).max(200),
58
+ secrets: z.array(SecretNameSchema).min(1).max(100),
59
+ });
@@ -5,7 +5,7 @@ import { packageRoot } from "@intentic/constants/node";
5
5
  import { STATE_PLAN_FORMAT, type StatePlan, StatePlanSchema, type StateStatus, StateStatusSchema } from "./state-plan.js";
6
6
 
7
7
  // The documents `ic` reads by field name, spelled once here: each golden file under golden/ is one of these examples
8
- // as JSON, and the Rust tests (_sandbox/ic/src/sandbox/preflight.rs, health.rs) parse the same files. A change here
8
+ // as JSON, and the Rust tests (_hosts/ic/src/sandbox/preflight.rs, health.rs) parse the same files. A change here
9
9
  // that the committed file does not carry fails, naming the file; `INTENTIC_WRITE_GOLDEN=1` rewrites them, and the Rust
10
10
  // tests then say whether ic still reads them.
11
11