@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
package/src/hostnames.ts CHANGED
@@ -14,7 +14,7 @@ export const sandboxHostname = (id: string, zone: string): string => `${sandboxS
14
14
  // The container sshd hostname the desktop-sync (Mutagen) reaches over the sandbox tunnel: `ssh-<id>.<zone>`.
15
15
  export const sshHostname = (id: string, zone: string): string => `ssh-${id}.${zone}`;
16
16
 
17
- /* The LOOPBACK name: `local-<id>.<zone>`, an A record pointing at 127.0.0.1.
17
+ /* The LOOPBACK name: `<id>.local.<zone>`, resolving to 127.0.0.1 under ONE wildcard record for the whole zone.
18
18
  *
19
19
  * A public DNS name for a private address looks odd until you ask what the alternative is. A browser on the
20
20
  * same machine as the sandbox can reach its daemon in microseconds instead of crossing to a Cloudflare edge
@@ -23,9 +23,25 @@ export const sshHostname = (id: string, zone: string): string => `ssh-${id}.${zo
23
23
  * one; this can. The daemon holds the key and gets the certificate by proving control of the zone over
24
24
  * DNS-01 (there is nothing on the public internet for a CA to connect to).
25
25
  *
26
+ * IT IS A LABEL DEEPER THAN THE OTHER NAMES, and that is the entire point rather than a naming preference. A
27
+ * DNS wildcard matches ONE label, so `*.<zone>` cannot cover `<id>.local.<zone>` and `*.local.<zone>` covers
28
+ * every sandbox that will ever exist: one record for the platform, not one per sandbox. The shape it replaced,
29
+ * `local-<id>.<zone>`, needed a record each, and a zone has a hard per-record quota (Cloudflare 81045). Every
30
+ * OTHER per-sandbox record went away with the move to the zrok hub, so this was the last thing consuming that
31
+ * quota, and when the zone filled the platform could no longer write the record OR the ACME challenge beside
32
+ * it: the certified shortcut stopped resolving, every browser fell back to the plain-http loopback, and that
33
+ * transport is HTTP/1.1 with six connections per origin (see the editor's streamBudget.ts for what that cost).
34
+ * A quota nothing can exhaust is the fix that keeps working.
35
+ *
26
36
  * It discloses nothing: the id is already the leading label of the sandbox's public hostname, and the address
27
37
  * it resolves to is every machine's own loopback. */
28
- export const localHostname = (id: string, zone: string): string => `local-${id}.${zone}`;
38
+ export const localHostname = (id: string, zone: string): string => `${id}.${LOCAL_LABEL}.${zone}`;
39
+
40
+ // The label the loopback names live under, so the wildcard has something to be a wildcard OF.
41
+ export const LOCAL_LABEL = "local";
42
+
43
+ // The single record that answers for all of them. Never per-sandbox, never reaped.
44
+ export const localWildcardHostname = (zone: string): string => `*.${LOCAL_LABEL}.${zone}`;
29
45
 
30
46
  // What that record points at, and the reason it is safe to publish: every resolver on earth gets 127.0.0.1.
31
47
  export const LOCAL_ADDRESS = "127.0.0.1";
package/src/index.ts CHANGED
@@ -19,6 +19,7 @@ import { grokContract } from "./contracts/grok.contract.js";
19
19
  import { historyContract } from "./contracts/history.contract.js";
20
20
  import { intenticContract } from "./contracts/intentic.contract.js";
21
21
  import { inventoryContract } from "./contracts/inventory.contract.js";
22
+ import { issuesContract } from "./contracts/issues.contract.js";
22
23
  import { logsContract } from "./contracts/logs.contract.js";
23
24
  import { loopsContract } from "./contracts/loops.contract.js";
24
25
  import { panelsContract } from "./contracts/panels.contract.js";
@@ -59,10 +60,14 @@ export { historyContract } from "./contracts/history.contract.js";
59
60
  /* Deliberately NOT part of `sandboxContract` below: that map is the daemon's own HTTP surface, and this one is
60
61
  * spoken the other way round, over a connected computer's WebSocket, with the MACHINE implementing it. */
61
62
  export { hostContract } from "./contracts/host.contract.js";
63
+ // The same inversion again, one layer in: spoken over the socket a BROWSER EXTENSION opened, with the
64
+ // extension implementing it (contracts/webext.contract.ts).
65
+ export { webextContract } from "./contracts/webext.contract.js";
62
66
  // Same inversion, other direction of trust: spoken over a RUNNER's WebSocket, with the runner implementing it.
63
67
  export { runnerContract } from "./contracts/runner.contract.js";
64
68
  export { intenticContract } from "./contracts/intentic.contract.js";
65
69
  export { inventoryContract } from "./contracts/inventory.contract.js";
70
+ export { issuesContract } from "./contracts/issues.contract.js";
66
71
  export { logsContract } from "./contracts/logs.contract.js";
67
72
  export { REQUEST_ID_EVIDENCE_ROUTE, REQUEST_ID_HEADER } from "./request-id.js";
68
73
  export { loopsContract } from "./contracts/loops.contract.js";
@@ -104,11 +109,15 @@ export * from "./history-state.js";
104
109
  export * from "./agent-catalog.js";
105
110
  export * from "./agent-run-model.js";
106
111
  export * from "./capability-env.js";
112
+ export * from "./command-classes.js";
113
+ export * from "./credential-material.js";
107
114
  export * from "./capability-secrets.js";
108
115
  export * from "./conversation-ids.js";
109
116
  export * from "./documents.js";
110
117
  export * from "./fast-tier.js";
111
118
  export * from "./host-protocol.js";
119
+ export * from "./webext-protocol.js";
120
+ export * from "./webext-links.js";
112
121
  export * from "./runner-protocol.js";
113
122
  export * from "./listener-protocol.js";
114
123
  export * from "./hostnames.js";
@@ -118,7 +127,61 @@ export * from "./prompt-complexity.js";
118
127
  export * from "./quick-model.js";
119
128
  export * from "./output-fields.js";
120
129
  export * from "./publish-drafts.js";
121
- export * from "./schemas.js";
130
+ /* The wire shapes, one module per subject area, mirroring `contracts/` above: every request and response the
131
+ * daemon speaks is declared in exactly one of them. Inputs that carry a `{param}` in their route path (repo /
132
+ * id / name) merge the path param into the same flat object, oRPC fills the path placeholder from the matching
133
+ * key and routes the rest to the body (POST/PUT) or query (GET).
134
+ *
135
+ * `schemas/internal.ts` is deliberately absent: it holds the id and ref primitives these modules are written
136
+ * in, which are vocabulary rather than shapes either side of the wire sends. */
137
+ export * from "./schemas/activity.js";
138
+ export * from "./schemas/agent.js";
139
+ export * from "./schemas/agents.js";
140
+ export * from "./schemas/automations.js";
141
+ export * from "./schemas/capabilities.js";
142
+ export * from "./schemas/ci.js";
143
+ export * from "./schemas/claude-gate.js";
144
+ export * from "./schemas/codebase-health.js";
145
+ export * from "./schemas/computers.js";
146
+ export * from "./schemas/drafts.js";
147
+ export * from "./schemas/environment.js";
148
+ export * from "./schemas/exit.js";
149
+ export * from "./schemas/extension-updates.js";
150
+ export * from "./schemas/fast-mode.js";
151
+ export * from "./schemas/git.js";
152
+ export * from "./schemas/git-history.js";
153
+ export * from "./schemas/history.js";
154
+ export * from "./schemas/hosts.js";
155
+ export * from "./schemas/intentic.js";
156
+ export * from "./schemas/inventory.js";
157
+ export * from "./schemas/issues.js";
158
+ export * from "./schemas/logs.js";
159
+ export * from "./schemas/loops.js";
160
+ export * from "./schemas/maintenance.js";
161
+ export * from "./schemas/marketplace.js";
162
+ export * from "./schemas/panels.js";
163
+ export * from "./schemas/personas.js";
164
+ export * from "./schemas/plan-limits.js";
165
+ export * from "./schemas/ports.js";
166
+ export * from "./schemas/provider-oauth.js";
167
+ export * from "./schemas/provider-subscriptions.js";
168
+ export * from "./schemas/public.js";
169
+ export * from "./schemas/push.js";
170
+ export * from "./schemas/secrets.js";
171
+ export * from "./schemas/sessions.js";
172
+ export * from "./schemas/settings.js";
173
+ export * from "./schemas/share.js";
174
+ export * from "./schemas/shared.js";
175
+ export * from "./schemas/system.js";
176
+ export * from "./schemas/terminal.js";
177
+ export * from "./schemas/usage.js";
178
+ export * from "./schemas/vpn.js";
179
+ export * from "./schemas/webext.js";
180
+ export * from "./schemas/workflows.js";
181
+ export * from "./schemas/workspace-repos.js";
182
+ export * from "./schemas/workspace-search.js";
183
+ export * from "./schemas/workspace-setup.js";
184
+ export * from "./schemas/workspace-tree.js";
122
185
  export * from "./definition.js";
123
186
  export * from "./search-globs.js";
124
187
  export * from "./starter.js";
@@ -154,6 +217,7 @@ export const sandboxContract = {
154
217
  history: historyContract,
155
218
  workspace: workspaceContract,
156
219
  inventory: inventoryContract,
220
+ issues: issuesContract,
157
221
  logs: logsContract,
158
222
  loops: loopsContract,
159
223
  panels: panelsContract,
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ActivityStatusSchema } from "./schemas.js";
2
+ import { ActivityStatusSchema } from "./schemas/activity.js";
3
3
 
4
4
  /* The wire between the daemon and an extension's realtime-listener GATEWAY process (ext-discord, ext-slack,
5
5
  * ext-telegram, ext-whatsapp, ext-imap): the four provider-scoped routes app.ts mounts under
@@ -1,6 +1,6 @@
1
1
  import { ACCESS_COST, accessFor, modelsFor, PROVIDERS } from "./agent-catalog.js";
2
2
  import { compareCheapestFirst, familyOf, tierRankOf } from "./model-order.js";
3
- import type { AgentProvider } from "./schemas.js";
3
+ import type { AgentProvider } from "./schemas/agent.js";
4
4
 
5
5
  /* THE QUICK MODEL, the cheap, fast model a small automatic job spends instead of the frontier model the chat
6
6
  * runs on. Today that is the commit message written when an agent's work lands; anything else of that shape (a
@@ -77,7 +77,9 @@ describe(`routeShapes`, () => {
77
77
  it(`changes the fingerprint when a field is added`, () => {
78
78
  const before = routeShapes(shaped(z.object({ a: z.string() })))[`vpn.list`];
79
79
  const after = routeShapes(shaped(z.object({ a: z.string(), b: z.number() })))[`vpn.list`];
80
- expect(before).toBeDefined();
80
+ // A fingerprint is a string, and saying so is what makes the line below mean something: with `before`
81
+ // undefined and `after` a real shape, "they differ" is true for the wrong reason.
82
+ expect(before).toEqual(expect.any(String));
81
83
  expect(after).not.toBe(before);
82
84
  });
83
85
 
@@ -99,7 +101,7 @@ describe(`routeShapes`, () => {
99
101
  const one = z.object({ a: z.string().default(`x`) });
100
102
  const asOutput = routeShapes(shaped(one))[`vpn.list`];
101
103
  const asInput = routeShapes({ vpn: { list: oc.route({ method: "GET", path: "/vpn" }).input(one) } })[`vpn.list`];
102
- expect(asOutput).toBeDefined();
104
+ expect(asOutput).toEqual(expect.any(String));
103
105
  expect(asInput).not.toBe(asOutput);
104
106
  });
105
107
 
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { DefinitionActionSchema } from "./definition-action.js";
2
3
 
3
4
  /* THE RUNNER LINK'S EDGES: the handshake on /system/runners/connect, the env a runner boots with, and the
4
5
  * placement value a turn request carries. The procedures spoken over the link once it exists live in
@@ -30,6 +31,13 @@ export const RunnerHelloSchema = z.object({
30
31
  image: z.string(),
31
32
  channel: z.string().optional(),
32
33
  overlayHash: z.string().optional(),
34
+ /* The runner's DECLARED SHAPE, as the definition format spells it (definition.ts): a sandbox.toml whose
35
+ * only populated section is settings, because that is all a runner declares — capabilities and secrets
36
+ * never travel to one, and its repos are a mirror of the parent's git rather than clones with remotes.
37
+ * The parent diffs this against its own settings to itemize drift (a stale toolchain is a rebuild; a
38
+ * drifted setting is one applyDefinition call over this same socket), so parity stops being a bare
39
+ * "outdated" and becomes lines naming what differs. Absent on an image too old to derive one. */
40
+ definitionToml: z.string().optional(),
33
41
  });
