@intentic/sandbox-contract 1.248.0 → 1.249.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 (877) hide show
  1. package/README.md +18 -15
  2. package/dist/chores/chores.d.ts.map +1 -1
  3. package/dist/chores/chores.js.map +1 -1
  4. package/dist/chores/digest.d.ts.map +1 -1
  5. package/dist/chores/digest.js.map +1 -1
  6. package/dist/chores/extension-update.d.ts.map +1 -1
  7. package/dist/chores/extension-update.js.map +1 -1
  8. package/dist/chores/fix-deps.d.ts.map +1 -1
  9. package/dist/chores/fix-deps.js.map +1 -1
  10. package/dist/chores/index.d.ts +2 -2
  11. package/dist/chores/index.d.ts.map +1 -1
  12. package/dist/chores/index.js +1 -1
  13. package/dist/chores/index.js.map +1 -1
  14. package/dist/chores/probes.d.ts.map +1 -1
  15. package/dist/chores/probes.js.map +1 -1
  16. package/dist/chores/prompt.d.ts.map +1 -1
  17. package/dist/chores/prompt.js.map +1 -1
  18. package/dist/chores/stack.d.ts.map +1 -1
  19. package/dist/chores/stack.js.map +1 -1
  20. package/dist/chores/verdict.d.ts +7 -1
  21. package/dist/chores/verdict.d.ts.map +1 -1
  22. package/dist/chores/verdict.js +8 -0
  23. package/dist/chores/verdict.js.map +1 -1
  24. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  25. package/dist/contracts/accounts.contract.js.map +1 -1
  26. package/dist/contracts/activity.contract.d.ts +1 -0
  27. package/dist/contracts/activity.contract.d.ts.map +1 -1
  28. package/dist/contracts/agent.contract.d.ts +12 -205
  29. package/dist/contracts/agent.contract.d.ts.map +1 -1
  30. package/dist/contracts/agent.contract.js +2 -1
  31. package/dist/contracts/agent.contract.js.map +1 -1
  32. package/dist/contracts/agents.contract.d.ts +228 -54
  33. package/dist/contracts/agents.contract.d.ts.map +1 -1
  34. package/dist/contracts/agents.contract.js +11 -2
  35. package/dist/contracts/agents.contract.js.map +1 -1
  36. package/dist/contracts/automations.contract.d.ts +35 -17
  37. package/dist/contracts/automations.contract.d.ts.map +1 -1
  38. package/dist/contracts/automations.contract.js +10 -1
  39. package/dist/contracts/automations.contract.js.map +1 -1
  40. package/dist/contracts/capabilities.contract.d.ts +0 -12
  41. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  42. package/dist/contracts/capabilities.contract.js +1 -1
  43. package/dist/contracts/capabilities.contract.js.map +1 -1
  44. package/dist/contracts/chores.contract.d.ts.map +1 -1
  45. package/dist/contracts/chores.contract.js.map +1 -1
  46. package/dist/contracts/ci.contract.d.ts +9 -0
  47. package/dist/contracts/ci.contract.d.ts.map +1 -1
  48. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  49. package/dist/contracts/endpoints.contract.js.map +1 -1
  50. package/dist/contracts/exit.contract.d.ts.map +1 -1
  51. package/dist/contracts/exit.contract.js +1 -1
  52. package/dist/contracts/exit.contract.js.map +1 -1
  53. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  54. package/dist/contracts/extensions.contract.js.map +1 -1
  55. package/dist/contracts/git.contract.d.ts +45 -6
  56. package/dist/contracts/git.contract.d.ts.map +1 -1
  57. package/dist/contracts/git.contract.js +9 -9
  58. package/dist/contracts/git.contract.js.map +1 -1
  59. package/dist/contracts/host.contract.d.ts +2 -0
  60. package/dist/contracts/host.contract.d.ts.map +1 -1
  61. package/dist/contracts/host.contract.js.map +1 -1
  62. package/dist/contracts/intentic.contract.js +1 -1
  63. package/dist/contracts/intentic.contract.js.map +1 -1
  64. package/dist/contracts/logs.contract.d.ts.map +1 -1
  65. package/dist/contracts/logs.contract.js.map +1 -1
  66. package/dist/contracts/loops.contract.d.ts.map +1 -1
  67. package/dist/contracts/loops.contract.js.map +1 -1
  68. package/dist/contracts/personas.contract.d.ts +1 -0
  69. package/dist/contracts/personas.contract.d.ts.map +1 -1
  70. package/dist/contracts/personas.contract.js +1 -1
  71. package/dist/contracts/personas.contract.js.map +1 -1
  72. package/dist/contracts/providers.contract.d.ts.map +1 -1
  73. package/dist/contracts/providers.contract.js.map +1 -1
  74. package/dist/contracts/runner.contract.d.ts +97 -171
  75. package/dist/contracts/runner.contract.d.ts.map +1 -1
  76. package/dist/contracts/runner.contract.js +2 -2
  77. package/dist/contracts/runner.contract.js.map +1 -1
  78. package/dist/contracts/safety.contract.d.ts.map +1 -1
  79. package/dist/contracts/safety.contract.js +1 -1
  80. package/dist/contracts/safety.contract.js.map +1 -1
  81. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  82. package/dist/contracts/secrets.contract.js.map +1 -1
  83. package/dist/contracts/sessions.contract.d.ts +2 -41
  84. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  85. package/dist/contracts/sessions.contract.js +1 -1
  86. package/dist/contracts/sessions.contract.js.map +1 -1
  87. package/dist/contracts/settings.contract.d.ts +8 -18
  88. package/dist/contracts/settings.contract.d.ts.map +1 -1
  89. package/dist/contracts/settings.contract.js.map +1 -1
  90. package/dist/contracts/share.contract.d.ts.map +1 -1
  91. package/dist/contracts/share.contract.js.map +1 -1
  92. package/dist/contracts/skills.contract.d.ts.map +1 -1
  93. package/dist/contracts/skills.contract.js.map +1 -1
  94. package/dist/contracts/system.contract.d.ts +49 -73
  95. package/dist/contracts/system.contract.d.ts.map +1 -1
  96. package/dist/contracts/system.contract.js +12 -2
  97. package/dist/contracts/system.contract.js.map +1 -1
  98. package/dist/contracts/usage.contract.d.ts.map +1 -1
  99. package/dist/contracts/usage.contract.js.map +1 -1
  100. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  101. package/dist/contracts/vpn.contract.js +1 -1
  102. package/dist/contracts/vpn.contract.js.map +1 -1
  103. package/dist/contracts/webext.contract.d.ts.map +1 -1
  104. package/dist/contracts/webext.contract.js.map +1 -1
  105. package/dist/contracts/workflows.contract.d.ts +7 -6
  106. package/dist/contracts/workflows.contract.d.ts.map +1 -1
  107. package/dist/contracts/workflows.contract.js +12 -3
  108. package/dist/contracts/workflows.contract.js.map +1 -1
  109. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  110. package/dist/contracts/workspace.contract.js.map +1 -1
  111. package/dist/events/agent-events.d.ts +1237 -0
  112. package/dist/events/agent-events.d.ts.map +1 -0
  113. package/dist/events/agent-events.js +226 -0
  114. package/dist/events/agent-events.js.map +1 -0
  115. package/dist/events/cards.d.ts +404 -0
  116. package/dist/events/cards.d.ts.map +1 -0
  117. package/dist/events/cards.js +179 -0
  118. package/dist/events/cards.js.map +1 -0
  119. package/dist/events/resume.d.ts +23 -0
  120. package/dist/events/resume.d.ts.map +1 -0
  121. package/dist/events/resume.js +31 -0
  122. package/dist/events/resume.js.map +1 -0
  123. package/dist/events/system-events.d.ts +615 -0
  124. package/dist/events/system-events.d.ts.map +1 -0
  125. package/dist/events/system-events.js +64 -0
  126. package/dist/events/system-events.js.map +1 -0
  127. package/dist/events/transcript.d.ts +1755 -0
  128. package/dist/events/transcript.d.ts.map +1 -0
  129. package/dist/events/transcript.js +205 -0
  130. package/dist/events/transcript.js.map +1 -0
  131. package/dist/ids/conversation-ids.d.ts +8 -0
  132. package/dist/ids/conversation-ids.d.ts.map +1 -0
  133. package/dist/{conversation-ids.js → ids/conversation-ids.js} +13 -0
  134. package/dist/ids/conversation-ids.js.map +1 -0
  135. package/dist/ids/hostnames.d.ts.map +1 -0
  136. package/dist/ids/hostnames.js.map +1 -0
  137. package/dist/ids/session-names.d.ts.map +1 -0
  138. package/dist/ids/session-names.js.map +1 -0
  139. package/dist/ids/share-paths.d.ts.map +1 -0
  140. package/dist/ids/share-paths.js.map +1 -0
  141. package/dist/{tunnel-ids.d.ts → ids/tunnel-ids.d.ts} +1 -0
  142. package/dist/ids/tunnel-ids.d.ts.map +1 -0
  143. package/dist/{tunnel-ids.js → ids/tunnel-ids.js} +1 -0
  144. package/dist/ids/tunnel-ids.js.map +1 -0
  145. package/dist/index.d.ts +423 -450
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +54 -46
  148. package/dist/index.js.map +1 -1
  149. package/dist/{agent-catalog.d.ts → models/agent-catalog.d.ts} +2 -2
  150. package/dist/models/agent-catalog.d.ts.map +1 -0
  151. package/dist/models/agent-catalog.js.map +1 -0
  152. package/dist/models/agent-runtimes.d.ts.map +1 -0
  153. package/dist/models/agent-runtimes.js.map +1 -0
  154. package/dist/{fast-tier.d.ts → models/fast-tier.d.ts} +1 -1
  155. package/dist/models/fast-tier.d.ts.map +1 -0
  156. package/dist/models/fast-tier.js.map +1 -0
  157. package/dist/models/model-order.d.ts.map +1 -0
  158. package/dist/models/model-order.js.map +1 -0
  159. package/dist/{model-pins.d.ts → models/model-pins.d.ts} +1 -1
  160. package/dist/models/model-pins.d.ts.map +1 -0
  161. package/dist/models/model-pins.js.map +1 -0
  162. package/dist/{model-roles.d.ts → models/model-roles.d.ts} +0 -33
  163. package/dist/models/model-roles.d.ts.map +1 -0
  164. package/dist/{model-roles.js → models/model-roles.js} +0 -35
  165. package/dist/models/model-roles.js.map +1 -0
  166. package/dist/{plan-pools.d.ts → models/plan-pools.d.ts} +1 -1
  167. package/dist/models/plan-pools.d.ts.map +1 -0
  168. package/dist/models/plan-pools.js.map +1 -0
  169. package/dist/models/prompt-complexity.d.ts.map +1 -0
  170. package/dist/models/prompt-complexity.js.map +1 -0
  171. package/dist/models/provider-specs.d.ts.map +1 -0
  172. package/dist/models/provider-specs.js.map +1 -0
  173. package/dist/policy/approvals-execution.d.ts.map +1 -0
  174. package/dist/policy/approvals-execution.js.map +1 -0
  175. package/dist/{batch-runs.d.ts → policy/batch-runs.d.ts} +5 -1
  176. package/dist/policy/batch-runs.d.ts.map +1 -0
  177. package/dist/{batch-runs.js → policy/batch-runs.js} +10 -7
  178. package/dist/policy/batch-runs.js.map +1 -0
  179. package/dist/policy/capability-env.d.ts.map +1 -0
  180. package/dist/policy/capability-env.js.map +1 -0
  181. package/dist/policy/capability-secrets.d.ts.map +1 -0
  182. package/dist/policy/capability-secrets.js.map +1 -0
  183. package/dist/{card-status.d.ts → policy/card-status.d.ts} +2 -2
  184. package/dist/policy/card-status.d.ts.map +1 -0
  185. package/dist/{card-status.js → policy/card-status.js} +1 -5
  186. package/dist/policy/card-status.js.map +1 -0
  187. package/dist/{command-classes.d.ts → policy/command-classes.d.ts} +6 -2
  188. package/dist/policy/command-classes.d.ts.map +1 -0
  189. package/dist/{command-classes.js → policy/command-classes.js} +48 -11
  190. package/dist/policy/command-classes.js.map +1 -0
  191. package/dist/{command-run.d.ts → policy/command-run.d.ts} +1 -1
  192. package/dist/policy/command-run.d.ts.map +1 -0
  193. package/dist/policy/command-run.js.map +1 -0
  194. package/dist/policy/control-scopes.d.ts +16 -0
  195. package/dist/policy/control-scopes.d.ts.map +1 -0
  196. package/dist/policy/control-scopes.js +26 -0
  197. package/dist/policy/control-scopes.js.map +1 -0
  198. package/dist/policy/credential-material.d.ts.map +1 -0
  199. package/dist/policy/credential-material.js.map +1 -0
  200. package/dist/policy/needs-action.d.ts.map +1 -0
  201. package/dist/policy/needs-action.js.map +1 -0
  202. package/dist/policy/output-fields.d.ts.map +1 -0
  203. package/dist/policy/output-fields.js.map +1 -0
  204. package/dist/policy/overlay-lint.d.ts.map +1 -0
  205. package/dist/policy/overlay-lint.js.map +1 -0
  206. package/dist/policy/owner-ticket.d.ts.map +1 -0
  207. package/dist/{owner-ticket.js → policy/owner-ticket.js} +1 -1
  208. package/dist/policy/owner-ticket.js.map +1 -0
  209. package/dist/{safety-policy.d.ts → policy/safety-policy.d.ts} +6 -5
  210. package/dist/policy/safety-policy.d.ts.map +1 -0
  211. package/dist/{safety-policy.js → policy/safety-policy.js} +12 -12
  212. package/dist/policy/safety-policy.js.map +1 -0
  213. package/dist/policy/search-globs.d.ts.map +1 -0
  214. package/dist/policy/search-globs.js.map +1 -0
  215. package/dist/protocol/container-requirements.d.ts +20 -0
  216. package/dist/protocol/container-requirements.d.ts.map +1 -0
  217. package/dist/protocol/container-requirements.js +23 -0
  218. package/dist/protocol/container-requirements.js.map +1 -0
  219. package/dist/{host-protocol.d.ts → protocol/host-protocol.d.ts} +1 -0
  220. package/dist/protocol/host-protocol.d.ts.map +1 -0
  221. package/dist/{host-protocol.js → protocol/host-protocol.js} +1 -0
  222. package/dist/protocol/host-protocol.js.map +1 -0
  223. package/dist/protocol/ingress-contract.d.ts.map +1 -0
  224. package/dist/{ingress-contract.js → protocol/ingress-contract.js} +1 -1
  225. package/dist/protocol/ingress-contract.js.map +1 -0
  226. package/dist/protocol/ingress-protocol.d.ts.map +1 -0
  227. package/dist/protocol/ingress-protocol.js.map +1 -0
  228. package/dist/protocol/listener-protocol.d.ts.map +1 -0
  229. package/dist/{listener-protocol.js → protocol/listener-protocol.js} +1 -1
  230. package/dist/protocol/listener-protocol.js.map +1 -0
  231. package/dist/{peer-dial.d.ts → protocol/peer-dial.d.ts} +4 -1
  232. package/dist/protocol/peer-dial.d.ts.map +1 -0
  233. package/dist/{peer-dial.js → protocol/peer-dial.js} +51 -10
  234. package/dist/protocol/peer-dial.js.map +1 -0
  235. package/dist/protocol/peer-mcp-server.d.ts.map +1 -0
  236. package/dist/protocol/peer-mcp-server.js.map +1 -0
  237. package/dist/protocol/request-id.d.ts.map +1 -0
  238. package/dist/protocol/request-id.js.map +1 -0
  239. package/dist/protocol/routes.d.ts.map +1 -0
  240. package/dist/protocol/routes.js.map +1 -0
  241. package/dist/{runner-protocol.d.ts → protocol/runner-protocol.d.ts} +1 -0
  242. package/dist/protocol/runner-protocol.d.ts.map +1 -0
  243. package/dist/{runner-protocol.js → protocol/runner-protocol.js} +2 -1
  244. package/dist/protocol/runner-protocol.js.map +1 -0
  245. package/dist/protocol/sse.d.ts.map +1 -0
  246. package/dist/protocol/sse.js.map +1 -0
  247. package/dist/{terminal-protocol.d.ts → protocol/terminal-protocol.d.ts} +1 -3
  248. package/dist/protocol/terminal-protocol.d.ts.map +1 -0
  249. package/dist/protocol/terminal-protocol.js.map +1 -0
  250. package/dist/protocol/webext-links.d.ts.map +1 -0
  251. package/dist/protocol/webext-links.js.map +1 -0
  252. package/dist/{webext-protocol.d.ts → protocol/webext-protocol.d.ts} +1 -0
  253. package/dist/protocol/webext-protocol.d.ts.map +1 -0
  254. package/dist/{webext-protocol.js → protocol/webext-protocol.js} +1 -0
  255. package/dist/protocol/webext-protocol.js.map +1 -0
  256. package/dist/schemas/activity.d.ts +2 -0
  257. package/dist/schemas/activity.d.ts.map +1 -1
  258. package/dist/schemas/activity.js +4 -0
  259. package/dist/schemas/activity.js.map +1 -1
  260. package/dist/schemas/agent.d.ts +16 -4
  261. package/dist/schemas/agent.d.ts.map +1 -1
  262. package/dist/schemas/agent.js +21 -4
  263. package/dist/schemas/agent.js.map +1 -1
  264. package/dist/schemas/agents.d.ts +17 -4
  265. package/dist/schemas/agents.d.ts.map +1 -1
  266. package/dist/schemas/agents.js +15 -4
  267. package/dist/schemas/agents.js.map +1 -1
  268. package/dist/schemas/approvals.d.ts.map +1 -1
  269. package/dist/schemas/approvals.js.map +1 -1
  270. package/dist/schemas/automations.d.ts +54 -28
  271. package/dist/schemas/automations.d.ts.map +1 -1
  272. package/dist/schemas/automations.js +26 -8
  273. package/dist/schemas/automations.js.map +1 -1
  274. package/dist/schemas/capabilities.d.ts +0 -8
  275. package/dist/schemas/capabilities.d.ts.map +1 -1
  276. package/dist/schemas/capabilities.js +0 -4
  277. package/dist/schemas/capabilities.js.map +1 -1
  278. package/dist/schemas/ci.d.ts +10 -0
  279. package/dist/schemas/ci.d.ts.map +1 -1
  280. package/dist/schemas/ci.js +9 -1
  281. package/dist/schemas/ci.js.map +1 -1
  282. package/dist/schemas/codebase-health.d.ts.map +1 -1
  283. package/dist/schemas/codebase-health.js.map +1 -1
  284. package/dist/schemas/devices.d.ts +90 -0
  285. package/dist/schemas/devices.d.ts.map +1 -1
  286. package/dist/schemas/devices.js +10 -1
  287. package/dist/schemas/devices.js.map +1 -1
  288. package/dist/schemas/engines.d.ts.map +1 -1
  289. package/dist/schemas/engines.js.map +1 -1
  290. package/dist/schemas/environment.d.ts.map +1 -1
  291. package/dist/schemas/environment.js.map +1 -1
  292. package/dist/schemas/exit.d.ts.map +1 -1
  293. package/dist/schemas/exit.js.map +1 -1
  294. package/dist/schemas/extension-updates.d.ts.map +1 -1
  295. package/dist/schemas/extension-updates.js.map +1 -1
  296. package/dist/schemas/git-history.d.ts.map +1 -1
  297. package/dist/schemas/git-history.js.map +1 -1
  298. package/dist/schemas/git.d.ts +80 -16
  299. package/dist/schemas/git.d.ts.map +1 -1
  300. package/dist/schemas/git.js +37 -25
  301. package/dist/schemas/git.js.map +1 -1
  302. package/dist/schemas/history.d.ts.map +1 -1
  303. package/dist/schemas/history.js.map +1 -1
  304. package/dist/schemas/hosts.d.ts.map +1 -1
  305. package/dist/schemas/hosts.js.map +1 -1
  306. package/dist/schemas/inventory.d.ts.map +1 -1
  307. package/dist/schemas/inventory.js.map +1 -1
  308. package/dist/schemas/issues.d.ts +0 -1
  309. package/dist/schemas/issues.d.ts.map +1 -1
  310. package/dist/schemas/issues.js +0 -1
  311. package/dist/schemas/issues.js.map +1 -1
  312. package/dist/schemas/logs.d.ts.map +1 -1
  313. package/dist/schemas/logs.js.map +1 -1
  314. package/dist/schemas/loops.d.ts.map +1 -1
  315. package/dist/schemas/loops.js +1 -1
  316. package/dist/schemas/loops.js.map +1 -1
  317. package/dist/schemas/maintenance.d.ts.map +1 -1
  318. package/dist/schemas/maintenance.js.map +1 -1
  319. package/dist/schemas/marketplace.d.ts +0 -4
  320. package/dist/schemas/marketplace.d.ts.map +1 -1
  321. package/dist/schemas/panels.d.ts.map +1 -1
  322. package/dist/schemas/panels.js.map +1 -1
  323. package/dist/schemas/personas.d.ts +2 -1
  324. package/dist/schemas/personas.d.ts.map +1 -1
  325. package/dist/schemas/personas.js +6 -2
  326. package/dist/schemas/personas.js.map +1 -1
  327. package/dist/schemas/plan-limits.d.ts +2 -4
  328. package/dist/schemas/plan-limits.d.ts.map +1 -1
  329. package/dist/schemas/plan-limits.js +5 -8
  330. package/dist/schemas/plan-limits.js.map +1 -1
  331. package/dist/schemas/ports.d.ts.map +1 -1
  332. package/dist/schemas/ports.js.map +1 -1
  333. package/dist/schemas/provider-oauth.d.ts.map +1 -1
  334. package/dist/schemas/provider-oauth.js.map +1 -1
  335. package/dist/schemas/provider-subscriptions.d.ts +1 -1
  336. package/dist/schemas/provider-subscriptions.d.ts.map +1 -1
  337. package/dist/schemas/provider-subscriptions.js +1 -1
  338. package/dist/schemas/provider-subscriptions.js.map +1 -1
  339. package/dist/schemas/public.d.ts.map +1 -1
  340. package/dist/schemas/public.js.map +1 -1
  341. package/dist/schemas/push.d.ts.map +1 -1
  342. package/dist/schemas/push.js.map +1 -1
  343. package/dist/schemas/secrets.d.ts.map +1 -1
  344. package/dist/schemas/secrets.js.map +1 -1
  345. package/dist/schemas/settings.d.ts +6 -9
  346. package/dist/schemas/settings.d.ts.map +1 -1
  347. package/dist/schemas/settings.js +16 -5
  348. package/dist/schemas/settings.js.map +1 -1
  349. package/dist/schemas/share.d.ts.map +1 -1
  350. package/dist/schemas/share.js.map +1 -1
  351. package/dist/schemas/shared.d.ts +4 -0
  352. package/dist/schemas/shared.d.ts.map +1 -1
  353. package/dist/schemas/shared.js +3 -0
  354. package/dist/schemas/shared.js.map +1 -1
  355. package/dist/schemas/system.d.ts +6 -0
  356. package/dist/schemas/system.d.ts.map +1 -1
  357. package/dist/schemas/system.js +10 -0
  358. package/dist/schemas/system.js.map +1 -1
  359. package/dist/schemas/terminal.d.ts.map +1 -1
  360. package/dist/schemas/terminal.js.map +1 -1
  361. package/dist/schemas/usage.d.ts.map +1 -1
  362. package/dist/schemas/usage.js.map +1 -1
  363. package/dist/schemas/vpn.d.ts.map +1 -1
  364. package/dist/schemas/vpn.js.map +1 -1
  365. package/dist/schemas/webext.d.ts.map +1 -1
  366. package/dist/schemas/webext.js.map +1 -1
  367. package/dist/schemas/workflows.d.ts +66 -9
  368. package/dist/schemas/workflows.d.ts.map +1 -1
  369. package/dist/schemas/workflows.js +6 -5
  370. package/dist/schemas/workflows.js.map +1 -1
  371. package/dist/schemas/workspace-repos.d.ts.map +1 -1
  372. package/dist/schemas/workspace-repos.js.map +1 -1
  373. package/dist/schemas/workspace-search.d.ts.map +1 -1
  374. package/dist/schemas/workspace-search.js.map +1 -1
  375. package/dist/schemas/workspace-setup.d.ts.map +1 -1
  376. package/dist/schemas/workspace-setup.js.map +1 -1
  377. package/dist/schemas/workspace-tree.d.ts.map +1 -1
  378. package/dist/schemas/workspace-tree.js.map +1 -1
  379. package/dist/state/arrival.d.ts.map +1 -0
  380. package/dist/{arrival.js → state/arrival.js} +1 -1
  381. package/dist/state/arrival.js.map +1 -0
  382. package/dist/state/contract-lock.d.ts.map +1 -0
  383. package/dist/{contract-lock.js → state/contract-lock.js} +1 -1
  384. package/dist/state/contract-lock.js.map +1 -0
  385. package/dist/{definition.d.ts → state/definition.d.ts} +21 -17
  386. package/dist/state/definition.d.ts.map +1 -0
  387. package/dist/{definition.js → state/definition.js} +4 -4
  388. package/dist/state/definition.js.map +1 -0
  389. package/dist/state/history-state.d.ts.map +1 -0
  390. package/dist/{history-state.js → state/history-state.js} +1 -0
  391. package/dist/state/history-state.js.map +1 -0
  392. package/dist/state/runtime-state.d.ts.map +1 -0
  393. package/dist/state/runtime-state.js.map +1 -0
  394. package/dist/state/starter.d.ts.map +1 -0
  395. package/dist/state/starter.js.map +1 -0
  396. package/dist/state/state-portability.d.ts.map +1 -0
  397. package/dist/state/state-portability.js.map +1 -0
  398. package/dist/state/versions.d.ts.map +1 -0
  399. package/dist/state/versions.js.map +1 -0
  400. package/dist/{workspace-state.d.ts → state/workspace-state.d.ts} +8 -0
  401. package/dist/state/workspace-state.d.ts.map +1 -0
  402. package/dist/{workspace-state.js → state/workspace-state.js} +25 -0
  403. package/dist/state/workspace-state.js.map +1 -0
  404. package/dist/{documents.d.ts → text/documents.d.ts} +1 -1
  405. package/dist/text/documents.d.ts.map +1 -0
  406. package/dist/{documents.js → text/documents.js} +1 -1
  407. package/dist/text/documents.js.map +1 -0
  408. package/dist/text/embed.d.ts.map +1 -0
  409. package/dist/text/embed.js.map +1 -0
  410. package/dist/text/mentions.d.ts.map +1 -0
  411. package/dist/text/mentions.js.map +1 -0
  412. package/dist/text/model-answer.d.ts +3 -0
  413. package/dist/text/model-answer.d.ts.map +1 -0
  414. package/dist/text/model-answer.js +3 -0
  415. package/dist/text/model-answer.js.map +1 -0
  416. package/dist/text/path-refs.d.ts.map +1 -0
  417. package/dist/text/path-refs.js.map +1 -0
  418. package/dist/{shell-regions.d.ts → text/shell-regions.d.ts} +1 -1
  419. package/dist/text/shell-regions.d.ts.map +1 -0
  420. package/dist/text/shell-regions.js.map +1 -0
  421. package/dist/text/title.d.ts.map +1 -0
  422. package/dist/text/title.js.map +1 -0
  423. package/dist/{transcript-fold.d.ts → text/transcript-fold.d.ts} +2 -1
  424. package/dist/text/transcript-fold.d.ts.map +1 -0
  425. package/dist/{transcript-fold.js → text/transcript-fold.js} +2 -16
  426. package/dist/text/transcript-fold.js.map +1 -0
  427. package/dist/text/whisper.d.ts +3 -0
  428. package/dist/text/whisper.d.ts.map +1 -0
  429. package/dist/text/whisper.js +11 -0
  430. package/dist/text/whisper.js.map +1 -0
  431. package/dist/{workflow-faults.d.ts → text/workflow-faults.d.ts} +1 -1
  432. package/dist/text/workflow-faults.d.ts.map +1 -0
  433. package/dist/{workflow-faults.js → text/workflow-faults.js} +1 -1
  434. package/dist/text/workflow-faults.js.map +1 -0
  435. package/package.json +70 -70
  436. package/src/chores/chores.test.ts +4 -10
  437. package/src/chores/chores.ts +148 -392
  438. package/src/chores/digest.ts +8 -28
  439. package/src/chores/extension-update.ts +3 -8
  440. package/src/chores/fix-deps.ts +4 -18
  441. package/src/chores/index.ts +2 -2
  442. package/src/chores/probes.test.ts +7 -43
  443. package/src/chores/probes.ts +62 -167
  444. package/src/chores/prompt.ts +10 -34
  445. package/src/chores/stack.test.ts +6 -45
  446. package/src/chores/stack.ts +27 -118
  447. package/src/chores/verdict.test.ts +101 -80
  448. package/src/chores/verdict.ts +54 -99
  449. package/src/contracts/accounts.contract.ts +4 -19
  450. package/src/contracts/agent.contract.ts +7 -22
  451. package/src/contracts/agents.contract.ts +25 -71
  452. package/src/contracts/automations.contract.ts +14 -30
  453. package/src/contracts/capabilities.contract.ts +8 -35
  454. package/src/contracts/chores.contract.ts +4 -15
  455. package/src/contracts/endpoints.contract.ts +5 -22
  456. package/src/contracts/exit.contract.ts +7 -30
  457. package/src/contracts/extensions.contract.ts +8 -30
  458. package/src/contracts/git.contract.ts +25 -49
  459. package/src/contracts/host.contract.ts +9 -44
  460. package/src/contracts/intentic.contract.ts +1 -1
  461. package/src/contracts/logs.contract.ts +3 -13
  462. package/src/contracts/loops.contract.ts +9 -40
  463. package/src/contracts/personas.contract.ts +10 -35
  464. package/src/contracts/providers.contract.ts +4 -17
  465. package/src/contracts/runner.contract.ts +12 -39
  466. package/src/contracts/safety.contract.ts +5 -14
  467. package/src/contracts/secrets.contract.ts +4 -22
  468. package/src/contracts/sessions.contract.ts +1 -1
  469. package/src/contracts/settings.contract.ts +4 -10
  470. package/src/contracts/share.contract.ts +3 -9
  471. package/src/contracts/skills.contract.ts +4 -15
  472. package/src/contracts/system.contract.ts +26 -52
  473. package/src/contracts/usage.contract.ts +7 -21
  474. package/src/contracts/vpn.contract.ts +9 -16
  475. package/src/contracts/webext.contract.ts +9 -25
  476. package/src/contracts/workflows.contract.ts +34 -58
  477. package/src/contracts/workspace.contract.ts +19 -50
  478. package/src/events/agent-events.ts +345 -0
  479. package/src/events/cards.ts +286 -0
  480. package/src/{events.test.ts → events/resume.test.ts} +4 -19
  481. package/src/events/resume.ts +60 -0
  482. package/src/events/system-events.ts +139 -0
  483. package/src/events/transcript.ts +320 -0
  484. package/src/{conversation-ids.test.ts → ids/conversation-ids.test.ts} +25 -13
  485. package/src/ids/conversation-ids.ts +178 -0
  486. package/src/ids/hostnames.ts +129 -0
  487. package/src/ids/session-names.ts +29 -0
  488. package/src/ids/share-paths.ts +43 -0
  489. package/src/{tunnel-ids.test.ts → ids/tunnel-ids.test.ts} +1 -14
  490. package/src/ids/tunnel-ids.ts +29 -0
  491. package/src/index.ts +71 -87
  492. package/src/{agent-catalog.test.ts → models/agent-catalog.test.ts} +19 -93
  493. package/src/models/agent-catalog.ts +174 -0
  494. package/src/models/agent-runtimes.ts +201 -0
  495. package/src/models/capability-ledger.test.ts +84 -0
  496. package/src/{fast-tier.test.ts → models/fast-tier.test.ts} +7 -18
  497. package/src/models/fast-tier.ts +36 -0
  498. package/src/{model-order.test.ts → models/model-order.test.ts} +19 -40
  499. package/src/models/model-order.ts +163 -0
  500. package/src/{model-pins.test.ts → models/model-pins.test.ts} +12 -46
  501. package/src/models/model-pins.ts +57 -0
  502. package/src/models/model-roles.test.ts +38 -0
  503. package/src/models/model-roles.ts +180 -0
  504. package/src/{plan-pools.test.ts → models/plan-pools.test.ts} +6 -11
  505. package/src/models/plan-pools.ts +65 -0
  506. package/src/{prompt-complexity.test.ts → models/prompt-complexity.test.ts} +8 -60
  507. package/src/models/prompt-complexity.ts +215 -0
  508. package/src/{provider-specs.test.ts → models/provider-specs.test.ts} +18 -47
  509. package/src/models/provider-specs.ts +272 -0
  510. package/src/policy/approvals-execution.ts +58 -0
  511. package/src/{batch-runs.test.ts → policy/batch-runs.test.ts} +4 -20
  512. package/src/policy/batch-runs.ts +137 -0
  513. package/src/policy/capability-secrets.ts +5 -0
  514. package/src/{card-status.ts → policy/card-status.ts} +11 -26
  515. package/src/{command-classes.test.ts → policy/command-classes.test.ts} +11 -118
  516. package/src/policy/command-classes.ts +395 -0
  517. package/src/policy/command-run.ts +65 -0
  518. package/src/policy/control-scopes.ts +38 -0
  519. package/src/{credential-material.test.ts → policy/credential-material.test.ts} +4 -26
  520. package/src/policy/credential-material.ts +91 -0
  521. package/src/policy/needs-action.ts +5 -0
  522. package/src/policy/output-fields.ts +86 -0
  523. package/src/policy/overlay-lint.ts +100 -0
  524. package/src/{owner-ticket.test.ts → policy/owner-ticket.test.ts} +1 -1
  525. package/src/{owner-ticket.ts → policy/owner-ticket.ts} +9 -31
  526. package/src/policy/safety-policy.test.ts +84 -0
  527. package/src/policy/safety-policy.ts +142 -0
  528. package/src/policy/search-globs.ts +60 -0
  529. package/src/protocol/container-requirements.test.ts +72 -0
  530. package/src/protocol/container-requirements.ts +58 -0
  531. package/src/protocol/host-protocol.ts +29 -0
  532. package/src/protocol/ingress-contract.ts +103 -0
  533. package/src/{ingress-protocol.test.ts → protocol/ingress-protocol.test.ts} +25 -90
  534. package/src/protocol/ingress-protocol.ts +441 -0
  535. package/src/protocol/listener-protocol.ts +75 -0
  536. package/src/{peer-dial.test.ts → protocol/peer-dial.test.ts} +52 -1
  537. package/src/protocol/peer-dial.ts +207 -0
  538. package/src/{peer-mcp-server.ts → protocol/peer-mcp-server.ts} +16 -41
  539. package/src/protocol/request-id.ts +5 -0
  540. package/src/{routes.test.ts → protocol/routes.test.ts} +14 -22
  541. package/src/protocol/routes.ts +159 -0
  542. package/src/protocol/runner-protocol.ts +197 -0
  543. package/src/protocol/terminal-protocol.ts +13 -0
  544. package/src/protocol/webext-links.ts +50 -0
  545. package/src/protocol/webext-protocol.ts +24 -0
  546. package/src/schemas/activity.ts +22 -30
  547. package/src/schemas/agent.ts +130 -238
  548. package/src/schemas/agents.ts +165 -483
  549. package/src/schemas/approvals.ts +23 -71
  550. package/src/schemas/automations.ts +142 -250
  551. package/src/schemas/capabilities.ts +127 -414
  552. package/src/schemas/ci.ts +56 -108
  553. package/src/schemas/codebase-health.ts +7 -11
  554. package/src/schemas/devices.ts +98 -321
  555. package/src/schemas/engines.ts +16 -44
  556. package/src/schemas/environment.ts +41 -91
  557. package/src/schemas/exit.ts +24 -81
  558. package/src/schemas/extension-updates.ts +42 -87
  559. package/src/schemas/git-history.ts +30 -84
  560. package/src/schemas/git.ts +141 -256
  561. package/src/schemas/history.ts +14 -40
  562. package/src/schemas/hosts.ts +9 -15
  563. package/src/schemas/inventory.ts +8 -10
  564. package/src/schemas/issues.ts +66 -134
  565. package/src/schemas/logs.ts +15 -34
  566. package/src/schemas/loops.ts +46 -163
  567. package/src/schemas/maintenance.ts +47 -172
  568. package/src/schemas/panels.ts +20 -45
  569. package/src/schemas/personas.ts +50 -200
  570. package/src/schemas/plan-limits.ts +58 -197
  571. package/src/schemas/ports.ts +14 -32
  572. package/src/schemas/provider-oauth.ts +23 -76
  573. package/src/schemas/provider-subscriptions.ts +4 -13
  574. package/src/schemas/public.ts +4 -15
  575. package/src/schemas/push.ts +8 -36
  576. package/src/schemas/secrets.ts +20 -64
  577. package/src/schemas/settings.ts +175 -600
  578. package/src/schemas/share.ts +14 -32
  579. package/src/schemas/shared.ts +14 -13
  580. package/src/schemas/system.ts +46 -78
  581. package/src/schemas/terminal.ts +41 -120
  582. package/src/schemas/usage.ts +44 -233
  583. package/src/schemas/version-seam.test.ts +9 -26
  584. package/src/schemas/vpn.ts +27 -64
  585. package/src/schemas/webext.ts +22 -53
  586. package/src/schemas/workflows.ts +57 -183
  587. package/src/schemas/workspace-repos.ts +12 -24
  588. package/src/schemas/workspace-search.ts +17 -35
  589. package/src/schemas/workspace-setup.ts +4 -11
  590. package/src/schemas/workspace-tree.ts +32 -91
  591. package/src/state/arrival.ts +109 -0
  592. package/src/state/contract-lock.test.ts +17 -0
  593. package/src/state/contract-lock.ts +49 -0
  594. package/src/state/definition.ts +143 -0
  595. package/src/state/history-state.ts +103 -0
  596. package/src/{runtime-state.test.ts → state/runtime-state.test.ts} +3 -10
  597. package/src/state/runtime-state.ts +62 -0
  598. package/src/state/starter.ts +5 -0
  599. package/src/state/state-portability.ts +27 -0
  600. package/src/state/versions.ts +26 -0
  601. package/src/{workspace-state.test.ts → state/workspace-state.test.ts} +65 -172
  602. package/src/state/workspace-state.ts +669 -0
  603. package/src/{documents.test.ts → text/documents.test.ts} +1 -1
  604. package/src/text/documents.ts +42 -0
  605. package/src/text/embed.ts +132 -0
  606. package/src/text/mentions.ts +21 -0
  607. package/src/text/model-answer.ts +9 -0
  608. package/src/text/path-refs.ts +39 -0
  609. package/src/text/shell-regions.ts +224 -0
  610. package/src/{title.test.ts → text/title.test.ts} +13 -32
  611. package/src/text/title.ts +202 -0
  612. package/src/{transcript-fold.test.ts → text/transcript-fold.test.ts} +5 -83
  613. package/src/{transcript-fold.ts → text/transcript-fold.ts} +65 -170
  614. package/src/text/whisper.test.ts +19 -0
  615. package/src/text/whisper.ts +17 -0
  616. package/src/{workflow-faults.test.ts → text/workflow-faults.test.ts} +6 -24
  617. package/src/{workflow-faults.ts → text/workflow-faults.ts} +20 -60
  618. package/dist/agent-catalog.d.ts.map +0 -1
  619. package/dist/agent-catalog.js.map +0 -1
  620. package/dist/agent-runtimes.d.ts.map +0 -1
  621. package/dist/agent-runtimes.js.map +0 -1
  622. package/dist/approvals-execution.d.ts.map +0 -1
  623. package/dist/approvals-execution.js.map +0 -1
  624. package/dist/arrival.d.ts.map +0 -1
  625. package/dist/arrival.js.map +0 -1
  626. package/dist/batch-runs.d.ts.map +0 -1
  627. package/dist/batch-runs.js.map +0 -1
  628. package/dist/capability-env.d.ts.map +0 -1
  629. package/dist/capability-env.js.map +0 -1
  630. package/dist/capability-secrets.d.ts.map +0 -1
  631. package/dist/capability-secrets.js.map +0 -1
  632. package/dist/card-status.d.ts.map +0 -1
  633. package/dist/card-status.js.map +0 -1
  634. package/dist/command-classes.d.ts.map +0 -1
  635. package/dist/command-classes.js.map +0 -1
  636. package/dist/command-run.d.ts.map +0 -1
  637. package/dist/command-run.js.map +0 -1
  638. package/dist/contract-lock.d.ts.map +0 -1
  639. package/dist/contract-lock.js.map +0 -1
  640. package/dist/conversation-ids.d.ts +0 -4
  641. package/dist/conversation-ids.d.ts.map +0 -1
  642. package/dist/conversation-ids.js.map +0 -1
  643. package/dist/credential-material.d.ts.map +0 -1
  644. package/dist/credential-material.js.map +0 -1
  645. package/dist/definition.d.ts.map +0 -1
  646. package/dist/definition.js.map +0 -1
  647. package/dist/documents.d.ts.map +0 -1
  648. package/dist/documents.js.map +0 -1
  649. package/dist/embed.d.ts.map +0 -1
  650. package/dist/embed.js.map +0 -1
  651. package/dist/events.d.ts +0 -4336
  652. package/dist/events.d.ts.map +0 -1
  653. package/dist/events.js +0 -725
  654. package/dist/events.js.map +0 -1
  655. package/dist/fast-tier.d.ts.map +0 -1
  656. package/dist/fast-tier.js.map +0 -1
  657. package/dist/history-state.d.ts.map +0 -1
  658. package/dist/history-state.js.map +0 -1
  659. package/dist/host-protocol.d.ts.map +0 -1
  660. package/dist/host-protocol.js.map +0 -1
  661. package/dist/hostnames.d.ts.map +0 -1
  662. package/dist/hostnames.js.map +0 -1
  663. package/dist/ingress-contract.d.ts.map +0 -1
  664. package/dist/ingress-contract.js.map +0 -1
  665. package/dist/ingress-protocol.d.ts.map +0 -1
  666. package/dist/ingress-protocol.js.map +0 -1
  667. package/dist/listener-protocol.d.ts.map +0 -1
  668. package/dist/listener-protocol.js.map +0 -1
  669. package/dist/mentions.d.ts.map +0 -1
  670. package/dist/mentions.js.map +0 -1
  671. package/dist/model-order.d.ts.map +0 -1
  672. package/dist/model-order.js.map +0 -1
  673. package/dist/model-pins.d.ts.map +0 -1
  674. package/dist/model-pins.js.map +0 -1
  675. package/dist/model-roles.d.ts.map +0 -1
  676. package/dist/model-roles.js.map +0 -1
  677. package/dist/needs-action.d.ts.map +0 -1
  678. package/dist/needs-action.js.map +0 -1
  679. package/dist/output-fields.d.ts.map +0 -1
  680. package/dist/output-fields.js.map +0 -1
  681. package/dist/overlay-lint.d.ts.map +0 -1
  682. package/dist/overlay-lint.js.map +0 -1
  683. package/dist/owner-ticket.d.ts.map +0 -1
  684. package/dist/owner-ticket.js.map +0 -1
  685. package/dist/path-refs.d.ts.map +0 -1
  686. package/dist/path-refs.js.map +0 -1
  687. package/dist/peer-dial.d.ts.map +0 -1
  688. package/dist/peer-dial.js.map +0 -1
  689. package/dist/peer-mcp-server.d.ts.map +0 -1
  690. package/dist/peer-mcp-server.js.map +0 -1
  691. package/dist/plan-pools.d.ts.map +0 -1
  692. package/dist/plan-pools.js.map +0 -1
  693. package/dist/prompt-complexity.d.ts.map +0 -1
  694. package/dist/prompt-complexity.js.map +0 -1
  695. package/dist/provider-specs.d.ts.map +0 -1
  696. package/dist/provider-specs.js.map +0 -1
  697. package/dist/request-id.d.ts.map +0 -1
  698. package/dist/request-id.js.map +0 -1
  699. package/dist/routes.d.ts.map +0 -1
  700. package/dist/routes.js.map +0 -1
  701. package/dist/runner-protocol.d.ts.map +0 -1
  702. package/dist/runner-protocol.js.map +0 -1
  703. package/dist/runtime-state.d.ts.map +0 -1
  704. package/dist/runtime-state.js.map +0 -1
  705. package/dist/safety-policy.d.ts.map +0 -1
  706. package/dist/safety-policy.js.map +0 -1
  707. package/dist/search-globs.d.ts.map +0 -1
  708. package/dist/search-globs.js.map +0 -1
  709. package/dist/session-names.d.ts.map +0 -1
  710. package/dist/session-names.js.map +0 -1
  711. package/dist/share-paths.d.ts.map +0 -1
  712. package/dist/share-paths.js.map +0 -1
  713. package/dist/shell-regions.d.ts.map +0 -1
  714. package/dist/shell-regions.js.map +0 -1
  715. package/dist/sse.d.ts.map +0 -1
  716. package/dist/sse.js.map +0 -1
  717. package/dist/starter.d.ts.map +0 -1
  718. package/dist/starter.js.map +0 -1
  719. package/dist/state-portability.d.ts.map +0 -1
  720. package/dist/state-portability.js.map +0 -1
  721. package/dist/terminal-protocol.d.ts.map +0 -1
  722. package/dist/terminal-protocol.js.map +0 -1
  723. package/dist/title.d.ts.map +0 -1
  724. package/dist/title.js.map +0 -1
  725. package/dist/transcript-fold.d.ts.map +0 -1
  726. package/dist/transcript-fold.js.map +0 -1
  727. package/dist/tunnel-ids.d.ts.map +0 -1
  728. package/dist/tunnel-ids.js.map +0 -1
  729. package/dist/versions.d.ts.map +0 -1
  730. package/dist/versions.js.map +0 -1
  731. package/dist/webext-links.d.ts.map +0 -1
  732. package/dist/webext-links.js.map +0 -1
  733. package/dist/webext-protocol.d.ts.map +0 -1
  734. package/dist/webext-protocol.js.map +0 -1
  735. package/dist/workflow-faults.d.ts.map +0 -1
  736. package/dist/workflow-faults.js.map +0 -1
  737. package/dist/workspace-state.d.ts.map +0 -1
  738. package/dist/workspace-state.js.map +0 -1
  739. package/src/agent-catalog.ts +0 -316
  740. package/src/agent-runtimes.ts +0 -419
  741. package/src/approvals-execution.ts +0 -96
  742. package/src/arrival.ts +0 -160
  743. package/src/batch-runs.ts +0 -188
  744. package/src/capability-ledger.test.ts +0 -140
  745. package/src/capability-secrets.ts +0 -20
  746. package/src/command-classes.ts +0 -617
  747. package/src/command-run.ts +0 -78
  748. package/src/contract-lock.test.ts +0 -23
  749. package/src/contract-lock.ts +0 -66
  750. package/src/conversation-ids.ts +0 -207
  751. package/src/credential-material.ts +0 -181
  752. package/src/definition.ts +0 -207
  753. package/src/documents.ts +0 -67
  754. package/src/embed.ts +0 -164
  755. package/src/events.ts +0 -1870
  756. package/src/fast-tier.ts +0 -72
  757. package/src/history-state.ts +0 -174
  758. package/src/host-protocol.ts +0 -36
  759. package/src/hostnames.ts +0 -180
  760. package/src/ingress-contract.ts +0 -157
  761. package/src/ingress-protocol.ts +0 -625
  762. package/src/listener-protocol.ts +0 -96
  763. package/src/mentions.ts +0 -25
  764. package/src/model-order.ts +0 -262
  765. package/src/model-pins.ts +0 -132
  766. package/src/model-roles.test.ts +0 -52
  767. package/src/model-roles.ts +0 -320
  768. package/src/needs-action.ts +0 -14
  769. package/src/output-fields.ts +0 -111
  770. package/src/overlay-lint.ts +0 -116
  771. package/src/path-refs.ts +0 -59
  772. package/src/peer-dial.ts +0 -163
  773. package/src/plan-pools.ts +0 -92
  774. package/src/prompt-complexity.ts +0 -334
  775. package/src/provider-specs.ts +0 -432
  776. package/src/request-id.ts +0 -41
  777. package/src/routes.ts +0 -219
  778. package/src/runner-protocol.ts +0 -239
  779. package/src/runtime-state.ts +0 -140
  780. package/src/safety-policy.test.ts +0 -88
  781. package/src/safety-policy.ts +0 -258
  782. package/src/search-globs.ts +0 -76
  783. package/src/session-names.ts +0 -44
  784. package/src/share-paths.ts +0 -68
  785. package/src/shell-regions.ts +0 -289
  786. package/src/starter.ts +0 -13
  787. package/src/state-portability.ts +0 -56
  788. package/src/terminal-protocol.ts +0 -16
  789. package/src/title.ts +0 -267
  790. package/src/tunnel-ids.ts +0 -57
  791. package/src/versions.ts +0 -48
  792. package/src/webext-links.ts +0 -90
  793. package/src/webext-protocol.ts +0 -27
  794. package/src/workspace-state.ts +0 -1090
  795. /package/dist/{hostnames.d.ts → ids/hostnames.d.ts} +0 -0
  796. /package/dist/{hostnames.js → ids/hostnames.js} +0 -0
  797. /package/dist/{session-names.d.ts → ids/session-names.d.ts} +0 -0
  798. /package/dist/{session-names.js → ids/session-names.js} +0 -0
  799. /package/dist/{share-paths.d.ts → ids/share-paths.d.ts} +0 -0
  800. /package/dist/{share-paths.js → ids/share-paths.js} +0 -0
  801. /package/dist/{agent-catalog.js → models/agent-catalog.js} +0 -0
  802. /package/dist/{agent-runtimes.d.ts → models/agent-runtimes.d.ts} +0 -0
  803. /package/dist/{agent-runtimes.js → models/agent-runtimes.js} +0 -0
  804. /package/dist/{fast-tier.js → models/fast-tier.js} +0 -0
  805. /package/dist/{model-order.d.ts → models/model-order.d.ts} +0 -0
  806. /package/dist/{model-order.js → models/model-order.js} +0 -0
  807. /package/dist/{model-pins.js → models/model-pins.js} +0 -0
  808. /package/dist/{plan-pools.js → models/plan-pools.js} +0 -0
  809. /package/dist/{prompt-complexity.d.ts → models/prompt-complexity.d.ts} +0 -0
  810. /package/dist/{prompt-complexity.js → models/prompt-complexity.js} +0 -0
  811. /package/dist/{provider-specs.d.ts → models/provider-specs.d.ts} +0 -0
  812. /package/dist/{provider-specs.js → models/provider-specs.js} +0 -0
  813. /package/dist/{approvals-execution.d.ts → policy/approvals-execution.d.ts} +0 -0
  814. /package/dist/{approvals-execution.js → policy/approvals-execution.js} +0 -0
  815. /package/dist/{capability-env.d.ts → policy/capability-env.d.ts} +0 -0
  816. /package/dist/{capability-env.js → policy/capability-env.js} +0 -0
  817. /package/dist/{capability-secrets.d.ts → policy/capability-secrets.d.ts} +0 -0
  818. /package/dist/{capability-secrets.js → policy/capability-secrets.js} +0 -0
  819. /package/dist/{command-run.js → policy/command-run.js} +0 -0
  820. /package/dist/{credential-material.d.ts → policy/credential-material.d.ts} +0 -0
  821. /package/dist/{credential-material.js → policy/credential-material.js} +0 -0
  822. /package/dist/{needs-action.d.ts → policy/needs-action.d.ts} +0 -0
  823. /package/dist/{needs-action.js → policy/needs-action.js} +0 -0
  824. /package/dist/{output-fields.d.ts → policy/output-fields.d.ts} +0 -0
  825. /package/dist/{output-fields.js → policy/output-fields.js} +0 -0
  826. /package/dist/{overlay-lint.d.ts → policy/overlay-lint.d.ts} +0 -0
  827. /package/dist/{overlay-lint.js → policy/overlay-lint.js} +0 -0
  828. /package/dist/{owner-ticket.d.ts → policy/owner-ticket.d.ts} +0 -0
  829. /package/dist/{search-globs.d.ts → policy/search-globs.d.ts} +0 -0
  830. /package/dist/{search-globs.js → policy/search-globs.js} +0 -0
  831. /package/dist/{ingress-contract.d.ts → protocol/ingress-contract.d.ts} +0 -0
  832. /package/dist/{ingress-protocol.d.ts → protocol/ingress-protocol.d.ts} +0 -0
  833. /package/dist/{ingress-protocol.js → protocol/ingress-protocol.js} +0 -0
  834. /package/dist/{listener-protocol.d.ts → protocol/listener-protocol.d.ts} +0 -0
  835. /package/dist/{peer-mcp-server.d.ts → protocol/peer-mcp-server.d.ts} +0 -0
  836. /package/dist/{peer-mcp-server.js → protocol/peer-mcp-server.js} +0 -0
  837. /package/dist/{request-id.d.ts → protocol/request-id.d.ts} +0 -0
  838. /package/dist/{request-id.js → protocol/request-id.js} +0 -0
  839. /package/dist/{routes.d.ts → protocol/routes.d.ts} +0 -0
  840. /package/dist/{routes.js → protocol/routes.js} +0 -0
  841. /package/dist/{sse.d.ts → protocol/sse.d.ts} +0 -0
  842. /package/dist/{sse.js → protocol/sse.js} +0 -0
  843. /package/dist/{terminal-protocol.js → protocol/terminal-protocol.js} +0 -0
  844. /package/dist/{webext-links.d.ts → protocol/webext-links.d.ts} +0 -0
  845. /package/dist/{webext-links.js → protocol/webext-links.js} +0 -0
  846. /package/dist/{arrival.d.ts → state/arrival.d.ts} +0 -0
  847. /package/dist/{contract-lock.d.ts → state/contract-lock.d.ts} +0 -0
  848. /package/dist/{history-state.d.ts → state/history-state.d.ts} +0 -0
  849. /package/dist/{runtime-state.d.ts → state/runtime-state.d.ts} +0 -0
  850. /package/dist/{runtime-state.js → state/runtime-state.js} +0 -0
  851. /package/dist/{starter.d.ts → state/starter.d.ts} +0 -0
  852. /package/dist/{starter.js → state/starter.js} +0 -0
  853. /package/dist/{state-portability.d.ts → state/state-portability.d.ts} +0 -0
  854. /package/dist/{state-portability.js → state/state-portability.js} +0 -0
  855. /package/dist/{versions.d.ts → state/versions.d.ts} +0 -0
  856. /package/dist/{versions.js → state/versions.js} +0 -0
  857. /package/dist/{embed.d.ts → text/embed.d.ts} +0 -0
  858. /package/dist/{embed.js → text/embed.js} +0 -0
  859. /package/dist/{mentions.d.ts → text/mentions.d.ts} +0 -0
  860. /package/dist/{mentions.js → text/mentions.js} +0 -0
  861. /package/dist/{path-refs.d.ts → text/path-refs.d.ts} +0 -0
  862. /package/dist/{path-refs.js → text/path-refs.js} +0 -0
  863. /package/dist/{shell-regions.js → text/shell-regions.js} +0 -0
  864. /package/dist/{title.d.ts → text/title.d.ts} +0 -0
  865. /package/dist/{title.js → text/title.js} +0 -0
  866. /package/src/{hostnames.test.ts → ids/hostnames.test.ts} +0 -0
  867. /package/src/{share-paths.test.ts → ids/share-paths.test.ts} +0 -0
  868. /package/src/{capability-env.ts → policy/capability-env.ts} +0 -0
  869. /package/src/{overlay-lint.test.ts → policy/overlay-lint.test.ts} +0 -0
  870. /package/src/{search-globs.test.ts → policy/search-globs.test.ts} +0 -0
  871. /package/src/{ingress-contract.test.ts → protocol/ingress-contract.test.ts} +0 -0
  872. /package/src/{peer-mcp-server.test.ts → protocol/peer-mcp-server.test.ts} +0 -0
  873. /package/src/{sse.ts → protocol/sse.ts} +0 -0
  874. /package/src/{versions.test.ts → state/versions.test.ts} +0 -0
  875. /package/src/{embed.test.ts → text/embed.test.ts} +0 -0
  876. /package/src/{mentions.test.ts → text/mentions.test.ts} +0 -0
  877. /package/src/{path-refs.test.ts → text/path-refs.test.ts} +0 -0
