@intentic/sandbox-contract 1.232.0 → 1.233.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 (500) hide show
  1. package/README.md +7 -2
  2. package/dist/agent-catalog.d.ts +2 -1
  3. package/dist/agent-catalog.d.ts.map +1 -1
  4. package/dist/agent-catalog.js +1 -1
  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/probes.d.ts +1 -1
  9. package/dist/chores/probes.d.ts.map +1 -1
  10. package/dist/chores/stack.d.ts.map +1 -1
  11. package/dist/chores/stack.js +2 -1
  12. package/dist/chores/stack.js.map +1 -1
  13. package/dist/chores/verdict.d.ts +1 -1
  14. package/dist/chores/verdict.d.ts.map +1 -1
  15. package/dist/command-classes.d.ts +14 -0
  16. package/dist/command-classes.d.ts.map +1 -0
  17. package/dist/command-classes.js +168 -0
  18. package/dist/command-classes.js.map +1 -0
  19. package/dist/contracts/activity.contract.js +1 -1
  20. package/dist/contracts/activity.contract.js.map +1 -1
  21. package/dist/contracts/agent.contract.d.ts +40 -2
  22. package/dist/contracts/agent.contract.d.ts.map +1 -1
  23. package/dist/contracts/agent.contract.js +4 -1
  24. package/dist/contracts/agent.contract.js.map +1 -1
  25. package/dist/contracts/agents.contract.d.ts +24 -0
  26. package/dist/contracts/agents.contract.d.ts.map +1 -1
  27. package/dist/contracts/agents.contract.js +5 -1
  28. package/dist/contracts/agents.contract.js.map +1 -1
  29. package/dist/contracts/automations.contract.js +2 -1
  30. package/dist/contracts/automations.contract.js.map +1 -1
  31. package/dist/contracts/capabilities.contract.d.ts +63 -0
  32. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  33. package/dist/contracts/capabilities.contract.js +3 -1
  34. package/dist/contracts/capabilities.contract.js.map +1 -1
  35. package/dist/contracts/chores.contract.d.ts.map +1 -1
  36. package/dist/contracts/chores.contract.js +2 -1
  37. package/dist/contracts/chores.contract.js.map +1 -1
  38. package/dist/contracts/ci.contract.js +2 -1
  39. package/dist/contracts/ci.contract.js.map +1 -1
  40. package/dist/contracts/claude.contract.js +2 -1
  41. package/dist/contracts/claude.contract.js.map +1 -1
  42. package/dist/contracts/cursor.contract.js +2 -1
  43. package/dist/contracts/cursor.contract.js.map +1 -1
  44. package/dist/contracts/drafts.contract.d.ts.map +1 -1
  45. package/dist/contracts/drafts.contract.js +2 -1
  46. package/dist/contracts/drafts.contract.js.map +1 -1
  47. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  48. package/dist/contracts/endpoints.contract.js +2 -1
  49. package/dist/contracts/endpoints.contract.js.map +1 -1
  50. package/dist/contracts/exit.contract.d.ts.map +1 -1
  51. package/dist/contracts/exit.contract.js +2 -1
  52. package/dist/contracts/exit.contract.js.map +1 -1
  53. package/dist/contracts/extensions.contract.d.ts +42 -0
  54. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  55. package/dist/contracts/extensions.contract.js +4 -1
  56. package/dist/contracts/extensions.contract.js.map +1 -1
  57. package/dist/contracts/git.contract.d.ts.map +1 -1
  58. package/dist/contracts/git.contract.js +4 -1
  59. package/dist/contracts/git.contract.js.map +1 -1
  60. package/dist/contracts/grok.contract.d.ts.map +1 -1
  61. package/dist/contracts/grok.contract.js +2 -1
  62. package/dist/contracts/grok.contract.js.map +1 -1
  63. package/dist/contracts/history.contract.d.ts.map +1 -1
  64. package/dist/contracts/history.contract.js +2 -1
  65. package/dist/contracts/history.contract.js.map +1 -1
  66. package/dist/contracts/host.contract.d.ts +7 -0
  67. package/dist/contracts/host.contract.d.ts.map +1 -1
  68. package/dist/contracts/host.contract.js +4 -1
  69. package/dist/contracts/host.contract.js.map +1 -1
  70. package/dist/contracts/intentic.contract.d.ts.map +1 -1
  71. package/dist/contracts/intentic.contract.js +2 -1
  72. package/dist/contracts/intentic.contract.js.map +1 -1
  73. package/dist/contracts/inventory.contract.js +1 -1
  74. package/dist/contracts/inventory.contract.js.map +1 -1
  75. package/dist/contracts/logs.contract.d.ts.map +1 -1
  76. package/dist/contracts/logs.contract.js +1 -1
  77. package/dist/contracts/logs.contract.js.map +1 -1
  78. package/dist/contracts/loops.contract.js +2 -1
  79. package/dist/contracts/loops.contract.js.map +1 -1
  80. package/dist/contracts/panels.contract.d.ts.map +1 -1
  81. package/dist/contracts/panels.contract.js +2 -1
  82. package/dist/contracts/panels.contract.js.map +1 -1
  83. package/dist/contracts/personas.contract.js +2 -1
  84. package/dist/contracts/personas.contract.js.map +1 -1
  85. package/dist/contracts/ports.contract.d.ts.map +1 -1
  86. package/dist/contracts/ports.contract.js +2 -1
  87. package/dist/contracts/ports.contract.js.map +1 -1
  88. package/dist/contracts/prepush.contract.d.ts.map +1 -1
  89. package/dist/contracts/prepush.contract.js +2 -1
  90. package/dist/contracts/prepush.contract.js.map +1 -1
  91. package/dist/contracts/providers.contract.d.ts.map +1 -1
  92. package/dist/contracts/providers.contract.js +2 -1
  93. package/dist/contracts/providers.contract.js.map +1 -1
  94. package/dist/contracts/public.contract.d.ts.map +1 -1
  95. package/dist/contracts/public.contract.js +2 -1
  96. package/dist/contracts/public.contract.js.map +1 -1
  97. package/dist/contracts/push.contract.d.ts.map +1 -1
  98. package/dist/contracts/push.contract.js +2 -1
  99. package/dist/contracts/push.contract.js.map +1 -1
  100. package/dist/contracts/runner.contract.d.ts +45 -2
  101. package/dist/contracts/runner.contract.d.ts.map +1 -1
  102. package/dist/contracts/runner.contract.js +10 -2
  103. package/dist/contracts/runner.contract.js.map +1 -1
  104. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  105. package/dist/contracts/secrets.contract.js +2 -1
  106. package/dist/contracts/secrets.contract.js.map +1 -1
  107. package/dist/contracts/sessions.contract.js +1 -1
  108. package/dist/contracts/sessions.contract.js.map +1 -1
  109. package/dist/contracts/settings.contract.d.ts +20 -0
  110. package/dist/contracts/settings.contract.d.ts.map +1 -1
  111. package/dist/contracts/settings.contract.js +3 -1
  112. package/dist/contracts/settings.contract.js.map +1 -1
  113. package/dist/contracts/share.contract.d.ts.map +1 -1
  114. package/dist/contracts/share.contract.js +2 -1
  115. package/dist/contracts/share.contract.js.map +1 -1
  116. package/dist/contracts/skills.contract.d.ts.map +1 -1
  117. package/dist/contracts/skills.contract.js +2 -1
  118. package/dist/contracts/skills.contract.js.map +1 -1
  119. package/dist/contracts/system.contract.d.ts +31 -16
  120. package/dist/contracts/system.contract.d.ts.map +1 -1
  121. package/dist/contracts/system.contract.js +6 -1
  122. package/dist/contracts/system.contract.js.map +1 -1
  123. package/dist/contracts/translator.contract.d.ts.map +1 -1
  124. package/dist/contracts/translator.contract.js +4 -1
  125. package/dist/contracts/translator.contract.js.map +1 -1
  126. package/dist/contracts/usage.contract.js +1 -1
  127. package/dist/contracts/usage.contract.js.map +1 -1
  128. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  129. package/dist/contracts/vpn.contract.js +2 -1
  130. package/dist/contracts/vpn.contract.js.map +1 -1
  131. package/dist/contracts/webext.contract.d.ts +45 -0
  132. package/dist/contracts/webext.contract.d.ts.map +1 -0
  133. package/dist/contracts/webext.contract.js +12 -0
  134. package/dist/contracts/webext.contract.js.map +1 -0
  135. package/dist/contracts/workflows.contract.js +2 -1
  136. package/dist/contracts/workflows.contract.js.map +1 -1
  137. package/dist/contracts/workspace.contract.d.ts +2 -2
  138. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  139. package/dist/contracts/workspace.contract.js +7 -1
  140. package/dist/contracts/workspace.contract.js.map +1 -1
  141. package/dist/definition-action.d.ts +7 -0
  142. package/dist/definition-action.d.ts.map +1 -0
  143. package/dist/definition-action.js +3 -0
  144. package/dist/definition-action.js.map +1 -0
  145. package/dist/definition.d.ts +124 -21
  146. package/dist/definition.d.ts.map +1 -1
  147. package/dist/definition.js +29 -7
  148. package/dist/definition.js.map +1 -1
  149. package/dist/events.d.ts +101 -0
  150. package/dist/events.d.ts.map +1 -1
  151. package/dist/events.js +25 -1
  152. package/dist/events.js.map +1 -1
  153. package/dist/fast-tier.d.ts +1 -1
  154. package/dist/fast-tier.d.ts.map +1 -1
  155. package/dist/history-state.d.ts.map +1 -1
  156. package/dist/history-state.js +1 -0
  157. package/dist/history-state.js.map +1 -1
  158. package/dist/index.d.ts +355 -103
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +51 -1
  161. package/dist/index.js.map +1 -1
  162. package/dist/listener-protocol.js +1 -1
  163. package/dist/listener-protocol.js.map +1 -1
  164. package/dist/quick-model.d.ts +1 -1
  165. package/dist/quick-model.d.ts.map +1 -1
  166. package/dist/runner-protocol.d.ts +18 -0
  167. package/dist/runner-protocol.d.ts.map +1 -1
  168. package/dist/runner-protocol.js +8 -4
  169. package/dist/runner-protocol.js.map +1 -1
  170. package/dist/schemas/activity.d.ts +112 -0
  171. package/dist/schemas/activity.d.ts.map +1 -0
  172. package/dist/schemas/activity.js +70 -0
  173. package/dist/schemas/activity.js.map +1 -0
  174. package/dist/schemas/agent.d.ts +189 -0
  175. package/dist/schemas/agent.d.ts.map +1 -0
  176. package/dist/schemas/agent.js +170 -0
  177. package/dist/schemas/agent.js.map +1 -0
  178. package/dist/schemas/agents.d.ts +690 -0
  179. package/dist/schemas/agents.d.ts.map +1 -0
  180. package/dist/schemas/agents.js +314 -0
  181. package/dist/schemas/agents.js.map +1 -0
  182. package/dist/schemas/automations.d.ts +736 -0
  183. package/dist/schemas/automations.d.ts.map +1 -0
  184. package/dist/schemas/automations.js +218 -0
  185. package/dist/schemas/automations.js.map +1 -0
  186. package/dist/schemas/capabilities.d.ts +753 -0
  187. package/dist/schemas/capabilities.d.ts.map +1 -0
  188. package/dist/schemas/capabilities.js +269 -0
  189. package/dist/schemas/capabilities.js.map +1 -0
  190. package/dist/schemas/ci.d.ts +179 -0
  191. package/dist/schemas/ci.d.ts.map +1 -0
  192. package/dist/schemas/ci.js +99 -0
  193. package/dist/schemas/ci.js.map +1 -0
  194. package/dist/schemas/claude-gate.d.ts +13 -0
  195. package/dist/schemas/claude-gate.d.ts.map +1 -0
  196. package/dist/schemas/claude-gate.js +8 -0
  197. package/dist/schemas/claude-gate.js.map +1 -0
  198. package/dist/schemas/codebase-health.d.ts +56 -0
  199. package/dist/schemas/codebase-health.d.ts.map +1 -0
  200. package/dist/schemas/codebase-health.js +43 -0
  201. package/dist/schemas/codebase-health.js.map +1 -0
  202. package/dist/schemas/computers.d.ts +386 -0
  203. package/dist/schemas/computers.d.ts.map +1 -0
  204. package/dist/schemas/computers.js +107 -0
  205. package/dist/schemas/computers.js.map +1 -0
  206. package/dist/schemas/drafts.d.ts +84 -0
  207. package/dist/schemas/drafts.d.ts.map +1 -0
  208. package/dist/schemas/drafts.js +44 -0
  209. package/dist/schemas/drafts.js.map +1 -0
  210. package/dist/schemas/environment.d.ts +349 -0
  211. package/dist/schemas/environment.d.ts.map +1 -0
  212. package/dist/schemas/environment.js +111 -0
  213. package/dist/schemas/environment.js.map +1 -0
  214. package/dist/schemas/exit.d.ts +151 -0
  215. package/dist/schemas/exit.d.ts.map +1 -0
  216. package/dist/schemas/exit.js +115 -0
  217. package/dist/schemas/exit.js.map +1 -0
  218. package/dist/schemas/extension-updates.d.ts +1014 -0
  219. package/dist/schemas/extension-updates.d.ts.map +1 -0
  220. package/dist/schemas/extension-updates.js +197 -0
  221. package/dist/schemas/extension-updates.js.map +1 -0
  222. package/dist/schemas/fast-mode.d.ts +8 -0
  223. package/dist/schemas/fast-mode.d.ts.map +1 -0
  224. package/dist/schemas/fast-mode.js +3 -0
  225. package/dist/schemas/fast-mode.js.map +1 -0
  226. package/dist/schemas/git-history.d.ts +238 -0
  227. package/dist/schemas/git-history.d.ts.map +1 -0
  228. package/dist/schemas/git-history.js +152 -0
  229. package/dist/schemas/git-history.js.map +1 -0
  230. package/dist/schemas/git.d.ts +471 -0
  231. package/dist/schemas/git.d.ts.map +1 -0
  232. package/dist/schemas/git.js +204 -0
  233. package/dist/schemas/git.js.map +1 -0
  234. package/dist/schemas/history.d.ts +100 -0
  235. package/dist/schemas/history.d.ts.map +1 -0
  236. package/dist/schemas/history.js +54 -0
  237. package/dist/schemas/history.js.map +1 -0
  238. package/dist/schemas/hosts.d.ts +41 -0
  239. package/dist/schemas/hosts.d.ts.map +1 -0
  240. package/dist/schemas/hosts.js +18 -0
  241. package/dist/schemas/hosts.js.map +1 -0
  242. package/dist/schemas/intentic.d.ts +5 -0
  243. package/dist/schemas/intentic.d.ts.map +1 -0
  244. package/dist/schemas/intentic.js +3 -0
  245. package/dist/schemas/intentic.js.map +1 -0
  246. package/dist/schemas/internal.d.ts +8 -0
  247. package/dist/schemas/internal.d.ts.map +1 -0
  248. package/dist/schemas/internal.js +12 -0
  249. package/dist/schemas/internal.js.map +1 -0
  250. package/dist/schemas/inventory.d.ts +171 -0
  251. package/dist/schemas/inventory.d.ts.map +1 -0
  252. package/dist/schemas/inventory.js +51 -0
  253. package/dist/schemas/inventory.js.map +1 -0
  254. package/dist/schemas/logs.d.ts +67 -0
  255. package/dist/schemas/logs.d.ts.map +1 -0
  256. package/dist/schemas/logs.js +54 -0
  257. package/dist/schemas/logs.js.map +1 -0
  258. package/dist/schemas/loops.d.ts +415 -0
  259. package/dist/schemas/loops.d.ts.map +1 -0
  260. package/dist/schemas/loops.js +188 -0
  261. package/dist/schemas/loops.js.map +1 -0
  262. package/dist/schemas/maintenance.d.ts +557 -0
  263. package/dist/schemas/maintenance.d.ts.map +1 -0
  264. package/dist/schemas/maintenance.js +201 -0
  265. package/dist/schemas/maintenance.js.map +1 -0
  266. package/dist/schemas/marketplace.d.ts +64 -0
  267. package/dist/schemas/marketplace.d.ts.map +1 -0
  268. package/dist/schemas/marketplace.js +17 -0
  269. package/dist/schemas/marketplace.js.map +1 -0
  270. package/dist/schemas/panels.d.ts +61 -0
  271. package/dist/schemas/panels.d.ts.map +1 -0
  272. package/dist/schemas/panels.js +51 -0
  273. package/dist/schemas/panels.js.map +1 -0
  274. package/dist/schemas/personas.d.ts +122 -0
  275. package/dist/schemas/personas.d.ts.map +1 -0
  276. package/dist/schemas/personas.js +102 -0
  277. package/dist/schemas/personas.js.map +1 -0
  278. package/dist/schemas/plan-limits.d.ts +172 -0
  279. package/dist/schemas/plan-limits.d.ts.map +1 -0
  280. package/dist/schemas/plan-limits.js +126 -0
  281. package/dist/schemas/plan-limits.js.map +1 -0
  282. package/dist/schemas/ports.d.ts +71 -0
  283. package/dist/schemas/ports.d.ts.map +1 -0
  284. package/dist/schemas/ports.js +42 -0
  285. package/dist/schemas/ports.js.map +1 -0
  286. package/dist/schemas/provider-oauth.d.ts +128 -0
  287. package/dist/schemas/provider-oauth.d.ts.map +1 -0
  288. package/dist/schemas/provider-oauth.js +91 -0
  289. package/dist/schemas/provider-oauth.js.map +1 -0
  290. package/dist/schemas/provider-subscriptions.d.ts +9 -0
  291. package/dist/schemas/provider-subscriptions.d.ts.map +1 -0
  292. package/dist/schemas/provider-subscriptions.js +3 -0
  293. package/dist/schemas/provider-subscriptions.js.map +1 -0
  294. package/dist/schemas/public.d.ts +32 -0
  295. package/dist/schemas/public.d.ts.map +1 -0
  296. package/dist/schemas/public.js +29 -0
  297. package/dist/schemas/public.js.map +1 -0
  298. package/dist/schemas/push.d.ts +55 -0
  299. package/dist/schemas/push.d.ts.map +1 -0
  300. package/dist/schemas/push.js +60 -0
  301. package/dist/schemas/push.js.map +1 -0
  302. package/dist/schemas/secrets.d.ts +86 -0
  303. package/dist/schemas/secrets.d.ts.map +1 -0
  304. package/dist/schemas/secrets.js +51 -0
  305. package/dist/schemas/secrets.js.map +1 -0
  306. package/dist/schemas/sessions.d.ts +32 -0
  307. package/dist/schemas/sessions.d.ts.map +1 -0
  308. package/dist/schemas/sessions.js +11 -0
  309. package/dist/schemas/sessions.js.map +1 -0
  310. package/dist/schemas/settings.d.ts +548 -0
  311. package/dist/schemas/settings.d.ts.map +1 -0
  312. package/dist/schemas/settings.js +259 -0
  313. package/dist/schemas/settings.js.map +1 -0
  314. package/dist/schemas/share.d.ts +49 -0
  315. package/dist/schemas/share.d.ts.map +1 -0
  316. package/dist/schemas/share.js +26 -0
  317. package/dist/schemas/share.js.map +1 -0
  318. package/dist/schemas/shared.d.ts +22 -0
  319. package/dist/schemas/shared.d.ts.map +1 -0
  320. package/dist/schemas/shared.js +16 -0
  321. package/dist/schemas/shared.js.map +1 -0
  322. package/dist/schemas/system.d.ts +86 -0
  323. package/dist/schemas/system.d.ts.map +1 -0
  324. package/dist/schemas/system.js +64 -0
  325. package/dist/schemas/system.js.map +1 -0
  326. package/dist/schemas/terminal.d.ts +230 -0
  327. package/dist/schemas/terminal.d.ts.map +1 -0
  328. package/dist/schemas/terminal.js +133 -0
  329. package/dist/schemas/terminal.js.map +1 -0
  330. package/dist/schemas/usage.d.ts +113 -0
  331. package/dist/schemas/usage.d.ts.map +1 -0
  332. package/dist/schemas/usage.js +91 -0
  333. package/dist/schemas/usage.js.map +1 -0
  334. package/dist/schemas/vpn.d.ts +229 -0
  335. package/dist/schemas/vpn.d.ts.map +1 -0
  336. package/dist/schemas/vpn.js +115 -0
  337. package/dist/schemas/vpn.js.map +1 -0
  338. package/dist/schemas/webext.d.ts +98 -0
  339. package/dist/schemas/webext.d.ts.map +1 -0
  340. package/dist/schemas/webext.js +36 -0
  341. package/dist/schemas/webext.js.map +1 -0
  342. package/dist/schemas/workflows.d.ts +881 -0
  343. package/dist/schemas/workflows.d.ts.map +1 -0
  344. package/dist/schemas/workflows.js +164 -0
  345. package/dist/schemas/workflows.js.map +1 -0
  346. package/dist/schemas/workspace-repos.d.ts +143 -0
  347. package/dist/schemas/workspace-repos.d.ts.map +1 -0
  348. package/dist/schemas/workspace-repos.js +87 -0
  349. package/dist/schemas/workspace-repos.js.map +1 -0
  350. package/dist/schemas/workspace-search.d.ts +170 -0
  351. package/dist/schemas/workspace-search.d.ts.map +1 -0
  352. package/dist/schemas/workspace-search.js +85 -0
  353. package/dist/schemas/workspace-search.js.map +1 -0
  354. package/dist/schemas/workspace-setup.d.ts +48 -0
  355. package/dist/schemas/workspace-setup.d.ts.map +1 -0
  356. package/dist/schemas/workspace-setup.js +26 -0
  357. package/dist/schemas/workspace-setup.js.map +1 -0
  358. package/dist/schemas/workspace-tree.d.ts +120 -0
  359. package/dist/schemas/workspace-tree.d.ts.map +1 -0
  360. package/dist/schemas/workspace-tree.js +111 -0
  361. package/dist/schemas/workspace-tree.js.map +1 -0
  362. package/dist/webext-links.d.ts +13 -0
  363. package/dist/webext-links.d.ts.map +1 -0
  364. package/dist/webext-links.js +24 -0
  365. package/dist/webext-links.js.map +1 -0
  366. package/dist/webext-protocol.d.ts +8 -0
  367. package/dist/webext-protocol.d.ts.map +1 -0
  368. package/dist/webext-protocol.js +7 -0
  369. package/dist/webext-protocol.js.map +1 -0
  370. package/dist/workflow-faults.d.ts +1 -1
  371. package/dist/workflow-faults.d.ts.map +1 -1
  372. package/dist/workspace-state.d.ts +2 -2
  373. package/dist/workspace-state.d.ts.map +1 -1
  374. package/dist/workspace-state.js +2 -2
  375. package/dist/workspace-state.js.map +1 -1
  376. package/package.json +15 -4
  377. package/src/agent-catalog.test.ts +1 -1
  378. package/src/agent-catalog.ts +4 -11
  379. package/src/chores/chores.ts +1 -1
  380. package/src/chores/probes.ts +1 -1
  381. package/src/chores/stack.test.ts +19 -0
  382. package/src/chores/stack.ts +19 -3
  383. package/src/chores/verdict.test.ts +11 -1
  384. package/src/chores/verdict.ts +1 -1
  385. package/src/command-classes.test.ts +378 -0
  386. package/src/command-classes.ts +378 -0
  387. package/src/contracts/activity.contract.ts +1 -1
  388. package/src/contracts/agent.contract.ts +4 -13
  389. package/src/contracts/agents.contract.ts +6 -6
  390. package/src/contracts/automations.contract.ts +2 -2
  391. package/src/contracts/capabilities.contract.ts +3 -4
  392. package/src/contracts/chores.contract.ts +2 -1
  393. package/src/contracts/ci.contract.ts +2 -2
  394. package/src/contracts/claude.contract.ts +2 -2
  395. package/src/contracts/cursor.contract.ts +2 -2
  396. package/src/contracts/drafts.contract.ts +2 -1
  397. package/src/contracts/endpoints.contract.ts +2 -1
  398. package/src/contracts/exit.contract.ts +2 -1
  399. package/src/contracts/extensions.contract.ts +5 -5
  400. package/src/contracts/git.contract.ts +19 -18
  401. package/src/contracts/grok.contract.ts +2 -1
  402. package/src/contracts/history.contract.ts +2 -1
  403. package/src/contracts/host.contract.ts +4 -1
  404. package/src/contracts/intentic.contract.ts +2 -1
  405. package/src/contracts/inventory.contract.ts +1 -1
  406. package/src/contracts/logs.contract.ts +7 -1
  407. package/src/contracts/loops.contract.ts +2 -2
  408. package/src/contracts/panels.contract.ts +2 -1
  409. package/src/contracts/personas.contract.ts +3 -3
  410. package/src/contracts/ports.contract.ts +3 -2
  411. package/src/contracts/prepush.contract.ts +2 -1
  412. package/src/contracts/providers.contract.ts +2 -1
  413. package/src/contracts/public.contract.ts +3 -2
  414. package/src/contracts/push.contract.ts +2 -1
  415. package/src/contracts/runner.contract.ts +18 -2
  416. package/src/contracts/secrets.contract.ts +2 -1
  417. package/src/contracts/sessions.contract.ts +1 -1
  418. package/src/contracts/settings.contract.ts +3 -9
  419. package/src/contracts/share.contract.ts +3 -2
  420. package/src/contracts/skills.contract.ts +2 -1
  421. package/src/contracts/system.contract.ts +6 -9
  422. package/src/contracts/translator.contract.ts +4 -1
  423. package/src/contracts/usage.contract.ts +1 -1
  424. package/src/contracts/vpn.contract.ts +2 -8
  425. package/src/contracts/webext.contract.ts +37 -0
  426. package/src/contracts/workflows.contract.ts +2 -2
  427. package/src/contracts/workspace.contract.ts +10 -12
  428. package/src/conversation-ids.test.ts +1 -1
  429. package/src/definition-action.ts +8 -0
  430. package/src/definition.ts +74 -10
  431. package/src/events.ts +84 -22
  432. package/src/fast-tier.ts +1 -1
  433. package/src/history-state.ts +5 -0
  434. package/src/host-protocol.ts +1 -1
  435. package/src/hostnames.test.ts +2 -2
  436. package/src/index.ts +60 -1
  437. package/src/listener-protocol.ts +1 -1
  438. package/src/quick-model.ts +1 -1
  439. package/src/runner-protocol.ts +35 -5
  440. package/src/schemas/activity.ts +123 -0
  441. package/src/schemas/agent.ts +409 -0
  442. package/src/schemas/agents.ts +802 -0
  443. package/src/schemas/automations.ts +510 -0
  444. package/src/schemas/capabilities.ts +729 -0
  445. package/src/schemas/ci.ts +235 -0
  446. package/src/schemas/claude-gate.ts +13 -0
  447. package/src/schemas/codebase-health.ts +64 -0
  448. package/src/schemas/computers.ts +287 -0
  449. package/src/schemas/drafts.ts +108 -0
  450. package/src/schemas/environment.ts +276 -0
  451. package/src/schemas/exit.ts +222 -0
  452. package/src/schemas/extension-updates.ts +322 -0
  453. package/src/schemas/fast-mode.ts +8 -0
  454. package/src/schemas/git-history.ts +265 -0
  455. package/src/schemas/git.ts +430 -0
  456. package/src/schemas/history.ts +112 -0
  457. package/src/schemas/hosts.ts +37 -0
  458. package/src/schemas/intentic.ts +2 -0
  459. package/src/schemas/internal.ts +17 -0
  460. package/src/schemas/inventory.ts +68 -0
  461. package/src/schemas/logs.ts +96 -0
  462. package/src/schemas/loops.ts +401 -0
  463. package/src/schemas/maintenance.ts +421 -0
  464. package/src/schemas/marketplace.ts +23 -0
  465. package/src/schemas/panels.ts +99 -0
  466. package/src/schemas/personas.ts +281 -0
  467. package/src/schemas/plan-limits.ts +255 -0
  468. package/src/schemas/ports.ts +84 -0
  469. package/src/schemas/provider-oauth.ts +191 -0
  470. package/src/schemas/provider-subscriptions.ts +11 -0
  471. package/src/schemas/public.ts +52 -0
  472. package/src/schemas/push.ts +112 -0
  473. package/src/schemas/secrets.ts +68 -0
  474. package/src/schemas/sessions.ts +16 -0
  475. package/src/schemas/settings.ts +932 -0
  476. package/src/schemas/share.ts +71 -0
  477. package/src/schemas/shared.ts +32 -0
  478. package/src/schemas/system.ts +156 -0
  479. package/src/schemas/terminal.ts +286 -0
  480. package/src/schemas/usage.ts +303 -0
  481. package/src/{schemas.test.ts → schemas/version-seam.test.ts} +4 -2
  482. package/src/schemas/vpn.ts +215 -0
  483. package/src/schemas/webext.ts +79 -0
  484. package/src/schemas/workflows.ts +413 -0
  485. package/src/schemas/workspace-repos.ts +123 -0
  486. package/src/schemas/workspace-search.ts +141 -0
  487. package/src/schemas/workspace-setup.ts +43 -0
  488. package/src/schemas/workspace-tree.ts +234 -0
  489. package/src/title.test.ts +1 -1
  490. package/src/webext-links.ts +80 -0
  491. package/src/webext-protocol.ts +27 -0
  492. package/src/workflow-faults.test.ts +1 -1
  493. package/src/workflow-faults.ts +1 -1
  494. package/src/workspace-state.test.ts +3 -3
  495. package/src/workspace-state.ts +8 -13
  496. package/dist/schemas.d.ts +0 -9909
  497. package/dist/schemas.d.ts.map +0 -1
  498. package/dist/schemas.js +0 -4288
  499. package/dist/schemas.js.map +0 -1
  500. package/src/schemas.ts +0 -10090
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { FileDiffSchema, OkSchema, SnapshotDiffSchema, SnapshotFileDiffQuerySchema, SnapshotIdSchema, SnapshotsListSchema } from "../schemas.js";
2
+ import { FileDiffSchema, SnapshotDiffSchema, SnapshotFileDiffQuerySchema, SnapshotIdSchema, SnapshotsListSchema } from "../schemas/history.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // Workspace history: daemon-owned snapshots of /work with diff + restore. `diff` compares a checkpoint against
5
6
  // the previous visible checkpoint (everything that happened since it, hidden interval captures included); an