34
42
  export type RunnerHello = z.infer<typeof RunnerHelloSchema>;
35
43
 
@@ -44,7 +52,8 @@ export const runnerEnrollUrl = (parentUrl: string): string => `${parentUrl.repla
44
52
  * parent serves from its real git dirs (<historyRoot>/gits/<encoded id>), authenticated by the runner's own
45
53
  * token as a bearer. One builder because three parties spell it: the parent's route, the runner's sync, and
46
54
  * anyone debugging with a hand-typed clone. */
47
- export const runnerGitUrl = (parentUrl: string, repo: string): string => `${parentUrl.replace(/\/$/, "")}/system/runners/git/${encodeURIComponent(repo)}`;
55
+ export const runnerGitUrl = (parentUrl: string, repo: string): string =>
56
+ `${parentUrl.replace(/\/$/, "")}/system/runners/git/${encodeURIComponent(repo)}`;
48
57
 
49
58
  /* Where a runner's push LANDS in the parent's git dirs. Never refs/heads/agent/<id> directly: that branch is
50
59
  * checked out in the parent's mirror worktree, and git itself refuses updating a checked-out ref, which is a
@@ -52,6 +61,12 @@ export const runnerGitUrl = (parentUrl: string, repo: string): string => `${pare
52
61
  * the mirror worktree to this ref, which advances the checked-out branch through the door git sanctions. */
53
62
  export const runnerIncomingRef = (conversationId: string): string => `refs/runner-incoming/${conversationId}`;
54
63
 
64
+ /* THE CONTAINER A RUNNER'S NAME MEANS on the machine holding it, which is how the update and rebuild flows
65
+ * address it. The prefix is `ic`'s own (runner.rs SLUG_PREFIX) and the two must stay identical: a mismatch
66
+ * does not fail loudly, it sends an update at a container that does not exist and reports "no such sandbox"
67
+ * about a runner sitting right there in the list. */
68
+ export const runnerSlug = (name: string): string => `runner-${name}`;
69
+
55
70
  /* THE CREDENTIAL DOORS: a runner's turns spend the ORIGIN sandbox's model providers, never accounts of their
56
71
  * own. The shape is a service, not a sync: the parent resolves each turn's credential with the same code its
57
72
  * local turns use and answers with the least that travels — an access token minted for the turn, or a route.
@@ -128,10 +143,20 @@ export const RunnerFactsSchema = z.object({
128
143
  });
129
144
  export type RunnerFacts = z.infer<typeof RunnerFactsSchema>;
130
145
 
146
+ /* WHETHER IT IS RUNNING WHAT THIS SANDBOX IS RUNNING (§7 of the design): `current` matches on image, channel
147
+ * and approved overlay; `outdated` differs on one of them and gets the update button; `unknown` is a runner
148
+ * that has never connected, or a parent that cannot name its own image (a dev daemon), where a warning would
149
+ * be one nobody can act on. Reported, never enforced: an outdated runner still runs turns. */
150
+ export const RunnerParitySchema = z.enum(["current", "outdated", "unknown"]);
151
+ export type RunnerParity = z.infer<typeof RunnerParitySchema>;
152
+
131
153
  // One runner as the owner's views list it: enrolled state plus whatever the hub knows right now, the
132
154
  // HostSummary shape retold for a runner (no platform/scopes, parity instead).
133
155
  export const RunnerSummarySchema = z.object({
134
156
  id: z.string(),
157
+ // The connected computer holding it, when this sandbox is what asked for it (the Computers view's create
158
+ // flow). Absent for one started by hand on a machine, which this sandbox can dispatch to but not manage.
159
+ host: z.string().optional(),
135
160
  online: z.boolean(),
136
161
  version: z.string().optional(),
137
162
  image: z.string().optional(),
@@ -139,6 +164,14 @@ export const RunnerSummarySchema = z.object({
139
164
  overlayHash: z.string().optional(),
140
165
  facts: RunnerFactsSchema.optional(),
141
166
  lastSeen: z.number().optional(),
167
+ // Computed by the daemon (runners/runner-parity.ts) rather than by each surface, so the badge on a row and
168
+ // the note in the placement picker cannot disagree about the same runner.
169
+ parity: RunnerParitySchema,
170
+ /* Where the runner's environment stands against this sandbox's, one line per difference (the definition
171
+ * surface's drift unit, computed parent-side from the hello's definitionToml plus the overlay hashes).
172
+ * Absent when the runner never said, empty when they agree. Lines whose subject is a Setting are fixable
173
+ * over the live link (the sync door); an overlay line takes a rebuild. */
174
+ drift: z.array(DefinitionActionSchema).optional(),
142
175
  });
143
176
  export type RunnerSummary = z.infer<typeof RunnerSummarySchema>;
144
177
 
@@ -202,8 +235,5 @@ export type RunnerTurn = z.infer<typeof RunnerTurnSchema>;
202
235
  * client sends them. `runner` implies isolation, a remote conversation is always branch-anchored, because its
203
236
  * branch is the unit that moves between machines. Absent means local, which is why this is optional
204
237
  * everywhere: the default costs nothing to anyone who never uses it. */
205
- export const AgentPlacementSchema = z.union([
206
- z.object({ kind: z.literal("local") }),
207
- z.object({ kind: z.literal("runner"), id: z.string().min(1) }),
208
- ]);
238
+ export const AgentPlacementSchema = z.union([z.object({ kind: z.literal("local") }), z.object({ kind: z.literal("runner"), id: z.string().min(1) })]);
209
239
  export type AgentPlacement = z.infer<typeof AgentPlacementSchema>;
@@ -69,6 +69,22 @@ const RUNTIME_DOMAINS = [
69
69
  // is why the daemon rate-limits this domain rather than pushing every mutation (see runtime-watch.ts).
70
70
  { domain: "subagents", invalidates: [["subagents"]] },
71
71
 
72
+ /* THE MACHINES ON THE OTHER END OF A SOCKET, three domains that are one story: the user's computers, the
73
+ * browsers holding the extension, and this sandbox's runners.
74
+ *
75
+ * Announced, and about as announced as a fact can be. "Online" here is not sampled, inferred or timed out
76
+ * of, it IS a socket in this process: the hub accepts one, replaces one, drops one on a failed heartbeat, or
77
+ * cuts one on a revoke, and those four moments are the entire set of ways the answer changes. Nothing on
78
+ * disk moves, no pane appears, and no other feed could carry it.
79
+ *
80
+ * They land on `capabilities` because a host or webext card's state is LITERALLY the hub's answer
81
+ * (handlers/host.ts: `hub.online(id) ? active : pending`), which is what a person watches while they paste a
82
+ * pairing command into a laptop. That wait is the whole reason these are here: it was three seconds of
83
+ * polling per card, running only because nobody had told the browser that the daemon already knew. */
84
+ { domain: "hosts", invalidates: [["capabilities"], ["computers"]] },
85
+ { domain: "webext", invalidates: [["capabilities"]] },
86
+ { domain: "runners", invalidates: [["runners"]] },
87
+
72
88
  /* The post queue, when the DAEMON moves it rather than the owner. Approving is the owner's own mutation and
73
89
  * refetches itself, but everything after that happens while nobody is touching the page: a held post coming
74
90
  * due, a Discord send landing, a publish turn writing back what went out. Those are the moments the row on
@@ -0,0 +1,123 @@
1
+ // activity: the activity audit log (historyRoot/activity.jsonl)
2
+ import { z } from "zod";
3
+ import { AgentOriginSchema } from "./agent.js";
4
+ // One provider-agnostic event per agent↔provider interaction, appended by the daemon only (never the agent,
5
+ // the log lives under historyRoot, outside /work, so the agent can't read or rewrite its own trail). Discord
6
+ // is the first source; other cli providers reuse the same shape.
7
+
8
+ export const ActivityEventSchema = z.object({
9
+ id: z.string().describe("The entry's own id."),
10
+ // Epoch ms; also the paging cursor.
11
+ at: z.number().describe("When it happened, in milliseconds. Also what you page by."),
12
+ // "discord", …; absent on provider-less system events (a cron automation.run).
13
+ provider: z.string().optional().describe("Which outside service, when one was involved. Absent for the sandbox's own events."),
14
+ // Which provider account handled the turn, the attribution key for per-account usage totals. Absent on
15
+ // provider-less events and turns that ran on the provider's default account.
16
+ account: z
17
+ .string()
18
+ .optional()
19
+ .describe("Which account handled it. Absent for the sandbox's own events and for work run on a provider's default."),
20
+ direction: z.enum(["in", "out", "system"]).describe("Whether something arrived, something went out, or the sandbox did it to itself."),
21
+ // in: message.received | voice_utterance.received | voice_transcript.received
22
+ // out: message.send | reaction.add | messages.read | api.call (unclassified provider endpoint)
23
+ // system: gateway.login_failed | dispatch.failed | voice.session_started | voice.session_ended | automation.run
24
+ // | turn.started | turn.plan | turn.error | turn.completed (agent turn lifecycle; provider = claude/codex)
25
+ // | rule.blocked_push | rule.held_work | rule.continued_turn (a rule DID something, see RuleSchema.
26
+ // Only the three outcomes a person would otherwise have no explanation for: a push that did not
27
+ // go, work that did not arrive, a turn that did not end. A rule that ran and passed says nothing,
28
+ // because a feed that logs every green check is one the eye learns to skip.)
29
+ type: z
30
+ .string()
31
+ .describe(
32
+ "Exactly what happened: a message received or sent, a reaction, a turn starting or ending, a rule doing something. A rule that ran and passed says nothing here, because a feed of green ticks is one the eye learns to skip.",
33
+ ),
34
+ channelId: z.string().optional().describe("Which channel or thread it happened in."),
35
+ // Inbound author display name.
36
+ author: z.string().optional().describe("Who sent it, for something that arrived."),
37
+ // Full message text (inbound) or sent payload content (outbound).
38
+ content: z.string().optional().describe("The message, in full, whichever direction it went."),
39
+ // Outbound HTTP method + endpoint path (tokens ride headers, never URLs).
40
+ method: z.string().optional().describe("The verb of an outgoing call."),
41
+ endpoint: z.string().optional().describe("The address of an outgoing call. Credentials travel in headers, so they are never here."),
42
+ // The agent turn that made/handled it, the join key between an inbound wake and its outbound calls.
43
+ sessionId: z.string().optional().describe("The provider session behind it."),
44
+ /* ONE TURN'S EVENTS, TIED TOGETHER. A turn writes four lifecycle events plus one per outbound provider call,
45
+ * and read as five rows they say one thing five times, so the feed groups on this instead. It cannot be
46
+ * sessionId: the runtime does not mint one until the stream's first frame, which is AFTER turn.started, so
47
+ * the very event carrying the prompt is the one that could never be joined. Minted by the turn itself. */
48
+ turnId: z
49
+ .string()
50
+ .optional()
51
+ .describe(
52
+ "Ties one turn's entries together. A turn writes several, and read as separate rows they say one thing several times, so a feed groups on this.",
53
+ ),
54
+ // The stable conversation the turn belongs to. Outlives sessionId, which a provider/account/harness switch
55
+ // retires mid-conversation, so this, not sessionId, is what "the same agent" means across a feed.
56
+ conversationId: z
57
+ .string()
58
+ .optional()
59
+ .describe(
60
+ "Which conversation. This, rather than the provider session, is what the same agent means across a feed, because a session is retired whenever the model changes.",
61
+ ),
62
+ // The conversation's display title as it stood when the event was written. Denormalised on purpose: the
63
+ // registry entry it came from is prunable and renameable, and an audit row must still read as words years
64
+ // later. Absent on the first event of a fresh conversation, the auto-namer has not run yet.
65
+ title: z
66
+ .string()
67
+ .optional()
68
+ .describe(
69
+ "What that conversation was called at the time. Copied in rather than looked up, because an audit entry must still read as words years later, after the conversation has been renamed or pruned.",
70
+ ),
71
+ // What woke the conversation from outside, when something did (see AgentOriginSchema), the feed's "who
72
+ // called me" attribution, and how a turn is filed under Discord rather than under the runtime that served it.
73
+ origin: AgentOriginSchema.optional().describe(
74
+ "What woke the conversation from outside, when something did. It is how a turn gets filed under the chat service that caused it rather than under the model that served it.",
75
+ ),
76
+ automationIds: z.array(z.string()).optional().describe("Which automations were involved."),
77
+ outcome: z.enum(["ok", "error"]).optional().describe("How it ended."),
78
+ error: z.string().optional().describe("What went wrong, when something did."),
79
+ // Source-specific detail: guildId, attachments, transcript path, participants…
80
+ extra: z
81
+ .record(z.string(), z.unknown())
82
+ .optional()
83
+ .describe("Whatever else the source had to say: attachments, participants, a recording's path. Shape varies by source."),
84
+ });
85
+ export type ActivityEvent = z.infer<typeof ActivityEventSchema>;
86
+ export const ActivityQuerySchema = z.object({
87
+ provider: z.string().optional().describe("Narrow it to one outside service."),
88
+ limit: z.coerce.number().min(1).max(500).default(100).describe("How many entries to return."),
89
+ // `at` cursor, exclusive, newest-first paging.
90
+ before: z.coerce.number().optional().describe("Only entries older than this timestamp, so paging walks backwards through the feed."),
91
+ });
92
+ export type ActivityQuery = z.infer<typeof ActivityQuerySchema>;
93
+ export const ActivityListSchema = z.object({ events: z.array(ActivityEventSchema).describe("The audit entries, newest first.") });
94
+ // Live connection health, probed per provider capability (not stored): gateway state from the client pool
95
+ // (idle = the gateway is up but has no enabled listener automation to connect for, distinct from a
96
+ // connection that should be up but isn't; pairing = the socket is up but the credential is a ceremony nobody
97
+ // has finished, which no amount of waiting fixes), lastError from the newest system-error event in the log.
98
+ export const ActivityConnectionSchema = z.object({
99
+ capabilityId: z.string().describe("Which connection."),
100
+ provider: z.string().describe("Which service it is."),
101
+ gateway: z
102
+ .enum(["ready", "connecting", "pairing", "disconnected", "idle"])
103
+ .describe(
104
+ "Idle means it is up but has nothing to listen for, which is different from a connection that should be up and is not. Pairing means somebody started a sign-in and never finished it, which no amount of waiting will fix.",
105
+ ),
106
+ lastError: z.string().optional().describe("The most recent thing that went wrong on it."),
107
+ });
108
+ export const ActivityStatusSchema = z.object({
109
+ connections: z
110
+ .array(ActivityConnectionSchema)
111
+ .describe("Each source feeding the record, and whether it is working. Probed now rather than remembered."),
112
+ // The daemon's live voice session, when one is up.
113
+ voice: z
114
+ .object({
115
+ channelId: z.string().describe("Which channel."),
116
+ channelName: z.string().describe("What it is called."),
117
+ startedAt: z.number().describe("When it joined, in milliseconds."),
118
+ participants: z.array(z.string()).describe("Who else is in it."),
119
+ })
120
+ .optional()
121
+ .describe("A voice call the sandbox is currently in, when it is in one."),
122
+ });
123
+ export type ActivityStatus = z.infer<typeof ActivityStatusSchema>;