@intentic/sandbox-contract 1.232.0 → 1.234.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 (538) hide show
  1. package/README.md +11 -5
  2. package/dist/agent-catalog.d.ts +4 -2
  3. package/dist/agent-catalog.d.ts.map +1 -1
  4. package/dist/agent-catalog.js +20 -14
  5. package/dist/agent-catalog.js.map +1 -1
  6. package/dist/chores/chores.d.ts +1 -1
  7. package/dist/chores/chores.d.ts.map +1 -1
  8. package/dist/chores/chores.js +36 -1
  9. package/dist/chores/chores.js.map +1 -1
  10. package/dist/chores/probes.d.ts +1 -1
  11. package/dist/chores/probes.d.ts.map +1 -1
  12. package/dist/chores/probes.js +70 -0
  13. package/dist/chores/probes.js.map +1 -1
  14. package/dist/chores/stack.d.ts.map +1 -1
  15. package/dist/chores/stack.js +2 -1
  16. package/dist/chores/stack.js.map +1 -1
  17. package/dist/chores/verdict.d.ts +1 -1
  18. package/dist/chores/verdict.d.ts.map +1 -1
  19. package/dist/command-classes.d.ts +17 -0
  20. package/dist/command-classes.d.ts.map +1 -0
  21. package/dist/command-classes.js +189 -0
  22. package/dist/command-classes.js.map +1 -0
  23. package/dist/contracts/activity.contract.js +1 -1
  24. package/dist/contracts/activity.contract.js.map +1 -1
  25. package/dist/contracts/agent.contract.d.ts +40 -2
  26. package/dist/contracts/agent.contract.d.ts.map +1 -1
  27. package/dist/contracts/agent.contract.js +4 -1
  28. package/dist/contracts/agent.contract.js.map +1 -1
  29. package/dist/contracts/agents.contract.d.ts +24 -0
  30. package/dist/contracts/agents.contract.d.ts.map +1 -1
  31. package/dist/contracts/agents.contract.js +5 -1
  32. package/dist/contracts/agents.contract.js.map +1 -1
  33. package/dist/contracts/automations.contract.d.ts +30 -0
  34. package/dist/contracts/automations.contract.d.ts.map +1 -1
  35. package/dist/contracts/automations.contract.js +2 -1
  36. package/dist/contracts/automations.contract.js.map +1 -1
  37. package/dist/contracts/capabilities.contract.d.ts +63 -0
  38. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  39. package/dist/contracts/capabilities.contract.js +3 -1
  40. package/dist/contracts/capabilities.contract.js.map +1 -1
  41. package/dist/contracts/chores.contract.d.ts +17 -0
  42. package/dist/contracts/chores.contract.d.ts.map +1 -1
  43. package/dist/contracts/chores.contract.js +2 -1
  44. package/dist/contracts/chores.contract.js.map +1 -1
  45. package/dist/contracts/ci.contract.js +2 -1
  46. package/dist/contracts/ci.contract.js.map +1 -1
  47. package/dist/contracts/claude.contract.js +2 -1
  48. package/dist/contracts/claude.contract.js.map +1 -1
  49. package/dist/contracts/cursor.contract.js +2 -1
  50. package/dist/contracts/cursor.contract.js.map +1 -1
  51. package/dist/contracts/drafts.contract.d.ts.map +1 -1
  52. package/dist/contracts/drafts.contract.js +2 -1
  53. package/dist/contracts/drafts.contract.js.map +1 -1
  54. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  55. package/dist/contracts/endpoints.contract.js +2 -1
  56. package/dist/contracts/endpoints.contract.js.map +1 -1
  57. package/dist/contracts/exit.contract.d.ts.map +1 -1
  58. package/dist/contracts/exit.contract.js +2 -1
  59. package/dist/contracts/exit.contract.js.map +1 -1
  60. package/dist/contracts/extensions.contract.d.ts +44 -0
  61. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  62. package/dist/contracts/extensions.contract.js +4 -1
  63. package/dist/contracts/extensions.contract.js.map +1 -1
  64. package/dist/contracts/git.contract.d.ts.map +1 -1
  65. package/dist/contracts/git.contract.js +4 -1
  66. package/dist/contracts/git.contract.js.map +1 -1
  67. package/dist/contracts/grok.contract.d.ts.map +1 -1
  68. package/dist/contracts/grok.contract.js +2 -1
  69. package/dist/contracts/grok.contract.js.map +1 -1
  70. package/dist/contracts/history.contract.d.ts.map +1 -1
  71. package/dist/contracts/history.contract.js +2 -1
  72. package/dist/contracts/history.contract.js.map +1 -1
  73. package/dist/contracts/host.contract.d.ts +7 -0
  74. package/dist/contracts/host.contract.d.ts.map +1 -1
  75. package/dist/contracts/host.contract.js +4 -1
  76. package/dist/contracts/host.contract.js.map +1 -1
  77. package/dist/contracts/intentic.contract.d.ts.map +1 -1
  78. package/dist/contracts/intentic.contract.js +2 -1
  79. package/dist/contracts/intentic.contract.js.map +1 -1
  80. package/dist/contracts/inventory.contract.js +1 -1
  81. package/dist/contracts/inventory.contract.js.map +1 -1
  82. package/dist/contracts/issues.contract.d.ts +89 -0
  83. package/dist/contracts/issues.contract.d.ts.map +1 -0
  84. package/dist/contracts/issues.contract.js +50 -0
  85. package/dist/contracts/issues.contract.js.map +1 -0
  86. package/dist/contracts/logs.contract.d.ts.map +1 -1
  87. package/dist/contracts/logs.contract.js +1 -1
  88. package/dist/contracts/logs.contract.js.map +1 -1
  89. package/dist/contracts/loops.contract.js +2 -1
  90. package/dist/contracts/loops.contract.js.map +1 -1
  91. package/dist/contracts/panels.contract.d.ts.map +1 -1
  92. package/dist/contracts/panels.contract.js +2 -1
  93. package/dist/contracts/panels.contract.js.map +1 -1
  94. package/dist/contracts/personas.contract.js +2 -1
  95. package/dist/contracts/personas.contract.js.map +1 -1
  96. package/dist/contracts/ports.contract.d.ts.map +1 -1
  97. package/dist/contracts/ports.contract.js +2 -1
  98. package/dist/contracts/ports.contract.js.map +1 -1
  99. package/dist/contracts/prepush.contract.d.ts.map +1 -1
  100. package/dist/contracts/prepush.contract.js +2 -1
  101. package/dist/contracts/prepush.contract.js.map +1 -1
  102. package/dist/contracts/providers.contract.d.ts.map +1 -1
  103. package/dist/contracts/providers.contract.js +2 -1
  104. package/dist/contracts/providers.contract.js.map +1 -1
  105. package/dist/contracts/public.contract.d.ts.map +1 -1
  106. package/dist/contracts/public.contract.js +2 -1
  107. package/dist/contracts/public.contract.js.map +1 -1
  108. package/dist/contracts/push.contract.d.ts.map +1 -1
  109. package/dist/contracts/push.contract.js +2 -1
  110. package/dist/contracts/push.contract.js.map +1 -1
  111. package/dist/contracts/runner.contract.d.ts +127 -84
  112. package/dist/contracts/runner.contract.d.ts.map +1 -1
  113. package/dist/contracts/runner.contract.js +10 -2
  114. package/dist/contracts/runner.contract.js.map +1 -1
  115. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  116. package/dist/contracts/secrets.contract.js +2 -1
  117. package/dist/contracts/secrets.contract.js.map +1 -1
  118. package/dist/contracts/sessions.contract.js +1 -1
  119. package/dist/contracts/sessions.contract.js.map +1 -1
  120. package/dist/contracts/settings.contract.d.ts +32 -0
  121. package/dist/contracts/settings.contract.d.ts.map +1 -1
  122. package/dist/contracts/settings.contract.js +3 -1
  123. package/dist/contracts/settings.contract.js.map +1 -1
  124. package/dist/contracts/share.contract.d.ts.map +1 -1
  125. package/dist/contracts/share.contract.js +2 -1
  126. package/dist/contracts/share.contract.js.map +1 -1
  127. package/dist/contracts/skills.contract.d.ts.map +1 -1
  128. package/dist/contracts/skills.contract.js +2 -1
  129. package/dist/contracts/skills.contract.js.map +1 -1
  130. package/dist/contracts/system.contract.d.ts +31 -16
  131. package/dist/contracts/system.contract.d.ts.map +1 -1
  132. package/dist/contracts/system.contract.js +6 -1
  133. package/dist/contracts/system.contract.js.map +1 -1
  134. package/dist/contracts/translator.contract.d.ts.map +1 -1
  135. package/dist/contracts/translator.contract.js +4 -1
  136. package/dist/contracts/translator.contract.js.map +1 -1
  137. package/dist/contracts/usage.contract.js +1 -1
  138. package/dist/contracts/usage.contract.js.map +1 -1
  139. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  140. package/dist/contracts/vpn.contract.js +2 -1
  141. package/dist/contracts/vpn.contract.js.map +1 -1
  142. package/dist/contracts/webext.contract.d.ts +45 -0
  143. package/dist/contracts/webext.contract.d.ts.map +1 -0
  144. package/dist/contracts/webext.contract.js +12 -0
  145. package/dist/contracts/webext.contract.js.map +1 -0
  146. package/dist/contracts/workflows.contract.js +2 -1
  147. package/dist/contracts/workflows.contract.js.map +1 -1
  148. package/dist/contracts/workspace.contract.d.ts +2 -2
  149. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  150. package/dist/contracts/workspace.contract.js +7 -1
  151. package/dist/contracts/workspace.contract.js.map +1 -1
  152. package/dist/credential-material.d.ts +2 -0
  153. package/dist/credential-material.d.ts.map +1 -0
  154. package/dist/credential-material.js +36 -0
  155. package/dist/credential-material.js.map +1 -0
  156. package/dist/definition-action.d.ts +7 -0
  157. package/dist/definition-action.d.ts.map +1 -0
  158. package/dist/definition-action.js +3 -0
  159. package/dist/definition-action.js.map +1 -0
  160. package/dist/definition.d.ts +132 -21
  161. package/dist/definition.d.ts.map +1 -1
  162. package/dist/definition.js +29 -7
  163. package/dist/definition.js.map +1 -1
  164. package/dist/events.d.ts +101 -0
  165. package/dist/events.d.ts.map +1 -1
  166. package/dist/events.js +25 -1
  167. package/dist/events.js.map +1 -1
  168. package/dist/fast-tier.d.ts +1 -1
  169. package/dist/fast-tier.d.ts.map +1 -1
  170. package/dist/history-state.d.ts.map +1 -1
  171. package/dist/history-state.js +2 -0
  172. package/dist/history-state.js.map +1 -1
  173. package/dist/hostnames.d.ts +2 -0
  174. package/dist/hostnames.d.ts.map +1 -1
  175. package/dist/hostnames.js +3 -1
  176. package/dist/hostnames.js.map +1 -1
  177. package/dist/index.d.ts +411 -7
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +56 -1
  180. package/dist/index.js.map +1 -1
  181. package/dist/listener-protocol.js +1 -1
  182. package/dist/listener-protocol.js.map +1 -1
  183. package/dist/quick-model.d.ts +1 -1
  184. package/dist/quick-model.d.ts.map +1 -1
  185. package/dist/runner-protocol.d.ts +18 -0
  186. package/dist/runner-protocol.d.ts.map +1 -1
  187. package/dist/runner-protocol.js +8 -4
  188. package/dist/runner-protocol.js.map +1 -1
  189. package/dist/runtime-state.d.ts +9 -0
  190. package/dist/runtime-state.d.ts.map +1 -1
  191. package/dist/runtime-state.js +3 -0
  192. package/dist/runtime-state.js.map +1 -1
  193. package/dist/schemas/activity.d.ts +112 -0
  194. package/dist/schemas/activity.d.ts.map +1 -0
  195. package/dist/schemas/activity.js +70 -0
  196. package/dist/schemas/activity.js.map +1 -0
  197. package/dist/schemas/agent.d.ts +195 -0
  198. package/dist/schemas/agent.d.ts.map +1 -0
  199. package/dist/schemas/agent.js +171 -0
  200. package/dist/schemas/agent.js.map +1 -0
  201. package/dist/schemas/agents.d.ts +690 -0
  202. package/dist/schemas/agents.d.ts.map +1 -0
  203. package/dist/schemas/agents.js +314 -0
  204. package/dist/schemas/agents.js.map +1 -0
  205. package/dist/schemas/automations.d.ts +781 -0
  206. package/dist/schemas/automations.d.ts.map +1 -0
  207. package/dist/schemas/automations.js +223 -0
  208. package/dist/schemas/automations.js.map +1 -0
  209. package/dist/schemas/capabilities.d.ts +753 -0
  210. package/dist/schemas/capabilities.d.ts.map +1 -0
  211. package/dist/schemas/capabilities.js +269 -0
  212. package/dist/schemas/capabilities.js.map +1 -0
  213. package/dist/schemas/ci.d.ts +179 -0
  214. package/dist/schemas/ci.d.ts.map +1 -0
  215. package/dist/schemas/ci.js +99 -0
  216. package/dist/schemas/ci.js.map +1 -0
  217. package/dist/schemas/claude-gate.d.ts +13 -0
  218. package/dist/schemas/claude-gate.d.ts.map +1 -0
  219. package/dist/schemas/claude-gate.js +8 -0
  220. package/dist/schemas/claude-gate.js.map +1 -0
  221. package/dist/schemas/codebase-health.d.ts +56 -0
  222. package/dist/schemas/codebase-health.d.ts.map +1 -0
  223. package/dist/schemas/codebase-health.js +43 -0
  224. package/dist/schemas/codebase-health.js.map +1 -0
  225. package/dist/schemas/computers.d.ts +386 -0
  226. package/dist/schemas/computers.d.ts.map +1 -0
  227. package/dist/schemas/computers.js +107 -0
  228. package/dist/schemas/computers.js.map +1 -0
  229. package/dist/schemas/drafts.d.ts +84 -0
  230. package/dist/schemas/drafts.d.ts.map +1 -0
  231. package/dist/schemas/drafts.js +44 -0
  232. package/dist/schemas/drafts.js.map +1 -0
  233. package/dist/schemas/environment.d.ts +349 -0
  234. package/dist/schemas/environment.d.ts.map +1 -0
  235. package/dist/schemas/environment.js +111 -0
  236. package/dist/schemas/environment.js.map +1 -0
  237. package/dist/schemas/exit.d.ts +151 -0
  238. package/dist/schemas/exit.d.ts.map +1 -0
  239. package/dist/schemas/exit.js +115 -0
  240. package/dist/schemas/exit.js.map +1 -0
  241. package/dist/schemas/extension-updates.d.ts +1016 -0
  242. package/dist/schemas/extension-updates.d.ts.map +1 -0
  243. package/dist/schemas/extension-updates.js +199 -0
  244. package/dist/schemas/extension-updates.js.map +1 -0
  245. package/dist/schemas/fast-mode.d.ts +8 -0
  246. package/dist/schemas/fast-mode.d.ts.map +1 -0
  247. package/dist/schemas/fast-mode.js +3 -0
  248. package/dist/schemas/fast-mode.js.map +1 -0
  249. package/dist/schemas/git-history.d.ts +238 -0
  250. package/dist/schemas/git-history.d.ts.map +1 -0
  251. package/dist/schemas/git-history.js +152 -0
  252. package/dist/schemas/git-history.js.map +1 -0
  253. package/dist/schemas/git.d.ts +471 -0
  254. package/dist/schemas/git.d.ts.map +1 -0
  255. package/dist/schemas/git.js +204 -0
  256. package/dist/schemas/git.js.map +1 -0
  257. package/dist/schemas/history.d.ts +100 -0
  258. package/dist/schemas/history.d.ts.map +1 -0
  259. package/dist/schemas/history.js +54 -0
  260. package/dist/schemas/history.js.map +1 -0
  261. package/dist/schemas/hosts.d.ts +41 -0
  262. package/dist/schemas/hosts.d.ts.map +1 -0
  263. package/dist/schemas/hosts.js +18 -0
  264. package/dist/schemas/hosts.js.map +1 -0
  265. package/dist/schemas/intentic.d.ts +5 -0
  266. package/dist/schemas/intentic.d.ts.map +1 -0
  267. package/dist/schemas/intentic.js +3 -0
  268. package/dist/schemas/intentic.js.map +1 -0
  269. package/dist/schemas/internal.d.ts +8 -0
  270. package/dist/schemas/internal.d.ts.map +1 -0
  271. package/dist/schemas/internal.js +12 -0
  272. package/dist/schemas/internal.js.map +1 -0
  273. package/dist/schemas/inventory.d.ts +171 -0
  274. package/dist/schemas/inventory.d.ts.map +1 -0
  275. package/dist/schemas/inventory.js +51 -0
  276. package/dist/schemas/inventory.js.map +1 -0
  277. package/dist/schemas/issues.d.ts +324 -0
  278. package/dist/schemas/issues.d.ts.map +1 -0
  279. package/dist/schemas/issues.js +107 -0
  280. package/dist/schemas/issues.js.map +1 -0
  281. package/dist/schemas/logs.d.ts +67 -0
  282. package/dist/schemas/logs.d.ts.map +1 -0
  283. package/dist/schemas/logs.js +54 -0
  284. package/dist/schemas/logs.js.map +1 -0
  285. package/dist/schemas/loops.d.ts +415 -0
  286. package/dist/schemas/loops.d.ts.map +1 -0
  287. package/dist/schemas/loops.js +188 -0
  288. package/dist/schemas/loops.js.map +1 -0
  289. package/dist/schemas/maintenance.d.ts +618 -0
  290. package/dist/schemas/maintenance.d.ts.map +1 -0
  291. package/dist/schemas/maintenance.js +222 -0
  292. package/dist/schemas/maintenance.js.map +1 -0
  293. package/dist/schemas/marketplace.d.ts +64 -0
  294. package/dist/schemas/marketplace.d.ts.map +1 -0
  295. package/dist/schemas/marketplace.js +17 -0
  296. package/dist/schemas/marketplace.js.map +1 -0
  297. package/dist/schemas/panels.d.ts +61 -0
  298. package/dist/schemas/panels.d.ts.map +1 -0
  299. package/dist/schemas/panels.js +51 -0
  300. package/dist/schemas/panels.js.map +1 -0
  301. package/dist/schemas/personas.d.ts +122 -0
  302. package/dist/schemas/personas.d.ts.map +1 -0
  303. package/dist/schemas/personas.js +102 -0
  304. package/dist/schemas/personas.js.map +1 -0
  305. package/dist/schemas/plan-limits.d.ts +172 -0
  306. package/dist/schemas/plan-limits.d.ts.map +1 -0
  307. package/dist/schemas/plan-limits.js +126 -0
  308. package/dist/schemas/plan-limits.js.map +1 -0
  309. package/dist/schemas/ports.d.ts +71 -0
  310. package/dist/schemas/ports.d.ts.map +1 -0
  311. package/dist/schemas/ports.js +42 -0
  312. package/dist/schemas/ports.js.map +1 -0
  313. package/dist/schemas/provider-oauth.d.ts +128 -0
  314. package/dist/schemas/provider-oauth.d.ts.map +1 -0
  315. package/dist/schemas/provider-oauth.js +91 -0
  316. package/dist/schemas/provider-oauth.js.map +1 -0
  317. package/dist/schemas/provider-subscriptions.d.ts +9 -0
  318. package/dist/schemas/provider-subscriptions.d.ts.map +1 -0
  319. package/dist/schemas/provider-subscriptions.js +3 -0
  320. package/dist/schemas/provider-subscriptions.js.map +1 -0
  321. package/dist/schemas/public.d.ts +32 -0
  322. package/dist/schemas/public.d.ts.map +1 -0
  323. package/dist/schemas/public.js +29 -0
  324. package/dist/schemas/public.js.map +1 -0
  325. package/dist/schemas/push.d.ts +55 -0
  326. package/dist/schemas/push.d.ts.map +1 -0
  327. package/dist/schemas/push.js +60 -0
  328. package/dist/schemas/push.js.map +1 -0
  329. package/dist/schemas/secrets.d.ts +86 -0
  330. package/dist/schemas/secrets.d.ts.map +1 -0
  331. package/dist/schemas/secrets.js +51 -0
  332. package/dist/schemas/secrets.js.map +1 -0
  333. package/dist/schemas/sessions.d.ts +32 -0
  334. package/dist/schemas/sessions.d.ts.map +1 -0
  335. package/dist/schemas/sessions.js +11 -0
  336. package/dist/schemas/sessions.js.map +1 -0
  337. package/dist/schemas/settings.d.ts +554 -0
  338. package/dist/schemas/settings.d.ts.map +1 -0
  339. package/dist/schemas/settings.js +263 -0
  340. package/dist/schemas/settings.js.map +1 -0
  341. package/dist/schemas/share.d.ts +49 -0
  342. package/dist/schemas/share.d.ts.map +1 -0
  343. package/dist/schemas/share.js +26 -0
  344. package/dist/schemas/share.js.map +1 -0
  345. package/dist/schemas/shared.d.ts +22 -0
  346. package/dist/schemas/shared.d.ts.map +1 -0
  347. package/dist/schemas/shared.js +16 -0
  348. package/dist/schemas/shared.js.map +1 -0
  349. package/dist/schemas/system.d.ts +86 -0
  350. package/dist/schemas/system.d.ts.map +1 -0
  351. package/dist/schemas/system.js +64 -0
  352. package/dist/schemas/system.js.map +1 -0
  353. package/dist/schemas/terminal.d.ts +230 -0
  354. package/dist/schemas/terminal.d.ts.map +1 -0
  355. package/dist/schemas/terminal.js +133 -0
  356. package/dist/schemas/terminal.js.map +1 -0
  357. package/dist/schemas/usage.d.ts +113 -0
  358. package/dist/schemas/usage.d.ts.map +1 -0
  359. package/dist/schemas/usage.js +91 -0
  360. package/dist/schemas/usage.js.map +1 -0
  361. package/dist/schemas/vpn.d.ts +229 -0
  362. package/dist/schemas/vpn.d.ts.map +1 -0
  363. package/dist/schemas/vpn.js +115 -0
  364. package/dist/schemas/vpn.js.map +1 -0
  365. package/dist/schemas/webext.d.ts +122 -0
  366. package/dist/schemas/webext.d.ts.map +1 -0
  367. package/dist/schemas/webext.js +45 -0
  368. package/dist/schemas/webext.js.map +1 -0
  369. package/dist/schemas/workflows.d.ts +881 -0
  370. package/dist/schemas/workflows.d.ts.map +1 -0
  371. package/dist/schemas/workflows.js +164 -0
  372. package/dist/schemas/workflows.js.map +1 -0
  373. package/dist/schemas/workspace-repos.d.ts +143 -0
  374. package/dist/schemas/workspace-repos.d.ts.map +1 -0
  375. package/dist/schemas/workspace-repos.js +87 -0
  376. package/dist/schemas/workspace-repos.js.map +1 -0
  377. package/dist/schemas/workspace-search.d.ts +170 -0
  378. package/dist/schemas/workspace-search.d.ts.map +1 -0
  379. package/dist/schemas/workspace-search.js +85 -0
  380. package/dist/schemas/workspace-search.js.map +1 -0
  381. package/dist/schemas/workspace-setup.d.ts +48 -0
  382. package/dist/schemas/workspace-setup.d.ts.map +1 -0
  383. package/dist/schemas/workspace-setup.js +26 -0
  384. package/dist/schemas/workspace-setup.js.map +1 -0
  385. package/dist/schemas/workspace-tree.d.ts +120 -0
  386. package/dist/schemas/workspace-tree.d.ts.map +1 -0
  387. package/dist/schemas/workspace-tree.js +111 -0
  388. package/dist/schemas/workspace-tree.js.map +1 -0
  389. package/dist/webext-links.d.ts +14 -0
  390. package/dist/webext-links.d.ts.map +1 -0
  391. package/dist/webext-links.js +25 -0
  392. package/dist/webext-links.js.map +1 -0
  393. package/dist/webext-protocol.d.ts +8 -0
  394. package/dist/webext-protocol.d.ts.map +1 -0
  395. package/dist/webext-protocol.js +7 -0
  396. package/dist/webext-protocol.js.map +1 -0
  397. package/dist/workflow-faults.d.ts +1 -1
  398. package/dist/workflow-faults.d.ts.map +1 -1
  399. package/dist/workspace-state.d.ts +12 -8
  400. package/dist/workspace-state.d.ts.map +1 -1
  401. package/dist/workspace-state.js +15 -10
  402. package/dist/workspace-state.js.map +1 -1
  403. package/package.json +19 -8
  404. package/src/agent-catalog.test.ts +56 -55
  405. package/src/agent-catalog.ts +33 -33
  406. package/src/capability-ledger.test.ts +11 -2
  407. package/src/chores/chores.test.ts +1 -1
  408. package/src/chores/chores.ts +67 -2
  409. package/src/chores/probes.test.ts +65 -0
  410. package/src/chores/probes.ts +133 -1
  411. package/src/chores/stack.test.ts +19 -0
  412. package/src/chores/stack.ts +19 -3
  413. package/src/chores/verdict.test.ts +40 -20
  414. package/src/chores/verdict.ts +1 -1
  415. package/src/command-classes.test.ts +445 -0
  416. package/src/command-classes.ts +468 -0
  417. package/src/contracts/activity.contract.ts +1 -1
  418. package/src/contracts/agent.contract.ts +4 -13
  419. package/src/contracts/agents.contract.ts +6 -6
  420. package/src/contracts/automations.contract.ts +2 -2
  421. package/src/contracts/capabilities.contract.ts +3 -4
  422. package/src/contracts/chores.contract.ts +2 -1
  423. package/src/contracts/ci.contract.ts +2 -2
  424. package/src/contracts/claude.contract.ts +2 -2
  425. package/src/contracts/cursor.contract.ts +2 -2
  426. package/src/contracts/drafts.contract.ts +2 -1
  427. package/src/contracts/endpoints.contract.ts +2 -1
  428. package/src/contracts/exit.contract.ts +2 -1
  429. package/src/contracts/extensions.contract.ts +8 -7
  430. package/src/contracts/git.contract.ts +19 -18
  431. package/src/contracts/grok.contract.ts +2 -1
  432. package/src/contracts/history.contract.ts +2 -1
  433. package/src/contracts/host.contract.ts +4 -1
  434. package/src/contracts/intentic.contract.ts +2 -1
  435. package/src/contracts/inventory.contract.ts +1 -1
  436. package/src/contracts/issues.contract.ts +60 -0
  437. package/src/contracts/logs.contract.ts +7 -1
  438. package/src/contracts/loops.contract.ts +2 -2
  439. package/src/contracts/panels.contract.ts +2 -1
  440. package/src/contracts/personas.contract.ts +3 -3
  441. package/src/contracts/ports.contract.ts +3 -2
  442. package/src/contracts/prepush.contract.ts +2 -1
  443. package/src/contracts/providers.contract.ts +2 -1
  444. package/src/contracts/public.contract.ts +3 -2
  445. package/src/contracts/push.contract.ts +2 -1
  446. package/src/contracts/runner.contract.ts +18 -2
  447. package/src/contracts/secrets.contract.ts +2 -1
  448. package/src/contracts/sessions.contract.ts +1 -1
  449. package/src/contracts/settings.contract.ts +3 -9
  450. package/src/contracts/share.contract.ts +3 -2
  451. package/src/contracts/skills.contract.ts +2 -1
  452. package/src/contracts/system.contract.ts +6 -9
  453. package/src/contracts/translator.contract.ts +4 -1
  454. package/src/contracts/usage.contract.ts +1 -1
  455. package/src/contracts/vpn.contract.ts +2 -8
  456. package/src/contracts/webext.contract.ts +37 -0
  457. package/src/contracts/workflows.contract.ts +2 -2
  458. package/src/contracts/workspace.contract.ts +10 -12
  459. package/src/conversation-ids.test.ts +1 -1
  460. package/src/credential-material.test.ts +120 -0
  461. package/src/credential-material.ts +100 -0
  462. package/src/definition-action.ts +8 -0
  463. package/src/definition.ts +74 -10
  464. package/src/events.ts +84 -22
  465. package/src/fast-tier.ts +1 -1
  466. package/src/history-state.ts +17 -0
  467. package/src/host-protocol.ts +1 -1
  468. package/src/hostnames.test.ts +2 -2
  469. package/src/hostnames.ts +18 -2
  470. package/src/index.ts +65 -1
  471. package/src/listener-protocol.ts +1 -1
  472. package/src/quick-model.ts +1 -1
  473. package/src/routes.test.ts +4 -2
  474. package/src/runner-protocol.ts +35 -5
  475. package/src/runtime-state.ts +16 -0
  476. package/src/schemas/activity.ts +123 -0
  477. package/src/schemas/agent.ts +422 -0
  478. package/src/schemas/agents.ts +802 -0
  479. package/src/schemas/automations.ts +522 -0
  480. package/src/schemas/capabilities.ts +729 -0
  481. package/src/schemas/ci.ts +235 -0
  482. package/src/schemas/claude-gate.ts +13 -0
  483. package/src/schemas/codebase-health.ts +64 -0
  484. package/src/schemas/computers.ts +287 -0
  485. package/src/schemas/drafts.ts +108 -0
  486. package/src/schemas/environment.ts +276 -0
  487. package/src/schemas/exit.ts +222 -0
  488. package/src/schemas/extension-updates.ts +324 -0
  489. package/src/schemas/fast-mode.ts +8 -0
  490. package/src/schemas/git-history.ts +265 -0
  491. package/src/schemas/git.ts +430 -0
  492. package/src/schemas/history.ts +112 -0
  493. package/src/schemas/hosts.ts +37 -0
  494. package/src/schemas/intentic.ts +2 -0
  495. package/src/schemas/internal.ts +17 -0
  496. package/src/schemas/inventory.ts +68 -0
  497. package/src/schemas/issues.ts +279 -0
  498. package/src/schemas/logs.ts +96 -0
  499. package/src/schemas/loops.ts +401 -0
  500. package/src/schemas/maintenance.ts +471 -0
  501. package/src/schemas/marketplace.ts +23 -0
  502. package/src/schemas/panels.ts +99 -0
  503. package/src/schemas/personas.ts +281 -0
  504. package/src/schemas/plan-limits.ts +255 -0
  505. package/src/schemas/ports.ts +84 -0
  506. package/src/schemas/provider-oauth.ts +191 -0
  507. package/src/schemas/provider-subscriptions.ts +11 -0
  508. package/src/schemas/public.ts +52 -0
  509. package/src/schemas/push.ts +112 -0
  510. package/src/schemas/secrets.ts +68 -0
  511. package/src/schemas/sessions.ts +16 -0
  512. package/src/schemas/settings.ts +964 -0
  513. package/src/schemas/share.ts +71 -0
  514. package/src/schemas/shared.ts +32 -0
  515. package/src/schemas/system.ts +156 -0
  516. package/src/schemas/terminal.ts +288 -0
  517. package/src/schemas/usage.ts +303 -0
  518. package/src/{schemas.test.ts → schemas/version-seam.test.ts} +4 -2
  519. package/src/schemas/vpn.ts +215 -0
  520. package/src/schemas/webext.ts +108 -0
  521. package/src/schemas/workflows.ts +413 -0
  522. package/src/schemas/workspace-repos.ts +123 -0
  523. package/src/schemas/workspace-search.ts +141 -0
  524. package/src/schemas/workspace-setup.ts +43 -0
  525. package/src/schemas/workspace-tree.ts +234 -0
  526. package/src/title.test.ts +1 -1
  527. package/src/tunnel-ids.test.ts +3 -1
  528. package/src/webext-links.ts +90 -0
  529. package/src/webext-protocol.ts +27 -0
  530. package/src/workflow-faults.test.ts +1 -1
  531. package/src/workflow-faults.ts +1 -1
  532. package/src/workspace-state.test.ts +6 -4
  533. package/src/workspace-state.ts +35 -50
  534. package/dist/schemas.d.ts +0 -9909
  535. package/dist/schemas.d.ts.map +0 -1
  536. package/dist/schemas.js +0 -4288
  537. package/dist/schemas.js.map +0 -1
  538. package/src/schemas.ts +0 -10090