@@ -1,6 +1,9 @@
1
1
  import { eventIterator, oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { HostFactsSchema, HostScopesSchema, MachineFlowLineSchema, MachineSandboxFlowSchema, OkSchema } from "../schemas.js";
3
+ import { MachineFlowLineSchema, MachineSandboxFlowSchema } from "../schemas/computers.js";
4
+ import { HostScopesSchema } from "../schemas/capabilities.js";
5
+ import { HostFactsSchema } from "../schemas/hosts.js";
6
+ import { OkSchema } from "../schemas/shared.js";
4
7
 
5
8
  /* What a connected computer can be ASKED, over the socket it opened to this sandbox.
6
9
  *
@@ -1,6 +1,7 @@
1
1
  import { eventIterator, oc } from "@orpc/contract";
2
2
  import { IntenticLineSchema } from "../events.js";
3
- import { IntenticRunSchema, OkSchema } from "../schemas.js";
3
+ import { IntenticRunSchema } from "../schemas/intentic.js";
4
+ import { OkSchema } from "../schemas/shared.js";
4
5
 
5
6
  // Run the in-sandbox intentic CLI (resolve/plan/apply/deployments/…) and stream its ndjson lines as they
6
7
  // arrive, so the UI sees live progress. A non-zero exit surfaces as a thrown error once the stream ends.
@@ -1,5 +1,5 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { AddInventoryInputSchema, InventoryListSchema, InventoryNameParamSchema } from "../schemas.js";
2
+ import { AddInventoryInputSchema, InventoryListSchema, InventoryNameParamSchema } from "../schemas/inventory.js";
3
3
 
4
4
  // The i.have.* / i.want.service entries in deploy.config.ts's managed region. add/remove rewrite the region and
5
5
  // commit it (mirroring an agent edit) and return the full updated list so the UI re-renders from one response.
@@ -1,5 +1,11 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { ClientDiagnosticsAcceptedSchema, ClientDiagnosticsReportSchema, LogReadQuerySchema, LogReadSchema, LogsListSchema } from "../schemas.js";
2
+ import {
3
+ ClientDiagnosticsAcceptedSchema,
4
+ ClientDiagnosticsReportSchema,
5
+ LogReadQuerySchema,
6
+ LogReadSchema,
7
+ LogsListSchema,
8
+ } from "../schemas/logs.js";
3
9
 
4
10
  // Daemon-owned debug logs (historyRoot/logs): terminal pipe-pane captures, intentic CLI run logs, daemon.log.
5
11
  // Reads are read-only by design, the files are written by the daemon/tmux only, so the record stays
@@ -8,8 +8,8 @@ import {
8
8
  LoopRecordSchema,
9
9
  LoopSchema,
10
10
  LoopsListSchema,
11
- OkSchema,
12
- } from "../schemas.js";
11
+ } from "../schemas/loops.js";
12
+ import { OkSchema } from "../schemas/shared.js";
13
13
 
14
14
  /* The loop routes, "run this conversation again until the goal is met".
15
15
  *
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, PanelRepoParamSchema, PanelsListSchema } from "../schemas.js";
2
+ import { PanelRepoParamSchema, PanelsListSchema } from "../schemas/panels.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // Per-repository dev servers + the content facts the web app's extensions detect on. `list` enumerates every
5
6
  // repo with its runtime status + facts; `start`/`stop` drive the repo's dev server. Their tmux sessions list
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import {
3
- OkSchema,
4
3
  PersonaIdParamSchema,
5
4
  PersonaKitSchema,
6
5
  PersonaPromptSchema,
7
6
  PersonaSchema,
8
- PersonasListSchema,
9
7
  PersonaSkillBodySchema,
10
8
  PersonaSkillNameSchema,
11
9
  PersonaSkillSchema,
12
- } from "../schemas.js";
10
+ PersonasListSchema,
11
+ } from "../schemas/personas.js";
12
+ import { OkSchema } from "../schemas/shared.js";
13
13
 
14
14
  /* The sandbox's named personas (PersonaSchema): which connected accounts each one speaks for, what a session
15
15
  * wearing it may do, where it works, and what it is told. The card half is a plain three-verb CRUD with no apply
@@ -1,8 +1,9 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, PortForwardResultSchema, PortParamSchema, PortsListSchema } from "../schemas.js";
2
+ import { PortForwardResultSchema, PortParamSchema, PortsListSchema } from "../schemas/ports.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // Listening TCP ports in the sandbox + explicit forwarding through the preview proxy (see the ports section in
5
- // schemas.ts). `forward` is idempotent, re-forwarding a port returns its existing slot's URL; `unforward`
6
+ // schemas/ports.ts). `forward` is idempotent, re-forwarding a port returns its existing slot's URL; `unforward`
6
7
  // frees the slot immediately (the hostname keeps resolving, the proxy just stops mapping it).
7
8
  export const portsContract = {
8
9
  list: oc
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, PrepushRunSchema } from "../schemas.js";
2
+ import { PrepushRunSchema } from "../schemas/ci.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // The pre-push check, the command the workspace runs when the user pushes, before anything leaves the machine
5
6
  // (see PrepushRunSchema for where this sits and why). Three verbs about ONE run: the check answers about the
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { ModelsSchema, NativeProviderParamSchema } from "../schemas.js";
2
+ import { NativeProviderParamSchema } from "../schemas/agent.js";
3
+ import { ModelsSchema } from "../schemas/provider-oauth.js";
3
4
 
4
5
  // EVERY NATIVE PROVIDER'S PICKER CATALOG, ON ONE ROUTE.
5
6
  //
@@ -1,7 +1,8 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, PublicListSchema, PublishResultSchema, PublishSchema, UnpublishSchema } from "../schemas.js";
2
+ import { PublicListSchema, PublishResultSchema, PublishSchema, UnpublishSchema } from "../schemas/public.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
- // The workspace outbox, what `public/` currently holds and its address (see the public section in schemas.ts).
5
+ // The workspace outbox, what `public/` currently holds and its address (see schemas/public.ts).
5
6
  // `publish` copies a workspace file or directory in, creating the outbox if this is the first one; `unpublish`
6
7
  // withdraws one and removes the outbox behind the last, so the directory's presence always means exactly "there
7
8
  // is something published". There is no route to READ a published file: that is the whole point of the
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, PushChannelIdSchema, PushChannelSchema, PushConfigQuerySchema, PushConfigSchema, PushTestSchema } from "../schemas.js";
2
+ import { PushChannelIdSchema, PushChannelSchema, PushConfigQuerySchema, PushConfigSchema, PushTestSchema } from "../schemas/push.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // Push notifications for this sandbox. The daemon owns the VAPID keypair and the channel list (see
5
6
  // push/push-store.ts for why the key lives on the history volume), and sends on the three moments where the
@@ -2,7 +2,9 @@ import { eventIterator, oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  import { AgentEventSchema } from "../events.js";
4
4
  import { RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../runner-protocol.js";
5
- import { AgentReplySchema, EditorContextSchema, OkSchema } from "../schemas.js";
5
+ import { EditorContextSchema } from "../schemas/agent.js";
6
+ import { AgentReplySchema } from "../schemas/plan-limits.js";
7
+ import { OkSchema } from "../schemas/shared.js";
6
8
 
7
9
  /* What a RUNNER can be asked, over the socket it opened to its parent sandbox. Phase-1 skeleton: the shape is
8
10
  * decided (docs/remote-runners-plan.md §5, workspace root), the implementations land with runner mode.
@@ -40,8 +42,22 @@ export const runnerContract = {
40
42
  * editor context UNCOMPOSED: the note over those paths has to be built against the runner's own
41
43
  * workspace root, since that is the machine whose files the agent will open. */
42
44
  steer: oc
43
- .input(z.object({ conversationId: z.string().min(1), text: z.string(), attachments: z.array(z.string()).optional(), editorContext: EditorContextSchema.optional() }))
45
+ .input(
46
+ z.object({
47
+ conversationId: z.string().min(1),
48
+ text: z.string(),
49
+ attachments: z.array(z.string()).optional(),
50
+ editorContext: EditorContextSchema.optional(),
51
+ }),
52
+ )
44
53
  .output(z.object({ applied: z.boolean(), invalid: z.string().optional() })),
54
+ /* The parent pushing its declared shape onto this runner: a settings-only definition (sandbox.toml text,
55
+ * runner-protocol.ts's hello says why settings are all a runner declares). REPLACE semantics, not the
56
+ * owner-facing apply's merge-beside: a key the definition omits returns to its default, because the parent
57
+ * is a runner's whole authority and "make this runner match" must also unset what the parent unset. The
58
+ * answer names the keys now holding non-default values, which is what the parent adopts as the runner's
59
+ * new declared shape without waiting for a reconnect. */
60
+ applyDefinition: oc.input(z.object({ toml: z.string() })).output(z.object({ settings: z.array(z.string()) })),
45
61
  // Stop the running turn; the parent's stop button reaching through.
46
62
  interrupt: oc.input(RunnerTurnSchema.pick({ conversationId: true })).output(OkSchema),
47
63
  // Liveness, driven by the parent: keepalive and gone-detection in one, the host hub's heartbeat verbatim.
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, SecretInventorySchema, SecretKeyParamSchema, SecretKeysSchema, SecretRevealSchema, SecretSetSchema } from "../schemas.js";
2
+ import { SecretInventorySchema, SecretKeyParamSchema, SecretKeysSchema, SecretRevealSchema, SecretSetSchema } from "../schemas/secrets.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  // User-supplied env-var secrets, written to the sandbox's gitignored desired-state/.env (which
5
6
  // `apply` reloads each run, no restart). `set` upserts one KEY=value, `remove` deletes it; `list` returns the
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  import { SessionTranscriptSchema } from "../events.js";
4
- import { SessionIdParamSchema, SessionsListSchema } from "../schemas.js";
4
+ import { SessionIdParamSchema, SessionsListSchema } from "../schemas/sessions.js";
5
5
 
