toolroll 0.9.133 → 0.9.135

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 (377) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/acp-agents.js +1 -1
  3. package/dist/acp-check-repo-schema.js +52 -0
  4. package/dist/acp-check.js +1 -1
  5. package/dist/acp-client.js +3 -3
  6. package/dist/acp-inspect.js +2 -1
  7. package/dist/acp-providers-schema.js +1 -1
  8. package/dist/agent-detect.js +1 -1
  9. package/dist/agent-fence.js +4 -4
  10. package/dist/agent-handoff.js +11 -0
  11. package/dist/agent-thread/acp-chat.js +1 -0
  12. package/dist/agent-thread/acp-turn.js +4 -0
  13. package/dist/agent-thread/chat-credential.js +1 -0
  14. package/dist/agent-thread/chat-home.js +1 -0
  15. package/dist/agent-thread/chat-spend.js +7 -0
  16. package/dist/agent-thread/chat-tools.js +1 -0
  17. package/dist/agent-thread/chat-turn.js +4 -0
  18. package/dist/agent-thread/custody.js +1 -1
  19. package/dist/agent-thread/direct-host.js +13 -8
  20. package/dist/agent-thread/fence.js +2 -2
  21. package/dist/agent-thread/gemini-chat.js +1 -0
  22. package/dist/agent-thread/git-workspace.js +3 -3
  23. package/dist/agent-thread/guards.js +1 -1
  24. package/dist/agent-thread/openrouter-chat.js +1 -0
  25. package/dist/agent-thread/providers.js +3 -3
  26. package/dist/agent-thread/ship.js +2 -2
  27. package/dist/agentconfig.js +1 -1
  28. package/dist/agents-live.js +2 -2
  29. package/dist/approval-decision.js +1 -0
  30. package/dist/approval-password.js +1 -1
  31. package/dist/approval-summary.js +1 -1
  32. package/dist/assignment.js +1 -1
  33. package/dist/attest.js +1 -1
  34. package/dist/batch-checks.js +2 -2
  35. package/dist/boot-identity.js +1 -1
  36. package/dist/bounded-spawn.js +2 -2
  37. package/dist/brief-fence.js +3 -1
  38. package/dist/browser/{chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js → chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js} +5 -5
  39. package/dist/browser/chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js.br +0 -0
  40. package/dist/browser/chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js.gz +0 -0
  41. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js +2 -0
  42. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js.br +0 -0
  43. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js.gz +0 -0
  44. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js +4 -0
  45. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js.br +0 -0
  46. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js.gz +0 -0
  47. package/dist/browser/chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js +116 -0
  48. package/dist/browser/chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js.br +0 -0
  49. package/dist/browser/chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js.gz +0 -0
  50. package/dist/browser/{chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js → chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js} +7 -7
  51. package/dist/browser/chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js.br +0 -0
  52. package/dist/browser/chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js.gz +0 -0
  53. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js +4 -0
  54. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js.br +0 -0
  55. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js.gz +0 -0
  56. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js +6 -0
  57. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js.br +0 -0
  58. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js.gz +0 -0
  59. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js +2 -0
  60. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js.br +0 -0
  61. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js.gz +0 -0
  62. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js +20 -0
  63. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js.br +0 -0
  64. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js.gz +0 -0
  65. package/dist/browser/chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js +3 -0
  66. package/dist/browser/chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js.br +0 -0
  67. package/dist/browser/chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js.gz +0 -0
  68. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js +2 -0
  69. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js.br +0 -0
  70. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js.gz +0 -0
  71. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js +2 -0
  72. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js.br +0 -0
  73. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js.gz +0 -0
  74. package/dist/browser/chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js +5 -0
  75. package/dist/browser/chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js.br +0 -0
  76. package/dist/browser/chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js.gz +0 -0
  77. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js +2 -0
  78. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js.br +0 -0
  79. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js.gz +0 -0
  80. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js +2 -0
  81. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js.br +0 -0
  82. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js.gz +0 -0
  83. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js +2 -0
  84. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js.br +0 -0
  85. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js.gz +0 -0
  86. package/dist/browser/chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js +4 -0
  87. package/dist/browser/chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js.br +0 -0
  88. package/dist/browser/chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js.gz +0 -0
  89. package/dist/browser/{chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js → chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js} +1 -1
  90. package/dist/browser/chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js.br +0 -0
  91. package/dist/browser/chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js.gz +0 -0
  92. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js +2 -0
  93. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js.br +0 -0
  94. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js.gz +0 -0
  95. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js +2 -0
  96. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js.br +0 -0
  97. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js.gz +0 -0
  98. package/dist/browser/manifest.json +204 -204
  99. package/dist/browser/{terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js → terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js} +1 -1
  100. package/dist/browser/terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js.br +0 -0
  101. package/dist/browser/{terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js.gz → terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js.gz} +0 -0
  102. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css +4 -0
  103. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css.br +0 -0
  104. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css.gz +0 -0
  105. package/dist/browser/{workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js → workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js} +4 -4
  106. package/dist/browser/workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js.br +0 -0
  107. package/dist/browser/workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js.gz +0 -0
  108. package/dist/browser-open.js +1 -1
  109. package/dist/build-review.js +2 -2
  110. package/dist/builder-revision.js +4 -0
  111. package/dist/builder.js +31 -17
  112. package/dist/canvas-capture.js +2 -2
  113. package/dist/canvas-freshness.js +1 -1
  114. package/dist/central-recovery-stage.js +1 -1
  115. package/dist/chat-actions.js +11 -7
  116. package/dist/chat-channel.js +1 -1
  117. package/dist/chat-decide.js +8 -4
  118. package/dist/chat-review.js +1 -1
  119. package/dist/chat-terms.js +2 -2
  120. package/dist/check-levels.js +1 -1
  121. package/dist/cli-help.js +142 -13
  122. package/dist/cli.js +4 -3
  123. package/dist/companion/bonjour.js +1 -1
  124. package/dist/companion/daemon.js +1 -1
  125. package/dist/companion/passkey-gate.js +1 -1
  126. package/dist/companion/reads.js +1 -1
  127. package/dist/companion/store.js +1 -1
  128. package/dist/companion/webauthn.js +1 -1
  129. package/dist/companion/work.js +1 -1
  130. package/dist/container-state.js +2 -2
  131. package/dist/containment.js +2 -2
  132. package/dist/contracts/chat-actions.js +1 -1
  133. package/dist/contracts/console-api.js +1 -1
  134. package/dist/contracts/engine-api.js +1 -1
  135. package/dist/contracts/lead-tools.js +1 -1
  136. package/dist/contracts/project-memory.js +1 -1
  137. package/dist/contracts/provider.js +1 -1
  138. package/dist/controller-supervisor.js +2 -2
  139. package/dist/converse.js +1 -1
  140. package/dist/credential-broker.js +1 -1
  141. package/dist/decision.js +1 -1
  142. package/dist/demo.js +2 -2
  143. package/dist/dispatch.js +2 -2
  144. package/dist/dispose.js +1 -1
  145. package/dist/easy-start.js +2 -2
  146. package/dist/egress.js +1 -1
  147. package/dist/engine-chat.js +1 -1
  148. package/dist/engine-handoff.js +1 -1
  149. package/dist/engine-reads.js +3 -3
  150. package/dist/evals.js +2 -2
  151. package/dist/every-agent-schema.js +105 -0
  152. package/dist/evidence-pack.js +1 -1
  153. package/dist/evidence.js +1 -1
  154. package/dist/exec.js +5 -4
  155. package/dist/fallback.js +1 -1
  156. package/dist/fast-owner-schema.js +33 -0
  157. package/dist/fast-start.js +1 -1
  158. package/dist/flow-unattended.js +2 -2
  159. package/dist/git-identity.js +2 -2
  160. package/dist/github-import.js +1 -1
  161. package/dist/github-read.js +1 -1
  162. package/dist/handoff-relay.js +2 -0
  163. package/dist/install-mode.js +2 -3
  164. package/dist/invoke.js +9 -7
  165. package/dist/keys.js +1 -1
  166. package/dist/laptop-background.js +1 -1
  167. package/dist/lead-capabilities.js +1 -1
  168. package/dist/lead-cli.js +2 -2
  169. package/dist/lead-contract.js +1 -1
  170. package/dist/lead-debrief.js +7 -0
  171. package/dist/lead-doors.js +1 -1
  172. package/dist/lead-tools.js +5 -5
  173. package/dist/lead.js +2 -2
  174. package/dist/live-backup-change.js +2 -2
  175. package/dist/live-backup.js +2 -2
  176. package/dist/live-records.js +3 -3
  177. package/dist/live-terminal.js +4 -4
  178. package/dist/local-checks.js +1 -1
  179. package/dist/local-landing.js +22 -3
  180. package/dist/local-owner-acts.js +2 -2
  181. package/dist/local-owner.js +1 -1
  182. package/dist/machine-identity.js +1 -1
  183. package/dist/memory-pass.js +3 -3
  184. package/dist/model-catalog.js +8 -5
  185. package/dist/model-choices.js +3 -3
  186. package/dist/model-routing.js +1 -1
  187. package/dist/models-cli.js +2 -2
  188. package/dist/names.js +1 -1
  189. package/dist/needs-you.js +1 -1
  190. package/dist/onboard.js +1 -1
  191. package/dist/openrouter-key.js +2 -0
  192. package/dist/operate-commands.js +1 -1
  193. package/dist/operate-remote-arguments.js +1 -1
  194. package/dist/operate-remote.js +1 -1
  195. package/dist/operate.js +46 -19
  196. package/dist/orphan-sweep.js +1 -1
  197. package/dist/owner-mode.js +4 -0
  198. package/dist/panels.js +6 -0
  199. package/dist/peek-cli.js +2 -2
  200. package/dist/phase-routing.js +1 -1
  201. package/dist/pi-build.js +4 -0
  202. package/dist/pi-rpc.js +10 -0
  203. package/dist/pi-tools-extension.js +4 -0
  204. package/dist/plan-login.js +2 -2
  205. package/dist/plane-review.js +1 -1
  206. package/dist/planner-source.js +2 -2
  207. package/dist/planner.js +2 -2
  208. package/dist/plugin-bundle-source.js +1 -0
  209. package/dist/plugin-bundles-schema.js +43 -0
  210. package/dist/policy.js +1 -1
  211. package/dist/pre-run-phase.js +2 -0
  212. package/dist/presence-hold.js +1 -1
  213. package/dist/process-liveness.js +1 -1
  214. package/dist/process-tree.js +1 -1
  215. package/dist/project-knowledge.js +2 -2
  216. package/dist/project-learning.js +6 -5
  217. package/dist/project-memory.js +1 -1
  218. package/dist/project-skills.js +1 -1
  219. package/dist/project-tools.js +3 -3
  220. package/dist/prompt.js +1 -1
  221. package/dist/proposal.js +1 -1
  222. package/dist/protected-storage.js +2 -2
  223. package/dist/provider-auth.js +1 -1
  224. package/dist/provider-connection.js +2 -2
  225. package/dist/provider-home.js +1 -1
  226. package/dist/provider-limits.js +1 -1
  227. package/dist/provider.js +2 -2
  228. package/dist/public-access.js +1 -1
  229. package/dist/pull-request-flow.js +2 -2
  230. package/dist/read-executor.js +1 -1
  231. package/dist/release-adapters.js +2 -2
  232. package/dist/release-carry.js +3 -3
  233. package/dist/release-resume.js +2 -2
  234. package/dist/release-start.js +1 -0
  235. package/dist/reported-usage.js +1 -1
  236. package/dist/repository-context.js +1 -1
  237. package/dist/result-follow-ups.js +2 -2
  238. package/dist/result-projection.js +1 -1
  239. package/dist/review-switch.js +1 -1
  240. package/dist/route-change.js +25 -3
  241. package/dist/run-closeout.js +2 -2
  242. package/dist/runner.js +2 -2
  243. package/dist/sandbox-launch.js +2 -2
  244. package/dist/sandbox-runtime.js +1 -1
  245. package/dist/scope.js +1 -1
  246. package/dist/scout-browser.js +1 -1
  247. package/dist/scout.js +2 -2
  248. package/dist/serve.js +3 -3
  249. package/dist/server/chat-projection.js +1 -1
  250. package/dist/server/chat.js +3 -3
  251. package/dist/server/direct-chat.js +1 -1
  252. package/dist/server/engine-api.js +1 -1
  253. package/dist/server/handoff.js +1 -0
  254. package/dist/server/http.js +1 -1
  255. package/dist/server/live.js +1 -1
  256. package/dist/server/merge-ready-view.js +1 -1
  257. package/dist/server/one-time-secret.js +1 -1
  258. package/dist/server/panels.js +1 -0
  259. package/dist/server/people-tokens.js +1 -1
  260. package/dist/server/route-table.js +1 -1
  261. package/dist/server/runtime.js +1 -1
  262. package/dist/server/send-back-build.js +1 -1
  263. package/dist/server/settings-phone.js +1 -1
  264. package/dist/server/settings-section-table.js +1 -1
  265. package/dist/server/settings-sections.js +1 -1
  266. package/dist/server/settings.js +3 -2
  267. package/dist/server/task-overview.js +1 -0
  268. package/dist/server/task-view-data.js +3 -3
  269. package/dist/server/task-views.js +1 -1
  270. package/dist/server/tasks.js +6 -6
  271. package/dist/server/terminals.js +1 -1
  272. package/dist/settings-data.js +1 -1
  273. package/dist/settings-proofs.js +1 -1
  274. package/dist/setup-guide.js +1 -1
  275. package/dist/shared-deps.js +4 -4
  276. package/dist/sign-in-page.js +2 -2
  277. package/dist/skill-library.js +13 -22
  278. package/dist/skills-manifest.js +1 -1
  279. package/dist/spend-report.js +2 -1
  280. package/dist/spend.js +6 -4
  281. package/dist/ssr-workspace.js +89 -89
  282. package/dist/staged-runtimes.js +1 -1
  283. package/dist/status-probe.js +2 -2
  284. package/dist/stop-proof.js +2 -2
  285. package/dist/storage-sweep-child.js +2 -2
  286. package/dist/storage-sweep-process.js +1 -1
  287. package/dist/storage.js +2 -2
  288. package/dist/store-baseline.js +17 -79
  289. package/dist/store.js +24 -19
  290. package/dist/structured-json.js +1 -0
  291. package/dist/structured-output.js +1 -1
  292. package/dist/subscription-chat.js +16 -4
  293. package/dist/subscription-usage.js +3 -4
  294. package/dist/surface.js +1 -1
  295. package/dist/task-outcome-cli.js +5 -2
  296. package/dist/task-overview.js +1 -0
  297. package/dist/task-review-brief.js +1 -1
  298. package/dist/task-status.js +1 -1
  299. package/dist/teardown-git.js +4 -4
  300. package/dist/test-temp.js +1 -1
  301. package/dist/text-limits.js +1 -1
  302. package/dist/tool-broker.js +1 -1
  303. package/dist/toolroll-update.js +3 -3
  304. package/dist/trusted-path.js +1 -1
  305. package/dist/tui/darwin-arm64/toolroll-tui +0 -0
  306. package/dist/tui/darwin-x64/toolroll-tui +0 -0
  307. package/dist/tui/linux-arm64/toolroll-tui +0 -0
  308. package/dist/tui/linux-x64/toolroll-tui +0 -0
  309. package/dist/tui-contract.js +1 -1
  310. package/dist/tui-launch.js +2 -1
  311. package/dist/verification-evidence.js +1 -1
  312. package/dist/welcome-facts.js +1 -1
  313. package/dist/work-index.js +13 -5
  314. package/package.json +2 -1
  315. package/dist/browser/chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js.br +0 -0
  316. package/dist/browser/chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js.gz +0 -0
  317. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js +0 -2
  318. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js.br +0 -0
  319. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js.gz +0 -0
  320. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js +0 -4
  321. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js.br +0 -0
  322. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js.gz +0 -0
  323. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js +0 -116
  324. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js.br +0 -0
  325. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js.gz +0 -0
  326. package/dist/browser/chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js.br +0 -0
  327. package/dist/browser/chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js.gz +0 -0
  328. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js +0 -4
  329. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js.br +0 -0
  330. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js.gz +0 -0
  331. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js +0 -6
  332. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js.br +0 -0
  333. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js.gz +0 -0
  334. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js +0 -2
  335. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js.br +0 -0
  336. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js.gz +0 -0
  337. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js +0 -20
  338. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js.br +0 -0
  339. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js.gz +0 -0
  340. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js +0 -3
  341. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js.br +0 -0
  342. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js.gz +0 -0
  343. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js +0 -2
  344. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js.br +0 -0
  345. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js.gz +0 -0
  346. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js +0 -5
  347. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js.br +0 -0
  348. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js.gz +0 -0
  349. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js +0 -2
  350. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js.br +0 -0
  351. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js.gz +0 -0
  352. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js +0 -2
  353. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js.br +0 -0
  354. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js.gz +0 -0
  355. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js +0 -2
  356. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js.br +0 -0
  357. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js.gz +0 -0
  358. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js +0 -2
  359. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js.br +0 -0
  360. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js.gz +0 -0
  361. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js +0 -4
  362. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js.br +0 -0
  363. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js.gz +0 -0
  364. package/dist/browser/chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js.br +0 -0
  365. package/dist/browser/chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js.gz +0 -0
  366. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js +0 -2
  367. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js.br +0 -0
  368. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js.gz +0 -0
  369. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js +0 -2
  370. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js.br +0 -0
  371. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js.gz +0 -0
  372. package/dist/browser/terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js.br +0 -0
  373. package/dist/browser/workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js.br +0 -0
  374. package/dist/browser/workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js.gz +0 -0
  375. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css +0 -4
  376. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css.br +0 -0
  377. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css.gz +0 -0
