toolroll 0.9.93 → 0.9.95

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 (436) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/activity-line.d.ts +7 -4
  3. package/dist/activity-line.js +9 -7
  4. package/dist/agent-fence.d.ts +10 -0
  5. package/dist/agent-fence.js +6 -3
  6. package/dist/approval-authority.d.ts +7 -1
  7. package/dist/approval-authority.js +11 -2
  8. package/dist/approval-password.d.ts +31 -0
  9. package/dist/approval-password.js +26 -0
  10. package/dist/assignment-status.d.ts +1 -1
  11. package/dist/assignment-ui.js +3 -1
  12. package/dist/assignment.js +5 -0
  13. package/dist/attest.d.ts +3 -0
  14. package/dist/attest.js +10 -0
  15. package/dist/boot-identity.d.ts +2 -1
  16. package/dist/boot-identity.js +6 -4
  17. package/dist/bounded-spawn.d.ts +57 -0
  18. package/dist/bounded-spawn.js +220 -0
  19. package/dist/browser/terminal.js +42 -42
  20. package/dist/browser/workspace.css +1 -1
  21. package/dist/browser/workspace.js +32 -32
  22. package/dist/browser-crew.js +2 -0
  23. package/dist/browser-shell.d.ts +1 -1
  24. package/dist/browser-shell.js +2 -2
  25. package/dist/browser-workspace.d.ts +50 -2
  26. package/dist/browser-workspace.js +3 -3
  27. package/dist/build-review.js +2 -0
  28. package/dist/builder-restart.d.ts +21 -0
  29. package/dist/builder-restart.js +50 -0
  30. package/dist/builder.d.ts +11 -2
  31. package/dist/builder.js +234 -101
  32. package/dist/card-catalog.d.ts +209 -0
  33. package/dist/card-catalog.js +133 -0
  34. package/dist/card-cli.d.ts +43 -0
  35. package/dist/card-cli.js +44 -0
  36. package/dist/card-render.d.ts +26 -0
  37. package/dist/card-render.js +223 -0
  38. package/dist/card-sources.d.ts +68 -0
  39. package/dist/card-sources.js +234 -0
  40. package/dist/chat-acceptance.js +1 -1
  41. package/dist/chat-actions.d.ts +106 -9
  42. package/dist/chat-actions.js +473 -46
  43. package/dist/chat-approval.d.ts +13 -0
  44. package/dist/chat-approval.js +39 -9
  45. package/dist/chat-card-part.d.ts +11 -0
  46. package/dist/chat-card-part.js +18 -0
  47. package/dist/chat-card.d.ts +46 -0
  48. package/dist/chat-card.js +99 -0
  49. package/dist/chat-channel.d.ts +2 -0
  50. package/dist/chat-channel.js +37 -14
  51. package/dist/chat-controls.d.ts +4 -0
  52. package/dist/chat-controls.js +4 -0
  53. package/dist/chat-decide.d.ts +10 -16
  54. package/dist/chat-decide.js +79 -62
  55. package/dist/chat-delivery.js +13 -4
  56. package/dist/chat-flow.d.ts +0 -27
  57. package/dist/chat-flow.js +31 -2
  58. package/dist/chat-quiet.js +4 -4
  59. package/dist/chat-task-actions.d.ts +3 -2
  60. package/dist/chat-task-actions.js +19 -5
  61. package/dist/chat-terms.d.ts +14 -2
  62. package/dist/chat-terms.js +35 -0
  63. package/dist/chat-voice.d.ts +1 -1
  64. package/dist/chat-voice.js +2 -2
  65. package/dist/check-facts.d.ts +3 -1
  66. package/dist/check-facts.js +57 -11
  67. package/dist/check-failure.d.ts +24 -3
  68. package/dist/check-failure.js +89 -13
  69. package/dist/check-levels-ui.d.ts +4 -0
  70. package/dist/check-levels-ui.js +10 -1
  71. package/dist/check-load.d.ts +85 -0
  72. package/dist/check-load.js +147 -0
  73. package/dist/check-only-standing.d.ts +36 -0
  74. package/dist/check-only-standing.js +39 -0
  75. package/dist/check-only.d.ts +15 -0
  76. package/dist/check-only.js +99 -0
  77. package/dist/check-repair.d.ts +47 -0
  78. package/dist/check-repair.js +240 -0
  79. package/dist/check-report.d.ts +2 -0
  80. package/dist/check-report.js +1 -1
  81. package/dist/check-stamp.d.ts +46 -0
  82. package/dist/check-stamp.js +93 -0
  83. package/dist/checkout-cleanup.d.ts +36 -5
  84. package/dist/checkout-cleanup.js +166 -14
  85. package/dist/claim.d.ts +6 -0
  86. package/dist/claim.js +13 -2
  87. package/dist/cli-help.d.ts +4 -1
  88. package/dist/cli-help.js +49 -30
  89. package/dist/cli.js +15 -1
  90. package/dist/code-extract.d.ts +44 -0
  91. package/dist/code-extract.js +88 -0
  92. package/dist/code-map-acts.d.ts +24 -0
  93. package/dist/code-map-acts.js +53 -0
  94. package/dist/code-map-admission.d.ts +52 -0
  95. package/dist/code-map-admission.js +295 -0
  96. package/dist/code-map-build.d.ts +63 -0
  97. package/dist/code-map-build.js +415 -0
  98. package/dist/code-map-cli.d.ts +153 -0
  99. package/dist/code-map-cli.js +103 -0
  100. package/dist/code-map-main.d.ts +1 -0
  101. package/dist/code-map-main.js +48 -0
  102. package/dist/code-map-read.d.ts +106 -0
  103. package/dist/code-map-read.js +171 -0
  104. package/dist/code-map-report.d.ts +37 -0
  105. package/dist/code-map-report.js +95 -0
  106. package/dist/code-map-shape.d.ts +172 -0
  107. package/dist/code-map-shape.js +327 -0
  108. package/dist/code-map-store.d.ts +136 -0
  109. package/dist/code-map-store.js +233 -0
  110. package/dist/coding-provider.d.ts +3 -1
  111. package/dist/coding-provider.js +12 -7
  112. package/dist/coding-update.js +3 -2
  113. package/dist/coding-workspace.d.ts +1 -1
  114. package/dist/coding-workspace.js +8 -8
  115. package/dist/console-chrome.js +2 -2
  116. package/dist/containment.d.ts +5 -0
  117. package/dist/containment.js +14 -1
  118. package/dist/contracts/chat-actions.d.ts +92 -0
  119. package/dist/contracts/chat-actions.js +20 -0
  120. package/dist/contracts/chat-card.d.ts +91 -0
  121. package/dist/contracts/chat-card.js +54 -0
  122. package/dist/contracts/chat-content.d.ts +191 -0
  123. package/dist/contracts/chat-content.js +4 -0
  124. package/dist/contracts/cli.d.ts +52 -0
  125. package/dist/contracts/cli.js +4 -0
  126. package/dist/contracts/console-api.d.ts +12 -3
  127. package/dist/contracts/console-api.js +12 -3
  128. package/dist/contracts/flow-propose.d.ts +8 -1
  129. package/dist/contracts/flow-propose.js +3 -1
  130. package/dist/contracts/flow-send.d.ts +126 -0
  131. package/dist/contracts/flow-send.js +3 -0
  132. package/dist/contracts/gateway-tools.d.ts +17 -0
  133. package/dist/contracts/gateway-tools.js +3 -1
  134. package/dist/contracts/lead-tools.d.ts +234 -0
  135. package/dist/contracts/lead-tools.js +25 -1
  136. package/dist/contracts/project-knowledge.d.ts +38 -5
  137. package/dist/contracts/project-knowledge.js +11 -5
  138. package/dist/contracts/project-memory.d.ts +3 -1
  139. package/dist/contracts/project-memory.js +3 -2
  140. package/dist/contracts/storage.d.ts +14 -0
  141. package/dist/contracts/storage.js +3 -1
  142. package/dist/contracts/store-json.d.ts +18 -0
  143. package/dist/contracts/youiyoux-request.d.ts +1 -1
  144. package/dist/contracts/youiyoux-request.js +1 -1
  145. package/dist/desktop-access.js +6 -2
  146. package/dist/discord-chat.js +14 -0
  147. package/dist/dispatch.d.ts +1 -1
  148. package/dist/dispatch.js +25 -16
  149. package/dist/dispose.d.ts +19 -0
  150. package/dist/dispose.js +55 -9
  151. package/dist/easy-start.js +2 -3
  152. package/dist/eval-oracle.js +4 -1
  153. package/dist/evals.js +2 -1
  154. package/dist/evidence-pair.d.ts +53 -0
  155. package/dist/evidence-pair.js +128 -0
  156. package/dist/exhaustion.d.ts +17 -4
  157. package/dist/exhaustion.js +44 -4
  158. package/dist/export.js +1 -1
  159. package/dist/failing-first.d.ts +31 -0
  160. package/dist/failing-first.js +44 -0
  161. package/dist/fallback-schema.d.ts +8 -0
  162. package/dist/fallback-schema.js +40 -0
  163. package/dist/fallback.d.ts +138 -0
  164. package/dist/fallback.js +605 -0
  165. package/dist/fast-start.d.ts +136 -0
  166. package/dist/fast-start.js +431 -0
  167. package/dist/fast-terms.d.ts +9 -0
  168. package/dist/fast-terms.js +23 -0
  169. package/dist/fenced-check-coverage.d.ts +62 -0
  170. package/dist/fenced-check-coverage.js +54 -0
  171. package/dist/findings.d.ts +224 -0
  172. package/dist/findings.js +449 -0
  173. package/dist/first-run.js +1 -1
  174. package/dist/flaky-ci.d.ts +31 -0
  175. package/dist/flaky-ci.js +149 -0
  176. package/dist/flaky-cli.d.ts +60 -0
  177. package/dist/flaky-cli.js +60 -0
  178. package/dist/flaky.d.ts +75 -9
  179. package/dist/flaky.js +255 -0
  180. package/dist/fleet-schema.d.ts +17 -0
  181. package/dist/fleet-schema.js +135 -0
  182. package/dist/flow-browser.js +2 -2
  183. package/dist/flow-card-task.js +3 -0
  184. package/dist/flow-code.d.ts +2 -2
  185. package/dist/flow-code.js +9 -5
  186. package/dist/flow-result-card.d.ts +22 -0
  187. package/dist/flow-result-card.js +55 -0
  188. package/dist/flow-send.js +12 -9
  189. package/dist/flow-steps.js +1 -1
  190. package/dist/flow-triggers.d.ts +1 -1
  191. package/dist/flow-triggers.js +2 -2
  192. package/dist/flow-unattended.d.ts +26 -0
  193. package/dist/flow-unattended.js +12 -3
  194. package/dist/flows-ui.js +10 -2
  195. package/dist/follow-through-brief.d.ts +12 -0
  196. package/dist/follow-through-brief.js +31 -0
  197. package/dist/follow-through-cli.d.ts +23 -0
  198. package/dist/follow-through-cli.js +153 -0
  199. package/dist/git-incident.d.ts +16 -0
  200. package/dist/git-incident.js +69 -6
  201. package/dist/github-import.d.ts +62 -0
  202. package/dist/github-import.js +146 -0
  203. package/dist/guides.js +15 -10
  204. package/dist/handover-note.d.ts +33 -0
  205. package/dist/handover-note.js +106 -0
  206. package/dist/invoke.d.ts +25 -2
  207. package/dist/invoke.js +157 -58
  208. package/dist/job-object-helper.ps1 +10 -3
  209. package/dist/keymap.d.ts +41 -0
  210. package/dist/keymap.js +51 -0
  211. package/dist/knowledge-cli.js +1 -1
  212. package/dist/knowledge-ui.d.ts +21 -4
  213. package/dist/knowledge-ui.js +75 -7
  214. package/dist/laptop-background.d.ts +16 -0
  215. package/dist/laptop-background.js +108 -2
  216. package/dist/lead-cli.js +26 -24
  217. package/dist/lead-context.js +1 -1
  218. package/dist/lead-contract.d.ts +1 -1
  219. package/dist/lead-contract.js +3 -2
  220. package/dist/lead-doors.d.ts +4 -0
  221. package/dist/lead-doors.js +2 -2
  222. package/dist/lead-progress.js +5 -0
  223. package/dist/lead-status.d.ts +2 -0
  224. package/dist/lead-status.js +6 -2
  225. package/dist/lead-tools.js +162 -34
  226. package/dist/lead.js +2 -2
  227. package/dist/lesson-notes.d.ts +81 -0
  228. package/dist/lesson-notes.js +336 -0
  229. package/dist/limits-ui.js +1 -1
  230. package/dist/local-owner.d.ts +1 -1
  231. package/dist/local-owner.js +16 -0
  232. package/dist/machine-check.d.ts +16 -0
  233. package/dist/machine-check.js +26 -0
  234. package/dist/machine-identity.d.ts +75 -0
  235. package/dist/machine-identity.js +170 -0
  236. package/dist/mcp-core.js +11 -1
  237. package/dist/memory-cli.d.ts +300 -1
  238. package/dist/memory-cli.js +62 -9
  239. package/dist/memory-pass.d.ts +16 -0
  240. package/dist/memory-pass.js +67 -3
  241. package/dist/memory-tidy.d.ts +181 -0
  242. package/dist/memory-tidy.js +523 -0
  243. package/dist/memory-use.d.ts +35 -0
  244. package/dist/memory-use.js +109 -0
  245. package/dist/merge-checklist.d.ts +55 -0
  246. package/dist/merge-checklist.js +182 -0
  247. package/dist/modes.d.ts +6 -6
  248. package/dist/modes.js +3 -1
  249. package/dist/needs-you.d.ts +31 -9
  250. package/dist/needs-you.js +110 -41
  251. package/dist/nightly-github.d.ts +2 -0
  252. package/dist/nightly-github.js +4 -4
  253. package/dist/operate-remote-arguments.js +7 -1
  254. package/dist/operate-remote.js +3 -1
  255. package/dist/operate.d.ts +6 -1
  256. package/dist/operate.js +565 -64
  257. package/dist/phase-routing.js +2 -2
  258. package/dist/plain-schema.d.ts +23 -0
  259. package/dist/plain-schema.js +94 -0
  260. package/dist/plain-words.d.ts +20 -0
  261. package/dist/plain-words.js +66 -0
  262. package/dist/plan-login.d.ts +14 -0
  263. package/dist/plan-login.js +58 -0
  264. package/dist/planner.d.ts +1 -1
  265. package/dist/planner.js +4 -2
  266. package/dist/process-liveness.d.ts +2 -0
  267. package/dist/process-liveness.js +61 -17
  268. package/dist/project-delete-ui.d.ts +19 -2
  269. package/dist/project-delete-ui.js +29 -1
  270. package/dist/project-delete.js +14 -1
  271. package/dist/project-knowledge.d.ts +18 -11
  272. package/dist/project-knowledge.js +39 -9
  273. package/dist/project-learning.d.ts +2 -1
  274. package/dist/project-learning.js +15 -45
  275. package/dist/project-memory.d.ts +5 -0
  276. package/dist/project-memory.js +22 -2
  277. package/dist/project-tools.d.ts +4 -4
  278. package/dist/project-tools.js +23 -7
  279. package/dist/proof.js +30 -5
  280. package/dist/protected-storage-look.d.ts +1 -0
  281. package/dist/protected-storage-look.js +13 -0
  282. package/dist/protected-storage.d.ts +70 -39
  283. package/dist/protected-storage.js +196 -147
  284. package/dist/provider-auth.js +1 -1
  285. package/dist/provider-capture.d.ts +34 -0
  286. package/dist/provider-capture.js +53 -0
  287. package/dist/publish.js +9 -1
  288. package/dist/pull-request-flow.js +5 -0
  289. package/dist/push.d.ts +18 -2
  290. package/dist/push.js +40 -16
  291. package/dist/release-adapters.d.ts +9 -0
  292. package/dist/release-adapters.js +76 -0
  293. package/dist/release-auto.js +13 -13
  294. package/dist/release-card.d.ts +1 -2
  295. package/dist/release-card.js +11 -0
  296. package/dist/release-carry.d.ts +7 -2
  297. package/dist/release-carry.js +49 -10
  298. package/dist/release-cli.d.ts +4 -0
  299. package/dist/release-cli.js +29 -22
  300. package/dist/release-coverage.js +1 -1
  301. package/dist/release-next.d.ts +48 -0
  302. package/dist/release-next.js +161 -0
  303. package/dist/release.d.ts +20 -1
  304. package/dist/release.js +85 -9
  305. package/dist/remote-destination.d.ts +36 -0
  306. package/dist/remote-destination.js +217 -0
  307. package/dist/remote-main.d.ts +48 -0
  308. package/dist/remote-main.js +84 -5
  309. package/dist/repository-context.d.ts +3 -2
  310. package/dist/repository-context.js +112 -70
  311. package/dist/restart-certification.d.ts +1 -0
  312. package/dist/restart-certification.js +8 -6
  313. package/dist/result-acts.d.ts +27 -19
  314. package/dist/result-acts.js +36 -25
  315. package/dist/result-follow-ups.d.ts +2 -2
  316. package/dist/result-follow-ups.js +18 -4
  317. package/dist/result-review.d.ts +1 -1
  318. package/dist/route-change-check.d.ts +4 -0
  319. package/dist/route-change-check.js +13 -0
  320. package/dist/route-change.d.ts +22 -0
  321. package/dist/route-change.js +89 -0
  322. package/dist/route-hooks.js +3 -2
  323. package/dist/route-results.d.ts +6 -1
  324. package/dist/route-results.js +14 -5
  325. package/dist/run-closeout.d.ts +1 -1
  326. package/dist/run-closeout.js +7 -5
  327. package/dist/runner-process.js +3 -2
  328. package/dist/runner.js +2 -1
  329. package/dist/scope.d.ts +28 -4
  330. package/dist/scope.js +92 -28
  331. package/dist/scout.d.ts +1 -1
  332. package/dist/scout.js +2 -1
  333. package/dist/serve.d.ts +1 -1
  334. package/dist/serve.js +26 -18
  335. package/dist/server/chat.js +16 -14
  336. package/dist/server/chrome.d.ts +1 -1
  337. package/dist/server/chrome.js +26 -35
  338. package/dist/server/console.css +73 -0
  339. package/dist/server/guards.js +3 -0
  340. package/dist/server/home.d.ts +6 -0
  341. package/dist/server/home.js +21 -13
  342. package/dist/server/http.js +1 -1
  343. package/dist/server/kit.js +1 -1
  344. package/dist/server/merge-ready-view.d.ts +10 -0
  345. package/dist/server/merge-ready-view.js +30 -0
  346. package/dist/server/pages-assets.d.ts +1 -0
  347. package/dist/server/pages-assets.js +8 -5
  348. package/dist/server/pages.js +103 -82
  349. package/dist/server/render-chat.js +16 -3
  350. package/dist/server/render-code-map.d.ts +30 -0
  351. package/dist/server/render-code-map.js +137 -0
  352. package/dist/server/render-flaky.d.ts +20 -0
  353. package/dist/server/render-flaky.js +59 -0
  354. package/dist/server/render-follow-through.d.ts +11 -0
  355. package/dist/server/render-follow-through.js +68 -0
  356. package/dist/server/render-history.js +1 -1
  357. package/dist/server/render-new-task.d.ts +26 -1
  358. package/dist/server/render-new-task.js +30 -5
  359. package/dist/server/render-pages.d.ts +1 -175
  360. package/dist/server/render-pages.js +38 -313
  361. package/dist/server/render-projects.d.ts +2 -1
  362. package/dist/server/render-projects.js +9 -7
  363. package/dist/server/render-release.d.ts +2 -0
  364. package/dist/server/render-release.js +3 -3
  365. package/dist/server/render-results.d.ts +2 -0
  366. package/dist/server/render-results.js +68 -68
  367. package/dist/server/render-tasks.d.ts +16 -2
  368. package/dist/server/render-tasks.js +177 -141
  369. package/dist/server/retired-routes.d.ts +17 -0
  370. package/dist/server/retired-routes.js +53 -0
  371. package/dist/server/route-table.d.ts +3 -0
  372. package/dist/server/route-table.js +48 -12
  373. package/dist/server/settings.js +166 -34
  374. package/dist/server/task-views.js +66 -26
  375. package/dist/server/tasks.d.ts +2 -6
  376. package/dist/server/tasks.js +250 -321
  377. package/dist/server/welcome.js +1 -1
  378. package/dist/settings-groups-ui.d.ts +1 -0
  379. package/dist/settings-groups-ui.js +4 -2
  380. package/dist/settings-kit.js +3 -2
  381. package/dist/settings-proofs.js +3 -1
  382. package/dist/slack-chat.js +14 -1
  383. package/dist/steer-mailbox.d.ts +8 -1
  384. package/dist/steer-mailbox.js +164 -6
  385. package/dist/stop-proof.js +6 -4
  386. package/dist/storage-sweep-process.js +1 -1
  387. package/dist/storage-sweep.d.ts +5 -3
  388. package/dist/storage-sweep.js +30 -9
  389. package/dist/storage-ui.js +28 -17
  390. package/dist/storage.d.ts +27 -2
  391. package/dist/storage.js +39 -2
  392. package/dist/store.d.ts +89 -7
  393. package/dist/store.js +386 -114
  394. package/dist/surface.js +67 -6
  395. package/dist/sweep-quarantine.d.ts +1 -0
  396. package/dist/sweep-quarantine.js +6 -4
  397. package/dist/tamper-scan.d.ts +4 -0
  398. package/dist/tamper-scan.js +90 -0
  399. package/dist/task-aliases.d.ts +5 -0
  400. package/dist/task-aliases.js +9 -0
  401. package/dist/task-control.d.ts +2 -1
  402. package/dist/task-control.js +4 -1
  403. package/dist/task-outcome-cli.d.ts +2 -0
  404. package/dist/task-outcome-cli.js +17 -17
  405. package/dist/task-sizing.d.ts +5 -0
  406. package/dist/task-sizing.js +2 -0
  407. package/dist/task-source.d.ts +7 -0
  408. package/dist/task-source.js +14 -0
  409. package/dist/task-status.d.ts +9 -0
  410. package/dist/task-status.js +45 -49
  411. package/dist/teardown-git.d.ts +18 -0
  412. package/dist/teardown-git.js +105 -21
  413. package/dist/telegram-lead.js +23 -6
  414. package/dist/telegram-progress.js +5 -3
  415. package/dist/telegram-status.js +6 -4
  416. package/dist/telegram.js +12 -1
  417. package/dist/test-infra.d.ts +8 -0
  418. package/dist/test-infra.js +18 -0
  419. package/dist/tidy.js +1 -1
  420. package/dist/toolroll-update.js +19 -5
  421. package/dist/tui-contract.d.ts +24 -0
  422. package/dist/tui-source.js +67 -8
  423. package/dist/tui.js +51 -51
  424. package/dist/vanished-retry.d.ts +30 -0
  425. package/dist/vanished-retry.js +174 -0
  426. package/dist/work-index.d.ts +2 -0
  427. package/dist/work-index.js +95 -66
  428. package/dist/work-summary.d.ts +1 -1
  429. package/dist/work-summary.js +7 -2
  430. package/dist/workspace-ui.d.ts +7 -3
  431. package/dist/workspace-ui.js +38 -23
  432. package/dist/worktree.d.ts +12 -3
  433. package/dist/worktree.js +91 -14
  434. package/package.json +2 -1
  435. package/dist/server/render-next.d.ts +0 -63
  436. package/dist/server/render-next.js +0 -109