6
6
  // Past conversations in this workspace (the SDK-native session store, keyed on the working dir, which for a
7
7
  // repo covers its linked worktrees too, so an isolated conversation's transcript is reachable from the
@@ -1,13 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
- import {
3
- BuiltinPromptSchema,
4
- BuiltinPromptTextSchema,
5
- DayWindowQuerySchema,
6
- OkSchema,
7
- RuleFiringsSchema,
8
- SandboxSettingsSchema,
9
- SavingsReportSchema,
10
- } from "../schemas.js";
2
+ import { BuiltinPromptSchema, BuiltinPromptTextSchema, RuleFiringsSchema, SandboxSettingsSchema, SavingsReportSchema } from "../schemas/settings.js";
3
+ import { OkSchema } from "../schemas/shared.js";
4
+ import { DayWindowQuerySchema } from "../schemas/usage.js";
11
5
 
12
6
  // Per-sandbox agent settings (.intentic/config/settings.json). `get` returns the current flags with defaults applied
13
7
  // when the file is absent; `set` overwrites them. `savings` reports what each token-reduction mechanism was
@@ -1,7 +1,8 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, ShareCreateSchema, ShareListSchema, ShareRemoveSchema, ShareUpdateSchema, SharedConversationSchema } from "../schemas.js";
2
+ import { ShareCreateSchema, SharedConversationSchema, ShareListSchema, ShareRemoveSchema, ShareUpdateSchema } from "../schemas/share.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
- /* Conversations published as read-only pages (see the share section in schemas.ts).
5
+ /* Conversations published as read-only pages (see schemas/share.ts).
5
6
  *
6
7
  * Its own group rather than two more routes on `public`, because the two speak different path spaces and mean
7
8
  * different things by "publish". The outbox's routes take a path in the workspace and copy the bytes at it; a
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { OkSchema, SkillBodySchema, SkillDraftSchema, SkillIdSchema, SkillRemoveSchema, SkillsListSchema } from "../schemas.js";
2
+ import { SkillBodySchema, SkillDraftSchema, SkillIdSchema, SkillRemoveSchema, SkillsListSchema } from "../schemas/settings.js";
3
+ import { OkSchema } from "../schemas/shared.js";
3
4
 
4
5
  /* WHAT THE AGENT KNOWS RIGHT NOW, and which half of it the owner controls.
5
6
  *
@@ -1,24 +1,21 @@
1
1
  import { eventIterator, oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  import { SessionTranscriptSchema, SystemEventSchema } from "../events.js";
4
+ import { MachineFlowLineSchema, MachineSandboxFlowInputSchema } from "../schemas/computers.js";
5
+ import { PresenceReportSchema } from "../schemas/logs.js";
6
+ import { OkSchema } from "../schemas/shared.js";
7
+ import { DaemonSessionSchema, InfoSchema, ManifestProblemsSchema } from "../schemas/system.js";
4
8
  import {
5
9
  BrowserNameParamSchema,
6
10
  BrowsersListSchema,
7
- DaemonSessionSchema,
8
- InfoSchema,
9
- ManifestProblemsSchema,
10
- MachineFlowLineSchema,
11
- MachineSandboxFlowInputSchema,
12
- OkSchema,
13
- PresenceReportSchema,
14
11
  SubagentIdParamSchema,
15
12
  SubagentsListSchema,
16
13
  TerminalNameParamSchema,
17
14
  TerminalScrollbackQuerySchema,
18
15
  TerminalScrollbackSchema,
19
16
  TerminalsListSchema,
20
- UsageSummarySchema,
21
- } from "../schemas.js";
17
+ } from "../schemas/terminal.js";
18
+ import { UsageSummarySchema } from "../schemas/usage.js";
22
19
 
23
20
  // Sandbox status + identity, the long-lived liveness stream, and the connect-token-relayed host tunnel.
24
21
  // `events` interleaves heartbeat frames (browser holds it open to detect the sandbox dying instantly) with
@@ -1,6 +1,9 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { KeyedProviderSchema, OkSchema, TranslatorAccountsSchema, TranslatorCompleteSchema, TranslatorStartSchema } from "../schemas.js";
3
+ import { TranslatorAccountsSchema } from "../schemas/plan-limits.js";
4
+ import { TranslatorCompleteSchema, TranslatorStartSchema } from "../schemas/provider-oauth.js";
5
+ import { KeyedProviderSchema } from "../schemas/provider-subscriptions.js";
6
+ import { OkSchema } from "../schemas/shared.js";
4
7
 
5
8
  // Routed-provider subscriptions (Sandbox ▸ Agent). The bundled translator (CLIProxyAPI) runs a non-Claude model
6
9
  // UNDER the Claude Code harness on the user's SUBSCRIPTION, so each provider connects via an OAuth login rather
@@ -1,5 +1,5 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { DayWindowQuerySchema, UsageRollupSchema } from "../schemas.js";
2
+ import { DayWindowQuerySchema, UsageRollupSchema } from "../schemas/usage.js";
3
3
 
4
4
  // The durable spend ledger (see UsageTurnSchema). Read-only over the wire, rows are appended daemon-side at
5
5
  // turn end, so the ledger stays a trustworthy record of what was actually spent, the same principle as the
@@ -1,13 +1,7 @@
1
1
  import { eventIterator, oc } from "@orpc/contract";
2
2
  import { IntenticLineSchema } from "../events.js";
3
- import {
4
- ForticlientImportInputSchema,
5
- ForticlientImportSchema,
6
- OkSchema,
7
- VpnConnectInputSchema,
8
- VpnIdParamSchema,
9
- VpnListSchema,
10
- } from "../schemas.js";
3
+ import { OkSchema } from "../schemas/shared.js";
4
+ import { ForticlientImportInputSchema, ForticlientImportSchema, VpnConnectInputSchema, VpnIdParamSchema, VpnListSchema } from "../schemas/vpn.js";
11
5
 
12
6
  // The live VPN surface. A VPN is ADDED as a `vpn` capability (credentials, autoConnect, capabilities.contract);
13
7
  // it is DIALLED here. The split is deliberate: connecting is a runtime operation that both the operator (the
@@ -0,0 +1,37 @@
1
+ import { oc } from "@orpc/contract";
2
+ import { z } from "zod";
3
+ import { WebExtScopesSchema } from "../schemas/capabilities.js";
4
+ import { OkSchema } from "../schemas/shared.js";
5
+ import { WebExtFactsSchema } from "../schemas/webext.js";
6
+
7
+ /* What a connected BROWSER can be asked, over the socket its extension opened to this sandbox.
8
+ *
9
+ * The inversion is the host contract's (contracts/host.contract.ts): the extension dialled out, and the
10
+ * extension is the oRPC SERVER. A browser cannot be dialled — it is behind the same NAT as the laptop it runs
11
+ * on, and it is not even a process that is always there — so it can only be the side that connects, while
12
+ * everything is asked OF it.
13
+ *
14
+ * `mcp` IS THE SAME DELIBERATE HOLE IN THE TYPING, for the same reason: if this contract described each tool,
15
+ * a browser could not learn one without a matching daemon release, and the daemon would have to hold every
16
+ * tool's schema to translate. Keeping one opaque procedure buys the extension the Chrome Web Store's release
17
+ * cycle, which is measured in review days and is not this daemon's to wait on. The payload is still validated
18
+ * where it is understood: in the extension, against the tool's own schema.
19
+ *
20
+ * There is no `runSandboxFlow` twin here. A browser runs nothing that takes minutes and narrates itself; every
21
+ * one of its operations is a click or a read that either happened or did not. */
22
+ export const webextContract = {
23
+ // What this browser is, and what it is currently allowed to touch: pulled right after the socket
24
+ // authenticates and again whenever the card is read, because the grant list changes IN THE BROWSER (the
25
+ // person clicks Allow on a site) rather than here, so a cached copy would be a card that lies.
26
+ describe: oc.output(WebExtFactsSchema),
27
+ /* The switches the owner ticked on the capability card. The extension ENFORCES them; nothing on this side
28
+ * checks one. Note what is NOT in here: which sites the agent may touch. Those are Chrome's own optional
29
+ * host permissions, granted by the person in the browser and revocable there, so the strongest boundary in
30
+ * this feature is one the sandbox cannot even describe, let alone widen. */
31
+ setScopes: oc.input(WebExtScopesSchema).output(OkSchema),
32
+ // Liveness, driven by the daemon: doubles as the keepalive for the tunnel and as the probe whose failure
33
+ // means the browser is closed rather than quiet.
34
+ ping: oc.output(OkSchema),
35
+ // One MCP JSON-RPC message in, its answer out, forwarded verbatim in both directions. See above.
36
+ mcp: oc.input(z.unknown()).output(z.unknown()),
37
+ };
@@ -1,6 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
+ import { OkSchema } from "../schemas/shared.js";
2
3
  import {
3
- OkSchema,
4
4
  WorkflowIdParamSchema,
5
5
  WorkflowRunIdParamSchema,
6
6
  WorkflowRunSchema,
@@ -9,7 +9,7 @@ import {
9
9
  WorkflowSaveSchema,
10
10
  WorkflowSchema,
11
11
  WorkflowsListSchema,
12
- } from "../schemas.js";
12
+ } from "../schemas/workflows.js";
13
13
 
