toolroll 0.5.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 (626) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1113 -0
  3. package/THIRD_PARTY_NOTICES.md +449 -0
  4. package/dist/accent-colors.d.ts +48 -0
  5. package/dist/accent-colors.js +122 -0
  6. package/dist/action-ledger.d.ts +26 -0
  7. package/dist/action-ledger.js +75 -0
  8. package/dist/agent-fence.d.ts +42 -0
  9. package/dist/agent-fence.js +183 -0
  10. package/dist/agentconfig.d.ts +216 -0
  11. package/dist/agentconfig.js +454 -0
  12. package/dist/api-tokens.d.ts +16 -0
  13. package/dist/api-tokens.js +27 -0
  14. package/dist/approval-policy.d.ts +69 -0
  15. package/dist/approval-policy.js +137 -0
  16. package/dist/approval-rules-ui.d.ts +25 -0
  17. package/dist/approval-rules-ui.js +39 -0
  18. package/dist/assignment-adapters.d.ts +180 -0
  19. package/dist/assignment-adapters.js +239 -0
  20. package/dist/assignment-brief.d.ts +71 -0
  21. package/dist/assignment-brief.js +129 -0
  22. package/dist/assignment-delivery.d.ts +56 -0
  23. package/dist/assignment-delivery.js +160 -0
  24. package/dist/assignment-presentation.d.ts +26 -0
  25. package/dist/assignment-presentation.js +80 -0
  26. package/dist/assignment-status.d.ts +62 -0
  27. package/dist/assignment-status.js +152 -0
  28. package/dist/assignment-ui.d.ts +71 -0
  29. package/dist/assignment-ui.js +103 -0
  30. package/dist/assignment.d.ts +222 -0
  31. package/dist/assignment.js +399 -0
  32. package/dist/attest.d.ts +56 -0
  33. package/dist/attest.js +153 -0
  34. package/dist/backend.d.ts +97 -0
  35. package/dist/backend.js +166 -0
  36. package/dist/backup-ui.d.ts +22 -0
  37. package/dist/backup-ui.js +59 -0
  38. package/dist/backup.d.ts +84 -0
  39. package/dist/backup.js +421 -0
  40. package/dist/beads.d.ts +34 -0
  41. package/dist/beads.js +135 -0
  42. package/dist/bin.d.ts +2 -0
  43. package/dist/bin.js +22 -0
  44. package/dist/board.d.ts +150 -0
  45. package/dist/board.js +210 -0
  46. package/dist/boot-identity.d.ts +63 -0
  47. package/dist/boot-identity.js +99 -0
  48. package/dist/browser/THIRD_PARTY_NOTICES.txt +2295 -0
  49. package/dist/browser/workspace.css +4 -0
  50. package/dist/browser/workspace.js +225 -0
  51. package/dist/browser-crew.d.ts +11 -0
  52. package/dist/browser-crew.js +50 -0
  53. package/dist/browser-shell.d.ts +8 -0
  54. package/dist/browser-shell.js +60 -0
  55. package/dist/browser-workspace.d.ts +780 -0
  56. package/dist/browser-workspace.js +47 -0
  57. package/dist/budget-alerts.d.ts +19 -0
  58. package/dist/budget-alerts.js +46 -0
  59. package/dist/builder.d.ts +370 -0
  60. package/dist/builder.js +3262 -0
  61. package/dist/capscan.d.ts +35 -0
  62. package/dist/capscan.js +113 -0
  63. package/dist/chat-acceptance.d.ts +71 -0
  64. package/dist/chat-acceptance.js +120 -0
  65. package/dist/chat-actions.d.ts +265 -0
  66. package/dist/chat-actions.js +1273 -0
  67. package/dist/chat-channel.d.ts +109 -0
  68. package/dist/chat-channel.js +652 -0
  69. package/dist/chat-continuity.d.ts +32 -0
  70. package/dist/chat-continuity.js +317 -0
  71. package/dist/chat-controls.d.ts +113 -0
  72. package/dist/chat-controls.js +53 -0
  73. package/dist/chat-delivery-state.d.ts +159 -0
  74. package/dist/chat-delivery-state.js +309 -0
  75. package/dist/chat-delivery.d.ts +38 -0
  76. package/dist/chat-delivery.js +693 -0
  77. package/dist/chat-display.d.ts +1 -0
  78. package/dist/chat-display.js +18 -0
  79. package/dist/chat-evidence.d.ts +123 -0
  80. package/dist/chat-evidence.js +207 -0
  81. package/dist/chat-flow.d.ts +44 -0
  82. package/dist/chat-flow.js +215 -0
  83. package/dist/chat-inbox.d.ts +57 -0
  84. package/dist/chat-inbox.js +123 -0
  85. package/dist/chat-polish.d.ts +16 -0
  86. package/dist/chat-polish.js +135 -0
  87. package/dist/chat-review.d.ts +46 -0
  88. package/dist/chat-review.js +98 -0
  89. package/dist/chat-rooms.d.ts +123 -0
  90. package/dist/chat-rooms.js +216 -0
  91. package/dist/chat-task-actions.d.ts +44 -0
  92. package/dist/chat-task-actions.js +79 -0
  93. package/dist/check-progress.d.ts +51 -0
  94. package/dist/check-progress.js +290 -0
  95. package/dist/child-database.d.ts +12 -0
  96. package/dist/child-database.js +30 -0
  97. package/dist/claim.d.ts +688 -0
  98. package/dist/claim.js +1740 -0
  99. package/dist/cli.d.ts +137 -0
  100. package/dist/cli.js +1461 -0
  101. package/dist/codex-limits.d.ts +15 -0
  102. package/dist/codex-limits.js +145 -0
  103. package/dist/coding-context.d.ts +55 -0
  104. package/dist/coding-context.js +92 -0
  105. package/dist/coding-handoff.d.ts +57 -0
  106. package/dist/coding-handoff.js +277 -0
  107. package/dist/coding-provider.d.ts +72 -0
  108. package/dist/coding-provider.js +424 -0
  109. package/dist/coding-shipping-ui.d.ts +4 -0
  110. package/dist/coding-shipping-ui.js +12 -0
  111. package/dist/coding-types.d.ts +62 -0
  112. package/dist/coding-types.js +1 -0
  113. package/dist/coding-ui.d.ts +17 -0
  114. package/dist/coding-ui.js +364 -0
  115. package/dist/coding-update.d.ts +15 -0
  116. package/dist/coding-update.js +149 -0
  117. package/dist/coding-workspace.d.ts +124 -0
  118. package/dist/coding-workspace.js +768 -0
  119. package/dist/container-state.d.ts +5 -0
  120. package/dist/container-state.js +62 -0
  121. package/dist/containment.d.ts +197 -0
  122. package/dist/containment.js +559 -0
  123. package/dist/contest.d.ts +318 -0
  124. package/dist/contest.js +753 -0
  125. package/dist/control-setup.d.ts +35 -0
  126. package/dist/control-setup.js +40 -0
  127. package/dist/control-ui.d.ts +29 -0
  128. package/dist/control-ui.js +53 -0
  129. package/dist/controller-service.d.ts +1 -0
  130. package/dist/controller-service.js +19 -0
  131. package/dist/controller-supervisor.d.ts +30 -0
  132. package/dist/controller-supervisor.js +104 -0
  133. package/dist/converse.d.ts +304 -0
  134. package/dist/converse.js +849 -0
  135. package/dist/coordinator-proposals.d.ts +29 -0
  136. package/dist/coordinator-proposals.js +137 -0
  137. package/dist/coordinator.d.ts +186 -0
  138. package/dist/coordinator.js +447 -0
  139. package/dist/credentials-ui.d.ts +25 -0
  140. package/dist/credentials-ui.js +48 -0
  141. package/dist/daemon.d.ts +209 -0
  142. package/dist/daemon.js +604 -0
  143. package/dist/decision.d.ts +120 -0
  144. package/dist/decision.js +388 -0
  145. package/dist/demo.d.ts +55 -0
  146. package/dist/demo.js +992 -0
  147. package/dist/desktop-access.d.ts +28 -0
  148. package/dist/desktop-access.js +88 -0
  149. package/dist/desktop-bundle.d.ts +16 -0
  150. package/dist/desktop-bundle.js +74 -0
  151. package/dist/desktop-host.d.ts +54 -0
  152. package/dist/desktop-host.js +508 -0
  153. package/dist/desktop-update-gate.d.ts +12 -0
  154. package/dist/desktop-update-gate.js +91 -0
  155. package/dist/desktop-update-recovery.d.ts +14 -0
  156. package/dist/desktop-update-recovery.js +243 -0
  157. package/dist/desktop-update.d.ts +110 -0
  158. package/dist/desktop-update.js +740 -0
  159. package/dist/discord-api.d.ts +20 -0
  160. package/dist/discord-api.js +138 -0
  161. package/dist/discord-chat.d.ts +16 -0
  162. package/dist/discord-chat.js +381 -0
  163. package/dist/discord-settings.d.ts +7 -0
  164. package/dist/discord-settings.js +75 -0
  165. package/dist/discord.d.ts +10 -0
  166. package/dist/discord.js +169 -0
  167. package/dist/discover.d.ts +75 -0
  168. package/dist/discover.js +150 -0
  169. package/dist/dispatch.d.ts +100 -0
  170. package/dist/dispatch.js +311 -0
  171. package/dist/dispose.d.ts +161 -0
  172. package/dist/dispose.js +803 -0
  173. package/dist/email-settings.d.ts +34 -0
  174. package/dist/email-settings.js +50 -0
  175. package/dist/envelope.d.ts +47 -0
  176. package/dist/envelope.js +105 -0
  177. package/dist/evidence-pack.d.ts +185 -0
  178. package/dist/evidence-pack.js +258 -0
  179. package/dist/evidence.d.ts +345 -0
  180. package/dist/evidence.js +782 -0
  181. package/dist/exec.d.ts +285 -0
  182. package/dist/exec.js +1841 -0
  183. package/dist/exhaustion.d.ts +85 -0
  184. package/dist/exhaustion.js +141 -0
  185. package/dist/export-ui.d.ts +4 -0
  186. package/dist/export-ui.js +17 -0
  187. package/dist/export.d.ts +48 -0
  188. package/dist/export.js +305 -0
  189. package/dist/flow-actions.d.ts +77 -0
  190. package/dist/flow-actions.js +203 -0
  191. package/dist/flow-code.d.ts +50 -0
  192. package/dist/flow-code.js +159 -0
  193. package/dist/flow-draft.d.ts +38 -0
  194. package/dist/flow-draft.js +80 -0
  195. package/dist/flow-engine.d.ts +66 -0
  196. package/dist/flow-engine.js +416 -0
  197. package/dist/flow-insights.d.ts +95 -0
  198. package/dist/flow-insights.js +149 -0
  199. package/dist/flow-live.d.ts +24 -0
  200. package/dist/flow-live.js +150 -0
  201. package/dist/flow-people.d.ts +24 -0
  202. package/dist/flow-people.js +91 -0
  203. package/dist/flow-replies.d.ts +48 -0
  204. package/dist/flow-replies.js +113 -0
  205. package/dist/flow-scripts.d.ts +38 -0
  206. package/dist/flow-scripts.js +73 -0
  207. package/dist/flow-secrets.d.ts +13 -0
  208. package/dist/flow-secrets.js +45 -0
  209. package/dist/flow-sort.d.ts +82 -0
  210. package/dist/flow-sort.js +153 -0
  211. package/dist/flow-steps.d.ts +40 -0
  212. package/dist/flow-steps.js +408 -0
  213. package/dist/flow-triggers.d.ts +244 -0
  214. package/dist/flow-triggers.js +959 -0
  215. package/dist/flows-ui.d.ts +20 -0
  216. package/dist/flows-ui.js +175 -0
  217. package/dist/flows.d.ts +229 -0
  218. package/dist/flows.js +968 -0
  219. package/dist/fonts.d.ts +19 -0
  220. package/dist/fonts.js +19 -0
  221. package/dist/gaps.d.ts +35 -0
  222. package/dist/gaps.js +101 -0
  223. package/dist/gate-failure.d.ts +40 -0
  224. package/dist/gate-failure.js +66 -0
  225. package/dist/git.d.ts +54 -0
  226. package/dist/git.js +94 -0
  227. package/dist/google-mail.d.ts +58 -0
  228. package/dist/google-mail.js +151 -0
  229. package/dist/grant.d.ts +136 -0
  230. package/dist/grant.js +238 -0
  231. package/dist/graph.d.ts +164 -0
  232. package/dist/graph.js +383 -0
  233. package/dist/guides.d.ts +22 -0
  234. package/dist/guides.js +363 -0
  235. package/dist/held.d.ts +150 -0
  236. package/dist/held.js +799 -0
  237. package/dist/invoke.d.ts +112 -0
  238. package/dist/invoke.js +780 -0
  239. package/dist/issues.d.ts +41 -0
  240. package/dist/issues.js +131 -0
  241. package/dist/job-object-helper.ps1 +252 -0
  242. package/dist/jsonl-discriminants.d.ts +11 -0
  243. package/dist/jsonl-discriminants.js +93 -0
  244. package/dist/keys.d.ts +104 -0
  245. package/dist/keys.js +229 -0
  246. package/dist/kits-ui.d.ts +17 -0
  247. package/dist/kits-ui.js +46 -0
  248. package/dist/kits.d.ts +86 -0
  249. package/dist/kits.js +215 -0
  250. package/dist/knowledge-cli.d.ts +101 -0
  251. package/dist/knowledge-cli.js +92 -0
  252. package/dist/knowledge-ui.d.ts +24 -0
  253. package/dist/knowledge-ui.js +40 -0
  254. package/dist/lead-context.d.ts +8 -0
  255. package/dist/lead-context.js +56 -0
  256. package/dist/lead-follow.d.ts +22 -0
  257. package/dist/lead-follow.js +167 -0
  258. package/dist/lead-status.d.ts +75 -0
  259. package/dist/lead-status.js +285 -0
  260. package/dist/ledger-chain.d.ts +46 -0
  261. package/dist/ledger-chain.js +187 -0
  262. package/dist/ledger-csv.d.ts +4 -0
  263. package/dist/ledger-csv.js +11 -0
  264. package/dist/ledger-view.d.ts +24 -0
  265. package/dist/ledger-view.js +58 -0
  266. package/dist/limits-ui.d.ts +26 -0
  267. package/dist/limits-ui.js +67 -0
  268. package/dist/link.d.ts +72 -0
  269. package/dist/link.js +217 -0
  270. package/dist/live.d.ts +96 -0
  271. package/dist/live.js +366 -0
  272. package/dist/liveness.d.ts +30 -0
  273. package/dist/liveness.js +42 -0
  274. package/dist/log.d.ts +7 -0
  275. package/dist/log.js +25 -0
  276. package/dist/mailbox.d.ts +57 -0
  277. package/dist/mailbox.js +150 -0
  278. package/dist/maintenance.d.ts +11 -0
  279. package/dist/maintenance.js +35 -0
  280. package/dist/mate-cli.d.ts +52 -0
  281. package/dist/mate-cli.js +345 -0
  282. package/dist/mate-contract.d.ts +10 -0
  283. package/dist/mate-contract.js +30 -0
  284. package/dist/mate-doors.d.ts +69 -0
  285. package/dist/mate-doors.js +548 -0
  286. package/dist/mate-progress.d.ts +29 -0
  287. package/dist/mate-progress.js +121 -0
  288. package/dist/mate-tools.d.ts +94 -0
  289. package/dist/mate-tools.js +1878 -0
  290. package/dist/mate.d.ts +92 -0
  291. package/dist/mate.js +435 -0
  292. package/dist/mcp-connect.d.ts +103 -0
  293. package/dist/mcp-connect.js +252 -0
  294. package/dist/mcp.d.ts +27 -0
  295. package/dist/mcp.js +651 -0
  296. package/dist/memory-cli.d.ts +466 -0
  297. package/dist/memory-cli.js +111 -0
  298. package/dist/memory-pass.d.ts +160 -0
  299. package/dist/memory-pass.js +409 -0
  300. package/dist/metrics.d.ts +3 -0
  301. package/dist/metrics.js +56 -0
  302. package/dist/mobile-viewport.d.ts +3 -0
  303. package/dist/mobile-viewport.js +37 -0
  304. package/dist/model-catalog.d.ts +118 -0
  305. package/dist/model-catalog.js +376 -0
  306. package/dist/models-cli.d.ts +102 -0
  307. package/dist/models-cli.js +66 -0
  308. package/dist/models-ui.d.ts +34 -0
  309. package/dist/models-ui.js +68 -0
  310. package/dist/modes.d.ts +80 -0
  311. package/dist/modes.js +182 -0
  312. package/dist/monitoring-settings.d.ts +44 -0
  313. package/dist/monitoring-settings.js +173 -0
  314. package/dist/monitoring-ui.d.ts +20 -0
  315. package/dist/monitoring-ui.js +51 -0
  316. package/dist/monitoring.d.ts +34 -0
  317. package/dist/monitoring.js +221 -0
  318. package/dist/names.d.ts +67 -0
  319. package/dist/names.js +102 -0
  320. package/dist/observations.d.ts +40 -0
  321. package/dist/observations.js +211 -0
  322. package/dist/oidc.d.ts +71 -0
  323. package/dist/oidc.js +182 -0
  324. package/dist/onboard.d.ts +108 -0
  325. package/dist/onboard.js +325 -0
  326. package/dist/openrouter-models.d.ts +30 -0
  327. package/dist/openrouter-models.js +120 -0
  328. package/dist/operate.d.ts +118 -0
  329. package/dist/operate.js +11321 -0
  330. package/dist/peek-cli.d.ts +97 -0
  331. package/dist/peek-cli.js +215 -0
  332. package/dist/peek.d.ts +134 -0
  333. package/dist/peek.js +578 -0
  334. package/dist/phase-routing.d.ts +307 -0
  335. package/dist/phase-routing.js +658 -0
  336. package/dist/plan-auto.d.ts +14 -0
  337. package/dist/plan-auto.js +92 -0
  338. package/dist/plan.d.ts +186 -0
  339. package/dist/plan.js +401 -0
  340. package/dist/planner-source.d.ts +251 -0
  341. package/dist/planner-source.js +460 -0
  342. package/dist/planner.d.ts +75 -0
  343. package/dist/planner.js +992 -0
  344. package/dist/policy-ui.d.ts +20 -0
  345. package/dist/policy-ui.js +41 -0
  346. package/dist/policy.d.ts +111 -0
  347. package/dist/policy.js +231 -0
  348. package/dist/prepared-evidence.d.ts +16 -0
  349. package/dist/prepared-evidence.js +96 -0
  350. package/dist/pricing.d.ts +45 -0
  351. package/dist/pricing.js +77 -0
  352. package/dist/principal.d.ts +42 -0
  353. package/dist/principal.js +82 -0
  354. package/dist/probe.d.ts +46 -0
  355. package/dist/probe.js +79 -0
  356. package/dist/process-custody.d.ts +17 -0
  357. package/dist/process-custody.js +91 -0
  358. package/dist/process-liveness.d.ts +10 -0
  359. package/dist/process-liveness.js +81 -0
  360. package/dist/process-recovery-anchor.d.ts +75 -0
  361. package/dist/process-recovery-anchor.js +188 -0
  362. package/dist/process-recovery-coalition.d.ts +25 -0
  363. package/dist/process-recovery-coalition.js +105 -0
  364. package/dist/process-recovery-eligibility.d.ts +178 -0
  365. package/dist/process-recovery-eligibility.js +170 -0
  366. package/dist/process-recovery-native.d.ts +172 -0
  367. package/dist/process-recovery-native.js +592 -0
  368. package/dist/process-recovery-provenance.d.ts +163 -0
  369. package/dist/process-recovery-provenance.js +292 -0
  370. package/dist/process-recovery-services.d.ts +56 -0
  371. package/dist/process-recovery-services.js +191 -0
  372. package/dist/process-recovery-settlement.d.ts +32 -0
  373. package/dist/process-recovery-settlement.js +132 -0
  374. package/dist/process-recovery.d.ts +41 -0
  375. package/dist/process-recovery.js +91 -0
  376. package/dist/process-tree.d.ts +41 -0
  377. package/dist/process-tree.js +264 -0
  378. package/dist/project-access.d.ts +14 -0
  379. package/dist/project-access.js +34 -0
  380. package/dist/project-cli.d.ts +18 -0
  381. package/dist/project-cli.js +104 -0
  382. package/dist/project-delete-ui.d.ts +22 -0
  383. package/dist/project-delete-ui.js +48 -0
  384. package/dist/project-delete.d.ts +55 -0
  385. package/dist/project-delete.js +413 -0
  386. package/dist/project-knowledge.d.ts +111 -0
  387. package/dist/project-knowledge.js +241 -0
  388. package/dist/project-learning.d.ts +100 -0
  389. package/dist/project-learning.js +438 -0
  390. package/dist/project-memory.d.ts +81 -0
  391. package/dist/project-memory.js +264 -0
  392. package/dist/project-skills.d.ts +152 -0
  393. package/dist/project-skills.js +660 -0
  394. package/dist/project-tools.d.ts +219 -0
  395. package/dist/project-tools.js +796 -0
  396. package/dist/project.d.ts +61 -0
  397. package/dist/project.js +125 -0
  398. package/dist/prompt.d.ts +22 -0
  399. package/dist/prompt.js +72 -0
  400. package/dist/proof.d.ts +513 -0
  401. package/dist/proof.js +1140 -0
  402. package/dist/proposal.d.ts +82 -0
  403. package/dist/proposal.js +210 -0
  404. package/dist/provider-connection.d.ts +22 -0
  405. package/dist/provider-connection.js +98 -0
  406. package/dist/provider-limits.d.ts +35 -0
  407. package/dist/provider-limits.js +95 -0
  408. package/dist/provider.d.ts +279 -0
  409. package/dist/provider.js +935 -0
  410. package/dist/publish.d.ts +107 -0
  411. package/dist/publish.js +650 -0
  412. package/dist/pulls.d.ts +118 -0
  413. package/dist/pulls.js +240 -0
  414. package/dist/push.d.ts +95 -0
  415. package/dist/push.js +353 -0
  416. package/dist/quality.d.ts +8 -0
  417. package/dist/quality.js +6 -0
  418. package/dist/recipe-ui.d.ts +18 -0
  419. package/dist/recipe-ui.js +152 -0
  420. package/dist/recipes.d.ts +81 -0
  421. package/dist/recipes.js +332 -0
  422. package/dist/remote.d.ts +67 -0
  423. package/dist/remote.js +122 -0
  424. package/dist/render.d.ts +64 -0
  425. package/dist/render.js +587 -0
  426. package/dist/report-summary.d.ts +13 -0
  427. package/dist/report-summary.js +15 -0
  428. package/dist/repos.d.ts +65 -0
  429. package/dist/repos.js +277 -0
  430. package/dist/repository-context-ui.d.ts +2 -0
  431. package/dist/repository-context-ui.js +10 -0
  432. package/dist/repository-context.d.ts +67 -0
  433. package/dist/repository-context.js +376 -0
  434. package/dist/restart-certification.d.ts +134 -0
  435. package/dist/restart-certification.js +226 -0
  436. package/dist/result-actions.d.ts +28 -0
  437. package/dist/result-actions.js +270 -0
  438. package/dist/result-completion.d.ts +18 -0
  439. package/dist/result-completion.js +66 -0
  440. package/dist/result-review.d.ts +213 -0
  441. package/dist/result-review.js +430 -0
  442. package/dist/retention-ui.d.ts +12 -0
  443. package/dist/retention-ui.js +39 -0
  444. package/dist/retention.d.ts +72 -0
  445. package/dist/retention.js +288 -0
  446. package/dist/review-context.d.ts +243 -0
  447. package/dist/review-context.js +1043 -0
  448. package/dist/review-evidence.d.ts +33 -0
  449. package/dist/review-evidence.js +56 -0
  450. package/dist/reviewer.d.ts +97 -0
  451. package/dist/reviewer.js +202 -0
  452. package/dist/routine.d.ts +228 -0
  453. package/dist/routine.js +764 -0
  454. package/dist/runner.d.ts +266 -0
  455. package/dist/runner.js +399 -0
  456. package/dist/scan.d.ts +32 -0
  457. package/dist/scan.js +92 -0
  458. package/dist/scope.d.ts +695 -0
  459. package/dist/scope.js +1176 -0
  460. package/dist/scout-report.d.ts +42 -0
  461. package/dist/scout-report.js +108 -0
  462. package/dist/scout.d.ts +69 -0
  463. package/dist/scout.js +351 -0
  464. package/dist/serve.d.ts +313 -0
  465. package/dist/serve.js +21776 -0
  466. package/dist/session-brief.d.ts +8 -0
  467. package/dist/session-brief.js +24 -0
  468. package/dist/session-cli.d.ts +13 -0
  469. package/dist/session-cli.js +284 -0
  470. package/dist/session-contract.d.ts +183 -0
  471. package/dist/session-contract.js +122 -0
  472. package/dist/session-http.d.ts +19 -0
  473. package/dist/session-http.js +154 -0
  474. package/dist/session-server.d.ts +12 -0
  475. package/dist/session-server.js +37 -0
  476. package/dist/session-service.d.ts +22 -0
  477. package/dist/session-service.js +157 -0
  478. package/dist/setup-guide.d.ts +39 -0
  479. package/dist/setup-guide.js +93 -0
  480. package/dist/sign-in-guard.d.ts +45 -0
  481. package/dist/sign-in-guard.js +74 -0
  482. package/dist/skills-ui.d.ts +11 -0
  483. package/dist/skills-ui.js +58 -0
  484. package/dist/skills.d.ts +97 -0
  485. package/dist/skills.js +276 -0
  486. package/dist/slack-api.d.ts +55 -0
  487. package/dist/slack-api.js +229 -0
  488. package/dist/slack-chat.d.ts +28 -0
  489. package/dist/slack-chat.js +413 -0
  490. package/dist/slack-settings.d.ts +7 -0
  491. package/dist/slack-settings.js +75 -0
  492. package/dist/slack-state.d.ts +13 -0
  493. package/dist/slack-state.js +9 -0
  494. package/dist/slack.d.ts +13 -0
  495. package/dist/slack.js +167 -0
  496. package/dist/spend-ui.d.ts +28 -0
  497. package/dist/spend-ui.js +95 -0
  498. package/dist/spend.d.ts +142 -0
  499. package/dist/spend.js +313 -0
  500. package/dist/sqlite-runtime.d.ts +3 -0
  501. package/dist/sqlite-runtime.js +6 -0
  502. package/dist/sso-settings.d.ts +33 -0
  503. package/dist/sso-settings.js +103 -0
  504. package/dist/sso-ui.d.ts +22 -0
  505. package/dist/sso-ui.js +39 -0
  506. package/dist/storage.d.ts +15 -0
  507. package/dist/storage.js +84 -0
  508. package/dist/store.d.ts +7754 -0
  509. package/dist/store.js +23279 -0
  510. package/dist/structured-output.d.ts +58 -0
  511. package/dist/structured-output.js +103 -0
  512. package/dist/style-asset.d.ts +7 -0
  513. package/dist/style-asset.js +41 -0
  514. package/dist/subscription-chat.d.ts +46 -0
  515. package/dist/subscription-chat.js +275 -0
  516. package/dist/summary.d.ts +33 -0
  517. package/dist/summary.js +71 -0
  518. package/dist/supervisor.mjs +297 -0
  519. package/dist/surface.d.ts +63 -0
  520. package/dist/surface.js +352 -0
  521. package/dist/sync.d.ts +94 -0
  522. package/dist/sync.js +279 -0
  523. package/dist/task-composer.d.ts +13 -0
  524. package/dist/task-composer.js +52 -0
  525. package/dist/task-control.d.ts +165 -0
  526. package/dist/task-control.js +214 -0
  527. package/dist/task-outcome-cli.d.ts +10 -0
  528. package/dist/task-outcome-cli.js +92 -0
  529. package/dist/task-text.d.ts +30 -0
  530. package/dist/task-text.js +41 -0
  531. package/dist/team-cli.d.ts +15 -0
  532. package/dist/team-cli.js +618 -0
  533. package/dist/team-contract.d.ts +92 -0
  534. package/dist/team-contract.js +1 -0
  535. package/dist/team-http.d.ts +17 -0
  536. package/dist/team-http.js +144 -0
  537. package/dist/team-leads.d.ts +81 -0
  538. package/dist/team-leads.js +565 -0
  539. package/dist/team-runtime.d.ts +27 -0
  540. package/dist/team-runtime.js +264 -0
  541. package/dist/team-ui.d.ts +3 -0
  542. package/dist/team-ui.js +9 -0
  543. package/dist/team-updates.d.ts +8 -0
  544. package/dist/team-updates.js +57 -0
  545. package/dist/teammate-admin.d.ts +53 -0
  546. package/dist/teammate-admin.js +111 -0
  547. package/dist/teammate-desk.d.ts +60 -0
  548. package/dist/teammate-desk.js +154 -0
  549. package/dist/teammate-memory.d.ts +64 -0
  550. package/dist/teammate-memory.js +196 -0
  551. package/dist/teammate-question.d.ts +59 -0
  552. package/dist/teammate-question.js +175 -0
  553. package/dist/teammate-tools.d.ts +108 -0
  554. package/dist/teammate-tools.js +271 -0
  555. package/dist/teammate-week.d.ts +68 -0
  556. package/dist/teammate-week.js +132 -0
  557. package/dist/teammate-work.d.ts +76 -0
  558. package/dist/teammate-work.js +280 -0
  559. package/dist/teammates-ui.d.ts +20 -0
  560. package/dist/teammates-ui.js +166 -0
  561. package/dist/teammates.d.ts +180 -0
  562. package/dist/teammates.js +253 -0
  563. package/dist/teams-api.d.ts +33 -0
  564. package/dist/teams-api.js +204 -0
  565. package/dist/teams-chat.d.ts +26 -0
  566. package/dist/teams-chat.js +215 -0
  567. package/dist/teams-settings.d.ts +12 -0
  568. package/dist/teams-settings.js +57 -0
  569. package/dist/teams.d.ts +21 -0
  570. package/dist/teams.js +124 -0
  571. package/dist/telegram-flow.d.ts +49 -0
  572. package/dist/telegram-flow.js +110 -0
  573. package/dist/telegram-mate.d.ts +137 -0
  574. package/dist/telegram-mate.js +707 -0
  575. package/dist/telegram-progress.d.ts +14 -0
  576. package/dist/telegram-progress.js +129 -0
  577. package/dist/telegram-settings.d.ts +9 -0
  578. package/dist/telegram-settings.js +36 -0
  579. package/dist/telegram-status.d.ts +75 -0
  580. package/dist/telegram-status.js +265 -0
  581. package/dist/telegram-team.d.ts +85 -0
  582. package/dist/telegram-team.js +359 -0
  583. package/dist/telegram.d.ts +230 -0
  584. package/dist/telegram.js +1931 -0
  585. package/dist/templates.d.ts +65 -0
  586. package/dist/templates.js +118 -0
  587. package/dist/tool-launcher.d.ts +1 -0
  588. package/dist/tool-launcher.js +101 -0
  589. package/dist/tools-ui.d.ts +30 -0
  590. package/dist/tools-ui.js +40 -0
  591. package/dist/transitions-recipes.d.ts +1 -0
  592. package/dist/transitions-recipes.js +203 -0
  593. package/dist/tree-proof.d.ts +34 -0
  594. package/dist/tree-proof.js +58 -0
  595. package/dist/verification-evidence.d.ts +44 -0
  596. package/dist/verification-evidence.js +238 -0
  597. package/dist/version.d.ts +2 -0
  598. package/dist/version.js +10 -0
  599. package/dist/webhooks.d.ts +91 -0
  600. package/dist/webhooks.js +283 -0
  601. package/dist/work-index.d.ts +68 -0
  602. package/dist/work-index.js +384 -0
  603. package/dist/work-summary.d.ts +57 -0
  604. package/dist/work-summary.js +116 -0
  605. package/dist/workspace-motion.d.ts +4 -0
  606. package/dist/workspace-motion.js +133 -0
  607. package/dist/workspace-revision.d.ts +19 -0
  608. package/dist/workspace-revision.js +92 -0
  609. package/dist/workspace-ui.d.ts +204 -0
  610. package/dist/workspace-ui.js +411 -0
  611. package/dist/worktree-notices.d.ts +13 -0
  612. package/dist/worktree-notices.js +17 -0
  613. package/dist/worktree.d.ts +249 -0
  614. package/dist/worktree.js +720 -0
  615. package/package.json +122 -0
  616. package/scripts/canary-assertions.mjs +42 -0
  617. package/scripts/crash-canary.mjs +253 -0
  618. package/scripts/fixtures/crash-process.mjs +74 -0
  619. package/scripts/fixtures/pilot-scenarios.mjs +85 -0
  620. package/scripts/fixtures/restart-service.mjs +27 -0
  621. package/scripts/launchd-certification.mjs +143 -0
  622. package/scripts/pilot.mjs +121 -0
  623. package/scripts/proof-preflight.mjs +140 -0
  624. package/scripts/provider-canary.mjs +379 -0
  625. package/scripts/recovery-canary.mjs +135 -0
  626. package/scripts/restart-certification.mjs +98 -0
