@intentic/sandbox-contract 1.231.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 +13 -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 +51 -2
  22. package/dist/contracts/agent.contract.d.ts.map +1 -1
  23. package/dist/contracts/agent.contract.js +13 -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 +11 -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 +151 -43
  101. package/dist/contracts/runner.contract.d.ts.map +1 -1
  102. package/dist/contracts/runner.contract.js +14 -1
  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 +35 -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 +1064 -0
  146. package/dist/definition.d.ts.map +1 -0
  147. package/dist/definition.js +93 -0
  148. package/dist/definition.js.map +1 -0
  149. package/dist/events.d.ts +109 -0
  150. package/dist/events.d.ts.map +1 -1
  151. package/dist/events.js +30 -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 +371 -103
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +52 -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 +11 -2
  373. package/dist/workspace-state.d.ts.map +1 -1
  374. package/dist/workspace-state.js +4 -2
  375. package/dist/workspace-state.js.map +1 -1
  376. package/package.json +17 -6
  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 +22 -12
  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 +33 -1
  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 +235 -0
  431. package/src/events.ts +128 -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 +61 -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 +7 -3
  495. package/src/workspace-state.ts +27 -13
  496. package/dist/schemas.d.ts +0 -9800
  497. package/dist/schemas.d.ts.map +0 -1
  498. package/dist/schemas.js +0 -4252
  499. package/dist/schemas.js.map +0 -1
  500. package/src/schemas.ts +0 -9999