@@ -1,14 +1,12 @@
1
- // Capabilities: the one `{ id, kind, config }` entry every connection a sandbox holds is written as.
2
- // The config arm per kind, the discriminated union over them, and what the Capabilities page reads:
3
- // each row's live status, the probe behind it, and the connect/rename/sign-in inputs.
1
+ // The one `{ id, kind, config }` shape every sandbox connection is written as: the config arm per kind, the union over
2
+ // them, and what the Capabilities page reads (status, probe, connect/rename/sign-in inputs).
4
3
  import { z } from "zod";
5
4
  import { ExitConfigSchema } from "./exit.js";
6
5
  import { entryId } from "./internal.js";
7
6
  import { ServiceKindSchema } from "./inventory.js";
8
7
  import { VpnConfigSchema } from "./vpn.js";
9
- // Everything a user adds to a sandbox is a capability with an idempotent apply + a status check. The manifest is
10
- // the source of truth for what's active; `mcp`-kind entries also feed the agent's MCP servers each turn. DevOps
11
- // is the capability that scaffolds the intent/desired-state repos, until it's active the sandbox is empty.
8
+ // Everything a user adds is a capability with an idempotent apply plus a status check; the manifest is the source of
9
+ // truth for what's active, and `mcp`-kind entries also feed the agent's MCP servers each turn.
12
10
 