@@ -0,0 +1,71 @@
1
+ // share: a conversation published as a page
2
+ import { z } from "zod";
3
+ /* The outbox holds FILES; a conversation is not one, so sharing it means RENDERING it into one. The result is
4
+ * an ordinary published page under the same `public-<slot>` hostname, with the same guards in front of it,
5
+ * which is the whole reason this rides the outbox rather than inventing a second public surface with its own
6
+ * auth story to get wrong.
7
+ *
8
+ * A share is a SNAPSHOT, not a window. The page holds the conversation as it read at the moment of sharing and
9
+ * does not move again until the owner re-takes it, because the alternative, a link that keeps publishing
10
+ * whatever is said next, makes every later turn a disclosure the user did not consciously make. `sharedAt`
11
+ * is therefore relied on by the row: it dates what the recipient can actually see. */
12
+
13
+ /* HOW MUCH OF A CONVERSATION TRAVELS, decided per share rather than by a setting, because the two answers suit
14
+ * genuinely different acts. `messages` is the two speakers' words and nothing else, what you send a friend to
15
+ * show what the thing said. `everything` adds the agent's work (its tool cards, the diffs of what it edited,
16
+ * the pictures it took) and its thinking, what you send a colleague to show HOW it got there, and which
17
+ * necessarily publishes the code and command output that appear in those cards.
18
+ *
19
+ * Two levels, not a set of switches: every extra toggle is another thing to get wrong about a link that cannot
20
+ * be recalled once sent, and the honest distinction here is between "the conversation" and "the record". */
21
+ export const ShareDetailSchema = z.enum(["messages", "everything"]);
22
+ export type ShareDetail = z.infer<typeof ShareDetailSchema>;
23
+ // One shared conversation, as the Public view lists it.
24
+ export const SharedConversationSchema = z.object({
25
+ /* The share's own id, and the name its page is filed under in the outbox. NOT the conversation's id: that
26
+ * one is a memorable pair (`swift-otter-k9m2`, see conversation-ids.ts) chosen to be guessable BY A HUMAN
27
+ * at a glance, which is the opposite of what should name a page whose only protection is that its address
28
+ * is not enumerable. Minted per share, so re-sharing the same conversation twice yields two links. */
29
+ id: z
30
+ .string()
31
+ .describe(
32
+ "The share's own id, minted fresh each time, so sharing one conversation twice gives two links. Deliberately not the conversation's id, which is memorable by design and would make a page's address guessable.",
33
+ ),
34
+ // Which conversation the snapshot was taken from, what Update re-reads, and what the chat matches against
35
+ // to know it already has a share.
36
+ conversationId: z.string().describe("Which conversation it was taken from."),
37
+ title: z.string().describe("The title on the page, which is the sharer's choice rather than the conversation's own."),
38
+ detail: ShareDetailSchema.describe(
39
+ "How much travels: the two speakers' words alone, or the whole record including the agent's work and thinking, which necessarily publishes the code and command output in it.",
40
+ ),
41
+ // When the snapshot was taken (epoch ms). A share is frozen, so this dates what a recipient can see,
42
+ // not when the conversation happened.
43
+ sharedAt: z
44
+ .number()
45
+ .describe(
46
+ "When the snapshot was taken, in milliseconds. A share is frozen, so this dates what a recipient can see rather than when the conversation happened.",
47
+ ),
48
+ // How many messages the snapshot holds, so a row can say how much is behind the link without opening it.
49
+ messages: z.number().describe("How many messages are behind the link."),
50
+ // The page's public URL. Absent on a sandbox with no tunnel, which has nowhere to publish to, the same
51
+ // rule (and the same cause) as PublicFile.url.
52
+ url: z.string().optional().describe("The page's address. Absent on a sandbox with nowhere to publish to."),
53
+ });
54
+ export type SharedConversation = z.infer<typeof SharedConversationSchema>;
55
+ export const ShareListSchema = z.object({ shares: z.array(SharedConversationSchema).describe("Every conversation currently published as a page.") });
56
+ export type ShareList = z.infer<typeof ShareListSchema>;
57
+ // The title is the sharer's, not the conversation's: the chat's own name is only the default the dialog opens
58
+ // with. Bounded at the registry's title budget (title.ts MAX_LENGTH) so one surface can't store what the others
59
+ // truncate away.
60
+ export const ShareCreateSchema = z.object({
61
+ conversationId: z.string().min(1).describe("Which conversation to publish."),
62
+ title: z.string().min(1).max(80).describe("The title for the page. The conversation's own name is only what a dialog would open with."),
63
+ detail: ShareDetailSchema.describe(
64
+ "How much to publish. Two levels rather than a set of switches, because every extra toggle is another thing to get wrong about a link that cannot be recalled.",
65
+ ),
66
+ });
67
+ // Re-take an existing share's snapshot, keeping its id, and therefore its link, which has already been sent.
68
+ export const ShareUpdateSchema = z.object({
69
+ id: z.string().min(1).describe("Which share to re-take. Its link stays the same, which matters because it has already been sent."),
70
+ });
71
+ export const ShareRemoveSchema = z.object({ id: z.string().min(1).describe("Which share to take down.") });
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ // Success ack for routes that only report completion (push / disconnect / self-host register). A turn paused on
3
+ // a plan/question that no longer exists, or a missing repo/path, is an ORPCError thrown by the handler instead.
4
+ export const OkSchema = z.object({
5
+ ok: z
6
+ .literal(true)
7
+ .describe("Always true. A route that answers this either did the thing or refused with a status; there is no third outcome to report."),
8
+ });
9
+ // The trust tiers of everyone who can open this sandbox, ordered. `owner` is the one bound identity
10
+ // (auth/auth.ts); the other three are granted per email on the daemon's /members list. viewer watches,
11
+ // collaborator drives agents (outward actions become requests), maintainer has the owner's operating authority
12
+ // while remaining revokable. Ownership itself is not a grant and controls the access roster.
13
+ export const MemberRoleSchema = z.enum(["viewer", "collaborator", "maintainer", "owner"]);
14
+ export type MemberRole = z.infer<typeof MemberRoleSchema>;
15
+ // The roles an invite can grant, everything but `owner`, which is bound at first sign-in, never granted.
16
+ export const GrantedRoleSchema = z.enum(["viewer", "collaborator", "maintainer"]);
17
+ export type GrantedRole = z.infer<typeof GrantedRoleSchema>;
18
+ // Shared by every surface that gates on a role (daemon route floors, web affordances) so the order lives in
19
+ // exactly one place.
20
+ const MEMBER_ROLE_RANK: Record<MemberRole, number> = { viewer: 0, collaborator: 1, maintainer: 2, owner: 3 };
21
+ export const roleAtLeast = (role: MemberRole, floor: MemberRole): boolean => MEMBER_ROLE_RANK[role] >= MEMBER_ROLE_RANK[floor];
22
+ // Which repo a git route targets: "root" (the /work workspace repo) or a repo id, the repo's root-relative
23
+ // dir, which may be nested ("clients/foo"; URL-encoded in the path param). Kept as a bare string on the wire
24
+ // (not an enum) so an unknown repo is a handler-thrown NOT_FOUND, matching the daemon's prior 404, rather
25
+ // than an input-validation rejection.
26
+ export const RepoParamSchema = z.object({
27
+ repo: z
28
+ .string()
29
+ .describe(
30
+ 'Which repository. "root" is the workspace itself; anything else is a repository\'s folder relative to the workspace root, URL-encoded.',
31
+ ),
32
+ });
@@ -0,0 +1,156 @@
1
+ import { z } from "zod";
2
+ // version: what this daemon runs (baked). latest/updateAvailable: the daemon compares its version to the
3
+ // latest published `stable` release so the web can offer a non-blocking update (see system/version-check.ts).
4
+ /* Whether an agent runtime can serve a turn right now, probed off the turn path (see the sandbox's
5
+ * agent/adapter-health.ts). "unknown" is a real answer, a probe that could not run must not read as
6
+ * "unavailable" and grey out a provider the user can in fact use, so surfaces treat it as
7
+ * available-but-unverified rather than as a soft no. */
8
+ export const AdapterHealthSchema = z.object({
9
+ state: z
10
+ .enum(["ready", "unavailable", "unknown"])
11
+ .describe(
12
+ "Whether this runtime can serve a turn. Unknown is a real answer rather than a soft no: a check that could not run must not grey out a provider you can in fact use.",
13
+ ),
14
+ // Why it cannot serve, in the user's terms and naming what to do about it. Absent when ready.
15
+ detail: z.string().optional().describe("Why it cannot, and what to do about it. Absent when it can."),
16
+ checkedAt: z.number().describe("When it was last checked, in milliseconds."),
17
+ });
18
+ export type AdapterHealthReport = z.infer<typeof AdapterHealthSchema>;
19
+ /* AN UPDATE ALREADY DOWNLOADED AND BUILT, waiting for the restart that applies it.
20
+ *
21
+ * An update is one blocking operation but it was never one kind of work: pulling the new image and re-applying
22
+ * the environment recipe take the overwhelming majority of the wall clock, and the sandbox is up and serving
23
+ * through both of them. Only the cutover is downtime, and it is seconds.
24
+ *
25
+ * The daemon cannot know any of this by itself, it holds no host Docker socket, so `ic sandbox prepare`
26
+ * tells it, on the machine that runs the container. That is the whole reason this exists: without it, the
27
+ * update card had to quote the download as if it were an outage, and "a few minutes, this page loses the
28
+ * sandbox" is a completely different decision from "about half a minute".
29
+ *
30
+ * Advisory only, in the strict sense: it decides what a card SAYS and never what gets installed. The swap
31
+ * re-derives every one of these facts from the host-side record and refuses the fast path if any has drifted. */
32
+ export const StagedUpdateSchema = z.object({
33
+ // The version the staged image reports about itself. Absent when the image would not say (an older build,
34
+ // a probe that failed), which reads as "ready, version unknown", never as nothing being ready.
35
+ version: z.string().optional().describe("What the downloaded build says it is. Absent means ready but unnamed, never that nothing is ready."),
36
+ // The release channel it was staged FROM, which is not necessarily the one this sandbox follows: preparing
37
+ // a beta build is not moving onto beta.
38
+ channel: z
39
+ .string()
40
+ .describe(
41
+ "Which channel it was taken from. Not necessarily the one this sandbox follows: downloading a beta build is not the same as moving onto beta.",
42
+ ),
43
+ // When it finished downloading, epoch ms, what answers "is this still the update I am being offered?"
44
+ at: z.number().describe("When the download finished, in milliseconds, which answers whether this is still the update being offered."),
45
+ });
46
+ export type StagedUpdate = z.infer<typeof StagedUpdateSchema>;
47
+ export const InfoSchema = z.object({
48
+ name: z.string().optional().describe("What this sandbox is called."),
49
+ image: z.string().optional().describe("The image it is running."),
50
+ version: z.string().optional().describe("The version of that image."),
51
+ latest: z.string().optional().describe("The newest published version on its channel."),
52
+ updateAvailable: z.boolean().optional().describe("Whether those two differ."),
53
+ // Keyed by AgentCapabilities.runtime. Absent until the first background sweep lands, which reads the same
54
+ // as every entry being "unknown", one of the two cannot go stale, so the daemon sends the absence.
55
+ runtimes: z
56
+ .record(z.string(), AdapterHealthSchema)
57
+ .optional()
58
+ .describe(
59
+ "Which agent runtimes can serve a turn right now, keyed by runtime. Absent until the first check has run, which reads the same as every entry being unknown.",
60
+ ),
61
+ /* Which release channel this sandbox follows (`stable` unless it was moved), and the base image the last
62
+ * swap replaced, both set on the container by the host script that performed the swap, since neither is
63
+ * knowable from inside afterwards. `previousImage` is what a rollback returns to; absent means there is
64
+ * nothing to go back to and no rollback is offered. */
65
+ channel: z.string().optional().describe("Which release channel this sandbox follows."),
66
+ previousImage: z
67
+ .string()
68
+ .optional()
69
+ .describe("The image the last update replaced, which is what a rollback would return to. Absent means there is nothing to go back to."),
70
+ /* WHAT IS IN THE UPDATE, in the words of the people it is for, the user-facing lines from every release
71
+ * between `version` and `latest`, newest first (platform/release-notes.ts reads them off the published
72
+ * GitHub Releases).
73
+ *
74
+ * The update card's other half. It could always say an update exists and what taking it costs, recreating
75
+ * the container interrupts every agent mid-turn, and never what the update was worth, which left the
76
+ * decision it asks for with nothing on one side of it.
77
+ *
78
+ * Absent, or empty, whenever there is nothing to say: the notes cache is cold, GitHub is unreachable, or
79
+ * every release in the gap changed only things nobody outside the project would notice. All three read the
80
+ * same way on the card, which shows the offer without them, exactly as it did before. */
81
+ updateNotes: z
82
+ .array(z.string())
83
+ .optional()
84
+ .describe(
85
+ "What is in the update, in the words of the people it is for, newest first. Absent or empty whenever there is nothing worth saying, which reads on screen exactly as it did before there were notes at all.",
86
+ ),
87
+ // How many further notes the gap holds beyond the ones sent, for a sandbox that has been left alone a long
88
+ // time. Absent or 0 ⇒ `updateNotes` is the whole of it.
89
+ moreUpdateNotes: z
90
+ .number()
91
+ .optional()
92
+ .describe(
93
+ "How many further notes there are beyond the ones sent, for a sandbox left alone a long time. Absent or zero means you have all of them.",
94
+ ),
95
+ /* WHAT THE UPDATE TAKES AWAY, the "Breaking changes" lines from every release in the same gap, uncapped
96
+ * (a warning that fell off a truncated list is a breaking update taken unwarned). Their presence is what
97
+ * turns the update card from an offer into a warning that asks to be read before it hands over the
98
+ * command. Absent for the overwhelming majority of updates, which break nothing. */
99
+ breakingNotes: z
100
+ .array(z.string())
101
+ .optional()
102
+ .describe(
103
+ "What the update takes away, uncapped, because a warning that fell off a shortened list is a breaking update taken unwarned. Absent for the overwhelming majority, which break nothing.",
104
+ ),
105
+ /* AN UPDATE THAT HAS ALREADY BEEN DOWNLOADED AND BUILT on the machine that runs this container, and is
106
+ * waiting for the restart that applies it. Absent for the ordinary case where nothing is staged. */
107
+ staged: StagedUpdateSchema.optional().describe(
108
+ "An update already downloaded and built on the machine running this container, waiting only for the restart that applies it. That restart is seconds, where an unprepared update is minutes, which is a different decision entirely. Absent when nothing is waiting.",
109
+ ),
110
+ });
111
+ export type Info = z.infer<typeof InfoSchema>;
112
+ /* WHAT THE DAEMON COULD NOT READ IN ITS OWN STATE FILES.
113
+ *
114
+ * Every manifest under `.intentic/` is read through a schema and falls back when that schema says no, which
115
+ * keeps the daemon up and, until this route, ended there. A settings file with one bad character read as
116
+ * every setting at its default, a misspelled flag was stripped in silence, and a skipped capability said so
117
+ * only in the daemon log. All three look identical from a browser: the feature is simply off.
118
+ *
119
+ * `kind` is what to do about it, which is why it is not just a message:
120
+ * unreadable , the whole file is being ignored. Everything in it is at its default.
121
+ * unknownKey , one key this build does not know. Only that key is ignored, and `suggestion` carries the
122
+ * name it was probably meant to be, when one is close enough to guess honestly.
123
+ * invalidEntry, one entry of a list was skipped. The rest of the file is unaffected.
124
+ *
125
+ * Reported per file rather than as one flat list because the file is the unit a person fixes, and only for the
126
+ * files a person CAN fix (REPORTED_MANIFEST_PATHS in workspace-state.ts). A daemon-written ledger that stops
127
+ * matching a tightened schema is not a repair job to hand the owner; it recovers on its own next write. */
128
+ export const ManifestProblemSchema = z.object({
129
+ kind: z
130
+ .enum(["unreadable", "unknownKey", "invalidEntry"])
131
+ .describe(
132
+ "What to do about it. Unreadable means the whole file is being ignored and everything in it is at its default. An unknown key means only that key is ignored. An invalid entry means one item of a list was skipped and the rest is fine.",
133
+ ),
134
+ detail: z.string().describe("What exactly was wrong."),
135
+ suggestion: z.string().optional().describe("The name it was probably meant to be, when one is close enough to guess honestly."),
136
+ });
137
+ export type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
138
+ // Workspace-relative path (`.intentic/config/settings.json`) and everything currently wrong with that file. A file
139
+ // with nothing wrong is absent from the list rather than present and empty.
140
+ export const ManifestProblemReportSchema = z.object({
141
+ path: z.string().describe("The file, as a workspace path. The file is the unit somebody fixes, which is why problems are grouped by it."),
142
+ problems: z
143
+ .array(ManifestProblemSchema)
144
+ .describe("Everything currently wrong with it. A file with nothing wrong is absent rather than present and empty."),
145
+ });
146
+ export type ManifestProblemReport = z.infer<typeof ManifestProblemReportSchema>;
147
+ export const ManifestProblemsSchema = z.array(ManifestProblemReportSchema);
148
+ // A daemon-minted session (system.session): the steady-state browser credential, exchanged for a verified
149
+ // Google ID token so Google UI is a sign-in moment instead of an hourly renewal. `expiresAt` is epoch ms,
150
+ // the browser renews ahead of it without parsing the token; `email` is who the daemon verified.
151
+ export const DaemonSessionSchema = z.object({
152
+ token: z.string().describe("The credential every other call carries. Present it as a bearer token."),
153
+ expiresAt: z.number().describe("When it stops working, in milliseconds, so a caller can renew ahead of it without reading the token."),
154
+ email: z.string().describe("Who the sandbox verified you as."),
155
+ });
156
+ export type DaemonSession = z.infer<typeof DaemonSessionSchema>;
@@ -0,0 +1,288 @@
1
+ import { z } from "zod";
2
+ // EVERY live surface in the sandbox the web app's ONE global panel can show. Mostly tmux sessions (the
3
+ // interactive I/O is the /system/terminal WebSocket, not oRPC), plus the agent's browser, which is not a
4
+ // terminal at all, no more than a `process` row is, but IS the same question: what is running right now,
5
+ // and can I look at it? One list, because the panel that answers that question is one panel.
6
+ //
7
+ // `shell` = a web-* session the user opened (numbered pill),
8
+ // `panel` = a panel-* dev-server session (labeled by its panel key, started via Start; running:false =
9
+ // untracked, e.g. a finished one-shot job's lingering shell), `agent` = an agent-* session the Claude agent's
10
+ // Bash commands run in (live-watchable, AI-marked in the UI; running:false once every window is a finished
11
+ // command's dead pane, which is what lets the panel sweep it), `job` = a job-* session the daemon's terminal
12
+ // runner executes user-triggered flows in (capability adds, infra check), `process` = a managed background
13
+ // process: a supervised daemon child for an extension's declared processes (name `svc-<key>`, whose
14
+ // "terminal" is a tail of the service's log file), or a tmux-riding one for dockerd and the local model
15
+ // servers, which outlive daemon restarts on purpose. Surfaced in the panel's background-processes popover
16
+ // with read-only log views, never as a killable tab; running is the actual process. A process row that maps
17
+ // to an installed extension's declared process carries extensionId+processName, the address for its
18
+ // /extensions start/stop routes. The
19
+ // `{name}` kill-route param is a bare string validated in the handler (a bad name is a BAD_REQUEST) since the
20
+ // same charset gates a `tmux kill-session -t` shell-out. The agent's BROWSER is deliberately NOT one of these
21
+ // kinds: a Chromium with its own tab strip is a surface in its own right, not a pane in the terminal panel, so
22
+ // it lists from /system/browsers with the pages it has open (BrowserSessionSchema below).
23
+ //
24
+ // `activityAt` (epoch ms of the session's last output) and `exitCode` (the LAST window's exit status, absent
25
+ // while that pane still lives) describe a session beyond "it exists": the panel's work popover orders its live
26
+ // rows by the one and dates them off it, and the daemon's retention sweep ages sessions out by the same clock.
27
+ // 0 is "tmux didn't say", treated as unknown by both, never as 1970.
28
+ export const TerminalSessionSchema = z.object({
29
+ name: z.string().describe("Its id, and what the close route takes."),
30
+ label: z.string().optional().describe("What to call it on screen."),
31
+ kind: z
32
+ .enum(["shell", "panel", "agent", "job", "process"])
33
+ .describe(
34
+ "What sort of thing it is: a terminal somebody opened, a repository's dev server, where an agent's commands run, a job the sandbox started, or a background process that is watched rather than typed into.",
35
+ ),
36
+ running: z
37
+ .boolean()
38
+ .describe("Whether it is alive. A finished one-shot job leaves a dead shell behind, which reads as false and is how it gets swept up."),
39
+ activityAt: z.number().describe("When it last produced output, in milliseconds. Zero means it did not say, which is unknown rather than 1970."),
40
+ exitCode: z.number().optional().describe("How the last thing in it ended. Absent while that pane is still alive."),
41
+ /* WHAT THIS SESSION IS RUNNING RIGHT NOW, `pane_current_command` of its live pane, and ABSENT when it is
42
+ * sitting at its shell prompt. Not a second spelling of `running`: that field says whether a session is a
43
+ * live thing at all (and for a `web-*` shell it is unconditionally true, prompt or build), whereas this one
44
+ * says whether anything is HAPPENING in it. Killing a terminal is final, so the panel confirms on this
45
+ * field before its × ends a session that has work in it, and names the command in the question, see the
46
+ * daemon's `foreground` (system/system.routes.ts) for why a word rather than a flag. */
47
+ command: z
48
+ .string()
49
+ .optional()
50
+ .describe(
51
+ "What is running in it right now. Absent when it is sitting at a prompt. Not a second spelling of whether it is alive: this says whether anything is happening, which is what a close button should ask about before it ends something.",
52
+ ),
53
+ extensionId: z.string().optional().describe("Which extension declared this process, when one did."),
54
+ processName: z
55
+ .string()
56
+ .optional()
57
+ .describe("Which of that extension's processes it is, which together with the id above addresses its start and stop routes."),
58
+ // The agent has parked on a command that stopped for a PERSON, an OTP prompt, a security-key touch, a
59
+ // confirm it cannot answer, and is waiting at this session's live pane. `message` is its own account of
60
+ // what it needs. The terminal panel renders it as a banner over that session's tab (where the prompt the
61
+ // user has to answer already is) and its buttons settle the parked card through `POST /agent/reply` with
62
+ // `requestId`, exactly as the chat card does. The same shape as a browser's `help` below, on purpose: the
63
+ // two handovers differ in WHERE the person acts, not in what is being asked. Present only while open.
64
+ help: z
65
+ .object({
66
+ requestId: z.string().describe("What to send back when you answer, through the agent reply route."),
67
+ message: z.string().describe("What the agent needs, in its own words."),
68
+ requestedAt: z.number().describe("When it asked, in milliseconds."),
69
+ })
70
+ .optional()
71
+ .describe("The agent has stopped at something only a person can clear, and is waiting at this terminal. Present only while it is waiting."),
72
+ });
73
+ export const TerminalsListSchema = z.object({
74
+ sessions: z
75
+ .array(TerminalSessionSchema)
76
+ .describe("Every live surface the sandbox is holding, in one list, because the question they all answer is the same one."),
77
+ });
78
+ export type TerminalsList = z.infer<typeof TerminalsListSchema>;
79
+ export const TerminalNameParamSchema = z.object({ name: z.string().describe("Which terminal.") });
80
+ // One session's PANE HISTORY as plain text. This route exists because the browser cannot reach it any other
81
+ // way: a tmux client runs on the ALTERNATE screen, which has no scrollback of its own, so what the wheel moves
82
+ // through lives in tmux on the far side of the socket and never enters the xterm buffer the page could select.
83
+ // `lines` is how far back to ask for, tmux clamps it to the history it actually has, and `truncated` says the
84
+ // answer stopped at the request rather than at the beginning.
85
+ export const TerminalScrollbackQuerySchema = z.object({
86
+ name: z.string().describe("Which terminal."),
87
+ lines: z.coerce.number().min(1).max(100_000).default(20_000).describe("How far back to ask for. Clamped to the history that actually exists."),
88
+ });
89
+ export const TerminalScrollbackSchema = z.object({
90
+ name: z.string().describe("Which terminal this is from."),
91
+ // Oldest line first, wrapped lines rejoined so a copied URL or path comes back whole.
92
+ text: z.string().describe("The history, oldest line first, with wrapped lines rejoined so a copied address or path comes back whole."),
93
+ lines: z.number().describe("How many lines you got."),
94
+ truncated: z.boolean().describe("It stopped because you asked for that many, not because the history ran out."),
95
+ });
96
+ export type TerminalScrollback = z.infer<typeof TerminalScrollbackSchema>;
97
+ /* ---- browsers: the Chromium the agent drives through its @playwright/mcp tools ----
98
+ *
99
+ * A `browser-<sdk session>` Chromium (browser/browser-sessions.ts), watchable live over the
100
+ * /system/browser-view WebSocket. It lists apart from the terminals because it is shaped differently in the one
101
+ * way that decides a UI: a terminal is ONE stream of bytes, while a browser holds SEVERAL pages at once and the
102
+ * question "what is the agent looking at?" only has an answer if the wire carries all of them. So `pages` is the
103
+ * point of this schema, the view renders them as a tab strip and binds the screencast to whichever the user
104
+ * picks, and `active` is the one the agent itself last touched (what the view follows until the user says
105
+ * otherwise).
106
+ *
107
+ * `id` is opaque and minted per session, and it is what makes a tab survive a relist: it is stable for the life
108
+ * of the page, unlike its url (the agent navigates away) or its position (a closed tab renumbers the rest). */
109
+ export const BrowserPageSchema = z.object({
110
+ id: z
111
+ .string()
112
+ .describe(
113
+ "Stable for the life of the page, which is what lets a tab survive a refresh of this list. Its address changes as the agent navigates and its position changes when a sibling closes.",
114
+ ),
115
+ // The page's own title. Absent mid-navigation, which is exactly when a tab still needs to render.
116
+ title: z.string().optional().describe("The page's title. Absent mid-navigation, which is exactly when a tab still has to be drawn."),
117
+ url: z.string().describe("Where it is."),
118
+ // The page the agent last drove, on a finished session, the one it ended on. Exactly one page has it.
119
+ active: z.boolean().describe("The one the agent last touched, or for a finished session, the one it ended on. Exactly one page has this."),
120
+ });
121
+ export const BrowserSessionSchema = z.object({
122
+ name: z.string().describe("Its id, and what the close route takes."),
123
+ // The pill's text: the active page's title, else its host, else which browser this is.
124
+ label: z.string().describe("What to call it on screen: the open page's title, or its site, or which browser this is."),
125
+ // Which MCP server drives it: `web` (the credential-free browser) or a logged-in capability's id, the
126
+ // difference between a throwaway page and one signed in as the user, which is worth saying out loud.
127
+ server: z
128
+ .string()
129
+ .describe(
130
+ "Which browser drives it: the credential-free one, or a signed-in account's. The difference between a throwaway page and one logged in as you, which is worth saying out loud.",
131
+ ),
132
+ // False once that Chromium is gone (the turn ended, the agent closed it, it crashed). A finished session
133
+ // still lists for a while, with the pages it had, the record of where the agent went.
134
+ running: z
135
+ .boolean()
136
+ .describe("Whether it is still open. A closed one is listed for a while with the pages it had, as the record of where the agent went."),
137
+ activityAt: z.number().describe("When it last did anything, in milliseconds."),
138
+ // When that Chromium went away, for the "closed 20m ago" line a finished session leads with. Absent while
139
+ // running, which is the same fact as `running`, but the view needs the timestamp, not just the flag.
140
+ finishedAt: z.number().optional().describe("When it closed, in milliseconds. Absent while it is open."),
141
+ // The agent has hit something only a person can clear (a captcha, a password it does not hold, a phone
142
+ // check) and is PARKED on it: `message` is its own account of what it needs, in the user's language. The
143
+ // Browsers view renders it as a banner over the live stage, where "Take control" already is, and its
144
+ // buttons settle the parked card through `POST /agent/reply` with `requestId`, exactly as the chat card
145
+ // does; the field clears when the waiter settles, never by direct edit. Present only while open.
146
+ help: z
147
+ .object({
148
+ requestId: z.string().describe("What to send back when you answer, through the agent reply route."),
149
+ message: z.string().describe("What the agent needs, in its own words."),
150
+ requestedAt: z.number().describe("When it asked, in milliseconds."),
151
+ })
152
+ .optional()
153
+ .describe(
154
+ "The agent has hit something only a person can clear: a captcha, a password it does not hold, a check on your phone. Present only while it is waiting.",
155
+ ),
156
+ pages: z
157
+ .array(BrowserPageSchema)
158
+ .describe("Every page it has open. A browser holds several at once, which is the reason it is listed apart from the terminals."),
159
+ });
160
+ export type BrowserPage = z.infer<typeof BrowserPageSchema>;
161
+ export type BrowserSession = z.infer<typeof BrowserSessionSchema>;
162
+ export const BrowsersListSchema = z.object({
163
+ sessions: z.array(BrowserSessionSchema).describe("Every browser the agents have running, open or recently closed."),
164
+ });
165
+ export type BrowsersList = z.infer<typeof BrowsersListSchema>;
166
+ export const BrowserNameParamSchema = z.object({ name: z.string().describe("Which browser.") });
167
+ /* ---- subagents: the agents an agent starts ----
168
+ *
169
+ * The third thing a turn spawns that the operator can be shown, after its shell and its browser, and the only
170
+ * one that is itself an agent. Two kinds land in this one list, because from outside they are the same fact
171
+ * (another agent, working, that you did not start):
172
+ * • `subagent`, the SDK's Agent/Task tool. The daemon learns of it from the SubagentStart/SubagentStop hooks
173
+ * and the task_* stream messages, joined on `toolUseId`.
174
+ * • `spawned`, a full agent the turn started through the daemon's own spawn door (children/children.ts), on
175
+ * ANY connected provider, Cursor's Composer, Codex, Gemini, another Claude. The daemon runs the child
176
+ * itself, so its whole life is reported by direct calls rather than reconstructed from hooks or stdout.
177
+ *
178
+ * `id` IS THE SPAWNING TOOL CALL'S id for an SDK child (the one key its meta file, its task messages and the
179
+ * client's `parentToolUseId` nesting all carry), and the child's own conversation id for a `spawned` one (the
180
+ * spawn door returns it, so both sides hold it). A card links to its subagent with the id it has, and the
181
+ * subagent points back at the card the same way. The ids the transcripts are actually READ with, the SDK's
182
+ * agent id, stay daemon-side, because no surface asks a question they answer.
183
+ *
184
+ * WHAT A KIND CHANGES, and it is only ever the live view: an SDK subagent has no process of its own to look
185
+ * at, so watching it means reading its transcript; a spawned child is a conversation of its own, so its live
186
+ * view is that conversation's stream. */
187
+ export const SubagentKindSchema = z.enum(["subagent", "spawned"]);
188
+ export type SubagentKind = z.infer<typeof SubagentKindSchema>;
189
+ // running/pending/blocked are live; the rest are terminal. Deliberately the SDK's own task vocabulary
190
+ // (SDKTaskUpdatedMessage.patch.status) rather than AgentStatus: this is not a fleet card's lifecycle (no
191
+ // draft/landed/conflict), and mapping the two would invent states neither side reports. `blocked` is the one
192
+ // addition the SDK never says: a spawned child's own question/permission/plan card raises it
193
+ // (children/children.ts), and it exists because "the child needs an answer" is the one live state a parent or
194
+ // an operator acts on differently from "the child is working".
195
+ export const SubagentStatusSchema = z.enum(["pending", "running", "blocked", "completed", "failed", "killed", "paused"]);
196
+ export type SubagentStatus = z.infer<typeof SubagentStatusSchema>;
197
+ /* WHETHER ANYTHING CHECKED WHAT THE HELPER DID, carried beside its report rather than left for the reader to
198
+ * assume. Computed from the helper's own tool calls, the files it edited against the checks that ran after
199
+ * them (the daemon's child-verification.ts), so it holds on every provider rather than only where the Claude
200
+ * hooks reach.
201
+ *
202
+ * The four states are deliberately not two. `verified` and `failing` each name the command that spoke, so a
203
+ * targeted test is never read as the suite; `unproven` is the one that matters most, work changed and nothing
204
+ * ran; and `no-code` says the helper edited nothing, which is the honest answer for a research helper and
205
+ * must not be rendered as approval. Absent ⇒ the daemon saw no tool calls from it at all. */
206
+ export const SubagentVerificationSchema = z.object({
207
+ state: z
208
+ .enum(["verified", "unproven", "failing", "no-code"])
209
+ .describe(
210
+ "Whether anything proved its work: a check passed after its last edit, it changed code and nothing checked it, a check ran and failed, or it changed no code at all.",
211
+ ),
212
+ paths: z.array(z.string()).optional().describe("The code files it changed, most recent last. The first few; the record holds the rest."),
213
+ check: z
214
+ .string()
215
+ .optional()
216
+ .describe(
217
+ "The command that spoke: the one that cleared it, or the one that failed. Named rather than summarised, so a targeted test is not read as the whole suite.",
218
+ ),
219
+ });
220
+ export type SubagentVerification = z.infer<typeof SubagentVerificationSchema>;
221
+ export const SubagentSessionSchema = z.object({
222
+ id: z
223
+ .string()
224
+ .describe(
225
+ "The id of the tool call that started it (an SDK child) or the child's own conversation id (a spawned one); either way both sides already hold it, so a card links to its helper with the id it has and the helper points back the same way.",
226
+ ),
227
+ kind: SubagentKindSchema.describe(
228
+ "What sort of helper: one the runtime's own Task tool spawned in-process, or a full agent the daemon started for the turn. It changes only how you watch it.",
229
+ ),
230
+ // The conversation whose turn spawned this, what the area groups its rows by, and the way back to the chat
231
+ // the card lives in.
232
+ conversationId: z.string().describe("The conversation whose turn started it, and the way back to the chat it belongs to."),
233
+ // What it is and what it was asked to do: the subagent type (`Explore`, `general-purpose`) or a spawned
234
+ // child's provider label, and the caller's one-line description. The area's row and the card's title read
235
+ // as `Explore · Locate claimIndexer definition`.
236
+ agentType: z.string().optional().describe("What kind of helper it is."),
237
+ description: z.string().optional().describe("What it was asked to do, in one line."),
238
+ model: z.string().optional().describe("Which model it runs on."),
239
+ // Which provider serves a `spawned` child (its AgentProvider id), so the row can wear the right logo. An
240
+ // SDK subagent implies its own: it runs on its parent's provider.
241
+ provider: z.string().optional().describe("Which provider serves it, for a helper spawned across providers."),
242
+ // How deep in the spawn tree (1 = spawned by the turn itself). From the SDK's meta.json; a subagent may
243
+ // itself delegate, and a flat list that cannot say so reads as though the turn started all of them.
244
+ spawnDepth: z
245
+ .number()
246
+ .optional()
247
+ .describe(
248
+ "How deep in the chain it sits, where one means the turn itself started it. A helper can start helpers, and a flat list that could not say so would read as though the turn started all of them.",
249
+ ),
250
+ // Backgrounded: the parent went on working instead of waiting for it. This is the whole reason the list
251
+ // exists, a backgrounded child used to be invisible until its result landed, sometimes minutes later.
252
+ background: z
253
+ .boolean()
254
+ .optional()
255
+ .describe(
256
+ "The parent carried on working instead of waiting for it. This is the whole reason the list exists: such a helper used to be invisible until its result landed, sometimes minutes later.",
257
+ ),
258
+ status: SubagentStatusSchema.describe(
259
+ "How it is going. Blocked means it needs an answer, which a parent and an operator act on differently from it simply working.",
260
+ ),
261
+ startedAt: z.number().describe("When it started, in milliseconds."),
262
+ endedAt: z.number().optional().describe("When it finished, in milliseconds. Absent while it works."),
263
+ activityAt: z.number().describe("When it last did anything, in milliseconds."),
264
+ // What it has spent and done so far (task_progress). Tokens are the child's own, so a parent's cost line and
265
+ // the sum of its children's are two different true numbers.
266
+ tokens: z
267
+ .number()
268
+ .optional()
269
+ .describe("What it has spent. Its own, so a parent's cost and the sum of its helpers' are two different true numbers."),
270
+ toolUses: z.number().optional().describe("How many tools it has used."),
271
+ lastTool: z.string().optional().describe("The last one it reached for."),
272
+ // Its report, the last assistant message (SubagentStop) or the task summary. The answer to "what did it
273
+ // conclude?" without opening the transcript, which is the question a finished child is read for.
274
+ summary: z
275
+ .string()
276
+ .optional()
277
+ .describe("Its report: what it concluded, without opening its record. The question a finished helper gets read for."),
278
+ error: z.string().optional().describe("Why it failed, when it did."),
279
+ // Whether anything checked the work behind that report (SubagentVerificationSchema). Filled once it ends:
280
+ // a standing read while it is still working would be a verdict on a job half done.
281
+ verification: SubagentVerificationSchema.optional().describe("Whether anything proved the work its report describes."),
282
+ });
283
+ export type SubagentSession = z.infer<typeof SubagentSessionSchema>;
284
+ export const SubagentsListSchema = z.object({
285
+ sessions: z.array(SubagentSessionSchema).describe("Every helper this sandbox's conversations have started."),
286
+ });
287
+ export type SubagentsList = z.infer<typeof SubagentsListSchema>;
288
+ export const SubagentIdParamSchema = z.object({ id: z.string() });