@@ -0,0 +1,352 @@
1
+ import { KNOWLEDGE_DESCRIPTORS } from "./knowledge-cli.js";
2
+ import { MEMORY_DESCRIPTORS } from "./memory-cli.js";
3
+ import { MODELS_DESCRIPTORS } from "./models-cli.js";
4
+ /**
5
+ * The declared command guide (arc 5): the agent-facing surface as data,
6
+ * dumped by `contract --commands`. This is DOCUMENTATION with a stable
7
+ * shape, not authority — legacy verbs do not execute from it,
8
+ * and the runtime envelope remains the truth. Its honest limits ride the
9
+ * envelope itself as SURFACE_NOTES, because a source comment is invisible
10
+ * to consumers (arc-5 review, finding 1).
11
+ *
12
+ * What the tests DO hold to the code: every root here is a routed verb
13
+ * and every routed verb appears here; every declared flag lives in the
14
+ * parser's global vocabulary with the declared arity; the subcommand
15
+ * inventories for task/publish/config/approver/routine/contest match the
16
+ * exported action lists their dispatchers consult; keyed mutations
17
+ * declare --key; notableReasons come from DOCUMENTED_REASONS. What they
18
+ * CANNOT prove — that a given flag is read by a given handler — is why
19
+ * SURFACE_NOTES.flags says "intended".
20
+ */
21
+ import { SESSION_DESCRIPTORS } from './session-contract.js';
22
+ import { sessionCliFlags } from './session-cli.js';
23
+ /** The guide's limits, stated machine-readably in every dump. */
24
+ export const SURFACE_NOTES = {
25
+ authority: "documentation is not permission; session descriptors also drive parser and request validation; legacy entries remain advisory",
26
+ flags: "session flags are exact per operation; legacy flags are intended per command and may use a global parser vocabulary",
27
+ reasons: "curated, not exhaustive — the runtime `reason` field is the truth; ignore tokens you do not recognize",
28
+ database: "local database commands wait up to 15 seconds for another writer; an exhausted wait returns database-busy and names the selected file",
29
+ };
30
+ export const SURFACE_SCHEMA_VERSION = 1;
31
+ const jsonFlag = { name: "json", takesValue: false, meaning: "answer with one machine envelope on stdout" };
32
+ const keyFlag = { name: "key", takesValue: true, meaning: "idempotency key — retry with the same key to get the first answer back" };
33
+ const dbFlag = { name: "db", takesValue: true, meaning: "path to the database file (defaults to the installation's)" };
34
+ const repoFlag = { name: "repo", takesValue: true, meaning: "which repository (repeatable where a command watches several)" };
35
+ const operator = (invocation, synopsis) => ({
36
+ invocation,
37
+ synopsis,
38
+ audience: "operator",
39
+ agentMayInvoke: false,
40
+ mutation: "unkeyed",
41
+ });
42
+ const operatorRead = (invocation, synopsis) => ({
43
+ invocation,
44
+ synopsis,
45
+ audience: "operator",
46
+ agentMayInvoke: false,
47
+ mutation: "none",
48
+ });
49
+ export const COMMAND_GUIDE = [
50
+ // ---- reports (reads) ----
51
+ {
52
+ invocation: "",
53
+ envelopeCommand: "scan",
54
+ synopsis: "report what is in flight (the no-verb default; scans below the working directory or the connected repositories)",
55
+ audience: "agent",
56
+ agentMayInvoke: true,
57
+ mutation: "none",
58
+ positionals: [{ name: "path", required: false, meaning: "directories to scan instead of the connected set" }],
59
+ flags: [jsonFlag,
60
+ { name: "all", takesValue: false, meaning: "ignore connected repos; scan everything discoverable" },
61
+ { name: "local", takesValue: false, meaning: "branches only — no network" }],
62
+ },
63
+ { invocation: "pulls", synopsis: "report what is waiting on a person", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag] },
64
+ { invocation: "graph", synopsis: "report which work graph is already here", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag] },
65
+ { invocation: "repos", synopsis: "list connected repositories", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag] },
66
+ operator("proposals", "what coordinators proposed over the MCP gateway — list, confirm <id> [--yes], dismiss <id>; confirming runs the plane's own door under your password"),
67
+ operator("chat", "with a saved profile, --lead <id> --conversation <id> opens central chat; --say sends one message, --follow only reads updates, --authorize --terms-digest enables the displayed paid terms; --local uses the existing local coordinator, where --follow enables crew updates and --no-follow pauses them; proposals keep their approval requirements"),
68
+ operator('connect', 'save an authenticated central HTTPS profile with --as and --token-stdin or --token-file; --local-login explicitly uses the existing private local sign-in; secrets never belong in arguments or URLs'),
69
+ operatorRead('lead list', 'list central leads available to the signed-in account; --profile selects a saved connection'),
70
+ operator('lead create', 'create a central lead with --name, --instructions and repeatable --project paths admitted by the server'),
71
+ operator('lead update', 'change --name, --instructions or --status for --lead at --revision; projects remain fixed'),
72
+ operator('lead member', 'set --account membership on --lead with --role, --active true|false and the current --revision'),
73
+ operator('lead transfer', 'move ownership of --task to --lead at --revision; existing execution authority remains unchanged'),
74
+ operatorRead('conversation list', 'list admitted conversations, optionally within --lead; attachment never starts model work'),
75
+ operator('conversation create', 'create a conversation with --lead, --title, --visibility private|team and repeatable --project paths'),
76
+ operatorRead('conversation show', 'read --conversation messages and saved work; no model call or read-marker mutation'),
77
+ operator('conversation member', 'set --account membership on --conversation with --role, --active true|false and the current --revision; lead membership must already permit the role'),
78
+ operator('conversation edit', 'edit your queued --message in --conversation at --revision using --text; running messages cannot be edited'),
79
+ operator('conversation withdraw', 'withdraw your queued --message in --conversation at --revision; an active turn requires stop'),
80
+ operator('conversation read', 'explicitly record your read position at --message within --conversation'),
81
+ operator('conversation follow', 'enable or pause automatic lead summaries with --conversation and --enabled true|false, within the existing paid chat authorization; passive chat --follow only reads updates'),
82
+ operator('conversation stop', 'request stopping the exact --message in --conversation; retain uncertain work until its owner settles it'),
83
+ operator("repos add", "connect a repository to the installation"),
84
+ operator("repos remove", "disconnect a repository"),
85
+ operator("repos add-from-github", "preview, clone from GitHub, and connect - the console onboarding ceremony as a CLI verb"),
86
+ { invocation: "contract", synopsis: "the machine contract: envelope version + capability tokens; --commands dumps this guide", audience: "agent", agentMayInvoke: true, mutation: "none",
87
+ flags: [jsonFlag, { name: "commands", takesValue: false, meaning: "dump the declared command guide" }] },
88
+ { invocation: "skills list", synopsis: "name the guides this exact binary serves", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag] },
89
+ { invocation: "skills get", synopsis: "print one guide's markdown (raw on stdout; --json wraps it)", audience: "agent", agentMayInvoke: true, mutation: "none",
90
+ positionals: [{ name: "name", required: true, meaning: "a guide name from `skills list`" }],
91
+ flags: [jsonFlag], notableReasons: ["unknown-skill", "usage"] },
92
+ {
93
+ invocation: "skills install",
94
+ synopsis: "install or refresh this binary's Toolroll guides for Claude Code; without --claude-code, write the repository-local Agent Skills entry",
95
+ audience: "operator",
96
+ agentMayInvoke: false,
97
+ mutation: "identity-idempotent",
98
+ flags: [jsonFlag,
99
+ { name: "claude-code", takesValue: false, meaning: "install the user-level Claude Code skill" },
100
+ { name: "dir", takesValue: true, meaning: "skill directory (default: ~/.claude/skills/toolroll)" },
101
+ { name: "yes", takesValue: false, meaning: "write the previewed files" },
102
+ { name: "repo", takesValue: true, meaning: "repository for the existing project-local install" },
103
+ { name: "write-context", takesValue: false, meaning: "also add the managed AGENTS.md block for a project-local install" }],
104
+ notableReasons: ["unconfirmed", "foreign-file", "usage"],
105
+ },
106
+ operator("link", "put toolroll on PATH"),
107
+ operator("unlink", "take it off PATH"),
108
+ operator("demo", "a seeded throwaway sandbox"),
109
+ { invocation: 'session capabilities', synopsis: 'Show executable session schemas and operator authority requirements; no credentials needed', audience: 'agent', agentMayInvoke: true, mutation: 'none', flags: [jsonFlag] },
110
+ ...SESSION_DESCRIPTORS.map(spec => ({
111
+ invocation: `session ${spec.operation}`, synopsis: spec.synopsis, audience: spec.audience, agentMayInvoke: spec.agentMayInvoke,
112
+ mutation: spec.mutation ? 'keyed' : 'none', inputSchema: spec.inputSchema,
113
+ flags: Object.entries(sessionCliFlags(spec)).map(([name, arity]) => ({ name, takesValue: arity === 'value', meaning: name === 'key' ? 'keep the same key when reconciling; inspect after unknown delivery, never blind-retry' : `see session ${spec.operation} --help` })),
114
+ })),
115
+ ...KNOWLEDGE_DESCRIPTORS.map(spec => ({ invocation: `knowledge ${spec.action}`, synopsis: spec.synopsis, audience: "agent", agentMayInvoke: true, mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "query", required: true, meaning: "search text or source file for impact" }] } : {}) })),
116
+ ...MEMORY_DESCRIPTORS.map(spec => ({ invocation: `memory ${spec.action}`, synopsis: spec.synopsis, audience: "agent", agentMayInvoke: true, mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "query", required: true, meaning: "search text, a decision id, or the decision sentence" }] } : {}) })),
117
+ ...MODELS_DESCRIPTORS.map(spec => ({ invocation: `models ${spec.action}`, synopsis: spec.synopsis, audience: "agent", agentMayInvoke: true, mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "target", required: true, meaning: "the CLI to update, or on/off" }] } : {}) })),
118
+ // ---- the queue (agent surface) ----
119
+ { invocation: "status", synopsis: "running work, queued reasons, results to review, the latest release check and plan windows", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
120
+ { invocation: "ready", synopsis: "what could be dispatched right now (rows carry reservedFor)", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
121
+ { invocation: "brief", synopsis: "with a saved central profile, --lead <id> --conversation <id> reads messages, proposals and saved work; --request-id inspects your saved receipt without resending; --local uses local DB catch-up, where --history selects the older operational report", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
122
+ { invocation: "gaps", synopsis: "requirement gaps blocking dispatch", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag, repoFlag] },
123
+ { invocation: "grants", synopsis: "list authority grants", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
124
+ { invocation: "sync", synopsis: "refresh external-tracker mirrors and deliver write-backs — safe to run; fails closed", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent",
125
+ flags: [jsonFlag, dbFlag, repoFlag], notableReasons: ["no-op", "external"] },
126
+ { invocation: "task add", synopsis: "queue work", audience: "agent", agentMayInvoke: true, mutation: "keyed",
127
+ positionals: [{ name: "title", required: true, meaning: "one line of what to do" }],
128
+ flags: [jsonFlag, dbFlag, keyFlag,
129
+ { name: "id", takesValue: true, meaning: "choose the task id" },
130
+ { name: "repo", takesValue: true, meaning: "which repository the task belongs to" },
131
+ { name: "report", takesValue: false, meaning: "a scout task: the deliverable is a report, never a branch" }],
132
+ notableReasons: ["duplicate", "usage"] },
133
+ { invocation: "task list", synopsis: "a page of saved task status", audience: "agent", agentMayInvoke: true, mutation: "none",
134
+ flags: [jsonFlag, dbFlag, { name: "state", takesValue: true, meaning: "queued|running|done|failed|cancelled" },
135
+ { name: "view", takesValue: true, meaning: "all|needs-you|running|completed" },
136
+ { name: "limit", takesValue: true, meaning: "page size, 1–100; default 40" },
137
+ { name: "cursor", takesValue: true, meaning: "nextCursor from the previous response" },
138
+ { name: "repo", takesValue: true, meaning: "filter to one project" }] },
139
+ { invocation: "task show", synopsis: "one task in full", audience: "agent", agentMayInvoke: true, mutation: "none",
140
+ positionals: [{ name: "id", required: true, meaning: "the task" }], flags: [jsonFlag, dbFlag], notableReasons: ["unknown-task"] },
141
+ { invocation: "check-progress", synopsis: "current or final approved check progress", audience: "agent", agentMayInvoke: true, mutation: "none",
142
+ positionals: [{ name: "run", required: true, meaning: "the build run" }], flags: [jsonFlag, dbFlag], notableReasons: ["unknown-run", "no-progress"] },
143
+ { invocation: "task wait", synopsis: "wait for the current attempt to finish or need a person", audience: "agent", agentMayInvoke: true, mutation: "none",
144
+ positionals: [{ name: "id", required: true, meaning: "the task" }], flags: [jsonFlag, dbFlag,
145
+ { name: "timeout", takesValue: true, meaning: "stop waiting after this many seconds" }], notableReasons: ["unknown-task", "timeout", "failed", "needs-person"] },
146
+ { invocation: "project show", synopsis: "show the saved local project and optional credential-file reference", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
147
+ { invocation: "project use", synopsis: "select an exact saved checkout; grants no project or execution authority", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent",
148
+ positionals: [{ name: "path", required: true, meaning: "exact saved project checkout path" }], flags: [jsonFlag, dbFlag, { name: "token-file", takesValue: true, meaning: "optional existing scoped coordinator credential file; saves only its path" }] },
149
+ ...['complete', 'revise'].map(action => ({
150
+ invocation: `task ${action}`, synopsis: action === 'complete' ? 'mark the exact inspected result complete; checks and permissions remain unchanged' : 'request a same-task revision using explicit feedback; existing approval terms apply',
151
+ audience: 'agent', agentMayInvoke: true, mutation: 'identity-idempotent',
152
+ positionals: [{ name: 'task', required: true, meaning: 'task or assignment id' }],
153
+ flags: [jsonFlag, dbFlag,
154
+ { name: 'token-env', takesValue: true, meaning: 'scoped coordinator credential environment variable' },
155
+ { name: 'token-file', takesValue: true, meaning: 'scoped coordinator credential file; defaults to selected project reference' },
156
+ ...(action === 'complete' ? [{ name: 'digest', takesValue: true, meaning: 'exact receipt from assignment show; required for JSON or scoped agents' }]
157
+ : [{ name: 'feedback', takesValue: true, meaning: 'specific requested change' }, { name: 'run', takesValue: true, meaning: 'exact result run; defaults to current result' }, { name: 'source', takesValue: true, meaning: 'exact scope digest; defaults to current terms' }, { name: 'key', takesValue: true, meaning: '32 hexadecimal characters for exact replay; defaults to a stable feedback identity' }]),
158
+ ],
159
+ })),
160
+ ...["show", "updates", "claim", "check", "brief", "inbox", "ack"].map(action => ({
161
+ invocation: `assignment ${action}`,
162
+ synopsis: action === "show" ? "read the root, current work, owner and exact receipt"
163
+ : action === "updates" ? "read durable updates after a cursor; save nextCursor after processing"
164
+ : action === "claim" ? "record coordinator lead ownership; grants no approval or execution authority"
165
+ : action === "brief" ? "catch up from current assignments and project knowledge in the local database"
166
+ : action === "inbox" ? "receive or replay a saved batch of lead status updates"
167
+ : action === "ack" ? "acknowledge delivery of an inbox batch; leaves task completion unchanged"
168
+ : "acknowledge the exact ready receipt as its lead; accepts no proof and deploys nothing",
169
+ audience: "agent", agentMayInvoke: true,
170
+ mutation: action === "claim" || action === "check" || action === "inbox" || action === "ack" ? "identity-idempotent" : "none",
171
+ ...(["show", "claim", "check"].includes(action) ? { positionals: [{ name: "task", required: true, meaning: "any task in the assignment's existing correction chain" }] } : {}),
172
+ flags: [jsonFlag, dbFlag,
173
+ { name: "token-env", takesValue: true, meaning: "explicit environment variable containing a coordinator token; required for claim/check/inbox/ack unless token-file is used" },
174
+ { name: "token-file", takesValue: true, meaning: "explicit coordinator token file; cannot be combined with token-env" },
175
+ ...(action === "updates" ? [{ name: "after", takesValue: true, meaning: "last processed admitted update cursor; defaults to 0" }, { name: "limit", takesValue: true, meaning: "page size from 1 to 100; defaults to 50" }] : []),
176
+ ...(action === "check" ? [{ name: "digest", takesValue: true, meaning: "exact current receipt digest from assignment show" }] : []),
177
+ ...(action === "brief" ? [{ name: "repo", takesValue: true, meaning: "project to include within the credential's access" }, { name: "limit", takesValue: true, meaning: "assignment count from 1 to 25; defaults to 10" }] : []),
178
+ ...(action === "inbox" || action === "ack" ? [{ name: "consumer", takesValue: true, meaning: "stable lowercase name for this lead's delivery cursor" }] : []),
179
+ ...(action === "inbox" ? [{ name: "limit", takesValue: true, meaning: "batch size from 1 to 100; defaults to 10" }] : []),
180
+ ...(action === "ack" ? [{ name: "batch", takesValue: true, meaning: "exact batch ID returned by assignment inbox" }] : []),
181
+ ],
182
+ })),
183
+ operator("task state", "set a task's state by hand — an operator correction, not a workflow step"),
184
+ { invocation: "task block", synopsis: "make one task wait for another", audience: "agent", agentMayInvoke: true, mutation: "keyed",
185
+ positionals: [{ name: "id", required: true, meaning: "the waiting task" }],
186
+ flags: [jsonFlag, dbFlag, keyFlag, { name: "on", takesValue: true, meaning: "the blocker's id" }],
187
+ notableReasons: ["unknown-task", "contest-open"] },
188
+ { invocation: "task unblock", synopsis: "stop waiting", audience: "agent", agentMayInvoke: true, mutation: "keyed",
189
+ positionals: [{ name: "id", required: true, meaning: "the waiting task" }],
190
+ flags: [jsonFlag, dbFlag, keyFlag, { name: "on", takesValue: true, meaning: "the blocker's id" }],
191
+ notableReasons: ["unknown-task"] },
192
+ { invocation: "task next", synopsis: "move a task to the front of ITS queue (scheduling only; approval still required)", audience: "agent", agentMayInvoke: true, mutation: "keyed",
193
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
194
+ flags: [jsonFlag, dbFlag, keyFlag, { name: "undo", takesValue: false, meaning: "back to filing order" }],
195
+ notableReasons: ["unknown-task", "claimed", "contest-open"] },
196
+ operator("task steer", "one credentialed note read before the task's next attempt — steering speaks with the operator's voice"),
197
+ { invocation: "task assign", synopsis: "reserve a task for one worker, or return it to the shared queue", audience: "agent", agentMayInvoke: true, mutation: "keyed",
198
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
199
+ flags: [jsonFlag, dbFlag, keyFlag,
200
+ { name: "runner", takesValue: true, meaning: "the worker to reserve for" },
201
+ { name: "anyone", takesValue: false, meaning: "back to the shared queue" }],
202
+ notableReasons: ["unknown-task", "claimed"] },
203
+ { invocation: "task scope", synopsis: "state what success is; approval binds to this exact statement", audience: "agent", agentMayInvoke: true, mutation: "keyed",
204
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
205
+ flags: [jsonFlag, dbFlag, keyFlag,
206
+ { name: "goal", takesValue: true, meaning: "what success is" },
207
+ { name: "not", takesValue: true, meaning: "explicitly out of scope" },
208
+ { name: "touches", takesValue: true, meaning: "comma-separated paths this may change" },
209
+ { name: "budget-usd", takesValue: true, meaning: "spend ceiling for the build" },
210
+ { name: "risk", takesValue: true, meaning: "declared risk: routine, elevated, or high — the route reads it" }],
211
+ notableReasons: ["unknown-task", "contest-open"] },
212
+ { invocation: "task plan", synopsis: "ask for a plan document (a planning session drafts; a person approves)", audience: "agent", agentMayInvoke: true, mutation: "keyed",
213
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
214
+ flags: [jsonFlag, dbFlag, keyFlag,
215
+ { name: "provider", takesValue: true, meaning: "pin which provider plans THIS task (plan phase only)" },
216
+ { name: "model", takesValue: true, meaning: "the pinned plan model, riding --provider" }],
217
+ notableReasons: ["unknown-task"] },
218
+ { invocation: "task hold", synopsis: "park a task with a reason", audience: "agent", agentMayInvoke: true, mutation: "keyed",
219
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
220
+ flags: [jsonFlag, dbFlag, keyFlag,
221
+ { name: "reason", takesValue: true, meaning: "why it waits" },
222
+ { name: "until", takesValue: true, meaning: "ISO time to resurface" }],
223
+ notableReasons: ["unknown-task", "held"] },
224
+ { invocation: "task unhold", synopsis: "release a hold", audience: "agent", agentMayInvoke: true, mutation: "keyed",
225
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
226
+ flags: [jsonFlag, dbFlag, keyFlag], notableReasons: ["unknown-task", "not-yours"] },
227
+ { invocation: "task require", synopsis: "name the capabilities a task needs before dispatch", audience: "agent", agentMayInvoke: true, mutation: "keyed",
228
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
229
+ flags: [jsonFlag, dbFlag, keyFlag, { name: "require", takesValue: true, meaning: "comma-separated capability keys" }],
230
+ notableReasons: ["unknown-task"] },
231
+ operator("task approve", "the yes — nothing builds without one; binds to the scope digest"),
232
+ operator("task requeue", "exit a stall: incidents resolved, strikes cleared, queued again"),
233
+ operator("task regate", "explicitly rerun the approved check on the last exact commit — no agent or automatic retry"),
234
+ operator("task review", "retired compatibility command; inspect the saved result and explicitly complete or revise it"),
235
+ operator("task accept", "record an explicit acceptance with limitations; does not change checks or prove deployment"),
236
+ operator("task repair", "inspect or approve an existing historical repair draft; use task revise for new feedback"),
237
+ operator("task route", "which configured agents plan, build and repair this task; phase and risk changes require renewed approval"),
238
+ operator("task reopen", "resume external work its tracker closed and has been SEEN open again"),
239
+ operator("task stop", "stop ONE exact live attempt (--run <id>): durable before any process is signalled, answers 'stopping' until its own processes are established gone; work, branch, and evidence preserved; no strike, no retry"),
240
+ operator("task resume", "resume the exact stopped attempt (--run <id>): refuses until it is quiescent, lifts only that stop's hold, approves nothing — the next pass re-proves the scope and inherits the draft with fresh proof"),
241
+ // ---- leases (runner surface) ----
242
+ { invocation: "claim", synopsis: "take one ready, approved task; answers with a lease", audience: "agent", agentMayInvoke: true, mutation: "keyed",
243
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
244
+ flags: [jsonFlag, dbFlag, keyFlag,
245
+ { name: "runner", takesValue: true, meaning: "your registered worker name" },
246
+ { name: "token", takesValue: true, meaning: "the worker's token" },
247
+ { name: "ttl", takesValue: true, meaning: "lease seconds" }],
248
+ notableReasons: ["held", "fenced", "unapproved", "reserved", "external", "contest-open", "claimed", "not-ready"] },
249
+ { invocation: "heartbeat", synopsis: "still working; extends the lease", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent",
250
+ positionals: [{ name: "lease", required: true, meaning: "the lease id" }],
251
+ flags: [jsonFlag, dbFlag], notableReasons: ["not-leased", "fenced"] },
252
+ { invocation: "release", synopsis: "done with it; fenced if superseded", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent",
253
+ positionals: [{ name: "lease", required: true, meaning: "the lease id" }],
254
+ flags: [jsonFlag, dbFlag], notableReasons: ["not-leased", "fenced"] },
255
+ { invocation: "reap", synopsis: "release every lease that ran out", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent", flags: [jsonFlag, dbFlag] },
256
+ { invocation: "tick", synopsis: "one unattended pass: claim, build in a leased worktree, commit to a branch — never pushes", audience: "agent", agentMayInvoke: true, mutation: "unkeyed",
257
+ flags: [jsonFlag, dbFlag, repoFlag,
258
+ { name: "runner", takesValue: true, meaning: "your registered worker name" },
259
+ { name: "token", takesValue: true, meaning: "the worker's token" },
260
+ { name: "max", takesValue: true, meaning: "tasks this pass (default 1)" },
261
+ { name: "base", takesValue: true, meaning: "base ref for first attempts" }],
262
+ notableReasons: ["empty", "fenced"] },
263
+ { invocation: "build", synopsis: "build one claimed task directly (the piece tick automates)", audience: "agent", agentMayInvoke: true, mutation: "unkeyed",
264
+ positionals: [{ name: "id", required: true, meaning: "the task" }],
265
+ flags: [jsonFlag, dbFlag, repoFlag], notableReasons: ["not-leased", "unapproved"] },
266
+ { invocation: "reconcile", synopsis: "recover what the last stretch left behind — safe to repeat", audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent", flags: [jsonFlag, dbFlag, repoFlag] },
267
+ // ---- reads over shared machinery ----
268
+ { invocation: "runner list", synopsis: "registered workers", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
269
+ { invocation: "coordinator list", synopsis: "MCP filing credentials and their limits", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
270
+ { invocation: "approver list", synopsis: "who can say yes (names only)", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
271
+ { invocation: "cap list", synopsis: "recorded capabilities", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag, repoFlag] },
272
+ { invocation: "outbox list", synopsis: "queued notifications", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
273
+ { invocation: "incident list", synopsis: "open incidents", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
274
+ { invocation: "routine list", synopsis: "scheduled routines", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
275
+ { invocation: "routine show", synopsis: "one routine in full", audience: "agent", agentMayInvoke: true, mutation: "none",
276
+ positionals: [{ name: "id", required: true, meaning: "the routine" }], flags: [jsonFlag, dbFlag] },
277
+ { invocation: "config show", synopsis: "phase and spend configuration", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag, repoFlag] },
278
+ { invocation: "setup show", synopsis: "installation setup", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
279
+ { invocation: "verify show", synopsis: "the repository's approved verification command, if one exists", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag, repoFlag] },
280
+ { invocation: "intake show", synopsis: "intake configuration", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
281
+ { invocation: "providers", synopsis: "which agent providers this binary can drive, and their transports; --report records this machine's readiness under its runner", audience: "agent", agentMayInvoke: true, mutation: "none",
282
+ flags: [jsonFlag,
283
+ { name: "report", takesValue: false, meaning: "record readiness observations under --runner" },
284
+ { name: "runner", takesValue: true, meaning: "the registered worker name reporting" },
285
+ { name: "token", takesValue: true, meaning: "that worker's token" }] },
286
+ { invocation: "template list", synopsis: "routine templates", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
287
+ { invocation: "template show", synopsis: "one template", audience: "agent", agentMayInvoke: true, mutation: "none",
288
+ positionals: [{ name: "name", required: true, meaning: "the template" }], flags: [jsonFlag, dbFlag] },
289
+ { invocation: "contest show", synopsis: "a tournament's state and results", audience: "agent", agentMayInvoke: true, mutation: "none",
290
+ positionals: [{ name: "id", required: true, meaning: "the contest" }], flags: [jsonFlag, dbFlag] },
291
+ { invocation: "webhook status", synopsis: "connected messaging services", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
292
+ { invocation: "publish status", synopsis: "publication and merge-grant state", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
293
+ // ---- operator ceremonies and infrastructure (listed, detail-free) ----
294
+ operator("approver add", "mint the credential that lets a person say yes"),
295
+ operator("runner register", "register a worker bound to its repositories; its token is shown once"),
296
+ operator("runner retire", "retire a worker"),
297
+ operator("runner bind", "replace which repositories a worker may build in"),
298
+ operator("runner capacity", "set how many tasks a worker runs at once; running work carries on, the new number applies at the next claim"),
299
+ operator("coordinator mint", "mint the MCP filing credential — repo-bound, rate-limited, token shown once"),
300
+ operator("coordinator revoke", "revoke an MCP filing credential"),
301
+ operator("mcp", "serve the MCP gateway over stdio — the coordinator credential is the only key it accepts"),
302
+ operator("cap add", "record a capability"),
303
+ operator("outbox deliver", "deliver queued notifications"),
304
+ operator("peek", "watch live agents in the terminal — one pane per open run; --tmux opens a window per run"),
305
+ operator("incident resolve", "resolve an incident"),
306
+ operator("decide", "read and ANSWER parked decisions — answering is a person's act"),
307
+ operator("routine add", "file a standing order"),
308
+ operator("routine approve", "approve a standing order"),
309
+ operator("routine refresh", "re-resolve the agents a standing order freezes from today's configuration — approves nothing; approve it again afterwards"),
310
+ operator("routine pause", "pause a standing order"),
311
+ operator("routine resume", "resume a standing order"),
312
+ operator("routine run-now", "run a standing order immediately"),
313
+ operatorRead("keys status", "which provider API keys are stored — never the values"),
314
+ operator("keys set", "store a provider's API key as a private file — piped or --key-file, never on the command line"),
315
+ operator("keys clear", "remove a stored provider key (kept only as a fallback; a subscription-mode provider is unaffected)"),
316
+ operatorRead("keys verify", "check a stored key against its provider live — spends no tokens"),
317
+ operator("keys auth", "choose subscription vs API key for a provider (subscription is the default; the key is kept as fallback)"),
318
+ operatorRead("people list", "everyone who can sign in, their standing, and the open invites"),
319
+ operator("people invite", "mint a single-use sign-in link for one person — their powers are pinned when you mint, never after"),
320
+ operator("people projects", "set a person's project access — selected project, all projects, or no projects"),
321
+ operator("people revoke", "end a person's access — their sessions, invites, and signed modes end with them; history stays"),
322
+ operatorRead("mode show", "the repository's operating mode, in full — or 'locked' when none is signed"),
323
+ operator("mode set", "sign a per-repository operating mode (password ceremony; standard or hands-off, always expiring)"),
324
+ operator("publish merge", "say yes to ONE waiting merge — it fires only when CI is seen green on the exact commit you authorized"),
325
+ operator("publish refire", "recover a merge whose issued call went silent — re-enters the full merge road, never auto-retried"),
326
+ operator("mode revoke", "revoke a repository's mode — one click, every act it covered falls back to its own ceremony"),
327
+ operator("config set", "set phase or spend configuration"),
328
+ operator("config clear", "clear phase or spend configuration"),
329
+ operator("setup clear", "clear installation setup"),
330
+ operator("verify set", "approve the one shell command the plane re-runs after every future commit; --self-heal binds one approved-setup replay when a required project executable is missing"),
331
+ operator("verify clear", "revoke a repository's approved verification command"),
332
+ operator("intake grant", "grant an intake source"),
333
+ operator("intake run", "run intake now"),
334
+ operator("intake preview", "preview what intake would file"),
335
+ operator("intake pr-comments", "intake review comments from a pull request"),
336
+ operator("intake clear", "clear intake configuration"),
337
+ operator("contest exclude", "exclude a contestant from a tournament"),
338
+ operator("webhook primary", "choose which service receives alerts"),
339
+ operator("webhook test", "send a test message"),
340
+ operator("bridge", "the Telegram bridge (pairing, tokens, the follower)"),
341
+ operator("enroll", "grant a repository authority (backends, dispatch) — its own explicit yes"),
342
+ operator("revoke", "take an authority grant back"),
343
+ operator("publish", "the publication pass: push built branches, open pull requests, sweep merges"),
344
+ operator("publish grant", "grant publication or auto-merge authority"),
345
+ operator("publish revoke", "take a publication grant back"),
346
+ operator("publish unblock", "lift a repair's merge hold"),
347
+ operator("publish rearm", "re-arm a refused merge after fixing the named cause"),
348
+ operator("serve", "the operations console (HTTP)"),
349
+ operator("watch", "the unattended loop, kept running"),
350
+ operator("up", "console + worker + browser, one command"),
351
+ operator("daemon", "install the loop under the OS service manager"),
352
+ ];
package/dist/sync.d.ts ADDED
@@ -0,0 +1,94 @@
1
+ /**
2
+ * External dispatch's sync pass (v20; five review rounds are the spec).
3
+ *
4
+ * What this does: pulls a tracker's nominated work into the overlay as
5
+ * ORDINARY local tasks (mirrors), refreshes every known mirror's remote
6
+ * state, verifies the plane marker, and delivers pending write-back
7
+ * intents — all at daemon cadence, zero tokens.
8
+ *
9
+ * What this never does: touch claims or runs (the latch is a write to the
10
+ * mirror row; admission and completion enforce it), import issue BODIES
11
+ * (titles only, through the canonical proposal validator — a tracker
12
+ * anyone can write to is a prompt-injection surface), or treat absence
13
+ * from a capped listing as closure (every known mirror is fetched
14
+ * INDIVIDUALLY; only a COMPLETE pass advances freshness).
15
+ *
16
+ * The plane marker is detection, never a distributed lease: a fixed-name
17
+ * repository label carries this plane's id in its description. A 404 is
18
+ * semantic "missing" only AFTER an authenticated access proof on the
19
+ * repository itself — GitHub 404s private resources the caller cannot
20
+ * see, and that must read as an OPERATIONAL block, fail closed.
21
+ */
22
+ import type { Runner } from "./backend.js";
23
+ import type { BackendGrant } from "./grant.js";
24
+ import type { Store } from "./store.js";
25
+ export declare const SYNC_TIMEOUT_MS = 20000;
26
+ export declare const MARKER_LABEL = "standing-orders-plane";
27
+ /** Bounded forward scan: pages of 100, at most this many pages per pass. */
28
+ export declare const MAX_FORWARD_PAGES = 10;
29
+ export type RemoteIssue = {
30
+ number: number;
31
+ title: string;
32
+ state: "open" | "closed";
33
+ };
34
+ type Operational = {
35
+ ok: false;
36
+ kind: "operational";
37
+ message: string;
38
+ };
39
+ /** The gh surface the pass needs, injectable for tests. */
40
+ export type DispatchAdapter = {
41
+ /** Authenticated access proof: 200 + push permission, or operational. */
42
+ repoAccess(remoteRepo: string): Promise<{
43
+ ok: true;
44
+ push: boolean;
45
+ } | Operational>;
46
+ /** Complete forward listing — complete=false when the page cap cut it. */
47
+ listAllOpen(remoteRepo: string): Promise<{
48
+ ok: true;
49
+ issues: RemoteIssue[];
50
+ complete: boolean;
51
+ } | Operational>;
52
+ /** One issue, individually — the reverse sweep's only evidence. */
53
+ getIssue(remoteRepo: string, number: string): Promise<{
54
+ ok: true;
55
+ found: RemoteIssue | null;
56
+ } | Operational>;
57
+ readMarker(remoteRepo: string): Promise<{
58
+ ok: true;
59
+ plane: string | null;
60
+ malformed: boolean;
61
+ } | Operational>;
62
+ writeMarker(remoteRepo: string, planeId: string): Promise<{
63
+ ok: true;
64
+ } | Operational>;
65
+ deleteMarker(remoteRepo: string): Promise<{
66
+ ok: true;
67
+ } | Operational>;
68
+ comment(remoteRepo: string, number: string, body: string): Promise<{
69
+ ok: true;
70
+ } | Operational>;
71
+ close(remoteRepo: string, number: string): Promise<{
72
+ ok: true;
73
+ } | Operational>;
74
+ };
75
+ export declare function ghDispatchAdapter(runner?: Runner, timeoutMs?: number): DispatchAdapter;
76
+ /** ghi-<owner>-<name>-<n>-<hash8>: collision-resistant across long slugs. */
77
+ export declare function mirrorTaskId(remoteRepo: string, remoteId: string): string;
78
+ export type SyncReport = {
79
+ remoteRepo: string;
80
+ outcome: "complete" | "capped" | "failed" | "blocked";
81
+ detail: string | null;
82
+ candidates: number;
83
+ mirrored: number;
84
+ latched: number;
85
+ delivered: number;
86
+ };
87
+ /**
88
+ * One pass over one dispatch grant. Order is the spec's: access proof →
89
+ * marker verdict → forward scan → reverse sweep (every known mirror,
90
+ * individually) → intent delivery → ledger close. Only a pass in which
91
+ * EVERY step succeeded closes `complete` and advances freshness.
92
+ */
93
+ export declare function syncPass(store: Store, grant: BackendGrant, adapter: DispatchAdapter, now: () => Date): Promise<SyncReport>;
94
+ export {};