toolroll 0.9.133 → 0.9.134

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 (296) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/acp-agents.js +1 -1
  3. package/dist/acp-client.js +2 -2
  4. package/dist/acp-providers-schema.js +1 -1
  5. package/dist/agent-detect.js +1 -1
  6. package/dist/agent-fence.js +4 -4
  7. package/dist/agent-handoff.js +11 -0
  8. package/dist/agent-thread/acp-chat.js +1 -0
  9. package/dist/agent-thread/acp-turn.js +4 -0
  10. package/dist/agent-thread/chat-credential.js +1 -0
  11. package/dist/agent-thread/chat-home.js +1 -0
  12. package/dist/agent-thread/chat-spend.js +7 -0
  13. package/dist/agent-thread/chat-tools.js +1 -0
  14. package/dist/agent-thread/chat-turn.js +4 -0
  15. package/dist/agent-thread/custody.js +1 -1
  16. package/dist/agent-thread/direct-host.js +13 -8
  17. package/dist/agent-thread/fence.js +1 -1
  18. package/dist/agent-thread/gemini-chat.js +1 -0
  19. package/dist/agent-thread/git-workspace.js +2 -2
  20. package/dist/agent-thread/guards.js +1 -1
  21. package/dist/agent-thread/openrouter-chat.js +1 -0
  22. package/dist/agent-thread/providers.js +3 -3
  23. package/dist/agent-thread/ship.js +1 -1
  24. package/dist/agentconfig.js +1 -1
  25. package/dist/agents-live.js +2 -2
  26. package/dist/assignment.js +1 -1
  27. package/dist/brief-fence.js +3 -1
  28. package/dist/browser/{chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js → chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js} +5 -5
  29. package/dist/browser/chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js.br +0 -0
  30. package/dist/browser/chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js.gz +0 -0
  31. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js +2 -0
  32. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js.br +0 -0
  33. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js.gz +0 -0
  34. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js +4 -0
  35. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js.br +0 -0
  36. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js.gz +0 -0
  37. package/dist/browser/chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js +116 -0
  38. package/dist/browser/chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js.br +0 -0
  39. package/dist/browser/chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js.gz +0 -0
  40. package/dist/browser/{chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js → chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js} +6 -6
  41. package/dist/browser/chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js.br +0 -0
  42. package/dist/browser/chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js.gz +0 -0
  43. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js +4 -0
  44. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js.br +0 -0
  45. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js.gz +0 -0
  46. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js +6 -0
  47. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js.br +0 -0
  48. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js.gz +0 -0
  49. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js +2 -0
  50. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js.br +0 -0
  51. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js.gz +0 -0
  52. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js +20 -0
  53. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js.br +0 -0
  54. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js.gz +0 -0
  55. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js +2 -0
  56. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js.br +0 -0
  57. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js.gz +0 -0
  58. package/dist/browser/chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js +5 -0
  59. package/dist/browser/chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js.br +0 -0
  60. package/dist/browser/chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js.gz +0 -0
  61. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js +2 -0
  62. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js.br +0 -0
  63. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js.gz +0 -0
  64. package/dist/browser/chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js +4 -0
  65. package/dist/browser/chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js.br +0 -0
  66. package/dist/browser/chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js.gz +0 -0
  67. package/dist/browser/chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js +3 -0
  68. package/dist/browser/chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js.br +0 -0
  69. package/dist/browser/chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js.gz +0 -0
  70. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js +2 -0
  71. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js.br +0 -0
  72. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js.gz +0 -0
  73. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js +2 -0
  74. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js.br +0 -0
  75. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js.gz +0 -0
  76. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js +2 -0
  77. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js.br +0 -0
  78. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js.gz +0 -0
  79. package/dist/browser/{chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js → chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js} +1 -1
  80. package/dist/browser/chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js.br +0 -0
  81. package/dist/browser/chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js.gz +0 -0
  82. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js +2 -0
  83. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js.br +0 -0
  84. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js.gz +0 -0
  85. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js +2 -0
  86. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js.br +0 -0
  87. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js.gz +0 -0
  88. package/dist/browser/manifest.json +202 -202
  89. package/dist/browser/{terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js → terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js} +1 -1
  90. package/dist/browser/terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js.br +0 -0
  91. package/dist/browser/{terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js.gz → terminal.18295f7cbf70d84b5564f3784b9630bec594fc558a7bf0303e34cde9b027eff9.js.gz} +0 -0
  92. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css +4 -0
  93. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css.br +0 -0
  94. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css.gz +0 -0
  95. package/dist/browser/{workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js → workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js} +2 -2
  96. package/dist/browser/workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js.br +0 -0
  97. package/dist/browser/workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js.gz +0 -0
  98. package/dist/build-review.js +1 -1
  99. package/dist/builder-revision.js +4 -0
  100. package/dist/builder.js +19 -12
  101. package/dist/central-recovery-stage.js +1 -1
  102. package/dist/chat-actions.js +11 -7
  103. package/dist/chat-channel.js +1 -1
  104. package/dist/chat-review.js +1 -1
  105. package/dist/chat-terms.js +2 -2
  106. package/dist/check-levels.js +1 -1
  107. package/dist/cli-help.js +140 -12
  108. package/dist/cli.js +4 -3
  109. package/dist/contracts/chat-actions.js +1 -1
  110. package/dist/contracts/console-api.js +1 -1
  111. package/dist/contracts/engine-api.js +1 -1
  112. package/dist/contracts/lead-tools.js +1 -1
  113. package/dist/contracts/project-memory.js +1 -1
  114. package/dist/contracts/provider.js +1 -1
  115. package/dist/converse.js +1 -1
  116. package/dist/decision.js +1 -1
  117. package/dist/dispatch.js +2 -2
  118. package/dist/dispose.js +1 -1
  119. package/dist/easy-start.js +2 -2
  120. package/dist/egress.js +1 -1
  121. package/dist/engine-chat.js +1 -1
  122. package/dist/engine-reads.js +3 -3
  123. package/dist/every-agent-schema.js +105 -0
  124. package/dist/evidence-pack.js +1 -1
  125. package/dist/evidence.js +1 -1
  126. package/dist/exec.js +3 -2
  127. package/dist/fallback.js +1 -1
  128. package/dist/git-identity.js +2 -2
  129. package/dist/handoff-relay.js +2 -0
  130. package/dist/invoke.js +2 -2
  131. package/dist/keys.js +1 -1
  132. package/dist/lead-capabilities.js +1 -1
  133. package/dist/lead-cli.js +2 -2
  134. package/dist/lead-contract.js +1 -1
  135. package/dist/lead-debrief.js +7 -0
  136. package/dist/lead-doors.js +1 -1
  137. package/dist/lead-tools.js +5 -5
  138. package/dist/lead.js +2 -2
  139. package/dist/live-records.js +3 -3
  140. package/dist/live-terminal.js +1 -1
  141. package/dist/local-owner-acts.js +2 -2
  142. package/dist/local-owner.js +1 -1
  143. package/dist/machine-identity.js +1 -1
  144. package/dist/memory-pass.js +3 -3
  145. package/dist/model-catalog.js +2 -2
  146. package/dist/model-choices.js +1 -1
  147. package/dist/needs-you.js +1 -1
  148. package/dist/openrouter-key.js +2 -0
  149. package/dist/operate-commands.js +1 -1
  150. package/dist/operate-remote-arguments.js +1 -1
  151. package/dist/operate-remote.js +1 -1
  152. package/dist/operate.js +22 -12
  153. package/dist/panels.js +6 -0
  154. package/dist/phase-routing.js +1 -1
  155. package/dist/pi-build.js +4 -0
  156. package/dist/pi-rpc.js +10 -0
  157. package/dist/pi-tools-extension.js +4 -0
  158. package/dist/plan-login.js +2 -2
  159. package/dist/plane-review.js +1 -1
  160. package/dist/planner.js +2 -2
  161. package/dist/plugin-bundle-source.js +1 -0
  162. package/dist/plugin-bundles-schema.js +43 -0
  163. package/dist/policy.js +1 -1
  164. package/dist/pre-run-phase.js +2 -0
  165. package/dist/project-knowledge.js +2 -2
  166. package/dist/project-learning.js +6 -5
  167. package/dist/project-memory.js +1 -1
  168. package/dist/project-skills.js +1 -1
  169. package/dist/project-tools.js +2 -2
  170. package/dist/prompt.js +1 -1
  171. package/dist/provider-auth.js +1 -1
  172. package/dist/provider-connection.js +2 -2
  173. package/dist/provider-home.js +1 -1
  174. package/dist/provider-limits.js +1 -1
  175. package/dist/provider.js +2 -2
  176. package/dist/reported-usage.js +1 -1
  177. package/dist/repository-context.js +1 -1
  178. package/dist/result-follow-ups.js +2 -2
  179. package/dist/result-projection.js +1 -1
  180. package/dist/route-change.js +1 -1
  181. package/dist/runner.js +2 -2
  182. package/dist/scope.js +1 -1
  183. package/dist/scout.js +2 -2
  184. package/dist/serve.js +3 -3
  185. package/dist/server/chat-projection.js +1 -1
  186. package/dist/server/chat.js +3 -3
  187. package/dist/server/direct-chat.js +1 -1
  188. package/dist/server/engine-api.js +1 -1
  189. package/dist/server/handoff.js +1 -0
  190. package/dist/server/live.js +1 -1
  191. package/dist/server/merge-ready-view.js +1 -1
  192. package/dist/server/panels.js +1 -0
  193. package/dist/server/people-tokens.js +1 -1
  194. package/dist/server/route-table.js +1 -1
  195. package/dist/server/send-back-build.js +1 -1
  196. package/dist/server/settings.js +2 -2
  197. package/dist/server/task-overview.js +1 -0
  198. package/dist/server/task-view-data.js +1 -1
  199. package/dist/server/task-views.js +1 -1
  200. package/dist/server/tasks.js +5 -5
  201. package/dist/server/terminals.js +1 -1
  202. package/dist/settings-data.js +1 -1
  203. package/dist/settings-proofs.js +1 -1
  204. package/dist/setup-guide.js +1 -1
  205. package/dist/skill-library.js +13 -22
  206. package/dist/skills-manifest.js +1 -1
  207. package/dist/spend-report.js +2 -1
  208. package/dist/spend.js +6 -4
  209. package/dist/ssr-workspace.js +83 -83
  210. package/dist/store-baseline.js +13 -47
  211. package/dist/store.js +9 -9
  212. package/dist/structured-json.js +1 -0
  213. package/dist/structured-output.js +1 -1
  214. package/dist/subscription-chat.js +16 -4
  215. package/dist/subscription-usage.js +3 -4
  216. package/dist/surface.js +1 -1
  217. package/dist/task-outcome-cli.js +5 -2
  218. package/dist/task-overview.js +1 -0
  219. package/dist/task-review-brief.js +1 -1
  220. package/dist/task-status.js +1 -1
  221. package/dist/teardown-git.js +4 -4
  222. package/dist/text-limits.js +1 -1
  223. package/dist/trusted-path.js +1 -1
  224. package/dist/tui/darwin-arm64/toolroll-tui +0 -0
  225. package/dist/tui/darwin-x64/toolroll-tui +0 -0
  226. package/dist/tui/linux-arm64/toolroll-tui +0 -0
  227. package/dist/tui/linux-x64/toolroll-tui +0 -0
  228. package/dist/tui-contract.js +1 -1
  229. package/dist/tui-launch.js +2 -1
  230. package/dist/verification-evidence.js +1 -1
  231. package/dist/welcome-facts.js +1 -1
  232. package/dist/work-index.js +13 -5
  233. package/package.json +2 -1
  234. package/dist/browser/chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js.br +0 -0
  235. package/dist/browser/chunk-agents-live-view.6fd2938ef96a85a4127cddb99dbc700b3201c58351d9f07dbcd8a2f7d7dfef22.js.gz +0 -0
  236. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js +0 -2
  237. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js.br +0 -0
  238. package/dist/browser/chunk-bundle.77cfd5ccd851cf1fb8597d1d0eb12fc30913417f13b699d5b8ac61a4116274ef.js.gz +0 -0
  239. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js +0 -4
  240. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js.br +0 -0
  241. package/dist/browser/chunk-chat-parts.0e3997ddbeed8305b18353060e93f2a330d95ccb23b960f182dee211d205bb13.js.gz +0 -0
  242. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js +0 -116
  243. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js.br +0 -0
  244. package/dist/browser/chunk-core.23e919124df20f363902dc6e256d2408e103af285ebffbf0059fad7369c6ee8f.js.gz +0 -0
  245. package/dist/browser/chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js.br +0 -0
  246. package/dist/browser/chunk-flow-view.71a0a3360292445ab70d67253bb9003163bbb7b1b03f14d1892cca83debd9b2c.js.gz +0 -0
  247. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js +0 -4
  248. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js.br +0 -0
  249. package/dist/browser/chunk-flows-extra-view.ebf20d864bea14592b61ce628afc066997e1f0a566abbfe6fc91f4db47245696.js.gz +0 -0
  250. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js +0 -6
  251. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js.br +0 -0
  252. package/dist/browser/chunk-pages-bundle.2fbb3d6de09f521a8ded75bd48b567d60bbfde351cae3492179714d76fc91ee5.js.gz +0 -0
  253. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js +0 -2
  254. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js.br +0 -0
  255. package/dist/browser/chunk-result-view.7527d4ed9c70c023b63821c87f8db00c374fddd8674f984cc7c03fae050e6ff0.js.gz +0 -0
  256. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js +0 -20
  257. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js.br +0 -0
  258. package/dist/browser/chunk-settings-view.129efb77f2d459e2254d17ab338dac474d14b86383fe024798dc61b9460d169c.js.gz +0 -0
  259. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js +0 -3
  260. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js.br +0 -0
  261. package/dist/browser/chunk-shared.01f5db9cab3e903447bac5a6484cbae518232a074542c5128a0ce8cac9fe5e7d.js.gz +0 -0
  262. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js +0 -2
  263. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js.br +0 -0
  264. package/dist/browser/chunk-shared.1cf4e4820f8c03a04d548d8b21b6169eda3354229b4feccdeb95534b3cc2ed09.js.gz +0 -0
  265. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js +0 -5
  266. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js.br +0 -0
  267. package/dist/browser/chunk-shared.408770b5e547bce6c67ad743638b8ef16381b092d71fc1a2b2b801cad9bd900f.js.gz +0 -0
  268. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js +0 -2
  269. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js.br +0 -0
  270. package/dist/browser/chunk-shared.47c9cc79ee85c5d6ebb9759b9d7f261ddd7aee78c7f70f2bc559d5b97444936d.js.gz +0 -0
  271. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js +0 -2
  272. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js.br +0 -0
  273. package/dist/browser/chunk-shared.60b718ab56ab520275f68f0378efa38941dc2d739c1284f842a19e6a25456e7d.js.gz +0 -0
  274. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js +0 -2
  275. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js.br +0 -0
  276. package/dist/browser/chunk-shared.9974523cbe568c3669da1b1a266aa7de741e2edcce3e4a943e73242c61324004.js.gz +0 -0
  277. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js +0 -2
  278. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js.br +0 -0
  279. package/dist/browser/chunk-shared.b536969256589ccff71a29b37eff95fccfd5a8f4fa4138ff503cb0e8fb10b4d0.js.gz +0 -0
  280. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js +0 -4
  281. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js.br +0 -0
  282. package/dist/browser/chunk-shared.cbc3fd4e985ceccf27c731d77030830edbf96dd0197424584ebb202eb6993ebd.js.gz +0 -0
  283. package/dist/browser/chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js.br +0 -0
  284. package/dist/browser/chunk-sonner.da05d41088ec46a49ef6b86f4afa71fccd5462f1befa713ca930aa231e35349b.js.gz +0 -0
  285. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js +0 -2
  286. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js.br +0 -0
  287. package/dist/browser/chunk-task-view.9b9f418a71547aeea43a8acb26e8d48d486463b71b940eb72f3856038e27fa90.js.gz +0 -0
  288. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js +0 -2
  289. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js.br +0 -0
  290. package/dist/browser/chunk-team-chat.2be52f36796d5cd7ca8ea47a2aeb68c550625150ccc4186805bdecd87747138c.js.gz +0 -0
  291. package/dist/browser/terminal.1ab49cbf9b9363f0f520b85e4125d40a302dffc10489e77b04ff1c620831eefe.js.br +0 -0
  292. package/dist/browser/workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js.br +0 -0
  293. package/dist/browser/workspace.d6a38fe66b5ee0b74d8ea4b026148c285f664732511bc528c934309bbad1e5e4.js.gz +0 -0
  294. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css +0 -4
  295. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css.br +0 -0
  296. package/dist/browser/workspace.d818fa094b8793160991ca784f4897c6d1862c02fbcbeebae637d8b855ab03d5.css.gz +0 -0