@@ -60,6 +60,69 @@ export declare const flowSendPayloadSchema: z.ZodObject<{
60
60
  plug: z.ZodString;
61
61
  shot: z.ZodNullable<z.ZodInt>;
62
62
  }, z.core.$strict>>>;
63
+ card: z.ZodOptional<z.ZodObject<{
64
+ version: z.ZodLiteral<1>;
65
+ title: z.ZodString;
66
+ asOf: z.ZodString;
67
+ repos: z.ZodArray<z.ZodString>;
68
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
69
+ kind: z.ZodLiteral<"text">;
70
+ text: z.ZodString;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ kind: z.ZodLiteral<"divider">;
73
+ }, z.core.$strict>, z.ZodObject<{
74
+ kind: z.ZodLiteral<"facts">;
75
+ heading: z.ZodString;
76
+ items: z.ZodArray<z.ZodObject<{
77
+ label: z.ZodString;
78
+ value: z.ZodString;
79
+ }, z.core.$strict>>;
80
+ }, z.core.$strict>, z.ZodObject<{
81
+ kind: z.ZodLiteral<"table">;
82
+ heading: z.ZodString;
83
+ origin: z.ZodEnum<{
84
+ records: "records";
85
+ report: "report";
86
+ }>;
87
+ columns: z.ZodArray<z.ZodObject<{
88
+ label: z.ZodString;
89
+ numeric: z.ZodBoolean;
90
+ }, z.core.$strict>>;
91
+ rows: z.ZodArray<z.ZodArray<z.ZodString>>;
92
+ more: z.ZodInt;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ kind: z.ZodLiteral<"notes">;
95
+ heading: z.ZodString;
96
+ origin: z.ZodEnum<{
97
+ records: "records";
98
+ report: "report";
99
+ }>;
100
+ items: z.ZodArray<z.ZodString>;
101
+ more: z.ZodInt;
102
+ }, z.core.$strict>, z.ZodObject<{
103
+ kind: z.ZodLiteral<"chart">;
104
+ heading: z.ZodString;
105
+ chart: z.ZodEnum<{
106
+ area: "area";
107
+ bar: "bar";
108
+ line: "line";
109
+ pie: "pie";
110
+ }>;
111
+ points: z.ZodArray<z.ZodObject<{
112
+ label: z.ZodString;
113
+ value: z.ZodNumber;
114
+ shown: z.ZodString;
115
+ }, z.core.$strict>>;
116
+ }, z.core.$strict>], "kind">>;
117
+ buttons: z.ZodArray<z.ZodObject<{
118
+ label: z.ZodString;
119
+ path: z.ZodString;
120
+ }, z.core.$strict>>;
121
+ actions: z.ZodArray<z.ZodObject<{
122
+ proposal: z.ZodInt;
123
+ label: z.ZodString;
124
+ }, z.core.$strict>>;
125
+ }, z.core.$strict>>;
63
126
  }, z.core.$strict>;
