@intentic/sandbox-contract 1.232.0 → 1.234.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (538) hide show
  1. package/README.md +11 -5
  2. package/dist/agent-catalog.d.ts +4 -2
  3. package/dist/agent-catalog.d.ts.map +1 -1
  4. package/dist/agent-catalog.js +20 -14
  5. package/dist/agent-catalog.js.map +1 -1
  6. package/dist/chores/chores.d.ts +1 -1
  7. package/dist/chores/chores.d.ts.map +1 -1
  8. package/dist/chores/chores.js +36 -1
  9. package/dist/chores/chores.js.map +1 -1
  10. package/dist/chores/probes.d.ts +1 -1
  11. package/dist/chores/probes.d.ts.map +1 -1
  12. package/dist/chores/probes.js +70 -0
  13. package/dist/chores/probes.js.map +1 -1
  14. package/dist/chores/stack.d.ts.map +1 -1
  15. package/dist/chores/stack.js +2 -1
  16. package/dist/chores/stack.js.map +1 -1
  17. package/dist/chores/verdict.d.ts +1 -1
  18. package/dist/chores/verdict.d.ts.map +1 -1
  19. package/dist/command-classes.d.ts +17 -0
  20. package/dist/command-classes.d.ts.map +1 -0
  21. package/dist/command-classes.js +189 -0
  22. package/dist/command-classes.js.map +1 -0
  23. package/dist/contracts/activity.contract.js +1 -1
  24. package/dist/contracts/activity.contract.js.map +1 -1
  25. package/dist/contracts/agent.contract.d.ts +40 -2
  26. package/dist/contracts/agent.contract.d.ts.map +1 -1
  27. package/dist/contracts/agent.contract.js +4 -1
  28. package/dist/contracts/agent.contract.js.map +1 -1
  29. package/dist/contracts/agents.contract.d.ts +24 -0
  30. package/dist/contracts/agents.contract.d.ts.map +1 -1
  31. package/dist/contracts/agents.contract.js +5 -1
  32. package/dist/contracts/agents.contract.js.map +1 -1
  33. package/dist/contracts/automations.contract.d.ts +30 -0
  34. package/dist/contracts/automations.contract.d.ts.map +1 -1
  35. package/dist/contracts/automations.contract.js +2 -1
  36. package/dist/contracts/automations.contract.js.map +1 -1
  37. package/dist/contracts/capabilities.contract.d.ts +63 -0
  38. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  39. package/dist/contracts/capabilities.contract.js +3 -1
  40. package/dist/contracts/capabilities.contract.js.map +1 -1
  41. package/dist/contracts/chores.contract.d.ts +17 -0
  42. package/dist/contracts/chores.contract.d.ts.map +1 -1
  43. package/dist/contracts/chores.contract.js +2 -1
  44. package/dist/contracts/chores.contract.js.map +1 -1
  45. package/dist/contracts/ci.contract.js +2 -1
  46. package/dist/contracts/ci.contract.js.map +1 -1
  47. package/dist/contracts/claude.contract.js +2 -1
  48. package/dist/contracts/claude.contract.js.map +1 -1
  49. package/dist/contracts/cursor.contract.js +2 -1
  50. package/dist/contracts/cursor.contract.js.map +1 -1
  51. package/dist/contracts/drafts.contract.d.ts.map +1 -1
  52. package/dist/contracts/drafts.contract.js +2 -1
  53. package/dist/contracts/drafts.contract.js.map +1 -1
  54. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  55. package/dist/contracts/endpoints.contract.js +2 -1
  56. package/dist/contracts/endpoints.contract.js.map +1 -1
  57. package/dist/contracts/exit.contract.d.ts.map +1 -1
  58. package/dist/contracts/exit.contract.js +2 -1
  59. package/dist/contracts/exit.contract.js.map +1 -1
  60. package/dist/contracts/extensions.contract.d.ts +44 -0
  61. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  62. package/dist/contracts/extensions.contract.js +4 -1
  63. package/dist/contracts/extensions.contract.js.map +1 -1
  64. package/dist/contracts/git.contract.d.ts.map +1 -1
  65. package/dist/contracts/git.contract.js +4 -1
  66. package/dist/contracts/git.contract.js.map +1 -1
  67. package/dist/contracts/grok.contract.d.ts.map +1 -1
  68. package/dist/contracts/grok.contract.js +2 -1
  69. package/dist/contracts/grok.contract.js.map +1 -1
  70. package/dist/contracts/history.contract.d.ts.map +1 -1
  71. package/dist/contracts/history.contract.js +2 -1
  72. package/dist/contracts/history.contract.js.map +1 -1
  73. package/dist/contracts/host.contract.d.ts +7 -0
  74. package/dist/contracts/host.contract.d.ts.map +1 -1
  75. package/dist/contracts/host.contract.js +4 -1
  76. package/dist/contracts/host.contract.js.map +1 -1
  77. package/dist/contracts/intentic.contract.d.ts.map +1 -1
  78. package/dist/contracts/intentic.contract.js +2 -1
  79. package/dist/contracts/intentic.contract.js.map +1 -1
  80. package/dist/contracts/inventory.contract.js +1 -1
  81. package/dist/contracts/inventory.contract.js.map +1 -1
  82. package/dist/contracts/issues.contract.d.ts +89 -0
  83. package/dist/contracts/issues.contract.d.ts.map +1 -0
  84. package/dist/contracts/issues.contract.js +50 -0
  85. package/dist/contracts/issues.contract.js.map +1 -0
  86. package/dist/contracts/logs.contract.d.ts.map +1 -1
  87. package/dist/contracts/logs.contract.js +1 -1
  88. package/dist/contracts/logs.contract.js.map +1 -1
  89. package/dist/contracts/loops.contract.js +2 -1
  90. package/dist/contracts/loops.contract.js.map +1 -1
  91. package/dist/contracts/panels.contract.d.ts.map +1 -1
  92. package/dist/contracts/panels.contract.js +2 -1
  93. package/dist/contracts/panels.contract.js.map +1 -1
  94. package/dist/contracts/personas.contract.js +2 -1
  95. package/dist/contracts/personas.contract.js.map +1 -1
  96. package/dist/contracts/ports.contract.d.ts.map +1 -1
  97. package/dist/contracts/ports.contract.js +2 -1
  98. package/dist/contracts/ports.contract.js.map +1 -1
  99. package/dist/contracts/prepush.contract.d.ts.map +1 -1
  100. package/dist/contracts/prepush.contract.js +2 -1
  101. package/dist/contracts/prepush.contract.js.map +1 -1
  102. package/dist/contracts/providers.contract.d.ts.map +1 -1
  103. package/dist/contracts/providers.contract.js +2 -1
  104. package/dist/contracts/providers.contract.js.map +1 -1
  105. package/dist/contracts/public.contract.d.ts.map +1 -1
  106. package/dist/contracts/public.contract.js +2 -1
  107. package/dist/contracts/public.contract.js.map +1 -1
  108. package/dist/contracts/push.contract.d.ts.map +1 -1
  109. package/dist/contracts/push.contract.js +2 -1
  110. package/dist/contracts/push.contract.js.map +1 -1
  111. package/dist/contracts/runner.contract.d.ts +127 -84
  112. package/dist/contracts/runner.contract.d.ts.map +1 -1
  113. package/dist/contracts/runner.contract.js +10 -2
  114. package/dist/contracts/runner.contract.js.map +1 -1
  115. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  116. package/dist/contracts/secrets.contract.js +2 -1
  117. package/dist/contracts/secrets.contract.js.map +1 -1
  118. package/dist/contracts/sessions.contract.js +1 -1
  119. package/dist/contracts/sessions.contract.js.map +1 -1
  120. package/dist/contracts/settings.contract.d.ts +32 -0
  121. package/dist/contracts/settings.contract.d.ts.map +1 -1
  122. package/dist/contracts/settings.contract.js +3 -1
  123. package/dist/contracts/settings.contract.js.map +1 -1
  124. package/dist/contracts/share.contract.d.ts.map +1 -1
  125. package/dist/contracts/share.contract.js +2 -1
  126. package/dist/contracts/share.contract.js.map +1 -1
  127. package/dist/contracts/skills.contract.d.ts.map +1 -1
  128. package/dist/contracts/skills.contract.js +2 -1
  129. package/dist/contracts/skills.contract.js.map +1 -1
  130. package/dist/contracts/system.contract.d.ts +31 -16
  131. package/dist/contracts/system.contract.d.ts.map +1 -1
  132. package/dist/contracts/system.contract.js +6 -1
  133. package/dist/contracts/system.contract.js.map +1 -1
  134. package/dist/contracts/translator.contract.d.ts.map +1 -1
  135. package/dist/contracts/translator.contract.js +4 -1
  136. package/dist/contracts/translator.contract.js.map +1 -1
  137. package/dist/contracts/usage.contract.js +1 -1
  138. package/dist/contracts/usage.contract.js.map +1 -1
  139. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  140. package/dist/contracts/vpn.contract.js +2 -1
  141. package/dist/contracts/vpn.contract.js.map +1 -1
  142. package/dist/contracts/webext.contract.d.ts +45 -0
  143. package/dist/contracts/webext.contract.d.ts.map +1 -0
  144. package/dist/contracts/webext.contract.js +12 -0
  145. package/dist/contracts/webext.contract.js.map +1 -0
  146. package/dist/contracts/workflows.contract.js +2 -1
  147. package/dist/contracts/workflows.contract.js.map +1 -1
  148. package/dist/contracts/workspace.contract.d.ts +2 -2
  149. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  150. package/dist/contracts/workspace.contract.js +7 -1
  151. package/dist/contracts/workspace.contract.js.map +1 -1
  152. package/dist/credential-material.d.ts +2 -0
  153. package/dist/credential-material.d.ts.map +1 -0
  154. package/dist/credential-material.js +36 -0
  155. package/dist/credential-material.js.map +1 -0
  156. package/dist/definition-action.d.ts +7 -0
  157. package/dist/definition-action.d.ts.map +1 -0
  158. package/dist/definition-action.js +3 -0
  159. package/dist/definition-action.js.map +1 -0
  160. package/dist/definition.d.ts +132 -21
  161. package/dist/definition.d.ts.map +1 -1
  162. package/dist/definition.js +29 -7
  163. package/dist/definition.js.map +1 -1
  164. package/dist/events.d.ts +101 -0
  165. package/dist/events.d.ts.map +1 -1
  166. package/dist/events.js +25 -1
  167. package/dist/events.js.map +1 -1
  168. package/dist/fast-tier.d.ts +1 -1
  169. package/dist/fast-tier.d.ts.map +1 -1
  170. package/dist/history-state.d.ts.map +1 -1
  171. package/dist/history-state.js +2 -0
  172. package/dist/history-state.js.map +1 -1
  173. package/dist/hostnames.d.ts +2 -0
  174. package/dist/hostnames.d.ts.map +1 -1
  175. package/dist/hostnames.js +3 -1
  176. package/dist/hostnames.js.map +1 -1
  177. package/dist/index.d.ts +411 -7
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +56 -1
  180. package/dist/index.js.map +1 -1
  181. package/dist/listener-protocol.js +1 -1
  182. package/dist/listener-protocol.js.map +1 -1
  183. package/dist/quick-model.d.ts +1 -1
  184. package/dist/quick-model.d.ts.map +1 -1
  185. package/dist/runner-protocol.d.ts +18 -0
  186. package/dist/runner-protocol.d.ts.map +1 -1
  187. package/dist/runner-protocol.js +8 -4
  188. package/dist/runner-protocol.js.map +1 -1
  189. package/dist/runtime-state.d.ts +9 -0
  190. package/dist/runtime-state.d.ts.map +1 -1
  191. package/dist/runtime-state.js +3 -0
  192. package/dist/runtime-state.js.map +1 -1
  193. package/dist/schemas/activity.d.ts +112 -0
  194. package/dist/schemas/activity.d.ts.map +1 -0
  195. package/dist/schemas/activity.js +70 -0
  196. package/dist/schemas/activity.js.map +1 -0
  197. package/dist/schemas/agent.d.ts +195 -0
  198. package/dist/schemas/agent.d.ts.map +1 -0
  199. package/dist/schemas/agent.js +171 -0
  200. package/dist/schemas/agent.js.map +1 -0
  201. package/dist/schemas/agents.d.ts +690 -0
  202. package/dist/schemas/agents.d.ts.map +1 -0
  203. package/dist/schemas/agents.js +314 -0
  204. package/dist/schemas/agents.js.map +1 -0
  205. package/dist/schemas/automations.d.ts +781 -0
  206. package/dist/schemas/automations.d.ts.map +1 -0
  207. package/dist/schemas/automations.js +223 -0
  208. package/dist/schemas/automations.js.map +1 -0
  209. package/dist/schemas/capabilities.d.ts +753 -0
  210. package/dist/schemas/capabilities.d.ts.map +1 -0
  211. package/dist/schemas/capabilities.js +269 -0
  212. package/dist/schemas/capabilities.js.map +1 -0
  213. package/dist/schemas/ci.d.ts +179 -0
  214. package/dist/schemas/ci.d.ts.map +1 -0
  215. package/dist/schemas/ci.js +99 -0
  216. package/dist/schemas/ci.js.map +1 -0
  217. package/dist/schemas/claude-gate.d.ts +13 -0
  218. package/dist/schemas/claude-gate.d.ts.map +1 -0
  219. package/dist/schemas/claude-gate.js +8 -0
  220. package/dist/schemas/claude-gate.js.map +1 -0
  221. package/dist/schemas/codebase-health.d.ts +56 -0
  222. package/dist/schemas/codebase-health.d.ts.map +1 -0
  223. package/dist/schemas/codebase-health.js +43 -0
  224. package/dist/schemas/codebase-health.js.map +1 -0
  225. package/dist/schemas/computers.d.ts +386 -0
  226. package/dist/schemas/computers.d.ts.map +1 -0
  227. package/dist/schemas/computers.js +107 -0
  228. package/dist/schemas/computers.js.map +1 -0
  229. package/dist/schemas/drafts.d.ts +84 -0
  230. package/dist/schemas/drafts.d.ts.map +1 -0
  231. package/dist/schemas/drafts.js +44 -0
  232. package/dist/schemas/drafts.js.map +1 -0
  233. package/dist/schemas/environment.d.ts +349 -0
  234. package/dist/schemas/environment.d.ts.map +1 -0
  235. package/dist/schemas/environment.js +111 -0
  236. package/dist/schemas/environment.js.map +1 -0
  237. package/dist/schemas/exit.d.ts +151 -0
  238. package/dist/schemas/exit.d.ts.map +1 -0
  239. package/dist/schemas/exit.js +115 -0
  240. package/dist/schemas/exit.js.map +1 -0
  241. package/dist/schemas/extension-updates.d.ts +1016 -0
  242. package/dist/schemas/extension-updates.d.ts.map +1 -0
  243. package/dist/schemas/extension-updates.js +199 -0
  244. package/dist/schemas/extension-updates.js.map +1 -0
  245. package/dist/schemas/fast-mode.d.ts +8 -0
  246. package/dist/schemas/fast-mode.d.ts.map +1 -0
  247. package/dist/schemas/fast-mode.js +3 -0
  248. package/dist/schemas/fast-mode.js.map +1 -0
  249. package/dist/schemas/git-history.d.ts +238 -0
  250. package/dist/schemas/git-history.d.ts.map +1 -0
  251. package/dist/schemas/git-history.js +152 -0
  252. package/dist/schemas/git-history.js.map +1 -0
  253. package/dist/schemas/git.d.ts +471 -0
  254. package/dist/schemas/git.d.ts.map +1 -0
  255. package/dist/schemas/git.js +204 -0
  256. package/dist/schemas/git.js.map +1 -0
  257. package/dist/schemas/history.d.ts +100 -0
  258. package/dist/schemas/history.d.ts.map +1 -0
  259. package/dist/schemas/history.js +54 -0
  260. package/dist/schemas/history.js.map +1 -0
  261. package/dist/schemas/hosts.d.ts +41 -0
  262. package/dist/schemas/hosts.d.ts.map +1 -0
  263. package/dist/schemas/hosts.js +18 -0
  264. package/dist/schemas/hosts.js.map +1 -0
  265. package/dist/schemas/intentic.d.ts +5 -0
  266. package/dist/schemas/intentic.d.ts.map +1 -0
  267. package/dist/schemas/intentic.js +3 -0
  268. package/dist/schemas/intentic.js.map +1 -0
  269. package/dist/schemas/internal.d.ts +8 -0
  270. package/dist/schemas/internal.d.ts.map +1 -0
  271. package/dist/schemas/internal.js +12 -0
  272. package/dist/schemas/internal.js.map +1 -0
  273. package/dist/schemas/inventory.d.ts +171 -0
  274. package/dist/schemas/inventory.d.ts.map +1 -0
  275. package/dist/schemas/inventory.js +51 -0
  276. package/dist/schemas/inventory.js.map +1 -0
  277. package/dist/schemas/issues.d.ts +324 -0
  278. package/dist/schemas/issues.d.ts.map +1 -0
  279. package/dist/schemas/issues.js +107 -0
  280. package/dist/schemas/issues.js.map +1 -0
  281. package/dist/schemas/logs.d.ts +67 -0
  282. package/dist/schemas/logs.d.ts.map +1 -0
  283. package/dist/schemas/logs.js +54 -0
  284. package/dist/schemas/logs.js.map +1 -0
  285. package/dist/schemas/loops.d.ts +415 -0
  286. package/dist/schemas/loops.d.ts.map +1 -0
  287. package/dist/schemas/loops.js +188 -0
  288. package/dist/schemas/loops.js.map +1 -0
  289. package/dist/schemas/maintenance.d.ts +618 -0
  290. package/dist/schemas/maintenance.d.ts.map +1 -0
  291. package/dist/schemas/maintenance.js +222 -0
  292. package/dist/schemas/maintenance.js.map +1 -0
  293. package/dist/schemas/marketplace.d.ts +64 -0
  294. package/dist/schemas/marketplace.d.ts.map +1 -0
  295. package/dist/schemas/marketplace.js +17 -0
  296. package/dist/schemas/marketplace.js.map +1 -0
  297. package/dist/schemas/panels.d.ts +61 -0
  298. package/dist/schemas/panels.d.ts.map +1 -0
  299. package/dist/schemas/panels.js +51 -0
  300. package/dist/schemas/panels.js.map +1 -0
  301. package/dist/schemas/personas.d.ts +122 -0
  302. package/dist/schemas/personas.d.ts.map +1 -0
  303. package/dist/schemas/personas.js +102 -0
  304. package/dist/schemas/personas.js.map +1 -0
  305. package/dist/schemas/plan-limits.d.ts +172 -0
  306. package/dist/schemas/plan-limits.d.ts.map +1 -0
  307. package/dist/schemas/plan-limits.js +126 -0
  308. package/dist/schemas/plan-limits.js.map +1 -0
  309. package/dist/schemas/ports.d.ts +71 -0
  310. package/dist/schemas/ports.d.ts.map +1 -0
  311. package/dist/schemas/ports.js +42 -0
  312. package/dist/schemas/ports.js.map +1 -0
  313. package/dist/schemas/provider-oauth.d.ts +128 -0
  314. package/dist/schemas/provider-oauth.d.ts.map +1 -0
  315. package/dist/schemas/provider-oauth.js +91 -0
  316. package/dist/schemas/provider-oauth.js.map +1 -0
  317. package/dist/schemas/provider-subscriptions.d.ts +9 -0
  318. package/dist/schemas/provider-subscriptions.d.ts.map +1 -0
  319. package/dist/schemas/provider-subscriptions.js +3 -0
  320. package/dist/schemas/provider-subscriptions.js.map +1 -0
  321. package/dist/schemas/public.d.ts +32 -0
  322. package/dist/schemas/public.d.ts.map +1 -0
  323. package/dist/schemas/public.js +29 -0
  324. package/dist/schemas/public.js.map +1 -0
  325. package/dist/schemas/push.d.ts +55 -0
  326. package/dist/schemas/push.d.ts.map +1 -0
  327. package/dist/schemas/push.js +60 -0
  328. package/dist/schemas/push.js.map +1 -0
  329. package/dist/schemas/secrets.d.ts +86 -0
  330. package/dist/schemas/secrets.d.ts.map +1 -0
  331. package/dist/schemas/secrets.js +51 -0
  332. package/dist/schemas/secrets.js.map +1 -0
  333. package/dist/schemas/sessions.d.ts +32 -0
  334. package/dist/schemas/sessions.d.ts.map +1 -0
  335. package/dist/schemas/sessions.js +11 -0
  336. package/dist/schemas/sessions.js.map +1 -0
  337. package/dist/schemas/settings.d.ts +554 -0
  338. package/dist/schemas/settings.d.ts.map +1 -0
  339. package/dist/schemas/settings.js +263 -0
  340. package/dist/schemas/settings.js.map +1 -0
  341. package/dist/schemas/share.d.ts +49 -0
  342. package/dist/schemas/share.d.ts.map +1 -0
  343. package/dist/schemas/share.js +26 -0
  344. package/dist/schemas/share.js.map +1 -0
  345. package/dist/schemas/shared.d.ts +22 -0
  346. package/dist/schemas/shared.d.ts.map +1 -0
  347. package/dist/schemas/shared.js +16 -0
  348. package/dist/schemas/shared.js.map +1 -0
  349. package/dist/schemas/system.d.ts +86 -0
  350. package/dist/schemas/system.d.ts.map +1 -0
  351. package/dist/schemas/system.js +64 -0
  352. package/dist/schemas/system.js.map +1 -0
  353. package/dist/schemas/terminal.d.ts +230 -0
  354. package/dist/schemas/terminal.d.ts.map +1 -0
  355. package/dist/schemas/terminal.js +133 -0
  356. package/dist/schemas/terminal.js.map +1 -0
  357. package/dist/schemas/usage.d.ts +113 -0
  358. package/dist/schemas/usage.d.ts.map +1 -0
  359. package/dist/schemas/usage.js +91 -0
  360. package/dist/schemas/usage.js.map +1 -0
  361. package/dist/schemas/vpn.d.ts +229 -0
  362. package/dist/schemas/vpn.d.ts.map +1 -0
  363. package/dist/schemas/vpn.js +115 -0
  364. package/dist/schemas/vpn.js.map +1 -0
  365. package/dist/schemas/webext.d.ts +122 -0
  366. package/dist/schemas/webext.d.ts.map +1 -0
  367. package/dist/schemas/webext.js +45 -0
  368. package/dist/schemas/webext.js.map +1 -0
  369. package/dist/schemas/workflows.d.ts +881 -0
  370. package/dist/schemas/workflows.d.ts.map +1 -0
  371. package/dist/schemas/workflows.js +164 -0
  372. package/dist/schemas/workflows.js.map +1 -0
  373. package/dist/schemas/workspace-repos.d.ts +143 -0
  374. package/dist/schemas/workspace-repos.d.ts.map +1 -0
  375. package/dist/schemas/workspace-repos.js +87 -0
  376. package/dist/schemas/workspace-repos.js.map +1 -0
  377. package/dist/schemas/workspace-search.d.ts +170 -0
  378. package/dist/schemas/workspace-search.d.ts.map +1 -0
  379. package/dist/schemas/workspace-search.js +85 -0
  380. package/dist/schemas/workspace-search.js.map +1 -0
  381. package/dist/schemas/workspace-setup.d.ts +48 -0
  382. package/dist/schemas/workspace-setup.d.ts.map +1 -0
  383. package/dist/schemas/workspace-setup.js +26 -0
  384. package/dist/schemas/workspace-setup.js.map +1 -0
  385. package/dist/schemas/workspace-tree.d.ts +120 -0
  386. package/dist/schemas/workspace-tree.d.ts.map +1 -0
  387. package/dist/schemas/workspace-tree.js +111 -0
  388. package/dist/schemas/workspace-tree.js.map +1 -0
  389. package/dist/webext-links.d.ts +14 -0
  390. package/dist/webext-links.d.ts.map +1 -0
  391. package/dist/webext-links.js +25 -0
  392. package/dist/webext-links.js.map +1 -0
  393. package/dist/webext-protocol.d.ts +8 -0
  394. package/dist/webext-protocol.d.ts.map +1 -0
  395. package/dist/webext-protocol.js +7 -0
  396. package/dist/webext-protocol.js.map +1 -0
  397. package/dist/workflow-faults.d.ts +1 -1
  398. package/dist/workflow-faults.d.ts.map +1 -1
  399. package/dist/workspace-state.d.ts +12 -8
  400. package/dist/workspace-state.d.ts.map +1 -1
  401. package/dist/workspace-state.js +15 -10
  402. package/dist/workspace-state.js.map +1 -1
  403. package/package.json +19 -8
  404. package/src/agent-catalog.test.ts +56 -55
  405. package/src/agent-catalog.ts +33 -33
  406. package/src/capability-ledger.test.ts +11 -2
  407. package/src/chores/chores.test.ts +1 -1
  408. package/src/chores/chores.ts +67 -2
  409. package/src/chores/probes.test.ts +65 -0
  410. package/src/chores/probes.ts +133 -1
  411. package/src/chores/stack.test.ts +19 -0
  412. package/src/chores/stack.ts +19 -3
  413. package/src/chores/verdict.test.ts +40 -20
  414. package/src/chores/verdict.ts +1 -1
  415. package/src/command-classes.test.ts +445 -0
  416. package/src/command-classes.ts +468 -0
  417. package/src/contracts/activity.contract.ts +1 -1
  418. package/src/contracts/agent.contract.ts +4 -13
  419. package/src/contracts/agents.contract.ts +6 -6
  420. package/src/contracts/automations.contract.ts +2 -2
  421. package/src/contracts/capabilities.contract.ts +3 -4
  422. package/src/contracts/chores.contract.ts +2 -1
  423. package/src/contracts/ci.contract.ts +2 -2
  424. package/src/contracts/claude.contract.ts +2 -2
  425. package/src/contracts/cursor.contract.ts +2 -2
  426. package/src/contracts/drafts.contract.ts +2 -1
  427. package/src/contracts/endpoints.contract.ts +2 -1
  428. package/src/contracts/exit.contract.ts +2 -1
  429. package/src/contracts/extensions.contract.ts +8 -7
  430. package/src/contracts/git.contract.ts +19 -18
  431. package/src/contracts/grok.contract.ts +2 -1
  432. package/src/contracts/history.contract.ts +2 -1
  433. package/src/contracts/host.contract.ts +4 -1
  434. package/src/contracts/intentic.contract.ts +2 -1
  435. package/src/contracts/inventory.contract.ts +1 -1
  436. package/src/contracts/issues.contract.ts +60 -0
  437. package/src/contracts/logs.contract.ts +7 -1
  438. package/src/contracts/loops.contract.ts +2 -2
  439. package/src/contracts/panels.contract.ts +2 -1
  440. package/src/contracts/personas.contract.ts +3 -3
  441. package/src/contracts/ports.contract.ts +3 -2
  442. package/src/contracts/prepush.contract.ts +2 -1
  443. package/src/contracts/providers.contract.ts +2 -1
  444. package/src/contracts/public.contract.ts +3 -2
  445. package/src/contracts/push.contract.ts +2 -1
  446. package/src/contracts/runner.contract.ts +18 -2
  447. package/src/contracts/secrets.contract.ts +2 -1
  448. package/src/contracts/sessions.contract.ts +1 -1
  449. package/src/contracts/settings.contract.ts +3 -9
  450. package/src/contracts/share.contract.ts +3 -2
  451. package/src/contracts/skills.contract.ts +2 -1
  452. package/src/contracts/system.contract.ts +6 -9
  453. package/src/contracts/translator.contract.ts +4 -1
  454. package/src/contracts/usage.contract.ts +1 -1
  455. package/src/contracts/vpn.contract.ts +2 -8
  456. package/src/contracts/webext.contract.ts +37 -0
  457. package/src/contracts/workflows.contract.ts +2 -2
  458. package/src/contracts/workspace.contract.ts +10 -12
  459. package/src/conversation-ids.test.ts +1 -1
  460. package/src/credential-material.test.ts +120 -0
  461. package/src/credential-material.ts +100 -0
  462. package/src/definition-action.ts +8 -0
  463. package/src/definition.ts +74 -10
  464. package/src/events.ts +84 -22
  465. package/src/fast-tier.ts +1 -1
  466. package/src/history-state.ts +17 -0
  467. package/src/host-protocol.ts +1 -1
  468. package/src/hostnames.test.ts +2 -2
  469. package/src/hostnames.ts +18 -2
  470. package/src/index.ts +65 -1
  471. package/src/listener-protocol.ts +1 -1
  472. package/src/quick-model.ts +1 -1
  473. package/src/routes.test.ts +4 -2
  474. package/src/runner-protocol.ts +35 -5
  475. package/src/runtime-state.ts +16 -0
  476. package/src/schemas/activity.ts +123 -0
  477. package/src/schemas/agent.ts +422 -0
  478. package/src/schemas/agents.ts +802 -0
  479. package/src/schemas/automations.ts +522 -0
  480. package/src/schemas/capabilities.ts +729 -0
  481. package/src/schemas/ci.ts +235 -0
  482. package/src/schemas/claude-gate.ts +13 -0
  483. package/src/schemas/codebase-health.ts +64 -0
  484. package/src/schemas/computers.ts +287 -0
  485. package/src/schemas/drafts.ts +108 -0
  486. package/src/schemas/environment.ts +276 -0
  487. package/src/schemas/exit.ts +222 -0
  488. package/src/schemas/extension-updates.ts +324 -0
  489. package/src/schemas/fast-mode.ts +8 -0
  490. package/src/schemas/git-history.ts +265 -0
  491. package/src/schemas/git.ts +430 -0
  492. package/src/schemas/history.ts +112 -0
  493. package/src/schemas/hosts.ts +37 -0
  494. package/src/schemas/intentic.ts +2 -0
  495. package/src/schemas/internal.ts +17 -0
  496. package/src/schemas/inventory.ts +68 -0
  497. package/src/schemas/issues.ts +279 -0
  498. package/src/schemas/logs.ts +96 -0
  499. package/src/schemas/loops.ts +401 -0
  500. package/src/schemas/maintenance.ts +471 -0
  501. package/src/schemas/marketplace.ts +23 -0
  502. package/src/schemas/panels.ts +99 -0
  503. package/src/schemas/personas.ts +281 -0
  504. package/src/schemas/plan-limits.ts +255 -0
  505. package/src/schemas/ports.ts +84 -0
  506. package/src/schemas/provider-oauth.ts +191 -0
  507. package/src/schemas/provider-subscriptions.ts +11 -0
  508. package/src/schemas/public.ts +52 -0
  509. package/src/schemas/push.ts +112 -0
  510. package/src/schemas/secrets.ts +68 -0
  511. package/src/schemas/sessions.ts +16 -0
  512. package/src/schemas/settings.ts +964 -0
  513. package/src/schemas/share.ts +71 -0
  514. package/src/schemas/shared.ts +32 -0
  515. package/src/schemas/system.ts +156 -0
  516. package/src/schemas/terminal.ts +288 -0
  517. package/src/schemas/usage.ts +303 -0
  518. package/src/{schemas.test.ts → schemas/version-seam.test.ts} +4 -2
  519. package/src/schemas/vpn.ts +215 -0
  520. package/src/schemas/webext.ts +108 -0
  521. package/src/schemas/workflows.ts +413 -0
  522. package/src/schemas/workspace-repos.ts +123 -0
  523. package/src/schemas/workspace-search.ts +141 -0
  524. package/src/schemas/workspace-setup.ts +43 -0
  525. package/src/schemas/workspace-tree.ts +234 -0
  526. package/src/title.test.ts +1 -1
  527. package/src/tunnel-ids.test.ts +3 -1
  528. package/src/webext-links.ts +90 -0
  529. package/src/webext-protocol.ts +27 -0
  530. package/src/workflow-faults.test.ts +1 -1
  531. package/src/workflow-faults.ts +1 -1
  532. package/src/workspace-state.test.ts +6 -4
  533. package/src/workspace-state.ts +35 -50
  534. package/dist/schemas.d.ts +0 -9909
  535. package/dist/schemas.d.ts.map +0 -1
  536. package/dist/schemas.js +0 -4288
  537. package/dist/schemas.js.map +0 -1
  538. package/src/schemas.ts +0 -10090