@@ -1,3 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p3$$ as P,p3$$a as R,p3$$b as T,p3$A as q,p3$Aa as S,p3$Ab as z,p3$B as A,p3$Ba as F,p3$Bb as O,p3$C as U,p3$Ca as _,p3$Cb as G,p3$D as H,p3$Da as B,p3$Db as I,p3$E as J,p3$Ea as M,p3$Eb as Q,p3$F as w,p3$Fa as V,p3$Fb as W,p3$G as X,p3$Ga as Y,p3$Gb as Z,p3$H as aa,p3$Ha as sa,p3$Hb as ea,p3$I as na,p3$Ia as ta,p3$Ib as ra,p3$J as ia,p3$Ja as pa,p3$Jb as la,p3$K as oa,p3$Ka as da,p3$Kb as x,p3$L as $a,p3$La as ca,p3$Lb as ba,p3$M as ua,p3$Ma as ma,p3$Mb as ha,p3$N as fa,p3$Na as wa,p3$Nb as xa,p3$O as ga,p3$Oa as ja,p3$Ob as va,p3$P as Na,p3$Pa as ka,p3$Pb as ya,p3$Q as Ea,p3$Qa as La,p3$Qb as Ca,p3$R as Da,p3$Ra as g,p3$Rb as Ka,p3$S as Pa,p3$Sa as Ra,p3$Sb as Ta,p3$T as qa,p3$Ta as Sa,p3$Tb as za,p3$U as Aa,p3$Ua as Fa,p3$Ub as Oa,p3$V as Ua,p3$Va as _a,p3$Vb as Ga,p3$W as Ha,p3$Wa as Ba,p3$Wb as Ia,p3$X as Ja,p3$Xa as Ma,p3$Xb as Qa,p3$Y as Va,p3$Ya as Wa,p3$Yb as Xa,p3$Z as Ya,p3$Za as Za,p3$Zb as as,p3$_ as ss,p3$_a as es,p3$_b as ns,p3$a as ts,p3$aa as rs,p3$ab as is,p3$ac as ps,p3$b as ls,p3$ba as os,p3$bb as ds,p3$c as $s,p3$ca as cs,p3$cb as bs,p3$d as us,p3$da as ms,p3$db as hs,p3$e as $,p3$ea as fs,p3$eb as ws,p3$f as xs,p3$fa as gs,p3$fb as js,p3$g as vs,p3$ga as Ns,p3$gb as ks,p3$h as ys,p3$ha as Es,p3$hb as Ls,p3$i as Cs,p3$ia as Ds,p3$ib as Ks,p3$j as Ps,p3$ja as Rs,p3$jb as Ts,p3$k as qs,p3$ka as Ss,p3$kb as zs,p3$l as As,p3$la as Fs,p3$lb as Os,p3$m as Us,p3$ma as _s,p3$mb as Gs,p3$n as Hs,p3$na as Bs,p3$nb as Is,p3$o as Js,p3$oa as Ms,p3$ob as Qs,p3$p as Vs,p3$pa as Ws,p3$pb as Xs,p3$q as Ys,p3$qa as Zs,p3$qb as ae,p3$r as se,p3$ra as ee,p3$rb as ne,p3$s as te,p3$sa as re,p3$sb as ie,p3$t as pe,p3$ta as le,p3$tb as oe,p3$u as de,p3$ua as $e,p3$ub as ce,p3$v as be,p3$va as ue,p3$vb as me,p3$w as he,p3$wa as fe,p3$wb as we,p3$x as xe,p3$xa as ge,p3$xb as je,p3$y as ve,p3$ya as Ne,p3$yb as ke,p3$z as ye,p3$za as Ee,p3$zb as Le}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as Ke,p2$b as c,p2$c as j,p2$d as Pe,p2$e as v}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var b=c(j(),1),a=c(v(),1);function N({command:s}){let[r,t]=(0,b.useState)(!1);return(0,a.jsxs)("span",{className:"so-first-run-command",children:[(0,a.jsx)("code",{children:s}),(0,a.jsx)($,{className:"max-[901px]:h-11 max-[901px]:min-h-11",variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard?.writeText(s).then(()=>{t(!0),window.setTimeout(()=>t(!1),1500)},()=>{})},"aria-label":`Copy ${s}`,children:r?"Copied":"Copy"})]})}function qe(s,r){return s.trim()===""?r:s.includes(r)?s:`${s.trimEnd()}
3
- ${r}`}function L(s){if(typeof s!="object"||s===null)return!1;let r=s;return r.lead==="on"||r.agent===!0}var k=15e3,u="so:leaving";function Se(s){window.dispatchEvent(new Event(u)),window.location.assign(s)}function C(s){let r=(0,b.useContext)(w);(0,b.useEffect)(()=>{if(!s)return;let t=!1,i=null,e=0,y=()=>i!==null&&Date.now()-i<k,d=n=>{window.clearTimeout(e),t||(e=window.setTimeout(()=>{E()},n))},E=async()=>{try{let n=await fetch(s,{method:"POST",headers:x({accept:"application/json"}),body:new URLSearchParams({csrf:r}),cache:"no-store"}),p=n.ok&&L(await n.json());if(t)return;if(p&&!y()){window.location.reload();return}if(p){d(k-(Date.now()-i)+100);return}}catch{}d(5e3)},l=()=>{i=Date.now()},m=n=>{if(n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;let p=n.target instanceof Element?n.target.closest("a[href]"):null;if(p===null||(p.getAttribute("target")??"_self")!=="_self"||p.hasAttribute("download"))return;let o;try{o=new URL(p.getAttribute("href"),window.location.href)}catch{return}o.hash!==""&&o.origin===window.location.origin&&o.pathname===window.location.pathname&&o.search===window.location.search||l()},h=n=>{n.defaultPrevented||l()},f=n=>{n.persisted&&(i=null,d(3e3))};return window.addEventListener("beforeunload",l),window.addEventListener("click",m),window.addEventListener("submit",h),window.addEventListener("pageshow",f),window.addEventListener(u,l),d(3e3),()=>{t=!0,window.clearTimeout(e),window.removeEventListener("beforeunload",l),window.removeEventListener("click",m),window.removeEventListener("submit",h),window.removeEventListener("pageshow",f),window.removeEventListener(u,l)}},[s,r])}function ze({firstRun:s}){C(s.recheck);let r=s.recheck!=null,t=s.detectedAgents??null,i=s.steps.find(e=>e.key==="project")?.done??!1;return(0,a.jsxs)("section",{className:"so-first-run","aria-labelledby":"first-run-title","data-first-run":!0,children:[(0,a.jsx)("h2",{id:"first-run-title",children:"Get to your first result"}),t!==null&&(0,a.jsxs)("div",{className:"so-first-run-agents","data-first-run-agents":!0,children:[(0,a.jsx)("p",{className:"so-first-run-summary","data-readiness-summary":!0,children:t.summary}),(0,a.jsx)("ul",{className:"so-first-run-pills","aria-label":"Detected coding agents","data-detected-agents":!0,children:t.agents.map(e=>(0,a.jsxs)("li",{className:"so-first-run-pill","data-agent-pill":e.id,"data-status":e.status,"data-default":e.recommended?"true":"false",children:[(0,a.jsx)("span",{className:"so-first-run-pill-dot","aria-hidden":"true"}),(0,a.jsx)("span",{className:"so-first-run-pill-name",children:e.name}),e.recommended?(0,a.jsx)("span",{className:"so-first-run-default-tag","data-default-badge":!0,children:"Default"}):e.status==="needs-sign-in"?(0,a.jsx)("span",{className:"so-first-run-pill-note",children:"Sign in"}):e.status==="not-installed"?(0,a.jsx)("span",{className:"so-first-run-pill-note",children:"Not installed"}):null]},e.id))}),t.recommendedDefault!==null&&!i&&(0,a.jsx)("div",{className:"so-first-run-cta",children:(0,a.jsx)($,{className:"max-[901px]:h-11 max-[901px]:min-h-11",asChild:!0,size:"sm",children:(0,a.jsx)("a",{href:"/projects","data-pick-repo-cta":!0,children:"Pick a repository and start"})})})]}),(0,a.jsx)("p",{className:"so-first-run-setup","data-first-run-setup":!0,children:(0,a.jsx)("a",{className:"k-link",href:"/welcome",children:"Open setup"})}),(0,a.jsx)("ol",{className:"so-first-run-steps",children:s.steps.map(e=>(0,a.jsxs)("li",{"data-step":e.key,"data-done":e.done,children:[(0,a.jsx)("span",{className:"so-first-run-mark","aria-hidden":"true",children:e.done?"✓":""}),(0,a.jsxs)("span",{className:"so-first-run-title",children:[e.title,(0,a.jsx)("span",{className:"so-sr-only",children:e.done?": done":e.checking?": checking":": not yet"})]}),e.checking&&(0,a.jsx)("span",{className:"so-first-run-checking","aria-hidden":"true",children:"Checking…"}),e.action!==null&&(e.action.kind==="link"?(0,a.jsx)($,{className:"max-[901px]:h-11 max-[901px]:min-h-11",asChild:!0,variant:"outline",size:"sm",children:(0,a.jsx)("a",{href:e.action.href,children:e.action.label})}):e.key==="agent"?(0,a.jsx)("span",{"data-sign-in-command":!0,children:(0,a.jsx)(N,{command:e.action.command})}):(0,a.jsx)(N,{command:e.action.command}))]},e.key))}),r&&(0,a.jsxs)("p",{className:"so-first-run-recheck",role:"status","data-first-run-recheck":!0,children:[(0,a.jsx)("span",{className:"so-live-dot","aria-hidden":"true"}),"Checking for a signed-in agent"]})]})}function Ae({firstRun:s,onDraft:r}){return(0,a.jsxs)("div",{className:"so-first-request","data-first-request":!0,children:[s.intro&&(0,a.jsx)("p",{className:"so-first-request-intro","data-how-it-works":!0,children:s.intro}),s.suggestions.length>0&&(0,a.jsx)("div",{className:"lc-sugs so-first-request-suggestions","aria-label":"First tasks to try","data-first-tasks":!0,children:s.suggestions.map(t=>(0,a.jsx)(g,{variant:"outline",sm:!0,className:"lc-sug","data-source":t.source,onClick:()=>r(t.draft),label:t.label},t.draft))}),s.lead&&(0,a.jsxs)("p",{className:"so-first-request-lead","data-lead-line":!0,children:[s.lead.words," · ",(0,a.jsx)("a",{href:s.lead.href,children:"Change"})]})]})}export{qe as a,Se as b,ze as c,Ae as d};
@@ -1,2 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p12$a as m,p12$b as h}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p3$$ as Y,p3$$a as A,p3$$b as F,p3$A as P,p3$Aa as S,p3$Ab as z,p3$B as B,p3$Ba as C,p3$Bb as E,p3$C as G,p3$Ca as H,p3$Cb as I,p3$D as J,p3$Da as K,p3$Db as L,p3$E as M,p3$Ea as O,p3$Eb as Q,p3$F as U,p3$Fa as V,p3$Fb as W,p3$G as X,p3$Ga as Z,p3$Gb as _,p3$H as aa,p3$Ha as sa,p3$Hb as pa,p3$I as $a,p3$Ia as ea,p3$Ib as ba,p3$J as na,p3$Ja as ta,p3$Jb as ra,p3$K as oa,p3$Ka as ia,p3$Kb as la,p3$L as da,p3$La as ca,p3$Lb as ma,p3$M as ha,p3$Ma as ua,p3$Mb as xa,p3$N as ga,p3$Na as ja,p3$Nb as ka,p3$O as ya,p3$Oa as fa,p3$Ob as Na,p3$P as Ta,p3$Pa as qa,p3$Pb as Da,p3$Q as wa,p3$Qa as va,p3$Qb as Ra,p3$R as Ya,p3$Ra as Aa,p3$Rb as Fa,p3$S as Pa,p3$Sa as Sa,p3$Sb as za,p3$T as Ba,p3$Ta as u,p3$Tb as Ca,p3$U as Ea,p3$Ua as Ga,p3$Ub as Ha,p3$V as Ia,p3$Va as Ja,p3$Vb as Ka,p3$W as La,p3$Wa as Ma,p3$Wb as Oa,p3$X as Qa,p3$Xa as Ua,p3$Xb as Va,p3$Y as Wa,p3$Ya as Xa,p3$Yb as Za,p3$Z as _a,p3$Za as as,p3$Zb as ss,p3$_ as ps,p3$_a as $s,p3$_b as es,p3$a as bs,p3$aa as ns,p3$ab as ts,p3$ac as rs,p3$b as os,p3$ba as is,p3$bb as ls,p3$c as ds,p3$ca as cs,p3$cb as ms,p3$d as hs,p3$da as us,p3$db as xs,p3$e as gs,p3$ea as js,p3$eb as ks,p3$f as ys,p3$fa as fs,p3$fb as Ns,p3$g as Ts,p3$ga as qs,p3$gb as x,p3$h as Ds,p3$ha as ws,p3$hb as vs,p3$i as Rs,p3$ia as Ys,p3$ib as i,p3$j as As,p3$ja as Fs,p3$jb as Ps,p3$k as Ss,p3$ka as zs,p3$kb as Bs,p3$l as Cs,p3$la as Es,p3$lb as Gs,p3$m as Hs,p3$ma as Is,p3$mb as Js,p3$n as Ks,p3$na as Ls,p3$nb as Ms,p3$o as Os,p3$oa as Qs,p3$ob as Us,p3$p as Vs,p3$pa as Ws,p3$pb as Xs,p3$q as Zs,p3$qa as _s,p3$qb as ap,p3$r as sp,p3$ra as pp,p3$rb as $p,p3$s as ep,p3$sa as bp,p3$sb as np,p3$t as tp,p3$ta as rp,p3$tb as op,p3$u as ip,p3$ua as lp,p3$ub as dp,p3$v as cp,p3$va as mp,p3$vb as hp,p3$w as up,p3$wa as xp,p3$wb as gp,p3$x as jp,p3$xa as kp,p3$xb as yp,p3$y as fp,p3$ya as Np,p3$yb as Tp,p3$z as qp,p3$za as Dp,p3$zb as wp}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as Yp,p2$b as g,p2$c as Ap,p2$d as Fp,p2$e as j}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var s=g(j(),1),k=3,n=2;function T(a){return{always:[...a.notDone.map($=>({tag:"Not done",text:$})),...a.risks.map($=>({tag:"Risk",text:$}))],more:[...a.decisions.map($=>({tag:"Decided",text:$})),...a.assumptions.map($=>({tag:"Assumed",text:$}))]}}function q(a){let $=a.decisions.length+a.assumptions.length>0,e=a.notDone.length+a.risks.length>0;return!$&&!e?"The agent didn't report decisions or risks.":e?null:"The agent didn't report risks."}function l({line:a}){return(0,s.jsxs)("li",{className:"so-report-line","data-agent-says":a.tag,children:[(0,s.jsx)(u,{word:a.tag,dot:!1}),(0,s.jsx)("span",{className:"so-report-text",children:a.text})]})}function y({one:a}){return(0,s.jsxs)("li",{className:"so-report-line","data-you-said":a.you?"you":"other",children:[(0,s.jsx)("span",{className:"so-report-quote",children:(0,s.jsxs)("bdi",{children:["“",a.note,"”"]})}),(0,s.jsxs)("span",{className:"k-note",children:[a.you?"You":(0,s.jsx)("bdi",{children:a.author})," · ",(0,s.jsx)("time",{dateTime:a.at,title:h(a.at),children:m(a.at)})," · ",a.question!=null?"reply to the agent":a.kind==="sent-back"?"sent back":"note to the agent"]}),a.question!=null&&(0,s.jsxs)("span",{className:"k-note","data-agent-question":"",children:["The agent asked: ",(0,s.jsx)("bdi",{children:a.question})]})]})}function Bp({report:a,said:$}){if(a==null)return null;let e=$??[],{always:d,more:t}=T(a),f=t.slice(0,k),r=t.slice(k),c=q(a),o=d.length+t.length>0,N=e.every(p=>p.you);return(0,s.jsxs)("section",{className:"k-sec so-report","aria-label":"Decisions, risks and notes","data-agent-report":o?"reported":"none",children:[o&&(0,s.jsx)("h3",{children:"The agent says"}),o&&(0,s.jsxs)("ul",{className:"so-report-lines",children:[d.map((p,b)=>(0,s.jsx)(l,{line:p},`a${b}`)),f.map((p,b)=>(0,s.jsx)(l,{line:p},`m${b}`))]}),r.length>0&&(0,s.jsx)(i,{summary:`${r.length} more`,children:(0,s.jsx)("ul",{className:"so-report-lines",children:r.map((p,b)=>(0,s.jsx)(l,{line:p},b))})}),c!==null&&(0,s.jsx)(x,{children:c}),e.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{children:N?"You said":"People said"}),(0,s.jsx)("ul",{className:"so-report-lines","data-you-said-count":e.length,children:e.slice(0,n).map(p=>(0,s.jsx)(y,{one:p},`${p.kind}${p.at}${p.note}`))}),e.length>n&&(0,s.jsx)(i,{summary:`${e.length-n} more`,children:(0,s.jsx)("ul",{className:"so-report-lines",children:e.slice(n).map(p=>(0,s.jsx)(y,{one:p},`${p.kind}${p.at}${p.note}`))})})]})]})}export{Bp as a};
@@ -1,5 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p7$a as Ns,p7$b as ue}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{a as Ve}from"./chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js";import{a as Ke,f as Ge,g as _e}from"./chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js";import{p10$a as me,p10$b as X,p10$c as Z,p10$d as ks,p10$e as $s,p10$f as Cs,p10$g as pe,p10$h as xe,p10$i as Ss}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p11$A as Ts,p11$B as Rs,p11$C as Ls,p11$D as F,p11$E as Is,p11$F as As,p11$G as Hs,p11$H as Ps,p11$I as Us,p11$J as Ms,p11$a as zs,p11$b as Ws,p11$c as Ds,p11$d as Os,p11$e as fe,p11$f as je,p11$g as ge,p11$h as Es,p11$i as Bs,p11$j as Vs,p11$k as Ks,p11$l as Gs,p11$m as _s,p11$n as Js,p11$o as Ys,p11$p as Qs,p11$q as Xs,p11$r as Zs,p11$s as ea,p11$t as sa,p11$u as aa,p11$v as na,p11$w as ta,p11$x as la,p11$y as ra,p11$z as ia}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p12$a as B,p12$b as ee}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p3$$ as ua,p3$$a as ma,p3$$b as pa,p3$A as xa,p3$Aa as fa,p3$Ab as ja,p3$B as ga,p3$Ba as ba,p3$Bb as va,p3$C as Na,p3$Ca as wa,p3$Cb as ya,p3$D as ka,p3$Da as $a,p3$Db as Ca,p3$E as Sa,p3$Ea as qa,p3$Eb as Fa,p3$F as Ta,p3$Fa as Ra,p3$Fb as La,p3$G as N,p3$Ga as Ia,p3$Gb as Aa,p3$H as Ha,p3$Ha as Pa,p3$Hb as Ua,p3$I as Ma,p3$Ia as za,p3$Ib as Wa,p3$J as Da,p3$Ja as Oa,p3$Jb as Ea,p3$K as Ba,p3$Ka as Va,p3$Kb as Ka,p3$L as Ga,p3$La as _a,p3$Lb as Ja,p3$M as se,p3$Ma as Ya,p3$Mb as Qa,p3$N as ae,p3$Na as be,p3$Nb as Xa,p3$O as D,p3$Oa as Za,p3$Ob as en,p3$P as ve,p3$Pa as sn,p3$Pb as an,p3$Q as Ne,p3$Qa as nn,p3$Qb as tn,p3$R as we,p3$Ra as q,p3$Rb as ln,p3$S as ye,p3$Sa as V,p3$Sb as rn,p3$T as cn,p3$Ta as on,p3$Tb as dn,p3$U as hn,p3$Ua as un,p3$Ub as mn,p3$V as pn,p3$Va as xn,p3$Vb as fn,p3$W as jn,p3$Wa as gn,p3$Wb as bn,p3$X as vn,p3$Xa as Nn,p3$Xb as wn,p3$Y as yn,p3$Ya as kn,p3$Yb as $n,p3$Z as Cn,p3$Za as Sn,p3$Zb as qn,p3$_ as Fn,p3$_a as Tn,p3$_b as Rn,p3$a as b,p3$aa as Ln,p3$ab as In,p3$ac as An,p3$b as Hn,p3$ba as Pn,p3$bb as Un,p3$c as Mn,p3$ca as zn,p3$cb as Wn,p3$d as Dn,p3$da as On,p3$db as En,p3$e as T,p3$ea as Bn,p3$eb as Vn,p3$f as ke,p3$fa as Kn,p3$fb as Gn,p3$g as _n,p3$ga as Jn,p3$gb as Yn,p3$h as Qn,p3$ha as Xn,p3$hb as Zn,p3$i as et,p3$ia as st,p3$ib as at,p3$j as nt,p3$ja as tt,p3$jb as lt,p3$k as ne,p3$ka as rt,p3$kb as it,p3$l as ct,p3$la as ot,p3$lb as dt,p3$m as ht,p3$ma as ut,p3$mb as mt,p3$n as pt,p3$na as xt,p3$nb as ft,p3$o as jt,p3$oa as gt,p3$ob as bt,p3$p as vt,p3$pa as Nt,p3$pb as wt,p3$q as O,p3$qa as yt,p3$qb as kt,p3$r as $t,p3$ra as Ct,p3$rb as St,p3$s as qt,p3$sa as Ft,p3$sb as Tt,p3$t as Rt,p3$ta as Lt,p3$tb as It,p3$u as At,p3$ua as Ht,p3$ub as Pt,p3$v as Ut,p3$va as Mt,p3$vb as zt,p3$w as Wt,p3$wa as Dt,p3$wb as Ot,p3$x as Et,p3$xa as Bt,p3$xb as Vt,p3$y as Kt,p3$ya as Gt,p3$yb as _t,p3$z as Jt,p3$za as $e,p3$zb as Yt}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as Zt,p2$b as H,p2$c as te,p2$d as Ce,p2$e as le}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var E=H(te(),1),Le=H(Ce(),1);function ie(s){switch(s){case"attention":return"attention";case"problem":return"danger";case"live":return"info";case"ready":case"done":return"success";default:return"neutral"}}var $=H(te(),1),e=H(le(),1);function G({iso:s}){return(0,e.jsx)("time",{dateTime:s,title:ee(s),children:B(s)})}function Je(){return(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H8l-5 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}),(0,e.jsx)("path",{d:"M8 10h8"})]})}function Ye({runId:s,shot:n}){return(0,e.jsxs)("figure",{className:"result-image",children:[(0,e.jsxs)("a",{className:"receipt-shot",href:`/r/${s}/evidence/${n.artifactId}`,children:[(0,e.jsx)("img",{src:`/r/${s}/evidence/${n.artifactId}`,alt:n.caption}),(0,e.jsx)("span",{children:n.caption})]}),n.commentable&&n.sha256!==void 0&&(0,e.jsx)("button",{type:"button",className:"quiet","data-comment-image":JSON.stringify({run:s,artifact:n.artifactId,sha256:n.sha256}),"data-image-caption":n.caption,children:"Comment"})]})}function y({fields:s}){return(0,e.jsx)(e.Fragment,{children:Object.entries(s).map(([n,t])=>t==null?null:(0,e.jsx)("input",{type:"hidden",name:n,value:String(t)},n))})}function Qe({control:s,className:n}){return s.kind==="link"?(0,e.jsx)(V,{href:s.href,label:s.label,className:n}):(0,e.jsxs)(N,{action:s.action,className:n,children:[(0,e.jsx)(y,{fields:{...s.fields,...s.returnTo===void 0?{}:{return:s.returnTo}}}),(0,e.jsx)(q,{type:"submit",label:s.label})]})}function Xe({intent:s,className:n}){return(0,e.jsxs)("div",{className:n,children:[(0,e.jsxs)("p",{className:"recap mt-1",children:[(0,e.jsx)("strong",{children:"Goal"})," ",s.goal]}),s.outOfScope===null?(0,e.jsx)("p",{className:"meta",children:"No boundary was stated"}):(0,e.jsxs)("p",{className:"recap",children:[(0,e.jsx)("strong",{children:"Not this"})," ",s.outOfScope]}),s.touches.length===0?(0,e.jsx)("p",{className:"meta",children:"No files were named in the plan, so every changed file is in bounds"}):(0,e.jsxs)("p",{className:"row",children:[(0,e.jsx)("span",{className:"meta",children:"Expected to touch"})," ",s.touches.map((t,i)=>(0,e.jsxs)($.Fragment,{children:[i>0&&" ",(0,e.jsx)("span",{className:"mono",children:t})]},t))]}),s.plan!==null&&(0,e.jsxs)("p",{className:"meta",children:["Plan revision ",s.plan.revision," · ",(0,e.jsx)("span",{className:"mono",children:s.plan.shaShort}),s.plan.approach===null?"":` — ${s.plan.approach}`]})]})}var Ie=({history:s})=>(0,e.jsx)($e,{history:s,tight:!0});function Ae({runId:s,shots:n,className:t}){let{pairs:i,rest:l}=ae(n.map(d=>({...d,src:`/r/${s}/evidence/${d.artifactId}`,href:`/r/${s}/evidence/${d.artifactId}`,...d.commentable&&d.sha256!==void 0?{commentPayload:JSON.stringify({run:s,artifact:d.artifactId,sha256:d.sha256})}:{}})));return(0,e.jsxs)(e.Fragment,{children:[i.map(d=>(0,e.jsx)(se,{label:d.label,before:{src:d.before.src,href:d.before.href,caption:d.before.caption,...d.before.commentPayload===void 0?{}:{commentPayload:d.before.commentPayload}},after:{src:d.after.src,href:d.after.href,caption:d.after.caption,...d.after.commentPayload===void 0?{}:{commentPayload:d.after.commentPayload}}},d.key)),l.length>0&&(0,e.jsx)("div",{className:t??"receipt-visuals","aria-label":"validated screenshots",children:l.map(d=>(0,e.jsx)(Ye,{runId:s,shot:d},d.artifactId))})]})}function He({summary:s}){let{report:n,screenshots:t,unavailableShots:i,filesLead:l,noChangeNote:d,agentAccount:r,followUps:o,details:c}=s,h=c.runId;return(0,e.jsxs)("div",{className:"so-result-view",children:[n!==null&&(n.state==="missing"?(0,e.jsx)("p",{className:"problem","data-result-report":"missing",children:"This investigation stored no report."}):n.state==="problem"?(0,e.jsxs)("p",{className:"problem","data-result-report":"problem",children:["The report cannot be shown: ",n.problem,"."]}):(0,e.jsxs)("article",{className:"result-report","data-result-report":"ok",children:[(0,e.jsx)("h3",{children:n.title}),(n.items.length>0||n.shots.length>0)&&(()=>{let u=new Set(n.items.map(p=>p.image).filter(p=>p!==null)),x=n.shots.filter(p=>!u.has(p.file)),f=(p,j)=>p.artifactId===null?(0,e.jsxs)("p",{className:"meta",children:["Screenshot unavailable: ",p.problem??"it can't be shown"]},j):(0,e.jsxs)("a",{className:"receipt-shot",href:`/r/${h}/evidence/${p.artifactId}`,children:[(0,e.jsx)("img",{src:`/r/${h}/evidence/${p.artifactId}`,alt:p.caption,loading:"lazy"}),(0,e.jsx)("span",{children:p.caption})]},j);return(0,e.jsxs)("div",{className:"report-items","data-report-items":n.items.length,children:[n.items.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"What it found"})}),(0,e.jsx)("ol",{children:n.items.map((p,j)=>{let m=p.image===null?void 0:n.shots.find(v=>v.file===p.image);return(0,e.jsxs)("li",{"data-report-item":"",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:p.title})}),(0,e.jsx)("p",{className:"meta",children:p.why}),(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:p.url,rel:"noopener noreferrer nofollow",target:"_blank",className:"report-link",children:p.url})}),m!==void 0&&(0,e.jsx)("div",{className:"receipt-visuals",children:f(m)})]},j)})})]}),x.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"Screenshots"})}),(0,e.jsx)("div",{className:"receipt-visuals","aria-label":"the scout's screenshots",children:x.map((p,j)=>f(p,j))})]})]})})(),(0,e.jsx)("pre",{className:"recap plan-doc",children:n.document}),(0,e.jsxs)("p",{className:"meta",children:[(0,e.jsx)("a",{href:`/r/${h}/evidence/${n.artifactId}`,children:n.truncated?"Download the stored part of the report (shortened at storage — not the full report)":"Download the report"}),n.followUps>0&&(0,e.jsxs)(e.Fragment,{children:[" · ",n.followUps," proposed follow-up",n.followUps===1?"":"s"," on ",(0,e.jsx)("a",{href:n.taskHref,children:"the task"})]})]})]})),s.lead==="screenshots"&&(0,e.jsx)(Ae,{runId:h,shots:t,className:"receipt-visuals result-visuals"}),l!==null&&(0,e.jsxs)("p",{className:"result-files-lead",children:[l.paths.length>0&&(0,e.jsxs)(e.Fragment,{children:[l.paths.map((u,x)=>(0,e.jsxs)($.Fragment,{children:[x>0&&", ",(0,e.jsx)("span",{className:"mono",children:u})]},u)),l.more>0&&` and ${l.more} more`," — "]}),(0,e.jsx)("a",{href:l.changesHref,"data-result-goto":"changes",children:"see the diff"})]}),d!==null&&(0,e.jsx)("p",{className:"meta",children:d}),r!==null&&(0,e.jsxs)("details",{className:"result-notes","data-result-notes-agent":"",children:[(0,e.jsx)("summary",{children:"What the agent reported"}),r.conclusion!==null&&(0,e.jsx)("p",{className:"recap",children:r.conclusion}),r.changes.length>0&&(0,e.jsx)("ul",{className:"result-changes",children:r.changes.map((u,x)=>(0,e.jsx)("li",{children:u},x))}),r.verification.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"meta",children:"Checked by the agent:"}),(0,e.jsx)("ul",{className:"result-changes","data-cockpit-source":"agent-words",children:r.verification.map((u,x)=>(0,e.jsx)("li",{children:u},x))})]}),r.reportNotes.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"meta",children:"Its notes:"}),(0,e.jsx)("ol",{className:"result-changes","data-report-notes":"",children:r.reportNotes.map((u,x)=>(0,e.jsx)("li",{id:`report-note-${x+1}`,children:u},x))})]})]}),o.length>0&&(0,e.jsxs)("details",{className:"result-notes","data-review-followups":o.length,children:[(0,e.jsxs)("summary",{children:["Suggested follow-ups · ",o.length]}),(0,e.jsx)("ul",{className:"result-changes",children:o.map((u,x)=>(0,e.jsxs)("li",{children:[(0,e.jsx)("span",{className:"badge",children:u.severity})," ",(0,e.jsx)("span",{className:"mono",children:`${u.file}:${u.line}`})," ",u.scenario,u.sendAction!==null&&(0,e.jsxs)(N,{action:u.sendAction,children:[(0,e.jsx)(y,{fields:{act:"send",pointer:u.pointer}}),(0,e.jsx)("button",{type:"submit",className:"secondary",children:"Send to the agent"})]})]},x))})]}),(0,e.jsxs)("details",{className:"result-details","data-result-details":"",children:[(0,e.jsx)("summary",{children:"Build details"}),i.length>0&&(0,e.jsx)("ul",{className:"result-unavailable meta","data-result-unavailable":i.length,children:i.map((u,x)=>(0,e.jsxs)("li",{children:["Screenshot unavailable — ",(0,e.jsx)("span",{className:"mono",children:u.path}),": ",u.problem]},x))}),(0,e.jsxs)("dl",{className:"result-facts",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{children:"Build"}),(0,e.jsxs)("dd",{children:["#",h," · ",c.runner,c.agent===null?` · ${c.provider}`:"",c.finishedAt!==null&&(0,e.jsxs)(e.Fragment,{children:[" · ",(0,e.jsx)(G,{iso:c.finishedAt})]})]})]}),c.agent!==null&&(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{children:"Agent"}),(0,e.jsx)("dd",{children:c.agent})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{children:"Commits"}),(0,e.jsx)("dd",{children:c.head===null?c.base===null?"no commit recorded":(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"mono",children:c.base.slice(0,7)})," ",(0,e.jsx)("span",{className:"meta",children:"base · no head recorded"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("span",{className:"mono",children:[c.base===null?"":`${c.base.slice(0,7)} → `,c.head.slice(0,7)]})," ",(0,e.jsxs)("span",{className:"meta",children:["from the ",c.headSource??"record"]})]})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{children:"Saved files"}),(0,e.jsx)("dd",{children:c.evidenceSources.length===0?"nothing was captured":c.evidenceSources.join(" · ")})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{children:"Publication"}),(0,e.jsx)("dd",{children:(0,e.jsxs)("p",{className:"result-publication","data-receipt-publication":c.publication.state,children:[c.publication.words,c.publication.prNumber!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",c.publication.prUrl===null?(0,e.jsxs)("span",{className:"mono",children:["PR #",c.publication.prNumber]}):(0,e.jsxs)("a",{href:c.publication.prUrl,children:["PR #",c.publication.prNumber]}),(0,e.jsxs)("span",{className:"meta","data-ci-observed":c.publication.ciState,children:[" · ",c.publication.ciFailing?"CI failing at the last check":c.publication.ciState==="passing"&&c.publication.lastCheckAt!==null?(0,e.jsxs)(e.Fragment,{children:["CI passing, observed ",(0,e.jsx)(G,{iso:c.publication.lastCheckAt})]}):c.publication.ciState==="running"?"CI still running at the last check":"no CI checks found — verify on GitHub"]})]})]})})]})]}),(0,e.jsx)("p",{className:"result-links meta",children:c.links.map(u=>(0,e.jsx)("a",{href:u.href,children:u.label},u.href))})]})]})}function Se({path:s,oldPath:n,hunks:t,anchor:i,commentable:l}){return(0,e.jsxs)(e.Fragment,{children:[n!==null&&n!=="/dev/null"&&n!==s&&(0,e.jsxs)("p",{className:"diff-rename meta",children:["from ",n]}),t.map((d,r)=>{let o=d.lines.find(h=>h.newLine!==null&&h.kind!=="meta")?.newLine??null,c=i!==null&&o!==null?`${i}-L${o}`:void 0;return(0,e.jsxs)("section",{className:"diff-hunk",id:c,children:[(0,e.jsx)("div",{className:"diff-hunk-head",children:d.header}),(0,e.jsx)("div",{className:"diff-lines",children:d.lines.map((h,u)=>{let x=h.newLine??h.oldLine,f=h.newLine===null&&h.oldLine!==null?"old":"new",p=l&&x!==null&&h.kind!=="meta",j=h.kind==="addition"?"+":h.kind==="deletion"?"−":h.kind==="context"?" ":"·",m=x!==null&&h.kind!=="meta";return(0,e.jsxs)("div",{className:`diff-line diff-${h.kind}`,...m?{"data-diff-file":s,"data-diff-line":x}:{},children:[p?(0,e.jsx)("button",{type:"button",className:"diff-annotate pick-line","data-path":s,"data-line":x,"data-side":f,"aria-label":`Annotate ${s}, ${f} line ${x}`,title:"Annotate this line",children:(0,e.jsx)(Je,{})}):(0,e.jsx)("span",{className:"diff-annotate-space"}),(0,e.jsx)("span",{className:"diff-gutter",children:h.oldLine??""}),(0,e.jsx)("span",{className:"diff-gutter",children:h.newLine??""}),(0,e.jsxs)("code",{children:[(0,e.jsx)("b",{"aria-hidden":"true",children:j}),h.text]})]},u)})})]},r)})]})}function Ze({file:s,defaultOpen:n,commentable:t}){let[i,l]=(0,$.useState)(null),[d,r]=(0,$.useState)("idle"),[o,c]=(0,$.useState)(n),h=async()=>{if(!(s.lazyHref===null||i!==null||d==="loading")){r("loading");try{let x=s.lazyHref.includes("?")?"&":"?",f=await fetch(`${s.lazyHref}${x}format=json`,{credentials:"same-origin",headers:{accept:"application/json"}});if(!f.ok){r("error");return}let p=await f.json();l(p),r("idle")}catch{r("error")}}};(0,$.useEffect)(()=>{if(s.lazyHref===null||s.anchor===null)return;let x=()=>{let p=window.location.hash.slice(1);return p===s.anchor||p.startsWith(`${s.anchor}-L`)},f=()=>{x()&&(c(!0),h())};return f(),window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[s.lazyHref,s.anchor]);let u=s.additions===null||s.deletions===null?s.additions===null&&s.deletions===null?null:(0,e.jsx)("span",{className:"diff-file-counts",children:"binary"}):(0,e.jsxs)("span",{className:"diff-file-counts",children:[(0,e.jsxs)("b",{children:["+",s.additions]}),(0,e.jsxs)("i",{children:["−",s.deletions]})]});return(0,e.jsxs)("details",{className:"diff-file",id:s.anchor??void 0,open:o,...s.lazyHref!==null?{"data-diff-lazy":s.lazyHref}:{},...s.lazyHref!==null&&i!==null?{"data-diff-loaded":""}:{},onToggle:x=>{let f=x.currentTarget.open;c(f),f&&s.lazyHref!==null&&i===null&&h()},children:[(0,e.jsxs)("summary",{children:[(0,e.jsx)("span",{className:"diff-file-name",children:s.path}),u]}),s.lazyHref===null?(0,e.jsx)(Se,{path:s.path,oldPath:s.oldPath,hunks:s.hunks,anchor:s.anchor,commentable:t}):i!==null?(0,e.jsx)(Se,{path:s.path,oldPath:i.oldPath,hunks:i.hunks,anchor:i.anchor,commentable:i.commentable}):(0,e.jsx)("div",{children:(0,e.jsx)("p",{className:"meta diff-lazy",children:d==="loading"?"Loading this file's changes…":d==="error"?(0,e.jsx)("a",{href:s.lazyHref,"data-full-load":"",children:"Could not load changes. Open directly"}):(0,e.jsx)("a",{href:s.lazyHref,"data-full-load":"",onClick:x=>{x.metaKey||x.ctrlKey||x.shiftKey||x.altKey||x.button!==0||(x.preventDefault(),c(!0),h())},children:"Show this file's changes"})})})]})}function Pe({changes:s}){let[n,t]=(0,$.useState)("view"),{stat:i,outsideTouches:l,files:d,canAnnotate:r,hasEditorLinks:o,diff:c}=s;return(0,e.jsx)("div",{className:"so-result-view",children:s.noTerminal?(0,e.jsxs)("p",{className:"meta",children:["No final diff or change summary was captured for this build",s.scout?" — an investigation changes nothing in the repository":"","."]}):(0,e.jsxs)(e.Fragment,{children:[i===null?(0,e.jsx)("p",{className:"meta",children:"No change summary was captured."}):"problem"in i?(0,e.jsxs)("p",{className:"problem",children:["Change summary unavailable: ",i.problem,"."]}):(0,e.jsxs)("p",{className:"row result-stat",children:[(0,e.jsxs)("span",{className:"mono",children:[i.baseShort," → ",i.headShort]})," — ",i.fileCount===0?"no changes, verified":`${i.fileCount} file${i.fileCount===1?"":"s"} · +${i.additions} −${i.deletions}${i.binaryCount>0?` · ${i.binaryCount} binary`:""}${i.filesTruncated?" · file list cut, counts complete":""}`]}),l.length>0&&(0,e.jsxs)("p",{className:"problem cockpit-drift","data-cockpit-drift":l.length,children:[(0,e.jsxs)("strong",{children:[l.length," changed file",l.length===1?"":"s"," outside the approved paths"]})," — ",l.map((h,u)=>(0,e.jsxs)($.Fragment,{children:[u>0&&", ",(0,e.jsx)("span",{className:"mono",children:h})]},h)),". Review these files before accepting the result."]}),d.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("ol",{className:"cockpit-files result-files",children:d.map(h=>{let u=h.additions===null||h.deletions===null?"binary":`+${h.additions} −${h.deletions}`;return(0,e.jsxs)("li",{"data-file-priority":h.priorityBand,children:[h.editorHref!==null?(0,e.jsx)("a",{className:"mono",href:h.editorHref,children:h.path}):h.anchor===null?(0,e.jsx)("span",{className:"mono",children:h.path}):(0,e.jsx)("a",{className:"mono",href:`#${h.anchor}`,children:h.path}),h.renamedFrom!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsxs)("span",{className:"meta",children:["(was ",h.renamedFrom,")"]})]})," ",(0,e.jsx)("span",{className:"meta",children:u}),h.outsideTouches&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("span",{className:"badge badge-failed","data-outside-touches":"1",children:"Outside touches"})]}),h.cited&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("span",{className:"badge badge-done",children:"Cited"})]}),r&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("button",{type:"button",className:"pick-file","data-path":h.path,children:"Comment"})]}),h.priorityReasons.length>0&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsxs)("span",{className:"meta",children:["— ",h.priorityReasons.join("; ")]})]})]},h.path)})}),o&&(0,e.jsx)("p",{className:"meta",children:"File links open in VS Code on THIS device — if the build's worktree is gone, a link opens nothing."})]}),c.kind==="none"?(0,e.jsx)("p",{className:"meta",children:"The final diff was not captured for this build."}):c.kind==="problem"?(0,e.jsxs)("p",{className:"problem",children:["Diff unavailable: ",c.problem,"."]}):c.kind==="empty"?(0,e.jsx)("p",{className:"meta",children:"Empty diff — captured successfully, nothing changed."}):c.kind==="raw"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("details",{children:[(0,e.jsxs)("summary",{children:["The patch",c.truncated?" (TRUNCATED — the raw record says how much was cut)":""]}),(0,e.jsx)("pre",{className:"mono overflow-x-auto",children:c.text})]}),(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:c.downloadHref,children:c.downloadLabel})})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"diff-review","data-review-diff":"","data-mode":c.commentable?n:void 0,children:[c.commentable&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"diff-review-bar",children:[(0,e.jsxs)("span",{className:"meta",children:[c.files.length," changed file",c.files.length===1?"":"s"]}),(0,e.jsxs)("div",{className:"diff-modes",role:"group","aria-label":"diff mode",children:[(0,e.jsx)("button",{type:"button","data-diff-mode":"view","aria-pressed":n==="view"?"true":"false",onClick:()=>t("view"),children:"View"}),(0,e.jsx)("button",{type:"button","data-diff-mode":"annotate","aria-pressed":n==="annotate"?"true":"false",onClick:()=>t("annotate"),children:"Annotate"})]})]}),(0,e.jsx)("p",{className:"diff-review-help",children:"Select a line, then describe what should change. Nothing is revised until you create the revision below."})]}),c.files.map((h,u)=>(0,e.jsx)(Ze,{file:h,defaultOpen:u===0,commentable:c.commentable},h.path)),c.patchTruncated?(0,e.jsx)("p",{className:"diff-cut",children:"The saved diff was shortened when it was stored: the rest of the change was never captured, here or in the download."}):c.linesTruncated?(0,e.jsx)("p",{className:"diff-cut",children:"This visual diff is shortened. Review the saved patch before approving."}):null]}),(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:c.downloadHref,children:c.downloadLabel})})]})]})})}function qe({items:s}){return(0,e.jsx)("ul",{children:s.map((n,t)=>(0,e.jsxs)("li",{children:[(0,e.jsx)("span",{className:`badge${n.isProblem?" badge-failed":""}`,children:n.severity})," ",n.path!==null&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("span",{className:"mono",children:[n.path,n.line===null?"":`:${n.line}`]})," "]}),n.note," ",(0,e.jsxs)("span",{className:"meta",children:["— ",n.author]}),n.canRequestChange&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("button",{type:"button",className:"pick-file","data-path":n.path??"","data-line":n.line===null?"":String(n.line),"data-review-note":n.note,children:"Request change"})]})]},t))})}function Ue({checks:s,runId:n}){let{repairChain:t}=s,i=t===null?null:t.outcome==="drafted"?t.draftTask===null?"No fix could be prepared":`Targeted fix ${t.basis==="mode"?"approved automatically":"ready for your approval"}`:t.outcome==="resolved"?`Completed on attempt ${t.attempt}`:t.outcome==="attempts-spent"?`Stopped after ${t.attempt} attempt${t.attempt===1?"":"s"}`:t.outcome==="no-progress"?"Stopped because two attempts made no progress":"Stopped because what the build reported may not match the approved work";return(0,e.jsxs)("div",{className:"so-result-view",children:[!s.hasProof&&s.previousAssessment.length>0&&(0,e.jsxs)("div",{className:"result-section","data-cockpit-source":"reviewer",children:[(0,e.jsx)("strong",{children:"Previous assessment"}),(0,e.jsx)(qe,{items:s.previousAssessment})]}),s.noChangeNoDirect&&(0,e.jsx)("p",{className:"meta",children:"The build concluded that no repository change was needed. With no change, its handoff and the saved diff are the record."}),s.hasProof?(0,e.jsxs)(e.Fragment,{children:[s.verdictLine!==null&&(0,e.jsx)("p",{className:"row result-verdict","data-proof-verdict":s.verdictLine.token,...s.verdictLine.checkNow!==null?{"data-check-now":s.verdictLine.checkNow}:{},children:(0,e.jsx)("span",{className:"meta",children:s.verdictLine.words})}),s.acceptedLine!==null&&(0,e.jsxs)("p",{className:"meta",children:[s.acceptedLine.humanReview?"Accepted after human review":"Accepted with an exception"," by ",(0,e.jsx)("span",{className:"mono",children:s.acceptedLine.by})," · ",(0,e.jsx)(G,{iso:s.acceptedLine.at}),s.acceptedLine.note!==null&&` — ${s.acceptedLine.note}`]}),s.matrix.length===0?(0,e.jsx)("p",{className:"meta",children:s.signedCriteriaCount>0?`The approved plan has ${s.signedCriteriaCount} requirement${s.signedCriteriaCount===1?"":"s"}, but this build wasn't checked requirement by requirement.`:"This plan names no requirements to check."}):(0,e.jsxs)("div",{className:"result-section criterion-matrix",children:[(0,e.jsxs)("strong",{children:["Requirements · ",s.matrix.length]}),(0,e.jsx)("ol",{className:"requirement-list",children:s.matrix.map((l,d)=>(0,e.jsxs)("li",{className:"requirement","data-criterion-id":l.id,children:[(0,e.jsxs)("div",{className:"requirement-heading",children:[(0,e.jsxs)("span",{children:["Requirement ",d+1]}),(0,e.jsx)("span",{className:`badge ${l.badgeClass}`,"data-matrix-state":l.state,children:l.label})]}),(0,e.jsx)("p",{className:"requirement-statement",children:l.statement}),l.upheldOnly&&(0,e.jsx)("p",{className:"requirement-review","data-review-judgement":"upholds",children:"Reviewer confirmed"}),!l.awaitingAssessment&&l.state!=="pass"&&l.label!=="Met"&&l.label!=="Checked at release"&&l.detail.length>0&&(0,e.jsx)("ul",{className:"requirement-issues",children:l.detail.map((r,o)=>(0,e.jsx)("li",{children:r},o))}),l.review!==null&&l.review.judgement!=="upholds"&&(0,e.jsxs)("div",{className:"requirement-warning","data-review-judgement":l.review.judgement,children:[(0,e.jsx)("strong",{children:l.review.judgement==="contradicts"?"Reviewer found a problem":"Reviewer could not confirm this"}),(0,e.jsx)("p",{children:l.review.note})]}),l.coverage!==null&&(l.coverage.state==="gap"||l.coverage.gaps.length>0)&&(0,e.jsxs)("div",{className:"requirement-warning","data-context-coverage":l.coverage.state,children:[(0,e.jsx)("strong",{children:"Review context is missing"}),l.coverage.gaps.length===0?(0,e.jsx)("p",{children:"The saved context cannot support this requirement."}):(0,e.jsx)("ul",{children:l.coverage.gaps.map((r,o)=>(0,e.jsx)("li",{children:r},o))}),l.coverage.priorSupport==="invalid"&&(0,e.jsx)("p",{children:"The earlier review no longer supports this requirement."})]}),(0,e.jsxs)("details",{className:"requirement-evidence",children:[(0,e.jsx)("summary",{children:"How it was shown"}),(0,e.jsxs)("div",{className:"requirement-evidence-body",children:[(0,e.jsxs)("p",{className:"meta",children:["Required: ",l.requiredLabels]}),l.answered.length===0?(0,e.jsx)("p",{className:"meta",children:"Nothing was saved to show this requirement."}):l.answered.map(r=>(0,e.jsxs)("div",{className:"requirement-evidence-group",children:[(0,e.jsxs)("strong",{children:[r.kindLabel," · ",r.refs.length]}),(0,e.jsx)("ul",{children:r.refs.map((o,c)=>(0,e.jsx)("li",{children:o.anchor!==null?(0,e.jsx)("a",{href:`#${o.anchor}`,children:(0,e.jsx)("code",{children:o.ref})}):o.artifactId!==null?(0,e.jsx)("a",{href:`/r/${n}/evidence/${o.artifactId}`,children:(0,e.jsx)("code",{children:o.ref})}):(0,e.jsx)("code",{children:o.ref})},c))})]},r.kindLabel)),l.state==="pass"&&l.detail.length>0&&(0,e.jsxs)("div",{className:"requirement-evidence-group",children:[(0,e.jsx)("strong",{children:"Verification notes"}),(0,e.jsx)("ul",{children:l.detail.map((r,o)=>(0,e.jsx)("li",{children:r},o))})]}),l.review!==null&&(0,e.jsxs)("div",{className:"requirement-evidence-group",children:[(0,e.jsx)("strong",{children:"Previous assessment"}),(0,e.jsxs)("p",{children:[l.review.judgement==="upholds"?`${l.review.note} `:"",(0,e.jsx)("span",{className:"meta",children:l.review.author})]})]}),l.coverage!==null&&(0,e.jsxs)("p",{className:"meta",...l.coverage.state==="gap"?{}:{"data-context-coverage":l.coverage.state},children:["Review context: ",l.coverage.words]}),l.coverage?.assets!==void 0&&(0,e.jsx)("p",{className:"meta","data-context-assets":"",children:l.coverage.assets}),(0,e.jsxs)("p",{className:"meta",children:["Requirement ID: ",(0,e.jsx)("code",{children:l.id})]})]})]})]},l.id))})]}),s.semanticCoverage!==null&&(0,e.jsxs)("details",{className:"result-section semantic-coverage","data-semantic-coverage":s.semanticCoverage.satisfied,"data-coverage-policy":s.semanticCoverage.policy,children:[(0,e.jsx)("summary",{children:"Previous assessment"}),(0,e.jsxs)("p",{className:"meta",children:["The saved assessment confirmed ",s.semanticCoverage.upheldCount," of ",s.semanticCoverage.total," requirements."]})]}),s.reviewConflict&&(0,e.jsx)("p",{className:"meta",children:"An independent review found the report doesn't match the changes."}),t!==null&&i!==null&&(0,e.jsxs)("div",{className:"card repair-chain","data-repair-outcome":t.outcome,children:[(0,e.jsxs)("p",{className:"row",children:[(0,e.jsx)("strong",{children:"Automatic recovery"})," — ",i,t.draftTask!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("a",{href:`/t/${encodeURIComponent(t.draftTask)}`,children:t.draftTask})]})]}),t.unresolved.length>0&&(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"What it is fixing"}),(0,e.jsx)("p",{className:"meta",children:t.unresolved.join(", ")})]})]}),s.reviewerFindings.length>0&&(0,e.jsxs)("div",{className:"result-section","data-cockpit-source":"reviewer",children:[(0,e.jsx)("strong",{children:"Independent review"}),(0,e.jsx)(qe,{items:s.reviewerFindings})]}),s.proofProblem!==null&&(0,e.jsxs)("p",{className:"problem",children:["Verification details are unavailable: ",s.proofProblem]}),s.checkLog!==null&&(s.checkLog.state==="none"?(0,e.jsx)("p",{className:"meta","data-cockpit-source":"machine",children:s.checkLog.off?"Checks were off for this build.":"No automated check was configured for this build."}):s.checkLog.state==="damaged"?(0,e.jsxs)("p",{className:"problem","data-check-log":"damaged","data-cockpit-source":"machine",children:["The check log no longer verifies (",s.checkLog.problem,"). Its output is not shown, and there is nothing to download."]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("details",{"data-check-log":s.checkLog.truncated?"shortened":"ok","data-cockpit-source":"machine",children:[(0,e.jsxs)("summary",{children:["Check output",s.checkLog.truncated?` (shortened — ${s.checkLog.bytesStored} of ${s.checkLog.bytesOriginal} bytes stored)`:""]}),(0,e.jsx)("pre",{className:"mono overflow-x-auto max-h-72",children:s.checkLog.lines.map((l,d)=>(0,e.jsxs)($.Fragment,{children:[d>0&&`
3
- `,(0,e.jsx)("span",{id:`check-log-L${d+1}`,children:l})]},d))})]}),(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:s.checkLog.downloadHref,children:s.checkLog.downloadLabel})})]})),s.agentChecks!==null&&(s.agentChecks.items.length===0?!s.agentChecks.hideWhenEmpty&&(0,e.jsx)("p",{className:"meta","data-cockpit-source":"agent",children:"The agent reported no checks."}):(0,e.jsxs)("details",{className:"cockpit-proof-group","data-cockpit-source":"agent",children:[(0,e.jsxs)("summary",{children:["Agent checks · ",s.agentChecks.items.length]}),(0,e.jsx)("div",{className:"result-section",children:(0,e.jsx)("ul",{children:s.agentChecks.items.map((l,d)=>(0,e.jsxs)("li",{children:[(0,e.jsx)("span",{className:"mono",children:l.command})," ",(0,e.jsxs)("span",{className:"meta",children:["(exit ",l.exitCode,") — ",l.summary]})]},d))})})]})),s.screenshots!==null&&(s.screenshots.totalCount===0?!s.screenshots.hideWhenEmpty&&(0,e.jsxs)("p",{className:"meta","data-cockpit-source":"screenshots",children:["No screenshots",s.screenshots.required?" were captured, although one was required":" were needed","."]}):s.screenshots.leadIsScreenshots?(0,e.jsxs)("p",{className:"meta","data-cockpit-source":"screenshots",children:[s.screenshots.shownCount," validated screenshot",s.screenshots.shownCount===1?"":"s"," shown in Summary",s.screenshots.unavailableCount>0?`; ${s.screenshots.unavailableCount} unavailable`:"","."]}):(0,e.jsxs)("details",{className:"cockpit-proof-group","data-cockpit-source":"screenshots",children:[(0,e.jsxs)("summary",{children:["Screenshots · ",s.screenshots.shownCount,s.screenshots.unavailableCount>0?` (${s.screenshots.unavailableCount} unavailable)`:""]}),(0,e.jsx)(Ae,{runId:n,shots:s.screenshots.shown})]})),s.caveats!==null&&(s.caveats.items.length===0?!s.caveats.hideWhenEmpty&&(0,e.jsx)("p",{className:"meta","data-cockpit-source":"caveats",children:"The agent noted no limitations."}):(0,e.jsxs)("details",{className:"cockpit-proof-group","data-cockpit-source":"caveats",children:[(0,e.jsxs)("summary",{children:["Limitations the agent noted · ",s.caveats.items.length]}),(0,e.jsx)("ul",{children:s.caveats.items.map((l,d)=>(0,e.jsx)("li",{children:l},d))})]}))]}):!s.noChangeNoDirect&&(0,e.jsx)("p",{className:"meta","data-proof-verdict":"none",children:"This build has no check result or saved files. Review its changes yourself."}),s.followUps!==null&&(0,e.jsxs)("section",{className:"result-section follow-ups",id:"follow-ups","data-follow-ups":"",children:[(0,e.jsx)("strong",{children:"Follow-ups"}),s.followUps.checks.length>0&&(0,e.jsx)("ul",{className:"follow-up-list",children:s.followUps.checks.map((l,d)=>(0,e.jsxs)("li",{"data-follow-up-check":l.state,...l.batchMode!==null?{"data-batch":l.batchMode}:{},children:[l.text," on ",(0,e.jsx)("span",{className:"mono",children:l.commitShort}),(0,e.jsxs)("span",{className:"meta",children:[" · ",l.meta]}),l.logHref!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("a",{href:l.logHref,children:"Log"})]})]},d))}),!(s.followUps.quick||s.followUps.full)&&s.followUps.setupHref!==null&&(0,e.jsxs)("p",{className:"meta",children:["No approved check to run. ",(0,e.jsx)("a",{href:s.followUps.setupHref,children:"Set one up"}),"."]}),(s.followUps.canAct||s.followUps.testsTask!==null||s.followUps.addTestsAction!==null)&&(0,e.jsxs)("div",{className:"follow-up-acts",children:[s.followUps.canAct&&(0,e.jsxs)(N,{action:s.followUps.action,className:"follow-up-act",children:[(0,e.jsx)(y,{fields:{return:s.followUps.returnTo}}),s.followUps.quick&&s.followUps.full?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"submit",name:"level",value:"quick",children:"Run quick checks"}),(0,e.jsx)("button",{type:"submit",name:"level",value:"full",className:"secondary",children:"Run full checks"})]}):(0,e.jsx)("button",{type:"submit",name:"level",value:s.followUps.quick?"quick":"full",children:"Run checks"})]}),s.followUps.testsTask!==null?(0,e.jsxs)("p",{className:"meta",children:["Tests task: ",(0,e.jsx)("a",{href:`/t/${encodeURIComponent(s.followUps.testsTask)}`,children:s.followUps.testsTask})]}):s.followUps.addTestsAction!==null&&(0,e.jsxs)(N,{action:s.followUps.addTestsAction,className:"follow-up-act",children:[(0,e.jsx)(y,{fields:{return:s.followUps.returnTo}}),(0,e.jsx)("button",{type:"submit",className:"secondary",children:"Add tests"})]})]})]}),s.agentOwnAccount.length>0&&(0,e.jsxs)("div",{className:"result-section","data-cockpit-source":"agent-words",children:[(0,e.jsx)("strong",{children:"The agent's own account"}),(0,e.jsx)("ul",{children:s.agentOwnAccount.map((l,d)=>(0,e.jsx)("li",{children:l},d))})]}),s.reviewRetry!==null&&(0,e.jsxs)("details",{className:"review-history","data-review-state":s.reviewRetry.state,children:[(0,e.jsx)("summary",{children:"Previous assessments"}),(0,e.jsx)("p",{className:"meta",children:"Saved history; no separate review will be started."}),s.reviewRetry.attempts.length>0&&(0,e.jsx)("ol",{"aria-label":"previous assessments",children:s.reviewRetry.attempts.map(l=>(0,e.jsxs)("li",{"data-review-attempt":l.attempt,"data-review-outcome":l.outcome??"open",children:[(0,e.jsxs)("a",{href:`/r/${l.runId}`,children:["Build #",l.runId]})," · ",l.outcome??"unfinished",l.reason!==null&&` · ${l.reason}`]},l.runId))})]})]})}function Fe({comment:s}){return(0,e.jsxs)("div",{className:"diff-comment",children:[s.image!==null&&(0,e.jsxs)("figure",{className:"feedback-image",children:[s.image.caption===null?(0,e.jsxs)("figcaption",{children:["Screenshot ",s.image.artifact," is unavailable."]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:`/r/${s.image.run}/evidence/${s.image.artifact}`,children:(0,e.jsx)("img",{src:`/r/${s.image.run}/evidence/${s.image.artifact}`,alt:s.image.caption})}),(0,e.jsxs)("figcaption",{children:[s.image.caption," · Screenshot ",s.image.artifact]})]}),s.image.dropAction!==null&&(0,e.jsxs)(N,{action:s.image.dropAction,className:"feedback-image-drop",children:[(0,e.jsx)(y,{fields:{return:s.image.returnTo,tab:s.image.dropTab,intent:"drop-image",comment:String(s.id)}}),(0,e.jsx)("button",{type:"submit",className:"quiet",children:"Keep note without screenshot"})]})]}),(0,e.jsx)("span",{className:"diff-comment-pin","aria-hidden":"true"}),(0,e.jsxs)("p",{children:[s.path!==null&&(0,e.jsxs)(e.Fragment,{children:[s.editorHref!==null?(0,e.jsx)("a",{className:"mono",href:s.editorHref,children:`${s.path}${s.line===null?"":`:${s.line}`}`}):(0,e.jsx)("span",{className:"mono",children:`${s.path}${s.line===null?"":`:${s.line}`}`})," "]}),s.note]}),(0,e.jsxs)("span",{className:"meta",children:[s.author," · ",(0,e.jsx)(G,{iso:s.createdAt})]})]})}function Me({request:s,className:n}){return(0,e.jsxs)("div",{className:n,children:[(0,e.jsx)("h3",{className:"so-sr-only",children:"What should change?"}),s.comments.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("p",{className:"meta",children:["Saved for later · ",s.comments.length]}),(0,e.jsx)("div",{className:"diff-comments","data-result-notes":s.comments.length,children:s.comments.map(t=>(0,e.jsx)(Fe,{comment:t},t.id))}),s.reviseFromComments!==null&&(0,e.jsxs)(N,{action:s.reviseFromComments.action,className:"card revision-from-comments",children:[(0,e.jsx)(y,{fields:{return:s.reviseFromComments.returnTo,batch:s.reviseFromComments.batch,source:s.reviseFromComments.source}}),(0,e.jsx)("div",{children:(0,e.jsxs)("strong",{children:[be(s.comments.length,"note","notes")," ready"]})}),(0,e.jsx)("button",{type:"submit",children:"Send back"})]})]}),s.pastComments.length>0&&(0,e.jsxs)("details",{className:"result-feedback-history",children:[(0,e.jsx)("summary",{children:"Earlier feedback"}),(0,e.jsx)("div",{className:"diff-comments","data-past-feedback":"",children:s.pastComments.map(t=>(0,e.jsx)(Fe,{comment:t},t.id))})]}),s.revisions.map(t=>(0,e.jsxs)("p",{className:"result-revision","data-result-revision":t.id,"data-result-revision-approved":t.approved?"1":"0","data-tone":t.tone,children:[(0,e.jsx)("strong",{children:"Revision"})," ",(0,e.jsx)("a",{href:`/t/${encodeURIComponent(t.id)}`,children:t.title})," ",(0,e.jsxs)("span",{className:"meta",children:["· ",t.standing]})]},t.id)),s.availability==="signed-out"?(0,e.jsx)("p",{className:"meta",children:"Sign in with a browser session to send it back."}):s.availability!=="ok"?(0,e.jsxs)("p",{className:"meta","data-result-feedback":"unavailable",children:[s.availability==="no-diff"?"This result has no saved diff to attach notes to.":"The saved diff no longer checks out, so notes can't attach to it."," ",(0,e.jsx)("a",{href:s.chatHref,children:"Discuss in chat →"})]}):s.form!==null&&(0,e.jsxs)("details",{className:"result-request-open result-request-form",open:s.comments.length>0?!0:void 0,children:[(0,e.jsx)("summary",{children:"What should change?"}),(0,e.jsxs)(N,{action:s.form.action,className:"diff-comment-form",id:"comment-form",children:[(0,e.jsx)(y,{fields:{return:s.form.returnTo,batch:s.form.batch,source:s.form.source,tab:s.form.tab,request:s.form.requestToken}}),(0,e.jsx)("input",{type:"hidden","data-recorded-requests":"",defaultValue:s.form.recordedKeys}),(0,e.jsx)("input",{type:"hidden",name:"image"}),(0,e.jsxs)("figure",{className:"feedback-image","data-feedback-image":"",hidden:!0,children:[(0,e.jsx)("img",{alt:"Selected screenshot",hidden:!0}),(0,e.jsx)("figcaption",{}),(0,e.jsx)("button",{type:"button",className:"quiet","data-remove-image":"",children:"Remove image"})]}),(0,e.jsx)("input",{type:"hidden",name:"context"}),(0,e.jsx)("div",{className:"meta","data-request-context-line":"",hidden:!0}),(0,e.jsx)("textarea",{name:"note",rows:2,maxLength:s.form.noteMaxLength,placeholder:"Describe the change…","aria-label":"review comment","aria-describedby":"comment-note-limit",autoFocus:s.form.noted}),(0,e.jsxs)("span",{className:"meta diff-comment-limit",id:"comment-note-limit",children:["up to ",s.form.noteMaxLength," characters"]}),(0,e.jsxs)("details",{className:"result-pin",children:[(0,e.jsx)("summary",{children:"Attach to a file or line"}),(0,e.jsxs)("div",{className:"diff-comment-target",children:[(0,e.jsxs)("label",{children:["File",(0,e.jsx)("input",{type:"text",name:"path",placeholder:"src/…","aria-label":"file",className:"mono"})]}),(0,e.jsxs)("label",{children:["Line",(0,e.jsx)("input",{type:"text",name:"line",placeholder:"—","aria-label":"line",inputMode:"numeric"})]})]})]}),s.form.buildNowOnSendBack&&(0,e.jsxs)("label",{className:"meta result-build-now",children:[(0,e.jsx)("input",{type:"checkbox",name:"approve",value:"1","data-build-now":""})," Build again right away, on the same terms with these notes"]}),(0,e.jsxs)("div",{className:"result-feedback-actions",children:[(0,e.jsx)("button",{type:"submit",name:"intent",value:"revise","data-request-changes":"",children:"Send back"}),(0,e.jsx)("button",{type:"submit",name:"intent",value:"note",className:"quiet","data-save-feedback":"",children:"Save for later"})]})]})]})]})}function ze({learning:s,className:n}){let{skillsSnapshot:t,knowledgeSnapshot:i,skillTest:l,learning:d}=s;return(0,e.jsxs)("div",{className:n,children:[s.contextProblem!==null&&(0,e.jsx)("p",{className:"problem",role:"alert",children:s.contextProblem}),t!==null&&t.packages.length>0&&(0,e.jsxs)("details",{className:"skills",children:[(0,e.jsxs)("summary",{children:["Skills supplied (",t.packages.length,")"]}),(0,e.jsx)("p",{className:"meta",children:"Exact versions supplied to this run. This does not confirm the agent read or applied them."}),t.packages.map(r=>(0,e.jsxs)("details",{children:[(0,e.jsxs)("summary",{children:[r.name," · ",r.shaShort]}),(0,e.jsxs)("p",{className:"skill-source",children:[r.source," · ",r.shaShort]}),(0,e.jsxs)("p",{children:[r.fileCountLabel," · ",r.kb," KB"]}),(0,e.jsx)("pre",{children:r.skillMd}),(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"Package files"}),(0,e.jsx)("ul",{className:"skill-files",children:r.files.map(o=>(0,e.jsx)("li",{children:o},o))})]})]},`${r.name}:${r.shaShort}`))]}),i!==null&&(0,e.jsxs)("details",{className:"knowledge result-knowledge",children:[(0,e.jsx)("summary",{children:"Context used"}),(0,e.jsxs)("p",{className:"meta",children:["Project knowledge · version ",i.revision,i.inheritedFrom===null?"":` · from run #${i.inheritedFrom}`]}),i.instructions?(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"Instructions"}),(0,e.jsx)("pre",{children:i.instructions})]}):(0,e.jsx)("p",{children:"No project instructions were supplied."}),i.references.map(r=>(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:r.title}),r.path!==null&&(0,e.jsxs)("p",{className:"meta",children:[r.path," · ",r.sourceRevision]}),(0,e.jsx)("pre",{children:r.content})]},`${r.title}:${r.path??""}`)),i.omitted.length>0&&(0,e.jsxs)("details",{children:[(0,e.jsxs)("summary",{children:["Not included (",i.omitted.length,")"]}),(0,e.jsx)("ul",{children:i.omitted.map(r=>(0,e.jsxs)("li",{children:[r.title," — ",r.reason]},r.title))})]})]}),s.skillTestProblem!==null&&(0,e.jsx)("p",{role:"alert",children:s.skillTestProblem}),l!==null&&(0,e.jsxs)("section",{className:"skills",id:"skill-test-feedback",children:[(0,e.jsx)("h2",{children:"Improve this test"}),l.sourceRun!==null&&(0,e.jsxs)("p",{children:["Revises test run #",l.sourceRun,"."]}),l.feedback!==null&&(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"Feedback for this test"}),(0,e.jsx)("p",{children:l.feedback})]}),l.revisions.length>0&&(0,e.jsx)("p",{children:l.revisions.map((r,o)=>(0,e.jsxs)($.Fragment,{children:[o>0&&" · ",(0,e.jsxs)("a",{href:`/t/${encodeURIComponent(r)}`,children:["Test revision ",o+1]})]},r))}),l.canRevise&&l.nonce!==null&&(0,e.jsxs)(N,{action:"/settings/skills/revise",children:[(0,e.jsx)(y,{fields:{repo:l.repo,run:String(l.run),nonce:l.nonce}}),(0,e.jsxs)("label",{children:["What should change?",(0,e.jsx)("textarea",{name:"feedback",required:!0,maxLength:500,rows:3,placeholder:"Try a clearer action label and explain why it fits the user’s goal."})]}),(0,e.jsx)("p",{className:"meta",children:"Creates another report task with this skill version and your feedback. Review its scope before it runs."}),(0,e.jsx)("button",{children:"Create revision"})]})]}),d!==null&&d.lessons.length>0&&(0,e.jsxs)("details",{className:"learning result-learning",children:[(0,e.jsx)("summary",{children:"Learned from this task"}),d.lessons.map(r=>(0,e.jsxs)("article",{className:"card","data-lesson":r.id,children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:r.observation})}),(0,e.jsx)("p",{children:r.action}),(0,e.jsx)("p",{className:"meta",children:r.lastIncluded}),(0,e.jsx)("p",{className:"meta",children:r.kindLabel}),(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"Source and use"}),(0,e.jsxs)("p",{children:[(0,e.jsxs)("a",{href:`/r/${r.source}`,children:["Result #",r.source]})," · ",(0,e.jsxs)("a",{href:`/r/${r.reviewer}`,children:["Review #",r.reviewer]})]}),(0,e.jsx)("p",{children:r.metaSummary}),(0,e.jsx)("ul",{children:r.evidence.map((o,c)=>(0,e.jsxs)("li",{children:[(0,e.jsxs)("a",{href:`/r/${String(o.runId??r.source)}/evidence/${o.artifactId}`,children:["Source #",o.artifactId]}),(0,e.jsx)("blockquote",{children:o.excerpt}),(0,e.jsx)("code",{children:o.sha256})]},c))}),r.isProject&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"meta",children:r.status==="proposed"?"Save permits advisory reuse when enabled and applicable. It does not prove a remedy works.":"Disabling affects future runs. Active snapshots, code and approvals stay unchanged."}),r.status==="proposed"&&d.canManage&&(0,e.jsxs)(N,{action:"/settings/learning/change",children:[(0,e.jsx)(y,{fields:{repo:d.repo,identity:d.identity,revision:String(d.revision),action:"adopt",lesson:r.id,version:String(r.version),sha:r.sha}}),(0,e.jsx)("button",{type:"submit",children:"Save lesson"})]})]})]}),r.isProject&&r.status==="adopted"&&d.canManage&&(0,e.jsxs)(N,{action:"/settings/learning/change",children:[(0,e.jsx)(y,{fields:{repo:d.repo,identity:d.identity,revision:String(d.revision),action:"disable",lesson:r.id,version:String(r.version),sha:r.sha}}),(0,e.jsx)("button",{type:"submit",children:"Disable lesson"})]})]},r.id)),(0,e.jsx)("a",{href:`/settings/learning?repo=${encodeURIComponent(d.repo)}`,children:"Learning settings"})]})]})}function es({completion:s}){let n={receipt:s.receipt,run:s.run,accept:s.accept===null?null:"1"};return(0,e.jsxs)(N,{action:s.action,className:"card result-complete",children:[(0,e.jsx)(y,{fields:n}),s.accept?.note!=null&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("label",{className:"meta",htmlFor:`complete-reason-${s.run}`,children:D}),(0,e.jsx)("input",{type:"text",id:`complete-reason-${s.run}`,name:"note",maxLength:500,required:!0,placeholder:s.accept.note})]}),s.pullRequestTo!==null?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("p",{className:"meta",children:["Finishes the task. A pull request opens on ",s.pullRequestTo," from this exact commit when you ask for one."]}),(0,e.jsxs)("div",{className:"result-complete-actions",children:[(0,e.jsx)("button",{type:"submit",name:"publish",value:"1",className:"min-h-11",children:"Accept and open a pull request"}),(0,e.jsx)("button",{type:"submit",className:"secondary min-h-11",children:"Accept"})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"meta",children:"Finishes the task. Checks stay unchanged; nothing is published or deployed."}),(0,e.jsx)("button",{type:"submit",className:"min-h-11",children:"Accept"})]})]})}function cl({result:s}){let{panel:n,completion:t}=s,i=n.tabs.find(p=>p.active)?.key??"summary",[l,d]=(0,$.useState)(i),r=n.canRequest,o=n.need,c=n.failed??null,h=n.status,u=n.reviewHistory,x=()=>o===null?null:o.accept!=null?(0,e.jsxs)(N,{action:o.accept.action,className:"accept-result",children:[(0,e.jsx)(y,{fields:{return:o.accept.returnTo,run:o.accept.run}}),o.accept.note!==null&&(0,e.jsx)("input",{type:"text",name:"note",maxLength:500,required:!0,placeholder:o.accept.note,"aria-label":o.accept.note}),(0,e.jsx)("button",{type:"submit","data-primary-action":"","data-accept-result":"",className:"min-h-11",children:o.label})]}):o.rebuild!=null?(0,e.jsx)(N,{action:o.rebuild.action,className:"rebuild",children:(0,e.jsx)("button",{type:"submit","data-primary-action":"","data-rebuild":"",className:"min-h-11",children:o.label})}):o.confirm!==null?(0,e.jsxs)(N,{action:o.confirm.action,id:"recheck-stopped",className:"recheck-stopped",children:[(0,e.jsx)(y,{fields:{return:o.confirm.returnTo,run:o.confirm.run}}),(0,e.jsx)("button",{type:"submit","data-primary-action":"",className:"min-h-11",children:o.label})]}):(0,e.jsx)("a",{className:"button-link",href:o.href??"#","data-primary-action":"",children:o.label}),f=n.headVerdict?.statusToken??"";return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("section",{className:"card result-panel",id:"result",...n.attributes,children:[n.back!=null&&(0,e.jsx)("p",{className:"result-back",children:(0,e.jsxs)("a",{href:n.back.href,"data-result-back":"",children:["← ",n.back.label]})}),(0,e.jsx)(Ie,{history:n.history}),c!==null?(0,e.jsx)("header",{className:"result-head","data-result-failed":"",children:(0,e.jsxs)("div",{"data-headline-tone":"danger",children:[(0,e.jsxs)("h2",{className:"status-headline","data-work-status":"failed",children:[(0,e.jsx)("i",{"aria-hidden":"true"}),"Failed"]}),(0,e.jsx)("p",{className:"status-sentence","data-failure-reason":"",children:c.line}),(c.evidence!==null||c.link!==null)&&(0,e.jsxs)("p",{className:"meta","data-failure-evidence":"",children:[c.evidence??"",c.evidence!==null&&c.link!==null?" ":"",c.link!==null&&(0,e.jsx)("a",{href:c.link.href,"data-failure-log":"",children:c.link.label})]})]})}):h!==null&&n.showHeadStatus!==!1?(0,e.jsx)("header",{className:"result-head",children:(0,e.jsxs)("div",{"data-headline-tone":h.tone,children:[(0,e.jsxs)("h2",{className:"status-headline","data-work-status":f,children:[(0,e.jsx)("i",{"aria-hidden":"true"}),h.headline]}),(0,e.jsx)("p",{className:"status-sentence",children:h.sentence})]})}):(0,e.jsx)("header",{className:"result-head",children:(0,e.jsx)("div",{children:(0,e.jsx)("h2",{children:n.heading})})}),c===null&&(0,e.jsx)("p",{className:"result-summary",children:n.outcome}),n.headVerdict?.hasCurrentOutcome&&n.headVerdict.status!==null&&(0,e.jsxs)("div",{className:"verdict","data-current-outcome":"","data-headline":n.headVerdict.status.headline,children:[(0,e.jsx)(X,{status:n.headVerdict.status}),Z(n.headVerdict.status).map((p,j)=>(0,e.jsx)("p",{className:"status-why meta",children:p},j))]}),n.attention.length>0&&(0,e.jsx)("div",{className:"result-attention","data-result-attention":n.attention.length,children:(0,e.jsx)("ul",{children:n.attention.map((p,j)=>(0,e.jsx)("li",{children:p},j))})}),n.youCheck!==null&&(0,e.jsxs)("div",{className:"result-you-check","data-result-you-check":n.youCheck.lines.length,children:[(0,e.jsx)("ul",{children:n.youCheck.lines.map((p,j)=>(0,e.jsx)("li",{children:p},j))}),n.youCheck.accept!==null&&t===null&&(0,e.jsxs)(N,{action:n.youCheck.accept.action,children:[(0,e.jsx)(y,{fields:{return:n.youCheck.accept.returnTo,run:n.youCheck.accept.run}}),(0,e.jsx)("button",{type:"submit","data-accept-result":"",children:"Accept"})]})]}),n.showPanelAction!==!1&&o!==null&&(0,e.jsxs)("div",{className:"result-action","data-result-action":"need",children:[x(),r&&(0,e.jsx)("a",{className:"result-feedback-link",href:"#request-changes",children:"Send back"})]}),n.showPanelAction!==!1&&n.summary.details.publication.ciFailing&&(0,e.jsx)("div",{className:"result-action","data-result-action":"draft-repair",children:(0,e.jsxs)(N,{action:`/r/${s.runId}/draft-repair`,children:[(0,e.jsx)("p",{className:"meta",children:ve}),(0,e.jsx)("button",{type:"submit",children:"Send back"})]})}),u!==null&&(0,e.jsxs)("details",{className:"receipt-history",children:[(0,e.jsx)("summary",{children:"Review history"}),(0,e.jsx)("p",{className:"receipt-review meta","data-receipt-review":f,children:u})]}),(0,e.jsx)("nav",{className:"result-tabs",role:"tablist","aria-label":"result views",children:n.tabs.map(p=>{let j=p.key===l;return(0,e.jsxs)("a",{role:"tab",href:p.href,"data-result-tab":p.key,"aria-selected":j?"true":"false",tabIndex:j?0:-1,onClick:m=>{m.metaKey||m.ctrlKey||m.shiftKey||m.altKey||m.button!==0||(m.preventDefault(),d(p.key))},children:[p.label,p.count!==""&&(0,e.jsx)("span",{className:"count",children:p.count})]},p.key)})}),(0,e.jsx)("div",{className:"result-view",role:"tabpanel","data-result-view":"summary",hidden:l!=="summary",children:(0,e.jsx)(He,{summary:n.summary})}),(0,e.jsx)("div",{className:"result-view",role:"tabpanel","data-result-view":"changes",hidden:l!=="changes",children:(0,e.jsx)(Pe,{changes:n.changes})}),(0,e.jsx)("div",{className:"result-view",role:"tabpanel","data-result-view":"checks",hidden:l!=="checks",children:(0,e.jsx)(Ue,{checks:n.checks,runId:s.runId})}),n.learning!==null&&(0,e.jsx)(ze,{learning:n.learning}),n.request!==null&&(0,e.jsx)("section",{className:"result-request",id:"request-changes",children:(0,e.jsx)(Me,{request:n.request})})]}),t!==null&&(0,e.jsx)(es,{completion:t})]})}var a=H(le(),1),ce={attention:"bg-attention",danger:"bg-destructive",info:"bg-info",success:"bg-success",neutral:"bg-muted-foreground",warning:"bg-muted-foreground"};function M({className:s,...n}){return(0,a.jsx)("section",{className:b("bg-card text-card-foreground flex flex-col gap-6 rounded-card border border-border p-6 shadow-xs phone:gap-4 phone:p-4",s),...n})}var oe=s=>B(s);function ss({view:s}){let[n,t]=(0,E.useState)(!1);return s.results.length===0?null:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)(T,{type:"button",variant:"outline",size:"sm","aria-expanded":n,"aria-haspopup":"menu",onClick:()=>t(i=>!i),children:["Results ",(0,a.jsx)("span",{className:"rounded-full bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:s.results.length}),s.attention>0&&(0,a.jsx)("span",{className:"rounded-full bg-attention px-1.5 text-xs tabular-nums text-on-attention",title:`${s.attention} need your attention`,children:s.attention}),(0,a.jsx)(je,{})]}),n&&(0,a.jsxs)("div",{role:"menu",className:"absolute right-0 z-30 mt-1 max-h-[70vh] w-80 overflow-y-auto rounded-md border border-border bg-card p-1 shadow-md",children:[s.attention>0&&(0,a.jsxs)("p",{className:"px-2 py-1.5 text-xs font-medium text-attention",children:[s.attention," need",s.attention===1?"s":""," your attention"]}),s.results.map(i=>(0,a.jsxs)("a",{role:"menuitem",href:i.href,onClick:()=>t(!1),"aria-current":i.current?"page":void 0,className:b("flex items-start gap-2.5 rounded-sm px-2 py-1.5 text-sm hover:bg-accent",i.current&&"bg-accent"),children:[(0,a.jsx)("span",{"aria-hidden":"true",className:b("mt-1.5 size-2 shrink-0 rounded-full",i.status===null?"bg-muted-foreground":ce[ie(i.status.tone)])}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:b("block truncate",i.needsYou?"font-semibold":"font-medium"),children:i.title}),(0,a.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:[i.status?.label,...i.notes,oe(i.at)].filter(Boolean).join(" · ")})]})]},i.href)),s.capped!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{className:"my-1 border-border"}),(0,a.jsxs)("p",{className:"px-2 py-1.5 text-xs font-normal text-muted-foreground",children:["Showing the newest ",s.capped,"; older results open from their task."]})]})]})]})}function Te({headline:s}){return(0,a.jsxs)("h2",{className:"flex items-center gap-2.5 text-lg font-semibold leading-snug","data-mismatch-headline":!0,children:[(0,a.jsx)(F,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}),s]})}function as({selected:s,acts:n,answers:t,bare:i=!1}){let{panel:l,checks:d}=s,r=m=>{if(m===null)return!1;let v=new URL(m,"http://console.invalid");return v.pathname==="/review"&&v.searchParams.get("result")===s.taskId&&!v.searchParams.has("tab")&&v.hash===""},o=l?.requirements==null||l.youCheck==null?null:ye(l.requirements,[...t.values()].filter(m=>m==="right").length,[...t.values()].filter(m=>m==="not-right").length),c=l?.status==null?null:{...l.status,details:l.status.details.map(m=>{let v=o!==null&&m.key==="requirements"&&m.text!=="Unverified"?{...m,text:o.text,mark:o.done?"ok":o.short?m.mark==="ok"?"note":m.mark:"none"}:m;return v.action!==null&&r(v.action.href)?{...v,action:null}:v})},h=ie(s.status.tone),u=n.primary==="rebuild"||n.primary==="recheck-stopped",x=s.noRun??(l!==null&&!u?l.outcome:c?.sentence??l?.outcome??""),f=s.mismatch,p=[...new Set([...c===null&&d?.problem===!0?[d.detail]:[],...s.problem===null?[]:[s.problem],...l?.attention??[]])].filter(m=>f===null||!f.said.includes(m)),j=c?.headline==="Failed";return i?f===null&&p.length===0?null:(0,a.jsxs)(M,{"data-result-warnings":!0,"aria-label":"What to know about this result",children:[f?.headline!=null&&(0,a.jsx)(Te,{headline:f.headline}),f!==null&&f.rows.length>0&&(0,a.jsxs)(O,{tone:j?"error":"info",children:[(0,a.jsx)(F,{"aria-hidden":"true"}),(0,a.jsx)("ul",{"aria-label":"What doesn't match",className:"flex flex-col gap-1.5","data-mismatches":f.rows.length,children:f.rows.map((m,v)=>(0,a.jsx)("li",{"data-mismatch":!0,className:"min-w-0 [overflow-wrap:anywhere]",children:(0,a.jsxs)("span",{children:[m.text,m.path!==null&&m.absent&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("code",{className:"font-mono text-xs",children:m.path})," ",(0,a.jsx)("span",{className:"text-muted-foreground","data-mismatch-absent":!0,children:"— not in the saved changes"})]}),m.href!==null&&(m.path!==null||m.noteLabel!==null)&&(0,a.jsxs)(a.Fragment,{children:[" · ",(0,a.jsx)("a",{href:m.href,"data-mismatch-lines":!0,className:b("font-medium text-foreground/80 underline decoration-border underline-offset-4 hover:decoration-muted-foreground",m.path!==null&&"font-mono text-xs"),children:m.path!==null?`${m.path}${m.lines===null?"":`, ${m.lines}`}`:m.noteLabel})]})]})},v))})]}),p.length>0&&(0,a.jsxs)(O,{tone:j?"error":"info",children:[(0,a.jsx)(F,{"aria-hidden":"true"}),(0,a.jsx)("ul",{className:"flex flex-col gap-1","aria-label":"Caveats","data-result-attention":p.length,children:p.map(m=>(0,a.jsx)("li",{"data-caveat":!0,className:"min-w-0 [overflow-wrap:anywhere]",children:m},m))})]})]}):(0,a.jsxs)(M,{"data-result-status":s.status.token,"data-work-status":l?.headVerdict?.statusToken,"data-headline":c?.headline??s.status.label,"aria-label":"Result status",className:b(c?.headline==="Needs you"&&"border-wait"),children:[(0,a.jsxs)("div",{className:"min-w-0",children:[f?.headline!=null?(0,a.jsx)(Te,{headline:f.headline}):c!==null?(0,a.jsx)(me,{status:c}):(0,a.jsxs)("h2",{className:"flex items-center gap-2.5 text-lg font-semibold leading-snug",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:b("size-2.5 shrink-0 rounded-full",ce[h])}),s.status.label]}),x!==""&&(0,a.jsx)("p",{className:b("mt-1.5 max-w-[75ch] text-sm",s.failure!=null?"text-foreground":"text-muted-foreground"),"data-result-sentence":!0,...s.failure!=null?{"data-failure-reason":""}:{},children:x}),s.failure!=null&&(s.failure.evidence!==null||s.failure.link!==null)&&(0,a.jsxs)("p",{className:"mt-1 max-w-[75ch] text-body text-muted-foreground","data-failure-evidence":!0,children:[s.failure.evidence!==null&&(0,a.jsx)("span",{className:"[overflow-wrap:anywhere]",children:s.failure.evidence}),s.failure.link!==null&&(0,a.jsxs)(a.Fragment,{children:[s.failure.evidence!==null&&" ",(0,a.jsx)("a",{href:s.failure.link.href,"data-failure-log":!0,className:U,children:s.failure.link.label})]})]})]}),f!==null&&f.rows.length>0&&(0,a.jsxs)(O,{tone:j?"error":"info",children:[(0,a.jsx)(F,{"aria-hidden":"true"}),(0,a.jsx)("ul",{"aria-label":"What doesn't match",className:"flex flex-col gap-1.5","data-mismatches":f.rows.length,children:f.rows.map((m,v)=>(0,a.jsx)("li",{"data-mismatch":!0,className:"min-w-0 [overflow-wrap:anywhere]",children:(0,a.jsxs)("span",{children:[m.text,m.path!==null&&m.absent&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("code",{className:"font-mono text-xs",children:m.path})," ",(0,a.jsx)("span",{className:"text-muted-foreground","data-mismatch-absent":!0,children:"— not in the saved changes"})]}),m.href!==null&&(m.path!==null||m.noteLabel!==null)&&(0,a.jsxs)(a.Fragment,{children:[" · ",(0,a.jsx)("a",{href:m.href,"data-mismatch-lines":!0,className:b("font-medium text-foreground/80 underline decoration-border underline-offset-4 hover:decoration-muted-foreground phone:-my-3 phone:inline-block phone:py-3",m.path!==null&&"font-mono text-xs"),children:m.path!==null?`${m.path}${m.lines===null?"":`, ${m.lines}`}`:m.noteLabel})]})]})},v))})]}),c!==null&&(0,a.jsx)(X,{status:c}),p.length>0&&(0,a.jsxs)(O,{tone:j?"error":"info",children:[(0,a.jsx)(F,{"aria-hidden":"true"}),(0,a.jsx)("ul",{className:"flex flex-col gap-1","aria-label":"Caveats","data-result-attention":p.length,children:p.map(m=>(0,a.jsx)("li",{"data-caveat":!0,className:"min-w-0 [overflow-wrap:anywhere]",children:m},m))})]})]})}function ns(s){let n=document.getElementById("comment-form"),t=n?.querySelector("textarea[name=note]")??null,i=n?.querySelector("input[name=context]")??null,l=n?.closest("details")??null;if(l!==null&&!l.open&&(l.open=!0),t===null||i===null){window.location.hash="request-changes";return}let d=`Not right: “${s.replace(/\s+/g," ")}”`,r=i.value.split(`
4
- `).filter(c=>c.trim()!=="");r.includes(d)||r.push(d),i.value=r.join(`
5
- `);let o=n?.querySelector("[data-request-context-line]")??null;o!==null&&ue(o,i.value),t.dispatchEvent(new Event("input",{bubbles:!0})),t.scrollIntoView({block:"center",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"}),t.focus(),t.setSelectionRange(t.value.length,t.value.length)}function ts({excerpt:s,changesHref:n}){return(0,a.jsxs)("figure",{className:"overflow-hidden rounded-md border border-border","data-check-excerpt":s.path,children:[(0,a.jsxs)("figcaption",{className:"flex flex-wrap items-baseline gap-x-2 border-b border-border bg-muted px-3 py-1.5 text-xs text-muted-foreground",children:[(0,a.jsx)("span",{className:"font-mono text-foreground [overflow-wrap:anywhere]",children:s.path}),!s.cited&&(0,a.jsx)("span",{children:"first changed file"})]}),(0,a.jsx)("ol",{className:"font-mono text-xs leading-relaxed",children:s.lines.map((t,i)=>(0,a.jsxs)("li",{"data-kind":t.kind,className:b("grid grid-cols-[2.5rem_1rem_minmax(0,1fr)] px-1 py-0.5",t.kind==="addition"?"bg-success-soft":t.kind==="deletion"?"bg-destructive-soft":""),children:[(0,a.jsx)("span",{className:"select-none pr-2 text-right text-muted-foreground tabular-nums",children:t.line??""}),(0,a.jsx)("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:t.kind==="addition"?"+":t.kind==="deletion"?"−":" "}),(0,a.jsxs)("code",{className:"whitespace-pre-wrap rounded-none bg-transparent p-0 font-mono text-xs text-foreground [overflow-wrap:anywhere]",children:[(0,a.jsx)("span",{className:"sr-only",children:t.kind==="addition"?"Added: ":t.kind==="deletion"?"Removed: ":""}),t.text]})]},i))}),s.more>0&&(0,a.jsxs)("p",{className:"border-t border-border px-3 py-1.5 text-xs text-muted-foreground",children:[s.more," more changed line",s.more===1?"":"s",n===null?"":(0,a.jsxs)(a.Fragment,{children:[" in ",(0,a.jsx)("a",{href:n,"data-result-goto":"changes",className:"underline underline-offset-4",children:"Changes"})]})]})]})}function We(s){let n=s?.youCheck??null;return n==null?[]:n.items.length>0?n.items:n.lines.map((t,i)=>({id:`line-${i}`,statement:"",words:t,note:null,excerpts:[],shots:[]}))}var _=s=>s.statement===""?s.words:s.statement;function ls(){let s=document.getElementById("result-decision");s!==null&&(s.scrollIntoView({block:"center",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"}),s.querySelector("[data-result-acts] :is(button, a)")?.focus({preventScroll:!0}))}function Re(s){let n=document.querySelector(`[data-check-item="${CSS.escape(s)}"]`);n!==null&&(n.scrollIntoView({block:"center",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"}),n.querySelector("[data-looks-right]")?.focus({preventScroll:!0}))}function rs({panel:s,chatHref:n,answers:t,answer:i}){let l=We(s),d=s.tabs.find(r=>r.key==="changes")?.href??null;return(0,a.jsxs)(M,{"aria-labelledby":"you-check-title","data-result-you-check":l.length,className:"gap-0 p-0 phone:gap-0 phone:p-0",children:[(0,a.jsx)("h2",{id:"you-check-title",className:"px-5 pb-1 pt-4 text-title phone:px-4",children:l.length===1?"You check this one":`You check these ${l.length}`}),(0,a.jsx)("ul",{className:"divide-y divide-border",children:l.map(r=>{let o=t.get(r.id)??null;return(0,a.jsxs)("li",{"data-check-item":r.id,"data-looks-right":o==="right"?"1":void 0,"data-not-right":o==="not-right"?"1":void 0,className:"flex scroll-mt-4 flex-col gap-3 px-5 py-4 phone:px-4",children:[(0,a.jsx)("p",{className:"max-w-[75ch] text-sm font-medium",children:_(r)}),r.note!==null&&(0,a.jsxs)("p",{className:"max-w-[75ch] text-body text-muted-foreground",children:["The agent says: ",r.note]}),r.excerpts.map(c=>(0,a.jsx)(ts,{excerpt:c,changesHref:d},c.path)),r.shots.length>0&&(()=>{let{pairs:c,rest:h}=ae(r.shots.map(u=>({...u,...s.canRequest&&u.image!==void 0?{commentPayload:JSON.stringify(u.image)}:{}})));return(0,a.jsxs)(a.Fragment,{children:[c.map(u=>(0,a.jsx)(se,{label:u.label,before:{src:u.before.src,href:u.before.href,caption:u.before.caption,...u.before.commentPayload===void 0?{}:{commentPayload:u.before.commentPayload}},after:{src:u.after.src,href:u.after.href,caption:u.after.caption,...u.after.commentPayload===void 0?{}:{commentPayload:u.after.commentPayload}}},u.key)),h.length>0&&(0,a.jsx)("ul",{className:"flex flex-wrap gap-2","aria-label":"Screenshots",children:h.map(u=>(0,a.jsxs)("li",{children:[(0,a.jsx)("a",{href:u.href,className:"block overflow-hidden rounded-md border border-border hover:border-muted-foreground",title:u.caption,children:(0,a.jsx)("img",{src:u.src,alt:u.caption,loading:"lazy",className:"h-24 w-auto max-w-[12rem] object-cover phone:h-20"})}),s.canRequest&&u.image!==void 0&&(0,a.jsx)(T,{variant:"ghost",className:"min-h-11","data-comment-image":JSON.stringify(u.image),"data-image-caption":u.caption,children:"Comment"})]},u.src))})]})})(),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsxs)(T,{variant:"outline","aria-pressed":o==="right",className:"min-h-11 aria-pressed:bg-success-soft aria-pressed:text-success phone:flex-1","data-looks-right":!0,onClick:()=>i(r.id,o==="right"?null:"right"),children:[(0,a.jsx)(fe,{}),"Looks right"]}),s.canRequest?(0,a.jsx)(T,{variant:"ghost","aria-pressed":o==="not-right",className:"min-h-11 aria-pressed:bg-attention-soft aria-pressed:text-foreground phone:flex-1","data-not-right":!0,onClick:()=>{let c=o==="not-right";i(r.id,c?null:"not-right"),c||ns(_(r))},children:"Not right"}):(0,a.jsx)(T,{asChild:!0,variant:"ghost",className:"min-h-11 phone:flex-1",children:(0,a.jsx)("a",{href:n,"data-not-right":!0,children:"Not right"})})]})]},r.id)})})]})}function is({selected:s,csrf:n,acts:t,decision:i,firstUnanswered:l,statusSlot:d=null}){let{next:r}=s,[o,c]=(0,E.useState)(!1),h=s.complete,u=s.panel?.need??null,x=s.panel?.youCheck??null,f=h===null?u?.accept??(x?.accept==null?null:{...x.accept,note:null}):null,p=[t.primary,t.secondary].filter(g=>g!==null),j=p.includes("accept")?i?.why??null:null,m=p.includes("accept")?h!==null?h.accept?.note??null:f?.note??null:null,v=m!==null||p.includes("accept-anyway"),L=t.line===D&&v?null:t.line??j,z=d!==null&&t.primary==="accept"&&m===null&&i?.ready===!0&&h!==null&&h.accept==null,k=d!==null&&t.primary===null&&t.secondary==="accept",W=z?C("accept",!0,"Mark complete"):k?(0,a.jsx)(V,{variant:"primary",label:"Review and accept",href:l!==null?"#you-check-title":"#result-decision","data-review-and-accept":"",onClick:g=>{g.preventDefault(),l!==null?Re(l):ls()}}):null,w=z?{...t,primary:null}:t;function C(g,I,Ee){let Be=I?"attention":"outline",A={"data-act":g,...I?{"data-ink-act":g,"data-primary-action":""}:{}};switch(g){case"retry":return s.failure?.retry==null?null:(0,a.jsx)(Ke,{action:s.failure.retry.action,csrf:n,note:s.failure.retry.note,pins:s.failure.retry.pins,variant:Be==="attention"?"attention":"default"},g);case"accept":{if(i===null)return null;let S=h??f;return S===null?null:(0,a.jsxs)(N,{action:S.action,className:b(m===null?"flex flex-wrap items-center gap-2 phone:w-full":"flex w-full max-w-sm flex-col items-start gap-2 phone:max-w-none"),...m===null?{}:{"data-accept-with-reason":""},children:[(0,a.jsx)("input",{type:"hidden",name:"run",value:String(S.run)}),h!==null?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"hidden",name:"receipt",value:h.receipt}),h.accept!=null&&(0,a.jsx)("input",{type:"hidden",name:"accept",value:"1"}),h.returnTo!==void 0&&(0,a.jsx)("input",{type:"hidden",name:"return",value:h.returnTo})]}):f!==null&&(0,a.jsx)("input",{type:"hidden",name:"return",value:f.returnTo}),m!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"accept-reason",className:"k-label","data-accept-needs-reason":!0,children:D}),(0,a.jsx)(ne,{id:"accept-reason",type:"text",name:"note",maxLength:500,required:!0,placeholder:m})]}),(0,a.jsx)(q,{type:"submit",variant:I?"primary":"outline",label:Ee??i.label,...A,"data-accept-result":""})]},g)}case"accept-anyway":{let S=s.failure?.acceptAnyway??null;return S==null?null:(0,a.jsxs)(N,{action:S.action,className:"flex w-full max-w-sm flex-col items-start gap-2 phone:max-w-none","data-accept-with-reason":!0,"data-accept-anyway":!0,children:[(0,a.jsx)("input",{type:"hidden",name:"run",value:String(S.run)}),(0,a.jsx)("input",{type:"hidden",name:"return",value:S.returnTo}),(0,a.jsx)("label",{htmlFor:"accept-reason",className:"k-label","data-accept-needs-reason":!0,children:D}),(0,a.jsx)(ne,{id:"accept-reason",type:"text",name:"note",maxLength:500,required:!0,placeholder:"Why is this safe to accept?"}),(0,a.jsx)(q,{type:"submit",variant:"outline",label:"Accept anyway",...A,"data-accept-result":""})]},g)}case"next-check":return l===null?null:(0,a.jsx)(q,{variant:I?"primary":"outline",label:"Go to your check",...A,onClick:()=>Re(l)},g);case"checks-running":return(0,a.jsx)(q,{variant:"outline",label:"Checks running",disabled:!0,"aria-disabled":"true",...A},g);case"run-checks":return s.runChecks===null?null:(0,a.jsxs)(N,{action:s.runChecks.action,className:"phone:w-full",children:[(0,a.jsx)("input",{type:"hidden",name:"level",value:s.runChecks.level}),(0,a.jsx)("input",{type:"hidden",name:"return",value:s.runChecks.returnTo}),(0,a.jsx)(q,{type:"submit",variant:I?"primary":"outline",label:"Run checks",...A})]},g);case"request-changes":return(0,a.jsx)(V,{variant:I?"primary":"outline",label:"Send back",href:"#request-changes",...A},g);case"rebuild":return u?.rebuild==null?null:(0,a.jsx)(xe,{action:u.rebuild.action,label:u.label,className:"min-h-11"},g);case"recheck-stopped":return u?.confirm==null?null:(0,a.jsx)(pe,{form:u.confirm,label:u.label},g);case"revise":case"draft-repair":return r===null?null:(0,a.jsx)(Qe,{control:r.control,className:"so-result-next phone:w-full"},g)}}let de=d!==null&&W!==null?(0,Le.createPortal)(W,d):null;if(w.primary===null&&w.secondary===null&&r===null&&s.failure==null)return de;let he=[w.primary,w.secondary].filter(g=>g!==null),J=i!==null&&he.includes("accept")?i.effect:null,Y=w.primary!==null?w.secondary:null,Oe=Y!==null||L!==null||r!==null||J!==null,Q=o?"":"phone:hidden";return(0,a.jsxs)(a.Fragment,{children:[de,(0,a.jsxs)("section",{id:"result-decision","data-result-decision":w.primary??"none","aria-label":"Decision","data-dock":o?"open":"compact",className:b("k-slots so-result-decision",w.primary==="accept"&&"wait"),children:[L!==null&&(0,a.jsxs)("p",{className:b("flex max-w-[75ch] gap-2 text-body",Q),"data-decision-why":!0,...w.line===null?{}:{"data-cant-accept":""},children:[(0,a.jsx)(F,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}),L]}),s.failure!=null&&s.failure.retry===null&&(0,a.jsxs)("p",{className:"max-w-[75ch] text-body","data-failure-suggestion":!0,children:[(0,a.jsx)("span",{className:"font-semibold",children:"What to change."})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:s.failure.suggestion})]}),r!==null&&(0,a.jsxs)("p",{className:b("max-w-[75ch] text-body",Q),"data-next-action":r.kind,children:[(0,a.jsxs)("span",{className:"font-semibold",children:[r.title,"."]})," ",(0,a.jsx)("span",{className:"text-muted-foreground",children:r.detail})]}),he.length>0&&(0,a.jsxs)("div",{className:b("flex flex-wrap items-center gap-2 phone:flex-nowrap phone:items-stretch",m!==null&&"flex-col items-start gap-3 phone:flex-row phone:items-stretch phone:gap-2",o&&"phone:flex-wrap"),"data-result-acts":!0,children:[(0,a.jsx)("div",{className:"contents phone:flex phone:min-w-0 phone:flex-1 phone:flex-col",children:w.primary!==null?C(w.primary,!0):w.secondary!==null&&C(w.secondary,!1)}),Y!==null&&(0,a.jsx)("div",{className:b("contents phone:order-last phone:basis-full phone:flex-col",o?"phone:flex":"phone:hidden"),children:C(Y,!1)}),Oe&&(0,a.jsx)(q,{variant:"ghost",className:"k-phone-only","aria-expanded":o,label:o?"Less":"More","data-dock-more":"",onClick:()=>c(g=>!g)})]}),J!==null&&(0,a.jsx)("p",{className:b("k-slot-terms",Q),"data-decision-effect":!0,children:J})]})]})}function cs({panel:s,runId:n,children:t}){return(0,a.jsxs)("div",{id:"result",...s.attributes,className:"flex scroll-mt-4 flex-col gap-4",children:[(0,a.jsx)(Ie,{history:s.history}),(0,a.jsxs)("div",{className:"so-result-panel",children:[(0,a.jsx)("nav",{role:"tablist","aria-label":"Result views",className:"k-tabs",children:s.tabs.map(i=>(0,a.jsxs)("a",{role:"tab",href:i.href,"data-result-tab":i.key,"aria-selected":i.active?"true":"false",...i.active?{}:{tabIndex:-1},children:[i.label,i.count!==""&&(0,a.jsx)("span",{className:"k-count",children:i.count})]},i.key))}),s.tabs.map(i=>(0,a.jsx)("div",{role:"tabpanel","data-result-view":i.key,hidden:!i.active,className:"so-result-body",children:i.key==="summary"?(0,a.jsx)(He,{summary:s.summary}):i.key==="changes"?(0,a.jsx)(Pe,{changes:s.changes}):(0,a.jsx)(Ue,{checks:s.checks,runId:n})},i.key))]}),t,s.request!==null&&(0,a.jsx)("section",{id:"request-changes","aria-label":"Send back",className:b("result-request so-result-request-box",s.requestQuiet&&"is-quiet"),children:(0,a.jsx)(Me,{request:s.request,className:"so-result-request"})})]})}var re={edit:"edits",command:"commands",read:"reads",search:"searches",lookup:"web lookups",plan:"plans",delegate:"delegations",tool:"other tools"};function K(s){let n=Math.round(s/1e3);if(n<60)return`${n} s`;let t=Math.round(n/60);return t<60?`${t} min`:`${Math.floor(t/60)} h${t%60===0?"":` ${t%60} min`}`}function P(s){return s>=1e6?`${(s/1e6).toFixed(s>=1e7?0:1)}M`:s>=1e3?`${Math.round(s/1e3)}k`:String(s)}var R="—";function os(s){if(s.mode==="open")return"Open: it could reach any host";if(s.via===!0)return"Through its own research proxy only";let n=s.counts;if(n===void 0)return`Approved hosts only (${s.hosts??0})`;let t=n.hosts.filter(i=>i.refused>0).map(i=>i.host);return`${n.connections} connection${n.connections===1?"":"s"} to approved hosts`+(n.refused===0?"; nothing refused":`; refused ${t.slice(0,3).join(", ")}${t.length>3?` and ${t.length-3} more`:""}`)}function ds({one:s}){let n=s.counts;return(0,a.jsxs)("div",{className:"flex flex-col gap-2 text-body",children:[n!==void 0&&n.hosts.length>0&&(0,a.jsx)("dl",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-1",children:n.hosts.map(t=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("dt",{className:"min-w-0 font-mono text-caption [overflow-wrap:anywhere]",children:t.host}),(0,a.jsx)("dd",{className:"text-right tabular-nums text-muted-foreground",children:t.refused>0?`refused ×${t.refused}`:`${t.connections}`})]},t.host))}),n!==void 0&&n.otherHosts>0&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["And ",n.otherHosts," more connection",n.otherHosts===1?"":"s"," to other hosts."]}),n!==void 0&&n.refused>0&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["An approver adds a host in the project's network settings (",(0,a.jsx)("span",{className:"font-mono",children:"toolroll project network --allow"}),"); new scopes get it."]}),(0,a.jsxs)("p",{className:"text-caption text-muted-foreground",children:["Counted by the build's own proxy: a connection its sandbox refused outright isn't counted.",s.loopback==="proxy-only"?" Local services on this machine were out of reach.":""]})]})}function hs(s){let n=s.time.agentMs===null?R:K(s.time.agentMs),t=s.usage.in===null?`${R} tokens in`:`${P(s.usage.in)} tokens in${s.usage.cacheShare===null?"":`, ${Math.round(s.usage.cacheShare*100)}% from cache`}`;return[n,s.turns===null?null:`${s.turns} turn${s.turns===1?"":"s"}`,t,`${s.usage.out===null?R:P(s.usage.out)} out`,s.steps.total===null?null:`${s.steps.total} step${s.steps.total===1?"":"s"}`].filter(i=>i!==null).join(" · ")}var De=s=>[s.time.waitMs,s.time.agentMs,s.turns,s.usage.in,s.usage.out,s.usage.cacheRead,s.usage.cacheWrite,s.steps.total].some(n=>n!==null);function us(s){return De(s)||s.steps.state!=="absent"}function ms({one:s}){let n=Object.entries(s.steps.byKind).filter(([,t])=>(t??0)>0).sort((t,i)=>(i[1]??0)-(t[1]??0));return(0,a.jsxs)("div",{className:"flex flex-col gap-3 text-body","data-run-efficiency":s.steps.state,children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-caption font-medium text-muted-foreground",children:"Time"}),(0,a.jsxs)("p",{children:["Waiting to start ",s.time.waitMs===null?R:K(s.time.waitMs)," · The agent ",s.time.agentMs===null?R:K(s.time.agentMs)]}),(0,a.jsx)("p",{className:"text-caption text-muted-foreground",children:"Checks aren't timed separately; they're inside the agent's time."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-caption font-medium text-muted-foreground",children:"Tokens"}),(0,a.jsxs)("p",{children:[s.usage.in===null?R:P(s.usage.in)," in",s.usage.cacheRead===null?"":` · ${P(s.usage.cacheRead)} read from cache`,s.usage.cacheWrite===null?"":` · ${P(s.usage.cacheWrite)} written to it`," · ",s.usage.out===null?R:P(s.usage.out)," out"]}),(0,a.jsxs)("p",{className:"text-caption text-muted-foreground",children:["As ",s.usage.provider,s.usage.model===null?"":` · ${s.usage.model}`," reported them",s.usage.cacheShare===null?"; it didn't report its cache":"","."]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-caption font-medium text-muted-foreground",children:"Steps"}),s.steps.total===null?(0,a.jsx)("p",{className:"text-muted-foreground","data-run-efficiency-steps":s.steps.state,children:s.steps.reason}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:[s.steps.total," step",s.steps.total===1?"":"s",n.length===0?"":`: ${n.map(([t,i])=>`${i} ${re[t]??t}`).join(", ")}`,(s.steps.failed??0)>0?` · ${s.steps.failed} failed`:""]}),s.steps.longest.length>0&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Longest: ",s.steps.longest.map(t=>`${re[t.kind]?.replace(/s$/,"")??t.kind} ${K(t.ms)}`).join(" · "),(s.steps.unknownDuration??0)>0?` · ${s.steps.unknownDuration} without a measured time`:""]}),s.steps.reason!==null&&(0,a.jsx)("p",{className:"text-caption text-muted-foreground",children:s.steps.reason})]})]}),s.steps.total!==null&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-caption font-medium text-muted-foreground",children:"Repeated activity"}),s.steps.repeats===null?(0,a.jsx)("p",{className:"text-muted-foreground",children:s.steps.repeatsReason}):s.steps.repeats.length===0?(0,a.jsx)("p",{className:"text-muted-foreground",children:"No step ran three times or more with the same input."}):(0,a.jsx)("ul",{className:"flex flex-col gap-0.5","data-run-repeats":s.steps.repeats.length,children:s.steps.repeats.map((t,i)=>(0,a.jsxs)("li",{children:["The same ",re[t.kind]?.replace(/s$/,"")??t.kind," step ",t.count," times"]},i))}),s.steps.repeats!==null&&s.steps.repeatsReason!==null&&(0,a.jsx)("p",{className:"text-caption text-muted-foreground",children:s.steps.repeatsReason})]})]})}function ps({selected:s}){let n=s.panel?.learning??null,t=s.panel,i=t?.status==null?[]:Z(t.status),l=s.record,d=[{id:"intent",title:"Approved plan",hint:s.intent===null?null:(0,a.jsxs)(a.Fragment,{children:[s.intent.approval,s.intent.approvedAt!=null&&(0,a.jsxs)(a.Fragment,{children:[" · ",(0,a.jsx)("time",{dateTime:s.intent.approvedAt,title:ee(s.intent.approvedAt),children:B(s.intent.approvedAt)})]})]}),body:s.intent===null?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"No plan was filed for this task, so there is no approved goal or boundary to review."}):(0,a.jsx)(Xe,{intent:s.intent,className:"so-result-intent"})},...s.notes.length===0?[]:[{id:"notes",title:"Notes",hint:null,count:s.notes.length,body:(0,a.jsx)("ul",{className:"flex flex-col gap-2 text-sm",children:s.notes.map((r,o)=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("span",{className:"text-muted-foreground",children:[r.author," · ",oe(r.at)]})," ",r.note]},o))})}],...i.length===0?[]:[{id:"why",title:"Recorded reasons",hint:null,count:i.length,body:(0,a.jsx)("div",{className:"flex flex-col gap-1 text-body text-muted-foreground","data-status-why":!0,children:i.map(r=>(0,a.jsx)("p",{className:"[overflow-wrap:anywhere]",children:r},r))})}],...t===null||t.limits.length===0?[]:[{id:"limits",title:"What was shortened",hint:null,count:t.limits.length,body:(0,a.jsx)("ul",{className:"flex flex-col gap-1 text-body text-muted-foreground",children:t.limits.map(r=>(0,a.jsx)("li",{children:r},r))})}],...t?.reviewHistory==null?[]:[{id:"review-history",title:"Review history",hint:null,body:(0,a.jsx)("p",{className:"text-body text-muted-foreground",children:t.reviewHistory})}],...s.efficiency==null||!us(s.efficiency)?[]:[{id:"how-it-ran",title:"How it ran",hint:De(s.efficiency)?hs(s.efficiency):s.efficiency.steps.reason,body:(0,a.jsx)(ms,{one:s.efficiency})}],...s.network==null?[]:[{id:"network",title:"Network",hint:os(s.network),body:(0,a.jsx)(ds,{one:s.network})}],...s.timing==null||s.timing.length===0?[]:[{id:"timing",title:"Where the time went",hint:s.timing.map(r=>`${r.title} ${r.total}`).join(" · "),body:(0,a.jsx)(gs,{groups:s.timing})}],...l===null?[]:[{id:"run-record",title:"Run record",hint:`Build #${l.build}`,body:(0,a.jsxs)("div",{className:"flex flex-col gap-3 text-body",children:[(0,a.jsx)("dl",{className:"grid grid-cols-[6.5rem_minmax(0,1fr)] gap-x-3 gap-y-1.5",children:l.facts.map(r=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:r.label}),(0,a.jsx)("dd",{className:"min-w-0 [overflow-wrap:anywhere]",children:r.value})]},r.label))}),(0,a.jsxs)("p",{className:"flex flex-wrap gap-x-4 gap-y-1",children:[s.checks?.logHref!=null&&(0,a.jsx)("a",{href:s.checks.logHref,className:U,children:"Check output"}),(0,a.jsx)("a",{href:l.href,className:U,children:"Full run record"})]})]})}]];return(0,a.jsxs)(M,{"aria-label":"Result record",className:"gap-0 divide-y divide-border overflow-hidden p-0 phone:p-0",children:[n!==null&&(0,a.jsx)("div",{"data-cockpit-section":"learning",children:(0,a.jsx)(ze,{learning:n,className:"so-result-learning"})}),d.map(r=>(0,a.jsxs)("details",{id:r.id,className:"group scroll-mt-4","data-cockpit-section":r.id,children:[(0,a.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2 px-5 py-3.5 hover:bg-accent/50 phone:min-h-12 phone:px-4 [&::-webkit-details-marker]:hidden",children:[(0,a.jsx)(ge,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-open:rotate-90","aria-hidden":"true"}),(0,a.jsx)("h2",{className:"shrink-0 text-title leading-normal",children:r.title}),r.count!==void 0&&(0,a.jsx)(ke,{children:r.count}),r.hint!=null&&(0,a.jsx)("span",{className:"min-w-0 truncate text-body text-muted-foreground",children:r.hint})]}),(0,a.jsx)("div",{className:"px-5 pb-5 pt-1 phone:px-4",children:r.body})]},r.id))]})}var U="font-medium text-foreground/80 underline decoration-border underline-offset-4 hover:decoration-muted-foreground phone:inline-flex phone:min-h-11 phone:items-center";function xs(s){let n=document.getElementById("run-record");n instanceof HTMLDetailsElement&&(s.preventDefault(),n.open=!0,n.scrollIntoView({block:"start",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"}),history.replaceState(history.state,"","#run-record"))}var fs=new Set(["retry","rebuild","recheck-stopped"]);function js({selected:s,csrf:n,inTask:t}){let[i,l]=(0,E.useState)(new Map),d=(k,W)=>l(w=>{let C=new Map(w);return W===null?C.delete(k):C.set(k,W),C}),r=We(s.panel),o=r.filter(k=>!i.has(k.id)),c=r.filter(k=>i.get(k.id)==="not-right"),h={unanswered:o.map(_),notRight:c.map(_)},u=s.decision===null?null:{...s.decision,...we(s.decision.base??s.decision,h)},x=s.actFacts===void 0?s.acts:Ne({...s.actFacts,...s.actFacts.accept===null?{}:{accept:{ready:u?.ready??!1}},unanswered:o.length,notRight:c.length}),f=k=>t?.current===!0&&k!==null&&fs.has(k)?null:k,p=t?.current===!0?{...x,primary:f(x.primary),secondary:f(x.secondary)}:x,j=s.panel?.youCheck!=null?(0,a.jsx)(rs,{panel:s.panel,chatHref:s.chatHref,answers:i,answer:d}):null,m=(0,E.useContext)(Ge),v=(0,a.jsx)(is,{selected:s,csrf:n,acts:p,decision:u,firstUnanswered:o[0]?.id??null,statusSlot:t?.current===!0?m:null}),L=(0,E.useContext)(_e),z=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(as,{selected:s,acts:p,answers:i,bare:t?.current===!0}),(0,a.jsx)(Ve,{report:s.agentReport,said:s.youSaid})]});return(0,a.jsxs)(a.Fragment,{children:[t?.current===!0&&L!==null?(0,Le.createPortal)(z,L):z,s.panel!==null?(0,a.jsx)(cs,{panel:s.panel,runId:s.build??0,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[j,v]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[j,v]}),(0,a.jsx)(ps,{selected:s})]})}function ol({view:s,csrf:n}){let t=s.selected;return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-4",children:[(0,a.jsxs)("header",{className:"flex flex-col gap-3 pb-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 basis-72",children:[(0,a.jsx)("h1",{className:"text-display tracking-tight phone:text-[22px]",children:t?.title??"Results"}),t!==null&&(0,a.jsxs)("p",{className:"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-body text-muted-foreground phone:gap-y-0","data-result-meta":!0,children:[t.project!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:t.project}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"})]}),t.record!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("a",{href:"#run-record",onClick:xs,className:U,children:["Build #",t.record.build]}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"})]}),(0,a.jsx)("a",{href:t.taskHref,className:U,children:"Open task"}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("a",{href:t.chatHref,className:U,children:"Discuss"})]})]}),t!==null&&(0,a.jsx)(ss,{view:s})]}),s.missing!==null&&(0,a.jsxs)("p",{role:"status",className:"rounded-md bg-muted px-3 py-2 text-body text-foreground",children:[s.missing,t!==null?" Showing the newest result instead.":""]}),s.beyond&&(0,a.jsx)("p",{className:"text-body text-muted-foreground",children:"This result is older than the list in Results."})]}),t===null?s.results.length===0?(0,a.jsxs)(M,{className:"items-start py-10",children:[(0,a.jsx)("p",{className:"text-base text-muted-foreground",children:"Nothing to review yet."}),(0,a.jsx)(T,{asChild:!0,variant:"outline",children:(0,a.jsx)("a",{href:"/",children:"Open Work"})})]}):(0,a.jsx)(M,{"aria-label":"Results",className:"gap-0 overflow-hidden p-0 phone:p-0",children:(0,a.jsx)("ul",{className:"divide-y divide-border",children:s.results.map(i=>(0,a.jsxs)("li",{className:"flex items-start gap-3 px-5 py-3 phone:px-4",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:b("mt-2 size-2 shrink-0 rounded-full",i.status===null?"bg-muted-foreground":ce[ie(i.status.tone)])}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("a",{href:i.href,className:b("block truncate hover:underline hover:underline-offset-4",i.needsYou?"font-semibold":"font-medium"),children:i.title}),(0,a.jsx)("p",{className:"truncate text-body text-muted-foreground",children:[i.status?.label,...i.notes,oe(i.at)].filter(Boolean).join(" · ")})]})]},i.href))})}):(0,a.jsx)(js,{selected:t,csrf:n},`${t.taskId}:${t.build??""}`)]})}function gs({groups:s}){return(0,a.jsx)("div",{className:"flex flex-col gap-4 text-body","data-timing":!0,children:s.map((n,t)=>(0,a.jsxs)("section",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium",children:[n.title," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["· ",n.total]})]}),(0,a.jsx)("dl",{className:"grid grid-cols-[4.5rem_minmax(0,1fr)] gap-x-3 gap-y-1",children:n.rows.map((i,l)=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("dt",{className:"font-mono text-muted-foreground tabular-nums",children:i.at}),(0,a.jsxs)("dd",{className:"min-w-0 [overflow-wrap:anywhere]",children:[i.label,i.detail!==null&&(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" · ",i.detail]})]})]},l))})]},t))})}export{cl as a,Te as b,ts as c,K as d,P as e,os as f,hs as g,us as h,js as i,ol as j};
@@ -1,2 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p12$a as J,p12$b as y}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p3$$ as G,p3$$a as I,p3$$b as K,p3$A as L,p3$Aa as M,p3$Ab as z,p3$B as H,p3$Ba as Q,p3$Bb as V,p3$C as W,p3$Ca as X,p3$Cb as Y,p3$D as Z,p3$Da as _,p3$Db as aa,p3$E as ea,p3$Ea as sa,p3$Eb as la,p3$F as na,p3$Fa as ra,p3$Fb as pa,p3$G as ta,p3$Ga as ia,p3$Gb as ca,p3$H as da,p3$Ha as oa,p3$Hb as ha,p3$I as $a,p3$Ia as ba,p3$Ib as ua,p3$J as ma,p3$Ja as xa,p3$Jb as ja,p3$K as ga,p3$Ka as fa,p3$Kb as ka,p3$L as Na,p3$La as va,p3$Lb as Fa,p3$M as ya,p3$Ma as wa,p3$Mb as Aa,p3$N as Ca,p3$Na as Sa,p3$Nb as Ra,p3$O as Ba,p3$Oa as Ta,p3$Ob as Ua,p3$P as qa,p3$Pa as Pa,p3$Pb as Oa,p3$Q as Ja,p3$Qa as Da,p3$Qb as Ea,p3$R as Ga,p3$Ra as Ia,p3$Rb as Ka,p3$S as La,p3$Sa as Ma,p3$Sb as za,p3$T as Ha,p3$Ta as w,p3$Tb as Qa,p3$U as Va,p3$Ua as Wa,p3$Ub as Xa,p3$V as Ya,p3$Va as Za,p3$Vb as _a,p3$W as ae,p3$Wa as ee,p3$Wb as se,p3$X as le,p3$Xa as ne,p3$Xb as re,p3$Y as pe,p3$Ya as te,p3$Yb as ie,p3$Z as ce,p3$Za as de,p3$Zb as oe,p3$_ as he,p3$_a as $e,p3$_b as be,p3$a as ue,p3$aa as me,p3$ab as xe,p3$ac as je,p3$b as ge,p3$ba as fe,p3$bb as ke,p3$c as Ne,p3$ca as ve,p3$cb as Fe,p3$d as ye,p3$da as we,p3$db as x,p3$e as Ae,p3$ea as Ce,p3$eb as A,p3$f as Se,p3$fa as Re,p3$fb as Be,p3$g as Te,p3$ga as Ue,p3$gb as c,p3$h as qe,p3$ha as Pe,p3$hb as Oe,p3$i as Je,p3$ia as De,p3$ib as k,p3$j as Ee,p3$ja as Ge,p3$jb as Ie,p3$k as Ke,p3$ka as Le,p3$kb as Me,p3$l as ze,p3$la as He,p3$lb as Qe,p3$m as Ve,p3$ma as We,p3$mb as Xe,p3$n as Ye,p3$na as Ze,p3$nb as _e,p3$o as as,p3$oa as es,p3$ob as ss,p3$p as ls,p3$pa as ns,p3$pb as rs,p3$q as ps,p3$qa as ts,p3$qb as is,p3$r as cs,p3$ra as ds,p3$rb as os,p3$s as hs,p3$sa as $s,p3$sb as bs,p3$t as us,p3$ta as ms,p3$tb as xs,p3$u as js,p3$ua as gs,p3$ub as fs,p3$v as ks,p3$va as Ns,p3$vb as vs,p3$w as Fs,p3$wa as ys,p3$wb as ws,p3$x as As,p3$xa as Cs,p3$xb as Ss,p3$y as Rs,p3$ya as Bs,p3$yb as Ts,p3$z as Us,p3$za as qs,p3$zb as Ps}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as Ds,p2$b as C,p2$c as Es,p2$d as Gs,p2$e as S}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var a=C(S(),1),j=e=>e===""?"":e.charAt(0).toUpperCase()+e.slice(1),d=e=>e===null?"—":(0,a.jsx)("time",{dateTime:e,children:y(e)}),o=e=>e===null?"—":(0,a.jsx)("span",{className:"k-mono",title:e,children:e.slice(0,12)}),N=e=>e===null?"—":`$${e.toFixed(e<1&&e>0?4:2)}`,R=e=>/^https:\/\/[^\s"'<>]+$/.test(e)?(0,a.jsx)("a",{className:"k-link",href:e,children:e}):e,B=e=>e.length<=300?e:`${e.slice(0,299)}…`,T=e=>e===null||e.name===null?"automation":e.kind==="person"?e.name:`${e.name} (${e.kind})`,U={person:"",mode:" (operating mode)",flow:" (the flow runs on its own)",lead:" (the lead, not a person)",schedule:" (standing order)",carried:" (carried from their release approval)",unknown:" (no person's proof on record)"},q=e=>(0,a.jsx)(w,{word:j(e),tone:e==="done"?"done":e==="failed"?"failed":e==="running"?"live":""});function b({title:e,children:h,...t}){return(0,a.jsxs)("section",{className:"k-sec",...t,children:[(0,a.jsx)("h3",{children:e}),h]})}function Ms({pack:e}){let h=e.task,t=e.ledger.chain,g=e.versions.flatMap(s=>s.runs),v=g.filter(s=>s.role==="builder"||s.role==="repair"),u=e.ledger.entries.filter(s=>s.source!=="request"),m=e.ledger.entries.length-u.length,l=e.result;return(0,a.jsxs)(a.Fragment,{children:[t.ok?null:(0,a.jsxs)(A,{children:["The audit log's chain doesn't verify: ",t.problem??"an entry changed",". The record below is what the log holds now."]}),(0,a.jsx)(b,{title:"Summary",children:(0,a.jsx)(x,{rows:[["Task",(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"k-mono",children:h.id}),h.project===null?"":` · ${h.project}`]})],["Status",q(h.state)],["Approval rules",e.rules===null?"None: every plan asks a person":(0,a.jsxs)(a.Fragment,{children:[j(e.rules.now),e.rules.changes.length===0?null:(0,a.jsx)(k,{summary:`${e.rules.changes.length} ${e.rules.changes.length===1?"change":"changes"}`,children:(0,a.jsx)("ul",{className:"h-notes",children:e.rules.changes.slice(-5).map(s=>(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"k-num k-muted",children:d(s.at)}),(0,a.jsxs)("span",{children:[s.by,": ",s.change??""]})]},s.id))})})]})],["Agents",e.totals.runs===0?"None ran":`${e.totals.runs} ${e.totals.runs===1?"run":"runs"} · ${N(e.totals.costUsd)}`],["Prepared",(0,a.jsxs)(a.Fragment,{children:[d(e.generatedAt)," for ",e.generatedBy]})],["Audit log",t.ok?(0,a.jsxs)("span",{"data-evidence-chain":"ok",children:["Chain verified · ",t.entries," entries · head ",o(t.head),e.ledger.checkpoint===null?"":` · last checkpoint at entry #${e.ledger.checkpoint.through}`]}):(0,a.jsxs)("span",{"data-evidence-chain":"broken",children:["Chain broken: ",t.problem??"it doesn't verify"]})]]})}),e.versions.map((s,i)=>{let n=s.scope,$=n?.approved??null,F=n===null?[]:n.approvals.filter(r=>r.digest===($?.digest??n.digest)),p=[["Filed",(0,a.jsxs)(a.Fragment,{children:[d(s.filedAt)," by ",T(s.filedBy)]})]];return n===null?p.push(["Plan","None written"]):(p.push(["Goal",n.goal]),n.outOfScope&&p.push(["Not in scope",n.outOfScope]),n.touches.length&&p.push(["Touches",(0,a.jsx)(a.Fragment,{children:n.touches.map((r,f)=>(0,a.jsxs)("span",{children:[f>0?", ":"",(0,a.jsx)("span",{className:"k-mono",children:r})]},r))})]),n.acceptance.length&&p.push(["Requirements",(0,a.jsx)("ol",{className:"h-ol",children:n.acceptance.map(r=>(0,a.jsx)("li",{children:r.statement},r.id))})]),n.budgetUsd!==null&&p.push(["Budget",N(n.budgetUsd)]),n.writtenBy.length&&p.push(["Plan written by",[...new Set(n.writtenBy.map(r=>r.author))].join(", ")]),p.push(["Approved",$===null?"Not approved":(0,a.jsxs)(a.Fragment,{children:[$.by,U[$.basis]," · ",d($.at),$.current?"":" · the plan changed after this"]})]),F.length>1&&p.push(["Approvals",(0,a.jsx)(a.Fragment,{children:F.map((r,f)=>(0,a.jsxs)("span",{children:[f>0?(0,a.jsx)("br",{}):null,r.approver," · ",d(r.at)]},`${r.approver}-${r.at}`))})]),p.push(["Plan version",o(n.digest)])),(0,a.jsxs)(b,{title:e.versions.length===1||i===0?"Request and approval":`Revision ${i}`,"data-evidence-version":s.id,children:[e.versions.length===1?null:(0,a.jsx)("p",{className:"k-note k-mono",children:s.id}),(0,a.jsx)(x,{rows:p})]},s.id)}),(0,a.jsxs)(b,{title:"Agents",children:[g.length===0?(0,a.jsx)(c,{children:"No agent has run for this task yet."}):(0,a.jsxs)("div",{className:"h-table",role:"table","aria-label":"Agents",children:[(0,a.jsxs)("div",{className:"h-tr h-th",role:"row",children:[(0,a.jsx)("span",{role:"columnheader",children:"Run"}),(0,a.jsx)("span",{role:"columnheader",children:"Role"}),(0,a.jsx)("span",{role:"columnheader",children:"Agent"}),(0,a.jsx)("span",{role:"columnheader",children:"Outcome"}),(0,a.jsx)("span",{role:"columnheader",children:"Spend"}),(0,a.jsx)("span",{role:"columnheader",children:"Finished"}),(0,a.jsx)("span",{role:"columnheader",children:"Commit"})]}),g.map(s=>(0,a.jsxs)("div",{className:"h-tr",role:"row",children:[(0,a.jsx)("span",{role:"cell",children:(0,a.jsxs)("a",{className:"k-mono k-link",href:`/r/${s.id}?record=1`,children:["#",s.id]})}),(0,a.jsx)("span",{role:"cell",children:s.role}),(0,a.jsxs)("span",{role:"cell",children:[s.agent,s.model?(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("span",{className:"k-mono",children:s.model})]}):null]}),(0,a.jsx)("span",{role:"cell",children:s.outcome===null?"Running":j(s.outcome)}),(0,a.jsx)("span",{role:"cell",className:"k-num",children:N(s.costUsd)}),(0,a.jsx)("span",{role:"cell",children:d(s.finishedAt)}),(0,a.jsx)("span",{role:"cell",children:o(s.head)})]},s.id))]}),v.length===0?null:(0,a.jsx)(k,{summary:"Changed files",children:(0,a.jsx)("div",{className:"h-changes",children:v.map(s=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"k-note",children:["Run #",s.id,s.diff===null?"":(0,a.jsxs)(a.Fragment,{children:[" · diff ",o(s.diff.sha256),s.diff.complete?"":" (partial)"]})]}),s.changedFiles===null?(0,a.jsx)(c,{children:"Its changed files couldn't be read."}):s.changedFiles.length===0?(0,a.jsx)(c,{children:"No files changed."}):(0,a.jsx)("ul",{className:"h-files",children:s.changedFiles.map(i=>(0,a.jsx)("li",{children:(0,a.jsx)("span",{className:"k-mono",children:i})},i))})]},s.id))})})]}),(0,a.jsx)(b,{title:"Result","data-evidence-result":"",children:l===null?(0,a.jsx)(c,{children:"No result yet."}):(0,a.jsx)(x,{rows:[["Checks",(0,a.jsxs)(a.Fragment,{children:[l.checks.detail,l.checks.command?(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("span",{className:"k-mono",children:l.checks.command})]}):null]})],["Completed",l.completedBy===null?"Not yet":(0,a.jsxs)(a.Fragment,{children:[l.completedBy," · ",d(l.completedAt)]})],["Published",l.publication===null?"Not published":(0,a.jsxs)(a.Fragment,{children:[j(l.publication.state),l.publication.prUrl?(0,a.jsxs)(a.Fragment,{children:[" · ",R(l.publication.prUrl)]}):null,l.publication.remoteState?` · ${l.publication.remoteState.toLowerCase()}`:""]})],["Commit",(0,a.jsxs)(a.Fragment,{children:[o(l.base)," → ",o(l.head)]})],...l.caveats.length?[["Caveats",(0,a.jsx)(a.Fragment,{children:l.caveats.map((s,i)=>(0,a.jsxs)("span",{children:[i>0?(0,a.jsx)("br",{}):null,s]},i))})]]:[]]})}),(0,a.jsxs)(b,{title:"Audit log",children:[u.length===0?(0,a.jsx)(c,{children:"No entries."}):(0,a.jsx)("ul",{className:"h-log",children:[...u].reverse().map(s=>(0,a.jsxs)("li",{"data-ledger-id":s.id,children:[(0,a.jsx)("span",{className:"k-num k-muted",children:d(s.at)}),(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{children:s.actor})," ",s.action,s.detail?(0,a.jsxs)("span",{className:"k-muted",children:[" · ",B(s.detail)]}):null]}),(0,a.jsx)("span",{className:"k-muted",children:s.outcome}),(0,a.jsx)("span",{className:"h-seal",children:o(s.seal?.hash??null)})]},s.id))}),m>0?(0,a.jsx)(c,{children:`Plus ${m} ${m===1?"request":"requests"} made through the console (accepted or refused), listed in the JSON.`}):null,e.ledger.truncated?(0,a.jsx)(c,{children:`This record holds ${u.length} of the task's entries and the newest ${m} requests; the audit log export has the rest.`}):null]}),(0,a.jsxs)("p",{className:"k-note h-foot",children:["Record digest ",(0,a.jsx)("span",{className:"k-mono",children:e.digest}),". Each entry's seal can be rechecked from the JSON: ",(0,a.jsx)("span",{className:"k-mono",children:e.ledger.recipe}),"."]})]})}export{Ms as a};
@@ -1,2 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p3$$ as U,p3$$a as q,p3$$b as P,p3$A as z,p3$Aa as A,p3$Ab as L,p3$B as R,p3$Ba as C,p3$Bb as J,p3$C as O,p3$Ca as B,p3$Cb as G,p3$D as M,p3$Da as Y,p3$Db as E,p3$E as F,p3$Ea as H,p3$Eb as K,p3$F as Q,p3$Fa as T,p3$Fb as V,p3$G as r,p3$Ga as W,p3$Gb as X,p3$H as Z,p3$Ha as _,p3$Hb as aa,p3$I as sa,p3$Ia as ea,p3$Ib as ta,p3$J as pa,p3$Ja as na,p3$Jb as ra,p3$K as $a,p3$Ka as ba,p3$Kb as ua,p3$L as ia,p3$La as oa,p3$Lb as da,p3$M as la,p3$Ma as ma,p3$Mb as ca,p3$N as xa,p3$Na as ha,p3$Nb as ya,p3$O as fa,p3$Oa as ga,p3$Ob as ja,p3$P as va,p3$Pa as Sa,p3$Pb as ka,p3$Q as Na,p3$Qa as wa,p3$Qb as Ia,p3$R as Da,p3$Ra as g,p3$Rb as Ua,p3$S as qa,p3$Sa as Pa,p3$Sb as za,p3$T as Aa,p3$Ta as La,p3$Tb as Ra,p3$U as Ca,p3$Ua as Ja,p3$Ub as j,p3$V as Oa,p3$Va as Ba,p3$Vb as Ga,p3$W as Ma,p3$Wa as Ya,p3$Wb as Ea,p3$X as Fa,p3$Xa as Ha,p3$Xb as Ka,p3$Y as Qa,p3$Ya as Ta,p3$Yb as Va,p3$Z as Wa,p3$Za as Xa,p3$Zb as Za,p3$_ as _a,p3$_a as as,p3$_b as ss,p3$a as es,p3$aa as ts,p3$ab as ps,p3$ac as ns,p3$b as rs,p3$ba as $s,p3$bb as bs,p3$c as us,p3$ca as is,p3$cb as os,p3$d as ds,p3$da as ls,p3$db as ms,p3$e as $,p3$ea as cs,p3$eb as xs,p3$f as hs,p3$fa as ys,p3$fb as fs,p3$g as gs,p3$ga as js,p3$gb as vs,p3$h as Ss,p3$ha as ks,p3$hb as Ns,p3$i as ws,p3$ia as Is,p3$ib as Ds,p3$j as Us,p3$ja as qs,p3$jb as Ps,p3$k as zs,p3$ka as As,p3$kb as Ls,p3$l as Rs,p3$la as Cs,p3$lb as Js,p3$m as Os,p3$ma as Bs,p3$mb as Gs,p3$n as Ms,p3$na as Ys,p3$nb as Es,p3$o as Fs,p3$oa as Hs,p3$ob as Ks,p3$p as Qs,p3$pa as Ts,p3$pb as Vs,p3$q as Ws,p3$qa as Xs,p3$qb as Zs,p3$r as _s,p3$ra as ae,p3$rb as se,p3$s as ee,p3$sa as te,p3$sb as pe,p3$t as ne,p3$ta as re,p3$tb as $e,p3$u as be,p3$ua as ue,p3$ub as ie,p3$v as oe,p3$va as de,p3$vb as le,p3$w as me,p3$wa as ce,p3$wb as xe,p3$x as he,p3$xa as ye,p3$xb as fe,p3$y as ge,p3$ya as h,p3$yb as je,p3$z as ve,p3$za as Se,p3$zb as ke}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as Ie,p2$b as v,p2$c as De,p2$d as Ue,p2$e as S}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var a=v(S(),1),m=s=>`toolroll:steer-draft:${s}`;function i(){return{text:"",key:typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`k${Date.now().toString(36)}${Math.random().toString(36).slice(2,12)}`,submitted:!1}}function k(s){try{let e=JSON.parse(sessionStorage.getItem(m(s))??"null");return e===null||typeof e.text!="string"||typeof e.key!="string"?i():new URLSearchParams(location.search).get("sent")===e.key?(sessionStorage.removeItem(m(s)),i()):{text:e.text,key:e.key,submitted:e.submitted===!0}}catch{return i()}}function y(s,e){try{e.text===""&&!e.submitted?sessionStorage.removeItem(m(s)):sessionStorage.setItem(m(s),JSON.stringify(e))}catch{}}function ze({controls:s,back:e}){let t=s.pause;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border pt-3 phone:px-4","data-agent-controls":s.send??"none",children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 text-caption text-muted-foreground","data-agent-capability":!0,children:s.words}),t!==null&&(t.state==="paused"?(0,a.jsxs)(r,{action:t.action,"data-agent-resume":!0,children:[(0,a.jsx)("input",{type:"hidden",name:"run",value:String(t.run)}),(0,a.jsx)("input",{type:"hidden",name:"request",value:t.requests[2]}),(0,a.jsx)("input",{type:"hidden",name:"mode",value:"resume"}),(0,a.jsx)("input",{type:"hidden",name:"return",value:e}),(0,a.jsx)($,{type:"submit",variant:"outline",size:"sm",className:"h-9 phone:h-11",children:"Resume"})]}):(0,a.jsxs)(r,{action:t.action,"data-agent-pause":!0,children:[(0,a.jsx)("input",{type:"hidden",name:"run",value:String(t.run)}),(0,a.jsx)("input",{type:"hidden",name:"request",value:t.requests[0]}),(0,a.jsx)("input",{type:"hidden",name:"return",value:e}),(0,a.jsx)($,{type:"submit",variant:"outline",size:"sm",className:"h-9 phone:h-11",disabled:t.state==="pausing",children:t.state==="pausing"?"Pausing…":"Pause"})]})),s.stop!==null&&(0,a.jsxs)(r,{action:s.stop.action,"data-agent-stop":s.stop.run,children:[(0,a.jsx)("input",{type:"hidden",name:"run",value:String(s.stop.run)}),(0,a.jsx)("input",{type:"hidden",name:"return",value:e}),(0,a.jsx)($,{type:"submit",variant:"outline",size:"sm",className:"h-9 phone:h-11",children:s.stop.label})]})]})}function Ae({steer:s,controls:e,back:t,label:p="A note for the agent",note:c}){let[n,b]=h(N,()=>k(s.run)),o=d=>b(l=>{let u=l.submitted?{...i(),text:d}:{...l,text:d};return y(s.run,u),u}),x=e.pause!==null&&e.pause.state===null?e.pause:null,f=n.text.trim()==="";return(0,a.jsxs)(r,{action:s.action,"data-steer-note":s.run,onSubmit:d=>{if(f){d.preventDefault();return}b(l=>{let u={...l,submitted:!0};return y(s.run,u),u})},children:[(0,a.jsx)("input",{type:"hidden",name:"return",value:t}),(0,a.jsx)("input",{type:"hidden",name:"run",value:String(s.run)}),(0,a.jsx)("input",{type:"hidden",name:"key",value:n.key}),x!==null&&(0,a.jsx)("input",{type:"hidden",name:"request",value:`steer-${n.key}`}),(0,a.jsx)(j,{id:`steer-note-${s.run}`,label:p,placeholder:p,name:"note",maxLength:4e3,submit:!0,value:n.text,onChange:o,onSend:()=>{},sendLabel:"Send",note:c,before:x!==null?(0,a.jsx)(g,{sm:!0,type:"submit",formAction:x.action,label:"Pause and send",disabled:f,"data-steer-pause-send":""}):void 0})]})}function Le({runs:s,action:e,back:t}){let[p,c]=h(w,()=>{for(let b of s){let o=k(b);if(o.text.trim()!=="")return{run:b,draft:o}}return null});if(p===null)return null;let n=()=>{y(p.run,{...i(),text:""}),c(null)};return(0,a.jsxs)(r,{action:e,className:"flex flex-col gap-2 border-t border-border pt-3","data-steer-unsent":p.run,children:[(0,a.jsx)("p",{className:"text-caption font-medium text-muted-foreground",children:"Your note wasn't sent: its attempt ended first."}),(0,a.jsx)("p",{className:"rounded-md border border-border bg-muted px-3 py-2 text-body whitespace-pre-wrap break-words","data-steer-unsent-text":!0,children:p.draft.text}),(0,a.jsx)("input",{type:"hidden",name:"note",value:p.draft.text}),(0,a.jsx)("input",{type:"hidden",name:"after",value:String(p.run)}),(0,a.jsx)("input",{type:"hidden",name:"key",value:p.draft.key}),(0,a.jsx)("input",{type:"hidden",name:"return",value:t}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)($,{type:"submit",className:"h-11 w-auto",children:"Send to the next attempt"}),(0,a.jsx)($,{type:"button",variant:"ghost",className:"h-11 w-auto",onClick:n,children:"Discard"})]})]})}function N(){return{text:"",key:"",submitted:!1}}function w(){return null}export{i as a,k as b,y as c,ze as d,Ae as e,Le as f};
@@ -1,2 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p6$a as V,p6$b as y}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p11$A as Z,p11$B as aa,p11$C as sa,p11$D as ea,p11$E as ta,p11$F as na,p11$G as ia,p11$H as ra,p11$I as T,p11$J as da,p11$a as la,p11$b as ca,p11$c as pa,p11$d as oa,p11$e as I,p11$f as ha,p11$g as ma,p11$h as $a,p11$i as ba,p11$j as xa,p11$k as fa,p11$l as ua,p11$m as ka,p11$n as ga,p11$o as ja,p11$p as ya,p11$q as wa,p11$r as va,p11$s as Na,p11$t as Wa,p11$u as Ca,p11$v as Sa,p11$w as Aa,p11$x as Da,p11$y as za,p11$z as Fa}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p3$$ as Ra,p3$$a as Ma,p3$$b as Ga,p3$A as Ha,p3$Aa as Ea,p3$Ab as Ba,p3$B as Oa,p3$Ba as Pa,p3$Bb as Qa,p3$C as Ua,p3$Ca as qa,p3$Cb as Ja,p3$D as Ka,p3$Da as La,p3$Db as _a,p3$E as Va,p3$Ea as Xa,p3$Eb as Ya,p3$F as Za,p3$Fa as as,p3$Fb as ss,p3$G as W,p3$Ga as es,p3$Gb as ts,p3$H as ns,p3$Ha as is,p3$Hb as rs,p3$I as g,p3$Ia as ds,p3$Ib as ls,p3$J as cs,p3$Ja as ps,p3$Jb as os,p3$K as hs,p3$Ka as ms,p3$Kb as R,p3$L as $s,p3$La as bs,p3$Lb as xs,p3$M as fs,p3$Ma as us,p3$Mb as ks,p3$N as gs,p3$Na as js,p3$Nb as ys,p3$O as ws,p3$Oa as vs,p3$Ob as Ns,p3$P as Ws,p3$Pa as Cs,p3$Pb as Ss,p3$Q as As,p3$Qa as M,p3$Qb as Ds,p3$R as zs,p3$Ra as w,p3$Rb as Fs,p3$S as Ts,p3$Sa as j,p3$Sb as Is,p3$T as Rs,p3$Ta as G,p3$Tb as Ms,p3$U as Gs,p3$Ua as Hs,p3$Ub as Es,p3$V as Bs,p3$Va as Os,p3$Vb as Ps,p3$W as Qs,p3$Wa as Us,p3$Wb as qs,p3$X as Js,p3$Xa as Ks,p3$Xb as Ls,p3$Y as _s,p3$Ya as Vs,p3$Yb as Xs,p3$Z as Ys,p3$Za as Zs,p3$Zb as ae,p3$_ as se,p3$_a as ee,p3$_b as te,p3$a as x,p3$aa as ne,p3$ab as ie,p3$ac as re,p3$b as de,p3$ba as le,p3$bb as ce,p3$c as pe,p3$ca as oe,p3$cb as he,p3$d as me,p3$da as $e,p3$db as be,p3$e as f,p3$ea as xe,p3$eb as fe,p3$f as ue,p3$fa as ke,p3$fb as ge,p3$g as je,p3$ga as ye,p3$gb as we,p3$h as ve,p3$ha as Ne,p3$hb as We,p3$i as Ce,p3$ia as Se,p3$ib as Ae,p3$j as De,p3$ja as ze,p3$jb as Fe,p3$k as Te,p3$ka as Ie,p3$kb as Re,p3$l as Me,p3$la as Ge,p3$lb as He,p3$m as Ee,p3$ma as Be,p3$mb as Oe,p3$n as Pe,p3$na as Qe,p3$nb as Ue,p3$o as qe,p3$oa as Je,p3$ob as Ke,p3$p as Le,p3$pa as _e,p3$pb as Ve,p3$q as Xe,p3$qa as Ye,p3$qb as Ze,p3$r as at,p3$ra as st,p3$rb as et,p3$s as tt,p3$sa as nt,p3$sb as it,p3$t as rt,p3$ta as C,p3$tb as dt,p3$u as lt,p3$ua as ct,p3$ub as pt,p3$v as ot,p3$va as ht,p3$vb as mt,p3$w as $t,p3$wa as bt,p3$wb as xt,p3$x as ft,p3$xa as ut,p3$xb as kt,p3$y as gt,p3$ya as jt,p3$yb as yt,p3$z as wt,p3$za as vt,p3$zb as Nt}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as St,p2$b as S,p2$c as H,p2$d as At,p2$e as E}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var b=S(H(),1),s=S(E(),1),A=a=>a.charAt(0).toUpperCase()+a.slice(1);async function B(a,d,m,l){let o=new URLSearchParams({csrf:m});d==="confirm"&&l&&o.set("confirm","yes");try{let r=await fetch(`/chat/proposal/${a.id}/${d}`,{method:"POST",body:o,credentials:"same-origin",headers:R({accept:"application/json"}),signal:AbortSignal.timeout(2e4)});if(!r.headers.get("content-type")?.includes("application/json"))return{ok:!1,said:"That didn't go through. Reload the conversation and try again."};let t=await r.json(),$=typeof t=="object"&&t!==null?t:{};return{ok:$.ok===!0,said:typeof $.said=="string"?A($.said):"Done."}}catch{return{ok:!1,said:"That didn't go through. Check your connection and try again."}}}function Q({card:a}){return(0,s.jsxs)("section",{"data-view":"chat-card","data-action-card":a.id,"data-card-kind":"data",className:"so-chat-card mt-3 overflow-hidden bg-card text-card-foreground",children:[(0,s.jsx)("header",{className:"px-4 pt-3 pb-1 font-semibold",children:a.label}),(0,s.jsx)("div",{className:"px-4 py-2",children:(0,s.jsx)(g,{blocks:a.body,className:"so-card-body"})}),a.links.length>0&&(0,s.jsx)("footer",{className:"flex flex-wrap gap-2 px-4 pb-3.5 pt-1",children:a.links.map(d=>(0,s.jsx)(j,{variant:"ghost",sm:!0,href:d.href,label:d.label},d.href))})]})}function U({card:a,csrf:d,onChanged:m}){if(a.data===!0)return(0,s.jsx)(Q,{card:a});let[l,o]=(0,b.useState)(null),[r,t]=(0,b.useState)(!1),$=C(),h=(0,b.useId)(),u=async c=>{o(c);let i=await B(a,c,d,r);c==="confirm"?(i.ok?y.success:y.error)(i.said):i.ok||y.error(i.said),o(null),m()},e=a.primary,k=e?.kind==="confirm"&&e.irreversible&&!r,n=a.state==="confirmed"||a.state==="refused"||a.state==="dismissed"||a.state==="expired";return(0,s.jsxs)("section",{"data-view":"chat-card","data-action-card":a.id,"data-card-kind":a.kind,"data-card-state":a.state,className:x("so-chat-card mt-3 overflow-hidden bg-card text-card-foreground",n&&"opacity-90"),children:[(0,s.jsxs)("header",{className:"flex items-center gap-2 px-4 pt-3 pb-1 font-semibold",children:[a.state==="pending"&&e!==null&&(0,s.jsx)("span",{className:"so-needs-you",children:"Needs you"}),(0,s.jsx)("span",{className:"so-chat-card-title min-w-0 flex-1 truncate",children:a.label}),a.state==="confirmed"&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-success",children:[(0,s.jsx)(I,{className:"size-3.5","aria-hidden":"true"}),"Done"]}),a.state==="refused"&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-destructive",children:[(0,s.jsx)(T,{className:"size-3.5","aria-hidden":"true"}),"Not done"]})]}),a.body.length>0&&(0,s.jsx)("div",{className:"px-4 py-2",children:(0,s.jsx)(g,{blocks:a.body,className:"so-card-body"})}),(0,s.jsxs)("footer",{className:"flex flex-col gap-2 px-4 pb-3.5 pt-1",children:[a.said!==null&&(0,s.jsx)("p",{className:x("text-body",a.state==="refused"?"text-destructive":"text-success"),children:A(a.said)}),a.links.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.links.map(c=>(0,s.jsx)(f,{asChild:!0,variant:"outline",size:"sm",children:(0,s.jsx)("a",{href:c.href,children:c.label})},c.href))}),a.note!==null&&(0,s.jsx)("p",{className:"text-body text-muted-foreground",children:a.note}),e?.kind==="confirm"&&e.irreversible&&(0,s.jsxs)("label",{htmlFor:h,className:"flex items-center gap-2 text-body",children:[(0,s.jsx)("input",{id:h,type:"checkbox",checked:r,onChange:c=>t(c.target.checked),className:"size-4 accent-primary"}),"I understand this cannot be undone"]}),(e!==null||a.dismissable)&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e?.kind==="link"&&(0,s.jsx)(f,{asChild:!0,size:"sm",children:(0,s.jsx)("a",{href:e.href,children:e.label})}),e?.kind==="confirm"&&e.native&&(0,s.jsxs)(W,{action:`/chat/proposal/${a.id}/confirm`,children:[(0,s.jsx)("input",{type:"hidden",name:"return",value:$}),e.irreversible&&r&&(0,s.jsx)("input",{type:"hidden",name:"confirm",value:"yes"}),(0,s.jsx)(f,{type:"submit",size:"sm",disabled:k,children:e.label})]}),e?.kind==="confirm"&&!e.native&&(0,s.jsx)(f,{size:"sm",disabled:l!==null||k,onClick:()=>{u("confirm")},"data-card-confirm":!0,children:l==="confirm"?"Working…":e.label}),a.dismissable&&(0,s.jsx)(f,{variant:"ghost",size:"sm",disabled:l!==null,onClick:()=>{u("dismiss")},"data-card-dismiss":!0,children:l==="dismiss"?"Dismissing…":"Dismiss"})]})]})]})}var q={task:["Task","plus"],cancel:["Task","x"],task_action:["Task","file"],repair:["Task","file"],scope:["Scope","file"],review:["Review","file"],steer:["Guidance","file"],next:["Queue","send"],reserve:["Worker","file"],hold:["Hold","stop"],unhold:["Hold","send"],answer:["Decision","check"],agents:["Agents","file"],control:["Control","file"],action:["Action","file"]};function J(a){switch(a.state){case"pending":return a.primary!==null||a.dismissable?{word:"Needs you",tone:"needs"}:{word:"Waiting",tone:""};case"drafting":return{word:"Drafting",tone:""};case"confirming":return{word:"Confirming",tone:"live"};case"confirmed":return{word:"Done",tone:"done"};case"refused":return{word:"Not done",tone:"failed"};case"dismissed":return{word:"Dismissed",tone:""};default:return{word:"Expired",tone:""}}}function K({card:a,csrf:d,onChanged:m}){if(a.data===!0)return(0,s.jsxs)("li",{"data-view":"chat-card","data-action-card":a.id,"data-card-kind":"data",className:"lc-card lc-data",children:[(0,s.jsx)("p",{className:"lc-data-title",children:a.label}),(0,s.jsx)(g,{blocks:a.body,className:"lc-card-body"}),a.links.length>0&&(0,s.jsx)("div",{className:"lc-card-acts",children:a.links.map(p=>(0,s.jsx)(j,{variant:"ghost",sm:!0,href:p.href,label:p.label},p.href))})]});let[l,o]=(0,b.useState)(null),[r,t]=(0,b.useState)(!1),$=C(),[h,u]=(0,b.useState)(null),e=(0,b.useId)(),k=async p=>{o(p),u(null);let F=await B(a,p,d,r);u({ok:F.ok,words:F.said}),o(null),m()},n=a.primary,c=n?.kind==="confirm"&&n.irreversible&&!r,i=a.state==="pending"&&(n!==null||a.dismissable),[O,P]=q[a.kind]??["Action","file"],D=J(a),[v,...N]=a.links,z=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"lc-card-ic","aria-hidden":"true",children:(0,s.jsx)(M,{name:P,small:!0})}),(0,s.jsxs)("span",{className:"lc-card-t",children:[(0,s.jsx)("span",{className:"lc-card-v",children:O}),(0,s.jsx)("span",{className:"lc-card-n",children:a.label})]}),(0,s.jsx)(G,{word:D.word,tone:D.tone})]});return(0,s.jsxs)("li",{"data-view":"chat-card","data-action-card":a.id,"data-card-kind":a.kind,"data-card-state":a.state,className:x("lc-card",i&&"open"),children:[!i&&v!==void 0?(0,s.jsx)("a",{className:"lc-card-row",href:v.href,title:v.label,children:z}):(0,s.jsx)("div",{className:"lc-card-row",children:z}),(i||a.said!==null||h!==null||a.note!==null||N.length>0)&&(0,s.jsxs)("div",{className:"lc-card-more",children:[i&&a.body.length>0&&(0,s.jsx)(g,{blocks:a.body,className:"lc-card-body"}),a.said!==null&&(0,s.jsx)("p",{className:x("lc-card-said",a.state==="refused"&&"bad"),children:A(a.said)}),h!==null&&(0,s.jsx)("p",{className:x("lc-card-said",!h.ok&&"bad"),role:h.ok?"status":"alert",children:h.ok?h.words:`${h.words} Nothing changed.`}),a.note!==null&&(0,s.jsx)("p",{className:"lc-card-note",children:a.note}),n?.kind==="confirm"&&n.irreversible&&i&&(0,s.jsxs)("label",{htmlFor:e,className:"lc-card-arm",children:[(0,s.jsx)("input",{id:e,type:"checkbox",checked:r,onChange:p=>t(p.target.checked)}),"I understand this cannot be undone"]}),(i||N.length>0)&&(0,s.jsxs)("div",{className:"lc-card-acts",children:[i&&n?.kind==="link"&&(0,s.jsx)(j,{variant:"primary",sm:!0,href:n.href,label:n.label}),i&&n?.kind==="confirm"&&n.native&&(0,s.jsxs)(W,{action:`/chat/proposal/${a.id}/confirm`,children:[(0,s.jsx)("input",{type:"hidden",name:"return",value:$}),n.irreversible&&r&&(0,s.jsx)("input",{type:"hidden",name:"confirm",value:"yes"}),(0,s.jsx)(w,{type:"submit",variant:"primary",sm:!0,disabled:c,label:n.label})]}),i&&n?.kind==="confirm"&&!n.native&&(0,s.jsx)(w,{variant:"primary",sm:!0,disabled:l!==null||c,busy:l==="confirm"?"Working…":!1,onClick:()=>{k("confirm")},"data-card-confirm":!0,label:n.label}),i&&a.dismissable&&(0,s.jsx)(w,{variant:"ghost",sm:!0,disabled:l!==null,busy:l==="dismiss"?"Dismissing…":!1,onClick:()=>{k("dismiss")},"data-card-dismiss":!0,label:"Dismiss"}),(i?a.links:N).map(p=>(0,s.jsx)(j,{variant:"ghost",sm:!0,href:p.href,label:p.label},p.href))]})]})]})}function It({cards:a,csrf:d,onChanged:m,readOnly:l=!1,look:o="card"}){let r=t=>l?{...t,primary:null,dismissable:!1}:t;return o==="row"?(0,s.jsx)("ul",{className:"lc-cards so-action-cards","aria-label":"What the lead proposed",children:a.map(t=>(0,s.jsx)(K,{card:r(t),csrf:d,onChanged:m},`${t.id}:${t.state}`))}):(0,s.jsx)("div",{className:"so-action-cards",children:a.map(t=>(0,s.jsx)(U,{card:r(t),csrf:d,onChanged:m},`${t.id}:${t.state}`))})}var Rt={lead:[{command:"new",hint:"File a new task",text:"File a task: "},{command:"flow",hint:"Make a flow for how work moves",text:"Make a flow for "},{command:"status",hint:"What needs you right now",text:"What needs my attention right now?"},{command:"next",hint:"What to work on next",text:"What should we work on next?"}],task:[{command:"status",hint:"Where this task stands",text:"Where does this task stand?"},{command:"next",hint:"Take the next step",text:"Move this forward"},{command:"revise",hint:"Send back",text:"Send it back: "},{command:"diff",hint:"Walk through the changes",text:"Walk me through the changes file by file."},{command:"log",hint:"What the checks said",text:"What does the check log say?"},{command:"steer",hint:"Send the agent a note",text:"Note for the agent: "},{command:"stop",hint:"Stop the running attempt",text:"Stop this task."},{command:"resume",hint:"Resume a stopped attempt",text:"Resume this task."},{command:"complete",hint:"Accept the result",text:"Accept this result."}],result:[{command:"summary",hint:"What changed",text:"Summarize what changed."},{command:"diff",hint:"Walk through the changes",text:"Walk me through the changes file by file."},{command:"log",hint:"What the checks said",text:"What does the check log say?"},{command:"risks",hint:"Anything to worry about",text:"Are there any risks in this change?"},{command:"revise",hint:"Send back",text:"Send it back: "},{command:"complete",hint:"Accept the result",text:"Accept this result."}],tasks:[{command:"new",hint:"File a new task here",text:"File a task: "},{command:"flow",hint:"Make a flow for this project",text:"Make a flow for "},{command:"status",hint:"What needs you here",text:"What needs my attention here?"},{command:"next",hint:"What to build next",text:"What should we build next?"}]};export{It as a,Rt as b};
@@ -1,2 +0,0 @@
1
- /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
- import{p9$a as F,p9$b as I,p9$c as T,p9$d as M,p9$e as O,p9$f as D,p9$g as E,p9$h as G,p9$i as K,p9$j as Q,p9$k as X,p9$l as c,p9$m as d,p9$n as Y,p9$o as _,p9$p as z,p9$q as H,p9$r as J,p9$s as V,p9$t as u}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p12$a as f,p12$b as h}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p3$$ as ta,p3$$a as pa,p3$$b as la,p3$A as na,p3$Aa as $a,p3$Ab as ra,p3$B as ia,p3$Ba as ba,p3$Bb as oa,p3$C as ca,p3$Ca as da,p3$Cb as ua,p3$D as fa,p3$Da as ha,p3$Db as ma,p3$E as ga,p3$Ea as ka,p3$Eb as xa,p3$F as ja,p3$Fa as va,p3$Fb as wa,p3$G as ya,p3$Ga as Ua,p3$Gb as Na,p3$H as Aa,p3$Ha as qa,p3$Hb as La,p3$I as Pa,p3$Ia as Ba,p3$Ib as Sa,p3$J as Wa,p3$Ja as Ca,p3$Jb as Ra,p3$K as Fa,p3$Ka as Ia,p3$Kb as m,p3$L as Ta,p3$La as g,p3$Lb as Ma,p3$M as Oa,p3$Ma as k,p3$Mb as Da,p3$N as Ea,p3$Na as Ga,p3$Nb as Ka,p3$O as Qa,p3$Oa as Xa,p3$Ob as Ya,p3$P as _a,p3$Pa as za,p3$Pb as Ha,p3$Q as Ja,p3$Qa as Va,p3$Qb as Za,p3$R as as,p3$Ra as ss,p3$Rb as es,p3$S as ts,p3$Sa as ps,p3$Sb as ls,p3$T as ns,p3$Ta as $s,p3$Tb as rs,p3$U as is,p3$Ua as bs,p3$Ub as os,p3$V as cs,p3$Va as ds,p3$Vb as us,p3$W as fs,p3$Wa as hs,p3$Wb as ms,p3$X as gs,p3$Xa as ks,p3$Xb as xs,p3$Y as js,p3$Ya as vs,p3$Yb as ws,p3$Z as ys,p3$Za as Us,p3$Zb as Ns,p3$_ as As,p3$_a as qs,p3$_b as Ls,p3$a as Ps,p3$aa as Bs,p3$ab as Ss,p3$ac as Ws,p3$b as Cs,p3$ba as Rs,p3$bb as Fs,p3$c as Is,p3$ca as Ts,p3$cb as Ms,p3$d as Os,p3$da as Ds,p3$db as x,p3$e as Es,p3$ea as Gs,p3$eb as Ks,p3$f as Qs,p3$fa as Xs,p3$fb as Ys,p3$g as _s,p3$ga as zs,p3$gb as Hs,p3$h as Js,p3$ha as Vs,p3$hb as Zs,p3$i as j,p3$ia as ae,p3$ib as se,p3$j as ee,p3$ja as te,p3$jb as pe,p3$k as le,p3$ka as ne,p3$kb as $e,p3$l as re,p3$la as ie,p3$lb as be,p3$m as oe,p3$ma as ce,p3$mb as de,p3$n as ue,p3$na as v,p3$nb as fe,p3$o as he,p3$oa as me,p3$ob as ge,p3$p as ke,p3$pa as xe,p3$pb as je,p3$q as ve,p3$qa as we,p3$qb as ye,p3$r as Ue,p3$ra as Ne,p3$rb as Ae,p3$s as qe,p3$sa as Le,p3$sb as Pe,p3$t as Be,p3$ta as Se,p3$tb as We,p3$u as Ce,p3$ua as Re,p3$ub as Fe,p3$v as Ie,p3$va as Te,p3$vb as Me,p3$w as Oe,p3$wa as De,p3$wb as Ee,p3$x as Ge,p3$xa as Ke,p3$xb as Qe,p3$y as Xe,p3$ya as Ye,p3$yb as _e,p3$z as ze,p3$za as He,p3$zb as Je}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";import{p2$a as at,p2$b as w,p2$c as st,p2$d as et,p2$e as y}from"./chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js";var U=15e3,$t=600,L=/^[0-9a-f]{32,64}$/,P=/^[0-9a-f]{32}$/,B=/^[0-9]{1,15}$/;function N(e){let s=e?.view;return s!=null&&s.kind==="task"&&typeof s.id=="string"?s:null}function rt(e){let s=N(e),a=s?.approve??null;if(s===null||a===null)return null;let t=a.fields.digest??"",n=a.fields.rebuild??null;if(!L.test(t)||n!==null&&!B.test(n)||a.action!==`/t/${encodeURIComponent(s.id)}/approve`)return null;let $=a.rememberedUntil===null?null:v(new Date(a.rememberedUntil)),l={...a.facts,rememberedUntil:$},r=a.sheet!=null&&typeof a.sheet=="object"&&typeof a.sheet.digest=="string"?a.sheet:null;return{taskId:s.id,action:a.action,digest:t,rebuild:n,heading:a.heading,text:a.text,termsWords:a.termsWords??k(a.kind,l),sheet:r,kind:a.kind,facts:l}}function it(e,s){if(e===null||s||e.sheet===null)return!1;let a=g(e.kind,e.facts);return a==="click"||a==="automatic"}function bt(e,s=fetch,a){return u(e,"prefetch",s,a)}async function ot(e,s=fetch){let a;try{a=new URL(c(e),window.location.origin)}catch{return null}if(a.origin!==window.location.origin)return null;a.hash="",a.searchParams.set("format","workspace"),a.searchParams.delete("request");try{let t=await s(a.pathname+a.search,{credentials:"same-origin",cache:"no-store",redirect:"manual",headers:{accept:"application/json"},signal:AbortSignal.timeout(U)});if(t.status!==200||t.redirected||t.type==="opaqueredirect"||!(t.headers.get("content-type")??"").includes("application/json"))return null;let n=await t.json();return d(n)?n:null}catch{return null}}function ct(e){let s=N(e)?.approve?.fields.nonce??"";return P.test(s)?s:null}var S=["approved","vote","approved-not-rebuilt","refused"];async function dt(e,s,a,t=fetch){let n=new URLSearchParams({csrf:s,nonce:a,digest:e.digest});e.rebuild!==null&&n.set("rebuild",e.rebuild),n.set("return","next");let $;try{$=await t(e.action,{method:"POST",credentials:"same-origin",redirect:"manual",body:n,headers:m({"x-toolroll-act":"in-place",accept:"application/json"}),signal:AbortSignal.timeout(U)})}catch{return{kind:"lost"}}if($.type==="opaqueredirect"||$.redirected||!($.headers.get("content-type")??"").includes("application/json"))return{kind:"elsewhere"};let l;try{l=await $.json()}catch{return{kind:"lost"}}if(l===null||typeof l!="object")return{kind:"elsewhere"};let{outcome:r,words:i}=l;return typeof r!="string"||!S.includes(r)||typeof i!="string"?{kind:"elsewhere"}:r!=="refused"&&$.status!==200?{kind:"elsewhere"}:{kind:"answer",outcome:r,words:i}}function ut(e){let s=e.trim();if(s==="")return"";let a=s.charAt(0).toUpperCase()+s.slice(1);return/[.!?]$/.test(a)?a:`${a}.`}var p=w(y(),1);function A({fact:e}){return(0,p.jsx)(p.Fragment,{children:e.parts.map((s,a)=>typeof s=="string"?(0,p.jsx)("span",{children:s},a):"at"in s?(0,p.jsx)("time",{dateTime:s.at,title:h(s.at),className:"k-num",children:f(s.at)},a):"seal"in s?(0,p.jsx)("code",{className:"k-mono",children:s.seal},a):(0,p.jsx)("a",{href:s.href,children:s.label},a))})}function W(e){if(!e||e.length===0)return[];let s=b=>e.find(o=>o.title===b)?.facts??[],a=(b,o)=>s(b).find(q=>q.label===o),t=[],n=a("Work","Agent");n!==void 0&&t.push({label:"Agent",fact:n});let $=a("Work","Base");$!==void 0&&t.push({label:"Base",fact:$});let l=a("Links","Pull request");l!==void 0&&t.push({label:"Pull request",fact:l});let r=a("Links","Blocked by");r!==void 0&&t.push({label:"Blocked by",fact:r});let i=a("About","Usage, this attempt")??a("About","Usage, all attempts");return i!==void 0&&t.push({label:"Usage",fact:i}),t}function ft({details:e,extra:s,className:a,dataAttr:t="data-task-vitals"}){let n=W(e),$=s??[];return n.length===0&&$.length===0?null:(0,p.jsxs)("dl",{className:j("so-task-vitals",a),...t==="data-task-vitals"?{"data-task-vitals":""}:{"data-work-vitals":""},children:[n.map(l=>(0,p.jsxs)("div",{className:"so-task-vital","data-vital":l.label.toLowerCase().replace(/\s+/g,"-"),children:[(0,p.jsx)("dt",{children:l.label}),(0,p.jsx)("dd",{children:(0,p.jsx)(A,{fact:l.fact})})]},l.label)),$.map(l=>(0,p.jsxs)("div",{className:"so-task-vital","data-vital":l.label.toLowerCase().replace(/\s+/g,"-"),children:[(0,p.jsx)("dt",{children:l.label}),(0,p.jsx)("dd",{children:l.value})]},l.label))]})}function ht({view:e}){let s=(e.details??[]).filter(a=>a.facts.length>0);return(0,p.jsx)("div",{className:"k-sec","data-task-details":!0,children:s.map(a=>(0,p.jsxs)("section",{className:"k-sec","aria-label":a.title,"data-detail-group":a.title,children:[(0,p.jsx)("h3",{children:a.title}),(0,p.jsx)(x,{rows:a.facts.map(t=>[t.label,(0,p.jsx)("span",{"data-detail-fact":t.label,children:(0,p.jsx)(A,{fact:t})},t.label)])})]},a.title))})}function mt({text:e}){let s=e.split(/`([^`\n]+)`/);return(0,p.jsx)(p.Fragment,{children:s.map((a,t)=>t%2===1?(0,p.jsx)("code",{className:"k-mono",children:a},t):a===""?null:(0,p.jsx)("span",{children:a},t))})}export{U as a,$t as b,N as c,rt as d,it as e,bt as f,ot as g,ct as h,dt as i,ut as j,ft as k,ht as l,mt as m};