@intentic/sandbox-contract 1.248.0 → 1.250.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 (879) hide show
  1. package/README.md +18 -15
  2. package/dist/chores/chores.d.ts.map +1 -1
  3. package/dist/chores/chores.js.map +1 -1
  4. package/dist/chores/digest.d.ts.map +1 -1
  5. package/dist/chores/digest.js.map +1 -1
  6. package/dist/chores/extension-update.d.ts.map +1 -1
  7. package/dist/chores/extension-update.js.map +1 -1
  8. package/dist/chores/fix-deps.d.ts.map +1 -1
  9. package/dist/chores/fix-deps.js.map +1 -1
  10. package/dist/chores/index.d.ts +2 -2
  11. package/dist/chores/index.d.ts.map +1 -1
  12. package/dist/chores/index.js +1 -1
  13. package/dist/chores/index.js.map +1 -1
  14. package/dist/chores/probes.d.ts.map +1 -1
  15. package/dist/chores/probes.js.map +1 -1
  16. package/dist/chores/prompt.d.ts.map +1 -1
  17. package/dist/chores/prompt.js.map +1 -1
  18. package/dist/chores/stack.d.ts.map +1 -1
  19. package/dist/chores/stack.js.map +1 -1
  20. package/dist/chores/verdict.d.ts +7 -1
  21. package/dist/chores/verdict.d.ts.map +1 -1
  22. package/dist/chores/verdict.js +8 -0
  23. package/dist/chores/verdict.js.map +1 -1
  24. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  25. package/dist/contracts/accounts.contract.js.map +1 -1
  26. package/dist/contracts/activity.contract.d.ts +1 -0
  27. package/dist/contracts/activity.contract.d.ts.map +1 -1
  28. package/dist/contracts/agent.contract.d.ts +12 -205
  29. package/dist/contracts/agent.contract.d.ts.map +1 -1
  30. package/dist/contracts/agent.contract.js +2 -1
  31. package/dist/contracts/agent.contract.js.map +1 -1
  32. package/dist/contracts/agents.contract.d.ts +228 -54
  33. package/dist/contracts/agents.contract.d.ts.map +1 -1
  34. package/dist/contracts/agents.contract.js +11 -2
  35. package/dist/contracts/agents.contract.js.map +1 -1
  36. package/dist/contracts/automations.contract.d.ts +35 -17
  37. package/dist/contracts/automations.contract.d.ts.map +1 -1
  38. package/dist/contracts/automations.contract.js +10 -1
  39. package/dist/contracts/automations.contract.js.map +1 -1
  40. package/dist/contracts/capabilities.contract.d.ts +0 -12
  41. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  42. package/dist/contracts/capabilities.contract.js +1 -1
  43. package/dist/contracts/capabilities.contract.js.map +1 -1
  44. package/dist/contracts/chores.contract.d.ts.map +1 -1
  45. package/dist/contracts/chores.contract.js.map +1 -1
  46. package/dist/contracts/ci.contract.d.ts +9 -0
  47. package/dist/contracts/ci.contract.d.ts.map +1 -1
  48. package/dist/contracts/endpoints.contract.d.ts.map +1 -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 +1 -1
  52. package/dist/contracts/exit.contract.js.map +1 -1
  53. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  54. package/dist/contracts/extensions.contract.js.map +1 -1
  55. package/dist/contracts/git.contract.d.ts +45 -6
  56. package/dist/contracts/git.contract.d.ts.map +1 -1
  57. package/dist/contracts/git.contract.js +9 -9
  58. package/dist/contracts/git.contract.js.map +1 -1
  59. package/dist/contracts/host.contract.d.ts +2 -0
  60. package/dist/contracts/host.contract.d.ts.map +1 -1
  61. package/dist/contracts/host.contract.js.map +1 -1
  62. package/dist/contracts/intentic.contract.js +1 -1
  63. package/dist/contracts/intentic.contract.js.map +1 -1
  64. package/dist/contracts/logs.contract.d.ts.map +1 -1
  65. package/dist/contracts/logs.contract.js.map +1 -1
  66. package/dist/contracts/loops.contract.d.ts.map +1 -1
  67. package/dist/contracts/loops.contract.js.map +1 -1
  68. package/dist/contracts/personas.contract.d.ts +1 -0
  69. package/dist/contracts/personas.contract.d.ts.map +1 -1
  70. package/dist/contracts/personas.contract.js +1 -1
  71. package/dist/contracts/personas.contract.js.map +1 -1
  72. package/dist/contracts/providers.contract.d.ts.map +1 -1
  73. package/dist/contracts/providers.contract.js.map +1 -1
  74. package/dist/contracts/runner.contract.d.ts +97 -171
  75. package/dist/contracts/runner.contract.d.ts.map +1 -1
  76. package/dist/contracts/runner.contract.js +2 -2
  77. package/dist/contracts/runner.contract.js.map +1 -1
  78. package/dist/contracts/safety.contract.d.ts.map +1 -1
  79. package/dist/contracts/safety.contract.js +1 -1
  80. package/dist/contracts/safety.contract.js.map +1 -1
  81. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  82. package/dist/contracts/secrets.contract.js.map +1 -1
  83. package/dist/contracts/sessions.contract.d.ts +2 -41
  84. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  85. package/dist/contracts/sessions.contract.js +1 -1
  86. package/dist/contracts/sessions.contract.js.map +1 -1
  87. package/dist/contracts/settings.contract.d.ts +8 -18
  88. package/dist/contracts/settings.contract.d.ts.map +1 -1
  89. package/dist/contracts/settings.contract.js.map +1 -1
  90. package/dist/contracts/share.contract.d.ts.map +1 -1
  91. package/dist/contracts/share.contract.js.map +1 -1
  92. package/dist/contracts/skills.contract.d.ts +6 -0
  93. package/dist/contracts/skills.contract.d.ts.map +1 -1
  94. package/dist/contracts/skills.contract.js +13 -4
  95. package/dist/contracts/skills.contract.js.map +1 -1
  96. package/dist/contracts/system.contract.d.ts +49 -73
  97. package/dist/contracts/system.contract.d.ts.map +1 -1
  98. package/dist/contracts/system.contract.js +12 -2
  99. package/dist/contracts/system.contract.js.map +1 -1
  100. package/dist/contracts/usage.contract.d.ts.map +1 -1
  101. package/dist/contracts/usage.contract.js.map +1 -1
  102. package/dist/contracts/vpn.contract.d.ts.map +1 -1
  103. package/dist/contracts/vpn.contract.js +1 -1
  104. package/dist/contracts/vpn.contract.js.map +1 -1
  105. package/dist/contracts/webext.contract.d.ts.map +1 -1
  106. package/dist/contracts/webext.contract.js.map +1 -1
  107. package/dist/contracts/workflows.contract.d.ts +7 -6
  108. package/dist/contracts/workflows.contract.d.ts.map +1 -1
  109. package/dist/contracts/workflows.contract.js +12 -3
  110. package/dist/contracts/workflows.contract.js.map +1 -1
  111. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  112. package/dist/contracts/workspace.contract.js.map +1 -1
  113. package/dist/events/agent-events.d.ts +1237 -0
  114. package/dist/events/agent-events.d.ts.map +1 -0
  115. package/dist/events/agent-events.js +226 -0
  116. package/dist/events/agent-events.js.map +1 -0
  117. package/dist/events/cards.d.ts +404 -0
  118. package/dist/events/cards.d.ts.map +1 -0
  119. package/dist/events/cards.js +179 -0
  120. package/dist/events/cards.js.map +1 -0
  121. package/dist/events/resume.d.ts +23 -0
  122. package/dist/events/resume.d.ts.map +1 -0
  123. package/dist/events/resume.js +31 -0
  124. package/dist/events/resume.js.map +1 -0
  125. package/dist/events/system-events.d.ts +615 -0
  126. package/dist/events/system-events.d.ts.map +1 -0
  127. package/dist/events/system-events.js +64 -0
  128. package/dist/events/system-events.js.map +1 -0
  129. package/dist/events/transcript.d.ts +1755 -0
  130. package/dist/events/transcript.d.ts.map +1 -0
  131. package/dist/events/transcript.js +205 -0
  132. package/dist/events/transcript.js.map +1 -0
  133. package/dist/ids/conversation-ids.d.ts +8 -0
  134. package/dist/ids/conversation-ids.d.ts.map +1 -0
  135. package/dist/{conversation-ids.js → ids/conversation-ids.js} +13 -0
  136. package/dist/ids/conversation-ids.js.map +1 -0
  137. package/dist/ids/hostnames.d.ts.map +1 -0
  138. package/dist/ids/hostnames.js.map +1 -0
  139. package/dist/ids/session-names.d.ts.map +1 -0
  140. package/dist/ids/session-names.js.map +1 -0
  141. package/dist/ids/share-paths.d.ts.map +1 -0
  142. package/dist/ids/share-paths.js.map +1 -0
  143. package/dist/{tunnel-ids.d.ts → ids/tunnel-ids.d.ts} +1 -0
  144. package/dist/ids/tunnel-ids.d.ts.map +1 -0
  145. package/dist/{tunnel-ids.js → ids/tunnel-ids.js} +1 -0
  146. package/dist/ids/tunnel-ids.js.map +1 -0
  147. package/dist/index.d.ts +429 -450
  148. package/dist/index.d.ts.map +1 -1
  149. package/dist/index.js +54 -46
  150. package/dist/index.js.map +1 -1
  151. package/dist/{agent-catalog.d.ts → models/agent-catalog.d.ts} +2 -2
  152. package/dist/models/agent-catalog.d.ts.map +1 -0
  153. package/dist/models/agent-catalog.js.map +1 -0
  154. package/dist/models/agent-runtimes.d.ts.map +1 -0
  155. package/dist/models/agent-runtimes.js.map +1 -0
  156. package/dist/{fast-tier.d.ts → models/fast-tier.d.ts} +1 -1
  157. package/dist/models/fast-tier.d.ts.map +1 -0
  158. package/dist/models/fast-tier.js.map +1 -0
  159. package/dist/models/model-order.d.ts.map +1 -0
  160. package/dist/{model-order.js → models/model-order.js} +2 -0
  161. package/dist/models/model-order.js.map +1 -0
  162. package/dist/{model-pins.d.ts → models/model-pins.d.ts} +1 -1
  163. package/dist/models/model-pins.d.ts.map +1 -0
  164. package/dist/models/model-pins.js.map +1 -0
  165. package/dist/{model-roles.d.ts → models/model-roles.d.ts} +0 -33
  166. package/dist/models/model-roles.d.ts.map +1 -0
  167. package/dist/{model-roles.js → models/model-roles.js} +0 -35
  168. package/dist/models/model-roles.js.map +1 -0
  169. package/dist/{plan-pools.d.ts → models/plan-pools.d.ts} +1 -1
  170. package/dist/models/plan-pools.d.ts.map +1 -0
  171. package/dist/models/plan-pools.js.map +1 -0
  172. package/dist/models/prompt-complexity.d.ts.map +1 -0
  173. package/dist/models/prompt-complexity.js.map +1 -0
  174. package/dist/models/provider-specs.d.ts.map +1 -0
  175. package/dist/models/provider-specs.js.map +1 -0
  176. package/dist/policy/approvals-execution.d.ts.map +1 -0
  177. package/dist/policy/approvals-execution.js.map +1 -0
  178. package/dist/{batch-runs.d.ts → policy/batch-runs.d.ts} +5 -1
  179. package/dist/policy/batch-runs.d.ts.map +1 -0
  180. package/dist/{batch-runs.js → policy/batch-runs.js} +10 -7
  181. package/dist/policy/batch-runs.js.map +1 -0
  182. package/dist/policy/capability-env.d.ts.map +1 -0
  183. package/dist/policy/capability-env.js.map +1 -0
  184. package/dist/policy/capability-secrets.d.ts.map +1 -0
  185. package/dist/policy/capability-secrets.js.map +1 -0
  186. package/dist/{card-status.d.ts → policy/card-status.d.ts} +2 -2
  187. package/dist/policy/card-status.d.ts.map +1 -0
  188. package/dist/{card-status.js → policy/card-status.js} +1 -5
  189. package/dist/policy/card-status.js.map +1 -0
  190. package/dist/{command-classes.d.ts → policy/command-classes.d.ts} +6 -2
  191. package/dist/policy/command-classes.d.ts.map +1 -0
  192. package/dist/{command-classes.js → policy/command-classes.js} +48 -11
  193. package/dist/policy/command-classes.js.map +1 -0
  194. package/dist/{command-run.d.ts → policy/command-run.d.ts} +1 -1
  195. package/dist/policy/command-run.d.ts.map +1 -0
  196. package/dist/policy/command-run.js.map +1 -0
  197. package/dist/policy/control-scopes.d.ts +16 -0
  198. package/dist/policy/control-scopes.d.ts.map +1 -0
  199. package/dist/policy/control-scopes.js +26 -0
  200. package/dist/policy/control-scopes.js.map +1 -0
  201. package/dist/policy/credential-material.d.ts.map +1 -0
  202. package/dist/policy/credential-material.js.map +1 -0
  203. package/dist/policy/needs-action.d.ts.map +1 -0
  204. package/dist/policy/needs-action.js.map +1 -0
  205. package/dist/policy/output-fields.d.ts.map +1 -0
  206. package/dist/policy/output-fields.js.map +1 -0
  207. package/dist/policy/overlay-lint.d.ts.map +1 -0
  208. package/dist/policy/overlay-lint.js.map +1 -0
  209. package/dist/policy/owner-ticket.d.ts.map +1 -0
  210. package/dist/{owner-ticket.js → policy/owner-ticket.js} +1 -1
  211. package/dist/policy/owner-ticket.js.map +1 -0
  212. package/dist/{safety-policy.d.ts → policy/safety-policy.d.ts} +6 -5
  213. package/dist/policy/safety-policy.d.ts.map +1 -0
  214. package/dist/{safety-policy.js → policy/safety-policy.js} +12 -12
  215. package/dist/policy/safety-policy.js.map +1 -0
  216. package/dist/policy/search-globs.d.ts.map +1 -0
  217. package/dist/policy/search-globs.js.map +1 -0
  218. package/dist/protocol/container-requirements.d.ts +20 -0
  219. package/dist/protocol/container-requirements.d.ts.map +1 -0
  220. package/dist/protocol/container-requirements.js +23 -0
  221. package/dist/protocol/container-requirements.js.map +1 -0
  222. package/dist/{host-protocol.d.ts → protocol/host-protocol.d.ts} +1 -0
  223. package/dist/protocol/host-protocol.d.ts.map +1 -0
  224. package/dist/{host-protocol.js → protocol/host-protocol.js} +1 -0
  225. package/dist/protocol/host-protocol.js.map +1 -0
  226. package/dist/protocol/ingress-contract.d.ts.map +1 -0
  227. package/dist/{ingress-contract.js → protocol/ingress-contract.js} +1 -1
  228. package/dist/protocol/ingress-contract.js.map +1 -0
  229. package/dist/protocol/ingress-protocol.d.ts.map +1 -0
  230. package/dist/protocol/ingress-protocol.js.map +1 -0
  231. package/dist/protocol/listener-protocol.d.ts.map +1 -0
  232. package/dist/{listener-protocol.js → protocol/listener-protocol.js} +1 -1
  233. package/dist/protocol/listener-protocol.js.map +1 -0
  234. package/dist/{peer-dial.d.ts → protocol/peer-dial.d.ts} +4 -1
  235. package/dist/protocol/peer-dial.d.ts.map +1 -0
  236. package/dist/{peer-dial.js → protocol/peer-dial.js} +51 -10
  237. package/dist/protocol/peer-dial.js.map +1 -0
  238. package/dist/protocol/peer-mcp-server.d.ts.map +1 -0
  239. package/dist/protocol/peer-mcp-server.js.map +1 -0
  240. package/dist/protocol/request-id.d.ts.map +1 -0
  241. package/dist/protocol/request-id.js.map +1 -0
  242. package/dist/protocol/routes.d.ts.map +1 -0
  243. package/dist/protocol/routes.js.map +1 -0
  244. package/dist/{runner-protocol.d.ts → protocol/runner-protocol.d.ts} +1 -0
  245. package/dist/protocol/runner-protocol.d.ts.map +1 -0
  246. package/dist/{runner-protocol.js → protocol/runner-protocol.js} +2 -1
  247. package/dist/protocol/runner-protocol.js.map +1 -0
  248. package/dist/protocol/sse.d.ts.map +1 -0
  249. package/dist/protocol/sse.js.map +1 -0
  250. package/dist/{terminal-protocol.d.ts → protocol/terminal-protocol.d.ts} +1 -3
  251. package/dist/protocol/terminal-protocol.d.ts.map +1 -0
  252. package/dist/protocol/terminal-protocol.js.map +1 -0
  253. package/dist/protocol/webext-links.d.ts.map +1 -0
  254. package/dist/protocol/webext-links.js.map +1 -0
  255. package/dist/{webext-protocol.d.ts → protocol/webext-protocol.d.ts} +1 -0
  256. package/dist/protocol/webext-protocol.d.ts.map +1 -0
  257. package/dist/{webext-protocol.js → protocol/webext-protocol.js} +1 -0
  258. package/dist/protocol/webext-protocol.js.map +1 -0
  259. package/dist/schemas/activity.d.ts +2 -0
  260. package/dist/schemas/activity.d.ts.map +1 -1
  261. package/dist/schemas/activity.js +4 -0
  262. package/dist/schemas/activity.js.map +1 -1
  263. package/dist/schemas/agent.d.ts +16 -4
  264. package/dist/schemas/agent.d.ts.map +1 -1
  265. package/dist/schemas/agent.js +21 -4
  266. package/dist/schemas/agent.js.map +1 -1
  267. package/dist/schemas/agents.d.ts +17 -4
  268. package/dist/schemas/agents.d.ts.map +1 -1
  269. package/dist/schemas/agents.js +15 -4
  270. package/dist/schemas/agents.js.map +1 -1
  271. package/dist/schemas/approvals.d.ts.map +1 -1
  272. package/dist/schemas/approvals.js.map +1 -1
  273. package/dist/schemas/automations.d.ts +54 -28
  274. package/dist/schemas/automations.d.ts.map +1 -1
  275. package/dist/schemas/automations.js +26 -8
  276. package/dist/schemas/automations.js.map +1 -1
  277. package/dist/schemas/capabilities.d.ts +0 -8
  278. package/dist/schemas/capabilities.d.ts.map +1 -1
  279. package/dist/schemas/capabilities.js +0 -4
  280. package/dist/schemas/capabilities.js.map +1 -1
  281. package/dist/schemas/ci.d.ts +10 -0
  282. package/dist/schemas/ci.d.ts.map +1 -1
  283. package/dist/schemas/ci.js +9 -1
  284. package/dist/schemas/ci.js.map +1 -1
  285. package/dist/schemas/codebase-health.d.ts.map +1 -1
  286. package/dist/schemas/codebase-health.js.map +1 -1
  287. package/dist/schemas/devices.d.ts +92 -0
  288. package/dist/schemas/devices.d.ts.map +1 -1
  289. package/dist/schemas/devices.js +12 -1
  290. package/dist/schemas/devices.js.map +1 -1
  291. package/dist/schemas/engines.d.ts.map +1 -1
  292. package/dist/schemas/engines.js.map +1 -1
  293. package/dist/schemas/environment.d.ts.map +1 -1
  294. package/dist/schemas/environment.js.map +1 -1
  295. package/dist/schemas/exit.d.ts.map +1 -1
  296. package/dist/schemas/exit.js.map +1 -1
  297. package/dist/schemas/extension-updates.d.ts.map +1 -1
  298. package/dist/schemas/extension-updates.js.map +1 -1
  299. package/dist/schemas/git-history.d.ts.map +1 -1
  300. package/dist/schemas/git-history.js.map +1 -1
  301. package/dist/schemas/git.d.ts +80 -16
  302. package/dist/schemas/git.d.ts.map +1 -1
  303. package/dist/schemas/git.js +37 -25
  304. package/dist/schemas/git.js.map +1 -1
  305. package/dist/schemas/history.d.ts.map +1 -1
  306. package/dist/schemas/history.js.map +1 -1
  307. package/dist/schemas/hosts.d.ts.map +1 -1
  308. package/dist/schemas/hosts.js.map +1 -1
  309. package/dist/schemas/inventory.d.ts.map +1 -1
  310. package/dist/schemas/inventory.js.map +1 -1
  311. package/dist/schemas/issues.d.ts +0 -1
  312. package/dist/schemas/issues.d.ts.map +1 -1
  313. package/dist/schemas/issues.js +0 -1
  314. package/dist/schemas/issues.js.map +1 -1
  315. package/dist/schemas/logs.d.ts.map +1 -1
  316. package/dist/schemas/logs.js.map +1 -1
  317. package/dist/schemas/loops.d.ts.map +1 -1
  318. package/dist/schemas/loops.js +1 -1
  319. package/dist/schemas/loops.js.map +1 -1
  320. package/dist/schemas/maintenance.d.ts.map +1 -1
  321. package/dist/schemas/maintenance.js.map +1 -1
  322. package/dist/schemas/marketplace.d.ts +0 -4
  323. package/dist/schemas/marketplace.d.ts.map +1 -1
  324. package/dist/schemas/panels.d.ts.map +1 -1
  325. package/dist/schemas/panels.js.map +1 -1
  326. package/dist/schemas/personas.d.ts +2 -1
  327. package/dist/schemas/personas.d.ts.map +1 -1
  328. package/dist/schemas/personas.js +6 -2
  329. package/dist/schemas/personas.js.map +1 -1
  330. package/dist/schemas/plan-limits.d.ts +2 -4
  331. package/dist/schemas/plan-limits.d.ts.map +1 -1
  332. package/dist/schemas/plan-limits.js +5 -8
  333. package/dist/schemas/plan-limits.js.map +1 -1
  334. package/dist/schemas/ports.d.ts.map +1 -1
  335. package/dist/schemas/ports.js.map +1 -1
  336. package/dist/schemas/provider-oauth.d.ts.map +1 -1
  337. package/dist/schemas/provider-oauth.js.map +1 -1
  338. package/dist/schemas/provider-subscriptions.d.ts +1 -1
  339. package/dist/schemas/provider-subscriptions.d.ts.map +1 -1
  340. package/dist/schemas/provider-subscriptions.js +1 -1
  341. package/dist/schemas/provider-subscriptions.js.map +1 -1
  342. package/dist/schemas/public.d.ts.map +1 -1
  343. package/dist/schemas/public.js.map +1 -1
  344. package/dist/schemas/push.d.ts.map +1 -1
  345. package/dist/schemas/push.js.map +1 -1
  346. package/dist/schemas/secrets.d.ts.map +1 -1
  347. package/dist/schemas/secrets.js.map +1 -1
  348. package/dist/schemas/settings.d.ts +11 -9
  349. package/dist/schemas/settings.d.ts.map +1 -1
  350. package/dist/schemas/settings.js +22 -7
  351. package/dist/schemas/settings.js.map +1 -1
  352. package/dist/schemas/share.d.ts.map +1 -1
  353. package/dist/schemas/share.js.map +1 -1
  354. package/dist/schemas/shared.d.ts +4 -0
  355. package/dist/schemas/shared.d.ts.map +1 -1
  356. package/dist/schemas/shared.js +3 -0
  357. package/dist/schemas/shared.js.map +1 -1
  358. package/dist/schemas/system.d.ts +6 -0
  359. package/dist/schemas/system.d.ts.map +1 -1
  360. package/dist/schemas/system.js +10 -0
  361. package/dist/schemas/system.js.map +1 -1
  362. package/dist/schemas/terminal.d.ts.map +1 -1
  363. package/dist/schemas/terminal.js.map +1 -1
  364. package/dist/schemas/usage.d.ts.map +1 -1
  365. package/dist/schemas/usage.js.map +1 -1
  366. package/dist/schemas/vpn.d.ts.map +1 -1
  367. package/dist/schemas/vpn.js.map +1 -1
  368. package/dist/schemas/webext.d.ts.map +1 -1
  369. package/dist/schemas/webext.js.map +1 -1
  370. package/dist/schemas/workflows.d.ts +66 -9
  371. package/dist/schemas/workflows.d.ts.map +1 -1
  372. package/dist/schemas/workflows.js +6 -5
  373. package/dist/schemas/workflows.js.map +1 -1
  374. package/dist/schemas/workspace-repos.d.ts.map +1 -1
  375. package/dist/schemas/workspace-repos.js.map +1 -1
  376. package/dist/schemas/workspace-search.d.ts.map +1 -1
  377. package/dist/schemas/workspace-search.js.map +1 -1
  378. package/dist/schemas/workspace-setup.d.ts.map +1 -1
  379. package/dist/schemas/workspace-setup.js.map +1 -1
  380. package/dist/schemas/workspace-tree.d.ts.map +1 -1
  381. package/dist/schemas/workspace-tree.js.map +1 -1
  382. package/dist/state/arrival.d.ts.map +1 -0
  383. package/dist/{arrival.js → state/arrival.js} +1 -1
  384. package/dist/state/arrival.js.map +1 -0
  385. package/dist/state/contract-lock.d.ts.map +1 -0
  386. package/dist/{contract-lock.js → state/contract-lock.js} +1 -1
  387. package/dist/state/contract-lock.js.map +1 -0
  388. package/dist/{definition.d.ts → state/definition.d.ts} +21 -17
  389. package/dist/state/definition.d.ts.map +1 -0
  390. package/dist/{definition.js → state/definition.js} +4 -4
  391. package/dist/state/definition.js.map +1 -0
  392. package/dist/state/history-state.d.ts.map +1 -0
  393. package/dist/{history-state.js → state/history-state.js} +1 -0
  394. package/dist/state/history-state.js.map +1 -0
  395. package/dist/state/runtime-state.d.ts.map +1 -0
  396. package/dist/state/runtime-state.js.map +1 -0
  397. package/dist/state/starter.d.ts.map +1 -0
  398. package/dist/state/starter.js.map +1 -0
  399. package/dist/state/state-portability.d.ts.map +1 -0
  400. package/dist/state/state-portability.js.map +1 -0
  401. package/dist/state/versions.d.ts.map +1 -0
  402. package/dist/state/versions.js.map +1 -0
  403. package/dist/{workspace-state.d.ts → state/workspace-state.d.ts} +8 -0
  404. package/dist/state/workspace-state.d.ts.map +1 -0
  405. package/dist/{workspace-state.js → state/workspace-state.js} +25 -0
  406. package/dist/state/workspace-state.js.map +1 -0
  407. package/dist/{documents.d.ts → text/documents.d.ts} +1 -1
  408. package/dist/text/documents.d.ts.map +1 -0
  409. package/dist/{documents.js → text/documents.js} +1 -1
  410. package/dist/text/documents.js.map +1 -0
  411. package/dist/text/embed.d.ts.map +1 -0
  412. package/dist/text/embed.js.map +1 -0
  413. package/dist/text/mentions.d.ts.map +1 -0
  414. package/dist/text/mentions.js.map +1 -0
  415. package/dist/text/model-answer.d.ts +3 -0
  416. package/dist/text/model-answer.d.ts.map +1 -0
  417. package/dist/text/model-answer.js +3 -0
  418. package/dist/text/model-answer.js.map +1 -0
  419. package/dist/text/path-refs.d.ts.map +1 -0
  420. package/dist/text/path-refs.js.map +1 -0
  421. package/dist/{shell-regions.d.ts → text/shell-regions.d.ts} +1 -1
  422. package/dist/text/shell-regions.d.ts.map +1 -0
  423. package/dist/text/shell-regions.js.map +1 -0
  424. package/dist/text/title.d.ts.map +1 -0
  425. package/dist/text/title.js.map +1 -0
  426. package/dist/{transcript-fold.d.ts → text/transcript-fold.d.ts} +2 -1
  427. package/dist/text/transcript-fold.d.ts.map +1 -0
  428. package/dist/{transcript-fold.js → text/transcript-fold.js} +2 -16
  429. package/dist/text/transcript-fold.js.map +1 -0
  430. package/dist/text/whisper.d.ts +3 -0
  431. package/dist/text/whisper.d.ts.map +1 -0
  432. package/dist/text/whisper.js +11 -0
  433. package/dist/text/whisper.js.map +1 -0
  434. package/dist/{workflow-faults.d.ts → text/workflow-faults.d.ts} +1 -1
  435. package/dist/text/workflow-faults.d.ts.map +1 -0
  436. package/dist/{workflow-faults.js → text/workflow-faults.js} +1 -1
  437. package/dist/text/workflow-faults.js.map +1 -0
  438. package/package.json +70 -70
  439. package/src/chores/chores.test.ts +4 -10
  440. package/src/chores/chores.ts +148 -392
  441. package/src/chores/digest.ts +8 -28
  442. package/src/chores/extension-update.ts +3 -8
  443. package/src/chores/fix-deps.ts +4 -18
  444. package/src/chores/index.ts +2 -2
  445. package/src/chores/probes.test.ts +7 -43
  446. package/src/chores/probes.ts +62 -167
  447. package/src/chores/prompt.ts +10 -34
  448. package/src/chores/stack.test.ts +6 -45
  449. package/src/chores/stack.ts +27 -118
  450. package/src/chores/verdict.test.ts +101 -80
  451. package/src/chores/verdict.ts +54 -99
  452. package/src/contracts/accounts.contract.ts +4 -19
  453. package/src/contracts/agent.contract.ts +7 -22
  454. package/src/contracts/agents.contract.ts +25 -71
  455. package/src/contracts/automations.contract.ts +14 -30
  456. package/src/contracts/capabilities.contract.ts +8 -35
  457. package/src/contracts/chores.contract.ts +4 -15
  458. package/src/contracts/endpoints.contract.ts +5 -22
  459. package/src/contracts/exit.contract.ts +7 -30
  460. package/src/contracts/extensions.contract.ts +8 -30
  461. package/src/contracts/git.contract.ts +25 -49
  462. package/src/contracts/host.contract.ts +9 -44
  463. package/src/contracts/intentic.contract.ts +1 -1
  464. package/src/contracts/logs.contract.ts +3 -13
  465. package/src/contracts/loops.contract.ts +9 -40
  466. package/src/contracts/personas.contract.ts +10 -35
  467. package/src/contracts/providers.contract.ts +4 -17
  468. package/src/contracts/runner.contract.ts +12 -39
  469. package/src/contracts/safety.contract.ts +5 -14
  470. package/src/contracts/secrets.contract.ts +4 -22
  471. package/src/contracts/sessions.contract.ts +1 -1
  472. package/src/contracts/settings.contract.ts +4 -10
  473. package/src/contracts/share.contract.ts +3 -9
  474. package/src/contracts/skills.contract.ts +21 -19
  475. package/src/contracts/system.contract.ts +26 -52
  476. package/src/contracts/usage.contract.ts +7 -21
  477. package/src/contracts/vpn.contract.ts +9 -16
  478. package/src/contracts/webext.contract.ts +9 -25
  479. package/src/contracts/workflows.contract.ts +34 -58
  480. package/src/contracts/workspace.contract.ts +19 -50
  481. package/src/events/agent-events.ts +345 -0
  482. package/src/events/cards.ts +286 -0
  483. package/src/{events.test.ts → events/resume.test.ts} +4 -19
  484. package/src/events/resume.ts +60 -0
  485. package/src/events/system-events.ts +139 -0
  486. package/src/events/transcript.ts +320 -0
  487. package/src/{conversation-ids.test.ts → ids/conversation-ids.test.ts} +25 -13
  488. package/src/ids/conversation-ids.ts +178 -0
  489. package/src/ids/hostnames.ts +129 -0
  490. package/src/ids/session-names.ts +29 -0
  491. package/src/ids/share-paths.ts +43 -0
  492. package/src/{tunnel-ids.test.ts → ids/tunnel-ids.test.ts} +1 -14
  493. package/src/ids/tunnel-ids.ts +29 -0
  494. package/src/index.ts +71 -87
  495. package/src/{agent-catalog.test.ts → models/agent-catalog.test.ts} +19 -93
  496. package/src/models/agent-catalog.ts +174 -0
  497. package/src/models/agent-runtimes.ts +201 -0
  498. package/src/models/capability-ledger.test.ts +84 -0
  499. package/src/{fast-tier.test.ts → models/fast-tier.test.ts} +7 -18
  500. package/src/models/fast-tier.ts +36 -0
  501. package/src/{model-order.test.ts → models/model-order.test.ts} +54 -40
  502. package/src/models/model-order.ts +171 -0
  503. package/src/{model-pins.test.ts → models/model-pins.test.ts} +12 -46
  504. package/src/models/model-pins.ts +57 -0
  505. package/src/models/model-roles.test.ts +38 -0
  506. package/src/models/model-roles.ts +180 -0
  507. package/src/{plan-pools.test.ts → models/plan-pools.test.ts} +6 -11
  508. package/src/models/plan-pools.ts +65 -0
  509. package/src/{prompt-complexity.test.ts → models/prompt-complexity.test.ts} +8 -60
  510. package/src/models/prompt-complexity.ts +215 -0
  511. package/src/{provider-specs.test.ts → models/provider-specs.test.ts} +18 -47
  512. package/src/models/provider-specs.ts +272 -0
  513. package/src/policy/approvals-execution.ts +58 -0
  514. package/src/{batch-runs.test.ts → policy/batch-runs.test.ts} +4 -20
  515. package/src/policy/batch-runs.ts +137 -0
  516. package/src/policy/capability-secrets.ts +5 -0
  517. package/src/{card-status.ts → policy/card-status.ts} +11 -26
  518. package/src/{command-classes.test.ts → policy/command-classes.test.ts} +11 -118
  519. package/src/policy/command-classes.ts +395 -0
  520. package/src/policy/command-run.ts +65 -0
  521. package/src/policy/control-scopes.ts +38 -0
  522. package/src/{credential-material.test.ts → policy/credential-material.test.ts} +4 -26
  523. package/src/policy/credential-material.ts +91 -0
  524. package/src/policy/needs-action.ts +5 -0
  525. package/src/policy/output-fields.ts +86 -0
  526. package/src/policy/overlay-lint.ts +100 -0
  527. package/src/{owner-ticket.test.ts → policy/owner-ticket.test.ts} +1 -1
  528. package/src/{owner-ticket.ts → policy/owner-ticket.ts} +9 -31
  529. package/src/policy/safety-policy.test.ts +84 -0
  530. package/src/policy/safety-policy.ts +142 -0
  531. package/src/policy/search-globs.ts +60 -0
  532. package/src/protocol/container-requirements.test.ts +72 -0
  533. package/src/protocol/container-requirements.ts +58 -0
  534. package/src/protocol/host-protocol.ts +29 -0
  535. package/src/protocol/ingress-contract.ts +103 -0
  536. package/src/{ingress-protocol.test.ts → protocol/ingress-protocol.test.ts} +25 -90
  537. package/src/protocol/ingress-protocol.ts +441 -0
  538. package/src/protocol/listener-protocol.ts +75 -0
  539. package/src/{peer-dial.test.ts → protocol/peer-dial.test.ts} +52 -1
  540. package/src/protocol/peer-dial.ts +207 -0
  541. package/src/{peer-mcp-server.ts → protocol/peer-mcp-server.ts} +16 -41
  542. package/src/protocol/request-id.ts +5 -0
  543. package/src/{routes.test.ts → protocol/routes.test.ts} +14 -22
  544. package/src/protocol/routes.ts +159 -0
  545. package/src/protocol/runner-protocol.ts +197 -0
  546. package/src/protocol/terminal-protocol.ts +13 -0
  547. package/src/protocol/webext-links.ts +50 -0
  548. package/src/protocol/webext-protocol.ts +24 -0
  549. package/src/schemas/activity.ts +22 -30
  550. package/src/schemas/agent.ts +130 -238
  551. package/src/schemas/agents.ts +165 -483
  552. package/src/schemas/approvals.ts +23 -71
  553. package/src/schemas/automations.ts +142 -250
  554. package/src/schemas/capabilities.ts +127 -414
  555. package/src/schemas/ci.ts +56 -108
  556. package/src/schemas/codebase-health.ts +7 -11
  557. package/src/schemas/devices.ts +103 -321
  558. package/src/schemas/engines.ts +16 -44
  559. package/src/schemas/environment.ts +41 -91
  560. package/src/schemas/exit.ts +24 -81
  561. package/src/schemas/extension-updates.ts +42 -87
  562. package/src/schemas/git-history.ts +30 -84
  563. package/src/schemas/git.ts +141 -256
  564. package/src/schemas/history.ts +14 -40
  565. package/src/schemas/hosts.ts +9 -15
  566. package/src/schemas/inventory.ts +8 -10
  567. package/src/schemas/issues.ts +66 -134
  568. package/src/schemas/logs.ts +15 -34
  569. package/src/schemas/loops.ts +46 -163
  570. package/src/schemas/maintenance.ts +47 -172
  571. package/src/schemas/panels.ts +20 -45
  572. package/src/schemas/personas.ts +50 -200
  573. package/src/schemas/plan-limits.ts +58 -197
  574. package/src/schemas/ports.ts +14 -32
  575. package/src/schemas/provider-oauth.ts +23 -76
  576. package/src/schemas/provider-subscriptions.ts +4 -13
  577. package/src/schemas/public.ts +4 -15
  578. package/src/schemas/push.ts +8 -36
  579. package/src/schemas/secrets.ts +20 -64
  580. package/src/schemas/settings.ts +182 -602
  581. package/src/schemas/share.ts +14 -32
  582. package/src/schemas/shared.ts +14 -13
  583. package/src/schemas/system.ts +46 -78
  584. package/src/schemas/terminal.ts +41 -120
  585. package/src/schemas/usage.ts +44 -233
  586. package/src/schemas/version-seam.test.ts +9 -26
  587. package/src/schemas/vpn.ts +27 -64
  588. package/src/schemas/webext.ts +22 -53
  589. package/src/schemas/workflows.ts +57 -183
  590. package/src/schemas/workspace-repos.ts +12 -24
  591. package/src/schemas/workspace-search.ts +17 -35
  592. package/src/schemas/workspace-setup.ts +4 -11
  593. package/src/schemas/workspace-tree.ts +32 -91
  594. package/src/state/arrival.ts +109 -0
  595. package/src/state/contract-lock.test.ts +17 -0
  596. package/src/state/contract-lock.ts +49 -0
  597. package/src/state/definition.ts +143 -0
  598. package/src/state/history-state.ts +103 -0
  599. package/src/{runtime-state.test.ts → state/runtime-state.test.ts} +3 -10
  600. package/src/state/runtime-state.ts +63 -0
  601. package/src/state/starter.ts +5 -0
  602. package/src/state/state-portability.ts +27 -0
  603. package/src/state/versions.ts +26 -0
  604. package/src/{workspace-state.test.ts → state/workspace-state.test.ts} +65 -172
  605. package/src/state/workspace-state.ts +669 -0
  606. package/src/{documents.test.ts → text/documents.test.ts} +1 -1
  607. package/src/text/documents.ts +42 -0
  608. package/src/text/embed.ts +132 -0
  609. package/src/text/mentions.ts +21 -0
  610. package/src/text/model-answer.ts +9 -0
  611. package/src/text/path-refs.ts +39 -0
  612. package/src/text/shell-regions.ts +224 -0
  613. package/src/{title.test.ts → text/title.test.ts} +13 -32
  614. package/src/text/title.ts +202 -0
  615. package/src/{transcript-fold.test.ts → text/transcript-fold.test.ts} +5 -83
  616. package/src/{transcript-fold.ts → text/transcript-fold.ts} +65 -170
  617. package/src/text/whisper.test.ts +19 -0
  618. package/src/text/whisper.ts +17 -0
  619. package/src/{workflow-faults.test.ts → text/workflow-faults.test.ts} +6 -24
  620. package/src/{workflow-faults.ts → text/workflow-faults.ts} +20 -60
  621. package/dist/agent-catalog.d.ts.map +0 -1
  622. package/dist/agent-catalog.js.map +0 -1
  623. package/dist/agent-runtimes.d.ts.map +0 -1
  624. package/dist/agent-runtimes.js.map +0 -1
  625. package/dist/approvals-execution.d.ts.map +0 -1
  626. package/dist/approvals-execution.js.map +0 -1
  627. package/dist/arrival.d.ts.map +0 -1
  628. package/dist/arrival.js.map +0 -1
  629. package/dist/batch-runs.d.ts.map +0 -1
  630. package/dist/batch-runs.js.map +0 -1
  631. package/dist/capability-env.d.ts.map +0 -1
  632. package/dist/capability-env.js.map +0 -1
  633. package/dist/capability-secrets.d.ts.map +0 -1
  634. package/dist/capability-secrets.js.map +0 -1
  635. package/dist/card-status.d.ts.map +0 -1
  636. package/dist/card-status.js.map +0 -1
  637. package/dist/command-classes.d.ts.map +0 -1
  638. package/dist/command-classes.js.map +0 -1
  639. package/dist/command-run.d.ts.map +0 -1
  640. package/dist/command-run.js.map +0 -1
  641. package/dist/contract-lock.d.ts.map +0 -1
  642. package/dist/contract-lock.js.map +0 -1
  643. package/dist/conversation-ids.d.ts +0 -4
  644. package/dist/conversation-ids.d.ts.map +0 -1
  645. package/dist/conversation-ids.js.map +0 -1
  646. package/dist/credential-material.d.ts.map +0 -1
  647. package/dist/credential-material.js.map +0 -1
  648. package/dist/definition.d.ts.map +0 -1
  649. package/dist/definition.js.map +0 -1
  650. package/dist/documents.d.ts.map +0 -1
  651. package/dist/documents.js.map +0 -1
  652. package/dist/embed.d.ts.map +0 -1
  653. package/dist/embed.js.map +0 -1
  654. package/dist/events.d.ts +0 -4336
  655. package/dist/events.d.ts.map +0 -1
  656. package/dist/events.js +0 -725
  657. package/dist/events.js.map +0 -1
  658. package/dist/fast-tier.d.ts.map +0 -1
  659. package/dist/fast-tier.js.map +0 -1
  660. package/dist/history-state.d.ts.map +0 -1
  661. package/dist/history-state.js.map +0 -1
  662. package/dist/host-protocol.d.ts.map +0 -1
  663. package/dist/host-protocol.js.map +0 -1
  664. package/dist/hostnames.d.ts.map +0 -1
  665. package/dist/hostnames.js.map +0 -1
  666. package/dist/ingress-contract.d.ts.map +0 -1
  667. package/dist/ingress-contract.js.map +0 -1
  668. package/dist/ingress-protocol.d.ts.map +0 -1
  669. package/dist/ingress-protocol.js.map +0 -1
  670. package/dist/listener-protocol.d.ts.map +0 -1
  671. package/dist/listener-protocol.js.map +0 -1
  672. package/dist/mentions.d.ts.map +0 -1
  673. package/dist/mentions.js.map +0 -1
  674. package/dist/model-order.d.ts.map +0 -1
  675. package/dist/model-order.js.map +0 -1
  676. package/dist/model-pins.d.ts.map +0 -1
  677. package/dist/model-pins.js.map +0 -1
  678. package/dist/model-roles.d.ts.map +0 -1
  679. package/dist/model-roles.js.map +0 -1
  680. package/dist/needs-action.d.ts.map +0 -1
  681. package/dist/needs-action.js.map +0 -1
  682. package/dist/output-fields.d.ts.map +0 -1
  683. package/dist/output-fields.js.map +0 -1
  684. package/dist/overlay-lint.d.ts.map +0 -1
  685. package/dist/overlay-lint.js.map +0 -1
  686. package/dist/owner-ticket.d.ts.map +0 -1
  687. package/dist/owner-ticket.js.map +0 -1
  688. package/dist/path-refs.d.ts.map +0 -1
  689. package/dist/path-refs.js.map +0 -1
  690. package/dist/peer-dial.d.ts.map +0 -1
  691. package/dist/peer-dial.js.map +0 -1
  692. package/dist/peer-mcp-server.d.ts.map +0 -1
  693. package/dist/peer-mcp-server.js.map +0 -1
  694. package/dist/plan-pools.d.ts.map +0 -1
  695. package/dist/plan-pools.js.map +0 -1
  696. package/dist/prompt-complexity.d.ts.map +0 -1
  697. package/dist/prompt-complexity.js.map +0 -1
  698. package/dist/provider-specs.d.ts.map +0 -1
  699. package/dist/provider-specs.js.map +0 -1
  700. package/dist/request-id.d.ts.map +0 -1
  701. package/dist/request-id.js.map +0 -1
  702. package/dist/routes.d.ts.map +0 -1
  703. package/dist/routes.js.map +0 -1
  704. package/dist/runner-protocol.d.ts.map +0 -1
  705. package/dist/runner-protocol.js.map +0 -1
  706. package/dist/runtime-state.d.ts.map +0 -1
  707. package/dist/runtime-state.js.map +0 -1
  708. package/dist/safety-policy.d.ts.map +0 -1
  709. package/dist/safety-policy.js.map +0 -1
  710. package/dist/search-globs.d.ts.map +0 -1
  711. package/dist/search-globs.js.map +0 -1
  712. package/dist/session-names.d.ts.map +0 -1
  713. package/dist/session-names.js.map +0 -1
  714. package/dist/share-paths.d.ts.map +0 -1
  715. package/dist/share-paths.js.map +0 -1
  716. package/dist/shell-regions.d.ts.map +0 -1
  717. package/dist/shell-regions.js.map +0 -1
  718. package/dist/sse.d.ts.map +0 -1
  719. package/dist/sse.js.map +0 -1
  720. package/dist/starter.d.ts.map +0 -1
  721. package/dist/starter.js.map +0 -1
  722. package/dist/state-portability.d.ts.map +0 -1
  723. package/dist/state-portability.js.map +0 -1
  724. package/dist/terminal-protocol.d.ts.map +0 -1
  725. package/dist/terminal-protocol.js.map +0 -1
  726. package/dist/title.d.ts.map +0 -1
  727. package/dist/title.js.map +0 -1
  728. package/dist/transcript-fold.d.ts.map +0 -1
  729. package/dist/transcript-fold.js.map +0 -1
  730. package/dist/tunnel-ids.d.ts.map +0 -1
  731. package/dist/tunnel-ids.js.map +0 -1
  732. package/dist/versions.d.ts.map +0 -1
  733. package/dist/versions.js.map +0 -1
  734. package/dist/webext-links.d.ts.map +0 -1
  735. package/dist/webext-links.js.map +0 -1
  736. package/dist/webext-protocol.d.ts.map +0 -1
  737. package/dist/webext-protocol.js.map +0 -1
  738. package/dist/workflow-faults.d.ts.map +0 -1
  739. package/dist/workflow-faults.js.map +0 -1
  740. package/dist/workspace-state.d.ts.map +0 -1
  741. package/dist/workspace-state.js.map +0 -1
  742. package/src/agent-catalog.ts +0 -316
  743. package/src/agent-runtimes.ts +0 -419
  744. package/src/approvals-execution.ts +0 -96
  745. package/src/arrival.ts +0 -160
  746. package/src/batch-runs.ts +0 -188
  747. package/src/capability-ledger.test.ts +0 -140
  748. package/src/capability-secrets.ts +0 -20
  749. package/src/command-classes.ts +0 -617
  750. package/src/command-run.ts +0 -78
  751. package/src/contract-lock.test.ts +0 -23
  752. package/src/contract-lock.ts +0 -66
  753. package/src/conversation-ids.ts +0 -207
  754. package/src/credential-material.ts +0 -181
  755. package/src/definition.ts +0 -207
  756. package/src/documents.ts +0 -67
  757. package/src/embed.ts +0 -164
  758. package/src/events.ts +0 -1870
  759. package/src/fast-tier.ts +0 -72
  760. package/src/history-state.ts +0 -174
  761. package/src/host-protocol.ts +0 -36
  762. package/src/hostnames.ts +0 -180
  763. package/src/ingress-contract.ts +0 -157
  764. package/src/ingress-protocol.ts +0 -625
  765. package/src/listener-protocol.ts +0 -96
  766. package/src/mentions.ts +0 -25
  767. package/src/model-order.ts +0 -262
  768. package/src/model-pins.ts +0 -132
  769. package/src/model-roles.test.ts +0 -52
  770. package/src/model-roles.ts +0 -320
  771. package/src/needs-action.ts +0 -14
  772. package/src/output-fields.ts +0 -111
  773. package/src/overlay-lint.ts +0 -116
  774. package/src/path-refs.ts +0 -59
  775. package/src/peer-dial.ts +0 -163
  776. package/src/plan-pools.ts +0 -92
  777. package/src/prompt-complexity.ts +0 -334
  778. package/src/provider-specs.ts +0 -432
  779. package/src/request-id.ts +0 -41
  780. package/src/routes.ts +0 -219
  781. package/src/runner-protocol.ts +0 -239
  782. package/src/runtime-state.ts +0 -140
  783. package/src/safety-policy.test.ts +0 -88
  784. package/src/safety-policy.ts +0 -258
  785. package/src/search-globs.ts +0 -76
  786. package/src/session-names.ts +0 -44
  787. package/src/share-paths.ts +0 -68
  788. package/src/shell-regions.ts +0 -289
  789. package/src/starter.ts +0 -13
  790. package/src/state-portability.ts +0 -56
  791. package/src/terminal-protocol.ts +0 -16
  792. package/src/title.ts +0 -267
  793. package/src/tunnel-ids.ts +0 -57
  794. package/src/versions.ts +0 -48
  795. package/src/webext-links.ts +0 -90
  796. package/src/webext-protocol.ts +0 -27
  797. package/src/workspace-state.ts +0 -1090
  798. /package/dist/{hostnames.d.ts → ids/hostnames.d.ts} +0 -0
  799. /package/dist/{hostnames.js → ids/hostnames.js} +0 -0
  800. /package/dist/{session-names.d.ts → ids/session-names.d.ts} +0 -0
  801. /package/dist/{session-names.js → ids/session-names.js} +0 -0
  802. /package/dist/{share-paths.d.ts → ids/share-paths.d.ts} +0 -0
  803. /package/dist/{share-paths.js → ids/share-paths.js} +0 -0
  804. /package/dist/{agent-catalog.js → models/agent-catalog.js} +0 -0
  805. /package/dist/{agent-runtimes.d.ts → models/agent-runtimes.d.ts} +0 -0
  806. /package/dist/{agent-runtimes.js → models/agent-runtimes.js} +0 -0
  807. /package/dist/{fast-tier.js → models/fast-tier.js} +0 -0
  808. /package/dist/{model-order.d.ts → models/model-order.d.ts} +0 -0
  809. /package/dist/{model-pins.js → models/model-pins.js} +0 -0
  810. /package/dist/{plan-pools.js → models/plan-pools.js} +0 -0
  811. /package/dist/{prompt-complexity.d.ts → models/prompt-complexity.d.ts} +0 -0
  812. /package/dist/{prompt-complexity.js → models/prompt-complexity.js} +0 -0
  813. /package/dist/{provider-specs.d.ts → models/provider-specs.d.ts} +0 -0
  814. /package/dist/{provider-specs.js → models/provider-specs.js} +0 -0
  815. /package/dist/{approvals-execution.d.ts → policy/approvals-execution.d.ts} +0 -0
  816. /package/dist/{approvals-execution.js → policy/approvals-execution.js} +0 -0
  817. /package/dist/{capability-env.d.ts → policy/capability-env.d.ts} +0 -0
  818. /package/dist/{capability-env.js → policy/capability-env.js} +0 -0
  819. /package/dist/{capability-secrets.d.ts → policy/capability-secrets.d.ts} +0 -0
  820. /package/dist/{capability-secrets.js → policy/capability-secrets.js} +0 -0
  821. /package/dist/{command-run.js → policy/command-run.js} +0 -0
  822. /package/dist/{credential-material.d.ts → policy/credential-material.d.ts} +0 -0
  823. /package/dist/{credential-material.js → policy/credential-material.js} +0 -0
  824. /package/dist/{needs-action.d.ts → policy/needs-action.d.ts} +0 -0
  825. /package/dist/{needs-action.js → policy/needs-action.js} +0 -0
  826. /package/dist/{output-fields.d.ts → policy/output-fields.d.ts} +0 -0
  827. /package/dist/{output-fields.js → policy/output-fields.js} +0 -0
  828. /package/dist/{overlay-lint.d.ts → policy/overlay-lint.d.ts} +0 -0
  829. /package/dist/{overlay-lint.js → policy/overlay-lint.js} +0 -0
  830. /package/dist/{owner-ticket.d.ts → policy/owner-ticket.d.ts} +0 -0
  831. /package/dist/{search-globs.d.ts → policy/search-globs.d.ts} +0 -0
  832. /package/dist/{search-globs.js → policy/search-globs.js} +0 -0
  833. /package/dist/{ingress-contract.d.ts → protocol/ingress-contract.d.ts} +0 -0
  834. /package/dist/{ingress-protocol.d.ts → protocol/ingress-protocol.d.ts} +0 -0
  835. /package/dist/{ingress-protocol.js → protocol/ingress-protocol.js} +0 -0
  836. /package/dist/{listener-protocol.d.ts → protocol/listener-protocol.d.ts} +0 -0
  837. /package/dist/{peer-mcp-server.d.ts → protocol/peer-mcp-server.d.ts} +0 -0
  838. /package/dist/{peer-mcp-server.js → protocol/peer-mcp-server.js} +0 -0
  839. /package/dist/{request-id.d.ts → protocol/request-id.d.ts} +0 -0
  840. /package/dist/{request-id.js → protocol/request-id.js} +0 -0
  841. /package/dist/{routes.d.ts → protocol/routes.d.ts} +0 -0
  842. /package/dist/{routes.js → protocol/routes.js} +0 -0
  843. /package/dist/{sse.d.ts → protocol/sse.d.ts} +0 -0
  844. /package/dist/{sse.js → protocol/sse.js} +0 -0
  845. /package/dist/{terminal-protocol.js → protocol/terminal-protocol.js} +0 -0
  846. /package/dist/{webext-links.d.ts → protocol/webext-links.d.ts} +0 -0
  847. /package/dist/{webext-links.js → protocol/webext-links.js} +0 -0
  848. /package/dist/{arrival.d.ts → state/arrival.d.ts} +0 -0
  849. /package/dist/{contract-lock.d.ts → state/contract-lock.d.ts} +0 -0
  850. /package/dist/{history-state.d.ts → state/history-state.d.ts} +0 -0
  851. /package/dist/{runtime-state.d.ts → state/runtime-state.d.ts} +0 -0
  852. /package/dist/{runtime-state.js → state/runtime-state.js} +0 -0
  853. /package/dist/{starter.d.ts → state/starter.d.ts} +0 -0
  854. /package/dist/{starter.js → state/starter.js} +0 -0
  855. /package/dist/{state-portability.d.ts → state/state-portability.d.ts} +0 -0
  856. /package/dist/{state-portability.js → state/state-portability.js} +0 -0
  857. /package/dist/{versions.d.ts → state/versions.d.ts} +0 -0
  858. /package/dist/{versions.js → state/versions.js} +0 -0
  859. /package/dist/{embed.d.ts → text/embed.d.ts} +0 -0
  860. /package/dist/{embed.js → text/embed.js} +0 -0
  861. /package/dist/{mentions.d.ts → text/mentions.d.ts} +0 -0
  862. /package/dist/{mentions.js → text/mentions.js} +0 -0
  863. /package/dist/{path-refs.d.ts → text/path-refs.d.ts} +0 -0
  864. /package/dist/{path-refs.js → text/path-refs.js} +0 -0
  865. /package/dist/{shell-regions.js → text/shell-regions.js} +0 -0
  866. /package/dist/{title.d.ts → text/title.d.ts} +0 -0
  867. /package/dist/{title.js → text/title.js} +0 -0
  868. /package/src/{hostnames.test.ts → ids/hostnames.test.ts} +0 -0
  869. /package/src/{share-paths.test.ts → ids/share-paths.test.ts} +0 -0
  870. /package/src/{capability-env.ts → policy/capability-env.ts} +0 -0
  871. /package/src/{overlay-lint.test.ts → policy/overlay-lint.test.ts} +0 -0
  872. /package/src/{search-globs.test.ts → policy/search-globs.test.ts} +0 -0
  873. /package/src/{ingress-contract.test.ts → protocol/ingress-contract.test.ts} +0 -0
  874. /package/src/{peer-mcp-server.test.ts → protocol/peer-mcp-server.test.ts} +0 -0
  875. /package/src/{sse.ts → protocol/sse.ts} +0 -0
  876. /package/src/{versions.test.ts → state/versions.test.ts} +0 -0
  877. /package/src/{embed.test.ts → text/embed.test.ts} +0 -0
  878. /package/src/{mentions.test.ts → text/mentions.test.ts} +0 -0
  879. /package/src/{path-refs.test.ts → text/path-refs.test.ts} +0 -0
