@intentic/sandbox-contract 1.431.0 → 1.433.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 (510) hide show
  1. package/README.md +25 -3
  2. package/dist/briefs/agent-ask.d.ts +10 -0
  3. package/dist/briefs/agent-ask.d.ts.map +1 -0
  4. package/dist/briefs/agent-ask.js +2 -0
  5. package/dist/briefs/agent-ask.js.map +1 -0
  6. package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
  7. package/dist/briefs/extension-update-brief.d.ts.map +1 -0
  8. package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
  9. package/dist/briefs/extension-update-brief.js.map +1 -0
  10. package/dist/chores/digest.d.ts.map +1 -1
  11. package/dist/chores/digest.js.map +1 -1
  12. package/dist/chores/index.d.ts +2 -2
  13. package/dist/chores/index.d.ts.map +1 -1
  14. package/dist/chores/index.js +1 -1
  15. package/dist/chores/index.js.map +1 -1
  16. package/dist/chores/prompt.d.ts +1 -9
  17. package/dist/chores/prompt.d.ts.map +1 -1
  18. package/dist/chores/prompt.js +1 -1
  19. package/dist/chores/prompt.js.map +1 -1
  20. package/dist/chores/stack.d.ts.map +1 -1
  21. package/dist/chores/stack.js.map +1 -1
  22. package/dist/chores/verdict.d.ts.map +1 -1
  23. package/dist/chores/verdict.js.map +1 -1
  24. package/dist/chores/workspace-scope.d.ts +1 -3
  25. package/dist/chores/workspace-scope.d.ts.map +1 -1
  26. package/dist/chores/workspace-scope.js +1 -3
  27. package/dist/chores/workspace-scope.js.map +1 -1
  28. package/dist/contracts/agent.contract.d.ts +1049 -12
  29. package/dist/contracts/agent.contract.d.ts.map +1 -1
  30. package/dist/contracts/agents.contract.d.ts +358 -4
  31. package/dist/contracts/agents.contract.d.ts.map +1 -1
  32. package/dist/contracts/approvals.contract.d.ts +35 -0
  33. package/dist/contracts/approvals.contract.d.ts.map +1 -1
  34. package/dist/contracts/approvals.contract.js +13 -3
  35. package/dist/contracts/approvals.contract.js.map +1 -1
  36. package/dist/contracts/automations.contract.d.ts +60 -8
  37. package/dist/contracts/automations.contract.d.ts.map +1 -1
  38. package/dist/contracts/capabilities.contract.d.ts +40 -0
  39. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  40. package/dist/contracts/capabilities.contract.js +21 -0
  41. package/dist/contracts/capabilities.contract.js.map +1 -1
  42. package/dist/contracts/ci.contract.d.ts +222 -95
  43. package/dist/contracts/ci.contract.d.ts.map +1 -1
  44. package/dist/contracts/ci.contract.js +87 -26
  45. package/dist/contracts/ci.contract.js.map +1 -1
  46. package/dist/contracts/device-stacks.contract.d.ts +129 -0
  47. package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
  48. package/dist/contracts/device-stacks.contract.js +66 -0
  49. package/dist/contracts/device-stacks.contract.js.map +1 -0
  50. package/dist/contracts/device.contract.d.ts +47 -0
  51. package/dist/contracts/device.contract.d.ts.map +1 -1
  52. package/dist/contracts/extensions.contract.d.ts +607 -0
  53. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  54. package/dist/contracts/extensions.contract.js +10 -1
  55. package/dist/contracts/extensions.contract.js.map +1 -1
  56. package/dist/contracts/needs.contract.d.ts +887 -18
  57. package/dist/contracts/needs.contract.d.ts.map +1 -1
  58. package/dist/contracts/offload.contract.d.ts +21 -0
  59. package/dist/contracts/offload.contract.d.ts.map +1 -1
  60. package/dist/contracts/runner.contract.d.ts +653 -40
  61. package/dist/contracts/runner.contract.d.ts.map +1 -1
  62. package/dist/contracts/seal.contract.d.ts +20 -0
  63. package/dist/contracts/seal.contract.d.ts.map +1 -1
  64. package/dist/contracts/secrets.contract.d.ts +15 -0
  65. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  66. package/dist/contracts/secrets.contract.js +21 -1
  67. package/dist/contracts/secrets.contract.js.map +1 -1
  68. package/dist/contracts/sessions.contract.d.ts +133 -2
  69. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  70. package/dist/contracts/settings.contract.d.ts +73 -42
  71. package/dist/contracts/settings.contract.d.ts.map +1 -1
  72. package/dist/contracts/settings.contract.js +18 -0
  73. package/dist/contracts/settings.contract.js.map +1 -1
  74. package/dist/contracts/stack-grants.contract.d.ts +440 -0
  75. package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
  76. package/dist/contracts/stack-grants.contract.js +46 -0
  77. package/dist/contracts/stack-grants.contract.js.map +1 -0
  78. package/dist/contracts/system.contract.d.ts +191 -69
  79. package/dist/contracts/system.contract.d.ts.map +1 -1
  80. package/dist/contracts/system.contract.js +12 -42
  81. package/dist/contracts/system.contract.js.map +1 -1
  82. package/dist/contracts/workspace.contract.d.ts +0 -55
  83. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  84. package/dist/contracts/workspace.contract.js +0 -19
  85. package/dist/contracts/workspace.contract.js.map +1 -1
  86. package/dist/events/agent-events.d.ts +509 -8
  87. package/dist/events/agent-events.d.ts.map +1 -1
  88. package/dist/events/agent-transcript.d.ts +133 -2
  89. package/dist/events/agent-transcript.d.ts.map +1 -1
  90. package/dist/events/agent-words.d.ts.map +1 -1
  91. package/dist/events/agent-words.js +2 -1
  92. package/dist/events/agent-words.js.map +1 -1
  93. package/dist/events/child-news.d.ts +32 -0
  94. package/dist/events/child-news.d.ts.map +1 -0
  95. package/dist/events/child-news.js +171 -0
  96. package/dist/events/child-news.js.map +1 -0
  97. package/dist/events/prompt-origins.d.ts +42 -0
  98. package/dist/events/prompt-origins.d.ts.map +1 -1
  99. package/dist/events/prompt-origins.js +28 -0
  100. package/dist/events/prompt-origins.js.map +1 -1
  101. package/dist/events/requests.d.ts +14 -0
  102. package/dist/events/requests.d.ts.map +1 -1
  103. package/dist/events/requests.js +12 -0
  104. package/dist/events/requests.js.map +1 -1
  105. package/dist/events/system-events.d.ts +16 -0
  106. package/dist/events/system-events.d.ts.map +1 -1
  107. package/dist/events/transcript.d.ts +669 -10
  108. package/dist/events/transcript.d.ts.map +1 -1
  109. package/dist/events/transcript.js +2 -1
  110. package/dist/events/transcript.js.map +1 -1
  111. package/dist/ids/conversation-ids.d.ts.map +1 -1
  112. package/dist/ids/conversation-ids.js.map +1 -1
  113. package/dist/index.d.ts +2 -4
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +2 -4
  116. package/dist/index.js.map +1 -1
  117. package/dist/models/model-roles.d.ts +91 -37
  118. package/dist/models/model-roles.d.ts.map +1 -1
  119. package/dist/models/model-roles.js +106 -35
  120. package/dist/models/model-roles.js.map +1 -1
  121. package/dist/models/model-setups.d.ts +10 -8
  122. package/dist/models/model-setups.d.ts.map +1 -1
  123. package/dist/models/model-setups.js +15 -15
  124. package/dist/models/model-setups.js.map +1 -1
  125. package/dist/policy/approvals-execution.d.ts +5 -2
  126. package/dist/policy/approvals-execution.d.ts.map +1 -1
  127. package/dist/policy/approvals-execution.js +3 -4
  128. package/dist/policy/approvals-execution.js.map +1 -1
  129. package/dist/policy/batch-runs.d.ts +1 -1
  130. package/dist/policy/batch-runs.d.ts.map +1 -1
  131. package/dist/policy/batch-runs.js +2 -1
  132. package/dist/policy/batch-runs.js.map +1 -1
  133. package/dist/policy/message-limits.d.ts.map +1 -1
  134. package/dist/policy/message-limits.js.map +1 -1
  135. package/dist/policy/org-locks.d.ts +1 -1
  136. package/dist/policy/org-locks.d.ts.map +1 -1
  137. package/dist/policy/org-locks.js +1 -0
  138. package/dist/policy/org-locks.js.map +1 -1
  139. package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
  140. package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
  141. package/dist/policy/shell/workspace-root-exclude.js +4 -0
  142. package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
  143. package/dist/protocol/doors/listener-protocol.d.ts +7 -0
  144. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  145. package/dist/protocol/doors/listener-protocol.js +1 -0
  146. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  147. package/dist/protocol/doors/webext-links.d.ts.map +1 -1
  148. package/dist/protocol/doors/webext-links.js.map +1 -1
  149. package/dist/protocol/raw/extension-protocol.d.ts +634 -0
  150. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
  151. package/dist/protocol/raw/extension-protocol.js +292 -0
  152. package/dist/protocol/raw/extension-protocol.js.map +1 -1
  153. package/dist/protocol/raw/raw-json-routes.d.ts +3034 -0
  154. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  155. package/dist/protocol/raw/raw-json-routes.js +39 -0
  156. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  157. package/dist/protocol/raw/raw-routes.d.ts +260 -1
  158. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  159. package/dist/protocol/raw/raw-routes.js +57 -1
  160. package/dist/protocol/raw/raw-routes.js.map +1 -1
  161. package/dist/protocol/s2s/address.d.ts +53 -0
  162. package/dist/protocol/s2s/address.d.ts.map +1 -0
  163. package/dist/protocol/s2s/address.js +111 -0
  164. package/dist/protocol/s2s/address.js.map +1 -0
  165. package/dist/protocol/s2s/attestation.d.ts +41 -0
  166. package/dist/protocol/s2s/attestation.d.ts.map +1 -0
  167. package/dist/protocol/s2s/attestation.js +96 -0
  168. package/dist/protocol/s2s/attestation.js.map +1 -0
  169. package/dist/protocol/s2s/canonical.d.ts +10 -0
  170. package/dist/protocol/s2s/canonical.d.ts.map +1 -0
  171. package/dist/protocol/s2s/canonical.js +94 -0
  172. package/dist/protocol/s2s/canonical.js.map +1 -0
  173. package/dist/protocol/s2s/envelope.d.ts +40 -0
  174. package/dist/protocol/s2s/envelope.d.ts.map +1 -0
  175. package/dist/protocol/s2s/envelope.js +116 -0
  176. package/dist/protocol/s2s/envelope.js.map +1 -0
  177. package/dist/protocol/s2s/extension-sign.d.ts +21 -0
  178. package/dist/protocol/s2s/extension-sign.d.ts.map +1 -0
  179. package/dist/protocol/s2s/extension-sign.js +41 -0
  180. package/dist/protocol/s2s/extension-sign.js.map +1 -0
  181. package/dist/protocol/s2s/identity-doc.d.ts +50 -0
  182. package/dist/protocol/s2s/identity-doc.d.ts.map +1 -0
  183. package/dist/protocol/s2s/identity-doc.js +89 -0
  184. package/dist/protocol/s2s/identity-doc.js.map +1 -0
  185. package/dist/protocol/s2s/index.d.ts +12 -0
  186. package/dist/protocol/s2s/index.d.ts.map +1 -0
  187. package/dist/protocol/s2s/index.js +12 -0
  188. package/dist/protocol/s2s/index.js.map +1 -0
  189. package/dist/protocol/s2s/kem.d.ts +15 -0
  190. package/dist/protocol/s2s/kem.d.ts.map +1 -0
  191. package/dist/protocol/s2s/kem.js +34 -0
  192. package/dist/protocol/s2s/kem.js.map +1 -0
  193. package/dist/protocol/s2s/keys.d.ts +34 -0
  194. package/dist/protocol/s2s/keys.d.ts.map +1 -0
  195. package/dist/protocol/s2s/keys.js +81 -0
  196. package/dist/protocol/s2s/keys.js.map +1 -0
  197. package/dist/protocol/s2s/passkey-cosign.d.ts +44 -0
  198. package/dist/protocol/s2s/passkey-cosign.d.ts.map +1 -0
  199. package/dist/protocol/s2s/passkey-cosign.js +139 -0
  200. package/dist/protocol/s2s/passkey-cosign.js.map +1 -0
  201. package/dist/protocol/s2s/session.d.ts +61 -0
  202. package/dist/protocol/s2s/session.d.ts.map +1 -0
  203. package/dist/protocol/s2s/session.js +98 -0
  204. package/dist/protocol/s2s/session.js.map +1 -0
  205. package/dist/protocol/s2s/sign.d.ts +12 -0
  206. package/dist/protocol/s2s/sign.d.ts.map +1 -0
  207. package/dist/protocol/s2s/sign.js +33 -0
  208. package/dist/protocol/s2s/sign.js.map +1 -0
  209. package/dist/schemas/activity.d.ts.map +1 -1
  210. package/dist/schemas/activity.js.map +1 -1
  211. package/dist/schemas/agent.d.ts +4 -0
  212. package/dist/schemas/agent.d.ts.map +1 -1
  213. package/dist/schemas/agent.js +4 -2
  214. package/dist/schemas/agent.js.map +1 -1
  215. package/dist/schemas/agents-list.d.ts +8 -0
  216. package/dist/schemas/agents-list.d.ts.map +1 -1
  217. package/dist/schemas/agents.d.ts +16 -0
  218. package/dist/schemas/agents.d.ts.map +1 -1
  219. package/dist/schemas/approvals.d.ts +100 -0
  220. package/dist/schemas/approvals.d.ts.map +1 -1
  221. package/dist/schemas/approvals.js +21 -0
  222. package/dist/schemas/approvals.js.map +1 -1
  223. package/dist/schemas/automations.d.ts +89 -27
  224. package/dist/schemas/automations.d.ts.map +1 -1
  225. package/dist/schemas/automations.js +15 -33
  226. package/dist/schemas/automations.js.map +1 -1
  227. package/dist/schemas/capabilities.d.ts +1 -0
  228. package/dist/schemas/capabilities.d.ts.map +1 -1
  229. package/dist/schemas/ci-deployments.d.ts +30 -0
  230. package/dist/schemas/ci-deployments.d.ts.map +1 -0
  231. package/dist/schemas/ci-deployments.js +18 -0
  232. package/dist/schemas/ci-deployments.js.map +1 -0
  233. package/dist/schemas/ci.d.ts +348 -21
  234. package/dist/schemas/ci.d.ts.map +1 -1
  235. package/dist/schemas/ci.js +110 -19
  236. package/dist/schemas/ci.js.map +1 -1
  237. package/dist/schemas/command-admission.d.ts +6 -0
  238. package/dist/schemas/command-admission.d.ts.map +1 -1
  239. package/dist/schemas/command-admission.js +2 -1
  240. package/dist/schemas/command-admission.js.map +1 -1
  241. package/dist/schemas/command-run.d.ts +29 -0
  242. package/dist/schemas/command-run.d.ts.map +1 -0
  243. package/dist/schemas/command-run.js +20 -0
  244. package/dist/schemas/command-run.js.map +1 -0
  245. package/dist/schemas/contact-need.d.ts +50 -0
  246. package/dist/schemas/contact-need.d.ts.map +1 -0
  247. package/dist/schemas/contact-need.js +19 -0
  248. package/dist/schemas/contact-need.js.map +1 -0
  249. package/dist/schemas/contacts-settings.d.ts +5 -0
  250. package/dist/schemas/contacts-settings.d.ts.map +1 -0
  251. package/dist/schemas/contacts-settings.js +11 -0
  252. package/dist/schemas/contacts-settings.js.map +1 -0
  253. package/dist/schemas/data-protection.d.ts +15 -2
  254. package/dist/schemas/data-protection.d.ts.map +1 -1
  255. package/dist/schemas/data-protection.js +15 -23
  256. package/dist/schemas/data-protection.js.map +1 -1
  257. package/dist/schemas/device-stacks.d.ts +131 -0
  258. package/dist/schemas/device-stacks.d.ts.map +1 -1
  259. package/dist/schemas/device-stacks.js +81 -0
  260. package/dist/schemas/device-stacks.js.map +1 -1
  261. package/dist/schemas/devices.d.ts +73 -0
  262. package/dist/schemas/devices.d.ts.map +1 -1
  263. package/dist/schemas/devices.js +6 -2
  264. package/dist/schemas/devices.js.map +1 -1
  265. package/dist/schemas/extension-updates.d.ts +1192 -0
  266. package/dist/schemas/extension-updates.d.ts.map +1 -1
  267. package/dist/schemas/extension-updates.js +18 -4
  268. package/dist/schemas/extension-updates.js.map +1 -1
  269. package/dist/schemas/host-power.d.ts +22 -0
  270. package/dist/schemas/host-power.d.ts.map +1 -1
  271. package/dist/schemas/host-power.js +55 -0
  272. package/dist/schemas/host-power.js.map +1 -1
  273. package/dist/schemas/hosts.d.ts +226 -0
  274. package/dist/schemas/hosts.d.ts.map +1 -1
  275. package/dist/schemas/hosts.js +24 -0
  276. package/dist/schemas/hosts.js.map +1 -1
  277. package/dist/schemas/issues.d.ts +37 -249
  278. package/dist/schemas/issues.d.ts.map +1 -1
  279. package/dist/schemas/issues.js +10 -43
  280. package/dist/schemas/issues.js.map +1 -1
  281. package/dist/schemas/links.d.ts +8 -0
  282. package/dist/schemas/links.d.ts.map +1 -1
  283. package/dist/schemas/links.js +4 -0
  284. package/dist/schemas/links.js.map +1 -1
  285. package/dist/schemas/maintenance.d.ts.map +1 -1
  286. package/dist/schemas/maintenance.js.map +1 -1
  287. package/dist/schemas/metrics.d.ts +25 -0
  288. package/dist/schemas/metrics.d.ts.map +1 -1
  289. package/dist/schemas/metrics.js +18 -0
  290. package/dist/schemas/metrics.js.map +1 -1
  291. package/dist/schemas/need-kinds.d.ts +20 -0
  292. package/dist/schemas/need-kinds.d.ts.map +1 -0
  293. package/dist/schemas/need-kinds.js +7 -0
  294. package/dist/schemas/need-kinds.js.map +1 -0
  295. package/dist/schemas/needs.d.ts +666 -30
  296. package/dist/schemas/needs.d.ts.map +1 -1
  297. package/dist/schemas/needs.js +29 -6
  298. package/dist/schemas/needs.js.map +1 -1
  299. package/dist/schemas/offload.d.ts +52 -0
  300. package/dist/schemas/offload.d.ts.map +1 -1
  301. package/dist/schemas/offload.js +12 -0
  302. package/dist/schemas/offload.js.map +1 -1
  303. package/dist/schemas/outward-action.d.ts +39 -0
  304. package/dist/schemas/outward-action.d.ts.map +1 -0
  305. package/dist/schemas/outward-action.js +40 -0
  306. package/dist/schemas/outward-action.js.map +1 -0
  307. package/dist/schemas/providers/plan-limits.d.ts +1 -0
  308. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  309. package/dist/schemas/providers/plan-limits.js +1 -0
  310. package/dist/schemas/providers/plan-limits.js.map +1 -1
  311. package/dist/schemas/redirect-need.d.ts +15 -0
  312. package/dist/schemas/redirect-need.d.ts.map +1 -0
  313. package/dist/schemas/redirect-need.js +14 -0
  314. package/dist/schemas/redirect-need.js.map +1 -0
  315. package/dist/schemas/s2s-identity.d.ts +521 -0
  316. package/dist/schemas/s2s-identity.d.ts.map +1 -0
  317. package/dist/schemas/s2s-identity.js +208 -0
  318. package/dist/schemas/s2s-identity.js.map +1 -0
  319. package/dist/schemas/s2s-views.d.ts +2127 -0
  320. package/dist/schemas/s2s-views.d.ts.map +1 -0
  321. package/dist/schemas/s2s-views.js +217 -0
  322. package/dist/schemas/s2s-views.js.map +1 -0
  323. package/dist/schemas/s2s-wire.d.ts +1616 -0
  324. package/dist/schemas/s2s-wire.d.ts.map +1 -0
  325. package/dist/schemas/s2s-wire.js +276 -0
  326. package/dist/schemas/s2s-wire.js.map +1 -0
  327. package/dist/schemas/s2s.d.ts +5 -0
  328. package/dist/schemas/s2s.d.ts.map +1 -0
  329. package/dist/schemas/s2s.js +5 -0
  330. package/dist/schemas/s2s.js.map +1 -0
  331. package/dist/schemas/secrets.d.ts +17 -0
  332. package/dist/schemas/secrets.d.ts.map +1 -1
  333. package/dist/schemas/secrets.js +12 -5
  334. package/dist/schemas/secrets.js.map +1 -1
  335. package/dist/schemas/settings-history.d.ts +1 -1
  336. package/dist/schemas/settings-history.d.ts.map +1 -1
  337. package/dist/schemas/settings-history.js +5 -4
  338. package/dist/schemas/settings-history.js.map +1 -1
  339. package/dist/schemas/settings-savings.d.ts +58 -0
  340. package/dist/schemas/settings-savings.d.ts.map +1 -1
  341. package/dist/schemas/settings-savings.js +22 -0
  342. package/dist/schemas/settings-savings.js.map +1 -1
  343. package/dist/schemas/settings.d.ts +18 -42
  344. package/dist/schemas/settings.d.ts.map +1 -1
  345. package/dist/schemas/settings.js +7 -6
  346. package/dist/schemas/settings.js.map +1 -1
  347. package/dist/schemas/stack-grants.d.ts +60 -0
  348. package/dist/schemas/stack-grants.d.ts.map +1 -0
  349. package/dist/schemas/stack-grants.js +33 -0
  350. package/dist/schemas/stack-grants.js.map +1 -0
  351. package/dist/schemas/terminal.d.ts +2 -0
  352. package/dist/schemas/terminal.d.ts.map +1 -1
  353. package/dist/schemas/terminal.js +4 -0
  354. package/dist/schemas/terminal.js.map +1 -1
  355. package/dist/schemas/vpn.d.ts +4 -0
  356. package/dist/schemas/vpn.d.ts.map +1 -1
  357. package/dist/schemas/vpn.js +9 -0
  358. package/dist/schemas/vpn.js.map +1 -1
  359. package/dist/schemas/watch-sources.d.ts +72 -0
  360. package/dist/schemas/watch-sources.d.ts.map +1 -0
  361. package/dist/schemas/watch-sources.js +88 -0
  362. package/dist/schemas/watch-sources.js.map +1 -0
  363. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  364. package/dist/schemas/workspace/workspace-search.js +1 -1
  365. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  366. package/dist/schemas/wsl-memory.d.ts +76 -0
  367. package/dist/schemas/wsl-memory.d.ts.map +1 -0
  368. package/dist/schemas/wsl-memory.js +36 -0
  369. package/dist/schemas/wsl-memory.js.map +1 -0
  370. package/dist/state/auth-state.d.ts.map +1 -1
  371. package/dist/state/auth-state.js +8 -0
  372. package/dist/state/auth-state.js.map +1 -1
  373. package/dist/state/definition.d.ts +22 -8
  374. package/dist/state/definition.d.ts.map +1 -1
  375. package/dist/state/workspace-state.d.ts +8 -3
  376. package/dist/state/workspace-state.d.ts.map +1 -1
  377. package/dist/state/workspace-state.js +8 -3
  378. package/dist/state/workspace-state.js.map +1 -1
  379. package/package.json +20 -5
  380. package/src/briefs/agent-ask.ts +23 -0
  381. package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
  382. package/src/chores/digest.ts +1 -0
  383. package/src/chores/index.ts +13 -2
  384. package/src/chores/prompt.ts +3 -18
  385. package/src/chores/stack.ts +1 -0
  386. package/src/chores/verdict.ts +1 -0
  387. package/src/chores/workspace-scope.ts +3 -8
  388. package/src/contracts/approvals.contract.ts +24 -3
  389. package/src/contracts/capabilities.contract.ts +24 -0
  390. package/src/contracts/ci.contract.ts +119 -37
  391. package/src/contracts/device-stacks.contract.ts +97 -0
  392. package/src/contracts/extensions.contract.ts +11 -0
  393. package/src/contracts/secrets.contract.ts +27 -0
  394. package/src/contracts/settings.contract.ts +24 -0
  395. package/src/contracts/stack-grants.contract.ts +51 -0
  396. package/src/contracts/system.contract.ts +16 -59
  397. package/src/contracts/workspace.contract.ts +0 -22
  398. package/src/events/agent-words.ts +3 -1
  399. package/src/events/child-news.test.ts +91 -0
  400. package/src/events/child-news.ts +269 -0
  401. package/src/events/prompt-origins.ts +35 -0
  402. package/src/events/requests.ts +18 -0
  403. package/src/events/transcript.ts +10 -1
  404. package/src/ids/conversation-ids.test.ts +22 -3
  405. package/src/ids/conversation-ids.ts +5 -7
  406. package/src/index.ts +3 -6
  407. package/src/models/model-roles.test.ts +61 -4
  408. package/src/models/model-roles.ts +153 -49
  409. package/src/models/model-setups.ts +49 -26
  410. package/src/policy/approvals-execution.ts +11 -6
  411. package/src/policy/batch-runs.ts +2 -2
  412. package/src/policy/message-limits.ts +8 -4
  413. package/src/policy/org-locks.ts +1 -0
  414. package/src/policy/shell/workspace-root-exclude.ts +11 -0
  415. package/src/protocol/doors/listener-protocol.ts +14 -0
  416. package/src/protocol/doors/webext-links.ts +3 -1
  417. package/src/protocol/ingress-contract.fixture.json +6 -1
  418. package/src/protocol/raw/extension-protocol.ts +513 -2
  419. package/src/protocol/raw/raw-json-routes.ts +85 -0
  420. package/src/protocol/raw/raw-routes.ts +111 -7
  421. package/src/protocol/s2s/address.test.ts +157 -0
  422. package/src/protocol/s2s/address.ts +193 -0
  423. package/src/protocol/s2s/attestation.test.ts +262 -0
  424. package/src/protocol/s2s/attestation.ts +173 -0
  425. package/src/protocol/s2s/canonical.test.ts +70 -0
  426. package/src/protocol/s2s/canonical.ts +119 -0
  427. package/src/protocol/s2s/envelope.test.ts +162 -0
  428. package/src/protocol/s2s/envelope.ts +194 -0
  429. package/src/protocol/s2s/extension-sign.test.ts +117 -0
  430. package/src/protocol/s2s/extension-sign.ts +76 -0
  431. package/src/protocol/s2s/identity-doc.test.ts +187 -0
  432. package/src/protocol/s2s/identity-doc.ts +169 -0
  433. package/src/protocol/s2s/index.ts +15 -0
  434. package/src/protocol/s2s/kem.ts +62 -0
  435. package/src/protocol/s2s/keys.test.ts +76 -0
  436. package/src/protocol/s2s/keys.ts +155 -0
  437. package/src/protocol/s2s/passkey-cosign.test.ts +98 -0
  438. package/src/protocol/s2s/passkey-cosign.testing.ts +86 -0
  439. package/src/protocol/s2s/passkey-cosign.ts +192 -0
  440. package/src/protocol/s2s/s2s.testing.ts +22 -0
  441. package/src/protocol/s2s/session.test.ts +133 -0
  442. package/src/protocol/s2s/session.ts +179 -0
  443. package/src/protocol/s2s/sign.test.ts +66 -0
  444. package/src/protocol/s2s/sign.ts +53 -0
  445. package/src/schemas/activity.ts +2 -1
  446. package/src/schemas/agent.test.ts +3 -0
  447. package/src/schemas/agent.ts +10 -4
  448. package/src/schemas/approvals.ts +41 -0
  449. package/src/schemas/automations.ts +26 -41
  450. package/src/schemas/ci-deployments.ts +26 -0
  451. package/src/schemas/ci.ts +185 -45
  452. package/src/schemas/command-admission.ts +4 -1
  453. package/src/schemas/command-run.ts +44 -0
  454. package/src/schemas/contact-need.ts +26 -0
  455. package/src/schemas/contacts-settings.ts +16 -0
  456. package/src/schemas/data-protection.ts +28 -34
  457. package/src/schemas/device-stacks.ts +162 -3
  458. package/src/schemas/devices.ts +13 -2
  459. package/src/schemas/extension-updates.ts +27 -7
  460. package/src/schemas/host-power.test.ts +53 -0
  461. package/src/schemas/host-power.ts +96 -2
  462. package/src/schemas/hosts.test.ts +32 -0
  463. package/src/schemas/hosts.ts +62 -0
  464. package/src/schemas/issues.ts +30 -86
  465. package/src/schemas/links.ts +4 -0
  466. package/src/schemas/maintenance.ts +4 -3
  467. package/src/schemas/metrics.ts +35 -0
  468. package/src/schemas/need-kinds.ts +13 -0
  469. package/src/schemas/needs.ts +44 -16
  470. package/src/schemas/offload.ts +31 -0
  471. package/src/schemas/outward-action.ts +47 -0
  472. package/src/schemas/providers/plan-limits.ts +1 -0
  473. package/src/schemas/redirect-need.ts +19 -0
  474. package/src/schemas/s2s-identity.ts +329 -0
  475. package/src/schemas/s2s-views.ts +326 -0
  476. package/src/schemas/s2s-wire.ts +401 -0
  477. package/src/schemas/s2s.test.ts +175 -0
  478. package/src/schemas/s2s.ts +9 -0
  479. package/src/schemas/secrets.ts +23 -5
  480. package/src/schemas/settings-history.ts +10 -5
  481. package/src/schemas/settings-savings.ts +29 -0
  482. package/src/schemas/settings.test.ts +23 -23
  483. package/src/schemas/settings.ts +12 -12
  484. package/src/schemas/stack-grants.ts +59 -0
  485. package/src/schemas/terminal.ts +6 -0
  486. package/src/schemas/version-seam.test.ts +13 -1
  487. package/src/schemas/vpn.ts +13 -0
  488. package/src/schemas/watch-sources.ts +127 -0
  489. package/src/schemas/workspace/workspace-search.ts +5 -2
  490. package/src/schemas/wsl-memory.ts +59 -0
  491. package/src/state/auth-state.ts +17 -0
  492. package/src/state/workspace-state.ts +18 -18
  493. package/src/text/embed.ts +2 -2
  494. package/dist/chores/extension-update.d.ts.map +0 -1
  495. package/dist/chores/extension-update.js.map +0 -1
  496. package/dist/contracts/chores.contract.d.ts +0 -213
  497. package/dist/contracts/chores.contract.d.ts.map +0 -1
  498. package/dist/contracts/chores.contract.js +0 -32
  499. package/dist/contracts/chores.contract.js.map +0 -1
  500. package/dist/contracts/issues.contract.d.ts +0 -106
  501. package/dist/contracts/issues.contract.d.ts.map +0 -1
  502. package/dist/contracts/issues.contract.js +0 -50
  503. package/dist/contracts/issues.contract.js.map +0 -1
  504. package/src/chores/chores.test.ts +0 -24
  505. package/src/chores/digest.test.ts +0 -27
  506. package/src/chores/probes.integration.test.ts +0 -494
  507. package/src/chores/stack.test.ts +0 -140
  508. package/src/chores/verdict.test.ts +0 -761
  509. package/src/contracts/chores.contract.ts +0 -39
  510. package/src/contracts/issues.contract.ts +0 -53