13
11
  export const CapabilityKindSchema = z.enum([
14
12
  "devops",
@@ -46,20 +44,15 @@ export const ServiceConfigSchema = z.object({
46
44
  on: z.string().min(1).describe("Which machine to put it on."),
47
45
  expose: z.string().min(1).describe("How it should be reachable."),
48
46
  });
49
- // External-app credential injected into DEPLOYED apps (i.have.stripe → STRIPE_API_KEY from env). Agent-facing
50
- // connectors are `cli` capabilities instead (see below), not integrations.
51
- // Closed, unlike a `cli` provider: this becomes an `i.have.<provider>` entry in deploy.config.ts, and the
52
- // desired-state resolver only knows the providers in InventoryProviderSchema. So an integration card is NOT
53
- // extension-contributable, the vocabulary belongs to the deploy engine, not to a manifest.
47
+ // External-app credential injected into deployed apps (i.have.stripe → STRIPE_API_KEY), not agent-facing like `cli`.
48
+ // Closed, unlike `cli`: it becomes an `i.have.<provider>` deploy.config.ts entry, so the vocabulary belongs to the
49
+ // deploy engine, not an extension.
54
50
  export const IntegrationConfigSchema = z.object({
55
51
  provider: z.literal("stripe").describe("Which outside service's credential to make available to deployed apps."),
56
52
  });
57
- // A `cli` capability gives the AGENT an authenticated command-line tool (not a deployed-app credential like
58
- // `integration`): the credential + any non-secret URL are stored here and injected into the agent's env each
59
- // turn (see cliEnvOf), and an .agents/skills/<id> cheatsheet teaches the agent to use it via curl. The provider
60
- // data (fields, env, skill, image fragment) is DATA in an installed extension's `contributes.capabilities`, not
61
- // a per-provider schema arm, so the config is `provider` + arbitrary string fields, validated against the
62
- // card's declared fields at add-time (see the sandbox's capabilities/contributions.ts) rather than by this schema.
53
+ // Gives the agent an authenticated CLI tool: credential plus any non-secret URL, injected into the agent's env each
54
+ // turn, taught via an .agents/skills/<id> cheatsheet. Provider fields are data in an extension's
55
+ // `contributes.capabilities`, validated at add-time, not by this schema.
63
56
  export const CliConfigSchema = z
64
57
  .object({
65
58
  provider: z
@@ -70,9 +63,8 @@ export const CliConfigSchema = z
70
63
  ),
71
64
  })
72
65
  .catchall(z.string());
73
- // A Claude Code plugin from a git repo. The daemon only owns the checkout; the Agent SDK's plugin loader reads
74
- // its internals (skills/agents/hooks/commands/.mcp.json). `path` = subdirectory for plugins that live inside a
75
- // marketplace/monorepo checkout. `token` = https auth for private repos (never echoed; becomes hasToken).
66
+ // A Claude Code plugin from a git repo; the daemon only owns the checkout, the Agent SDK's plugin loader reads its
67
+ // internals. `path` is a subdirectory for a plugin inside a larger checkout; `token` is https auth for a private repo.
76
68
  export const PluginConfigSchema = z.object({
77
69
  url: z.url().describe("The repository to take the plugin from."),
78
70
  // Branch / tag / commit sha to pin; absent = the default branch's HEAD.
@@ -85,10 +77,9 @@ export const PluginConfigSchema = z.object({
85
77
  .describe("Where inside the repository the plugin lives, for one that sits in a larger checkout."),
86
78
  token: z.string().min(1).optional().describe("A credential for a private repository. Stored, never echoed back."),
87
79
  });
88
- // An intentic extension from a git repo (an intentic-extension.json checkout. UI bundle + agent contributions
89
- // + processes). Unlike `plugin`, `ref` is a REQUIRED full commit sha: extension code runs trusted in the
90
- // owner's browser, so the owner approves exactly the code that runs, pin by construction, updates are explicit
91
- // re-adds at a new sha. `path`/`token` as in PluginConfigSchema.
80
+ // An intentic extension from a git repo (UI bundle + agent contributions + processes). Unlike `plugin`, `ref` must be a
81
+ // full commit sha, since extension code runs trusted in the owner's browser and every update is a deliberate re-add at
82
+ // a new sha.
92
83
  export const ExtensionConfigSchema = z.object({
93
84
  url: z.url().describe("The repository to take the extension from."),
94
85
  ref: z
@@ -104,23 +95,7 @@ export const ExtensionConfigSchema = z.object({
104
95
  .optional()
105
96
  .describe("Where inside the repository the extension lives, for one that sits in a larger checkout."),
106
97
  token: z.string().min(1).optional().describe("A credential for a private repository. Stored, never echoed back."),
107
- /* The registry row's tier, copied onto the install by the browse pre-fill. `premium` is what the daemon's
108
- * two pool duties key off: installing (or updating) donates the owner's credits to the publisher, the
109
- * gate the apply passes through, and enabling needs the owner's membership. An absent tier means free,
110
- * donates nothing, and asks for nothing; NO usage is metered or reported either way. Self-declared rather
111
- * than verified against the registry (the daemon is the owner's own machine; a stripped marker skips a
112
- * donation the owner was choosing to make, which cheats the creator once, and is exactly the honesty the
113
- * open-source posture accepts and the docs state). */
114
- tier: z
115
- .enum(["free", "premium"])
116
- .optional()
117
- .describe(
118
- "Whether installing this donates credits to its publisher. Absent means free, which donates nothing and asks for nothing. Taken from the listing rather than checked against it, which is the honesty an open-source posture accepts.",
119
- ),
120
- /* The registry this install's row lives in, copied on by the browse pre-fill like `tier`, what the update
121
- * check compares the pinned sha against and reads advisories from. Absent (a hand-typed git install) falls
122
- * back to the official registry: if the extension is listed there, its updates and its blocked-markings
123
- * concern this owner exactly as much as anyone's. */
98
+ // What update checks and advisories are read against; absent falls back to the official registry.
124
99
  registry: z
125
100
  .url()
126
101
  .optional()
@@ -128,10 +103,9 @@ export const ExtensionConfigSchema = z.object({
128
103
  "Which registry this install came from, which is what update checks and security advisories are read against. Absent falls back to the official one.",
129
104
  ),
130
105
  });
131
- // A remote machine the AGENT can reach over SSH. One capability = one machine; the id is its ssh-config Host
132
- // alias, so the agent runs `ssh <id> "…"`. The handler writes a per-machine config block + a 0600 key/password
133
- // file under ~/.ssh (see the ssh handler), so, unlike `cli`, nothing is injected into the agent's env, and
134
- // several machines never collide. Discriminated by auth so exactly one credential shape is required.
106
+ // A remote machine the agent reaches over SSH; one capability per machine, the id is its ssh-config Host alias. Writes
107
+ // a config block and a 0600 key/password file, unlike `cli`, so nothing is injected into the agent's env and machines
108
+ // never collide.
135
109
  export const SshConfigSchema = z.discriminatedUnion("auth", [
136
110
  z.object({
137
111
  auth: z.literal("key").describe("Sign in with a key."),
@@ -148,79 +122,25 @@ export const SshConfigSchema = z.discriminatedUnion("auth", [
148
122
  password: z.string().min(1).describe("The password. Stored, never echoed back."),
149
123
  }),
150
124
  ]);
151
- /* What is OPTIONAL about the in-sandbox Docker Engine. The engine itself takes no configuring, the capability
152
- * either runs dockerd or it doesn't, so this holds only what a user chooses, and the bar for landing here is
153
- * that the sandbox works without it. (`--privileged` therefore is not here and never will be: dockerd does not
154
- * run without it, so a switch would offer a broken sandbox as a choice.)
155
- *
156
- * TWO FAMILIES, and which one an option belongs to is the most consequential thing about it, because it is the
157
- * difference between a five-second change and a five-minute one:
158
- *
159
- * IMAGE (`gpu`), rides the environment overlay. Changing it recomposes the Dockerfile, so it costs an
160
- * owner-approved rebuild and a container recreate. Only `fragment()` may read these.
161
- * ENGINE (everything below it): /etc/docker/daemon.json, which dockerd reads at start. Changing one
162
- * rewrites the file and restarts dockerd: no rebuild, no new image, but it DOES stop whatever containers
163
- * the engine is running, which is why it is disclosed rather than silently applied.
164
- *
165
- * Keep the split honest in both directions: an engine option that leaked into the fragment would demand a
166
- * rebuild for a value dockerd re-reads anyway, and an image option applied by rewriting a file would silently
167
- * do nothing. The card badges the difference per field (CapabilityField.rebuild).
168
- *
169
- * Flat rather than nested, and "on"/"off" rather than booleans, because the capability form carries a flat
170
- * bag of strings, one spelling of a two-state config across the manifest (the vpn's pfs/aggressive) beats a
171
- * second one for the same shape. */
125
+ // What is optional about the in-sandbox Docker Engine: `gpu` is an IMAGE option (rides the Dockerfile overlay, needs a
126
+ // rebuild), everything else is an ENGINE option (rewrites daemon.json, restarts dockerd, no rebuild but stops running
127
+ // containers). Flat strings, not nested booleans, to match the manifest's own two-state convention.
172
128
  export const DockerConfigSchema = z.object({
173
129
  gpu: z.enum(["on", "off"]).default("off"),
174
- /* A pull-through cache or mirror, for a slow, metered or air-gapped link. The nested engine starts with an
175
- * empty image store, so the first `docker compose up` in a workspace pulls everything from scratch. */
130
+ // Pull-through cache/mirror; the nested engine starts with an empty image store, so the first compose up pulls
131
+ // everything.
176
132
  registryMirror: z.url().optional(),
177
- // Registries reachable over plain http or with a self-signed certificate, a LAN registry, or the one a
178
- // homelab runs beside the sandbox. Space- or comma-separated host:port entries.
133
+ // Registries reachable over plain http or a self-signed cert (a LAN or homelab registry); space- or
134
+ // comma-separated.
179
135
  insecureRegistries: z.string().optional(),
180
- /* The subnet the nested engine carves its container networks out of. Docker's default (172.17/16 and the
181
- * 172.16/12 pools around it) is the single most common collision with a corporate VPN or a homelab LAN,
182
- * and the failure it produces is unusually cruel: the sandbox keeps working, dockerd keeps working, and
183
- * exactly the internal hosts the user was reaching for become unreachable, routed into a bridge instead
184
- * of down the tunnel. One CIDR, and the pool is carved from it. */
136
+ // One CIDR the nested engine carves container networks from; docker's default commonly collides with a corporate
137
+ // VPN or LAN, silently routing some hosts into the bridge instead of the tunnel.
185
138
  addressPool: z.string().optional(),
186
139
  });
187
- // A logged-in browser session the AGENT drives via Playwright MCP tools, for social platforms whose APIs can't
188
- // cover "all the actions" (X reads are paywalled; X community-join and YouTube community-posts have no API). The
189
- // session lives in a persisted Chromium profile under .intentic/local/browser/<id>, established through the guided-login
190
- // WebSocket (/system/browser-login) or by the agent signing in itself. Chromium itself rides this kind's
191
- // Dockerfile fragment, applied on an owner rebuild.
192
- //
193
- // ONE CAPABILITY = ONE ACCOUNT, not one platform: several entries may name the same `platform` (reddit-work and
194
- // reddit-personal), and the ID is what the profile, the login, the passkey and the agent's tool prefix are all
195
- // keyed by, so each account signs in separately and is disconnected on its own.
196
- //
197
- // `platform` is an OPEN slug, not an enum, for the reason `cli`'s `provider` is: a platform is a card, a login URL
198
- // and a skill in an installed extension's `contributes.capabilities`, so the set of them is not a fact this
199
- // contract can know. The add route validates it against the contributed entry instead (see contributions.ts).
200
- //
201
- // `username`/`password` are the account's SIGN-IN CREDENTIALS, on every card rather than declared per platform
202
- // (which box a login form wants filled is the same fact everywhere). Both optional: a profile that signed in by
203
- // hand needs neither, and the password is the entry's SECRET, stored so the daemon can type it into the page on
204
- // the agent's behalf (the accounts tools), never so the agent can read it. When the agent signs UP it has the
205
- // daemon generate and store one here, so the credential outlives the profile's cookies.
206
- //
207
- // `catchall`, the `cli` precedent, for the card that carries no site at all: a GENERIC browser session, where the
208
- // page to open and what the account is for are answered on the form instead of pinned in a manifest. A site card
209
- // pins its URLs and declares no fields; the generic one declares fields and pins nothing, one kind, because
210
- // nothing downstream of the URLs differs. Which other keys are legal is the CARD's business, checked against its
211
- // declared fields at add-time (validateContributionConfig), not this schema's.
212
- //
213
- // `identity` names the identity capability this account was born from (or was filed under): the account then
214
- // lives INSIDE that identity's browser, one profile, one set of cookies, which is what makes "Continue with
215
- // Google" one click instead of a second Google login the platform would block. Absent ⇒ the account keeps its
216
- // own private profile, exactly as every hand-connected account always has.
217
- //
218
- // `purpose` and `openedAt` are the ACCOUNT's own history, core for the same reason `identity` is: what this
219
- // account was opened for and when are facts about the sandbox's own past, not about any site, and a site card
220
- // that declared no fields (every one of them, a pinned-URL card declares none) could not carry them otherwise.
221
- // They are what makes the roster answerable months later, when "do we already have an account here" is asked by
222
- // a session that was not the one that signed up. Both optional: an account the owner connected by hand has no
223
- // signup story to tell, and an empty purpose is better than a fabricated one.
140
+ // A logged-in browser session the agent drives via Playwright MCP, one capability per account (not per platform): the
141
+ // id keys the profile, login, passkey and tool prefix. `identity` shares another capability's browser and cookies (so
142
+ // its own `exit`/credentials are ignored); `purpose`/`openedAt` record why and when the agent opened it, since a site
143
+ // card declares no fields to carry that otherwise.
224
144
  export const BrowserConfigSchema = z
225
145
  .object({
226
146
  platform: z.string().min(1),
@@ -230,72 +150,30 @@ export const BrowserConfigSchema = z
230
150
  purpose: z.string().optional(),
231
151
  // ISO-8601 date, stamped when the agent opens the account, absent for one connected by hand.
232
152
  openedAt: z.string().optional(),
233
- /* WHERE THIS ACCOUNT BROWSES FROM: the id of an `exit` capability. Set it and every page this profile
234
- * opens comes out of that country, with the browser's clock, locale and languages set to match.
235
- *
236
- * Only meaningful on an account that owns its OWN profile. An account born from an identity shares
237
- * that identity's browser, cookies, passkeys and all, so it shares its exit too and this field is
238
- * ignored for it (see the daemon's browser/browser-exit.ts). That is not a limitation, it is the
239
- * point: one Google session appearing from Berlin in one tab and Osaka in another is a far louder
240
- * signal than any address, so the exit belongs to whatever owns the profile. */
153
+ // The `exit` capability this profile browses from; ignored for an account born from an `identity`, since the
154
+ // exit belongs to whoever owns the shared profile.
241
155
  exit: z.string().optional(),
242
156
  })
243
157
  .catchall(z.string());
244
- /* ONE EMAIL IDENTITY THE SANDBOX ACTS AS ONLINE, the container platform accounts are born from, and the answer
245
- * to "who is this sandbox on the internet" being twelve separate logins today.
246
- *
247
- * WHAT IT OWNS IS A BROWSER. An identity is one persisted Chromium profile the way a person's own browser is
248
- * one: Google signed in once (by the OWNER's hand, in the guided window, automated Google logins are exactly
249
- * what Google blocks), and every account born from it sharing those cookies, so a platform's "Continue with
250
- * Google" is a click rather than an email round-trip. Browser accounts join it by naming it in their `identity`
251
- * field; accounts that name no identity keep their own private profile, which is how work and personal stay two
252
- * containers, two identities, not one profile with a flag.
253
- *
254
- * WHY A CAPABILITY AND NOT A PERSONA: this card holds SECRETS (an email password the daemon types but never
255
- * shows) and a live profile's identity, and the personas file is committed to git precisely because it holds
256
- * neither (personas-store.ts). A persona is how a session BEHAVES; an identity is who the browser IS SIGNED IN
257
- * as. A persona may point at accounts that live inside an identity, and neither card needs to know the other
258
- * exists.
259
- *
260
- * `email` is the identity itself, what signup forms get typed into their username box, and how the guided
261
- * login knows where to start (gmail.com ⇒ accounts.google.com; `loginUrl` overrides for any other provider).
262
- * `password` is the entry's SECRET, the browser-config precedent: typed by the daemon, never readable.
263
- * `mailbox` names a connected mail capability (imap, google) the narrow code tool reads, the agent asks for
264
- * "the latest code from this site" and gets six digits, not an inbox.
265
- * `openAccounts` is THE consent switch, off by default and a select rather than a boolean (the host-scope
266
- * precedent, form values arrive as strings): automated signup is against most platforms' terms, so minting
267
- * accounts unattended is an explicit, per-identity, informed choice, never a silent global default. */
158
+ // One email identity the sandbox acts as online: one persisted Chromium profile, signed in once by the owner, that
159
+ // every browser account naming it in `identity` shares. A capability, not a persona, since it holds live secrets (email
160
+ // password, profile identity) that must never be committed to git. `mailbox` feeds the code-reading tool;
161
+ // `openAccounts` is the explicit, off-by-default consent to sign up unattended.
268
162
  export const IdentityConfigSchema = z.object({
269
163
  email: z.string().min(3),
270
164
  password: z.string().optional(),
271
165
  mailbox: z.string().optional(),
272
166
  loginUrl: z.url().optional(),
273
167
  openAccounts: z.enum(["on", "off"]).default("off"),
274
- /* WHERE THIS IDENTITY LIVES, the id of an `exit` capability. An identity OWNS a browser profile, and every
275
- * account born from it shares that profile, so setting it here sets it for all of them at once, which is
276
- * the only coherent place to set it: the shared thing is one browser, and one browser is in one place. */
168
+ // Sets browsing location for the whole shared profile at once; the only coherent place to set it, since every
169
+ // account born from this identity shares one browser.
277
170
  exit: z.string().optional(),
278
171
  });
279
172
  export type IdentityConfig = z.infer<typeof IdentityConfigSchema>;
280
- /* A connected DEVICE of the user's own, the inverse of `ssh`, which reaches a server the sandbox can dial.
281
- * A machine behind NAT can't be dialled, so it dials US: the @intentic/machine agent (installed by a one-liner,
282
- * enrolled with a single-use pairing token) holds one outbound WebSocket to this daemon and serves an MCP tool
283
- * surface, shell, files, screenshots, from the far end. The daemon tunnels the agent's JSON-RPC over it and
284
- * never implements a tool itself, so the machine's capabilities evolve with ITS binary, not with a daemon release.
285
- *
286
- * One capability = one machine. The id is the machine's name and namespaces its tools (mcp__laptop__run_command),
287
- * so several connected machines never collide, the `ssh` precedent. `platform` splits the SKILL pack: a Windows
288
- * machine is taught PowerShell and a Linux one systemd/D-Bus, and neither carries the other's noise.
289
- *
290
- * SCOPES ARE THE GRANT, and they are enforced ON THE MACHINE, never here: the daemon pushes them down on every
291
- * connect, and the agent refuses out-of-scope calls itself. So a sandbox that is compromised, or an agent talked
292
- * into it by something it read on the internet, still cannot exceed what the owner ticked. `roots` bounds file
293
- * reads AND writes to a set of directories (empty ⇒ the user's home).
294
- *
295
- * Like a browser `platform`, this is an OPEN slug: an OS is a card plus a skill pack in an installed extension's
296
- * `contributes.capabilities`, and teaching the agent a new one should not need a daemon release. */
297
- // on/off rather than a boolean: capability configs arrive from the add form as strings (the vpn autoConnect
298
- // precedent), and a select is what the form renders for an enum.
173
+ // A connected device of the user's own, the inverse of `ssh`: it dials this daemon over one outbound WebSocket and
174
+ // serves an MCP tool surface the daemon tunnels, never implements. Scopes are the grant and are enforced on the
175
+ // machine, never here, so a compromised sandbox can't exceed what the owner ticked.
176
+ // on/off, not boolean: capability configs arrive from the form as strings, and a select renders an enum.
299
177
  const hostScope = z.enum(["on", "off"]);
300
178
  export const HostScopesSchema = z.object({
301
179
  // Run commands in a real shell (PowerShell on Windows, the login shell on Linux). Off ⇒ files/screen only.
@@ -304,175 +182,76 @@ export const HostScopesSchema = z.object({
304
182
  write: hostScope.default("off"),
305
183
  // Capture the screen. Off ⇒ screenshot refuses, and the agent is told so rather than getting a black frame.
306
184
  screen: hostScope.default("on"),
307
- /* Move the pointer, click, type and scroll. GUI work, for the things with no command-line way in. Its own
308
- * switch rather than part of `screen` because looking and touching are not the same permission: a screenshot
309
- * is bounded by what is on the display, while one click can confirm a dialog nobody read. Default off, like
310
- * `write`, and for the same reason, a user who has not thought about it should not discover the agent has
311
- * been driving their desktop. */
185
+ // Its own switch, not part of `screen`: looking and touching are different permissions. Default off, like `write`.
312
186
  control: hostScope.default("off"),
313
- /* Start, stop and restart the Intentic sandboxes running on this machine, the grant that makes one sandbox
314
- * the machine's supervisor. Its own switch rather than a use of `shell` because it is NARROWER: a user can
315
- * hand an agent the sandbox fleet without handing it a shell, and the fleet operations are named rather than
316
- * whatever a model improvises with docker. Default off, like every switch that changes the machine. */
187
+ // Narrower than `shell`: named fleet operations, so an agent can supervise sandboxes without a shell at all.
317
188
  sandboxes: hostScope.default("off"),
318
- /* Remove a sandbox from this machine, its container, its network, and the named volumes holding its /work
319
- * and /history. Its own switch rather than part of `sandboxes` because the two differ in the only way that
320
- * matters here: everything `sandboxes` grants is undone by doing it again, and this is undone by nothing.
321
- * A user who delegated "restart my sandboxes when they wedge" did not thereby agree to lose one. */
189
+ // Separate from `sandboxes`: everything that grants is reversible by doing it again, removal is undone by nothing.
322
190
  sandboxRemove: hostScope.default("off"),
323
- /* Run a command this machine's agent classifies as destructive: a recursive delete, a formatted disk, a
324
- * removed Docker volume (command-classes.ts, the same classifier the sandbox's own gate reads).
325
- *
326
- * ITS OWN SWITCH UNDER `shell`, and the reason is the asymmetry this whole feature turns on. Inside the
327
- * sandbox a bad `rm -rf` costs a container that exists to be thrown away, so the gate there can afford to
328
- * hold only the handful of commands nothing undoes and wave the rest through. This is somebody's laptop.
329
- * There is no image to recreate it from, no checkpoint, no worktree: `rm -rf ~/projects` is the afternoon
330
- * everybody remembers. And there is no card to raise either, the machine answers a tool call with a value
331
- * and cannot park it while somebody thinks, so the honest form of "ask me" here is "refuse until they
332
- * ticked it", which is exactly what a scope is.
333
- *
334
- * Default off, with `shell` default ON, which is the pairing to read carefully: a connected device runs
335
- * commands out of the box, because that is what people connect one for, and the ones that delete are the
336
- * ones they have to say yes to. */
191
+ // Its own switch under `shell`, default off while `shell` defaults on: a laptop has no disposable image to recreate
192
+ // from.
337
193
  destructive: hostScope.default("off"),
338
194
  // One directory per line. Empty ⇒ the machine's home directory, which is what the agent reports at connect.
339
195
  roots: z.string().optional(),
340
196
  });
341
197
  export type HostScopes = z.infer<typeof HostScopesSchema>;
342
198
  export const HostConfigSchema = HostScopesSchema.extend({ platform: z.string().min(1) });
343
- /* THE USER'S OWN BROWSER, reached through the extension they installed in it: the `webext` capability's config.
344
- *
345
- * The sibling of `host` and deliberately not an arm of it. A connected device runs commands; a connected
346
- * browser has one power a sandbox's own Chromium can never have, and it is the whole reason this kind exists:
347
- * it is ALREADY SIGNED IN, as the person, with their passkeys, their hardware second factor, their corporate
348
- * SSO and their genuine fingerprint. That is the set of sites the sandbox's browser cannot reach at all, and
349
- * copying a session out of one to fake it is what gets an account locked.
350
- *
351
- * WHICH SITES the agent may touch is NOT in here, and that omission is the security design rather than a gap.
352
- * Origins are Chrome's own optional host permissions, asked for by the extension with the person's hands on
353
- * the keyboard and revocable in the browser's own UI, so the boundary that matters is enforced by the browser
354
- * against the extension, one layer below anything a sandbox could reach. What the card carries is the coarser
355
- * question the sandbox's owner answers once: what KIND of thing may happen on a site they have already allowed.
356
- *
357
- * Every switch is enforced IN THE EXTENSION (as every host scope is enforced on the machine): the daemon
358
- * pushes them on connect and on every edit, and nothing on this side checks one. */
199
+ // The user's own browser, reached through their installed extension; the sibling of `host`, not an arm of it, since
200
+ // it's already signed in as the person, with their passkeys and SSO. Which sites the agent may touch lives in Chrome's
201
+ // own host permissions, not here; every switch is enforced in the extension, never checked on this side.
359
202
  const webextScope = z.enum(["on", "off"]);
360
203
  export const WebExtScopesSchema = z.object({
361
- // Read a granted page: its elements, its text, its tabs. The floor of usefulness, so it defaults on; with
362
- // it off the connection is inert and the card says so rather than pretending.
204
+ // The floor of usefulness, defaults on; off, the connection is inert and the card says so.
363
205
  read: webextScope.default("on"),
364
- /* Click, type, press keys, navigate. ON by default, unlike a device's `control`, and the difference is
365
- * what the two things ARE: driving a desktop is the last resort after every command-line route failed,
366
- * while driving the page IS this connector — a browser connection that may only look is a worse version
367
- * of fetching the URL. The grant that actually bounds it is per-site and lives in the browser. */
206
+ // On by default, unlike a device's `control`: driving the page is what this connector is for, not a last resort.
368
207
  act: webextScope.default("on"),
369
- /* Capture the visible tab as an image. Off by default because it is the one read whose contents nothing
370
- * here bounds: the page serialization above is a list this extension built and can keep to granted frames,
371
- * while a screenshot is whatever pixels that window happens to be showing. Worth turning on for canvas
372
- * apps and PDF viewers, which is exactly when the DOM says nothing. */
208
+ // Off by default: the one read nothing here bounds, since it captures whatever pixels the window shows, not just
209
+ // granted frames.
373
210
  screenshot: webextScope.default("off"),
374
- /* Hand a site's logged-in session to the sandbox's own browser ("Connect this site"), so a job can carry
375
- * on overnight with the laptop shut. Off by default and deliberately hard to turn on by accident: it is
376
- * the only switch here that COPIES a credential rather than borrowing the browser holding it, and some
377
- * sites answer a session arriving from a new fingerprint by invalidating it. */
211
+ // Off by default: the only switch here that copies a credential rather than borrowing the browser holding it.
378
212
  cookies: webextScope.default("off"),
379
- /* When the person is asked, in the browser, before an action goes through. "sensitive" is the default and
380
- * the interesting one: a submit on a page that carries a password field, a payment form or a delete
381
- * confirmation waits for a human click; ordinary navigation and typing do not. "always" makes every action
382
- * a prompt (correct for a first week, exhausting after it); "never" is the owner saying they will watch
383
- * instead, which they genuinely can, because they are looking at the tab. */
213
+ // "sensitive" (default) prompts only for a password, payment or delete action; "always" prompts every action,
214
+ // "never" trusts the owner to watch.
384
215
  confirm: z.enum(["sensitive", "always", "never"]).default("sensitive"),
385
216
  });
386
217
  export type WebExtScopes = z.infer<typeof WebExtScopesSchema>;
387
- // Like a host's, `platform` is an OPEN slug naming the card (chrome, firefox): the browser family decides the
388
- // skill pack's wording and the install link, and teaching the agent a new one should not need a daemon release.
218
+ // An open slug (chrome, firefox), like a host's `platform`: a new browser family needs no daemon release.
389
219
  export const WebExtConfigSchema = WebExtScopesSchema.extend({ platform: z.string().min(1) });
390
220
  export type WebExtConfig = z.infer<typeof WebExtConfigSchema>;
391
- // An ACP (Agent Client Protocol) agent served as a chat provider: the daemon spawns `command` as a long-lived
392
- // subprocess speaking JSON-RPC over stdio, and the capability id becomes the provider id in the chat picker
393
- // (see AgentProviderSchema). `command` is split on whitespace, no shell quoting. `env` is a pasted KEY=VALUE
394
- // block (one per line); credentials ride here, so the whole block is the secret field (echoed as hasSecret),
395
- // the vpn-conf precedent. `loginCommand` is an interactive login the user completes in a visible terminal
396
- // (device-code flows); the agent persists credentials in its own store inside the container. `name` is the
397
- // picker's display label; absent = the id.
221
+ // An ACP agent served as a chat provider: the daemon spawns `command` as a long-lived JSON-RPC subprocess, and the
222
+ // capability id becomes the provider id. `env` is a pasted KEY=VALUE block, the whole secret field; `loginCommand` runs
223
+ // an interactive device-code login in a visible terminal.
398
224
  export const AcpAgentConfigSchema = z.object({
399
225
  command: z.string().min(1),
400
226
  name: z.string().min(1).optional(),
401
227
  env: z.string().optional(),
402
228
  loginCommand: z.string().min(1).optional(),
403
229
  });
404
- /* A MODEL API THE USER POINTED US AT, one shape for every server that serves models over HTTP, whether it runs
405
- * beside this container or in another datacentre. There is deliberately NO local/remote axis: an Ollama on the
406
- * docker host, a vLLM on the GPU box down the hall, a LiteLLM gateway and OpenRouter differ only in the URL, and
407
- * inventing a distinction would mean two code paths, two cards and two sets of bugs for one concept.
408
- *
409
- * `protocol` is the only real fork, and it is about the WIRE, not about where the server lives:
410
- * openai , the endpoint speaks OpenAI /v1/chat/completions (Ollama, vLLM, llama.cpp, LM Studio, TGI,
411
- * OpenRouter, most gateways). The Claude Code harness speaks only the Anthropic Messages API, so
412
- * these are re-served through the bundled translator, which is already in the image for exactly
413
- * this job (agent/translator.ts). The user's key stays in the translator's config on /history and
414
- * never reaches the harness, it gets the loopback bearer instead.
415
- * anthropic, the endpoint already speaks the Anthropic Messages API (LiteLLM's /v1/messages, a Bedrock or
416
- * Vertex router, a corporate Anthropic gateway). Nothing to translate: the harness is pointed
417
- * straight at it with the user's own key.
418
- *
419
- * `headers` is a pasted `Name: value` block, one per line, the extra headers gateways ask for (a tenant id, a
420
- * routing hint). The key is the secret field; the header block is not, because it is where non-credential
421
- * routing metadata lives and hiding it would make a misrouted endpoint undiagnosable. */
230
+ // A model API the user pointed us at: one shape for any server serving models over HTTP, local or remote, since they
231
+ // differ only in the URL. `protocol` is the real fork, about the wire, not location:
232
+ // openai: re-served through the bundled translator, since the harness speaks only Anthropic Messages
233
+ // anthropic: the harness is pointed straight at it with the user's own key
234
+ // `headers` is a pasted block for non-credential routing metadata (a tenant id); not the secret field, `apiKey` is.
422
235
  export const EndpointProtocolSchema = z.enum(["openai", "anthropic"]);
423
236
  export type EndpointProtocol = z.infer<typeof EndpointProtocolSchema>;
424
237
  export const EndpointConfigSchema = z.object({
425
- // The API root, INCLUDING the version segment the server publishes (…:11434/v1). Taken verbatim rather than
426
- // normalised: "which suffix does this server want" is the one thing that actually varies between them, and
427
- // guessing it is how a working URL becomes an unexplainable 404.
238
+ // Taken verbatim, version segment included: guessing the suffix a server wants is how a working URL 404s.
428
239
  baseUrl: z.url(),
429
240
  protocol: EndpointProtocolSchema.default("openai"),
430
241
  apiKey: z.string().optional(),
431
242
  headers: z.string().optional(),
432
243
  });
433
- /* A MODEL THE SANDBOX RUNS ITSELF, the managed counterpart of `endpoint`. An endpoint points at a server the
434
- * USER operates; this one names weights, and the daemon does the operating: it downloads the file into the
435
- * workspace cache, serves it with the image's bundled llama-server on a loopback port it owns, and registers
436
- * the result exactly as if the user had added an endpoint at that port. Everything downstream (the picker, the
437
- * translator, quick-model pinning) sees an `endpoint/<id>` provider and never learns the difference, which is
438
- * why there is no baseUrl here: the URL is derived from the entry's id (the daemon's endpoints/local-model.ts),
439
- * not a fact anyone typed.
440
- *
441
- * `model` is WHICH WEIGHTS, as a Hugging Face path (`owner/repo/file.gguf`, resolved to the repo's own
442
- * download), so shipping a new recommended model is a catalog-card edit, not a daemon release. The reserved
443
- * value "custom" defers to `url`, a direct GGUF link for people who know exactly what they want.
444
- *
445
- * `gpu` mirrors the docker card's option and rides the same allowlisted `--gpus=all` directive: the ASK lives
446
- * here, what became of it is SANDBOX_GPU, stamped by the runner (see the docker handler's gpuState). "on"/"off"
447
- * rather than a boolean for the manifest-wide reason DockerConfigSchema gives.
448
- *
449
- * `context`/`contextTokens` are HOW MUCH CONVERSATION the server holds, the `model`/`url` pair's shape for the
450
- * same reason: a short list of rungs anyone can choose between, and one escape hatch for a person who knows the
451
- * exact number they want. Resolved to a single token count in exactly one place (the daemon's
452
- * endpoints/local-model.ts localModelWindow), because the flag llama-server is started with and the number the
453
- * card promises must never be two opinions. */
244
+ // A model the sandbox runs itself, the managed counterpart of `endpoint`: the daemon downloads the weights, serves them
245
+ // on a loopback llama-server, and registers an `endpoint/<id>` provider like a user-added one. `model` is a Hugging
246
+ // Face path (or "custom" for a direct GGUF `url`); `context`/`contextTokens` pick the served window, resolved to one
247
+ // token count in exactly one place so the server's flag and the card's promise never disagree.
454
248
  export const LOCAL_MODEL_WINDOWS = ["16384", "32768", "65536", "131072"] as const;
455
249
  export type LocalModelWindow = (typeof LOCAL_MODEL_WINDOWS)[number];
456
- /* THE RUNG A CARD WITH NO OPINION LANDS ON, and the one number in this block that is a product decision rather
457
- * than an arithmetic one.
458
- *
459
- * It is 65,536 because this sandbox runs a TOOL-CALLING AGENT LOOP, and that loop's own fixed cost, its
460
- * instructions plus one JSON schema per tool it can call, times every capability the owner has connected, is
461
- * tens of thousands of tokens before the user has typed anything (agent/context-budget.ts holds the measurement
462
- * and the refusal built on it). A window that cannot hold that cost is not a smaller version of the product; it
463
- * is a model whose every real turn is refused, which is what the previous flat 32,768 shipped: a 27B model,
464
- * seventeen gigabytes downloaded, and a first message that died on `36216 tokens exceeds 32768`.
465
- *
466
- * So the default is the smallest rung a full turn fits in, and the smaller rungs stay on the list because they
467
- * are honestly useful: pinned as the quick model (titles, commit messages) a window this size is waste, and the
468
- * gigabyte it gives back is the difference between running one of these models on an eight-gigabyte laptop and
469
- * not. What each rung costs in memory is the card's job to say (capability-catalog): roughly 2 GB of quantized
470
- * cache per 32k of window, on top of the weights. */
250
+ // 65,536: the smallest rung a full agent turn's own tool-schema overhead actually fits in (agent/context-budget.ts);
251
+ // the previous 32,768 default refused a model's first real message outright.
471
252
  export const LOCAL_MODEL_WINDOW_DEFAULT: LocalModelWindow = "65536";
472
- /* THE BOUNDS ON THE TYPED NUMBER, and they are bounds against a TYPO rather than against a preference. Below
473
- * the floor there is no conversation left to have once the loop's own instructions land; above the ceiling is a
474
- * number no GGUF on offer was trained for, and llama-server would spend minutes reserving a cache for it before
475
- * failing. Everything between is the owner's call: their machine, their memory. */
253
+ // Bounds against a typo, not a preference: below the floor no room is left after the loop's own overhead, above the
254
+ // ceiling no shipped GGUF was trained for it.
476
255
  export const LOCAL_MODEL_WINDOW_MIN = 2048;
477
256
  export const LOCAL_MODEL_WINDOW_MAX = 1_048_576;
478
257
  export const LocalModelConfigSchema = z.object({
@@ -480,36 +259,19 @@ export const LocalModelConfigSchema = z.object({
480
259
  gpu: z.enum(["on", "off"]).default("off"),
481
260
  url: z.url().optional(),
482
261
  context: z.union([z.enum(LOCAL_MODEL_WINDOWS), z.literal("custom")]).default(LOCAL_MODEL_WINDOW_DEFAULT),
483
- // Coerced because it arrives from a text field as a string, the ssh card's `port` precedent, and only read
484
- // when `context` is "custom" (the `url`/`model` relationship exactly).
262
+ // Coerced from a text field's string, like the ssh card's `port`; read only when `context` is "custom".
485
263
  contextTokens: z.coerce.number().int().min(LOCAL_MODEL_WINDOW_MIN).max(LOCAL_MODEL_WINDOW_MAX).optional(),
486
264
  });
487
265
  export type LocalModelConfig = z.infer<typeof LocalModelConfigSchema>;
488
- /* THE SANDBOX WALLET, a USDC balance the agent can spend on x402-payable endpoints, under owner policy.
489
- *
490
- * WHAT IS DELIBERATELY NOT HERE IS A KEY. The signing key lives with the PLATFORM (one wallet per owner,
491
- * reached with the connect token the agent's grant never covers), the container filesystem is explicitly not
492
- * a boundary in this codebase's threat model (see the daemon's secret-vault.ts header), so the key does not
493
- * enter the container at all. `address` is the wallet's PUBLIC address, written back by the handler's apply
494
- * from the platform's answer, never typed by anyone: it is where the owner sends USDC, and everything the
495
- * agent may know.
496
- *
497
- * POLICY IS THE OWNER'S DELEGATION, and its defaults are the conservative ones: every payment raises an
498
- * approval card (`autoApproveUnderUsd: "0"`), bounded per payment and per UTC day. The daemon enforces it at
499
- * the route AND the platform re-validates at the signer, the daemon's check is UX, the signer's is the
500
- * guarantee, so a compromised container can at worst request what the owner already permitted. Amounts are
501
- * DECIMAL STRINGS, never floats: the daemon does its arithmetic in the token's atomic units (USDC has six
502
- * decimals), and a float here would be a rounding bug wearing a type.
503
- *
504
- * `allow`/`deny` are hostname lists (comma- or newline-separated). Empty allow = any host, each behind its
505
- * card; deny wins over allow. One capability per sandbox (singleton card): a second balance would just be a
506
- * second opinion about the same owner's wallet. */
266
+ // The sandbox wallet: a USDC balance under owner policy, spent on x402-payable endpoints. The signing key lives with
267
+ // the platform, never the container; `address` is the wallet's public address, written back by apply, never typed.
268
+ // Policy defaults are conservative (every payment carded); amounts are decimal strings, never floats, since the daemon
269
+ // does arithmetic in atomic units.
507
270
  const usdAmount = z.string().regex(/^\d+(\.\d{1,6})?$/, "a USD amount like 0.50 (up to six decimals: USDC's own precision)");
508
271
  export const WalletNetworkSchema = z.enum(["eip155:8453", "eip155:84532"]);
509
272
  export type WalletNetwork = z.infer<typeof WalletNetworkSchema>;
510
273
  export const WalletConfigSchema = z.object({
511
- // The chain payments settle on, CAIP-2. Base mainnet, or Base Sepolia for test mode (faucet USDC, the
512
- // whole flow, cards, ledger, receipts, with zero real money).
274
+ // CAIP-2 chain id; Base mainnet, or Base Sepolia for a zero-real-money test mode.
513
275
  network: WalletNetworkSchema.default("eip155:8453"),
514
276
  // The wallet's public address, the platform's answer at apply time, never a form field.
515
277
  address: z.string().optional(),
@@ -537,8 +299,8 @@ export type AcpAgentConfig = z.infer<typeof AcpAgentConfigSchema>;
537
299
  export type EndpointConfig = z.infer<typeof EndpointConfigSchema>;
538
300
  export const CapabilitySchema = z.discriminatedUnion("kind", [
539
301
  z.object({ id: entryId, kind: z.literal("devops"), config: z.object({}) }),
540
- // A pnpm+turbo monorepo the user scaffolds as its own repo; the `id` is the repo name. No config, apps are
541
- // added into it afterwards from its operator panel.
302
+ // A pnpm+turbo monorepo the user scaffolds as its own repo, named by `id`; apps are added afterwards from its
303
+ // operator panel.
542
304
  z.object({ id: entryId, kind: z.literal("monorepo"), config: z.object({}) }),
543
305
  z.object({ id: entryId, kind: z.literal("mcp"), config: McpConfigSchema }),
544
306
  z.object({ id: entryId, kind: z.literal("service"), config: ServiceConfigSchema }),
@@ -547,91 +309,61 @@ export const CapabilitySchema = z.discriminatedUnion("kind", [
547
309
  z.object({ id: entryId, kind: z.literal("plugin"), config: PluginConfigSchema }),
548
310
  z.object({ id: entryId, kind: z.literal("extension"), config: ExtensionConfigSchema }),
549
311
  z.object({ id: entryId, kind: z.literal("ssh"), config: SshConfigSchema }),
550
- // No IFNAMSIZ cap on the id: the tunnel's interface name is DERIVED (see the daemon's vpn/vpn-paths.ts
551
- // interfaceName) rather than being the id itself, so a descriptive name is free.
312
+ // No IFNAMSIZ cap on the id: the tunnel interface name is derived, not the id itself, so a descriptive name is
313
+ // free.
552
314
  z.object({ id: entryId, kind: z.literal("vpn"), config: VpnConfigSchema }),
553
- // A geo exit (ExitConfigSchema). Same interface-name derivation as vpn, and deliberately NOT a vpn arm:
554
- // it routes nothing into the main table, so the full-tunnel warning the vpn kind carries stays true.
315
+ // A geo exit; deliberately not a vpn arm, since it routes nothing into the main table and carries no full-tunnel
316
+ // warning.
555
317
  z.object({ id: entryId, kind: z.literal("exit"), config: ExitConfigSchema }),
556
- // The in-sandbox Docker Engine (baked into the base image, dormant by default). Its `--privileged` runtime
557
- // directive is not in the config and never will be: dockerd does not work without it (see the handler's
558
- // isPrivileged), so a switch there would offer a broken sandbox as a choice. What IS optional lives in
559
- // DockerConfigSchema. No remove, the engine's state (/var/lib/docker) and whatever runs on it make a
560
- // silent de-privilege more destructive than useful.
318
+ // The in-sandbox Docker Engine, baked into the image, dormant by default. No remove: de-privileging it silently
319
+ // would be more destructive than useful given what runs on it.
561
320
  z.object({ id: entryId, kind: z.literal("docker"), config: DockerConfigSchema }),
562
321
  z.object({ id: entryId, kind: z.literal("browser"), config: BrowserConfigSchema }),
563
- // One email identity the sandbox acts as online, the browser-owning container accounts are born from
564
- // (IdentityConfigSchema). Browser entries join it via their `identity` field.
322
+ // One email identity browser accounts are born from; they join it via their own `identity` field.
565
323
  z.object({ id: entryId, kind: z.literal("identity"), config: IdentityConfigSchema }),
566
324
  z.object({ id: entryId, kind: z.literal("host"), config: HostConfigSchema }),
567
- // The user's own BROWSER, through the extension installed in it (WebExtConfigSchema). The `host` kind's
568
- // sibling: one capability per browser, the id namespacing its tools, the switches enforced at the far end.
569
- // Distinct from `browser`, which is the sandbox's OWN Chromium and a profile this container owns — this
570
- // one is the person's, already signed into everything, and the sandbox only ever borrows it.
325
+ // The user's own browser, through their installed extension; `host`'s sibling, one capability per browser. Distinct
326
+ // from `browser`, the sandbox's own Chromium profile: this one is the person's, already signed into everything,
327
+ // only ever borrowed.
571
328
  z.object({ id: entryId, kind: z.literal("webext"), config: WebExtConfigSchema }),
572
329
  z.object({ id: entryId, kind: z.literal("agent"), config: AcpAgentConfigSchema }),
573
- // A model API (EndpointConfigSchema). The id becomes `endpoint/<id>` in the chat picker, the `agent` kind's
574
- // precedent, with the prefix because these two are the only capability kinds that mint providers and they
575
- // want opposite ability records (an ACP agent owns its own loop; an endpoint runs the full Claude Code one).
330
+ // The id becomes `endpoint/<id>` in the chat picker, the `agent` kind's precedent, since these two are the only
331
+ // kinds that mint providers.
576
332
  z.object({ id: entryId, kind: z.literal("endpoint"), config: EndpointConfigSchema }),
577
- // A model the sandbox downloads and serves itself (LocalModelConfigSchema). Deliberately minting the SAME
578
- // `endpoint/<id>` provider ids as the endpoint kind: to every consumer it IS an endpoint, one the daemon
579
- // happens to operate, so a second provider namespace would be a second code path for the same turns.
333
+ // Deliberately mints the same `endpoint/<id>` ids as `endpoint`: to every consumer this is just an endpoint the
334
+ // daemon happens to operate.
580
335
  z.object({ id: entryId, kind: z.literal("localmodel"), config: LocalModelConfigSchema }),
581
336
  // The sandbox's USDC wallet (WalletConfigSchema), one per sandbox; the key never enters the container.
582
337
  z.object({ id: entryId, kind: z.literal("wallet"), config: WalletConfigSchema }),
583
338
  ]);
584
339
  export type Capability = z.infer<typeof CapabilitySchema>;
585
- /* `code` is a credential the owner has to TYPE SOMEWHERE ELSE to finish this connection. WhatsApp's
586
- * link-a-device code, typed into the phone. It is not part of `detail` because the card does not merely print
587
- * it: it sets it in a size you can read across a desk, next to a copy button, and replaces it in place when the
588
- * provider mints a new one. A sentence with a code buried in it cannot be any of those things. */
340
+ // A credential the owner must type elsewhere (a WhatsApp pairing code); rendered large and copyable, not buried in
341
+ // `detail`'s sentence.
589
342
  export const CapabilityStatusSchema = z.object({
590
343
  state: CapabilityStateSchema.describe("Whether it is live, still coming up, broken, or switched off."),
591
344
  detail: z.string().optional().describe("What is wrong, in words a person can act on."),
592
345
  code: z.string().optional().describe("A short marker for that reason, for anything deciding what to do about it."),
593
346
  });
594
347
  export type CapabilityStatus = z.infer<typeof CapabilityStatusSchema>;
595
- /* The list row: manifest entry + live status. Secrets are never returned (an mcp token becomes hasToken).
596
- *
597
- * `secrets` NAMES them without carrying them, the config keys this connection is actually holding a credential
598
- * under. It is what makes an edit form possible at all: `config` is everything the browser may see, so a form
599
- * seeded from it alone cannot tell "this tunnel has a pre-shared key I'm not allowed to show you" from "this
600
- * tunnel has no pre-shared key", and both render as an empty required box. Saving one then wipes the
601
- * credential, which is why changing a routed network used to mean re-typing a key.
602
- *
603
- * Keys, never values, and never a boolean per known field: the set is derived from what the entry stores, so a
604
- * field the user left blank is absent and a card that gained a credential since is present. The form reads it as
605
- * "show dots, and let blank mean keep" (VAULTED, capability-secrets.ts). */
348
+ // The list row: manifest entry plus live status, secrets never returned. `secrets` names which config keys hold a
349
+ // credential without carrying it, since `config` alone can't distinguish a blank field from one already holding a value
350
+ // the browser isn't shown.
606
351
  export const CapabilitySummarySchema = z.object({
607
352
  id: z.string().describe("The connection's id."),
608
353
  kind: CapabilityKindSchema.describe("What sort of thing it is."),
609
354
  status: CapabilityStatusSchema.describe("Whether it is working."),
610
355
  config: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).describe("Its settings, minus anything secret."),
611
- // Defaulted for the daemon-older-than-browser seam, like `recommendations` below: a required field would
612
- // fail the whole list parse against a sandbox predating this, taking the page down to hide some dots.
356
+ // Defaulted for the daemon-older-than-browser seam: a required field would fail the whole list parse on an older
357
+ // sandbox.
613
358
  secrets: z
614
359
  .array(z.string())
615
360
  .default([])
616
361
  .describe("Which credentials it holds, by name. The values are on one route only, and it is not this one."),
617
362
  });
618
- /* A capability the WORKSPACE asks for but the manifest doesn't carry, derived from what is checked out under
619
- * /work, not from anything the user configured. It exists because the failures it prevents are illegible: a
620
- * compose-backed dev database (`pnpm db:up`) dies on a missing /var/run/docker.sock, and nothing on that error
621
- * points at the one-time privileged rebuild that fixes it; a workspace full of GitHub repos gets an agent that
622
- * cannot read one issue until somebody thinks to go looking for the card.
623
- *
624
- * KEYED BY CATALOG CARD, NOT BY KIND, because github, gitlab, komodo and every other connector share the single
625
- * `cli` kind, a kind cannot say which card to open, and matching on one badged all of them at once.
626
- *
627
- * WHAT IS STORED IS WHAT WAS SEEN. `evidence` is the artifact itself, a workspace-relative path, a git remote,
628
- * rendered verbatim so the claim is checkable rather than believed, and `reason` is the same claim in the user's
629
- * words with the evidence NOT repeated into it. A recommendation is re-derived on every read rather than
630
- * remembered, so one whose evidence has since moved simply stops being made.
631
- *
632
- * `prefill` is the non-secret config the scan could read (a self-hosted instance url, a Komodo core), it fills
633
- * the card's form so the user supplies only the credential. Secrets are NEVER in here, even when one is sitting
634
- * in a checked-in file: the flow points at such a file as evidence, it does not absorb what is in it. */
363
+ // A capability the workspace asks for but the manifest doesn't carry, derived from what's checked out under /work, not
364
+ // from configuration; prevents illegible failures like a missing docker socket with no pointer back to the fix. Keyed
365
+ // by catalog card, not kind, since several cards share one kind. Re-derived on every read, so it drops out once its
366
+ // evidence moves; `prefill` is never a secret, even one sitting in a checked-in file.
635
367
  export const CapabilityRecommendationSchema = z.object({
636
368
  card: z.string().describe("Which connection is being suggested."),
637
369
  evidence: z
@@ -647,9 +379,7 @@ export const CapabilityRecommendationSchema = z.object({
647
379
  export type CapabilityRecommendation = z.infer<typeof CapabilityRecommendationSchema>;
648
380
  export const CapabilitiesListSchema = z.object({
649
381
  capabilities: z.array(CapabilitySummarySchema).describe("What this sandbox is connected to."),
650
- // Defaulted for the daemon-older-than-browser seam: the platform's web app talks to whichever sandbox
651
- // version the user has, and a required field here would fail the parse, taking the whole Capabilities page
652
- // down on every sandbox predating this route, to hide a badge.
382
+ // Defaulted for the daemon-older-than-browser seam, so an older sandbox's parse doesn't fail just to hide a badge.
653
383
  recommendations: z
654
384
  .array(CapabilityRecommendationSchema)
655
385
  .default([])
@@ -658,11 +388,8 @@ export const CapabilitiesListSchema = z.object({
658
388
  ),
659
389
  });
660
390
  export const CapabilityIdParamSchema = z.object({ id: z.string().describe("Which connection.") });
661
- /* One capability's config VERBATIM, secrets included, for the connection route (capabilities.connection).
662
- * The one read on this surface that does not echo secrets as hasToken booleans, which is exactly why it is
663
- * never served to a browser: its handler refuses any caller with a member identity, leaving only the daemon's
664
- * header grants (an extension backend's minted token, which must declare the route in permissions.daemon).
665
- * The values are the strings the capability stored; the caller knows its own kind's field names. */
391
+ // One capability's config verbatim, secrets included, for capabilities.connection; never served to a browser, since its
392
+ // handler accepts only daemon header grants, not a member identity.
666
393
  export const CapabilityConnectionSchema = z.object({
667
394
  id: z.string().describe("The connection's id."),
668
395
  kind: z.string().describe("What sort of thing it is."),
@@ -671,23 +398,18 @@ export const CapabilityConnectionSchema = z.object({
671
398
  .describe("Its settings exactly as stored, credentials included. The field names are its own kind's, which the caller already knows."),
672
399
  });
673
400
  export type CapabilityConnection = z.infer<typeof CapabilityConnectionSchema>;
674
- // DELETE /capabilities/recommendations/{card}: the user said this one is not wanted. The EVIDENCE it was
675
- // declined against is recorded daemon-side rather than sent, so the client cannot dismiss a claim other than the
676
- // one it was shown, and so the recommendation comes back by itself when the workspace changes under it.
401
+ // DELETE /capabilities/recommendations/{card}: the declined evidence is recorded daemon-side, so the suggestion returns
402
+ // once the workspace changes under it.
677
403
  export const CapabilityCardParamSchema = z.object({ card: z.string().describe("Which suggestion to stop making.") });
678
- // POST /capabilities/{id}/secret body: replace just the capability's secret field (its key is per-kind, see the
679
- // sandbox's secretField) and re-run its idempotent apply, the /secrets page's edit path.
404
+ // POST /capabilities/{id}/secret: replaces just the per-kind secret field and re-runs the capability's idempotent
405
+ // apply.
680
406
  export const CapabilitySecretInputSchema = z.object({
681
407
  id: z.string().describe("Which connection."),
682
408
  value: z.string().min(1).describe("The new credential. Its other settings are left alone."),
683
409
  });
684
- /* POST /capabilities/{id}/rename body: the name this connection should answer to from now on.
685
- *
686
- * A capability's id IS the agent's handle for it, its skill file, its tool prefix, its env suffix, the alias
687
- * `ssh <name>` resolves, so renaming one is a migration and not a label edit. The shape of a name is therefore
688
- * the same rule the add form enforces, spelled here because the daemon is the gate: letters and digits to start,
689
- * then hyphens and underscores. Which KINDS may be renamed at all is the handler's own answer (capability.ts
690
- * `rename`), not something a schema can say. */
410
+ // POST /capabilities/{id}/rename: a capability's id is the agent's handle for it (skill file, tool prefix, env suffix,
411
+ // ssh alias), so renaming is a migration, not a label edit. Which kinds may be renamed is the handler's own answer, not
412
+ // this schema's.
691
413
  export const CapabilityRenameSchema = z.object({
692
414
  id: z.string(),
693
415
  to: z
@@ -696,29 +418,20 @@ export const CapabilityRenameSchema = z.object({
696
418
  .max(60)
697
419
  .regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/),
698
420
  });
699
- // POST /capabilities/{id}/login response: the interactive tmux session running the agent's loginCommand,
700
- // which the web surfaces in the terminal panel for the user to complete the sign-in.
421
+ // POST /capabilities/{id}/login: the tmux session running `loginCommand`, surfaced in the terminal panel to complete
422
+ // sign-in.
701
423
  export const CapabilityLoginSchema = z.object({ session: z.string().describe("The terminal the sign-in is happening in. Attach to it to type.") });
702
- // GET /capabilities/{id}/otp response: one freshly minted TOTP code off the capability's stored seed, what the
703
- // in-sandbox `otp` command prints. The seed itself never crosses; secondsRemaining is the caller's cue to
704
- // re-mint rather than submit a code about to die.
424
+ // GET /capabilities/{id}/otp: a freshly minted TOTP code; the seed never crosses, `secondsRemaining` cues a re-mint
425
+ // rather than a stale submit.
705
426
  export const CapabilityOtpSchema = z.object({
706
427
  code: z.string().describe("The code."),
707
428
  secondsRemaining: z
708
429
  .number()
709
430
  .describe("How long it lasts. Its expiring is what makes handing one to an agent safe, since the seed behind it is never revealed."),
710
431
  });
711
- /* POST /capabilities/probe response: did these settings actually reach the thing, asked BEFORE they are saved.
712
- *
713
- * The answer is a sentence rather than a status code because the reader is standing in front of a form: what
714
- * they need is either the service's own confirmation ("Reached GitHub, authenticated as ada") or the exact
715
- * refusal ("GitHub answered 401: the token is not valid"), in the place where the box they would fix still is.
716
- * That is also the whole point of doing it here: every one of these failures is otherwise discovered after the
717
- * add, on a card that says "not connected" with nothing about which of six answers was wrong.
718
- *
719
- * `ok: false` is a REPORTED failure, not a transport error: the probe ran and the service said no. A card whose
720
- * settings cannot be checked from here at all answers `checked: false`, which is a different thing from a
721
- * failure and must never be drawn as one. */
432
+ // POST /capabilities/probe: did these settings actually reach the thing, asked before saving, so a form's reader gets
433
+ // the service's own confirmation or refusal in place, not a later "not connected" card. `ok: false` is a reported
434
+ // failure; `checked: false` means no test exists at all, a different thing that must never render as one.
722
435
  export const CapabilityProbeSchema = z.object({
723
436
  checked: z.boolean().describe("Whether this connection can be tested from here at all. False is not a failure: it is 'no test exists'."),
724
437
  ok: z.boolean().describe("Whether the service answered as itself."),