@@ -0,0 +1,2 @@
1
+ /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
+ import{p5$a as X,p5$b as v}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p10$A as aa,p10$B as sa,p10$C as ea,p10$D as ta,p10$E as na,p10$F as ia,p10$G as ra,p10$H as da,p10$I as M,p10$J as ca,p10$a as la,p10$b as pa,p10$c as oa,p10$d as ha,p10$e as R,p10$f as $a,p10$g as ma,p10$h as ba,p10$i as xa,p10$j as fa,p10$k as ua,p10$l as ka,p10$m as ga,p10$n as ja,p10$o as ya,p10$p as wa,p10$q as va,p10$r as Na,p10$s as Wa,p10$t as Ca,p10$u as Sa,p10$v as Aa,p10$w as Da,p10$x as za,p10$y as Fa,p10$z as Ia}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p1$$ as Ra,p1$$a as G,p1$$b as Ga,p1$A as Ha,p1$Aa as Ea,p1$Ab as Ba,p1$B as Oa,p1$Ba as Pa,p1$Bb as Ua,p1$C as qa,p1$Ca as Ja,p1$Cb as La,p1$D as Qa,p1$Da as _a,p1$Db as Ka,p1$E as Va,p1$Ea as Xa,p1$Eb as Ya,p1$F as Za,p1$Fa as as,p1$Fb as ss,p1$G as S,p1$Ga as es,p1$Gb as ts,p1$H as ns,p1$Ha as is,p1$Hb as rs,p1$I as j,p1$Ia as ds,p1$Ib as cs,p1$J as ls,p1$Ja as ps,p1$Jb as os,p1$K as hs,p1$Ka as $s,p1$Kb as ms,p1$L as bs,p1$La as xs,p1$Lb as fs,p1$M as us,p1$Ma as ks,p1$Mb as gs,p1$N as js,p1$Na as ys,p1$Nb as ws,p1$O as vs,p1$Oa as Ns,p1$Ob as Ws,p1$P as Cs,p1$Pa as Ss,p1$Pb as As,p1$Q as Ds,p1$Qa as zs,p1$Qb as Fs,p1$R as Is,p1$Ra as Ts,p1$Rb as Ms,p1$S as Rs,p1$Sa as Gs,p1$Sb as Hs,p1$T as Es,p1$Ta as Bs,p1$Tb as Os,p1$U as Ps,p1$Ua as Us,p1$Ub as qs,p1$V as Js,p1$Va as Ls,p1$Vb as H,p1$W as Qs,p1$Wa as _s,p1$Wb as Ks,p1$X as Vs,p1$Xa as Xs,p1$Xb as Ys,p1$Y as Zs,p1$Ya as ae,p1$Yb as se,p1$Z as ee,p1$Za as te,p1$Zb as ne,p1$_ as ie,p1$_a as re,p1$_b as de,p1$a as f,p1$aa as ce,p1$ab as N,p1$ac as le,p1$b as pe,p1$ba as oe,p1$bb as y,p1$bc as he,p1$c as $e,p1$ca as me,p1$cb as E,p1$cc as be,p1$d as xe,p1$da as fe,p1$db as ue,p1$dc as ke,p1$e as u,p1$ea as ge,p1$eb as je,p1$ec as ye,p1$f as we,p1$fa as ve,p1$fb as Ne,p1$fc as We,p1$g as Ce,p1$ga as Se,p1$gb as Ae,p1$gc as De,p1$h as ze,p1$ha as Fe,p1$hb as Ie,p1$hc as Te,p1$i as Me,p1$ia as Re,p1$ib as Ge,p1$ic as He,p1$j as Ee,p1$ja as Be,p1$jb as Oe,p1$jc as Pe,p1$k as Ue,p1$ka as qe,p1$kb as Je,p1$kc as Le,p1$l as Qe,p1$la as _e,p1$lb as Ke,p1$lc as Ve,p1$m as Xe,p1$ma as Ye,p1$mb as Ze,p1$n as at,p1$na as st,p1$nb as et,p1$o as tt,p1$oa as nt,p1$ob as it,p1$p as rt,p1$pa as dt,p1$pb as ct,p1$q as lt,p1$qa as pt,p1$qb as ot,p1$r as ht,p1$ra as $t,p1$rb as mt,p1$s as bt,p1$sa as xt,p1$sb as ft,p1$t as ut,p1$ta as A,p1$tb as kt,p1$u as gt,p1$ua as jt,p1$ub as yt,p1$v as wt,p1$va as vt,p1$vb as Nt,p1$w as Wt,p1$wa as Ct,p1$wb as St,p1$x as At,p1$xa as Dt,p1$xb as zt,p1$y as Ft,p1$ya as It,p1$yb as Tt,p1$z as Mt,p1$za as Rt,p1$zb as Gt}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p2$a as Bt,p2$b as D,p2$c as B,p2$d as Ot,p2$e as O}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";var b=D(B(),1),s=D(O(),1),z=a=>a.charAt(0).toUpperCase()+a.slice(1);async function P(a,c,$,l){let o=new URLSearchParams({csrf:$});c==="confirm"&&l&&o.set("confirm","yes");try{let i=await fetch(`/chat/proposal/${a.id}/${c}`,{method:"POST",body:o,credentials:"same-origin",headers:H({accept:"application/json"}),signal:AbortSignal.timeout(2e4)});if(!i.headers.get("content-type")?.includes("application/json"))return{ok:!1,said:"That didn't go through. Reload the conversation and try again."};let n=await i.json(),m=typeof n=="object"&&n!==null?n:{};return{ok:m.ok===!0,said:typeof m.said=="string"?z(m.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)(j,{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(c=>(0,s.jsx)(y,{variant:"ghost",sm:!0,href:c.href,label:c.label},c.href))})]})}function J({card:a,csrf:c,onChanged:$}){if(a.data===!0)return(0,s.jsx)(q,{card:a});let[l,o]=(0,b.useState)(null),[i,n]=(0,b.useState)(!1),m=A(),h=(0,b.useId)(),k=async p=>{o(p);let x=await P(a,p,c,i);p==="confirm"?(x.ok?v.success:v.error)(x.said):x.ok||v.error(x.said),o(null),$()},e=a.primary,g=e?.kind==="confirm",t=g&&e.irreversible&&!i,w=a.state==="confirmed"||a.state==="refused"||a.state==="dismissed"||a.state==="expired",r=a.links.filter(p=>!(e?.kind==="link"&&p.href===e.href));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:f("so-chat-card mt-3 overflow-hidden bg-card text-card-foreground",w&&"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"&&g&&(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)(R,{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)(M,{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)(j,{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:f("text-body",a.state==="refused"?"text-destructive":"text-success"),children:z(a.said)}),r.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(p=>(0,s.jsx)(u,{asChild:!0,variant:"outline",size:"sm",children:(0,s.jsx)("a",{href:p.href,children:p.label})},p.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:i,onChange:p=>n(p.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)(u,{asChild:!0,size:"sm",children:(0,s.jsx)("a",{href:e.href,children:e.label})}),e?.kind==="confirm"&&e.native&&(0,s.jsxs)(S,{action:`/chat/proposal/${a.id}/confirm`,children:[(0,s.jsx)("input",{type:"hidden",name:"return",value:m}),e.irreversible&&i&&(0,s.jsx)("input",{type:"hidden",name:"confirm",value:"yes"}),(0,s.jsx)(u,{type:"submit",size:"sm",disabled:t,children:e.label})]}),e?.kind==="confirm"&&!e.native&&(0,s.jsx)(u,{size:"sm",disabled:l!==null||t,onClick:()=>{k("confirm")},"data-card-confirm":!0,children:l==="confirm"?"Working…":e.label}),a.dismissable&&(0,s.jsx)(u,{variant:"ghost",size:"sm",disabled:l!==null,onClick:()=>{k("dismiss")},"data-card-dismiss":!0,children:l==="dismiss"?"Dismissing…":"Dismiss"})]})]})]})}var L={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 Q(a){switch(a.state){case"pending":return a.primary?.kind==="link"&&!a.dismissable?{word:"Shortcut",tone:""}: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 _({card:a,csrf:c,onChanged:$}){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)(j,{blocks:a.body,className:"lc-card-body"}),a.links.length>0&&(0,s.jsx)("div",{className:"lc-card-acts",children:a.links.map(d=>(0,s.jsx)(y,{variant:"ghost",sm:!0,href:d.href,label:d.label},d.href))})]});let[l,o]=(0,b.useState)(null),[i,n]=(0,b.useState)(!1),m=A(),[h,k]=(0,b.useState)(null),e=(0,b.useId)(),g=async d=>{o(d),k(null);let T=await P(a,d,c,i);k({ok:T.ok,words:T.said}),o(null),$()},t=a.primary,w=t?.kind==="confirm"&&t.irreversible&&!i,r=a.state==="pending"&&(t!==null||a.dismissable),[p,x]=L[a.kind]??["Action","file"],F=Q(a),[W,...C]=a.links,U=(r?a.links:C).filter(d=>!(r&&t?.kind==="link"&&d.href===t.href)),I=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"lc-card-ic","aria-hidden":"true",children:(0,s.jsx)(G,{name:x,small:!0})}),(0,s.jsxs)("span",{className:"lc-card-t",children:[(0,s.jsx)("span",{className:"lc-card-v",children:p}),(0,s.jsx)("span",{className:"lc-card-n",children:a.label})]}),(0,s.jsx)(E,{word:F.word,tone:F.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:f("lc-card",r&&"open"),children:[!r&&W!==void 0?(0,s.jsx)("a",{className:"lc-card-row",href:W.href,title:W.label,children:I}):(0,s.jsx)("div",{className:"lc-card-row",children:I}),(r||a.said!==null||h!==null||a.note!==null||C.length>0)&&(0,s.jsxs)("div",{className:"lc-card-more",children:[r&&a.body.length>0&&(0,s.jsx)(j,{blocks:a.body,className:"lc-card-body"}),a.said!==null&&(0,s.jsx)("p",{className:f("lc-card-said",a.state==="refused"&&"bad"),children:z(a.said)}),h!==null&&(0,s.jsx)("p",{className:f("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}),t?.kind==="confirm"&&t.irreversible&&r&&(0,s.jsxs)("label",{htmlFor:e,className:"lc-card-arm",children:[(0,s.jsx)("input",{id:e,type:"checkbox",checked:i,onChange:d=>n(d.target.checked)}),"I understand this cannot be undone"]}),(r||C.length>0)&&(0,s.jsxs)("div",{className:"lc-card-acts",children:[r&&t?.kind==="link"&&(0,s.jsx)(y,{variant:"primary",sm:!0,href:t.href,label:t.label}),r&&t?.kind==="confirm"&&t.native&&(0,s.jsxs)(S,{action:`/chat/proposal/${a.id}/confirm`,children:[(0,s.jsx)("input",{type:"hidden",name:"return",value:m}),t.irreversible&&i&&(0,s.jsx)("input",{type:"hidden",name:"confirm",value:"yes"}),(0,s.jsx)(N,{type:"submit",variant:"primary",sm:!0,disabled:w,label:t.label})]}),r&&t?.kind==="confirm"&&!t.native&&(0,s.jsx)(N,{variant:"primary",sm:!0,disabled:l!==null||w,busy:l==="confirm"?"Working…":!1,onClick:()=>{g("confirm")},"data-card-confirm":!0,label:t.label}),r&&a.dismissable&&(0,s.jsx)(N,{variant:"ghost",sm:!0,disabled:l!==null,busy:l==="dismiss"?"Dismissing…":!1,onClick:()=>{g("dismiss")},"data-card-dismiss":!0,label:"Dismiss"}),U.map(d=>(0,s.jsx)(y,{variant:"ghost",sm:!0,href:d.href,label:d.label},d.href))]})]})]})}function Lt({cards:a,csrf:c,onChanged:$,readOnly:l=!1,look:o="card"}){let i=n=>l?{...n,primary:null,dismissable:!1}:n;return o==="row"?(0,s.jsx)("ul",{className:"lc-cards so-action-cards","aria-label":"What the lead proposed",children:a.map(n=>(0,s.jsx)(_,{card:i(n),csrf:c,onChanged:$},`${n.id}:${n.state}`))}):(0,s.jsx)("div",{className:"so-action-cards",children:a.map(n=>(0,s.jsx)(J,{card:i(n),csrf:c,onChanged:$},`${n.id}:${n.state}`))})}var Qt={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{Lt as a,Qt as b};
@@ -0,0 +1,5 @@
1
+ /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
+ import{p6$a as Ns,p6$b as ue}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{a as Ve}from"./chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js";import{a as Ke,f as Ge,g as _e}from"./chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js";import{p9$a as me,p9$b as X,p9$c as Z,p9$d as ks,p9$e as $s,p9$f as Cs,p9$g as pe,p9$h as xe,p9$i as Ss}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p10$A as Ts,p10$B as Rs,p10$C as Ls,p10$D as q,p10$E as Is,p10$F as As,p10$G as Ps,p10$H as Hs,p10$I as Us,p10$J as Ms,p10$a as zs,p10$b as Ws,p10$c as Ds,p10$d as Os,p10$e as fe,p10$f as je,p10$g as ge,p10$h as Es,p10$i as Bs,p10$j as Vs,p10$k as Ks,p10$l as Gs,p10$m as _s,p10$n as Js,p10$o as Ys,p10$p as Qs,p10$q as Xs,p10$r as Zs,p10$s as ea,p10$t as sa,p10$u as aa,p10$v as na,p10$w as la,p10$x as ta,p10$y as ra,p10$z as ia}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p11$a as B,p11$b as ee}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p1$$ as ua,p1$$a as ma,p1$$b as pa,p1$A as xa,p1$Aa as fa,p1$Ab as ja,p1$B as ga,p1$Ba as ba,p1$Bb as va,p1$C as Na,p1$Ca as wa,p1$Cb as ya,p1$D as ka,p1$Da as $a,p1$Db as Ca,p1$E as Sa,p1$Ea as Fa,p1$Eb as qa,p1$F as Ta,p1$Fa as Ra,p1$Fb as La,p1$G as N,p1$Ga as Ia,p1$Gb as Aa,p1$H as Pa,p1$Ha as Ha,p1$Hb as Ua,p1$I as Ma,p1$Ia as za,p1$Ib as Wa,p1$J as Da,p1$Ja as Oa,p1$Jb as Ea,p1$K as Ba,p1$Ka as Va,p1$Kb as Ka,p1$L as Ga,p1$La as _a,p1$Lb as Ja,p1$M as se,p1$Ma as Ya,p1$Mb as Qa,p1$N as ae,p1$Na as Xa,p1$Nb as Za,p1$O as D,p1$Oa as en,p1$Ob as sn,p1$P as be,p1$Pa as an,p1$Pb as nn,p1$Q as ve,p1$Qa as ln,p1$Qb as tn,p1$R as Ne,p1$Ra as rn,p1$Rb as cn,p1$S as we,p1$Sa as on,p1$Sb as dn,p1$T as hn,p1$Ta as un,p1$Tb as mn,p1$U as pn,p1$Ua as xn,p1$Ub as fn,p1$V as jn,p1$Va as gn,p1$Vb as bn,p1$W as vn,p1$Wa as Nn,p1$Wb as wn,p1$X as yn,p1$Xa as kn,p1$Xb as $n,p1$Y as Cn,p1$Ya as ye,p1$Yb as Sn,p1$Z as Fn,p1$Za as qn,p1$Zb as Tn,p1$_ as Rn,p1$_a as Ln,p1$_b as In,p1$a as b,p1$aa as An,p1$ab as C,p1$ac as Pn,p1$b as Hn,p1$ba as Un,p1$bb as V,p1$bc as Mn,p1$c as zn,p1$ca as Wn,p1$cb as Dn,p1$cc as On,p1$d as En,p1$da as Bn,p1$db as Vn,p1$dc as Kn,p1$e as T,p1$ea as Gn,p1$eb as _n,p1$ec as Jn,p1$f as ke,p1$fa as Yn,p1$fb as Qn,p1$fc as Xn,p1$g as Zn,p1$ga as el,p1$gb as sl,p1$gc as al,p1$h as nl,p1$ha as ll,p1$hb as tl,p1$hc as rl,p1$i as il,p1$ia as cl,p1$ib as ol,p1$ic as dl,p1$j as hl,p1$ja as ul,p1$jb as ml,p1$jc as pl,p1$k as ne,p1$ka as xl,p1$kb as fl,p1$kc as jl,p1$l as gl,p1$la as bl,p1$lb as vl,p1$lc as Nl,p1$m as wl,p1$ma as yl,p1$mb as kl,p1$n as $l,p1$na as Cl,p1$nb as Sl,p1$o as Fl,p1$oa as ql,p1$ob as Tl,p1$p as Rl,p1$pa as Ll,p1$pb as Il,p1$q as O,p1$qa as Al,p1$qb as Pl,p1$r as Hl,p1$ra as Ul,p1$rb as Ml,p1$s as zl,p1$sa as Wl,p1$sb as Dl,p1$t as Ol,p1$ta as El,p1$tb as Bl,p1$u as Vl,p1$ua as Kl,p1$ub as Gl,p1$v as _l,p1$va as Jl,p1$vb as Yl,p1$w as Ql,p1$wa as Xl,p1$wb as Zl,p1$x as et,p1$xa as st,p1$xb as at,p1$y as nt,p1$ya as lt,p1$yb as tt,p1$z as rt,p1$za as $e,p1$zb as it}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p2$a as dt,p2$b as P,p2$c as le,p2$d as Ce,p2$e as te}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";var E=P(le(),1),Le=P(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 $=P(le(),1),e=P(te(),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,l])=>l==null?null:(0,e.jsx)("input",{type:"hidden",name:n,value:String(l)},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)(C,{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((l,i)=>(0,e.jsxs)($.Fragment,{children:[i>0&&" ",(0,e.jsx)("span",{className:"mono",children:l})]},l))]}),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:l}){let{pairs:i,rest:t}=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)),t.length>0&&(0,e.jsx)("div",{className:l??"receipt-visuals","aria-label":"validated screenshots",children:t.map(d=>(0,e.jsx)(Ye,{runId:s,shot:d},d.artifactId))})]})}function Pe({summary:s}){let{report:n,screenshots:l,unavailableShots:i,filesLead:t,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:l,className:"receipt-visuals result-visuals"}),t!==null&&(0,e.jsxs)("p",{className:"result-files-lead",children:[t.paths.length>0&&(0,e.jsxs)(e.Fragment,{children:[t.paths.map((u,x)=>(0,e.jsxs)($.Fragment,{children:[x>0&&", ",(0,e.jsx)("span",{className:"mono",children:u})]},u)),t.more>0&&` and ${t.more} more`," — "]}),(0,e.jsx)("a",{href:t.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:l,anchor:i,commentable:t}){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]}),l.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=t&&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:l}){let[i,t]=(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();t(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:l}):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 He({changes:s}){let[n,l]=(0,$.useState)("view"),{stat:i,outsideTouches:t,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":""}`]}),t.length>0&&(0,e.jsxs)("p",{className:"problem cockpit-drift","data-cockpit-drift":t.length,children:[(0,e.jsxs)("strong",{children:[t.length," changed file",t.length===1?"":"s"," outside the approved paths"]})," — ",t.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:()=>l("view"),children:"View"}),(0,e.jsx)("button",{type:"button","data-diff-mode":"annotate","aria-pressed":n==="annotate"?"true":"false",onClick:()=>l("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 Fe({items:s}){return(0,e.jsx)("ul",{children:s.map((n,l)=>(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"})]})]},l))})}function Ue({checks:s,runId:n}){let{repairChain:l}=s,i=l===null?null:l.outcome==="drafted"?l.draftTask===null?"No fix could be prepared":`Targeted fix ${l.basis==="mode"?"approved automatically":"ready for your approval"}`:l.outcome==="resolved"?`Completed on attempt ${l.attempt}`:l.outcome==="attempts-spent"?`Stopped after ${l.attempt} attempt${l.attempt===1?"":"s"}`:l.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)(Fe,{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((t,d)=>(0,e.jsxs)("li",{className:"requirement","data-criterion-id":t.id,children:[(0,e.jsxs)("div",{className:"requirement-heading",children:[(0,e.jsxs)("span",{children:["Requirement ",d+1]}),(0,e.jsx)("span",{className:`badge ${t.badgeClass}`,"data-matrix-state":t.state,children:t.label})]}),(0,e.jsx)("p",{className:"requirement-statement",children:t.statement}),t.upheldOnly&&(0,e.jsx)("p",{className:"requirement-review","data-review-judgement":"upholds",children:"Reviewer confirmed"}),!t.awaitingAssessment&&t.state!=="pass"&&t.label!=="Met"&&t.label!=="Checked at release"&&t.detail.length>0&&(0,e.jsx)("ul",{className:"requirement-issues",children:t.detail.map((r,o)=>(0,e.jsx)("li",{children:r},o))}),t.review!==null&&t.review.judgement!=="upholds"&&(0,e.jsxs)("div",{className:"requirement-warning","data-review-judgement":t.review.judgement,children:[(0,e.jsx)("strong",{children:t.review.judgement==="contradicts"?"Reviewer found a problem":"Reviewer could not confirm this"}),(0,e.jsx)("p",{children:t.review.note})]}),t.coverage!==null&&(t.coverage.state==="gap"||t.coverage.gaps.length>0)&&(0,e.jsxs)("div",{className:"requirement-warning","data-context-coverage":t.coverage.state,children:[(0,e.jsx)("strong",{children:"Review context is missing"}),t.coverage.gaps.length===0?(0,e.jsx)("p",{children:"The saved context cannot support this requirement."}):(0,e.jsx)("ul",{children:t.coverage.gaps.map((r,o)=>(0,e.jsx)("li",{children:r},o))}),t.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: ",t.requiredLabels]}),t.answered.length===0?(0,e.jsx)("p",{className:"meta",children:"Nothing was saved to show this requirement."}):t.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)),t.state==="pass"&&t.detail.length>0&&(0,e.jsxs)("div",{className:"requirement-evidence-group",children:[(0,e.jsx)("strong",{children:"Verification notes"}),(0,e.jsx)("ul",{children:t.detail.map((r,o)=>(0,e.jsx)("li",{children:r},o))})]}),t.review!==null&&(0,e.jsxs)("div",{className:"requirement-evidence-group",children:[(0,e.jsx)("strong",{children:"Previous assessment"}),(0,e.jsxs)("p",{children:[t.review.judgement==="upholds"?`${t.review.note} `:"",(0,e.jsx)("span",{className:"meta",children:t.review.author})]})]}),t.coverage!==null&&(0,e.jsxs)("p",{className:"meta",...t.coverage.state==="gap"?{}:{"data-context-coverage":t.coverage.state},children:["Review context: ",t.coverage.words]}),t.coverage?.assets!==void 0&&(0,e.jsx)("p",{className:"meta","data-context-assets":"",children:t.coverage.assets}),(0,e.jsxs)("p",{className:"meta",children:["Requirement ID: ",(0,e.jsx)("code",{children:t.id})]})]})]})]},t.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."}),l!==null&&i!==null&&(0,e.jsxs)("div",{className:"card repair-chain","data-repair-outcome":l.outcome,children:[(0,e.jsxs)("p",{className:"row",children:[(0,e.jsx)("strong",{children:"Automatic recovery"})," — ",i,l.draftTask!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("a",{href:`/t/${encodeURIComponent(l.draftTask)}`,children:l.draftTask})]})]}),l.unresolved.length>0&&(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"What it is fixing"}),(0,e.jsx)("p",{className:"meta",children:l.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)(Fe,{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((t,d)=>(0,e.jsxs)($.Fragment,{children:[d>0&&`
3
+ `,(0,e.jsx)("span",{id:`check-log-L${d+1}`,children:t})]},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((t,d)=>(0,e.jsxs)("li",{children:[(0,e.jsx)("span",{className:"mono",children:t.command})," ",(0,e.jsxs)("span",{className:"meta",children:["(exit ",t.exitCode,") — ",t.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((t,d)=>(0,e.jsx)("li",{children:t},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((t,d)=>(0,e.jsxs)("li",{"data-follow-up-check":t.state,...t.batchMode!==null?{"data-batch":t.batchMode}:{},children:[t.text," on ",(0,e.jsx)("span",{className:"mono",children:t.commitShort}),(0,e.jsxs)("span",{className:"meta",children:[" · ",t.meta]}),t.logHref!==null&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("a",{href:t.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((t,d)=>(0,e.jsx)("li",{children:t},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(t=>(0,e.jsxs)("li",{"data-review-attempt":t.attempt,"data-review-outcome":t.outcome??"open",children:[(0,e.jsxs)("a",{href:`/r/${t.runId}`,children:["Build #",t.runId]})," · ",t.outcome??"unfinished",t.reason!==null&&` · ${t.reason}`]},t.runId))})]})]})}function qe({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(l=>(0,e.jsx)(qe,{comment:l},l.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,approve:s.reviseFromComments.buildNow?"1":"0"}}),(0,e.jsx)("div",{children:(0,e.jsxs)("strong",{children:[ye(s.comments.length,"note","notes")," ready"]})}),(0,e.jsx)(C,{type:"submit",label:s.reviseFromComments.buildNow?"Send back and build":"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(l=>(0,e.jsx)(qe,{comment:l},l.id))})]}),s.revisions.map(l=>(0,e.jsxs)("p",{className:"result-revision","data-result-revision":l.id,"data-result-revision-approved":l.approved?"1":"0","data-tone":l.tone,children:[(0,e.jsx)("strong",{children:"Revision"})," ",(0,e.jsx)("a",{href:`/t/${encodeURIComponent(l.id)}`,children:l.title})," ",(0,e.jsxs)("span",{className:"meta",children:["· ",l.standing]})]},l.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":"",defaultChecked:!0})," 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:l,knowledgeSnapshot:i,skillTest:t,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}),l!==null&&l.packages.length>0&&(0,e.jsxs)("details",{className:"skills",children:[(0,e.jsxs)("summary",{children:["Skills supplied (",l.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."}),l.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}),t!==null&&(0,e.jsxs)("section",{className:"skills",id:"skill-test-feedback",children:[(0,e.jsx)("h2",{children:"Improve this test"}),t.sourceRun!==null&&(0,e.jsxs)("p",{children:["Revises test run #",t.sourceRun,"."]}),t.feedback!==null&&(0,e.jsxs)("details",{children:[(0,e.jsx)("summary",{children:"Feedback for this test"}),(0,e.jsx)("p",{children:t.feedback})]}),t.revisions.length>0&&(0,e.jsx)("p",{children:t.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))}),t.canRevise&&t.nonce!==null&&(0,e.jsxs)(N,{action:"/settings/skills/revise",children:[(0,e.jsx)(y,{fields:{repo:t.repo,run:String(t.run),nonce:t.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 bt({result:s}){let{panel:n,completion:l}=s,i=n.tabs.find(p=>p.active)?.key??"summary",[t,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&&l===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:be}),(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===t;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:t!=="summary",children:(0,e.jsx)(Pe,{summary:n.summary})}),(0,e.jsx)("div",{className:"result-view",role:"tabpanel","data-result-view":"changes",hidden:t!=="changes",children:(0,e.jsx)(He,{changes:n.changes})}),(0,e.jsx)("div",{className:"result-view",role:"tabpanel","data-result-view":"checks",hidden:t!=="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})})]}),l!==null&&(0,e.jsx)(es,{completion:l})]})}var a=P(te(),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,l]=(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:()=>l(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:()=>l(!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)(q,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}),s]})}function as({selected:s,acts:n,answers:l,bare:i=!1}){let{panel:t,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=t?.requirements==null||t.youCheck==null?null:we(t.requirements,[...l.values()].filter(m=>m==="right").length,[...l.values()].filter(m=>m==="not-right").length),c=t?.status==null?null:{...t.status,details:t.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??(t!==null&&!u?t.outcome:c?.sentence??t?.outcome??""),f=s.mismatch,p=[...new Set([...c===null&&d?.problem===!0?[d.detail]:[],...s.problem===null?[]:[s.problem],...t?.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)(q,{"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)(q,{"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":t?.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)(q,{"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)(q,{"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"),l=n?.querySelector("textarea[name=note]")??null,i=n?.querySelector("input[name=context]")??null,t=n?.closest("details")??null;if(t!==null&&!t.open&&(t.open=!0),l===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),l.dispatchEvent(new Event("input",{bubbles:!0})),l.scrollIntoView({block:"center",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"}),l.focus(),l.setSelectionRange(l.value.length,l.value.length)}function ls({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((l,i)=>(0,a.jsxs)("li",{"data-kind":l.kind,className:b("grid grid-cols-[2.5rem_1rem_minmax(0,1fr)] px-1 py-0.5",l.kind==="addition"?"bg-success-soft":l.kind==="deletion"?"bg-destructive-soft":""),children:[(0,a.jsx)("span",{className:"select-none pr-2 text-right text-muted-foreground tabular-nums",children:l.line??""}),(0,a.jsx)("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:l.kind==="addition"?"+":l.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:l.kind==="addition"?"Added: ":l.kind==="deletion"?"Removed: ":""}),l.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((l,i)=>({id:`line-${i}`,statement:"",words:l,note:null,excerpts:[],shots:[]}))}var _=s=>s.statement===""?s.words:s.statement;function ts(){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:l,answer:i}){let t=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":t.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:t.length===1?"You check this one":`You check these ${t.length}`}),(0,a.jsx)("ul",{className:"divide-y divide-border",children:t.map(r=>{let o=l.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)(ls,{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:l,decision:i,firstUnanswered:t,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=[l.primary,l.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=l.line===D&&v?null:l.line??j,z=d!==null&&l.primary==="accept"&&m===null&&i?.ready===!0&&h!==null&&h.accept==null,k=d!==null&&l.primary===null&&l.secondary==="accept",W=z?S("accept",!0,"Mark complete"):k?(0,a.jsx)(V,{variant:"primary",label:"Review and accept",href:t!==null?"#you-check-title":"#result-decision","data-review-and-accept":"",onClick:g=>{g.preventDefault(),t!==null?Re(t):ts()}}):null,w=z?{...l,primary:null}:l;function S(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 F=h??f;return F===null?null:(0,a.jsxs)(N,{action:F.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(F.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)(C,{type:"submit",variant:I?"primary":"outline",label:Ee??i.label,...A,"data-accept-result":""})]},g)}case"accept-anyway":{let F=s.failure?.acceptAnyway??null;return F==null?null:(0,a.jsxs)(N,{action:F.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(F.run)}),(0,a.jsx)("input",{type:"hidden",name:"return",value:F.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)(C,{type:"submit",variant:"outline",label:"Accept anyway",...A,"data-accept-result":""})]},g)}case"next-check":return t===null?null:(0,a.jsx)(C,{variant:I?"primary":"outline",label:"Go to your check",...A,onClick:()=>Re(t)},g);case"checks-running":return(0,a.jsx)(C,{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)(C,{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)(q,{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?S(w.primary,!0):w.secondary!==null&&S(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:S(Y,!1)}),Oe&&(0,a.jsx)(C,{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:l}){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)(Pe,{summary:s.summary}):i.key==="changes"?(0,a.jsx)(He,{changes:s.changes}):(0,a.jsx)(Ue,{checks:s.checks,runId:n})},i.key))]}),l,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 l=Math.round(n/60);return l<60?`${l} min`:`${Math.floor(l/60)} h${l%60===0?"":` ${l%60} min`}`}function H(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 l=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 ${l.slice(0,3).join(", ")}${l.length>3?` and ${l.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(l=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("dt",{className:"min-w-0 font-mono text-caption [overflow-wrap:anywhere]",children:l.host}),(0,a.jsx)("dd",{className:"text-right tabular-nums text-muted-foreground",children:l.refused>0?`refused ×${l.refused}`:`${l.connections}`})]},l.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),l=s.usage.in===null?`${R} tokens in`:`${H(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"}`,l,`${s.usage.out===null?R:H(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(([,l])=>(l??0)>0).sort((l,i)=>(i[1]??0)-(l[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:H(s.usage.in)," in",s.usage.cacheRead===null?"":` · ${H(s.usage.cacheRead)} read from cache`,s.usage.cacheWrite===null?"":` · ${H(s.usage.cacheWrite)} written to it`," · ",s.usage.out===null?R:H(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(([l,i])=>`${i} ${re[l]??l}`).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(l=>`${re[l.kind]?.replace(/s$/,"")??l.kind} ${K(l.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((l,i)=>(0,a.jsxs)("li",{children:["The same ",re[l.kind]?.replace(/s$/,"")??l.kind," step ",l.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,l=s.panel,i=l?.status==null?[]:Z(l.status),t=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))})}],...l===null||l.limits.length===0?[]:[{id:"limits",title:"What was shortened",hint:null,count:l.limits.length,body:(0,a.jsx)("ul",{className:"flex flex-col gap-1 text-body text-muted-foreground",children:l.limits.map(r=>(0,a.jsx)("li",{children:r},r))})}],...l?.reviewHistory==null?[]:[{id:"review-history",title:"Review history",hint:null,body:(0,a.jsx)("p",{className:"text-body text-muted-foreground",children:l.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})}],...t===null?[]:[{id:"run-record",title:"Run record",hint:`Build #${t.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:t.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:t.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:l}){let[i,t]=(0,E.useState)(new Map),d=(k,W)=>t(w=>{let S=new Map(w);return W===null?S.delete(k):S.set(k,W),S}),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,...Ne(s.decision.base??s.decision,h)},x=s.actFacts===void 0?s.acts:ve({...s.actFacts,...s.actFacts.accept===null?{}:{accept:{ready:u?.ready??!1}},unanswered:o.length,notRight:c.length}),f=k=>l?.current===!0&&k!==null&&fs.has(k)?null:k,p=l?.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:l?.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:l?.current===!0}),(0,a.jsx)(Ve,{report:s.agentReport,said:s.youSaid})]});return(0,a.jsxs)(a.Fragment,{children:[l?.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 vt({view:s,csrf:n}){let l=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:l?.title??"Results"}),l!==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:[l.project!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:l.project}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"})]}),l.record!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("a",{href:"#run-record",onClick:xs,className:U,children:["Build #",l.record.build]}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"})]}),(0,a.jsx)("a",{href:l.taskHref,className:U,children:"Open task"}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("a",{href:l.chatHref,className:U,children:"Discuss"})]})]}),l!==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,l!==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."})]}),l===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:l,csrf:n},`${l.taskId}:${l.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,l)=>(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,t)=>(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]})]})]},t))})]},l))})}export{bt as a,Te as b,ls as c,K as d,H as e,os as f,hs as g,us as h,js as i,vt as j};
@@ -0,0 +1,2 @@
1
+ /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
+ import{p11$a as h,p11$b as m}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p1$$ as Y,p1$$a as A,p1$$b as F,p1$A as P,p1$Aa as S,p1$Ab as z,p1$B as B,p1$Ba as C,p1$Bb as E,p1$C as G,p1$Ca as H,p1$Cb as I,p1$D as J,p1$Da as K,p1$Db as L,p1$E as M,p1$Ea as O,p1$Eb as Q,p1$F as U,p1$Fa as V,p1$Fb as W,p1$G as X,p1$Ga as Z,p1$Gb as _,p1$H as aa,p1$Ha as sa,p1$Hb as pa,p1$I as $a,p1$Ia as ea,p1$Ib as ba,p1$J as na,p1$Ja as ta,p1$Jb as ra,p1$K as oa,p1$Ka as ia,p1$Kb as la,p1$L as ca,p1$La as da,p1$Lb as ha,p1$M as ma,p1$Ma as ua,p1$Mb as xa,p1$N as ga,p1$Na as ja,p1$Nb as ka,p1$O as fa,p1$Oa as ya,p1$Ob as Na,p1$P as Ta,p1$Pa as qa,p1$Pb as Da,p1$Q as wa,p1$Qa as va,p1$Qb as Ra,p1$R as Ya,p1$Ra as Aa,p1$Rb as Fa,p1$S as Pa,p1$Sa as Sa,p1$Sb as za,p1$T as Ba,p1$Ta as Ca,p1$Tb as Ea,p1$U as Ga,p1$Ua as Ha,p1$Ub as Ia,p1$V as Ja,p1$Va as Ka,p1$Vb as La,p1$W as Ma,p1$Wa as Oa,p1$Wb as Qa,p1$X as Ua,p1$Xa as Va,p1$Xb as Wa,p1$Y as Xa,p1$Ya as Za,p1$Yb as _a,p1$Z as as,p1$Za as ss,p1$Zb as ps,p1$_ as $s,p1$_a as es,p1$_b as bs,p1$a as ns,p1$aa as ts,p1$ab as rs,p1$ac as os,p1$b as is,p1$ba as ls,p1$bb as cs,p1$bc as ds,p1$c as hs,p1$ca as ms,p1$cb as u,p1$cc as us,p1$d as xs,p1$da as gs,p1$db as js,p1$dc as ks,p1$e as fs,p1$ea as ys,p1$eb as Ns,p1$ec as Ts,p1$f as qs,p1$fa as Ds,p1$fb as ws,p1$fc as vs,p1$g as Rs,p1$ga as Ys,p1$gb as As,p1$gc as Fs,p1$h as Ps,p1$ha as Ss,p1$hb as zs,p1$hc as Bs,p1$i as Cs,p1$ia as Es,p1$ib as Gs,p1$ic as Hs,p1$j as Is,p1$ja as Js,p1$jb as Ks,p1$jc as Ls,p1$k as Ms,p1$ka as Os,p1$kb as Qs,p1$kc as Us,p1$l as Vs,p1$la as Ws,p1$lb as Xs,p1$lc as Zs,p1$m as _s,p1$ma as ap,p1$mb as sp,p1$n as pp,p1$na as $p,p1$nb as ep,p1$o as bp,p1$oa as np,p1$ob as tp,p1$p as rp,p1$pa as op,p1$pb as ip,p1$q as lp,p1$qa as cp,p1$qb as dp,p1$r as hp,p1$ra as mp,p1$rb as x,p1$s as up,p1$sa as xp,p1$sb as gp,p1$t as jp,p1$ta as kp,p1$tb as i,p1$u as fp,p1$ua as yp,p1$ub as Np,p1$v as Tp,p1$va as qp,p1$vb as Dp,p1$w as wp,p1$wa as vp,p1$wb as Rp,p1$x as Yp,p1$xa as Ap,p1$xb as Fp,p1$y as Pp,p1$ya as Sp,p1$yb as zp,p1$z as Bp,p1$za as Cp,p1$zb as Ep}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js";import{p2$a as Ip,p2$b as g,p2$c as Jp,p2$d as Kp,p2$e as j}from"./chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.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 f({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:m(a.at),children:h(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 Qp({report:a,said:$}){if(a==null)return null;let e=$??[],{always:c,more:t}=T(a),y=t.slice(0,k),r=t.slice(k),d=q(a),o=c.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:[c.map((p,b)=>(0,s.jsx)(l,{line:p},`a${b}`)),y.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))})}),d!==null&&(0,s.jsx)(x,{children:d}),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)(f,{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)(f,{one:p},`${p.kind}${p.at}${p.note}`))})})]})]})}export{Qp as a};