@@ -0,0 +1,324 @@
1
+ // extensions: installed extension-kind capabilities resolved to their manifests
2
+ // extension updates: what the registry check found, and what the owner decided to do about such findings
3
+ import { z } from "zod";
4
+ import { ExtensionManifestSchema } from "@intentic/extension-manifest";
5
+ // What the web extension host boots from: each row is an extension capability whose checkout still parses,
6
+ // the approved manifest (contribution declarations), and the checked-out commit (the code identity; the bundle
7
+ // route's ETag). A rotted checkout is skipped here; its capability row still shows status.
8
+ // The routing handle: a git-installed extension uses its capability entry id; an image-baked one has no
9
+ // capability entry and is addressed by the manifest-derived publisher.name, hence the dot in the pattern.
10
+ const extensionId = z
11
+ .string()
12
+ .min(1)
13
+ .max(121)
14
+ .regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/);
15
+ // The owner's per-extension update posture. `updates` is the ladder: `notify` (badge and wait, the default),
16
+ // `agent` (the discovery also prepares an agent diff-read of the new sha), `auto` (apply unattended, but only
17
+ // a verified listing whose powers didn't grow, health-watched with auto-revert, anything less falls back to
18
+ // notify). `advisories` is separate because its safe direction is the opposite: disabling runs no new code, so
19
+ // `auto-disable` is the default and `notify` is the opt-out.
20
+ export const ExtensionUpdatePolicySchema = z.object({
21
+ updates: z.enum(["notify", "agent", "auto"]),
22
+ advisories: z.enum(["auto-disable", "notify"]),
23
+ });
24
+ export type ExtensionUpdatePolicy = z.infer<typeof ExtensionUpdatePolicySchema>;
25
+ // A newer sha the registry lists for an installed extension, the "update available" badge's substance. The
26
+ // pointer (url/path) rides along because updating follows the ROW as it stands now, not the install as it was.
27
+ export const ExtensionUpdateSchema = z.object({
28
+ ref: z.string().describe("The commit being offered."),
29
+ version: z.string().optional().describe("What it calls itself."),
30
+ url: z.string().describe("Where it comes from."),
31
+ path: z.string().optional().describe("Where inside that repository it lives."),
32
+ trust: z.enum(["verified", "listed"]).describe("Whether anybody vouched for it, or it is merely listed."),
33
+ // The listing says this release fixes a security problem in earlier ones, the badge goes loud, because
34
+ // here the OLD version is the dangerous one.
35
+ securityFix: z
36
+ .boolean()
37
+ .optional()
38
+ .describe("This release fixes a security problem in earlier ones, so here the old version is the dangerous one."),
39
+ registry: z.string().describe("Which registry said so."),
40
+ at: z.string().describe("When it was published."),
41
+ // Why the auto rung refused this one and fell back to notify ("powers grew", "not verified"), the card
42
+ // leads with it so the owner knows the click is theirs for a reason.
43
+ needsReview: z
44
+ .string()
45
+ .optional()
46
+ .describe(
47
+ "Why this one was not taken automatically and is asking for a person instead: it wants more than it used to, or nobody has vouched for it.",
48
+ ),
49
+ // The agent-prepared rung's work: the conversation where the owner's agent already read the diff between
50
+ // the installed sha and this one. The card links it instead of offering to start it.
51
+ review: z
52
+ .object({
53
+ conversationId: z.string().describe("Where to read what it found."),
54
+ at: z.string().describe("When it looked."),
55
+ })
56
+ .optional()
57
+ .describe(
58
+ "An agent has already read the difference between what is installed and this, so the card can link to what it found rather than offer to start looking.",
59
+ ),
60
+ });
61
+ export type ExtensionUpdate = z.infer<typeof ExtensionUpdateSchema>;
62
+ // The registry blocked this installed extension's listing. Delisting protects people browsing; this record is
63
+ // for the person already running it, the reason verbatim, and whether the daemon already pulled the switch.
64
+ export const ExtensionAdvisorySchema = z.object({
65
+ reason: z
66
+ .string()
67
+ .describe(
68
+ "Why the registry pulled the listing, in its own words. Delisting protects people browsing; this record is for the person already running it.",
69
+ ),
70
+ registry: z.string().describe("Which registry said so."),
71
+ at: z.string().describe("When."),
72
+ autoDisabled: z.boolean().describe("Whether the sandbox has already switched it off."),
73
+ });
74
+ export type ExtensionAdvisory = z.infer<typeof ExtensionAdvisorySchema>;
75
+ // The post-update watch: validation catches broken, not wrong, so for a minute after a swap the daemon checks
76
+ // that what the new version declared actually came up (autoStart processes running, backend activated).
77
+ // `fromRef` is the sha the kept-previous checkout holds, what a revert returns to.
78
+ export const ExtensionHealthSchema = z.object({
79
+ state: z
80
+ .enum(["watching", "healthy", "unhealthy"])
81
+ .describe("How it has behaved since the last update. Checks catch broken, not wrong, so for a while after a swap it is simply watched."),
82
+ detail: z.string().optional().describe("What is going wrong, when something is."),
83
+ fromRef: z.string().optional().describe("Which version it was updated from, which is what going back would return to."),
84
+ at: z.string().describe("When the watching started."),
85
+ // The auto rung's failure path already ran: the update was rolled back unattended, and the record stays to
86
+ // say so rather than pretending the attempt never happened.
87
+ autoReverted: z
88
+ .boolean()
89
+ .optional()
90
+ .describe("The update was already rolled back without anybody asking. The record stays rather than pretending the attempt never happened."),
91
+ });
92
+ export type ExtensionHealth = z.infer<typeof ExtensionHealthSchema>;
93
+ // The mechanical comparison of two manifests' declared reach (extension-manifest's diffPowers), plain
94
+ // sentences, so the update dialog renders exactly what approval is being asked to cover.
95
+ export const PowersDiffSchema = z.object({
96
+ added: z.array(z.string()).describe("What the new version asks for that the running one does not. The whole point of the comparison."),
97
+ removed: z.array(z.string()).describe("What it no longer asks for."),
98
+ unchanged: z.array(z.string()).describe("What stays the same."),
99
+ });
100
+ export type PowersDiff = z.infer<typeof PowersDiffSchema>;
101
+ // What an owner reads before clicking Update: the offered sha's manifest folded to the version story, the
102
+ // engines verdict, and the powers diff against the installed manifest. `ref` optional on the way in, absent
103
+ // means "the update the check recorded", which is the only caller most of the time.
104
+ export const ExtensionUpdateActionSchema = z.object({
105
+ id: extensionId.describe("Which extension."),
106
+ ref: z
107
+ .string()
108
+ .regex(/^[0-9a-f]{40}$/)
109
+ .optional()
110
+ .describe("Which commit, in full. Leave it out for whatever the last check found, which is what most callers mean."),
111
+ });
112
+ export const ExtensionUpdatePreviewSchema = z.object({
113
+ ref: z.string().describe("The commit this would install."),
114
+ version: z.string().describe("What that version calls itself."),
115
+ installedVersion: z.string().describe("What is running now."),
116
+ engines: z.string().describe("Which sandbox versions the new one says it needs."),
117
+ compatible: z.boolean().describe("Whether this sandbox is one of them."),
118
+ powers: PowersDiffSchema.describe(
119
+ "Exactly what the new code asks for that the running one does not. This is what approving an update is approving.",
120
+ ),
121
+ });
122
+ // `rebuildNeeded` (update only): the new version's environment fragment changed the composed overlay, so the
123
+ // card must say a one-time image rebuild is pending rather than let the update read as wholly landed.
124
+ export const ExtensionUpdateAppliedSchema = z.object({
125
+ ok: z.literal(true).describe("It went through."),
126
+ ref: z.string().describe("Which commit is now running."),
127
+ rebuildNeeded: z
128
+ .boolean()
129
+ .optional()
130
+ .describe(
131
+ "The new version changes what the sandbox image contains, so a one-time rebuild is still pending and the update is not wholly landed yet.",
132
+ ),
133
+ });
134
+ export const ExtensionUpdatePolicyInputSchema = z.object({
135
+ id: extensionId.describe("Which extension."),
136
+ updates: z
137
+ .enum(["notify", "agent", "auto"])
138
+ .optional()
139
+ .describe("What to do about a newer version: tell you, have an agent read the difference first, or just take it."),
140
+ advisories: z.enum(["auto-disable", "notify"]).optional().describe("What to do about a security warning: switch it off at once, or tell you."),
141
+ });
142
+ export const ExtensionUpdatesCheckedSchema = z.object({
143
+ ok: z.literal(true).describe("The check ran."),
144
+ checkedAt: z.string().describe("When, so a screen can date the answer."),
145
+ });
146
+ export const ExtensionSummarySchema = z.object({
147
+ id: extensionId.describe("The extension's id."),
148
+ manifest: ExtensionManifestSchema.describe("What it declares about itself: what it contributes, what it needs, and what it may reach."),
149
+ commit: z.string().describe("Exactly which commit is installed."),
150
+ /* Where the code comes from, which is also what the web varies per row: `builtin` (image-baked, no git
151
+ * checkout, not removable) hides the uninstall affordance, `installed` (a git capability) shows the pinned
152
+ * commit, `workspace` (a directory under .intentic/config/workspace-extensions/, created and edited in place,
153
+ * typically by an agent) is "uninstalled" by deleting its directory. */
154
+ source: z
155
+ .enum(["builtin", "installed", "workspace"])
156
+ .describe(
157
+ "Where the code comes from: baked into the sandbox image and not removable, installed from a repository at a pinned commit, or written in this workspace and edited in place.",
158
+ ),
159
+ // The owner's switch (.intentic/config/extension-enablement.json). A disabled extension is still listed, that's
160
+ // what makes it switchable back on, but the daemon wires none of its contributions up and the web host
161
+ // doesn't activate it.
162
+ enabled: z
163
+ .boolean()
164
+ .describe(
165
+ "The owner's switch. A switched-off extension is still listed, which is what makes it switchable back on, but nothing it contributes is wired up.",
166
+ ),
167
+ /* THE SWITCH IS FIXED ON, this extension is the only control surface for an engine the daemon runs
168
+ * regardless. The automations scheduler fires turns on a clock whether or not anything draws them, and
169
+ * hiding the one page that can see, stop or approve those fires would not stop the spend, it would only
170
+ * remove the owner's ability to notice it. So the daemon refuses the flip, and the tab draws the switch as
171
+ * fixed with this fact as the reason.
172
+ *
173
+ * Declared by the CORE about its own engines' surfaces, never by a manifest: a field an extension could set
174
+ * on itself would be a pack making itself un-removable, which is a self-granted privilege the approval flow
175
+ * exists to prevent. */
176
+ essential: z
177
+ .boolean()
178
+ .optional()
179
+ .describe(
180
+ "Its switch is fixed on, because it is the only way to see or stop an engine the sandbox runs regardless. Hiding that page would not stop the spending, only your ability to notice it. Declared by the core about its own surfaces, never by an extension about itself, which would be a pack making itself un-removable.",
181
+ ),
182
+ /* How much of the reach this extension asked for it has actually used, keyed by the DECLARED entry so a row
183
+ * joins straight onto `permissions.sandbox`. Absent for an extension that has never been observed calling
184
+ * anything, which is a different claim from "uses none of them" and has to stay tellable: a freshly installed
185
+ * extension has an empty ledger and an unexercised one does too, and reading either as "these permissions are
186
+ * unnecessary" would turn this from evidence into a guess with a number on it. */
187
+ usage: z
188
+ .record(
189
+ z.string(),
190
+ z.object({ calls: z.number().int().nonnegative().describe("How many times."), last: z.string().describe("When, most recently.") }),
191
+ )
192
+ .optional()
193
+ .describe(
194
+ "How much of the reach it asked for it has actually used, keyed by what it declared. Absent means never observed doing anything, which is a different claim from uses none of them, and the two have to stay tellable apart: reading either as these permissions are unnecessary turns evidence into a guess with a number on it.",
195
+ ),
196
+ /* The BACKEND half's state, present only for an extension whose manifest ships a `server` bundle: what the
197
+ * daemon's backend host reports for it (running / an activation error with its message), or what only the
198
+ * daemon can know (absent, the code is not in this image; incompatible, its engines exclude this daemon;
199
+ * starting/stopped, the host itself is between states). The tab renders it beside the row so a backend
200
+ * that failed to activate is a sentence, not a namespace that 404s. */
201
+ backend: z
202
+ .object({
203
+ state: z
204
+ .enum(["running", "error", "absent", "incompatible", "starting", "stopped"])
205
+ .describe(
206
+ "How its server half is doing. Absent means the code is not in this image at all; incompatible means it needs a different sandbox version.",
207
+ ),
208
+ detail: z
209
+ .string()
210
+ .optional()
211
+ .describe("What went wrong, so a backend that failed to start is a sentence rather than an address that answers nothing."),
212
+ })
213
+ .optional()
214
+ .describe("Present only for an extension that ships a server half."),
215
+ /* The update lifecycle, present only where it can exist, a git-installed extension. `update` is the badge,
216
+ * `advisory` the alarm, `health` the after-the-click watch, `previous` the way back (the kept one-back
217
+ * checkout's sha), `updatePolicy` the owner's standing answer. A builtin updates with the image and a
218
+ * workspace one is live-edited, so all five stay absent for them. */
219
+ update: ExtensionUpdateSchema.optional().describe(
220
+ "A newer version waiting. All five of these exist only for one installed from a repository: a built-in updates with the image and one written here is edited live.",
221
+ ),
222
+ advisory: ExtensionAdvisorySchema.optional().describe("A security warning about the installed version."),
223
+ health: ExtensionHealthSchema.optional().describe("How it has behaved since the last update, which is what decides whether that update sticks."),
224
+ previous: z
225
+ .object({
226
+ ref: z.string().describe("The commit that was running before."),
227
+ version: z.string().optional().describe("What it called itself."),
228
+ })
229
+ .optional()
230
+ .describe("The version kept one step back, which is what going back means."),
231
+ updatePolicy: ExtensionUpdatePolicySchema.optional().describe(
232
+ "The owner's standing answer for this one: tell me, have an agent look, or just do it.",
233
+ ),
234
+ });
235
+ export type ExtensionSummary = z.infer<typeof ExtensionSummarySchema>;
236
+ // A workspace-extension directory that failed to enumerate, and why. Its only feedback channel: there is no
237
+ // install moment to reject a bad manifest, so the parse failure (or id collision) rides the list instead of
238
+ // silently dropping the row, the Extensions tab renders it, and an authoring agent reads it off GET /extensions.
239
+ export const InvalidWorkspaceExtensionSchema = z.object({
240
+ dir: z.string().describe("Which folder."),
241
+ error: z.string().describe("Why it could not be read."),
242
+ });
243
+ export type InvalidWorkspaceExtension = z.infer<typeof InvalidWorkspaceExtensionSchema>;
244
+ export const ExtensionsListSchema = z.object({
245
+ extensions: z.array(ExtensionSummarySchema).describe("What is installed."),
246
+ invalid: z
247
+ .array(InvalidWorkspaceExtensionSchema)
248
+ .describe(
249
+ "Extensions written here that could not be read at all. Listed rather than dropped, because there is no install moment at which to reject a broken one, so this is its only way of saying anything.",
250
+ ),
251
+ // When the registry comparison last ran, absent until the first check completes. Serving it on the list is
252
+ // what lets the tab say "checked an hour ago" instead of presenting staleness as certainty.
253
+ updatesCheckedAt: z
254
+ .string()
255
+ .optional()
256
+ .describe(
257
+ "When updates were last looked for. Absent until the first check has run. Sent so a screen can say checked an hour ago rather than presenting staleness as certainty.",
258
+ ),
259
+ });
260
+ // The extension's contributes.settings values, persisted daemon-side (.intentic/config/extension-settings.json) keyed
261
+ // by the manifest-derived extension id, the checkout stays pristine, so a re-clone update never loses them.
262
+ // Secret-marked values are stripped from `settings`; `secretsSet` lists the secret keys that DO hold a value,
263
+ // so the UI renders "•••• (set)" without ever receiving the secret back.
264
+ export const ExtensionSettingsSchema = z.object({
265
+ settings: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).describe("The values, minus anything marked secret."),
266
+ secretsSet: z
267
+ .array(z.string())
268
+ .describe("Which of its secret settings actually hold a value. Names only: the values themselves never come back."),
269
+ });
270
+ export type ExtensionSettings = z.infer<typeof ExtensionSettingsSchema>;
271
+ export const ExtensionSettingsInputSchema = z.object({
272
+ id: z.string().describe("Which extension."),
273
+ settings: z
274
+ .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))
275
+ .describe("The values to write. A key the extension never declared is refused rather than quietly stored."),
276
+ });
277
+ // Flip one extension on or off. Persisted by publisher.name (like settings), so the choice outlives the
278
+ // checkout; the daemon's immediate half of the flip, declared processes, converges in the same handler.
279
+ export const ExtensionEnabledInputSchema = z.object({
280
+ id: z.string().describe("Which extension."),
281
+ enabled: z.boolean().describe("On or off."),
282
+ });
283
+ /* Create a workspace extension: the identity, and deliberately nothing else. What gets written is the daemon's
284
+ * decision, not a form the author fills in, the point of the action is that a running extension exists a second
285
+ * after it is asked for, and shaping it happens by editing the files it wrote (or by asking an agent to). The two
286
+ * slugs are the same shape the manifest schema demands, checked again here because `name` becomes a directory. */
287
+ export const WorkspaceExtensionCreateSchema = z.object({
288
+ publisher: z
289
+ .string()
290
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
291
+ .describe("Who it is by, which together with the name makes its id."),
292
+ name: z
293
+ .string()
294
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
295
+ .describe("What it is called."),
296
+ });
297
+ // Where it landed. `dir` is workspace-root-relative so the caller can name the files it should open next.
298
+ export const WorkspaceExtensionCreatedSchema = z.object({
299
+ id: z.string().describe("The id it was given."),
300
+ dir: z.string().describe("Where its files are, so you can open them."),
301
+ });
302
+ /* A batch of calls the host observed against this extension's declared routes, entry → how many since the last
303
+ * report. Counts rather than events, and declared entries rather than concrete paths, because the question the
304
+ * ledger answers is "is this permission earned?": a finer record would be a log of what the owner was doing,
305
+ * indexed by extension, which is not a thing this product should be accumulating to answer it. */
306
+ export const ExtensionUsageInputSchema = z.object({
307
+ id: z.string().describe("Which extension."),
308
+ used: z.record(z.string(), z.number().int().positive()).describe("Which of its declared powers it exercised, and how many times."),
309
+ });
310
+ // One declared background process (contributes.processes), status/start/stop, addressed by the capability
311
+ // entry id + the manifest's process name. Undeclared names are NOT_FOUND, the manifest-honesty rule again.
312
+ export const ExtensionProcessParamSchema = z.object({
313
+ id: z.string().describe("Which extension."),
314
+ name: z.string().describe("Which of its declared processes."),
315
+ });
316
+ export const ExtensionProcessStatusSchema = z.object({
317
+ name: z.string().describe("Which process."),
318
+ running: z.boolean().describe("Whether it is up. False with a port means it crashed and the supervisor is waiting to retry it."),
319
+ port: z.number().optional().describe("The port it was given."),
320
+ restarts: z.number().optional().describe("How many times it died and was brought back since it was started. A growing number is a service in trouble."),
321
+ lastExitCode: z.number().optional().describe("How it last exited, when it has crashed at least once."),
322
+ previewUrl: z.string().optional().describe("Where to open it, when it has an address."),
323
+ });
324
+ export type ExtensionProcessStatus = z.infer<typeof ExtensionProcessStatusSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ // What speed a turn is actually being served at. `cooldown` is its own state rather than a flavour of `off`
3
+ // because it is the only one that lifts by itself: fast mode draws on a rate-limit pool separate from the
4
+ // model's, and a turn that exhausts it drops to standard speed and stays there until the pool reopens. The
5
+ // distinction is what lets the client say "not right now" instead of "not available", which are different
6
+ // answers to "why am I not getting what I asked for". Mirrors the harness's own vocabulary (SDK: FastModeState).
7
+ export const FastModeStateSchema = z.enum(["off", "cooldown", "on"]);
8
+ export type FastModeState = z.infer<typeof FastModeStateSchema>;
@@ -0,0 +1,265 @@
1
+ // git history graph (the "Git Graph" view over a repo's real commits)
2
+ import { z } from "zod";
3
+ import { GitChangeSchema } from "./git.js";
4
+ import { RefNameSchema } from "./internal.js";
5
+ import { RepoParamSchema } from "./shared.js";
6
+ // A hex sha (full or git-abbreviated): the only shape the graph ever sends back, so the per-commit routes
7
+ // constrain to it rather than accepting an arbitrary git revision expression.
8
+ const ShaSchema = z.string().regex(/^[0-9a-f]{4,64}$/);
9
+ // One commit in the graph. `parents` (0 = root, 1 = normal, 2+ = merge) drive the lane layout, computed
10
+ // client-side. `refs` are the branch/tag decorations at this commit (tags keep their `tag: ` prefix; the bare
11
+ // "HEAD" marker is lifted into `head` instead). `at` is author time in ms since epoch; `short` is git's
12
+ // abbreviated sha; `body` is the message minus its subject line.
13
+ export const GitCommitSchema = z.object({
14
+ sha: z.string().describe("The commit, in full."),
15
+ short: z.string().describe("The abbreviated form, for showing."),
16
+ parents: z
17
+ .array(z.string())
18
+ .describe(
19
+ "What it came from. None means the first commit, one is ordinary, two or more is a merge, which is what a graph draws its lanes from.",
20
+ ),
21
+ subject: z.string().describe("Its first line."),
22
+ body: z.string().describe("Everything after that."),
23
+ author: z.string().describe("Who wrote it."),
24
+ email: z.string().describe("Their address."),
25
+ at: z.number().describe("When they wrote it, in milliseconds."),
26
+ refs: z.array(z.string()).describe("Branches and tags sitting on it."),
27
+ head: z.boolean().describe("Whether this is where the repository currently stands."),
28
+ });
29
+ export type GitCommit = z.infer<typeof GitCommitSchema>;
30
+ // One repo's log: commits newest-first across ALL refs (branch topology is the point of a graph), plus the
31
+ // checked-out branch (absent on a detached HEAD or an unborn repo).
32
+ export const GitLogSchema = z.object({
33
+ repo: z.string().describe("Which repository."),
34
+ branch: z.string().optional().describe("Which branch these are from."),
35
+ commits: z.array(GitCommitSchema).describe("The commits, newest first."),
36
+ // Whether a further page exists behind this one. The daemon learns it by asking git for one commit more than
37
+ // it returns, see commitLog. It is also what stops the oldest row of a page from being drawn as a ROOT
38
+ // commit, which is how a truncated history used to claim it began where the page happened to stop.
39
+ hasMore: z
40
+ .boolean()
41
+ .describe(
42
+ "There are older ones behind this page. It is also what stops the last row being drawn as the beginning of history, which is how a truncated log used to claim it started where the page happened to stop.",
43
+ ),
44
+ });
45
+ export type GitLog = z.infer<typeof GitLogSchema>;
46
+ export const GitLogQuerySchema = RepoParamSchema.extend({
47
+ limit: z.coerce.number().int().positive().max(2000).optional().describe("How many commits to return."),
48
+ // How many newer commits to step over, the page cursor. Paged rather than one big read because a large
49
+ // repository's log is tens of thousands of rows, and every one of them costs a zod validation, a wire
50
+ // payload and a lane computation before anything is drawn.
51
+ skip: z.coerce
52
+ .number()
53
+ .int()
54
+ .nonnegative()
55
+ .max(1_000_000)
56
+ .optional()
57
+ .describe(
58
+ "How many newer commits to step over, which is how you page further back. Paged rather than read whole, because a large repository's history is tens of thousands of rows.",
59
+ ),
60
+ });
61
+ // Every real git repo under /work as root-relative dir ids ("root" is implicit, the /work repo itself).
62
+ export const GitReposSchema = z.object({
63
+ repos: z.array(z.string()).describe('Every repository\'s id. The workspace itself is always present as "root".'),
64
+ });
65
+ export type GitRepos = z.infer<typeof GitReposSchema>;
66
+ /* WHERE EACH WORKSPACE REPO LIVES ONLINE, one entry per repo that has a parseable remote, as the host and the
67
+ * `owner/name` project it names. Separate from `repos` above rather than folded into it because that route is
68
+ * on the file tree's hot path and this costs a `git remote -v` per repo; a caller that wants to recognise a
69
+ * workspace repo in somebody else's list (the publisher claim does exactly that) asks for it deliberately.
70
+ *
71
+ * A repo with no remote, or one naming a local path, is absent rather than present-and-empty: "this repo is
72
+ * nowhere online" and "this repo is at X" are different answers and only one of them can be matched against. */
73
+ export const GitRemoteRepoSchema = z.object({
74
+ repo: z.string().describe("The workspace repository."),
75
+ host: z.string().describe("Which forge its remote points at."),
76
+ project: z.string().describe("Which project there, as owner and name."),
77
+ });
78
+ export type GitRemoteRepo = z.infer<typeof GitRemoteRepoSchema>;
79
+ export const GitRemoteReposSchema = z.object({
80
+ repos: z.array(GitRemoteRepoSchema).describe("Each repository matched to the project its remote points at."),
81
+ });
82
+ export type GitRemoteRepos = z.infer<typeof GitRemoteReposSchema>;
83
+ /* PUT ONE FILE ON THE DEFAULT BRANCH AND PUBLISH IT, write, commit that path alone, push, in one call.
84
+ *
85
+ * One route rather than three because the interesting states are the ones BETWEEN the steps: a file written but
86
+ * not committed, or committed but not pushed, is a repo the user now has to clean up by hand, and a browser
87
+ * making three requests owns that mess without being able to describe it. Here the caller gets one answer that
88
+ * says how far it got.
89
+ *
90
+ * `message` is the caller's because the commit shows up in the user's own history and a generic subject there
91
+ * is litter. */
92
+ export const GitPublishFileSchema = RepoParamSchema.extend({
93
+ path: z.string().min(1).describe("Which file, relative to the repository."),
94
+ content: z.string().describe("Its whole new contents."),
95
+ message: z.string().min(1).describe("The commit message."),
96
+ });
97
+ /* HOW FAR THE PUBLISH GOT, in the terms the screen has to explain it in. `ok` is "the file is on the default
98
+ * branch of the remote" and nothing less, the only state that makes a public read of it succeed.
99
+ *
100
+ * The three steps are reported SEPARATELY because every boundary between them is a state a user can be left
101
+ * in and would otherwise have to discover: a file written but not committed, a commit that exists locally but
102
+ * was refused by the remote for credentials. Each of those needs a different sentence and a different next
103
+ * move, and one `ok: false` cannot carry either. It is also what tells the daemon whether the worktree moved
104
+ * at all, which decides whether this counts as a user write on the timeline.
105
+ *
106
+ * `branch` and `defaultBranch` ride along so a refusal can name both sides of the mismatch rather than saying
107
+ * "wrong branch" at someone who cannot see which one they are on. */
108
+ export const GitPublishFileResultSchema = z.object({
109
+ ok: z.boolean().describe("Whether the whole thing went through."),
110
+ wrote: z.boolean().describe("The file was written."),
111
+ committed: z.boolean().describe("The commit was recorded."),
112
+ pushed: z.boolean().describe("It reached the remote."),
113
+ branch: z.string().optional().describe("Which branch it happened on."),
114
+ defaultBranch: z.string().optional().describe("Which branch the repository considers its main one, so a caller can see it was on a side branch."),
115
+ reason: z
116
+ .string()
117
+ .optional()
118
+ .describe(
119
+ "Why it stopped where it did. Being on a side branch, having no remote and having no credentials are all reported here rather than raised.",
120
+ ),
121
+ });
122
+ export type GitPublishFileResult = z.infer<typeof GitPublishFileResultSchema>;
123
+ export const GitCommitDiffQuerySchema = RepoParamSchema.extend({ sha: ShaSchema.describe("Which commit.") });
124
+ // A commit's changed files (vs its first parent; a root commit vs the empty tree), the graph's detail tree
125
+ // renders these (line stats included) and reuses the diff UI on click. Just GitChanges: the line stats live on
126
+ // GitChange now, so working-tree and commit files share one shape.
127
+ export const GitCommitDiffSchema = z.object({
128
+ files: z
129
+ .array(GitChangeSchema)
130
+ .describe(
131
+ "Which files it touched, with counts but not contents. Fetch any one file's contents separately, so a commit with a thousand files stays one cheap answer.",
132
+ ),
133
+ });
134
+ export type GitCommitDiff = z.infer<typeof GitCommitDiffSchema>;
135
+ export const GitCommitFileDiffQuerySchema = RepoParamSchema.extend({
136
+ sha: ShaSchema.describe("Which commit."),
137
+ path: z.string().min(1).describe("Which file in it."),
138
+ });
139
+ // Git write actions from the graph's commit context menu (VSCode "Git Graph" parity). Non-destructive: branch
140
+ // and tag just add a ref (HEAD + worktree untouched, no checkpoint). Sequence ops (revert / cherry-pick /
141
+ // merge / rebase / drop) add or replay commits and are auto-checkpointed daemon-side; a conflict aborts and
142
+ // reports `ok:false` (an expected outcome, not a throw). Checkout and reset move HEAD (reset --hard discards
143
+ // the worktree), also auto-checkpointed. A `{repo, sha}` names the target commit for every commit-scoped
144
+ // action; a ref name (branch/tag) is validated structurally, git enforces the rest of ref-name legality
145
+ // (RefNameSchema is declared above, with the branch schemas that first use it).
146
+ export const GitBranchCreateSchema = RepoParamSchema.extend({
147
+ sha: ShaSchema.describe("Which commit to start it at."),
148
+ name: RefNameSchema.describe("The new branch's name."),
149
+ });
150
+ export const GitTagCreateSchema = RepoParamSchema.extend({
151
+ sha: ShaSchema.describe("Which commit to tag."),
152
+ name: RefNameSchema.describe("The tag's name."),
153
+ });
154
+ export const GitCheckoutSchema = RepoParamSchema.extend({ ref: RefNameSchema.describe("Where to switch to: a branch, a tag, or a commit.") });
155
+ // Deleting a tag locally, and, when a remote is named, on that remote too. The remote half is best-effort: a
156
+ // tag that was never pushed must not make deleting the local one report a failure.
157
+ export const GitTagDeleteSchema = RepoParamSchema.extend({
158
+ name: RefNameSchema.describe("Which tag."),
159
+ remote: RefNameSchema.optional().describe("Also delete it there. Leave it out to remove it locally only."),
160
+ });
161
+ // Publishing ONE tag, named explicitly so it never drags every other unpushed tag along with it.
162
+ export const GitTagPushSchema = RepoParamSchema.extend({
163
+ name: RefNameSchema.describe("Which tag."),
164
+ remote: RefNameSchema.describe("Which remote to send it to."),
165
+ });
166
+ export const GitResetSchema = RepoParamSchema.extend({
167
+ sha: ShaSchema.describe("Which commit to move the branch to."),
168
+ mode: z
169
+ .enum(["soft", "mixed", "hard"])
170
+ .describe(
171
+ "How much to take with it: move the branch alone, also unstage, or also throw away what is on disk. The last one takes a checkpoint first.",
172
+ ),
173
+ });
174
+ export const GitCommitActionSchema = RepoParamSchema.extend({ sha: ShaSchema.describe("Which commit to act on.") });
175
+ export const GitActionResultSchema = z.object({
176
+ ok: z.boolean().describe("Whether it worked."),
177
+ reason: z
178
+ .string()
179
+ .optional()
180
+ .describe(
181
+ "Why not, in git's own words. A conflict, a missing remote and missing credentials are all reported here rather than raised, because they are things a screen has to render rather than breakages.",
182
+ ),
183
+ });
184
+ export type GitActionResult = z.infer<typeof GitActionResultSchema>;
185
+ /* THE STASH, work set aside without committing it, and the one part of a repository's real state the workspace
186
+ * used to be blind to entirely. A `git stash` in a terminal made the agent's (or the user's) work vanish from
187
+ * every surface here.
188
+ *
189
+ * An entry IS a commit: it has a sha, a time, a diff, and parents (HEAD when it was taken, the index, and the
190
+ * untracked tree when `-u` was used). What it does not have is a place in any branch's ancestry, so the graph
191
+ * hangs it off the commit it was taken on rather than flowing it down a lane.
192
+ *
193
+ * `ref` (`stash@{0}`) is the handle every verb takes, and it is POSITIONAL, dropping one renumbers the rest, so
194
+ * a caller must re-read the list after any mutation rather than holding an index across it. */
195
+ export const StashEntrySchema = z.object({
196
+ ref: z.string().describe("How to address it, which applying and dropping take."),
197
+ sha: z.string().describe("The commit behind it, because a stash entry is a commit."),
198
+ short: z.string().describe("The abbreviated form, for showing."),
199
+ // git's own `WIP on <branch>: …` scaffolding stripped, leaving what a reader would call the message.
200
+ subject: z.string().describe("What it was set aside as, with git's own scaffolding stripped off."),
201
+ branch: z.string().optional().describe("Which branch it was set aside from."),
202
+ at: z.number().describe("When, in milliseconds."),
203
+ parents: z.array(z.string()).describe("What it sits on, so a graph can draw it like any other commit."),
204
+ });
205
+ export type StashEntry = z.infer<typeof StashEntrySchema>;
206
+ export const StashListSchema = z.object({
207
+ repo: z.string().describe("Which repository."),
208
+ stashes: z.array(StashEntrySchema).describe("What is set aside, newest first."),
209
+ });
210
+ // A stash ref as git numbers them. Constrained rather than free text because it reaches a shell argument.
211
+ const StashRefSchema = z.string().regex(/^stash@\{\d{1,4}\}$/);
212
+ export const StashPushSchema = RepoParamSchema.extend({
213
+ message: z.string().max(500).optional().describe("What to call it, so you know what it was later."),
214
+ includeUntracked: z.boolean().optional().describe("Also set aside files git is not yet tracking, which are otherwise left where they are."),
215
+ });
216
+ // `pop` drops the entry on a clean apply; `apply` keeps it. Git's own distinction, and both are things people
217
+ // mean: pop is "resume this", apply is "try this here too".
218
+ export const StashApplySchema = RepoParamSchema.extend({
219
+ ref: StashRefSchema.describe("Which entry."),
220
+ pop: z.boolean().optional().describe("Remove it from the stash once it has been applied cleanly."),
221
+ });
222
+ export const StashRefParamSchema = RepoParamSchema.extend({ ref: StashRefSchema.describe("Which entry.") });
223
+ export const StashDiffQuerySchema = RepoParamSchema.extend({ ref: StashRefSchema.describe("Which entry.") });
224
+ /* THE LAST THING THAT MOVED THIS BRANCH, and whether it can be walked back.
225
+ *
226
+ * Complements the Checkpoints timeline rather than duplicating it: a checkpoint restores the WORKING TREE, this
227
+ * moves the BRANCH. After a bad rebase the files are often already right and only the ref is wrong, and
228
+ * restoring a whole worktree snapshot to fix that would drag every unrelated edit since back with it.
229
+ *
230
+ * `description` is git's own reflog subject, so the button can name what it will undo in git's words rather than
231
+ * a guess. `previousSha` is where the branch returns to, and it doubles as the CONCURRENCY TOKEN: the undo is
232
+ * refused when the repository has moved since this was read, so an undo prepared against a stale view cannot
233
+ * land somewhere the user never looked at. Absent = nothing to undo (a fresh branch, a detached HEAD, or a
234
+ * halted operation, which ends by aborting rather than by moving the branch). */
235
+ export const UndoKindSchema = z.enum(["commit", "amend", "merge", "rebase", "cherry-pick", "revert", "reset", "pull", "other"]);
236
+ export type UndoKind = z.infer<typeof UndoKindSchema>;
237
+ export const UndoableActionSchema = z.object({
238
+ kind: UndoKindSchema.describe("What the last action was."),
239
+ description: z.string().describe("What undoing it would do, in words."),
240
+ branch: z.string().describe("Which branch would move."),
241
+ sha: z.string().describe("Where it stands now."),
242
+ previousSha: z
243
+ .string()
244
+ .describe(
245
+ "Where it would go back to. Send this with the undo as proof you looked, so one prepared against a view that has since moved is refused rather than landing somewhere unexamined.",
246
+ ),
247
+ // The action rewrote FILES as well as the ref, so undoing it faithfully needs a hard reset. The UI uses this
248
+ // to decide whether it has to warn about losing work.
249
+ changesWorkingTree: z
250
+ .boolean()
251
+ .describe("Undoing would rewrite files as well as moving the branch, so anything offering it should warn about losing work."),
252
+ });
253
+ export type UndoableAction = z.infer<typeof UndoableActionSchema>;
254
+ export const GitUndoStateSchema = z.object({
255
+ repo: z.string().describe("Which repository."),
256
+ action: UndoableActionSchema.optional().describe("What undoing would reverse. Absent means there is nothing to go back from."),
257
+ });
258
+ export type GitUndoState = z.infer<typeof GitUndoStateSchema>;
259
+ // `previousSha` is the position the caller was shown; `discardChanges` picks a hard reset over a soft one.
260
+ export const GitUndoSchema = RepoParamSchema.extend({
261
+ previousSha: ShaSchema.describe(
262
+ "Where to go back to, from the matching read. It is also proof you looked: one prepared against a stale view is refused.",
263
+ ),
264
+ discardChanges: z.boolean().optional().describe("Also rewrite the files, rather than only moving the branch."),
265
+ });