@@ -0,0 +1,430 @@
1
+ import { z } from "zod";
2
+ import { AgentProviderSchema } from "./agent.js";
3
+ import { LandConflictSchema, LandedMessageSchema } from "./agents.js";
4
+ import { RefNameSchema } from "./internal.js";
5
+ import { RepoParamSchema } from "./shared.js";
6
+ // What a commit records, three shapes, each a real git spelling. The last two are for the case where nothing
7
+ // is staged yet and the caller has said what to stage; they are alternatives, and a caller sends at most one:
8
+ // absent ⇒ commit whatever is staged (plain `git commit`)
9
+ // all: true ⇒ stage every change in the repo, then commit (`commit -a`; VSCode's "stage all and commit")
10
+ // paths ⇒ `git add` those repo-relative paths, then commit the index
11
+ //
12
+ // `paths` is emphatically NOT `commit --only`. The index IS git's mechanism for choosing what a commit
13
+ // contains, so a second path-selection channel alongside it could only disagree with it: a partial commit over
14
+ // a half-staged file records the WORKTREE content while the row the user picked showed the INDEX content. This
15
+ // stages and then records the whole index, which is why it is safe, and why it also survives a merge, where
16
+ // git refuses a partial commit outright (and refuses it only AFTER moving the index).
17
+ export const CommitSchema = RepoParamSchema.extend({
18
+ message: z.string().min(1).describe("The commit message."),
19
+ all: z
20
+ .boolean()
21
+ .optional()
22
+ .describe("Stage every change in the repository first, then commit. An alternative to naming paths, not a companion to it."),
23
+ paths: z
24
+ .array(z.string().min(1))
25
+ .max(500)
26
+ .optional()
27
+ .describe("Stage exactly these paths, then commit everything staged. Leave this and `all` out to commit whatever is already staged."),
28
+ });
29
+ export const DiscardSchema = RepoParamSchema.extend({
30
+ // Repo-relative paths to discard; absent ⇒ discard every uncommitted change in the repo.
31
+ paths: z
32
+ .array(z.string().min(1))
33
+ .max(500)
34
+ .optional()
35
+ .describe("Which paths to throw away. Leave it out to discard every uncommitted change in the repository."),
36
+ });
37
+ // Index moves. Both are per-path and never touch the worktree, so they are always safe and need no checkpoint.
38
+ export const GitStageSchema = RepoParamSchema.extend({
39
+ paths: z.array(z.string().min(1)).max(500).describe("The paths to move. Nothing on disk changes, so this is always safe and always reversible."),
40
+ });
41
+ // `branch` defaults to the checked-out one. There is deliberately no "set upstream" flag: the daemon publishes
42
+ // (`push -u`) exactly when the branch has no upstream yet, which is never destructive and is the only way the
43
+ // result is coherent, see pushBranch.
44
+ export const PushSchema = RepoParamSchema.extend({
45
+ branch: z
46
+ .string()
47
+ .min(1)
48
+ .optional()
49
+ .describe("Which branch to push. Leave it out for the checked-out one. A branch with no upstream yet gets one set on this push."),
50
+ });
51
+ export const GitFileQuerySchema = RepoParamSchema.extend({ path: z.string().min(1).describe("The file to read, relative to the repository root.") });
52
+ export const GitFileWriteSchema = RepoParamSchema.extend({
53
+ path: z.string().min(1).describe("Where to write, relative to the repository root. Missing folders are created."),
54
+ content: z.string().describe("The file's whole new contents."),
55
+ });
56
+ // Which of the working tree's diffs to open, the same split the Changes panel lists under. A path that is
57
+ // staged AND edited again has genuinely different diffs, so the side is required rather than defaulted: a
58
+ // caller that doesn't say which one it means doesn't know what it is showing.
59
+ // staged ⇒ index vs HEAD (what a bare `git commit` would record)
60
+ // unstaged ⇒ worktree vs index (untracked ⇒ no before side)
61
+ // conflicted ⇒ HEAD vs worktree (what you had vs what the merge left, markers included, an unmerged path
62
+ // has no stage 0, so the index is not a side it can be diffed against)
63
+ export const GitDiffSideSchema = z.enum(["staged", "unstaged", "conflicted"]);
64
+ export type GitDiffSide = z.infer<typeof GitDiffSideSchema>;
65
+ export const GitFileDiffQuerySchema = RepoParamSchema.extend({
66
+ path: z.string().min(1).describe("The file, relative to the repository root."),
67
+ side: GitDiffSideSchema.describe(
68
+ "Which comparison you want. A file that is staged and then edited again has genuinely different answers for each, which is why this is required rather than assumed.",
69
+ ),
70
+ });
71
+ export const GitStatusSchema = z.object({
72
+ branch: z.string().describe("The checked-out branch."),
73
+ dirty: z.boolean().describe("Whether anything is uncommitted."),
74
+ files: z.array(z.string()).describe("Every path with something pending, staged or not."),
75
+ });
76
+ export const GitFilesSchema = z.object({
77
+ files: z.array(z.string()).describe("Every path git tracks, relative to the repository root. Ignored and untracked files are not here."),
78
+ });
79
+ export const GitFileSchema = z.object({
80
+ path: z.string().describe("The path, as asked for."),
81
+ content: z.string().describe("The file's contents as they stand on disk."),
82
+ });
83
+ // CommitResultSchema is declared further down, after the RepoChanges/OriginAgent shapes a commit answers with.
84
+
85
+ // One repo's slice of a workspace-wide git action: the whole repo, or only the repo-relative paths named. The
86
+ // same pair the per-repo routes take as {repo} + `paths`, in the one shape a caller that spans repos can send.
87
+ export const RepoPathsSchema = z.object({
88
+ repo: z.string().min(1).describe("Which repository."),
89
+ paths: z.array(z.string().min(1)).max(500).optional().describe("Which of its paths. Leave it out for the whole repository."),
90
+ });
91
+ export type RepoPaths = z.infer<typeof RepoPathsSchema>;
92
+ // One change to a file, an uncommitted working-tree change (status vs HEAD, untracked included), an agent
93
+ // worktree's delta vs its base, or a file in a commit. `additions`/`deletions` are the numstat line counts,
94
+ // undefined for a binary file (git reports "-"/"-") or an untracked file (no HEAD blob to diff against).
95
+ export const GitChangeSchema = z.object({
96
+ // Repo-relative path with forward slashes; for "renamed" the NEW path (`from` carries the old one).
97
+ path: z.string().describe("The path, relative to the repository root. For a rename this is the new one."),
98
+ // "conflicted" is git's unmerged state (`U`), and it is not a kind of modification: the index holds "ours"
99
+ // and "theirs" at stages 2/3 with NO stage 0, so there is nothing a commit could record for this path and
100
+ // git refuses to commit while one exists. It belongs to neither side, see RepoChanges.conflicted.
101
+ status: z
102
+ .enum(["added", "modified", "deleted", "renamed", "type-changed", "conflicted"])
103
+ .describe("What happened to it. Conflicted is not a kind of edit: nothing can be committed anywhere in the repository while one exists."),
104
+ from: z.string().optional().describe("Where a renamed file came from."),
105
+ additions: z
106
+ .number()
107
+ .optional()
108
+ .describe("Lines added. Absent for a binary file, and for an untracked one, which has nothing to compare against."),
109
+ deletions: z.number().optional().describe("Lines removed. Absent for the same reasons additions is."),
110
+ });
111
+ export type GitChange = z.infer<typeof GitChangeSchema>;
112
+ // Where a repo's checked-out branch stands against its remote. Every field is optional-or-zero because every
113
+ // one of them is legitimately absent in a healthy repo: no remote configured yet, a branch created locally and
114
+ // never pushed, a detached HEAD. `ahead` = commits only we have; `behind` = commits only the upstream has,
115
+ // which is meaningful only as of the last fetch, the panel's Fetch button is what refreshes it.
116
+ export const GitRemoteStateSchema = z.object({
117
+ // The remote this branch pushes to: its OWN remote when it tracks one, else the first `git remote` lists
118
+ // (where a never-pushed branch would publish). Those differ in a fork, `origin` and `upstream` both
119
+ // configured, and pushing to the wrong one succeeds while leaving `ahead` stuck. Absent ⇒ no remote.
120
+ remote: z
121
+ .string()
122
+ .optional()
123
+ .describe(
124
+ "The remote this branch pushes to. Absent means none is configured. In a fork with two remotes, pushing to the wrong one succeeds and leaves the count stuck, which is why this says which.",
125
+ ),
126
+ // The checked-out branch; absent on a detached HEAD or an unborn repo.
127
+ branch: z.string().optional().describe("The checked-out branch. Absent when the repository is on a bare commit, or has no commits yet."),
128
+ // The tracking ref ("origin/main"); absent ⇒ this branch has no upstream, so the next push publishes it.
129
+ upstream: z.string().optional().describe("The branch on the remote this one follows. Absent means the next push will publish it."),
130
+ ahead: z.number().describe("Commits you have that the remote does not."),
131
+ behind: z.number().describe("Commits the remote has that you do not, as of the last fetch. Fetch before trusting it."),
132
+ });
133
+ export type GitRemoteState = z.infer<typeof GitRemoteStateSchema>;
134
+ // One local branch, for the switcher. `at` is its tip's committer time in ms (the list sorts newest-first).
135
+ export const GitBranchSchema = z.object({
136
+ name: z.string().describe("The branch name."),
137
+ current: z.boolean().describe("Whether this is the one checked out."),
138
+ upstream: z.string().optional().describe("The branch on the remote it follows, if any."),
139
+ ahead: z.number().describe("Commits this branch has that its remote counterpart does not."),
140
+ behind: z.number().describe("Commits its remote counterpart has that it does not."),
141
+ // The configured upstream no longer exists on the remote (a merged PR's deleted branch), distinct from
142
+ // "no upstream", and the signal that this local branch is safe to delete.
143
+ gone: z
144
+ .boolean()
145
+ .optional()
146
+ .describe(
147
+ "The branch it followed no longer exists on the remote, usually because a merged pull request deleted it. The signal that this one is safe to delete.",
148
+ ),
149
+ at: z.number().describe("When its tip was committed, in milliseconds. Lists are newest first."),
150
+ });
151
+ export type GitBranch = z.infer<typeof GitBranchSchema>;
152
+ /* One REMOTE-TRACKING branch, somebody else's tip, as this repo last saw it.
153
+ *
154
+ * A separate shape from GitBranch rather than the same one with optional fields, because the two genuinely
155
+ * differ: a remote-tracking branch has no upstream of its own and no ahead/behind, and giving it those fields
156
+ * as zeroes would make it look like a synced local branch. `name` is the full `origin/main`; `remote` and
157
+ * `branch` are it split, so a selector can group by remote without re-parsing. */
158
+ export const GitRemoteBranchSchema = z.object({
159
+ name: z.string().describe("The full name, such as origin/main."),
160
+ remote: z.string().describe("Just the remote part, so a picker can group by it without re-parsing."),
161
+ branch: z.string().describe("Just the branch part."),
162
+ at: z.number().describe("When its tip was committed, in milliseconds, as this repository last saw it."),
163
+ });
164
+ export type GitRemoteBranch = z.infer<typeof GitRemoteBranchSchema>;
165
+ // Locals and remote-tracking branches in one response: the switcher pairs them, and two round trips to draw one
166
+ // list would only ever show a half-populated one first.
167
+ export const GitBranchesSchema = z.object({
168
+ branches: z.array(GitBranchSchema).describe("Branches in this repository."),
169
+ remotes: z
170
+ .array(GitRemoteBranchSchema)
171
+ .describe("Branches on its remotes, as last seen. Sent together with the locals so a switcher never draws a half-filled list."),
172
+ });
173
+ // Create at `start` (a sha or ref; absent ⇒ HEAD); `checkout` switches to it immediately (`git switch -c`).
174
+ export const GitBranchCreateAtSchema = RepoParamSchema.extend({
175
+ name: RefNameSchema.describe("The new branch's name."),
176
+ start: z.string().min(1).optional().describe("Where to start it: a commit or another branch. Leave it out to start from where you are."),
177
+ checkout: z.boolean().optional().describe("Switch to it as well as creating it."),
178
+ });
179
+ // `force` is the deliberate retry after git refuses to drop an unmerged branch.
180
+ export const GitBranchDeleteSchema = RepoParamSchema.extend({
181
+ name: RefNameSchema.describe("The branch to delete."),
182
+ force: z
183
+ .boolean()
184
+ .optional()
185
+ .describe("Delete it even though it holds work that was never merged. The deliberate retry after the first attempt refuses."),
186
+ });
187
+ /* THE OPERATION A REPO IS HALTED IN THE MIDDLE OF, a merge, rebase, cherry-pick or revert that stopped on a
188
+ * conflict and was never finished or aborted.
189
+ *
190
+ * Every verb the daemon runs itself aborts cleanly on failure, so this is never something the UI started. It is
191
+ * what an agent or a user left behind in a terminal, and it is a state git refuses to do almost anything else
192
+ * from, so a surface listing the conflicted files without naming it leaves the reader with no way out.
193
+ * Absent means the worktree is not mid-anything. */
194
+ export const GitOperationSchema = z.enum(["merge", "rebase", "cherry-pick", "revert"]);
195
+ export type GitOperation = z.infer<typeof GitOperationSchema>;
196
+ export const GitOperationStateSchema = z.object({
197
+ repo: z.string().describe("The repository asked about."),
198
+ operation: GitOperationSchema.optional().describe(
199
+ "Which operation the working tree is stuck inside. Absent means it is not stuck at all, which is almost always. While one is present git refuses nearly everything else, and abandoning it is the only way out.",
200
+ ),
201
+ });
202
+ export type GitOperationState = z.infer<typeof GitOperationStateSchema>;
203
+ export const RepoChangesSchema = z.object({
204
+ // The {repo} param the per-repo git routes accept: "root" or a repo id (its root-relative dir).
205
+ repo: z.string(),
206
+ // Absent on an unborn HEAD (a repo initialized but never committed).
207
+ branch: z.string().optional().describe("The checked-out branch. Absent in a repository that has no commits yet."),
208
+ // Unmerged paths, a merge, rebase, cherry-pick or pull that git could not finish. First, because until
209
+ // they are resolved nothing else in this repo can be committed at all: git refuses outright. Held apart
210
+ // from the two sides rather than listed in them, because "staged or not" is not a question an unmerged path
211
+ // has an answer to. Staging one (`git add`) is exactly how you tell git it is resolved.
212
+ conflicted: z
213
+ .array(GitChangeSchema)
214
+ .describe(
215
+ "Paths a merge or rebase could not finish. First, because nothing anywhere in this repository can be committed until they are resolved. Held apart from the two lists below, because staged or not is not a question one of these has an answer to.",
216
+ ),
217
+ /* The merge/rebase/cherry-pick/revert this repo is halted in the middle of, when it is. Carried on the SCAN
218
+ * rather than fetched per repo because it belongs beside `conflicted`: the panel already lists the files,
219
+ * and this is the sentence that says why they are conflicted and what ends it. Absent = not mid-anything,
220
+ * which is every repo almost all of the time. */
221
+ operation: GitOperationSchema.optional().describe(
222
+ "What halted, when something did. This is the sentence that explains the conflicts above and names the way out of them.",
223
+ ),
224
+ // The two sides git actually models, kept apart because a path can appear on BOTH with different statuses
225
+ // (a staged edit that was then edited again, the classic `MM`). `staged` is index-vs-HEAD: exactly what a
226
+ // bare `git commit` would record. `unstaged` is worktree-vs-index plus untracked files. Each side's
227
+ // additions/deletions describe the diff it is listed under, never a conflation of the two.
228
+ staged: z.array(GitChangeSchema).describe("What a plain commit would record right now."),
229
+ unstaged: z
230
+ .array(GitChangeSchema)
231
+ .describe(
232
+ "Edits on disk that are not staged, plus untracked files. A path can be in both lists at once with different line counts, which is why they are separate.",
233
+ ),
234
+ // How many changes were CUT from the two sides above (conflicts are never cut). A cloned monorepo or a
235
+ // mass delete carries six-figure change lists, a payload no panel can render and no browser should hold,
236
+ // so past the daemon's per-repo budget the lists arrive truncated and this carries the dropped count, which
237
+ // the panel adds to its badges and states under the group. Absent ⇒ the lists are complete.
238
+ truncated: z
239
+ .number()
240
+ .optional()
241
+ .describe(
242
+ "How many changes were cut from the two lists above. A freshly cloned monorepo or a mass delete runs to six figures, which no screen can draw, so past a budget the lists arrive short and this says by how much. Absent means they are complete.",
243
+ ),
244
+ // Where this repo stands against its remote; `ahead`/`behind` are 0 with no remote or no upstream.
245
+ remote: GitRemoteStateSchema.optional().describe("Where this repository stands against its remote."),
246
+ // WHICH AGENT PUT IT THERE: repo-relative path → the agent ids that landed it, newest land first. Keyed by
247
+ // PATH rather than carried on each GitChange because a path can be listed on two sides at once (staged and
248
+ // edited again) and its origin is the same fact for both. Only branch-backed agents whose work passed
249
+ // through land can appear here; workspace conversations, terminal edits and the user's typing are absent
250
+ // (see agents/origins.ts), so the panel badges an attributable agent and says nothing for anyone else.
251
+ // Ids, not titles: the identity for every id named here rides the response once, in `originAgents`.
252
+ origins: z
253
+ .record(z.string(), z.array(z.string()))
254
+ .optional()
255
+ .describe(
256
+ "Which conversation put each path here, newest first, keyed by path. Only work that went through a merge can appear: edits made in the shared tree, in a terminal, or by a person are simply absent rather than guessed at.",
257
+ ),
258
+ // Why the repo could not be scanned at all, condensed to git's own one-line reason ("fatal: bad object HEAD").
259
+ // A repo left torn by a canceled or failed upload used to be dropped from the response entirely, so it just
260
+ // vanished from the panel with nothing to act on; it now arrives with empty change lists and this set instead.
261
+ error: z
262
+ .string()
263
+ .optional()
264
+ .describe(
265
+ "Why the repository could not be read at all, in git's own words. A repository left broken by a failed import arrives with empty lists and this set, rather than vanishing from the answer with nothing to act on.",
266
+ ),
267
+ });
268
+ export type RepoChanges = z.infer<typeof RepoChangesSchema>;
269
+ // WHO AN ORIGIN ID IS, the display identity of one agent named in `origins`, carried BY THE RESPONSE rather
270
+ // than looked up in the client's fleet roster. The roster is the LIVE board and deliberately drops archived
271
+ // agents (AgentsRegistry.list), while a landing outlives the agent that made it: archiving a finished agent
272
+ // does not commit its lines, so the very common case, land, archive the card, review at leisure, is exactly
273
+ // the one a roster lookup cannot answer, and the panel fell back to "Agent 1a2b3c" with a generic icon for it.
274
+ // The daemon reads attribution and identity from the same registry in the same pass, so it is the one place
275
+ // they cannot disagree. Per response, not per repo: one agent commonly lands into several.
276
+ export const OriginAgentSchema = z.object({
277
+ // Absent for an entry that never got a title (a turn that failed before one was derived).
278
+ title: z.string().optional().describe("The conversation's title. Absent for one that never got as far as having a title."),
279
+ provider: AgentProviderSchema.describe("Which model provider it ran on."),
280
+ /* WHAT THE LANDED WORK DID, the same drafted message the agent's own card carries (LandedMessage), on the
281
+ * road that outlives the card. The panel reads the roster's copy first and this one when the roster has no
282
+ * entry left to read, which is the case this whole schema exists for: an archived agent's lines are still
283
+ * in the tree, and the sentence about them has to be too.
284
+ *
285
+ * Absent for a landing nothing was written about, and, for the seconds after a land, for one whose
286
+ * sentence is still being drafted. Those two are told apart by `landedMessageDraft` on the agent's card, and
287
+ * neither has a title-shaped fallback: guessing a subject from the ask is exactly the habit this replaced,
288
+ * so a chip with no message files nothing and simply filters. */
289
+ landedMessage: LandedMessageSchema.optional().describe(
290
+ "What the merged work did, drafted by the conversation itself. Carried here as well as on its card, because merged lines outlive the card: archiving a finished conversation does not uncommit its work.",
291
+ ),
292
+ });
293
+ export type OriginAgent = z.infer<typeof OriginAgentSchema>;
294
+ // The aggregated review set across every repo (root + every discovered repo); a repo appears when it has changes,
295
+ // when it is out of sync with its remote, or when it failed to scan.
296
+ export const GitChangesSchema = z.object({
297
+ repos: z
298
+ .array(RepoChangesSchema)
299
+ .describe(
300
+ "One entry per repository that has something pending, is out of step with its remote, or could not be read. A clean repository is simply absent.",
301
+ ),
302
+ // Keyed by agent id; covers every id any repo's `origins` names, and only those. Absent when nothing in
303
+ // the review is attributable. An id can still be missing from it, the retention sweep can retire an
304
+ // entry whose landed lines are somehow still uncommitted, and the panel keeps its id-shaped fallback for
305
+ // exactly that, rather than dropping the chip and re-attributing the file to the user.
306
+ originAgents: z
307
+ .record(z.string(), OriginAgentSchema)
308
+ .optional()
309
+ .describe(
310
+ "Who each conversation named above is, keyed by id, so a caller need not look them up. Absent when nothing in the review can be attributed.",
311
+ ),
312
+ /* WHICH REPOS HAVE A COMMIT RUNNING RIGHT NOW, the daemon's answer, not the browser's.
313
+ *
314
+ * A commit is one request that outlives the tab that fired it. Reload the page mid-commit and that tab's
315
+ * "a git action is running" flag went with it: the button re-armed itself over rows the commit was already
316
+ * recording, the panel invited a second click at the exact moment it could do the least good, and the rows
317
+ * then changed under the user a second later with nothing having said why. A second device watching the
318
+ * same workspace never knew at all.
319
+ *
320
+ * So the fact lives where the commit does. Read at RESPONSE time rather than folded into the scan, because
321
+ * the scan is memoized for half a second and this must describe the instant it is sent. Absent ⇒ nothing is
322
+ * committing, which is the overwhelmingly common case and the reason it is optional rather than an empty
323
+ * array on every response. */
324
+ committing: z
325
+ .array(z.string())
326
+ .optional()
327
+ .describe(
328
+ "Repositories with a commit running right now. The sandbox's answer rather than any one tab's, so a reload, a second window and another device all know. Absent means nothing is committing.",
329
+ ),
330
+ });
331
+ export type GitChanges = z.infer<typeof GitChangesSchema>;
332
+ /* WHAT THE COMMIT LEFT BEHIND, the committed repo's review row, re-read inside the same repo lock that made
333
+ * the commit, so the panel replaces that repo's rows from THIS answer instead of asking for a fresh
334
+ * workspace-wide scan afterwards.
335
+ *
336
+ * That scan is the daemon's most expensive read (a repo walk plus a `git status` per repo, ~11 git spawns each,
337
+ * for every repo including the ones the commit never touched) and the user sat watching the rows they had just
338
+ * committed until it returned. The commit itself is milliseconds of git; the wait was this.
339
+ *
340
+ * `changes` ABSENT means the repo has nothing the panel would show any more, the same inclusion rule the scan
341
+ * applies, decided in the same place, so a repo the scan would have dropped drops here too. `originAgents`
342
+ * covers the ids this repo's `origins` names and only those, on GitChangesSchema's terms; the panel merges it
343
+ * over what it already holds rather than replacing, since the other repos' rows still name their own agents. */
344
+ export const CommitResultSchema = z.object({
345
+ committed: z.boolean().describe("Whether a commit was actually recorded."),
346
+ changes: RepoChangesSchema.optional().describe(
347
+ "What this repository looks like now, read in the same breath as the commit so a caller can redraw from here instead of asking for a fresh scan. Absent means there is nothing left to show.",
348
+ ),
349
+ originAgents: z
350
+ .record(z.string(), OriginAgentSchema)
351
+ .optional()
352
+ .describe(
353
+ "Who the conversations named in those changes are. Merge it over what you already hold rather than replacing: other repositories still name their own.",
354
+ ),
355
+ });
356
+ export type CommitResult = z.infer<typeof CommitResultSchema>;
357
+ /* One module a changed file can be grouped under in the review panels: a repo-relative dir ("_editor/web", or ""
358
+ * for a repo that is itself one package) and the name its package.json declares. Distinct from
359
+ * WorkspacePackage, which is the DEPENDENCY graph's node, that one is pnpm's view of the workspace and carries
360
+ * the grouping axis its diagram colours by; this one is a filesystem fact about where a path lives.
361
+ *
362
+ * Stated HERE, above both readings of it, because there are two trees a review can be of and each groups by its
363
+ * own: the workspace read below (/workspace/modules, the Changes panel) speaks for /work, and every agent's
364
+ * diff carries its own (AgentRepoChanges.modules) because an agent's files live in a worktree /work cannot
365
+ * see. */
366
+ export const WorkspaceModuleSchema = z.object({
367
+ dir: z.string().describe("Where the package lives, relative to its repository. Empty when the repository is itself one package."),
368
+ name: z.string().describe("The name the package declares for itself."),
369
+ });
370
+ export type WorkspaceModule = z.infer<typeof WorkspaceModuleSchema>;
371
+ export const RepoModulesSchema = z.object({
372
+ repo: z.string().describe("Which repository."),
373
+ modules: z.array(WorkspaceModuleSchema).describe("Its packages."),
374
+ });
375
+ export type RepoModules = z.infer<typeof RepoModulesSchema>;
376
+ export const WorkspaceModulesSchema = z.object({ repos: z.array(RepoModulesSchema).describe("Every repository with the packages inside it.") });
377
+ export type WorkspaceModules = z.infer<typeof WorkspaceModulesSchema>;
378
+ // One file an agent touched, plus whether that change is ALREADY in the main tree. The review lists the
379
+ // agent's CUMULATIVE output (base → worktree), not just the not-yet-landed remainder, because landing is not
380
+ // the end of the review: a clean turn auto-lands within milliseconds, and a list scoped to the remainder shows
381
+ // the user an empty panel for work they never got to look at. `landed` is what still separates the two, the
382
+ // remainder is what "Land now" would apply, and the panel filters on exactly this flag.
383
+ export const AgentChangeSchema = GitChangeSchema.extend({
384
+ landed: z
385
+ .boolean()
386
+ .describe(
387
+ "Whether this change is already in the shared tree. The list is everything the conversation wrote, not just what is left over, because a clean turn merges in milliseconds and a list of leftovers would show an empty panel for work nobody had looked at yet.",
388
+ ),
389
+ });
390
+ export type AgentChange = z.infer<typeof AgentChangeSchema>;
391
+ // An agent conversation-worktree's delta vs its recorded base, deliberately NOT RepoChanges. There is no index
392
+ // side to speak of here: the question a fleet review answers is "what did this agent write", which is one flat
393
+ // set. Sharing the working-tree shape would have forced a meaningless empty `staged` on every
394
+ // row and invited the panel to render a staging affordance that cannot work on a worktree the user never checks out.
395
+ export const AgentRepoChangesSchema = z.object({
396
+ repo: z.string().describe("Which repository."),
397
+ branch: z.string().optional().describe("The branch this conversation's work sits on."),
398
+ changes: z.array(AgentChangeSchema).describe("What it changed there."),
399
+ /* THE PACKAGE LAYOUT OF THE TREE THESE CHANGES CAME FROM, so the review can group them by module the way
400
+ * the workspace's Changes panel does. It rides the changes rather than being fetched beside them, because
401
+ * an agent works in a worktree the main tree cannot see: a package the agent has just created exists only
402
+ * there, so the workspace-wide read (/workspace/modules) does not know its name and every one of its files
403
+ *, which for a new package is all of them, fell into the unnamed "loose in this repo" bucket.
404
+ *
405
+ * Same read, same instant, same tree as the rows it groups: that is what stops the two from disagreeing. */
406
+ modules: z
407
+ .array(WorkspaceModuleSchema)
408
+ .describe(
409
+ "The packages of the tree these changes came from, so a review can group by package. Carried with the changes rather than looked up separately, because a package the conversation has just created exists only in its own copy and the shared tree has never heard of it.",
410
+ ),
411
+ });
412
+ export type AgentRepoChanges = z.infer<typeof AgentRepoChangesSchema>;
413
+ /* The review, plus WHY the last land refused, because a conflict is discovered by the daemon (a clean turn
414
+ * auto-lands the moment it finishes) and acted on in the browser, possibly hours later, on a surface the user
415
+ * reaches by clicking the card's "Resolve conflict". Carrying the report only in the land RESPONSE meant the
416
+ * one path that opens the review already knowing there is a conflict was the one path that could not show it:
417
+ * the panel opened with an empty report, no explanation, and no merge affordance, a dead end at the exact
418
+ * moment the UI had promised something to resolve. It rides the review because that is the surface that
419
+ * resolves it, and it refreshes with it: every land invalidates this query, so the report is never staler
420
+ * than the last attempt. */
421
+ export const AgentChangesSchema = z.object({
422
+ repos: z.array(AgentRepoChangesSchema).describe("One entry per repository the conversation touched."),
423
+ conflicts: z
424
+ .array(LandConflictSchema)
425
+ .optional()
426
+ .describe(
427
+ "Why the last merge refused, when one did. Carried here as well as in the merge's own answer, because a conflict is found the moment a turn ends and dealt with hours later on this surface, which would otherwise open with nothing to explain what it promised to resolve.",
428
+ ),
429
+ });
430
+ export type AgentChanges = z.infer<typeof AgentChangesSchema>;
@@ -0,0 +1,112 @@
1
+ // history: daemon-owned workspace snapshots (diff + restore)
2
+ import { z } from "zod";
3
+ // The daemon snapshots /work into bare git dirs on /history (outside the agent's reach). A "snapshot" groups
4
+ // one commit per scope (root + each nested repo) under a shared id. Only checkpoint triggers (turn / user /
5
+ // pre-restore / restore) are listed; "interval" captures are a hidden safety net that dissolves into the next
6
+ // visible checkpoint's diff.
7
+
8
+ export const SnapshotTriggerSchema = z.enum(["turn", "interval", "pre-restore", "restore", "user"]);
9
+ export type SnapshotTrigger = z.infer<typeof SnapshotTriggerSchema>;
10
+ export const SnapshotSchema = z.object({
11
+ id: z.string().describe("The saved point's id, which is what restoring and diffing take."),
12
+ // Committer time, ms since epoch.
13
+ at: z.number().describe("When it was taken, in milliseconds."),
14
+ trigger: SnapshotTriggerSchema.describe(
15
+ "What caused it. The automatic between-turn captures are a safety net and are not listed; they dissolve into the next visible point's differences.",
16
+ ),
17
+ // Human-readable checkpoint label, the turn's prompt for "turn" snapshots; absent otherwise.
18
+ label: z.string().optional().describe("What to call it. For one taken before a turn, that turn's prompt."),
19
+ });
20
+ export type Snapshot = z.infer<typeof SnapshotSchema>;
21
+ /* WHICH CONVERSATION MESSAGE A TURN ANSWERS, carried alongside the turn so its pre-turn checkpoint can be
22
+ * filed under it (see the sandbox's agent/turn-anchors.ts). `index` is the transcript position the turn began
23
+ * at, which is also how many messages a rewind to it keeps. */
24
+ export interface SnapshotTurn {
25
+ readonly conversationId: string;
26
+ readonly index: number;
27
+ }
28
+ export const SnapshotsListSchema = z.object({ snapshots: z.array(SnapshotSchema).describe("Every point you can go back to, newest first.") });
29
+ /* REWIND, go back to a message and carry on from there. Restores the workspace to that turn's checkpoint,
30
+ * drops every message after it, and forgets the provider session so the next turn opens a fresh one.
31
+ *
32
+ * `index` is the transcript position of the user message being rewound TO, which is also how many messages
33
+ * survive, rewinding to the first message of a conversation keeps none of it and restores the workspace to
34
+ * before it ran. */
35
+ export const RewindTurnSchema = z.object({
36
+ conversationId: z.string().min(1).describe("Which conversation to rewind."),
37
+ index: z
38
+ .number()
39
+ .int()
40
+ .nonnegative()
41
+ .describe(
42
+ "Which message to go back to, counting from the start. It is also how many messages survive: rewinding to the first keeps none of them and puts the files back to before it ran.",
43
+ ),
44
+ });
45
+ export const RewindResultSchema = z.object({
46
+ /* The checkpoint the workspace was restored to, for the History timeline to select. Absent when the
47
+ * conversation works in a checkout of its own: that rewind moved the conversation's own branch, which the
48
+ * workspace timeline does not carry, there is no row there to select. */
49
+ snapshot: z
50
+ .string()
51
+ .optional()
52
+ .describe(
53
+ "The saved point the files were put back to. Absent for a conversation working in its own copy, whose rewind moved a branch rather than the shared timeline.",
54
+ ),
55
+ // Messages dropped from the transcript, what the client removes from its own bubbles.
56
+ dropped: z.number().int().nonnegative().describe("How many messages were removed."),
57
+ });
58
+ export type RewindResult = z.infer<typeof RewindResultSchema>;
59
+ export const SnapshotIdSchema = z.object({ id: z.string().min(1).describe("Which saved point.") });
60
+ export const SnapshotChangeSchema = z.object({
61
+ scope: z.string().describe("Which part of the workspace the path belongs to: the workspace root, or one of the repositories inside it."),
62
+ // Scope-relative path with forward slashes.
63
+ path: z.string().describe("The path, relative to that scope."),
64
+ status: z.enum(["added", "modified", "deleted", "type-changed"]).describe("What happened to it."),
65
+ });
66
+ export type SnapshotChange = z.infer<typeof SnapshotChangeSchema>;
67
+ export const SnapshotDiffSchema = z.object({
68
+ changes: z.array(SnapshotChangeSchema).describe("Everything that differs between this saved point and the one before it."),
69
+ });
70
+ export const SnapshotFileDiffQuerySchema = z.object({
71
+ id: z.string().min(1).describe("Which saved point."),
72
+ scope: z.string().min(1).describe("Which part of the workspace the path belongs to."),
73
+ path: z.string().min(1).describe("The file, relative to that scope."),
74
+ });
75
+ /* WHAT A FILE TOO BIG TO SEND WHOLE ANSWERS WITH INSTEAD, and why that is not simply "no".
76
+ *
77
+ * Both whole sides of a half-megabyte file are a megabyte of JSON per click, so above the cap they are not
78
+ * sent, which used to be the end of it: the response said "too large" and every review surface printed one
79
+ * sentence over an empty pane. That is the wrong trade, because the thing a reader wants out of a big file is
80
+ * almost never the file: it is the handful of lines that MOVED, and those are small however big the file is.
81
+ *
82
+ * So the daemon diffs it and sends the CHANGED REGIONS as a unified patch, at the same three lines of context
83
+ * a collapsed region keeps elsewhere. A 40 KB patch stands in for a 60 MB pair, and the reader gets the actual
84
+ * review rather than a refusal. `patch` carries the `@@` sections only, the file headers git prints above them
85
+ * name rev-specs no one can apply anyway.
86
+ *
87
+ * An added or deleted file has no counterpart to diff against, so its patch IS the file, one region of pure
88
+ * +/− lines. That is still the right answer: cut to the budget, it is the head of the file, which is the peek
89
+ * the reader came for.
90
+ *
91
+ * `patch` is absent only when there was nothing to make one from: a change too large even to render as a
92
+ * patch, or a git that refused. The sizes are still there, so a surface can at least say how big the thing it
93
+ * is not showing is. */
94
+ export const PartialFileDiffSchema = z.object({
95
+ beforeBytes: z.number().int().nonnegative().optional().describe("How big the before side is, in bytes. Absent when the file did not exist yet."),
96
+ afterBytes: z.number().int().nonnegative().optional().describe("How big the after side is, in bytes. Absent when the file was deleted."),
97
+ patch: z
98
+ .string()
99
+ .optional()
100
+ .describe("The changed regions as unified-diff hunks (`@@` sections only). Absent when the change was too large to render even as a patch."),
101
+ more: z.boolean().optional().describe("There were more changed regions than fit; the patch stops at a region boundary."),
102
+ });
103
+ export type PartialFileDiff = z.infer<typeof PartialFileDiffSchema>;
104
+ // Both sides of a file diff, a snapshot vs its parent, or a working tree vs HEAD; an absent side means the
105
+ // file was added/deleted. Binary content is flagged instead of shipped; oversized content arrives as `partial`.
106
+ export const FileDiffSchema = z.object({
107
+ before: z.string().optional().describe("The whole file as it was. Absent when it did not exist yet, or when `partial` is set."),
108
+ after: z.string().optional().describe("The whole file as it is now. Absent when it was deleted, or when `partial` is set."),
109
+ binary: z.boolean().optional().describe("The file is not text, so neither side is sent."),
110
+ partial: PartialFileDiffSchema.optional().describe("Set when the file was too large to send whole: what is sent instead of the two sides."),
111
+ });
112
+ export type FileDiff = z.infer<typeof FileDiffSchema>;
@@ -0,0 +1,37 @@
1
+ // hosts: the user's own connected computers (the `host` capability's live half)
2
+ import { z } from "zod";
3
+ // The manifest says which machines the user INTENDS to have connected; this says which are actually holding a
4
+ // socket right now. Nothing here is remembered across a daemon restart except the enrollment itself: a machine
5
+ // is "online" exactly while its WebSocket is attached, so a laptop that closed its lid reads as offline within
6
+ // a heartbeat rather than staying green until someone asks it to do something.
7
+
8
+ // What a machine reports about itself once, at connect (the agent's own `host.describe`, cached until it
9
+ // reconnects). It is the difference between an agent guessing what is on the box and knowing: the SKILL pack
10
+ // tells it HOW to drive Windows, this tells it WHICH Windows this is.
11
+ export const HostFactsSchema = z.object({
12
+ // The OS's own name for itself, "Windows 11 Pro 24H2", "Ubuntu 24.04.1 LTS".
13
+ os: z.string(),
14
+ arch: z.string(),
15
+ // The shell run_command actually spawns, so the agent writes for the right one from its first command.
16
+ shell: z.string(),
17
+ // The machine's home directory, and the default root when the capability declares none.
18
+ home: z.string(),
19
+ // Roots in force right now (the capability's `roots`, or [home]), the agent sees its own boundary.
20
+ roots: z.array(z.string()),
21
+ });
22
+ export type HostFacts = z.infer<typeof HostFactsSchema>;
23
+ export const HostSummarySchema = z.object({
24
+ // The capability id, the machine's name, and the prefix of its tools (mcp__<id>__run_command).
25
+ id: z.string(),
26
+ platform: z.string().min(1),
27
+ online: z.boolean(),
28
+ // The agent binary's version, so a machine running an old build is visible rather than mysteriously lacking
29
+ // a tool. Absent until the machine has connected once.
30
+ version: z.string().optional(),
31
+ // Epoch ms of the last time this machine held a socket. Absent ⇒ it has not connected since this daemon
32
+ // booted, liveness is a fact about a socket, so a restart forgets it rather than claiming stale uptime.
33
+ lastSeen: z.number().optional(),
34
+ facts: HostFactsSchema.optional(),
35
+ });
36
+ export type HostSummary = z.infer<typeof HostSummarySchema>;
37
+ export const HostsListSchema = z.object({ hosts: z.array(HostSummarySchema) });
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export const IntenticRunSchema = z.object({ args: z.array(z.string()) });
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ // A manifest entry id (capabilities + automations + personas), also the `mcp__<id>__…` server name for mcp
3
+ // capabilities, so it's a safe identifier.
4
+ export const entryId = z
5
+ .string()
6
+ .min(1)
7
+ .max(60)
8
+ .regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/);
9
+ // A ref name (branch/tag), validated structurally, git enforces the rest of ref-name legality itself.
10
+ export const RefNameSchema = z
11
+ .string()
12
+ .regex(/^[A-Za-z0-9][A-Za-z0-9._/-]*$/)
13
+ .max(200);
14
+ // Exits rest DOWN by default, the opposite of a vpn's autoConnect. A vpn is dialled because something behind
15
+ // it is unreachable otherwise; an exit costs volunteer bandwidth (tor, vpngate) and buys nothing until a task
16
+ // actually wants a different country, so the honest default is to hold it until asked.
17
+ export const autoStart = z.enum(["on", "off"]).default("off");