package/src/schemas/ci.ts CHANGED
@@ -1,6 +1,11 @@
1
1
  // ci: pipeline runs on the workspace repos' github/gitlab remotes
2
+ import { isInfraStep } from "@intentic/constants/ci-infra-steps";
2
3
  import { z } from "zod";
3
4
  import { AgentRunPickSchema } from "./agent.js";
5
+
6
+ // Split out to keep this module one reading (2026-11-26), served from this subpath as before.
7
+ export * from "./ci-deployments.js";
8
+ export * from "./command-run.js";
4
9
  // The daemon maps each workspace repo to its CI project via a connected github/gitlab capability, registers a webhook
5
10
  // to fire `ci` listener automations instantly, and serves the Pipelines rail from a webhook-freshened, poll-backfilled
6
11
  // cache. `host` names which provider API serves a repo; the listener provider is always `ci`, since a trigger narrows
@@ -253,16 +258,16 @@ export const CiRunsResponseSchema = z.object({
253
258
  repos: z.array(CiRepoSchema).describe("Which workspace repositories are wired to a forge, and how each one's notifications are set up."),
254
259
  // Newest first, across all mapped repos.
255
260
  runs: z.array(PipelineRunSchema).describe("Runs across all of them, newest first."),
261
+ // (2026-11-26) Filled by the pipelines extension's backend, whose board read answers this same shape; the daemon's own
262
+ // GET /ci/runs leaves both out since main's fix agent moved there, and an older daemon fills them itself.
256
263
  failures: z
257
264
  .array(CiMainFailureSchema)
258
265
  .optional()
259
- .describe("Every main-line branch failing right now, with the fix agent on it. Absent from a daemon that keeps none."),
266
+ .describe("Every main-line branch failing right now, with the fix agent on it. Absent where nothing keeps them."),
260
267
  ownerSteps: z
261
268
  .array(CiOwnerStepSchema)
262
269
  .optional()
263
- .describe(
264
- "Steps outside the repository that CI fix agents ended their latest turn on, one per agent. Absent from a daemon that keeps none.",
265
- ),
270
+ .describe("Steps outside the repository that CI fix agents ended their latest turn on, one per agent. Absent where nothing keeps them."),
266
271
  });