@@ -4,44 +4,79 @@ import { LandConflictSchema, LandedMessageSchema } from "./agents.js";
4
4
  import { CommandRunSchema } from "./ci.js";
5
5
  import { RefNameSchema } from "./internal.js";
6
6
  import { RepoParamSchema } from "./shared.js";
7
- // What a commit records, three shapes, each a real git spelling. The last two are for the case where nothing
8
- // is staged yet and the caller has said what to stage; they are alternatives, and a caller sends at most one:
9
- // absent ⇒ commit whatever is staged (plain `git commit`)
10
- // all: true ⇒ stage every change in the repo, then commit (`commit -a`; VSCode's "stage all and commit")
11
- // paths ⇒ `git add` those repo-relative paths, then commit the index
12
- //
13
- // `paths` is emphatically NOT `commit --only`. The index IS git's mechanism for choosing what a commit
14
- // contains, so a second path-selection channel alongside it could only disagree with it: a partial commit over
15
- // a half-staged file records the WORKTREE content while the row the user picked showed the INDEX content. This
16
- // stages and then records the whole index, which is why it is safe, and why it also survives a merge, where
17
- // git refuses a partial commit outright (and refuses it only AFTER moving the index).
18
- export const CommitSchema = RepoParamSchema.extend({
19
- message: z.string().min(1).describe("The commit message."),
20
- all: z
21
- .boolean()
22
- .optional()
23
- .describe("Stage every change in the repository first, then commit. An alternative to naming paths, not a companion to it."),
24
- paths: z
25
- .array(z.string().min(1))
26
- .max(500)
7
+
8
+ // Which of the working tree's diffs a row is about; a path can be both staged and edited again, so a side is never
9
+ // defaulted.
10
+ // staged: index vs HEAD.
11
+ // unstaged: worktree vs index (untracked ⇒ no before side).
12
+ // conflicted: HEAD vs worktree, markers included (no stage 0 to diff against).
13
+ export const GitDiffSideSchema = z.enum(["staged", "unstaged", "conflicted"]);
14
+ export type GitDiffSide = z.infer<typeof GitDiffSideSchema>;
15
+
16
+ // What a bulk git action applies to, never simply a list of paths (unbounded, unlike a review's rows).
17
+ // paths: exactly these, from a list a browser already drew.
18
+ // scope: a description the daemon resolves against live status, so nothing here can be stale.
19
+ // neither: the whole repository.
20
+ export const GitScopeSchema = z.object({
21
+ side: GitDiffSideSchema.optional().describe(
22
+ "Narrow to one of the three lists a repository's changes split into. Leave it out for all of them, which is the whole repository.",
23
+ ),
24
+ // Same attribution as `RepoChanges.origins`; a path list would miss files beyond what's on screen.
25
+ origin: z
26
+ .string()
27
+ .min(1)
27
28
  .optional()
28
- .describe("Stage exactly these paths, then commit everything staged. Leave this and `all` out to commit whatever is already staged."),
29
+ .describe("Narrow to the files one conversation landed. Leave it out for everyone's, including your own edits."),
29
30
  });
30
- export const DiscardSchema = RepoParamSchema.extend({
31
- // Repo-relative paths to discard; absent ⇒ discard every uncommitted change in the repo.
32
- paths: z
33
- .array(z.string().min(1))
34
- .max(500)
35
- .optional()
36
- .describe("Which paths to throw away. Leave it out to discard every uncommitted change in the repository."),
31
+ export type GitScope = z.infer<typeof GitScopeSchema>;
32
+
33
+ // Wire bound on an explicit path list, not a git/argv limit; past a few hundred rows, name a scope instead.
34
+ export const MAX_ACTION_PATHS = 1000;
35
+
36
+ const ActionPathsSchema = z
37
+ .array(z.string().min(1))
38
+ .max(MAX_ACTION_PATHS)
39
+ .describe("Exactly these repository-relative paths. For anything bigger than a hand-picked selection, describe a scope instead.");
40
+
41
+ // Two optional fields rather than a union: `{}` (the whole repository) is a meaningful value a discriminated union
42
+ // cannot spell.
43
+ export const GitTargetSchema = z.object({
44
+ paths: ActionPathsSchema.optional(),
45
+ scope: GitScopeSchema.optional().describe(
46
+ "What to act on, described rather than listed, so it covers every matching file in the repository and not just the ones a list could hold.",
47
+ ),
37
48
  });
38
- // Index moves. Both are per-path and never touch the worktree, so they are always safe and need no checkpoint.
39
- export const GitStageSchema = RepoParamSchema.extend({
40
- 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."),
49
+ export type GitTarget = z.infer<typeof GitTargetSchema>;
50
+
51
+ // Both together is refused: silently preferring one would make the other a lie.
52
+ const ONE_TARGET = { message: "name paths or a scope, not both" } as const;
53
+ const oneTarget = (target: GitTarget): boolean => target.paths === undefined || target.scope === undefined;
54
+
55
+ // What a commit records; the index already does path selection, so `stage` only says what to add first.
56
+ // absent: commit whatever is already staged.
57
+ // {}: stage everything, then commit.
58
+ // { scope }: stage what the scope names, then commit.
59
+ // { paths }: stage exactly those paths, then commit.
60
+ // Never `commit --only`: a partial commit over a half-staged file would record the worktree while the row showed the
61
+ // index.
62
+ export const CommitSchema = RepoParamSchema.extend({
63
+ message: z.string().min(1).describe("The commit message."),
64
+ stage: GitTargetSchema.refine(oneTarget, ONE_TARGET)
65
+ .optional()
66
+ .describe(
67
+ "What to stage before committing. Leave it out to record the index exactly as it stands; give it an empty object to stage everything first.",
68
+ ),
41
69
  });
42
- // `branch` defaults to the checked-out one. There is deliberately no "set upstream" flag: the daemon publishes
43
- // (`push -u`) exactly when the branch has no upstream yet, which is never destructive and is the only way the
44
- // result is coherent, see pushBranch.
70
+ export const DiscardSchema = RepoParamSchema.extend(GitTargetSchema.shape)
71
+ .describe("What to throw away. Neither paths nor a scope discards every uncommitted change in the repository.")
72
+ .refine(oneTarget, ONE_TARGET);
73
+ // Index-only moves; nothing on disk changes, so neither needs a checkpoint. An empty target means the whole repository
74
+ // (`git add -A`, or the entire index).
75
+ export const GitIndexMoveSchema = RepoParamSchema.extend(GitTargetSchema.shape)
76
+ .describe("What to move across the index. Nothing on disk changes either way.")
77
+ .refine(oneTarget, ONE_TARGET);
78
+ // No separate "set upstream" flag: the daemon runs `push -u` exactly when the branch has none yet, which is never
79
+ // destructive.
45
80
  export const PushSchema = RepoParamSchema.extend({
46
81
  branch: z
47
82
  .string()
@@ -49,23 +84,15 @@ export const PushSchema = RepoParamSchema.extend({
49
84
  .optional()
50
85
  .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."),
51
86
  });
52
- /* WHO SAID NO to a push, read off git's final words (git/git.ts pushRefusal), because the three answers ask
53
- * three different things of the owner and only one of them is an agent's to fix:
54
- * hook , this repository's own pre-push hook refused it: the code is known to be wrong, the hook's
55
- * output says how, and a fix is worth proposing.
56
- * remote , the server rejected the refs: a non-fast-forward, a protected branch. Pull first, or push
57
- * somewhere else; nothing about the code has been judged.
58
- * transport , it never got there: credentials, a host that does not answer, a remote that is not a
59
- * repository. The same again, and a retry is the only sensible button. */
87
+ // Who said no to a push, read off git's own words (`pushRefusal`); the three answers ask three different things of the
88
+ // owner.
89
+ // hook: this repo's own pre-push hook refused it; the code is known wrong, worth a fix.
90
+ // remote: the server rejected the refs (non-fast-forward, protected branch); pull first or push elsewhere.
91
+ // transport: it never got there (credentials, unreachable host); a retry is the only useful button.
60
92
  export const PushRefusalSchema = z.enum(["hook", "remote", "transport"]);
61
93
  export type PushRefusal = z.infer<typeof PushRefusalSchema>;
62
- /* THE PUSH AS A RUN: the pre-push check's shape (CommandRunSchema) with the three things a push adds. A push is
63
- * a command that runs this repository's pre-push hook, which for a workspace with a real gate is the whole
64
- * suite, minutes of output; it is a terminal to watch and a verdict to poll for exactly as the check is, and
65
- * NOT a request held open for its duration (the browser's header deadline is seconds, and a push that ran a
66
- * suite inside its own request reported "failed" over a push that had gone). One shape for both halves of
67
- * the push flow is what lets the browser render a refused push with the card, the terminal link and the
68
- * proposed fix it already has for a red check. */
94
+ // A push runs this repo's pre-push hook (minutes of output); it streams like `CommandRunSchema`, never held open on the
95
+ // request, since the browser's header deadline is seconds.
69
96
  export const PushRunSchema = CommandRunSchema.extend({
70
97
  repo: z.string().describe("The repository this run is about, the same id the routes take."),
71
98
  reason: z
@@ -82,15 +109,6 @@ export const GitFileWriteSchema = RepoParamSchema.extend({
82
109
  path: z.string().min(1).describe("Where to write, relative to the repository root. Missing folders are created."),
83
110
  content: z.string().describe("The file's whole new contents."),
84
111
  });
85
- // Which of the working tree's diffs to open, the same split the Changes panel lists under. A path that is
86
- // staged AND edited again has genuinely different diffs, so the side is required rather than defaulted: a
87
- // caller that doesn't say which one it means doesn't know what it is showing.
88
- // staged ⇒ index vs HEAD (what a bare `git commit` would record)
89
- // unstaged ⇒ worktree vs index (untracked ⇒ no before side)
90
- // conflicted ⇒ HEAD vs worktree (what you had vs what the merge left, markers included, an unmerged path
91
- // has no stage 0, so the index is not a side it can be diffed against)
92
- export const GitDiffSideSchema = z.enum(["staged", "unstaged", "conflicted"]);
93
- export type GitDiffSide = z.infer<typeof GitDiffSideSchema>;
94
112
  export const GitFileDiffQuerySchema = RepoParamSchema.extend({
95
113
  path: z.string().min(1).describe("The file, relative to the repository root."),
96
114
  side: GitDiffSideSchema.describe(
@@ -109,24 +127,20 @@ export const GitFileSchema = z.object({
109
127
  path: z.string().describe("The path, as asked for."),
110
128
  content: z.string().describe("The file's contents as they stand on disk."),
111
129
  });
112
- // CommitResultSchema is declared further down, after the RepoChanges/OriginAgent shapes a commit answers with.
113
130
 
114
- // One repo's slice of a workspace-wide git action: the whole repo, or only the repo-relative paths named. The
115
- // same pair the per-repo routes take as {repo} + `paths`, in the one shape a caller that spans repos can send.
116
- export const RepoPathsSchema = z.object({
117
- repo: z.string().min(1).describe("Which repository."),
118
- paths: z.array(z.string().min(1)).max(500).optional().describe("Which of its paths. Leave it out for the whole repository."),
119
- });
120
- export type RepoPaths = z.infer<typeof RepoPathsSchema>;
121
- // One change to a file, an uncommitted working-tree change (status vs HEAD, untracked included), an agent
122
- // worktree's delta vs its base, or a file in a commit. `additions`/`deletions` are the numstat line counts,
123
- // undefined for a binary file (git reports "-"/"-") or an untracked file (no HEAD blob to diff against).
131
+ // One repo's slice of a workspace-wide action: git cannot span repositories, so a caller fans out into one of these per
132
+ // repo.
133
+ export const RepoTargetSchema = z
134
+ .object({ repo: z.string().min(1).describe("Which repository.") })
135
+ .extend(GitTargetSchema.shape)
136
+ .refine(oneTarget, ONE_TARGET);
137
+ export type RepoTarget = z.infer<typeof RepoTargetSchema>;
138
+ // One change to a file: an uncommitted working-tree change, an agent worktree's delta vs its base, or a file in a
139
+ // commit. `additions`/`deletions` are numstat counts, absent for binary or untracked files.
124
140
  export const GitChangeSchema = z.object({
125
- // Repo-relative path with forward slashes; for "renamed" the NEW path (`from` carries the old one).
141
+ // Forward slashes; for a rename this is the new path (`from` holds the old one).
126
142
  path: z.string().describe("The path, relative to the repository root. For a rename this is the new one."),
127
- // "conflicted" is git's unmerged state (`U`), and it is not a kind of modification: the index holds "ours"
128
- // and "theirs" at stages 2/3 with NO stage 0, so there is nothing a commit could record for this path and
129
- // git refuses to commit while one exists. It belongs to neither side, see RepoChanges.conflicted.
143
+ // Git's unmerged state (`U`): stages 2/3 hold "ours"/"theirs", no stage 0 to commit.
130
144
  status: z
131
145
  .enum(["added", "modified", "deleted", "renamed", "type-changed", "conflicted"])
132
146
  .describe("What happened to it. Conflicted is not a kind of edit: nothing can be committed anywhere in the repository while one exists."),
@@ -136,16 +150,7 @@ export const GitChangeSchema = z.object({
136
150
  .optional()
137
151
  .describe("Lines added. Absent for a binary file, and for an untracked one, which has nothing to compare against."),
138
152
  deletions: z.number().optional().describe("Lines removed. Absent for the same reasons additions is."),
139
- /* THE SAME CHANGE WITH THE COMMENTS TAKEN OUT, computed here rather than by whoever renders the row, and
140
- * that is the whole point of it being on the wire. A review's diffs open on code alone, so the numbers beside
141
- * them are the code's; working those out needs both whole sides of the file and a TextMate walk over each,
142
- * which the app used to do per file, as the files were read — so a row arrived showing git's count and
143
- * changed to this one the moment anything read it, which moved the row under the reader when the list was
144
- * sorted by size. Shipped with the list, the number a reader sees first is the number it stays.
145
- *
146
- * Absent, not zero, when there is nothing to say: a binary file, one side too large to read, a path whose
147
- * grammar this build does not ship, or a list too long to count whole (see git/code-counts.ts). The caller
148
- * then shows git's own counts, which for such a file are the only honest reading anyway. */
153
+ // Precomputed once and shipped with the list, so a row's number never changes under the reader as it renders.
149
154
  code: z
150
155
  .object({ additions: z.number(), deletions: z.number() })
151
156
  .optional()
@@ -154,37 +159,30 @@ export const GitChangeSchema = z.object({
154
159
  ),
155
160
  });
156
161
  export type GitChange = z.infer<typeof GitChangeSchema>;
157
- // Where a repo's checked-out branch stands against its remote. Every field is optional-or-zero because every
158
- // one of them is legitimately absent in a healthy repo: no remote configured yet, a branch created locally and
159
- // never pushed, a detached HEAD. `ahead` = commits only we have; `behind` = commits only the upstream has,
160
- // which is meaningful only as of the last fetch, the panel's Fetch button is what refreshes it.
162
+ // Where the checked-out branch stands against its remote; every field can legitimately be absent (no remote, unpushed
163
+ // branch, detached HEAD). `behind` is only as fresh as the last fetch.
161
164
  export const GitRemoteStateSchema = z.object({
162
- // The remote this branch pushes to: its OWN remote when it tracks one, else the first `git remote` lists
163
- // (where a never-pushed branch would publish). Those differ in a fork, `origin` and `upstream` both
164
- // configured, and pushing to the wrong one succeeds while leaving `ahead` stuck. Absent ⇒ no remote.
165
165
  remote: z
166
166
  .string()
167
167
  .optional()
168
168
  .describe(
169
169
  "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.",
170
170
  ),
171
- // The checked-out branch; absent on a detached HEAD or an unborn repo.
172
171
  branch: z.string().optional().describe("The checked-out branch. Absent when the repository is on a bare commit, or has no commits yet."),
173
- // The tracking ref ("origin/main"); absent ⇒ this branch has no upstream, so the next push publishes it.
172
+ // Full ref, e.g. "origin/main".
174
173
  upstream: z.string().optional().describe("The branch on the remote this one follows. Absent means the next push will publish it."),
175
174
  ahead: z.number().describe("Commits you have that the remote does not."),
176
175
  behind: z.number().describe("Commits the remote has that you do not, as of the last fetch. Fetch before trusting it."),
177
176
  });
178
177
  export type GitRemoteState = z.infer<typeof GitRemoteStateSchema>;
179
- // One local branch, for the switcher. `at` is its tip's committer time in ms (the list sorts newest-first).
178
+ // One local branch, for the switcher.
180
179
  export const GitBranchSchema = z.object({
181
180
  name: z.string().describe("The branch name."),
182
181
  current: z.boolean().describe("Whether this is the one checked out."),
183
182
  upstream: z.string().optional().describe("The branch on the remote it follows, if any."),
184
183
  ahead: z.number().describe("Commits this branch has that its remote counterpart does not."),
185
184
  behind: z.number().describe("Commits its remote counterpart has that it does not."),
186
- // The configured upstream no longer exists on the remote (a merged PR's deleted branch), distinct from
187
- // "no upstream", and the signal that this local branch is safe to delete.
185
+ // Distinct from no upstream: the configured one existed and was deleted remotely.
188
186
  gone: z
189
187
  .boolean()
190
188
  .optional()
@@ -194,12 +192,8 @@ export const GitBranchSchema = z.object({
194
192
  at: z.number().describe("When its tip was committed, in milliseconds. Lists are newest first."),
195
193
  });
196
194
  export type GitBranch = z.infer<typeof GitBranchSchema>;
197
- /* One REMOTE-TRACKING branch, somebody else's tip, as this repo last saw it.
198
- *
199
- * A separate shape from GitBranch rather than the same one with optional fields, because the two genuinely
200
- * differ: a remote-tracking branch has no upstream of its own and no ahead/behind, and giving it those fields
201
- * as zeroes would make it look like a synced local branch. `name` is the full `origin/main`; `remote` and
202
- * `branch` are it split, so a selector can group by remote without re-parsing. */
195
+ // A remote-tracking branch, not GitBranch with optionals: it has no upstream/ahead/behind of its own, and zeros there
196
+ // would look like a synced local branch. `remote`/`branch` are `name` pre-split for grouping.
203
197
  export const GitRemoteBranchSchema = z.object({
204
198
  name: z.string().describe("The full name, such as origin/main."),
205
199
  remote: z.string().describe("Just the remote part, so a picker can group by it without re-parsing."),
@@ -207,15 +201,14 @@ export const GitRemoteBranchSchema = z.object({
207
201
  at: z.number().describe("When its tip was committed, in milliseconds, as this repository last saw it."),
208
202
  });
209
203
  export type GitRemoteBranch = z.infer<typeof GitRemoteBranchSchema>;
210
- // Locals and remote-tracking branches in one response: the switcher pairs them, and two round trips to draw one
211
- // list would only ever show a half-populated one first.
204
+ // Locals and remote-tracking branches together, so the switcher never draws a half-populated list from two round trips.
212
205
  export const GitBranchesSchema = z.object({
213
206
  branches: z.array(GitBranchSchema).describe("Branches in this repository."),
214
207
  remotes: z
215
208
  .array(GitRemoteBranchSchema)
216
209
  .describe("Branches on its remotes, as last seen. Sent together with the locals so a switcher never draws a half-filled list."),
217
210
  });
218
- // Create at `start` (a sha or ref; absent ⇒ HEAD); `checkout` switches to it immediately (`git switch -c`).
211
+ // Creates at `start` (sha or ref; absent means HEAD); `checkout` switches to it immediately.
219
212
  export const GitBranchCreateAtSchema = RepoParamSchema.extend({
220
213
  name: RefNameSchema.describe("The new branch's name."),
221
214
  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."),
@@ -229,13 +222,8 @@ export const GitBranchDeleteSchema = RepoParamSchema.extend({
229
222
  .optional()
230
223
  .describe("Delete it even though it holds work that was never merged. The deliberate retry after the first attempt refuses."),
231
224
  });
232
- /* THE OPERATION A REPO IS HALTED IN THE MIDDLE OF, a merge, rebase, cherry-pick or revert that stopped on a
233
- * conflict and was never finished or aborted.
234
- *
235
- * Every verb the daemon runs itself aborts cleanly on failure, so this is never something the UI started. It is
236
- * what an agent or a user left behind in a terminal, and it is a state git refuses to do almost anything else
237
- * from, so a surface listing the conflicted files without naming it leaves the reader with no way out.
238
- * Absent means the worktree is not mid-anything. */
225
+ // A merge/rebase/cherry-pick/revert left stopped on a conflict, never finished or aborted; the daemon's own verbs
226
+ // always abort cleanly, so this is only ever something a person or agent left behind in a terminal.
239
227
  export const GitOperationSchema = z.enum(["merge", "rebase", "cherry-pick", "revert"]);
240
228
  export type GitOperation = z.infer<typeof GitOperationSchema>;
241
229
  export const GitOperationStateSchema = z.object({
@@ -248,61 +236,47 @@ export type GitOperationState = z.infer<typeof GitOperationStateSchema>;
248
236
  export const RepoChangesSchema = z.object({
249
237
  // The {repo} param the per-repo git routes accept: "root" or a repo id (its root-relative dir).
250
238
  repo: z.string(),
251
- // Absent on an unborn HEAD (a repo initialized but never committed).
239
+ // Absent on an unborn HEAD (initialized, never committed).
252
240
  branch: z.string().optional().describe("The checked-out branch. Absent in a repository that has no commits yet."),
253
- // Unmerged paths, a merge, rebase, cherry-pick or pull that git could not finish. First, because until
254
- // they are resolved nothing else in this repo can be committed at all: git refuses outright. Held apart
255
- // from the two sides rather than listed in them, because "staged or not" is not a question an unmerged path
256
- // has an answer to. Staging one (`git add`) is exactly how you tell git it is resolved.
241
+ // Staging a conflicted path (`git add`) is how you tell git it is resolved.
257
242
  conflicted: z
258
243
  .array(GitChangeSchema)
259
244
  .describe(
260
245
  "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.",
261
246
  ),
262
- /* The merge/rebase/cherry-pick/revert this repo is halted in the middle of, when it is. Carried on the SCAN
263
- * rather than fetched per repo because it belongs beside `conflicted`: the panel already lists the files,
264
- * and this is the sentence that says why they are conflicted and what ends it. Absent = not mid-anything,
265
- * which is every repo almost all of the time. */
247
+ // Absent means not mid-anything, the case for almost every repo.
266
248
  operation: GitOperationSchema.optional().describe(
267
249
  "What halted, when something did. This is the sentence that explains the conflicts above and names the way out of them.",
268
250
  ),
269
- // The two sides git actually models, kept apart because a path can appear on BOTH with different statuses
270
- // (a staged edit that was then edited again, the classic `MM`). `staged` is index-vs-HEAD: exactly what a
271
- // bare `git commit` would record. `unstaged` is worktree-vs-index plus untracked files. Each side's
272
- // additions/deletions describe the diff it is listed under, never a conflation of the two.
251
+ // Kept apart because a path can appear on both with different statuses (the classic `MM`); each side's counts
252
+ // describe only its own diff.
273
253
  staged: z.array(GitChangeSchema).describe("What a plain commit would record right now."),
274
254
  unstaged: z
275
255
  .array(GitChangeSchema)
276
256
  .describe(
277
257
  "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.",
278
258
  ),
279
- // How many changes were CUT from the two sides above (conflicts are never cut). A cloned monorepo or a
280
- // mass delete carries six-figure change lists, a payload no panel can render and no browser should hold,
281
- // so past the daemon's per-repo budget the lists arrive truncated and this carries the dropped count, which
282
- // the panel adds to its badges and states under the group. Absent ⇒ the lists are complete.
259
+ // Per side, not one total: which side loses rows first is the daemon's own choice (staged outranks unstaged) and
260
+ // cannot be derived from the lists, so it is stated.
283
261
  truncated: z
284
- .number()
262
+ .object({
263
+ staged: z.number().describe("Staged changes not listed above."),
264
+ unstaged: z.number().describe("Unstaged changes not listed above."),
265
+ })
285
266
  .optional()
286
267
  .describe(
287
- "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.",
268
+ "How many changes were cut from each of 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 on each side. Absent means they are complete.",
288
269
  ),
289
- // Where this repo stands against its remote; `ahead`/`behind` are 0 with no remote or no upstream.
270
+ // 0 for `ahead`/`behind` with no remote or no upstream.
290
271
  remote: GitRemoteStateSchema.optional().describe("Where this repository stands against its remote."),
291
- // WHICH AGENT PUT IT THERE: repo-relative path → the agent ids that landed it, newest land first. Keyed by
292
- // PATH rather than carried on each GitChange because a path can be listed on two sides at once (staged and
293
- // edited again) and its origin is the same fact for both. Only branch-backed agents whose work passed
294
- // through land can appear here; workspace conversations, terminal edits and the user's typing are absent
295
- // (see agents/origins.ts), so the panel badges an attributable agent and says nothing for anyone else.
296
- // Ids, not titles: the identity for every id named here rides the response once, in `originAgents`.
272
+ // Keyed by path, not on each change, since one path can appear on two sides with the same origin. Ids only; look up
273
+ // identity in `originAgents`.
297
274
  origins: z
298
275
  .record(z.string(), z.array(z.string()))
299
276
  .optional()
300
277
  .describe(
301
278
  "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.",
302
279
  ),
303
- // Why the repo could not be scanned at all, condensed to git's own one-line reason ("fatal: bad object HEAD").
304
- // A repo left torn by a canceled or failed upload used to be dropped from the response entirely, so it just
305
- // vanished from the panel with nothing to act on; it now arrives with empty change lists and this set instead.
306
280
  error: z
307
281
  .string()
308
282
  .optional()
@@ -311,61 +285,35 @@ export const RepoChangesSchema = z.object({
311
285
  ),
312
286
  });
313
287
  export type RepoChanges = z.infer<typeof RepoChangesSchema>;
314
- // WHO AN ORIGIN ID IS, the display identity of one agent named in `origins`, carried BY THE RESPONSE rather
315
- // than looked up in the client's fleet roster. The roster is the LIVE board and deliberately drops archived
316
- // agents (AgentsRegistry.list), while a landing outlives the agent that made it: archiving a finished agent
317
- // does not commit its lines, so the very common case, land, archive the card, review at leisure, is exactly
318
- // the one a roster lookup cannot answer, and the panel fell back to "Agent 1a2b3c" with a generic icon for it.
319
- // The daemon reads attribution and identity from the same registry in the same pass, so it is the one place
320
- // they cannot disagree. Per response, not per repo: one agent commonly lands into several.
288
+ // Display identity for an id in `origins`, carried here rather than looked up in the roster: the roster drops archived
289
+ // agents, but a landing outlives them. Read from the same pass as the attribution, so the two cannot disagree.
321
290
  export const OriginAgentSchema = z.object({
322
- // Absent for an entry that never got a title (a turn that failed before one was derived).
323
291
  title: z.string().optional().describe("The conversation's title. Absent for one that never got as far as having a title."),
324
292
  provider: AgentProviderSchema.describe("Which model provider it ran on."),
325
- /* WHAT THE LANDED WORK DID, the same drafted message the agent's own card carries (LandedMessage), on the
326
- * road that outlives the card. The panel reads the roster's copy first and this one when the roster has no
327
- * entry left to read, which is the case this whole schema exists for: an archived agent's lines are still
328
- * in the tree, and the sentence about them has to be too.
329
- *
330
- * Absent for a landing nothing was written about, and, for the seconds after a land, for one whose
331
- * sentence is still being drafted. Those two are told apart by `landedMessageDraft` on the agent's card, and
332
- * neither has a title-shaped fallback: guessing a subject from the ask is exactly the habit this replaced,
333
- * so a chip with no message files nothing and simply filters. */
293
+ // Absent means nothing was written, or (see `landedMessageDraft` on the agent's card) it still is; never fall back
294
+ // to guessing a title from the ask.
334
295
  landedMessage: LandedMessageSchema.optional().describe(
335
296
  "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.",
336
297
  ),
337
298
  });
338
299
  export type OriginAgent = z.infer<typeof OriginAgentSchema>;
339
- // The aggregated review set across every repo (root + every discovered repo); a repo appears when it has changes,
340
- // when it is out of sync with its remote, or when it failed to scan.
300
+ // Aggregated review set across every repo (root + every discovered repo).
341
301
  export const GitChangesSchema = z.object({
342
302
  repos: z
343
303
  .array(RepoChangesSchema)
344
304
  .describe(
345
305
  "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.",
346
306
  ),
347
- // Keyed by agent id; covers every id any repo's `origins` names, and only those. Absent when nothing in
348
- // the review is attributable. An id can still be missing from it, the retention sweep can retire an
349
- // entry whose landed lines are somehow still uncommitted, and the panel keeps its id-shaped fallback for
350
- // exactly that, rather than dropping the chip and re-attributing the file to the user.
307
+ // An id can still be missing here (a retired retention-sweep entry); the panel keeps its id-shaped fallback rather
308
+ // than reattributing to the user.
351
309
  originAgents: z
352
310
  .record(z.string(), OriginAgentSchema)
353
311
  .optional()
354
312
  .describe(
355
313
  "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.",
356
314
  ),
357
- /* WHICH REPOS HAVE A COMMIT RUNNING RIGHT NOW, the daemon's answer, not the browser's.
358
- *
359
- * A commit is one request that outlives the tab that fired it. Reload the page mid-commit and that tab's
360
- * "a git action is running" flag went with it: the button re-armed itself over rows the commit was already
361
- * recording, the panel invited a second click at the exact moment it could do the least good, and the rows
362
- * then changed under the user a second later with nothing having said why. A second device watching the
363
- * same workspace never knew at all.
364
- *
365
- * So the fact lives where the commit does. Read at RESPONSE time rather than folded into the scan, because
366
- * the scan is memoized for half a second and this must describe the instant it is sent. Absent ⇒ nothing is
367
- * committing, which is the overwhelmingly common case and the reason it is optional rather than an empty
368
- * array on every response. */
315
+ // Sandbox-wide, not per-tab, so a reload or another device still knows a commit is running. Read at response time,
316
+ // not from the memoized scan. Absent means nothing is committing.
369
317
  committing: z
370
318
  .array(z.string())
371
319
  .optional()
@@ -374,18 +322,8 @@ export const GitChangesSchema = z.object({
374
322
  ),
375
323
  });
376
324
  export type GitChanges = z.infer<typeof GitChangesSchema>;
377
- /* WHAT THE COMMIT LEFT BEHIND, the committed repo's review row, re-read inside the same repo lock that made
378
- * the commit, so the panel replaces that repo's rows from THIS answer instead of asking for a fresh
379
- * workspace-wide scan afterwards.
380
- *
381
- * That scan is the daemon's most expensive read (a repo walk plus a `git status` per repo, ~11 git spawns each,
382
- * for every repo including the ones the commit never touched) and the user sat watching the rows they had just
383
- * committed until it returned. The commit itself is milliseconds of git; the wait was this.
384
- *
385
- * `changes` ABSENT means the repo has nothing the panel would show any more, the same inclusion rule the scan
386
- * applies, decided in the same place, so a repo the scan would have dropped drops here too. `originAgents`
387
- * covers the ids this repo's `origins` names and only those, on GitChangesSchema's terms; the panel merges it
388
- * over what it already holds rather than replacing, since the other repos' rows still name their own agents. */
325
+ // Re-read inside the same lock the commit used, so the caller redraws from here instead of a full rescan. `changes`
326
+ // absent follows the scan's own drop rule; merge `originAgents` over what you hold, don't replace it.
389
327
  export const CommitResultSchema = z.object({
390
328
  committed: z.boolean().describe("Whether a commit was actually recorded."),
391
329
  changes: RepoChangesSchema.optional().describe(
@@ -399,15 +337,8 @@ export const CommitResultSchema = z.object({
399
337
  ),
400
338
  });
401
339
  export type CommitResult = z.infer<typeof CommitResultSchema>;
402
- /* One module a changed file can be grouped under in the review panels: a repo-relative dir ("_editor/web", or ""
403
- * for a repo that is itself one package) and the name its package.json declares. Distinct from
404
- * WorkspacePackage, which is the DEPENDENCY graph's node, that one is pnpm's view of the workspace and carries
405
- * the grouping axis its diagram colours by; this one is a filesystem fact about where a path lives.
406
- *
407
- * Stated HERE, above both readings of it, because there are two trees a review can be of and each groups by its
408
- * own: the workspace read below (/workspace/modules, the Changes panel) speaks for /work, and every agent's
409
- * diff carries its own (AgentRepoChanges.modules) because an agent's files live in a worktree /work cannot
410
- * see. */
340
+ // Repo-relative dir + package name for grouping changed files; distinct from WorkspacePackage (the dependency graph's
341
+ // node), a filesystem fact, not a graph position.
411
342
  export const WorkspaceModuleSchema = z.object({
412
343
  dir: z.string().describe("Where the package lives, relative to its repository. Empty when the repository is itself one package."),
413
344
  name: z.string().describe("The name the package declares for itself."),
@@ -420,20 +351,11 @@ export const RepoModulesSchema = z.object({
420
351
  export type RepoModules = z.infer<typeof RepoModulesSchema>;
421
352
  export const WorkspaceModulesSchema = z.object({ repos: z.array(RepoModulesSchema).describe("Every repository with the packages inside it.") });
422
353
  export type WorkspaceModules = z.infer<typeof WorkspaceModulesSchema>;
423
- /* One file an agent touched AND STILL DIFFERS FROM MAIN ON, plus whether the main working tree is already
424
- * holding it. The list is what the conversation wrote measured against the main line as it stands right now,
425
- * which takes three states to say and each one decides a different next move for the reader:
426
- *
427
- * · main's history has this content: the user accepted it, it is their commit, and it is no longer a
428
- * difference against main. There is no row (see `absorbed` on the response).
429
- * · the main working tree has it, uncommitted: the steady state seconds after a land, waiting in the Changes
430
- * panel. A row, `landed: true`.
431
- * · neither: never landed, or landed and then discarded. A row, `landed: false`, and this is exactly what
432
- * "Land now" would apply.
433
- *
434
- * Landed work keeps its row on purpose: a clean turn auto-lands within milliseconds, so a list scoped to the
435
- * outstanding remainder would show an empty panel for work nobody had looked at yet. What retires a row is the
436
- * user committing it, which is the one act that says they are done reviewing it. */
354
+ // One file an agent touched that still differs from main, plus whether main's working tree already holds it:
355
+ // in main's history: accepted, no longer a difference — no row (see `absorbed`).
356
+ // in main's tree, uncommitted: `landed: true`.
357
+ // neither (never landed, or landed then discarded): `landed: false` — what "Land now" applies to.
358
+ // A landed row stays until committed; that is the only act that retires it.
437
359
  export const AgentChangeSchema = GitChangeSchema.extend({
438
360
  landed: z
439
361
  .boolean()
@@ -442,21 +364,13 @@ export const AgentChangeSchema = GitChangeSchema.extend({
442
364
  ),
443
365
  });
444
366
  export type AgentChange = z.infer<typeof AgentChangeSchema>;
445
- // An agent conversation-worktree's delta vs its recorded base, deliberately NOT RepoChanges. There is no index
446
- // side to speak of here: the question a fleet review answers is "what did this agent write", which is one flat
447
- // set. Sharing the working-tree shape would have forced a meaningless empty `staged` on every
448
- // row and invited the panel to render a staging affordance that cannot work on a worktree the user never checks out.
367
+ // An agent worktree's delta vs its base, deliberately not RepoChanges: no index here, so sharing that shape would force
368
+ // an empty `staged` and a staging affordance that cannot work on a worktree nobody checks out.
449
369
  export const AgentRepoChangesSchema = z.object({
450
370
  repo: z.string().describe("Which repository."),
451
371
  branch: z.string().optional().describe("The branch this conversation's work sits on."),
452
372
  changes: z.array(AgentChangeSchema).describe("What it changed there."),
453
- /* THE PACKAGE LAYOUT OF THE TREE THESE CHANGES CAME FROM, so the review can group them by module the way
454
- * the workspace's Changes panel does. It rides the changes rather than being fetched beside them, because
455
- * an agent works in a worktree the main tree cannot see: a package the agent has just created exists only
456
- * there, so the workspace-wide read (/workspace/modules) does not know its name and every one of its files
457
- *, which for a new package is all of them, fell into the unnamed "loose in this repo" bucket.
458
- *
459
- * Same read, same instant, same tree as the rows it groups: that is what stops the two from disagreeing. */
373
+ // Read from the same tree at the same instant as the rows it groups, so the two cannot disagree.
460
374
  modules: z
461
375
  .array(WorkspaceModuleSchema)
462
376
  .describe(
@@ -464,21 +378,11 @@ export const AgentRepoChangesSchema = z.object({
464
378
  ),
465
379
  });
466
380
  export type AgentRepoChanges = z.infer<typeof AgentRepoChangesSchema>;
467
- /* The review, plus WHY the last land refused, because a conflict is discovered by the daemon (a clean turn
468
- * auto-lands the moment it finishes) and acted on in the browser, possibly hours later, on a surface the user
469
- * reaches by clicking the card's "Resolve conflict". Carrying the report only in the land RESPONSE meant the
470
- * one path that opens the review already knowing there is a conflict was the one path that could not show it:
471
- * the panel opened with an empty report, no explanation, and no merge affordance, a dead end at the exact
472
- * moment the UI had promised something to resolve. It rides the review because that is the surface that
473
- * resolves it, and it refreshes with it: every land invalidates this query, so the report is never staler
474
- * than the last attempt. */
381
+ // The review, plus why the last land refused: a conflict is found when the turn ends but resolved later on this
382
+ // surface, so it rides here rather than only in the land response, and refreshes on every land.
475
383
  export const AgentChangesSchema = z.object({
476
384
  repos: z.array(AgentRepoChangesSchema).describe("One entry per repository the conversation touched."),
477
- /* HOW MUCH OF THE WORK IS NO LONGER A DIFFERENCE, so an empty list can say WHICH kind of empty it is. An
478
- * agent that has written nothing and an agent whose every file the user committed both answer with no rows,
479
- * and they are opposite facts: one is "ask it for something", the other is "it is all in your history". A
480
- * count rather than the rows themselves, because that is the whole of what the surface needs to pick a
481
- * sentence, and carrying the rows would put the list back where it started. */
385
+ // Disambiguates two opposite reasons for an empty list: nothing written, versus everything already committed.
482
386
  absorbed: z
483
387
  .number()
484
388
  .describe(
@@ -493,20 +397,8 @@ export const AgentChangesSchema = z.object({
493
397
  });
494
398
  export type AgentChanges = z.infer<typeof AgentChangesSchema>;
495
399
 
496
- /* WHERE THE WORK WENT once it stopped being a difference, the other half of the sentence `absorbed` above can
497
- * only start. The review is what still differs from main, so a reader who committed an agent's every file
498
- * arrives at an empty panel; the count lets it say WHICH kind of empty, and this says where to go and shows
499
- * the work, which is what the reader actually came for.
500
- *
501
- * Deliberately its OWN read rather than more fields on the review. The review is on the panel's hot path and
502
- * this is a `git log` per repo that only matters once history has taken something, so it is asked for exactly
503
- * when there is an answer to have. That also keeps the review's shape honest: its rows are differences against
504
- * main, and these are not.
505
- *
506
- * A COMMIT CARRIES the work, it did not necessarily author it: a path is attributed to the newest commit that
507
- * left the agent's content there, which is where a reader should be sent to read it now. See the daemon's
508
- * agents/landed-history.ts for the span this is measured over and for why an unattributable path is counted
509
- * rather than assigned to a plausible commit. */
400
+ // Own read (a `git log` per repo), not folded into the review, whose rows are differences against main and these are
401
+ // not. A commit CARRIES the work without authoring it: a path is attributed to the newest commit that left it there.
510
402
  export const AgentHistoryCommitSchema = z.object({
511
403
  sha: z.string().describe("The commit."),
512
404
  short: z.string().describe("Its abbreviated hash, which is what a reader recognises it by."),
@@ -523,19 +415,12 @@ export type AgentHistoryCommit = z.infer<typeof AgentHistoryCommitSchema>;
523
415
  export const AgentRepoHistorySchema = z.object({
524
416
  repo: z.string().describe("Which repository."),
525
417
  commits: z.array(AgentHistoryCommitSchema).describe("The commits carrying this conversation's work there, newest first."),
526
- /* Carried for the same reason the review's rows carry it, and read from the same tree at the same instant:
527
- * a package the conversation created lives only in its own copy, so the shared tree cannot name it, and
528
- * without this every file of a brand-new package groups under no package at all. */
418
+ // Same reason as the review's rows: a new package lives only in its own copy and is otherwise ungroupable.
529
419
  modules: z.array(WorkspaceModuleSchema).describe("The packages of the tree these files came from, so a review can group them by package."),
530
420
  });
531
421
  export type AgentRepoHistory = z.infer<typeof AgentRepoHistorySchema>;
532
422
  export const AgentHistorySchema = z.object({
533
423
  repos: z.array(AgentRepoHistorySchema).describe("One entry per repository holding committed work of this conversation."),
534
- /* FILES HISTORY HOLDS THAT NO COMMIT HERE ACCOUNTS FOR, reported rather than hidden. Content reaches the
535
- * main line by roads that do not pass through a commit since the land: a cherry-pick from elsewhere,
536
- * another conversation landing the same lines, the user typing them by hand before this one landed. Those
537
- * files are absorbed and unattributable at once, and a surface that quietly dropped them would be claiming
538
- * the commits it names are the whole story. */
539
424
  unaccounted: z
540
425
  .number()
541
426
  .describe(