14
14
  /* The workflow routes, "run these sessions, in this order, each handing its result to the next".
15
15
  *
@@ -1,17 +1,23 @@
1
1
  import { oc } from "@orpc/contract";
2
+ import { WorkspaceHealthQuerySchema, WorkspaceHealthSchema } from "../schemas/codebase-health.js";
3
+ import { WorkspaceModulesSchema } from "../schemas/git.js";
4
+ import { OkSchema } from "../schemas/shared.js";
2
5
  import {
3
6
  AddAppsSchema,
4
7
  AppParamSchema,
5
8
  AppsListSchema,
6
9
  CloneRepoSchema,
7
10
  CloneResultSchema,
8
- WorkspaceSearchResultSchema,
9
- WorkspaceSearchQuerySchema,
10
- OkSchema,
11
11
  RepoAppsParamSchema,
12
12
  ReposListSchema,
13
13
  RunTestsSchema,
14
14
  TemplatesListSchema,
15
+ WorkspaceGraphSchema,
16
+ WorkspaceSyncSchema,
17
+ } from "../schemas/workspace-repos.js";
18
+ import { WorkspaceSearchQuerySchema, WorkspaceSearchResultSchema } from "../schemas/workspace-search.js";
19
+ import { WorkspaceInstallResultSchema, WorkspaceInstallSchema, WorkspaceSetupSchema } from "../schemas/workspace-setup.js";
20
+ import {
15
21
  WorkspaceChildrenQuerySchema,
16
22
  WorkspaceChildrenSchema,
17
23
  WorkspaceClassificationSchema,
@@ -19,22 +25,14 @@ import {
19
25
  WorkspaceFileQuerySchema,
20
26
  WorkspaceFileReadQuerySchema,
21
27
  WorkspaceFileSchema,
22
- WorkspaceGraphSchema,
23
- WorkspaceHealthQuerySchema,
24
- WorkspaceHealthSchema,
25
- WorkspaceInstallResultSchema,
26
- WorkspaceInstallSchema,
27
28
  WorkspaceMediaTicketQuerySchema,
28
29
  WorkspaceMediaTicketSchema,
29
- WorkspaceModulesSchema,
30
30
  WorkspaceMoveSchema,
31
31
  WorkspaceResolveQuerySchema,
32
32
  WorkspaceResolveSchema,
33
33
  WorkspaceScopeSchema,
34
- WorkspaceSetupSchema,
35
- WorkspaceSyncSchema,
36
34
  WorkspaceTreeSchema,
37
- } from "../schemas.js";
35
+ } from "../schemas/workspace-tree.js";
38
36
 
39
37
  // The full /work view + extra-repo cloning. The binary preview (/workspace/raw) is intentionally NOT here, it
40
38
  // stays a plain Hono route serving raw bytes with a Content-Type header (oRPC's request/response shape doesn't
@@ -1,6 +1,6 @@
1
1
  import { afterEach, expect, test, vi } from "vitest";
2
2
  import { newConversationId } from "./conversation-ids.js";
3
- import { ConversationIdSchema } from "./schemas.js";
3
+ import { ConversationIdSchema } from "./schemas/agent.js";
4
4
 
5
5
  const mockRandomValues = (values: readonly number[]) => {
6
6
  const remaining = [...values];
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+
3
+ /* One "do this by hand" line, the definition surface's honesty unit (definition.ts is the home story; this
4
+ * lives in its own leaf module because runner-protocol.ts also speaks it, and THAT file is imported by
5
+ * schemas/agent.ts, which definition.ts imports — the schema living in definition.ts made a cycle that left
6
+ * schemas half-initialized under module-eval). A subject the UI bolds, a detail written as an instruction. */
7
+ export const DefinitionActionSchema = z.object({ subject: z.string(), detail: z.string() });
8
+ export type DefinitionAction = z.infer<typeof DefinitionActionSchema>;
package/src/definition.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { z } from "zod";
2
- import { CapabilitySchema, SandboxSettingsSchema } from "./schemas.js";
2
+ import { DefinitionActionSchema } from "./definition-action.js";
3
+ import { CapabilitySchema } from "./schemas/capabilities.js";
4
+ import { SandboxSettingsSchema } from "./schemas/settings.js";
3
5
 