267
272
  export type CiRunsResponse = z.infer<typeof CiRunsResponseSchema>;
268
273
  // 2026-11-17, the shinobi-society audit: conversation after conversation spent calls finding out whether a test that
@@ -398,45 +403,180 @@ export const CiFixResponseSchema = z.object({
398
403
  conversationId: z.string().describe("The conversation that was opened, already holding the failure. Open it to watch, or attach to its turn."),
399
404
  });
400
405
  export type CiFixResponse = z.infer<typeof CiFixResponseSchema>;
401
- // One shape for any command the daemon runs on a click with a verdict and a quotable tail (the push via PushRunSchema in
402
- // schemas/git/git.ts, which runs the repository's own pre-push hook), so the fields the browser reads (terminal, tail,
403
- // kill vs timeout) have one definition.
404
- // idle: nothing has run yet, or the last run was cleared
405
- // running: live; its output is the terminal's, not this object's
406
- // passed: exited 0
407
- // failed: exited non-zero, or killed by its ceiling (`timedOut`)
408
- // error: not spawnable at all; not fixable, since nothing is wrong with the code
409
- // cancelled: the user stopped it
410
- export const CommandRunStatusSchema = z.enum(["idle", "running", "passed", "failed", "error", "cancelled"]);
411
- export type CommandRunStatus = z.infer<typeof CommandRunStatusSchema>;
412
- export const CommandRunSchema = z.object({
413
- status: CommandRunStatusSchema.describe(
414
- "Where the run is. Failed and error are deliberately different: failed means the code is wrong, error means the command could not be run at all, and calling the second one a test failure would send an agent hunting a bug that is not there.",
415
- ),
416
- // Echoed rather than read from settings, so a result seen after the setting changed still says what produced it.
417
- command: z
418
- .string()
419
- .describe(
420
- "What actually ran, echoed here rather than read back from the settings, so a result looked at after the setting changed still says what produced it.",
421
- ),
422
- startedAt: z.number().optional().describe("When it began, in milliseconds."),
423
- finishedAt: z.number().optional().describe("When it ended, in milliseconds."),
424
- exitCode: z.number().optional().describe("How the command exited."),
425
- timedOut: z.boolean().optional().describe("It was killed for taking too long rather than finishing."),
426
- // The tmux session to open, since watching a run is the terminal panel's job, not this object's; absent where the
427
- // sandbox has no tmux wrapper.
428
- session: z
429
- .string()
430
- .optional()
431
- .describe(
432
- "The terminal it runs in, which is where to watch it. Absent where the sandbox has no terminals, in which case there is nothing to attach to.",
433
- ),
434
- // Tail-capped plain text, colour codes and redrawn progress lines stripped, so a fix prompt quotes a verdict, not
435
- // terminal litter; empty while running or for a killed run.
436
- output: z
437
- .string()
438
- .describe(
439
- "The end of what it printed, as plain text with the colour codes and redrawn progress lines resolved away. The end rather than the beginning, because a suite's verdict is at the end. Empty while it runs, and for one that was killed.",
440
- ),
406
+
407
+ // ---- (2026-11-25) CI events for code: GET /ci/feed ------------------------------------------------------------------
408
+ // What the forges' webhooks (and the poller, for repositories without one) said, as it is heard, for a program rather
409
+ // than an agent: the Deployments extension's engine starts a deploy the moment the job that publishes images passes,
410
+ // not when the whole workflow ends. A Server-Sent Events stream of these frames, one `data:` line each; a reader that
411
+ // was away reads `/ci/runs` to catch up on runs (jobs it missed are gone, so a trigger should also accept the run).
412
+ // Reached by an extension that declares `GET /ci/feed` in its `permissions.daemon`; listener automations are not fed
413
+ // job frames, which are many.
414
+ // (2026-11-26) What the forge said of one failed job (`failed` on its `job` frame), for main's fix agent in the pipelines
415
+ // extension: the forge's id for it, which its log is read by (POST /ci/jobs/log), the step it failed in first and every
416
+ // step it failed in where the forge names steps, the forge's reason (GitLab's `failure_reason`; on GitHub, why a job it
417
+ // reports as cancelled failed after all: `timed_out` or `runner_unavailable`), what set its run off where the core knows,
418
+ // its check run annotations where they were read, and the runner that ran it.
419
+ export const CiJobFailureSchema = z.object({
420
+ jobId: z.number(),
421
+ step: z.string().optional(),
422
+ steps: z.array(z.string()).optional(),
423
+ reason: z.string().optional(),
424
+ trigger: z.string().optional(),
425
+ annotations: z.array(z.string()).optional(),
426
+ runner: z.string().optional(),
427
+ });
428
+ export type CiJobFailure = z.infer<typeof CiJobFailureSchema>;
429
+ export const CiFeedEventSchema = z.discriminatedUnion("kind", [
430
+ z.object({
431
+ kind: z.literal("run"),
432
+ run: PipelineRunSchema,
433
+ }),
434
+ z.object({
435
+ kind: z.literal("job"),
436
+ repo: z.string(),
437
+ host: CiHostSchema,
438
+ project: z.string(),
439
+ runId: z.number(),
440
+ workflow: z.string().optional(),
441
+ job: z.string(),
442
+ branch: z.string(),
443
+ sha: z.string(),
444
+ status: PipelineStatusSchema,
445
+ url: z.string(),
446
+ // (2026-11-26) Present on a job that failed, a job allowed to fail excepted: what the forge said of it.
447
+ failed: CiJobFailureSchema.optional(),
448
+ }),
449
+ ]);
450
+ export type CiFeedEvent = z.infer<typeof CiFeedEventSchema>;
451
+
452
+
453
+ // (2026-11-26) Whether a CI job's step is one the runner owns rather than the repository (Set up job, Complete job, a Post
454
+ // step): a job that died in one never ran a line of the checkout, so an agent on the code can do nothing for it. The one
455
+ // list `_tools/constants` keeps for the CI audit script, read here for the pipelines extension's fix agent and board.
456
+ export const isCiInfraStep = (step: string): boolean => isInfraStep(step);
457
+
458
+ // ---- (2026-11-26) the forge's word for a program: what main's fix agent and the Pipelines board read ---------------------
459
+ // The forge clients and their credentials are the core's (CI ingestion); main's fix agent and the Pipelines board's
460
+ // backend are the pipelines extension's, which reads the forges through these, each declared in its
461
+ // `permissions.daemon`. Each resolves repo -> project and token per call, as every CI route does.
462
+
463
+ // One failed job of a run, as the forge lists it (POST /ci/runs/failed-steps): every job that failed, and every one the
464
+ // forge reports as cancelled whose cancel was a failure after all, in the run's order; a job allowed to fail is none.
465
+ export const CiFailedStepSchema = z.object({
466
+ job: z.string().describe("The job, by name."),
467
+ id: z.number().describe("The forge's id for it, which its log is read by."),
468
+ step: z.string().optional().describe("The first step that failed it, where the forge names steps."),
469
+ steps: z.array(z.string()).optional().describe("Every step that failed it, in order, where the forge names steps."),
470
+ reason: z.string().optional().describe("The forge's own word for why it failed, where it gives one."),
471
+ annotations: z.array(z.string()).optional().describe("What its check run annotations say, where the forge has them."),
472
+ runner: z.string().optional().describe("The runner that ran it, by the name its forge knows it by."),
473
+ });
474
+ export type CiFailedStep = z.infer<typeof CiFailedStepSchema>;
475
+ export const CiFailedStepsResponseSchema = z.object({ steps: z.array(CiFailedStepSchema).describe("The run's failed jobs, in its order.") });
476
+ export const CiPassedJobsResponseSchema = z.object({ jobs: z.array(z.string()).describe("The names of the run's jobs that passed.") });
477
+ export const CiRunListParamSchema = z.object({
478
+ repo: z.string().describe("Which workspace repository."),
479
+ limit: z.number().int().min(1).max(100).describe("How many of its newest runs."),
480
+ });
481
+ export const CiRunListResponseSchema = z.object({ runs: z.array(PipelineRunSchema).describe("Its newest runs, newest first, asked of the forge now.") });
482
+ export const CiRunResponseSchema = z.object({ run: PipelineRunSchema.describe("The run, asked of the forge now.") });
483
+ // The workflow file a GitHub run ran, at its commit, and every reusable workflow it calls that could be read, by the key
484
+ // its call names it with: what the board's backend draws the run's job graph from. Absent where the forge has no such
485
+ // file (GitLab) or it could not be read.
486
+ export const CiRunWorkflowResponseSchema = z.object({
487
+ root: z.string().optional().describe("The run's workflow file, at the run's commit."),
488
+ called: z.record(z.string(), z.string()).describe("Each reusable workflow it calls that could be read, by the key its call names it with."),
489
+ });
490
+ export const CiJobParamSchema = z.object({
491
+ repo: z.string().describe("Which workspace repository."),
492
+ jobId: z.number().describe("Which job, by the forge's own id."),
493
+ });
494
+ export const CiJobLogResponseSchema = z.object({
495
+ log: z.string().describe("The job's whole log, as plain text; a log the forge would not serve says so in place of it."),
496
+ });
497
+ export const CiJobAnnotationsResponseSchema = z.object({ annotations: z.array(z.string()).describe("What the job's check run annotations say.") });
498
+ // Each repository wired to CI, and which branches are its main line: the forge's default branch, learned at the hook
499
+ // reconcile and from every delivery, else the clone's `origin/HEAD`, else `main` and `master` both (ci/main-line.ts).
500
+ export const CiMainLineSchema = z.object({
501
+ repo: z.string().describe("Which workspace repository."),
502
+ host: CiHostSchema.describe("Which forge it lives on."),
503
+ project: z.string().describe("The project there."),
504
+ branches: z.array(z.string()).describe("Its main line: the default branch, or `main` and `master` when nothing has said which."),
505
+ named: z.boolean().describe("Whether the forge or the clone named the default branch, rather than the two usual names standing in."),
506
+ concluded: z
507
+ .array(z.object({ branch: z.string(), status: z.enum(["success", "failed"]), at: z.number() }))
508
+ .describe("The newest finished run heard on each of those branches, any workflow: how it ended and when it was heard. Empty when none was."),
509
+ });
510
+ export type CiMainLine = z.infer<typeof CiMainLineSchema>;
511
+ export const CiMainLinesResponseSchema = z.object({ lines: z.array(CiMainLineSchema) });
512
+ // An extension taking main lines' failures for itself (POST /ci/main-lines/claim): while a claim of an enabled extension
513
+ // stands, a main line's failure reaches no `ci` automation listening on every branch (ci/events.ts), so the extension's
514
+ // one fix agent is the only agent on it. Kept across restarts; an extension switched off holds none.
515
+ export const CiMainLineClaimSchema = z.object({ claimed: z.boolean().describe("Take main lines' failures (true), or let them go (false).") });
516
+ // What the sandbox's own test runs saw fail on clean trees at main commits (GET /ci/main/local), in rows and in words.
517
+ export const CiLocalMainResponseSchema = z.object({
518
+ local: z.array(CiLocalMainSchema),
519
+ text: z.string().describe("The same in words, as `agents ci` prints it below CI's own; empty when nothing is recorded."),
520
+ });
521
+
522
+ // ---- (2026-11-26) main's repair, as the daemon kept it until it moved to the pipelines extension ---------------------
523
+ // The shapes `.intentic/secrets/ci.json` held for main's one fix agent (`failures`, `passes`, `fleetReruns`,
524
+ // `ownerSteps`), handed once to the extension that takes main's repair over (POST /ci/repair/hand-over), so a sandbox's
525
+ // streaks, their turn counts and its fix agents carry across the update.
526
+
527
+ // One job failing on a main-line branch: its name, under the workflow it is a job of as its `source`, and an id derived
528
+ // from both, so the same job failing again in a later run is the same finding.
529
+ export const CiFindingSchema = z.object({
530
+ id: z.string(),
531
+ source: z.string(),
532
+ text: z.string(),
533
+ // Whether it failed by running out of time, the last time it failed.
534
+ timedOut: z.boolean().optional(),
535
+ // What the fixer read of the job when it last failed: the run and its commit, when it was read, and the error lines
536
+ // its log named. Absent on a finding kept before 2026-11-17.
537
+ runId: z.number().optional(),
538
+ sha: z.string().optional(),
539
+ readAt: z.number().optional(),
540
+ errors: z.array(z.string()).optional(),
541
+ });
542
+ export type CiFinding = z.infer<typeof CiFindingSchema>;
543
+ // Main's CI failing on one branch, as its one fix agent's streak keeps it.
544
+ export const CiFailureSchema = z.object({
545
+ // When its first job failed, which began the streak.
546
+ since: z.number(),
547
+ findings: z.array(CiFindingSchema).default([]),
548
+ // Oldest first.
549
+ decisions: z.array(MainFailureDecisionSchema).default([]),
550
+ // The run the streak began in, which names its fix agent, and the newest run failing on it.
551
+ firstRunId: z.number(),
552
+ runId: z.number(),
553
+ // How many runs have failed on it.
554
+ count: z.number(),
555
+ // Each workflow failing on it, with the newest run of it that failed. Empty for a failure kept before 2026-09-27.
556
+ workflows: z.record(z.string(), z.number()).default({}),
557
+ // Each workflow in `workflows`, timed apart (2026-11-03): when it began failing, when it last failed, and what set its
558
+ // newest failed run off.
559
+ spans: z.record(z.string(), z.object({ since: z.number(), failedAt: z.number(), trigger: z.string().optional() })).default({}),
560
+ // Every failed job the streak has heard of, as `<runId>/<jobId>`, oldest first. Bounded.
561
+ heard: z.array(z.string()).default([]),
562
+ // Turns the sandbox started for its fix agent this streak; a person's Fix press gives them back.
563
+ turns: z.number().default(0),
564
+ // Whether its fix agent has left a change this streak.
565
+ changed: z.boolean().default(false),
566
+ });
567
+ export type CiFailure = z.infer<typeof CiFailureSchema>;
568
+ export const CiOwnerStepKeptSchema = z.object({ step: z.string(), at: z.number() });
569
+ export const CiRepairHandOverSchema = z.object({
570
+ // Keyed "<repo>\n<branch>": only branches failing when it was handed over.
571
+ failures: z.record(z.string(), CiFailureSchema),
572
+ // Keyed like `failures`: the newest run of each workflow that passed on a main-line branch.
573
+ passes: z.record(z.string(), z.record(z.string(), z.number())),
574
+ // Keyed by workspace repo: the runs re-run because the CI fleet, not the code, failed them, newest first.
575
+ fleetReruns: z.record(z.string(), z.array(z.number())),
576
+ // Keyed by fix conversation id: the step outside the repository its latest turn ended on.
577
+ ownerSteps: z.record(z.string(), CiOwnerStepKeptSchema),
578
+ // Whether the owner had switched repairs off in the sandbox's own setting, which the taking extension's own setting
579
+ // of the same name now holds. Absent: they had not.
580
+ autoRepair: z.literal(false).optional(),
441
581
  });
442
- export type CommandRun = z.infer<typeof CommandRunSchema>;
582
+ export type CiRepairHandOver = z.infer<typeof CiRepairHandOverSchema>;
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
 
3
3
  // The class of thing asking to start a session, the admission policy's key space; derived daemon-side, never sent by a
4
4
  // client. Chat and loops are absent since both begin with the owner's own click.
5
- export const WakeSourceSchema = z.enum(["schedule", "event", "listener", "webchat", "issues", "workspace", "workflow"]);
5
+ export const WakeSourceSchema = z.enum(["schedule", "event", "listener", "webchat", "issues", "contact", "workspace", "workflow"]);
6
6
  export type WakeSource = z.infer<typeof WakeSourceSchema>;
7
7
  // One admission verdict the owner can configure: let it run, hold it for approval, or refuse it outright.
8
8
  export const AdmissionRuleSchema = z.enum(["allow", "hold", "deny"]);
@@ -51,6 +51,9 @@ export const AdmissionPolicySchema = z.object({
51
51
  // Defaults to hold, unlike the others: a bug-report wake has full repo powers and a stranger's stack trace as its
52
52
  // brief.
53
53
  issues: AdmissionRuleSchema.default("hold"),
54
+ // (2026-11-27) Held by default too, like `issues`: a contact request comes from a sandbox nobody here accepted yet,
55
+ // and the brief of the work it starts is that stranger's request and note.
56
+ contact: AdmissionRuleSchema.default("hold"),
54
57
  workspace: AdmissionRuleSchema.default("allow"),
55
58
  workflow: z.enum(["allow", "deny"]).default("allow"),
56
59
  });
@@ -0,0 +1,44 @@
1
+ import { z } from "zod";
2
+
3
+ // One shape for any command the daemon runs on a click with a verdict and a quotable tail (the push via PushRunSchema in
4
+ // schemas/git/git.ts, which runs the repository's own pre-push hook), so the fields the browser reads (terminal, tail,
5
+ // kill vs timeout) have one definition.
6
+ // idle: nothing has run yet, or the last run was cleared
7
+ // running: live; its output is the terminal's, not this object's
8
+ // passed: exited 0
9
+ // failed: exited non-zero, or killed by its ceiling (`timedOut`)
10
+ // error: not spawnable at all; not fixable, since nothing is wrong with the code
11
+ // cancelled: the user stopped it
12
+ export const CommandRunStatusSchema = z.enum(["idle", "running", "passed", "failed", "error", "cancelled"]);
13
+ export type CommandRunStatus = z.infer<typeof CommandRunStatusSchema>;
14
+ export const CommandRunSchema = z.object({
15
+ status: CommandRunStatusSchema.describe(
16
+ "Where the run is. Failed and error are deliberately different: failed means the code is wrong, error means the command could not be run at all, and calling the second one a test failure would send an agent hunting a bug that is not there.",
17
+ ),
18
+ // Echoed rather than read from settings, so a result seen after the setting changed still says what produced it.
19
+ command: z
20
+ .string()
21
+ .describe(
22
+ "What actually ran, echoed here rather than read back from the settings, so a result looked at after the setting changed still says what produced it.",
23
+ ),
24
+ startedAt: z.number().optional().describe("When it began, in milliseconds."),
25
+ finishedAt: z.number().optional().describe("When it ended, in milliseconds."),
26
+ exitCode: z.number().optional().describe("How the command exited."),
27
+ timedOut: z.boolean().optional().describe("It was killed for taking too long rather than finishing."),
28
+ // The tmux session to open, since watching a run is the terminal panel's job, not this object's; absent where the
29
+ // sandbox has no tmux wrapper.
30
+ session: z
31
+ .string()
32
+ .optional()
33
+ .describe(
34
+ "The terminal it runs in, which is where to watch it. Absent where the sandbox has no terminals, in which case there is nothing to attach to.",
35
+ ),
36
+ // Tail-capped plain text, colour codes and redrawn progress lines stripped, so a fix prompt quotes a verdict, not
37
+ // terminal litter; empty while running or for a killed run.
38
+ output: z
39
+ .string()
40
+ .describe(
41
+ "The end of what it printed, as plain text with the colour codes and redrawn progress lines resolved away. The end rather than the beginning, because a suite's verdict is at the end. Empty while it runs, and for one that was killed.",
42
+ ),
43
+ });
44
+ export type CommandRun = z.infer<typeof CommandRunSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ import { S2S_NOTE_MAX, S2sAddressSchema, S2sGrantsSchema, S2sRefSchema } from "./s2s-identity.js";
3
+
4
+ // The `contact` need (schemas/needs.ts, docs/architecture/messages.md): an agent never makes or accepts a contact itself,
5
+ // it raises a card a person presses. Its own module, importing only the identity shapes, since needs.ts is imported by
6
+ // modules the s2s wire shapes import in turn. Re-exported from schemas/s2s.ts.
7
+
8
+ export const ContactNeedSchema = z.object({
9
+ kind: z.literal("contact"),
10
+ address: S2sAddressSchema.describe("The sandbox to add, or the one whose request to accept."),
11
+ action: z.enum(["add", "accept"]),
12
+ contactId: S2sRefSchema.optional().describe("The waiting request's contact, for an accept."),
13
+ grants: S2sGrantsSchema.describe("What this sandbox would let it do here."),
14
+ note: z.string().max(S2S_NOTE_MAX).optional().describe("The note the request carries, for an add."),
15
+ });
16
+ export type ContactNeed = z.infer<typeof ContactNeedSchema>;
17
+ // What the agent may send: the address (or the waiting contact) and the grants it proposes; the daemon resolves the rest.
18
+ export const ContactNeedAskSchema = z.object({
19
+ kind: z.literal("contact"),
20
+ action: z.enum(["add", "accept"]),
21
+ address: z.string().trim().min(1).max(300).optional().describe("The sandbox to add, as the agent has it."),
22
+ contactId: S2sRefSchema.optional().describe("The waiting request to accept."),
23
+ grants: S2sGrantsSchema.prefault({}).describe("What it proposes the contact may do here; messages only when left out."),
24
+ note: z.string().max(S2S_NOTE_MAX).optional(),
25
+ });
26
+ export type ContactNeedAsk = z.infer<typeof ContactNeedAskSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+
3
+ // (2026-11-27) How this sandbox takes contacts, read by the daemon's contacts (s2s/, docs/architecture/messages.md) when an
4
+ // agent accepts a contact request. Off by default: an agent never makes or accepts a contact on its own, it raises a card
5
+ // for a person.
6
+ export const ContactsSettingsSchema = z
7
+ .object({
8
+ agentMayAccept: z
9
+ .boolean()
10
+ .default(false)
11
+ .describe(
12
+ "Let an automation's agent accept a contact request by itself, giving it messages only. Off, every accept waits for a person's press on a card.",
13
+ ),
14
+ })
15
+ .prefault({})
16
+ .describe("How this sandbox takes contacts, the other sandboxes it exchanges messages with.");
@@ -98,40 +98,34 @@ export const AuditSettingsSchema = z.object({
98
98
  });
99
99
  export type AuditSettings = z.infer<typeof AuditSettingsSchema>;
100
100
 
101
- // Every outward action the agent can take that the action rules (SandboxSettings.actionRules) gate, by the key its gate
102
- // consults: the outbound sniffer's (the daemon's activity/outbound.ts: discord, slack, telegram, whatsapp) and the
103
- // subagent gate's (guard/actions.ts childSpawn). Writes only: a rule on `messages.read` would hold a bot reading its own
104
- // channel. Email sending is the key the IMAP extension's sender consults (_extensions/imap/src/send.ts); the three
105
- // `microsoft365.*` keys are what `m365` consults before sending, changing a calendar or uploading
106
- // (_extensions/microsoft-365/src/actions.ts); the `ezdrp.*` and `edoreczenia.*` keys are the office acts the e-urzad
107
- // extension's guard consults (src/core/guard.ts in intentic/extension-e-urzad): registering mail and adding files in EZD RP, sending
108
- // an e-Doręczenia delivery, and opening one, the one read here with legal effect (it can make the delivery received).
109
- // One list for the public-office preset, which holds every one of them, and the editor's Guardrails page, which sets them.
110
- export const OUTWARD_ACTION_KEYS = [
111
- "discord.message.send",
112
- "discord.reaction.add",
113
- "slack.message.send",
114
- "slack.message.edit",
115
- "slack.reaction.add",
116
- "slack.reaction.remove",
117
- "telegram.message.send",
118
- "telegram.message.edit",
119
- "telegram.reaction.add",
120
- "whatsapp.message.send",
121
- "imap.message.send",
122
- "microsoft365.mail.send",
123
- "microsoft365.calendar.write",
124
- "microsoft365.files.upload",
125
- "ezdrp.document.register-incoming",
126
- "ezdrp.document.register-outgoing",
127
- "ezdrp.case.attach-draft",
128
- "edoreczenia.delivery.send",
129
- "edoreczenia.delivery.open",
130
- "agents.spawn",
131
- ] as const;
132
- export type OutwardActionKey = (typeof OUTWARD_ACTION_KEYS)[number];
101
+ // The outward action the core's own gate consults: starting a subagent (the daemon's guard/actions.ts childSpawn). Every
102
+ // other key the action rules (SandboxSettings.actionRules) gate is declared by the extension that performs it, as
103
+ // `<card id>.<action>` (a cli card's `broker.actions` and `commandActions`, extension-manifest capability-broker.ts), and
104
+ // the daemon serves the enabled extensions' union (`GET /settings/outward-actions`) to the Guardrails page and the
105
+ // public-office preset. Writes only: a rule on `messages.read` would hold a bot reading its own channel.
106
+ // (2026-11-25) Until then this file listed every service's keys (Discord, Slack, Telegram and WhatsApp, which the
107
+ // daemon's outbound sniffer matched; IMAP and Microsoft 365, whose CLIs consult them; e-urzad's office acts), and the
108
+ // list drifted from what the gates consulted. A stored rule keeps its key, so every one written before still applies.
109
+ export const SPAWN_ACTION_KEY = "agents.spawn";
133
110
 
134
- // The service an action key belongs to: its first segment (`discord`, `imap`, `agents`).
111
+ export const OutwardActionSchema = z.object({
112
+ key: z.string().min(1).describe("The key a rule for it is written under: `<card id>.<action>`, such as `slack.message.send`."),
113
+ extension: z.string().min(1).describe("The enabled extension that declares it (`publisher.name`)."),
114
+ unruled: z
115
+ .literal("hold")
116
+ .optional()
117
+ .describe("What it comes to while no rule names it, when that is not allow: its tool holds it for the owner until a rule says otherwise."),
118
+ });
119
+ export type OutwardAction = z.infer<typeof OutwardActionSchema>;
120
+
121
+ export const OutwardActionsSchema = z.object({
122
+ actions: z
123
+ .array(OutwardActionSchema)
124
+ .describe("Every outward action the enabled extensions declare that is more than a read, once each. Starting a subagent is the sandbox's own, and not among them."),
125
+ });
126
+ export type OutwardActions = z.infer<typeof OutwardActionsSchema>;
127
+
128
+ // The service an action key belongs to: its first segment, the card id (`discord`, `imap`), or `agents`.
135
129
  export const outwardActionService = (key: string): string => key.split(".")[0] ?? key;
136
130
 
137
131
  // The rule an action's gate applies today: the exact key, else the service's wildcard (guard/actions.ts outboundSend).
@@ -141,7 +135,7 @@ export const effectiveActionRule = (rules: Readonly<Record<string, AdmissionRule
141
135
  if (rules[key] !== undefined) {
142
136
  return rules[key];
143
137
  }
144
- return key === "agents.spawn" ? undefined : rules[`${outwardActionService(key)}.*`];
138
+ return key === SPAWN_ACTION_KEY ? undefined : rules[`${outwardActionService(key)}.*`];
145
139
  };
146
140
 
147
141
  export const AI_NOTICE_TEXT_MAX = 4000;