64
127
  export declare const flowChoosePayloadSchema: z.ZodObject<{
65
128
  version: z.ZodLiteral<1>;
@@ -85,6 +148,69 @@ export declare const flowChoosePayloadSchema: z.ZodObject<{
85
148
  plug: z.ZodString;
86
149
  shot: z.ZodNullable<z.ZodInt>;
87
150
  }, z.core.$strict>>>;
151
+ card: z.ZodOptional<z.ZodObject<{
152
+ version: z.ZodLiteral<1>;
153
+ title: z.ZodString;
154
+ asOf: z.ZodString;
155
+ repos: z.ZodArray<z.ZodString>;
156
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
157
+ kind: z.ZodLiteral<"text">;
158
+ text: z.ZodString;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ kind: z.ZodLiteral<"divider">;
161
+ }, z.core.$strict>, z.ZodObject<{
162
+ kind: z.ZodLiteral<"facts">;
163
+ heading: z.ZodString;
164
+ items: z.ZodArray<z.ZodObject<{
165
+ label: z.ZodString;
166
+ value: z.ZodString;
167
+ }, z.core.$strict>>;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"table">;
170
+ heading: z.ZodString;
171
+ origin: z.ZodEnum<{
172
+ records: "records";
173
+ report: "report";
174
+ }>;
175
+ columns: z.ZodArray<z.ZodObject<{
176
+ label: z.ZodString;
177
+ numeric: z.ZodBoolean;
178
+ }, z.core.$strict>>;
179
+ rows: z.ZodArray<z.ZodArray<z.ZodString>>;
180
+ more: z.ZodInt;
181
+ }, z.core.$strict>, z.ZodObject<{
182
+ kind: z.ZodLiteral<"notes">;
183
+ heading: z.ZodString;
184
+ origin: z.ZodEnum<{
185
+ records: "records";
186
+ report: "report";
187
+ }>;
188
+ items: z.ZodArray<z.ZodString>;
189
+ more: z.ZodInt;
190
+ }, z.core.$strict>, z.ZodObject<{
191
+ kind: z.ZodLiteral<"chart">;
192
+ heading: z.ZodString;
193
+ chart: z.ZodEnum<{
194
+ area: "area";
195
+ bar: "bar";
196
+ line: "line";
197
+ pie: "pie";
198
+ }>;
199
+ points: z.ZodArray<z.ZodObject<{
200
+ label: z.ZodString;
201
+ value: z.ZodNumber;
202
+ shown: z.ZodString;
203
+ }, z.core.$strict>>;
204
+ }, z.core.$strict>], "kind">>;
205
+ buttons: z.ZodArray<z.ZodObject<{
206
+ label: z.ZodString;
207
+ path: z.ZodString;
208
+ }, z.core.$strict>>;
209
+ actions: z.ZodArray<z.ZodObject<{
210
+ proposal: z.ZodInt;
211
+ label: z.ZodString;
212
+ }, z.core.$strict>>;
213
+ }, z.core.$strict>>;
88
214
  options: z.ZodArray<z.ZodObject<{
89
215
  choice: z.ZodInt;
90
216
  label: z.ZodString;
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { z } from "zod";
14
14
  import { parseContract, readVersioned, versioned } from "./contract.js";
15
+ import { chatCardSchema } from "./chat-card.js";
15
16
  import { isRecord } from "../is-record.js";
16
17
  /** A link the message carries: a page of Toolroll's (a button) or the one outside page, a pull request. */
17
18
  export const flowSendLinkSchema = z.union([
@@ -42,6 +43,8 @@ const sendShape = {
42
43
  shots: z.strictObject({ taskId: z.string(), run: z.int() }).nullable(),
43
44
  /** After research: the report's items, numbered in this order in every message and screenshot caption. */
44
45
  items: z.array(flowSendItemSchema).min(1).optional(),
46
+ /** A "Send to me" visit's result as a card (flow-result-card.ts), from what the flow recorded. */
47
+ card: chatCardSchema.optional(),
45
48
  };
46
49
  export const flowChoiceOptionSchema = z.strictObject({ choice: z.int().min(0), label: z.string() });
47
50
  export const flowSendPayloadSchema = versioned(FLOW_SEND_VERSION, sendShape);
@@ -49,6 +49,19 @@ export declare const GATEWAY_TOOL_INPUTS: {
49
49
  search: "search";
50
50
  }>>;
51
51
  }, z.core.$strict>;
52
+ readonly get_code_map: z.ZodObject<{
53
+ repo: z.ZodString;
54
+ version: z.ZodOptional<z.ZodInt>;
55
+ view: z.ZodEnum<{
56
+ area: "area";
57
+ file: "file";
58
+ overview: "overview";
59
+ search: "search";
60
+ }>;
61
+ id: z.ZodOptional<z.ZodString>;
62
+ query: z.ZodOptional<z.ZodString>;
63
+ cursor: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strict>;
52
65
  readonly get_assignment: z.ZodObject<{
53
66
  ref: z.ZodString;
54
67
  }, z.core.$strict>;
@@ -157,6 +170,10 @@ export declare const GATEWAY_TOOL_OUTPUTS: {
157
170
  asOf: z.ZodString;
158
171
  excerpts: z.ZodArray<z.ZodUnknown>;
159
172
  }, z.core.$loose>;
173
+ readonly get_code_map: z.ZodObject<{
174
+ v: z.ZodLiteral<1>;
175
+ ok: z.ZodBoolean;
176
+ }, z.core.$loose>;
160
177
  readonly get_assignment: z.ZodObject<{
161
178
  version: z.ZodLiteral<1>;
162
179
  rootId: z.ZodString;
@@ -11,7 +11,7 @@
11
11
  import { z } from "zod";
12
12
  import { TEXT_LIMITS } from "../text-limits.js";
13
13
  import { envelopeSchema } from "./cli.js";
14
- import { catchUpOutput, decisionOutput, decisionsOutput, LISTED_TASK_STATES, queueColumnsOutput, recapOutput, repositoryContextOutput, scopeText, touches } from "./lead-tools.js";
14
+ import { catchUpOutput, CODE_MAP_VIEWS, codeMapOutput, decisionOutput, decisionsOutput, LISTED_TASK_STATES, queueColumnsOutput, recapOutput, repositoryContextOutput, scopeText, touches } from "./lead-tools.js";
15
15
  const text = (key) => z.string().max(TEXT_LIMITS[key]);
16
16
  const ref = z.string().min(1).max(TEXT_LIMITS.taskRef);
17
17
  const projectPath = text("projectPath").min(1);
@@ -30,6 +30,7 @@ export const ASSIGNMENT_INPUTS = {
30
30
  };
31
31
  export const GATEWAY_TOOL_INPUTS = {
32
32
  get_project_context: z.strictObject({ repo: projectPath, query: text("contextQuery").min(1), mode: z.enum(["search", "impact"]).optional() }),
33
+ get_code_map: z.strictObject({ repo: projectPath, version: z.int().min(1).optional(), view: z.enum(CODE_MAP_VIEWS), id: text("projectPath").optional(), query: text("contextQuery").optional(), cursor: z.string().max(40).optional() }),
33
34
  get_assignment: ASSIGNMENT_INPUTS.show,
34
35
  list_assignment_updates: ASSIGNMENT_INPUTS.updates,
35
36
  claim_assignment: ASSIGNMENT_INPUTS.claim,
@@ -68,6 +69,7 @@ const proposed = z.looseObject({ proposal: int, kind: z.enum(["next", "reserve",
68
69
  const assignmentOutput = z.looseObject({ version: z.literal(1), rootId: str, activeTaskId: str, title: str, state: str, detail: str, attention: z.array(str) });
69
70
  export const GATEWAY_TOOL_OUTPUTS = {
70
71
  get_project_context: repositoryContextOutput,
72
+ get_code_map: codeMapOutput,
71
73
  get_assignment: assignmentOutput,
72
74
  list_assignment_updates: z.looseObject({ events: list, nextCursor: int, hasMore: z.boolean() }),
73
75
  claim_assignment: assignmentOutput,
@@ -30,6 +30,7 @@ export declare const acceptance: z.ZodArray<z.ZodObject<{
30
30
  screenshot: "screenshot";
31
31
  }>>;
32
32
  }, z.core.$strict>>;
33
+ export declare const CODE_MAP_VIEWS: readonly ["overview", "area", "file", "search"];
33
34
  /** Task states a list filters by. */
34
35
  export declare const LISTED_TASK_STATES: readonly ["queued", "running", "done", "failed", "cancelled"];
35
36
  export declare const LEAD_TOOL_INPUTS: {
@@ -48,6 +49,22 @@ export declare const LEAD_TOOL_INPUTS: {
48
49
  search: "search";
49
50
  }>>;
50
51
  }, z.core.$strict>;
52
+ readonly get_code_map: z.ZodObject<{
53
+ repo: z.ZodString;
54
+ version: z.ZodOptional<z.ZodInt>;
55
+ view: z.ZodEnum<{
56
+ area: "area";
57
+ file: "file";
58
+ overview: "overview";
59
+ search: "search";
60
+ }>;
61
+ id: z.ZodOptional<z.ZodString>;
62
+ query: z.ZodOptional<z.ZodString>;
63
+ cursor: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strict>;
65
+ readonly refresh_code_map: z.ZodObject<{
66
+ repo: z.ZodString;
67
+ }, z.core.$strict>;
51
68
  readonly get_action_status: z.ZodObject<{
52
69
  proposal: z.ZodInt;
53
70
  }, z.core.$strict>;
@@ -74,6 +91,23 @@ export declare const LEAD_TOOL_INPUTS: {
74
91
  url: z.ZodOptional<z.ZodString>;
75
92
  secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
93
  about: z.ZodOptional<z.ZodString>;
94
+ on: z.ZodOptional<z.ZodBoolean>;
95
+ finding: z.ZodOptional<z.ZodInt>;
96
+ summary: z.ZodOptional<z.ZodString>;
97
+ file: z.ZodOptional<z.ZodString>;
98
+ line: z.ZodOptional<z.ZodInt>;
99
+ pointer: z.ZodOptional<z.ZodString>;
100
+ revision: z.ZodOptional<z.ZodInt>;
101
+ incident: z.ZodOptional<z.ZodInt>;
102
+ provider: z.ZodOptional<z.ZodString>;
103
+ runner: z.ZodOptional<z.ZodString>;
104
+ persona: z.ZodOptional<z.ZodString>;
105
+ proposal: z.ZodOptional<z.ZodInt>;
106
+ decision: z.ZodOptional<z.ZodEnum<{
107
+ accept: "accept";
108
+ reject: "reject";
109
+ }>>;
110
+ reason: z.ZodOptional<z.ZodString>;
77
111
  }, z.core.$strict>;
78
112
  readonly propose_task_action: z.ZodObject<{
79
113
  task: z.ZodString;
@@ -92,6 +126,63 @@ export declare const LEAD_TOOL_INPUTS: {
92
126
  repo: z.ZodOptional<z.ZodString>;
93
127
  run: z.ZodOptional<z.ZodInt>;
94
128
  }, z.core.$strict>;
129
+ readonly show_card: z.ZodObject<{
130
+ spec: z.ZodObject<{
131
+ root: z.ZodString;
132
+ elements: z.ZodObject<{}, z.core.$catchall<z.ZodObject<{
133
+ type: z.ZodEnum<{
134
+ [x: string]: string;
135
+ }>;
136
+ props: z.ZodObject<{
137
+ source: z.ZodOptional<z.ZodEnum<{
138
+ builders: "builders";
139
+ findings: "findings";
140
+ flow_zones: "flow_zones";
141
+ flows: "flows";
142
+ handover: "handover";
143
+ integrations: "integrations";
144
+ mode: "mode";
145
+ projects: "projects";
146
+ providers: "providers";
147
+ results: "results";
148
+ spend: "spend";
149
+ tasks: "tasks";
150
+ }>>;
151
+ chart: z.ZodOptional<z.ZodEnum<{
152
+ area: "area";
153
+ bar: "bar";
154
+ line: "line";
155
+ pie: "pie";
156
+ }>>;
157
+ columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ facts: z.ZodOptional<z.ZodArray<z.ZodString>>;
159
+ repo: z.ZodOptional<z.ZodString>;
160
+ state: z.ZodOptional<z.ZodEnum<{
161
+ cancelled: "cancelled";
162
+ done: "done";
163
+ failed: "failed";
164
+ queued: "queued";
165
+ running: "running";
166
+ }>>;
167
+ limit: z.ZodOptional<z.ZodInt>;
168
+ flow: z.ZodOptional<z.ZodInt>;
169
+ days: z.ZodOptional<z.ZodInt>;
170
+ text: z.ZodOptional<z.ZodString>;
171
+ control: z.ZodOptional<z.ZodEnum<{
172
+ [x: string]: string;
173
+ }>>;
174
+ task: z.ZodOptional<z.ZodString>;
175
+ run: z.ZodOptional<z.ZodInt>;
176
+ proposal: z.ZodOptional<z.ZodInt>;
177
+ }, z.core.$strict>;
178
+ children: z.ZodArray<z.ZodString>;
179
+ }, z.core.$strict>>>;
180
+ }, z.core.$strict>;
181
+ }, z.core.$strict>;
182
+ readonly get_findings: z.ZodObject<{
183
+ task: z.ZodOptional<z.ZodString>;
184
+ repo: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strict>;
95
186
  readonly offer_approval: z.ZodObject<{
96
187
  task: z.ZodOptional<z.ZodString>;
97
188
  card: z.ZodOptional<z.ZodInt>;
@@ -156,7 +247,9 @@ export declare const LEAD_TOOL_INPUTS: {
156
247
  add_card: "add_card";
157
248
  add_trigger: "add_trigger";
158
249
  allow_browser: "allow_browser";
250
+ allow_unattended: "allow_unattended";
159
251
  approve: "approve";
252
+ archive: "archive";
160
253
  assign: "assign";
161
254
  cancel_card: "cancel_card";
162
255
  choose: "choose";
@@ -173,11 +266,16 @@ export declare const LEAD_TOOL_INPUTS: {
173
266
  send_back: "send_back";
174
267
  starter: "starter";
175
268
  turn_off_browser: "turn_off_browser";
269
+ turn_off_unattended: "turn_off_unattended";
176
270
  unfollow: "unfollow";
177
271
  }>;
178
272
  repo: z.ZodOptional<z.ZodString>;
179
273
  flow: z.ZodOptional<z.ZodInt>;
180
274
  card: z.ZodOptional<z.ZodInt>;
275
+ days: z.ZodOptional<z.ZodInt>;
276
+ budget: z.ZodOptional<z.ZodString>;
277
+ runs: z.ZodOptional<z.ZodString>;
278
+ include: z.ZodOptional<z.ZodArray<z.ZodInt>>;
181
279
  kit: z.ZodOptional<z.ZodEnum<{
182
280
  [x: string]: string;
183
281
  }>>;
@@ -537,6 +635,10 @@ export declare const LEAD_TOOL_INPUTS: {
537
635
  reference: z.ZodOptional<z.ZodString>;
538
636
  decision: z.ZodOptional<z.ZodInt>;
539
637
  }, z.core.$strict>;
638
+ readonly get_flaky_tests: z.ZodObject<{
639
+ repo: z.ZodString;
640
+ row: z.ZodOptional<z.ZodString>;
641
+ }, z.core.$strict>;
540
642
  readonly get_task_conversation: z.ZodObject<{
541
643
  task: z.ZodString;
542
644
  limit: z.ZodOptional<z.ZodInt>;
@@ -785,6 +887,22 @@ export declare const LEAD_TOOL_READ_INPUTS: {
785
887
  search: "search";
786
888
  }>>;
787
889
  }, z.core.$strict>;
890
+ readonly get_code_map: z.ZodObject<{
891
+ repo: z.ZodString;
892
+ version: z.ZodOptional<z.ZodInt>;
893
+ view: z.ZodEnum<{
894
+ area: "area";
895
+ file: "file";
896
+ overview: "overview";
897
+ search: "search";
898
+ }>;
899
+ id: z.ZodOptional<z.ZodString>;
900
+ query: z.ZodOptional<z.ZodString>;
901
+ cursor: z.ZodOptional<z.ZodString>;
902
+ }, z.core.$strict>;
903
+ readonly refresh_code_map: z.ZodObject<{
904
+ repo: z.ZodString;
905
+ }, z.core.$strict>;
788
906
  readonly get_action_status: z.ZodObject<{
789
907
  proposal: z.ZodInt;
790
908
  }, z.core.$strict>;
@@ -811,6 +929,23 @@ export declare const LEAD_TOOL_READ_INPUTS: {
811
929
  url: z.ZodOptional<z.ZodString>;
812
930
  secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
813
931
  about: z.ZodOptional<z.ZodString>;
932
+ on: z.ZodOptional<z.ZodBoolean>;
933
+ finding: z.ZodOptional<z.ZodInt>;
934
+ summary: z.ZodOptional<z.ZodString>;
935
+ file: z.ZodOptional<z.ZodString>;
936
+ line: z.ZodOptional<z.ZodInt>;
937
+ pointer: z.ZodOptional<z.ZodString>;
938
+ revision: z.ZodOptional<z.ZodInt>;
939
+ incident: z.ZodOptional<z.ZodInt>;
940
+ provider: z.ZodOptional<z.ZodString>;
941
+ runner: z.ZodOptional<z.ZodString>;
942
+ persona: z.ZodOptional<z.ZodString>;
943
+ proposal: z.ZodOptional<z.ZodInt>;
944
+ decision: z.ZodOptional<z.ZodEnum<{
945
+ accept: "accept";
946
+ reject: "reject";
947
+ }>>;
948
+ reason: z.ZodOptional<z.ZodString>;
814
949
  }, z.core.$strict>;
815
950
  readonly propose_task_action: z.ZodObject<{
816
951
  task: z.ZodString;
@@ -829,6 +964,63 @@ export declare const LEAD_TOOL_READ_INPUTS: {
829
964
  repo: z.ZodOptional<z.ZodString>;
830
965
  run: z.ZodOptional<z.ZodInt>;
831
966
  }, z.core.$strict>;
967
+ readonly show_card: z.ZodObject<{
968
+ spec: z.ZodObject<{
969
+ root: z.ZodString;
970
+ elements: z.ZodObject<{}, z.core.$catchall<z.ZodObject<{
971
+ type: z.ZodEnum<{
972
+ [x: string]: string;
973
+ }>;
974
+ props: z.ZodObject<{
975
+ source: z.ZodOptional<z.ZodEnum<{
976
+ builders: "builders";
977
+ findings: "findings";
978
+ flow_zones: "flow_zones";
979
+ flows: "flows";
980
+ handover: "handover";
981
+ integrations: "integrations";
982
+ mode: "mode";
983
+ projects: "projects";
984
+ providers: "providers";
985
+ results: "results";
986
+ spend: "spend";
987
+ tasks: "tasks";
988
+ }>>;
989
+ chart: z.ZodOptional<z.ZodEnum<{
990
+ area: "area";
991
+ bar: "bar";
992
+ line: "line";
993
+ pie: "pie";
994
+ }>>;
995
+ columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
996
+ facts: z.ZodOptional<z.ZodArray<z.ZodString>>;
997
+ repo: z.ZodOptional<z.ZodString>;
998
+ state: z.ZodOptional<z.ZodEnum<{
999
+ cancelled: "cancelled";
1000
+ done: "done";
1001
+ failed: "failed";
1002
+ queued: "queued";
1003
+ running: "running";
1004
+ }>>;
1005
+ limit: z.ZodOptional<z.ZodInt>;
1006
+ flow: z.ZodOptional<z.ZodInt>;
1007
+ days: z.ZodOptional<z.ZodInt>;
1008
+ text: z.ZodOptional<z.ZodString>;
1009
+ control: z.ZodOptional<z.ZodEnum<{
1010
+ [x: string]: string;
1011
+ }>>;
1012
+ task: z.ZodOptional<z.ZodString>;
1013
+ run: z.ZodOptional<z.ZodInt>;
1014
+ proposal: z.ZodOptional<z.ZodInt>;
1015
+ }, z.core.$strict>;
1016
+ children: z.ZodArray<z.ZodString>;
1017
+ }, z.core.$strict>>>;
1018
+ }, z.core.$strict>;
1019
+ }, z.core.$strict>;
1020
+ readonly get_findings: z.ZodObject<{
1021
+ task: z.ZodOptional<z.ZodString>;
1022
+ repo: z.ZodOptional<z.ZodString>;
1023
+ }, z.core.$strict>;
832
1024
  readonly offer_approval: z.ZodObject<{
833
1025
  task: z.ZodOptional<z.ZodString>;
834
1026
  card: z.ZodOptional<z.ZodInt>;
@@ -893,7 +1085,9 @@ export declare const LEAD_TOOL_READ_INPUTS: {
893
1085
  add_card: "add_card";
894
1086
  add_trigger: "add_trigger";
895
1087
  allow_browser: "allow_browser";
1088
+ allow_unattended: "allow_unattended";
896
1089
  approve: "approve";
1090
+ archive: "archive";
897
1091
  assign: "assign";
898
1092
  cancel_card: "cancel_card";
899
1093
  choose: "choose";
@@ -910,11 +1104,16 @@ export declare const LEAD_TOOL_READ_INPUTS: {
910
1104
  send_back: "send_back";
911
1105
  starter: "starter";
912
1106
  turn_off_browser: "turn_off_browser";
1107
+ turn_off_unattended: "turn_off_unattended";
913
1108
  unfollow: "unfollow";
914
1109
  }>;
915
1110
  repo: z.ZodOptional<z.ZodString>;
916
1111
  flow: z.ZodOptional<z.ZodInt>;
917
1112
  card: z.ZodOptional<z.ZodInt>;
1113
+ days: z.ZodOptional<z.ZodInt>;
1114
+ budget: z.ZodOptional<z.ZodString>;
1115
+ runs: z.ZodOptional<z.ZodString>;
1116
+ include: z.ZodOptional<z.ZodArray<z.ZodInt>>;
918
1117
  kit: z.ZodOptional<z.ZodEnum<{
919
1118
  [x: string]: string;
920
1119
  }>>;
@@ -1267,6 +1466,10 @@ export declare const LEAD_TOOL_READ_INPUTS: {
1267
1466
  reference: z.ZodOptional<z.ZodString>;
1268
1467
  decision: z.ZodOptional<z.ZodInt>;
1269
1468
  }, z.core.$strict>;
1469
+ readonly get_flaky_tests: z.ZodObject<{
1470
+ repo: z.ZodString;
1471
+ row: z.ZodOptional<z.ZodString>;
1472
+ }, z.core.$strict>;
1270
1473
  readonly commit_to: z.ZodObject<{
1271
1474
  what: z.ZodString;
1272
1475
  when: z.ZodEnum<{
@@ -1503,6 +1706,11 @@ export declare const LEAD_TOOL_READ_INPUTS: {
1503
1706
  export type LeadToolInput<N extends LeadToolName> = z.infer<(typeof LEAD_TOOL_READ_INPUTS)[N]>;
1504
1707
  /** How a tool's call names a key it doesn't know: propose_flow suggests the flow vocabulary's own words. */
1505
1708
  export declare const LEAD_TOOL_OPTIONS: Partial<Record<LeadToolName, ContractOptions>>;
1709
+ /** One bounded answer from the shared code map reader (code-map-read.ts `MapAnswer`). */
1710
+ export declare const codeMapOutput: z.ZodObject<{
1711
+ v: z.ZodLiteral<1>;
1712
+ ok: z.ZodBoolean;
1713
+ }, z.core.$loose>;
1506
1714
  /** A repository-context read (repository-context.ts `RepositoryContext`). */
1507
1715
  export declare const repositoryContextOutput: z.ZodObject<{
1508
1716
  version: z.ZodLiteral<1>;
@@ -1609,6 +1817,16 @@ export declare const LEAD_TOOL_OUTPUTS: {
1609
1817
  asOf: z.ZodString;
1610
1818
  excerpts: z.ZodArray<z.ZodUnknown>;
1611
1819
  }, z.core.$loose>;
1820
+ readonly get_code_map: z.ZodObject<{
1821
+ v: z.ZodLiteral<1>;
1822
+ ok: z.ZodBoolean;
1823
+ }, z.core.$loose>;
1824
+ readonly refresh_code_map: z.ZodObject<{
1825
+ request: z.ZodEnum<{
1826
+ "already-queued": "already-queued";
1827
+ queued: "queued";
1828
+ }>;
1829
+ }, z.core.$loose>;
1612
1830
  readonly get_action_status: z.ZodObject<{
1613
1831
  proposal: z.ZodNumber;
1614
1832
  operation: z.ZodString;
@@ -1651,6 +1869,19 @@ export declare const LEAD_TOOL_OUTPUTS: {
1651
1869
  label: z.ZodString;
1652
1870
  action: z.ZodString;
1653
1871
  }, z.core.$loose>;
1872
+ readonly show_card: z.ZodObject<{
1873
+ card: z.ZodNumber;
1874
+ title: z.ZodString;
1875
+ shows: z.ZodArray<z.ZodString>;
1876
+ }, z.core.$loose>;
1877
+ readonly get_findings: z.ZodObject<{
1878
+ findings: z.ZodArray<z.ZodObject<{
1879
+ finding: z.ZodNumber;
1880
+ task: z.ZodString;
1881
+ state: z.ZodString;
1882
+ }, z.core.$loose>>;
1883
+ rule: z.ZodString;
1884
+ }, z.core.$loose>;
1654
1885
  readonly offer_approval: z.ZodObject<{
1655
1886
  offered: z.ZodBoolean;
1656
1887
  }, z.core.$loose>;
@@ -1824,6 +2055,9 @@ export declare const LEAD_TOOL_OUTPUTS: {
1824
2055
  readonly get_project_knowledge: z.ZodObject<{
1825
2056
  revision: z.ZodNumber;
1826
2057
  }, z.core.$loose>;
2058
+ readonly get_flaky_tests: z.ZodObject<{
2059
+ notice: z.ZodString;
2060
+ }, z.core.$loose>;
1827
2061
  readonly get_task_conversation: z.ZodObject<{
1828
2062
  task: z.ZodString;
1829
2063
  messages: z.ZodArray<z.ZodObject<{
@@ -11,7 +11,9 @@
11
11
  import { z } from "zod";
12
12
  import { CHAT_ACTIONS } from "../chat-actions.js";
13
13
  import { RESULT_IMAGES_PER_TURN_CAP } from "../chat-evidence.js";
14
+ import { CARD_CATALOG, CARD_SOURCES, CARD_TASK_STATES } from "../card-catalog.js";
14
15
  import { CHAT_CONTROLS } from "../chat-controls.js";
16
+ import { CARD_CHART_TYPES, CARD_LIMITS } from "./chat-card.js";
15
17
  import { CHAT_TASK_ACTIONS } from "../chat-task-actions.js";
16
18
  import { LIMITS } from "../decision.js";
17
19
  import { CHECK_RESULTS, RUN_OUTCOMES, TASK_STATES } from "../lead-commitments.js";
@@ -46,14 +48,24 @@ export const touches = z.array(text("taskTouch")).max(50);
46
48
  export const acceptance = z.array(acceptanceCriterionSchema).min(1).max(ACCEPTANCE_LIMITS.criteria);
47
49
  /** A note the operator's own words fill (revise feedback, steering, a flow card's note). */
48
50
  const note = z.string().max(LIMITS.note, { error: issue => overBy(LIMITS.note, issue.input) }).describe(`At most ${LIMITS.note} characters; longer is refused with its length, not cut.`);
51
+ export const CODE_MAP_VIEWS = ["overview", "area", "file", "search"];
49
52
  /** Task states a list filters by. */
50
53
  export const LISTED_TASK_STATES = ["queued", "running", "done", "failed", "cancelled"];
51
54
  /** The shared actions the lead proposes with propose_action; flows and subagents have their own tools. */
52
55
  const ACTION_OPERATIONS = Object.keys(CHAT_ACTIONS).filter(one => !one.startsWith("flow_") && !one.startsWith("subagent_"));
56
+ /** A card's spec as the lead sees it: one flat props object. Each element's own props are read strictly by card-catalog.ts. */
57
+ const cardProps = z.strictObject({
58
+ source: z.enum(CARD_SOURCES).optional(), chart: z.enum(CARD_CHART_TYPES).optional(), columns: z.array(z.string().max(40)).max(CARD_LIMITS.columns).optional(), facts: z.array(z.string().max(40)).max(CARD_LIMITS.facts).optional(),
59
+ repo: repoId.optional(), state: z.enum(CARD_TASK_STATES).optional(), limit: z.int().min(1).max(CARD_LIMITS.rows).optional(), flow: id.optional(), days: z.int().min(1).max(90).optional(),
60
+ text: z.string().max(CARD_LIMITS.text).optional(), control: enumOf(Object.keys(CHAT_CONTROLS)).optional(), task: taskRef.optional(), run: id.optional(), proposal: id.optional(),
61
+ });
62
+ const cardSpec = z.strictObject({ root: z.string().max(40), elements: z.object({}).catchall(z.strictObject({ type: enumOf(Object.keys(CARD_CATALOG.data.components)), props: cardProps, children: z.array(z.string().max(40)).max(16) })) });
53
63
  export const LEAD_TOOL_INPUTS = {
54
64
  get_brief: z.strictObject({ repo: repoId.optional() }),
55
65
  get_project_activity: z.strictObject({ repo: repoId, offset: offset.optional() }),
56
66
  get_project_context: z.strictObject({ repo: repoId, query: text("contextQuery").min(1), mode: z.enum(["search", "impact"]).optional() }),
67
+ get_code_map: z.strictObject({ repo: repoId, version: id.optional(), view: z.enum(CODE_MAP_VIEWS), id: text("projectPath").optional(), query: text("contextQuery").optional(), cursor: z.string().max(40).optional() }),
68
+ refresh_code_map: z.strictObject({ repo: repoId }),
57
69
  get_action_status: z.strictObject({ proposal: id }),
58
70
  get_actions: z.strictObject({}),
59
71
  propose_action: z.strictObject({
@@ -61,11 +73,15 @@ export const LEAD_TOOL_INPUTS = {
61
73
  sample: text("actionSample").optional(), content: text("actionContent").optional(), instructions: text("flowInstructions").optional(),
62
74
  title: text("actionTitle").optional(), id: z.string().optional(), run: id.optional(), note: note.optional(), catalog: text("actionName").optional(),
63
75
  name: text("actionName").optional(), command: text("actionCommand").optional(), args: z.array(text("actionCommand")).max(40).optional(),
64
- url: text("actionUrl").optional(), secrets: z.array(text("actionSecret")).max(12).optional(), about: text("actionAbout").optional(),
76
+ url: text("actionUrl").optional(), secrets: z.array(text("actionSecret")).max(12).optional(), about: text("actionAbout").optional(), on: z.boolean().optional(),
77
+ finding: id.optional(), summary: text("actionAbout").optional(), file: text("actionName").optional(), line: id.optional(), pointer: z.string().max(40).optional(),
78
+ revision: id.optional(), incident: id.optional(), provider: z.string().max(40).optional(), runner: text("actionName").optional(), persona: note.optional(), proposal: id.optional(), decision: z.enum(["accept", "reject"]).optional(), reason: text("actionAbout").optional(),
65
79
  }),
66
80
  propose_task_action: z.strictObject({ task: taskRef, operation: enumOf(Object.keys(CHAT_TASK_ACTIONS)), dependency: taskRef.optional(), run: id.optional() }),
67
81
  get_controls: z.strictObject({}),
68
82
  show_control: z.strictObject({ control: enumOf(Object.keys(CHAT_CONTROLS)), task: taskRef.optional(), repo: repoId.optional(), run: id.optional() }),
83
+ show_card: z.strictObject({ spec: cardSpec }),
84
+ get_findings: z.strictObject({ task: taskRef.optional(), repo: repoId.optional() }),
69
85
  offer_approval: z.strictObject({ task: taskRef.optional(), card: id.optional() }),
70
86
  get_result: z.strictObject({ task: taskRef, run: id.optional(), feedback_offset: offset.optional() }),
71
87
  get_diff: z.strictObject({ task: taskRef, run: id.optional(), file: text("diffPath").min(1).optional(), offset: offset.optional() }),
@@ -100,6 +116,7 @@ export const LEAD_TOOL_INPUTS = {
100
116
  get_flow_insights: z.strictObject({ repo: repoId.optional(), flow: id.optional(), days: z.int().min(1).max(90).optional(), card: id.optional(), entry: id.optional() }),
101
117
  get_skills: z.strictObject({ repo: repoId, version: z.string().regex(/^[a-f0-9]{20}$/).optional(), offset: offset.optional() }),
102
118
  get_project_knowledge: z.strictObject({ repo: repoId, reference: text("knowledgeReference").optional(), decision: id.optional() }),
119
+ get_flaky_tests: z.strictObject({ repo: repoId, row: text("knowledgeReference").optional() }),
103
120
  get_task_conversation: z.strictObject({ task: taskRef, limit: z.int().min(1).max(30).optional() }),
104
121
  commit_to: z.strictObject({
105
122
  what: text("promise").min(3), when: z.enum(["task", "run", "check", "time"]), task: taskRef.optional(), run: id.optional(),
@@ -185,6 +202,8 @@ const rows = (shape) => z.array(z.looseObject(shape));
185
202
  const cardDrafted = z.looseObject({ proposal: int, label: str, awaiting: str, executed: z.literal(false) });
186
203
  /** A proposal row drafted by one of the queue, hold, scope and answer tools. */
187
204
  const proposed = (kind, shape = {}) => z.looseObject({ proposal: int, kind: z.literal(kind), awaiting: str, ...shape });
205
+ /** One bounded answer from the shared code map reader (code-map-read.ts `MapAnswer`). */
206
+ export const codeMapOutput = z.looseObject({ v: z.literal(1), ok: z.boolean() });
188
207
  /** A repository-context read (repository-context.ts `RepositoryContext`). */
189
208
  export const repositoryContextOutput = z.looseObject({ version: z.literal(1), readOnly: z.boolean(), query: str, mode: z.enum(["search", "impact"]), asOf: str, excerpts: list });
190
209
  /** The local catch-up (assignment-brief.ts `AssignmentCatchUp`). */
@@ -201,12 +220,16 @@ export const LEAD_TOOL_OUTPUTS = {
201
220
  get_brief: catchUpOutput,
202
221
  get_project_activity: z.looseObject({ asOf: str, since: str, days: int, limit: int, truncated: z.boolean(), ready: z.object({ count: int, oldestFinishedAgeMs: nullable(int), dated: int }), completed: z.looseObject({ count: int }), families: list, familiesTotal: int, familiesOffset: int, nextOffset: nullable(int), incompleteHistory: int }),
203
222
  get_project_context: repositoryContextOutput,
223
+ get_code_map: codeMapOutput,
224
+ refresh_code_map: z.looseObject({ request: z.enum(["queued", "already-queued"]) }),
204
225
  get_action_status: z.looseObject({ proposal: int, operation: str, state: str, outcome: z.unknown(), finishedAt: nullable(str) }),
205
226
  get_actions: z.looseObject({ actions: rows({ operation: str, label: str, secureReview: z.boolean(), inputs: z.array(str) }), notice: str }),
206
227
  propose_action: cardDrafted,
207
228
  propose_task_action: z.looseObject({ proposal: int, action: str, awaiting: str }),
208
229
  get_controls: z.looseObject({ confirmedInChat: z.array(str), existingControls: rows({ id: str, label: str, needsTask: z.boolean(), needsProject: z.boolean() }), rule: str }),
209
230
  show_control: z.looseObject({ card: int, label: str, action: str }),
231
+ show_card: z.looseObject({ card: int, title: str, shows: z.array(str) }),
232
+ get_findings: z.looseObject({ findings: z.array(z.looseObject({ finding: int, task: str, state: str })), rule: str }),
210
233
  offer_approval: z.looseObject({ offered: z.boolean() }),
211
234
  get_result: z.looseObject({
212
235
  task: str, root: str, currentExecution: str, run: int, title: str, feedback: list, feedbackTotal: int, nextFeedbackOffset: nullable(int),
@@ -241,6 +264,7 @@ export const LEAD_TOOL_OUTPUTS = {
241
264
  z.looseObject({ skills: list, nextOffset: nullable(int) }),
242
265
  ]),
243
266
  get_project_knowledge: z.looseObject({ revision: int }),
267
+ get_flaky_tests: z.looseObject({ notice: z.string() }),
244
268
  get_task_conversation: z.looseObject({ task: str, messages: rows({ from: z.enum(["operator", "lead"]), text: str, at: str }), notice: nullable(str) }),
245
269
  commit_to: z.looseObject({ commitment: int, condition: str, expires: str, report: str }),
246
270
  release_commitment: z.looseObject({ commitment: int, state: z.literal("cancelled") }),