4
6
  /* THE SANDBOX DEFINITION: the declarable SHAPE of a sandbox, split off from its state.
5
7
  *
6
- * A bundle (portability section of schemas.ts) moves everything a sandbox holds; this is the half of it that
8
+ * A bundle (BundleSchema, schemas/maintenance.ts) moves everything a sandbox holds; this is the half of it that
7
9
  * is a REFERENCE to a source of truth rather than bytes only this sandbox has: which repos (as remotes a
8
10
  * target can clone), which connections (as shapes a target re-authenticates), which overlay steps (as source
9
11
  * a target's owner approves), which secrets (as NAMES a target asks for), which agent settings. Everything
@@ -19,7 +21,7 @@ import { CapabilitySchema, SandboxSettingsSchema } from "./schemas.js";
19
21
  // One repository, by reference: the id it lands under in the workspace, where a target clones it from, and
20
22
  // (optionally) the branch to check out. A repo with NO remote cannot appear here, the exporter reports it as
21
23
  // omitted instead of inventing a source for bytes only the source sandbox holds.
22
- export const DefinitionRepositorySchema = z.object({
24
+ export const DefinitionRepositorySchema = z.strictObject({
23
25
  // Workspace-relative repo id ("intentic", "clients/foo"), the same id the wire {repo} routes use.
24
26
  id: z.string().min(1),
25
27
  // The clone URL, verbatim from the source repo's own remote.
@@ -29,7 +31,26 @@ export const DefinitionRepositorySchema = z.object({
29
31
  });
30
32
  export type DefinitionRepository = z.infer<typeof DefinitionRepositorySchema>;
31
33
 
32
- export const DefinitionEnvironmentSchema = z.object({
34
+ /* THE WORKSPACE ITSELF, by reference. `/work` is a git repo of its own (the daemon's `root` scope, git dir on
35
+ * /history), tracking every workspace file that is not a nested repo, the reference shelf, or daemon-internal
36
+ * state — which by the versioned-state allowlist means the owner's AUTHORED content: notes, skills, personas,
37
+ * automations, workflow and loop designs, drafts, workspace extensions. None of that has a source anywhere else,
38
+ * so before this section a definition could only shrug at it and a bundle was the sole way to move it.
39
+ *
40
+ * With a remote it becomes referenceable like any other repo, which is the whole point: `[workspace]` plus
41
+ * `[[repositories]]` is a sandbox's code AND its way of working, and what remains bundle-only is exactly what
42
+ * cannot be pushed anywhere — secrets, identity, /history, the built image.
43
+ *
44
+ * A workspace with no remote cannot appear here; the exporter says so in `omitted` rather than inventing one. */
45
+ export const DefinitionWorkspaceSchema = z.strictObject({
46
+ // The clone URL, verbatim from the workspace repo's own remote.
47
+ remote: z.string().min(1),
48
+ // The branch to check out; absent means the remote's default.
49
+ ref: z.string().optional(),
50
+ });
51
+ export type DefinitionWorkspace = z.infer<typeof DefinitionWorkspaceSchema>;
52
+
53
+ export const DefinitionEnvironmentSchema = z.strictObject({
33
54
  // The image the overlay extends, informational: the target composes against ITS OWN base (see
34
55
  // composeEnvironment's baseImageOf), this records what the source was on.
35
56
  baseImage: z.string().optional(),
@@ -57,16 +78,19 @@ const bareField = (field: z.ZodType): z.ZodType => {
57
78
 
58
79
  const definitionSettings = (): z.ZodType<Partial<z.infer<typeof SandboxSettingsSchema>>> => {
59
80
  const shape = Object.fromEntries(Object.entries(SandboxSettingsSchema.shape).map(([key, field]) => [key, bareField(field).optional()]));
60
- return z.object(shape).prefault({}) as unknown as z.ZodType<Partial<z.infer<typeof SandboxSettingsSchema>>>;
81
+ return z.strictObject(shape).prefault({}) as unknown as z.ZodType<Partial<z.infer<typeof SandboxSettingsSchema>>>;
61
82
  };
62
83
 
63
- export const SandboxDefinitionSchema = z.object({
84
+ export const SandboxDefinitionSchema = z.strictObject({
64
85
  // Bumped when the layout changes in a way an older daemon would misread. Refused rather than guessed at,
65
86
  // the bundle manifest's own rule.
66
87
  schemaVersion: z.literal(1),
67
88
  // What the source sandbox was called, for the reader; never used to authorize anything.
68
89
  name: z.string().optional(),
69
90
  environment: DefinitionEnvironmentSchema.prefault({}),
91
+ // The workspace repo itself, when it has a remote to be named by. Absent is the ordinary state of a
92
+ // workspace nobody has published, not an error.
93
+ workspace: DefinitionWorkspaceSchema.optional(),
70
94
  repositories: z.array(DefinitionRepositorySchema).prefault([]),
71
95
  /* Each connection IN FULL (id, kind, config), not merely named: the manifest they come from carries the
72
96
  * SHAPE of a connection and never its credential (workspace-state.ts argues the split on the
@@ -82,9 +106,9 @@ export const SandboxDefinitionSchema = z.object({
82
106
  export type SandboxDefinition = z.infer<typeof SandboxDefinitionSchema>;
83
107
 
84
108
  // One "do this by hand" line, the same honesty unit ImportReportSchema carries: a subject the UI bolds and a
85
- // detail written as an instruction to the owner.
86
- export const DefinitionActionSchema = z.object({ subject: z.string(), detail: z.string() });
87
- export type DefinitionAction = z.infer<typeof DefinitionActionSchema>;
109
+ // detail written as an instruction to the owner. Defined in its own leaf module (definition-action.ts says
110
+ // why) and re-exported here, where every consumer of the definition surface finds it.
111
+ export { DefinitionActionSchema, type DefinitionAction } from "./definition-action.js";
88
112
 
89
113
  // What GET /definition answers: the emitted TOML, plus what the derivation could not express (a repo with no
90
114
  // remote), listed rather than silent, the export's own `excluded` discipline.
@@ -99,7 +123,7 @@ export type DefinitionExport = z.infer<typeof DefinitionExportSchema>;
99
123
  // same items the owner reviewed.
100
124
  export const DefinitionItemSchema = z.object({
101
125
  id: z.string(),
102
- kind: z.enum(["repo", "capability", "environment", "settings"]),
126
+ kind: z.enum(["workspace", "repo", "capability", "environment", "settings"]),
103
127
  label: z.string(),
104
128
  detail: z.string().optional(),
105
129
  /* False when the target already holds this piece (the repo's directory exists, a capability with that id
@@ -144,6 +168,46 @@ export const DefinitionDiffSchema = z.object({
144
168
  });
145
169
  export type DefinitionDiff = z.infer<typeof DefinitionDiffSchema>;
146
170
 
171
+ /* ---- publishing the workspace repo, the one step a definition cannot take for itself ----
172
+ *
173
+ * `[workspace]` names a remote; nothing can name one that does not exist. So the owner-facing half of the
174
+ * feature is this: create a PRIVATE repo on a connected git host and push /work to it, or adopt a URL the
175
+ * owner made themselves. Deliberately its own route rather than a side effect of the export, publishing a
176
+ * workspace is an outward act with its own confirmation, and deriving a document must stay read-only.
177
+ */
178
+ export const WorkspacePublishSchema = z.object({
179
+ /* An existing repo's clone URL. Given, nothing is created: the remote is wired up and pushed to, which is
180
+ * the path for an owner who made the repo themselves or is moving hosts. */
181
+ remote: z.string().min(1).optional(),
182
+ // The repo to create when `remote` is absent. Owner-side default is the sandbox's own name.
183
+ name: z.string().min(1).optional(),
184
+ /* The account or organization to create it under; absent means the authenticated user. Ignored when
185
+ * `remote` is given. */
186
+ owner: z.string().min(1).optional(),
187
+ });
188
+ export type WorkspacePublish = z.infer<typeof WorkspacePublishSchema>;
189
+
190
+ // Where the workspace now lives, and what a definition will name. `created` distinguishes "made you a repo"
191
+ // from "wired up the one you gave me", which is the difference the card reports back.
192
+ export const WorkspacePublishResultSchema = z.object({
193
+ remote: z.string(),
194
+ branch: z.string(),
195
+ created: z.boolean(),
196
+ });
197
+ export type WorkspacePublishResult = z.infer<typeof WorkspacePublishResultSchema>;
198
+
199
+ // What the card renders before anything is published: whether /work has a remote, and which connected git
200
+ // hosts could make one. Read-only, so the button can say "Publish to github.com" rather than opening a form
201
+ // into a void.
202
+ export const WorkspaceRemoteSchema = z.object({
203
+ remote: z.string().optional(),
204
+ branch: z.string().optional(),
205
+ // Hostnames of connected github/gitlab accounts, in the order they would be tried. Empty means the owner
206
+ // must connect one (or paste a URL).
207
+ hosts: z.array(z.string()),
208
+ });
209
+ export type WorkspaceRemote = z.infer<typeof WorkspaceRemoteSchema>;
210
+
147
211
  /* ---- the bundle manifest, restated on the definition ----
148
212
  *
149
213
  * A bundle is DEFINITION + STATE: its manifest embeds the same definition `GET /definition` emits, and the