toolroll 0.9.134 → 0.9.136

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 (277) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/acp-check-repo-schema.js +52 -0
  3. package/dist/acp-check.js +1 -1
  4. package/dist/acp-client.js +3 -3
  5. package/dist/acp-inspect.js +2 -1
  6. package/dist/agent-detect.js +1 -1
  7. package/dist/agent-fence.js +4 -4
  8. package/dist/agent-thread/chat-turn.js +2 -2
  9. package/dist/agent-thread/direct-host.js +2 -2
  10. package/dist/agent-thread/fence.js +2 -2
  11. package/dist/agent-thread/git-workspace.js +2 -2
  12. package/dist/agent-thread/guards.js +1 -1
  13. package/dist/agent-thread/providers.js +1 -1
  14. package/dist/agent-thread/ship.js +2 -2
  15. package/dist/approval-decision.js +1 -0
  16. package/dist/approval-password.js +1 -1
  17. package/dist/approval-summary.js +1 -1
  18. package/dist/attest.js +1 -1
  19. package/dist/batch-checks.js +2 -2
  20. package/dist/boot-identity.js +1 -1
  21. package/dist/bounded-spawn.js +2 -2
  22. package/dist/browser/{chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js → chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js} +4 -4
  23. package/dist/browser/chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js.br +0 -0
  24. package/dist/browser/chunk-agents-live-view.9f4367c89c6366769a567e729ac9181ccaa898bf3a168d3dc618f3cface887c7.js.gz +0 -0
  25. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js +2 -0
  26. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js.br +0 -0
  27. package/dist/browser/chunk-bundle.ac5952c82c76e2efcdcf5a097c4fa235d6f1045dcc36d02ee921ff4be976a46a.js.gz +0 -0
  28. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js +4 -0
  29. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js.br +0 -0
  30. package/dist/browser/chunk-chat-parts.2a0b0b723508c5c48379f6a3d441f07a18c8b91ed64fd018962931c5ae43331e.js.gz +0 -0
  31. package/dist/browser/{chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js → chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js} +12 -12
  32. package/dist/browser/chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js.br +0 -0
  33. package/dist/browser/chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js.gz +0 -0
  34. package/dist/browser/{chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js → chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js} +7 -7
  35. package/dist/browser/chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js.br +0 -0
  36. package/dist/browser/chunk-flow-view.f5d74c7f072b739a7a0ed86ff35cafa7b8a041233372d1eeaab9eb941ddfc11e.js.gz +0 -0
  37. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js +4 -0
  38. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js.br +0 -0
  39. package/dist/browser/chunk-flows-extra-view.01ebf93780b729363eda11ba21c764fe593bcd3e684aa833c9b86147f780fd41.js.gz +0 -0
  40. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js +6 -0
  41. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js.br +0 -0
  42. package/dist/browser/chunk-pages-bundle.e18059f0cb4fbb63e3698971d4c1830ad0945c3645235babc93010cd0b725c1d.js.gz +0 -0
  43. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js +2 -0
  44. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js.br +0 -0
  45. package/dist/browser/chunk-result-view.fc6a6494b316aa786807b7d17035c59defae1bfb0c03bf9c3795679b3a35dd77.js.gz +0 -0
  46. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js +20 -0
  47. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js.br +0 -0
  48. package/dist/browser/chunk-settings-view.6dd3a64ded7bd8c047650270918dfb455c9a514a5a40b84c7eb5f443f76fe66f.js.gz +0 -0
  49. package/dist/browser/{chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js → chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js} +2 -2
  50. package/dist/browser/chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js.br +0 -0
  51. package/dist/browser/chunk-shared.02c0b692de21a9bb80d1761aa887d8532431171945c02e663884c9f45b796753.js.gz +0 -0
  52. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js +2 -0
  53. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js.br +0 -0
  54. package/dist/browser/chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js.gz +0 -0
  55. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js +2 -0
  56. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js.br +0 -0
  57. package/dist/browser/chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js.gz +0 -0
  58. package/dist/browser/{chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js → chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js} +3 -3
  59. package/dist/browser/chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js.br +0 -0
  60. package/dist/browser/chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js.gz +0 -0
  61. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js +2 -0
  62. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js.br +0 -0
  63. package/dist/browser/chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js.gz +0 -0
  64. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js +2 -0
  65. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js.br +0 -0
  66. package/dist/browser/chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js.gz +0 -0
  67. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js +2 -0
  68. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js.br +0 -0
  69. package/dist/browser/chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js.gz +0 -0
  70. package/dist/browser/{chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js → chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js} +3 -3
  71. package/dist/browser/chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js.br +0 -0
  72. package/dist/browser/chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js.gz +0 -0
  73. package/dist/browser/{chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js → chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js} +1 -1
  74. package/dist/browser/chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js.br +0 -0
  75. package/dist/browser/chunk-sonner.2472e1da55de10b11dc002c80a840966061e817c47793f5e216f1af6c6dbedff.js.gz +0 -0
  76. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js +2 -0
  77. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js.br +0 -0
  78. package/dist/browser/chunk-task-view.bbeddc793a5e8a6d1f66b6cc5f0ce1da18414137e85c49ccd07be0e20f61ac12.js.gz +0 -0
  79. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js +2 -0
  80. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js.br +0 -0
  81. package/dist/browser/chunk-team-chat.c3255a5a1d94e39d559c07438c4690543602b1552b2c2bf57b8791d7f989141d.js.gz +0 -0
  82. package/dist/browser/manifest.json +194 -194
  83. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css +4 -0
  84. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css.br +0 -0
  85. package/dist/browser/workspace.3043c4a6df23ed1c0c8be3fb816fa9410a2ab99053eb54476f22a1735c03ca97.css.gz +0 -0
  86. package/dist/browser/{workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js → workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js} +4 -4
  87. package/dist/browser/workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js.br +0 -0
  88. package/dist/browser/workspace.aebb60d4e5ef4509a80cfaccf0af5f7246867ec7531a1734dd8e28c59594950e.js.gz +0 -0
  89. package/dist/browser-open.js +1 -1
  90. package/dist/build-review.js +2 -2
  91. package/dist/builder.js +21 -14
  92. package/dist/canvas-capture.js +2 -2
  93. package/dist/canvas-freshness.js +1 -1
  94. package/dist/central-recovery-stage.js +1 -1
  95. package/dist/chat-actions.js +3 -3
  96. package/dist/chat-decide.js +8 -4
  97. package/dist/cli-help.js +8 -7
  98. package/dist/cli.js +2 -2
  99. package/dist/companion/bonjour.js +1 -1
  100. package/dist/companion/daemon.js +1 -1
  101. package/dist/companion/passkey-gate.js +1 -1
  102. package/dist/companion/reads.js +1 -1
  103. package/dist/companion/store.js +1 -1
  104. package/dist/companion/webauthn.js +1 -1
  105. package/dist/companion/work.js +1 -1
  106. package/dist/container-state.js +2 -2
  107. package/dist/containment.js +2 -2
  108. package/dist/contracts/chat-actions.js +1 -1
  109. package/dist/contracts/console-api.js +1 -1
  110. package/dist/contracts/engine-api.js +1 -1
  111. package/dist/controller-supervisor.js +2 -2
  112. package/dist/credential-broker.js +1 -1
  113. package/dist/demo.js +2 -2
  114. package/dist/easy-start.js +1 -1
  115. package/dist/egress.js +1 -1
  116. package/dist/engine-handoff.js +1 -1
  117. package/dist/engine-reads.js +1 -1
  118. package/dist/evals.js +2 -2
  119. package/dist/exec.js +4 -4
  120. package/dist/fast-owner-schema.js +33 -0
  121. package/dist/fast-start.js +1 -1
  122. package/dist/flow-unattended.js +2 -2
  123. package/dist/github-import.js +1 -1
  124. package/dist/github-read.js +1 -1
  125. package/dist/install-mode.js +2 -3
  126. package/dist/invoke.js +9 -7
  127. package/dist/laptop-background.js +1 -1
  128. package/dist/lead-capabilities.js +1 -1
  129. package/dist/live-backup-change.js +2 -2
  130. package/dist/live-backup.js +2 -2
  131. package/dist/live-terminal.js +3 -3
  132. package/dist/local-checks.js +1 -1
  133. package/dist/local-landing.js +22 -3
  134. package/dist/local-owner.js +1 -1
  135. package/dist/machine-identity.js +1 -1
  136. package/dist/model-catalog.js +8 -5
  137. package/dist/model-choices.js +3 -3
  138. package/dist/model-routing.js +1 -1
  139. package/dist/models-cli.js +2 -2
  140. package/dist/names.js +1 -1
  141. package/dist/onboard.js +1 -1
  142. package/dist/operate-remote-arguments.js +1 -1
  143. package/dist/operate.js +33 -16
  144. package/dist/orphan-sweep.js +1 -1
  145. package/dist/owner-mode.js +4 -0
  146. package/dist/peek-cli.js +2 -2
  147. package/dist/phase-routing.js +1 -1
  148. package/dist/pi-build.js +1 -1
  149. package/dist/plane-review.js +1 -1
  150. package/dist/planner-source.js +2 -2
  151. package/dist/planner.js +1 -1
  152. package/dist/pre-run-phase.js +1 -1
  153. package/dist/presence-hold.js +1 -1
  154. package/dist/process-liveness.js +1 -1
  155. package/dist/process-tree.js +1 -1
  156. package/dist/project-tools.js +2 -2
  157. package/dist/prompt.js +1 -1
  158. package/dist/proposal.js +1 -1
  159. package/dist/protected-storage.js +2 -2
  160. package/dist/provider-home.js +1 -1
  161. package/dist/provider-limits.js +1 -1
  162. package/dist/provider.js +2 -2
  163. package/dist/public-access.js +1 -1
  164. package/dist/pull-request-flow.js +2 -2
  165. package/dist/read-executor.js +1 -1
  166. package/dist/release-adapters.js +2 -2
  167. package/dist/release-carry.js +3 -3
  168. package/dist/release-resume.js +2 -2
  169. package/dist/release-start.js +1 -0
  170. package/dist/result-follow-ups.js +2 -2
  171. package/dist/review-switch.js +1 -1
  172. package/dist/route-change.js +25 -3
  173. package/dist/run-closeout.js +2 -2
  174. package/dist/runner.js +1 -1
  175. package/dist/sandbox-launch.js +2 -2
  176. package/dist/sandbox-runtime.js +1 -1
  177. package/dist/scope.js +1 -1
  178. package/dist/scout-browser.js +1 -1
  179. package/dist/serve.js +3 -3
  180. package/dist/server/chat.js +1 -1
  181. package/dist/server/direct-chat.js +1 -1
  182. package/dist/server/engine-api.js +1 -1
  183. package/dist/server/http.js +1 -1
  184. package/dist/server/one-time-secret.js +1 -1
  185. package/dist/server/route-table.js +1 -1
  186. package/dist/server/runtime.js +1 -1
  187. package/dist/server/settings-phone.js +1 -1
  188. package/dist/server/settings-section-table.js +1 -1
  189. package/dist/server/settings-sections.js +1 -1
  190. package/dist/server/settings.js +2 -1
  191. package/dist/server/task-view-data.js +3 -3
  192. package/dist/server/task-views.js +1 -1
  193. package/dist/server/tasks.js +5 -5
  194. package/dist/server/terminals.js +1 -1
  195. package/dist/settings-data.js +1 -1
  196. package/dist/settings-proofs.js +1 -1
  197. package/dist/shared-deps.js +4 -4
  198. package/dist/sign-in-page.js +2 -2
  199. package/dist/ssr-workspace.js +88 -88
  200. package/dist/staged-runtimes.js +1 -1
  201. package/dist/status-probe.js +2 -2
  202. package/dist/stop-proof.js +2 -2
  203. package/dist/storage-sweep-child.js +2 -2
  204. package/dist/storage-sweep-process.js +1 -1
  205. package/dist/storage.js +2 -2
  206. package/dist/store-baseline.js +5 -33
  207. package/dist/store.js +19 -14
  208. package/dist/subscription-usage.js +3 -3
  209. package/dist/surface.js +1 -1
  210. package/dist/test-temp.js +1 -1
  211. package/dist/tool-broker.js +1 -1
  212. package/dist/toolroll-update.js +3 -3
  213. package/dist/tui/darwin-arm64/toolroll-tui +0 -0
  214. package/dist/tui/darwin-x64/toolroll-tui +0 -0
  215. package/dist/tui/linux-arm64/toolroll-tui +0 -0
  216. package/dist/tui/linux-x64/toolroll-tui +0 -0
  217. package/dist/tui-launch.js +1 -1
  218. package/dist/welcome-facts.js +1 -1
  219. package/package.json +1 -1
  220. package/dist/browser/chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js.br +0 -0
  221. package/dist/browser/chunk-agents-live-view.e97fbf607cb8075aad7a48664556d11ea41469785f82384b5171b76c524f71e2.js.gz +0 -0
  222. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js +0 -2
  223. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js.br +0 -0
  224. package/dist/browser/chunk-bundle.48f442a2868e9b77e9f54c5b77f1bba629ccd1615de8a2f62619b811783314f6.js.gz +0 -0
  225. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js +0 -4
  226. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js.br +0 -0
  227. package/dist/browser/chunk-chat-parts.1669e6985c5c0c11eea6792ea177ea4c9f7e7ebf27bd3b31742feb6a26d5b2a5.js.gz +0 -0
  228. package/dist/browser/chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js.br +0 -0
  229. package/dist/browser/chunk-core.64343d638685133eb96578bfb35bf560f329d0743ac5deda720ae27f5699c9d9.js.gz +0 -0
  230. package/dist/browser/chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js.br +0 -0
  231. package/dist/browser/chunk-flow-view.264e801af330461985aadcab42bc4ac4e036ba124394a7b5a100f2cd1edf89f0.js.gz +0 -0
  232. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js +0 -4
  233. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js.br +0 -0
  234. package/dist/browser/chunk-flows-extra-view.6761503a97e1f17b474703ff5687a8682c54f9db1715e0a9762a979030a1b036.js.gz +0 -0
  235. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js +0 -6
  236. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js.br +0 -0
  237. package/dist/browser/chunk-pages-bundle.365da73d009e3ced30b55bca7107f548dc832f7a9f52926d3dcd68aa5596da11.js.gz +0 -0
  238. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js +0 -2
  239. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js.br +0 -0
  240. package/dist/browser/chunk-result-view.d4dc562a1a6a52a1497e25300d5f80c220952ceb5bb719ca32ef8dc1e74a4124.js.gz +0 -0
  241. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js +0 -20
  242. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js.br +0 -0
  243. package/dist/browser/chunk-settings-view.ff302e1c5faf5486c96e5fc96fa32492da4153e6e19997ce7b718adab21bf3b7.js.gz +0 -0
  244. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js +0 -2
  245. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js.br +0 -0
  246. package/dist/browser/chunk-shared.152678a803cfb6dee935162fbbbdb38d031d80f1d32ce48610f37bc1c8621e49.js.gz +0 -0
  247. package/dist/browser/chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js.br +0 -0
  248. package/dist/browser/chunk-shared.26f6cbfdeb9bcd63231f23dbf96cacb39b78324aeed2503e86109efa89fa27db.js.gz +0 -0
  249. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js +0 -2
  250. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js.br +0 -0
  251. package/dist/browser/chunk-shared.4e21c6b33b9a525e63c360d20a1830f1a26c5021f5d218f2300f21ff840af27e.js.gz +0 -0
  252. package/dist/browser/chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js.br +0 -0
  253. package/dist/browser/chunk-shared.5b47ca221b8b77b26ce8006f0569c981df2b905005cebe9fc54444d4906d436e.js.gz +0 -0
  254. package/dist/browser/chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js.br +0 -0
  255. package/dist/browser/chunk-shared.85e1b9e0838ccc819e7b8368f80dd5240dda90f53ea2974a256a8fa4122ba2fb.js.gz +0 -0
  256. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js +0 -2
  257. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js.br +0 -0
  258. package/dist/browser/chunk-shared.a326d625dea5cda744678a73b38c0cb2688721c9228e26d262279ecd5c2d7d11.js.gz +0 -0
  259. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js +0 -2
  260. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js.br +0 -0
  261. package/dist/browser/chunk-shared.e906e9c8c0859e000616dbc382f88597447f30205c92b7cb9a8e2351f3ef2722.js.gz +0 -0
  262. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js +0 -2
  263. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js.br +0 -0
  264. package/dist/browser/chunk-shared.f6354151d62439f2d78f5d17cf9bc44f35b4da37685beb77467d98dd9cc6f1e4.js.gz +0 -0
  265. package/dist/browser/chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js.br +0 -0
  266. package/dist/browser/chunk-sonner.160372eb4f9455847ca83e8ff5d983c6b3010ef0dc2eaf541e2eaceaac3b994c.js.gz +0 -0
  267. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js +0 -2
  268. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js.br +0 -0
  269. package/dist/browser/chunk-task-view.325b506afc26b25147b2e90cec5ad1392d50e6150a7fb33c81a996daa99bb05a.js.gz +0 -0
  270. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js +0 -2
  271. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js.br +0 -0
  272. package/dist/browser/chunk-team-chat.d560bcc5d819e63133d377b8a6f10f901356e680771f19d4fe1af044adfffb22.js.gz +0 -0
  273. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css +0 -4
  274. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css.br +0 -0
  275. package/dist/browser/workspace.ac1270b58f672fa920535348cc582f5fc68247b341d6fc8ec733b25336f2b9cc.css.gz +0 -0
  276. package/dist/browser/workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js.br +0 -0
  277. package/dist/browser/workspace.efd01c3aaf8e07c4a64194e2bfbd7aee4f7fa515f2acebdfdd90af1badba8ce7.js.gz +0 -0
@@ -0,0 +1,6 @@
1
+ /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
+ import{a as Ve}from"./chunk-shared.2413dd78f32995fbca67f51ac8c21baf4727cd64f185ea739aa2a058e569b0ed.js";import{p5$a as Xe,p5$b as es}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{a as Le}from"./chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js";import{p10$A as ts,p10$B as ns,p10$C as is,p10$D as ls,p10$E as rs,p10$F as ds,p10$G as cs,p10$H as os,p10$I as hs,p10$J as ps,p10$a as ms,p10$b as us,p10$c as xs,p10$d as js,p10$e as gs,p10$f as fs,p10$g as bs,p10$h as ks,p10$i as vs,p10$j as ys,p10$k as ws,p10$l as Ns,p10$m as $s,p10$n as Cs,p10$o as Ss,p10$p as Fs,p10$q as Ts,p10$r as Is,p10$s as Rs,p10$t as As,p10$u as qs,p10$v as Ps,p10$w as Ws,p10$x as Us,p10$y as Hs,p10$z as Ds}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p11$a as se,p11$b as ge}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p1$$ as Ms,p1$$a as Bs,p1$$b as Gs,p1$A as Ys,p1$Aa as Ks,p1$Ab as V,p1$B as _s,p1$Ba as Js,p1$Bb as L,p1$C as zs,p1$Ca as Te,p1$Cb as Qs,p1$D as Zs,p1$Da as Xs,p1$Db as ea,p1$E as sa,p1$Ea as aa,p1$Eb as ta,p1$F as X,p1$Fa as na,p1$Fb as ia,p1$G as me,p1$Ga as la,p1$Gb as ra,p1$H as ie,p1$Ha as da,p1$Hb as ca,p1$I as x,p1$Ia as oa,p1$Ib as ha,p1$J as pa,p1$Ja as ma,p1$Jb as le,p1$K as ua,p1$Ka as xa,p1$Kb as ja,p1$L as ga,p1$La as fa,p1$Lb as ba,p1$M as ka,p1$Ma as va,p1$Mb as ya,p1$N as wa,p1$Na as Na,p1$Nb as $a,p1$O as Ca,p1$Oa as Sa,p1$Ob as Fa,p1$P as Ta,p1$Pa as Ia,p1$Pb as Ra,p1$Q as Aa,p1$Qa as qa,p1$Qb as Pa,p1$R as Wa,p1$Ra as Ua,p1$Rb as Ha,p1$S as Da,p1$Sa as Oa,p1$Sb as Va,p1$T as La,p1$Ta as Ea,p1$Tb as ve,p1$U as Ma,p1$Ua as Ba,p1$Ub as Ga,p1$V as Ya,p1$Va as Ka,p1$Vb as ue,p1$W as _a,p1$Wa as Ja,p1$Wb as za,p1$X as Qa,p1$Xa as Za,p1$Xb as ae,p1$Y as Xa,p1$Ya as et,p1$Yb as st,p1$Z as at,p1$Za as tt,p1$Zb as nt,p1$_ as it,p1$_a as lt,p1$_b as rt,p1$a as dt,p1$aa as ct,p1$ab as ot,p1$ac as ht,p1$b as pt,p1$ba as mt,p1$bb as ut,p1$bc as xt,p1$c as jt,p1$ca as gt,p1$cb as f,p1$cc as ft,p1$d as bt,p1$da as kt,p1$db as N,p1$dc as vt,p1$e as yt,p1$ea as wt,p1$eb as W,p1$ec as Nt,p1$f as $t,p1$fa as Ct,p1$fb as St,p1$fc as Ie,p1$g as Ft,p1$ga as Tt,p1$gb as It,p1$gc as Rt,p1$h as At,p1$ha as qt,p1$hb as ye,p1$hc as Pt,p1$i as Wt,p1$ia as Ut,p1$ib as Ht,p1$ic as Dt,p1$j as Y,p1$ja as Ot,p1$jb as Vt,p1$jc as Lt,p1$k as J,p1$ka as Et,p1$kb as Re,p1$kc as Mt,p1$l as re,p1$la as Bt,p1$lb as pe,p1$lc as Gt,p1$m as Yt,p1$ma as Kt,p1$mb as _t,p1$mc as Jt,p1$n as zt,p1$na as Qt,p1$nb as Zt,p1$nc as Xt,p1$o as en,p1$oa as sn,p1$ob as we,p1$p as an,p1$pa as tn,p1$pb as U,p1$q as nn,p1$qa as ln,p1$qb as G,p1$r as rn,p1$ra as dn,p1$rb as A,p1$s as cn,p1$sa as on,p1$sb as de,p1$t as hn,p1$ta as pn,p1$tb as p,p1$u as mn,p1$ua as un,p1$ub as ee,p1$v as xn,p1$va as jn,p1$vb as z,p1$w as gn,p1$wa as fn,p1$wb as Ne,p1$x as bn,p1$xa as kn,p1$xb as te,p1$y as vn,p1$ya as yn,p1$yb as E,p1$z as wn,p1$za as Nn,p1$zb as $e}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p2$a as Sn,p2$b as xe,p2$c as Ce,p2$d as Fn,p2$e as Se}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";var I=xe(Ce(),1),e=xe(Se(),1),Ee=[["","All events"],["work","Work"],["request","Requests"],["access","Access"],["sign-in","Sign-ins"],["policy","Policy changes"]],Ae=s=>s===""?"":s[0].toUpperCase()+s.slice(1),Q=(s,i,t=`${i}s`)=>`${s} ${s===1?i:t}`,ce=({id:s,label:i,children:t})=>(0,e.jsxs)("div",{className:"k-field",children:[(0,e.jsx)("label",{className:"k-label",htmlFor:s,children:i}),t]});function fe(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}var qe="toolroll.dev";function Pe(){if(typeof location>"u")return!1;let s=location.hostname.toLowerCase();return s===qe||s.endsWith(`.${qe}`)}function Un({view:s}){let i=[s.filters.project,s.filters.actor,s.filters.source,s.filters.outcome,s.filters.task].filter(Boolean).length;return(0,e.jsxs)("div",{className:"h-page h-ledger","data-kit-page":"",children:[(0,e.jsx)($e,{title:"Audit log",ctx:"What people and tokens did, newest first. Times in UTC.",right:(0,e.jsx)(N,{sm:!0,variant:"ghost",href:s.csvHref,download:!0,label:"Export CSV"})}),(0,e.jsxs)("div",{className:"h-tools-row",children:[(0,e.jsxs)("section",{className:"h-chain","aria-label":"Audit log integrity",children:[s.chain.ok?(0,e.jsx)(de,{children:(0,e.jsxs)("span",{"data-ledger-chain":"ok",children:["Chain verified · ",s.chain.entries," entries through #",s.chain.through??0," · head"," ",(0,e.jsxs)("span",{className:"k-mono",children:[s.chain.head.slice(0,16),"…"]}),s.chain.checkedAt!==null&&` · checked in full ${s.chain.checkedAt.slice(11,16)} UTC`]})}):(0,e.jsx)(A,{children:(0,e.jsxs)("span",{"data-ledger-chain":"broken",children:["Chain broken: ",s.chain.problemWhat??"the chain doesn't verify"]})}),s.chain.latest!==null&&(0,e.jsxs)(p,{children:["Latest checkpoint (",s.chain.latest.at.slice(0,16).replace("T"," ")," UTC). Copy it somewhere outside this machine:"," ",(0,e.jsxs)("span",{className:"k-mono h-select",children:[s.chain.latest.through,":",s.chain.latest.hash]})]}),s.chain.canCheckpoint&&(0,e.jsx)(x,{action:"/ledger/checkpoint",className:"h-inline",children:(0,e.jsx)(f,{sm:!0,type:"submit",label:"Make a checkpoint"})}),(0,e.jsxs)(z,{summary:"Audit export",children:[(0,e.jsxs)("form",{method:"get",action:"/ledger/export",className:"h-filters h-export","aria-label":"Audit export",children:[(0,e.jsx)(ce,{id:"ledger-from",label:"From",children:(0,e.jsx)("input",{className:"k-input",id:"ledger-from",type:"date",name:"from",defaultValue:s.chain.exportStart,required:!0})}),(0,e.jsx)(ce,{id:"ledger-to",label:"To",children:(0,e.jsx)("input",{className:"k-input",id:"ledger-to",type:"date",name:"to",defaultValue:s.chain.exportEnd,required:!0})}),(0,e.jsx)("div",{className:"k-acts",children:(0,e.jsx)(f,{sm:!0,type:"submit",label:"Download"})})]}),(0,e.jsx)(p,{children:"Every entry in the range with its seal, and a full record for each task it names. JSON."})]})]}),(0,e.jsx)(z,{summary:`Filters · ${i===0?"all actions":`${i} active`}`,open:i>0,children:(0,e.jsxs)("form",{method:"get",action:"/ledger",className:"h-filters","aria-label":"Filter the audit log",children:[(0,e.jsx)(ce,{id:"ledger-project",label:"Project",children:(0,e.jsx)(pe,{id:"ledger-project",name:"project",wide:!0,defaultValue:s.filters.project,items:[["","All your projects"],...s.projects.map(t=>[t.path,t.name])]})}),(0,e.jsx)(ce,{id:"ledger-actor",label:"Person or worker",children:(0,e.jsx)("input",{className:"k-input",id:"ledger-actor",type:"text",name:"actor",defaultValue:s.filters.actor,placeholder:"Anyone"})}),(0,e.jsx)(ce,{id:"ledger-source",label:"Events",children:(0,e.jsx)(pe,{id:"ledger-source",name:"source",wide:!0,defaultValue:s.filters.source,items:Ee})}),(0,e.jsx)(ce,{id:"ledger-outcome",label:"Outcome",children:(0,e.jsx)("input",{className:"k-input",id:"ledger-outcome",type:"text",name:"outcome",defaultValue:s.filters.outcome,placeholder:"Any outcome"})}),(0,e.jsx)(ce,{id:"ledger-task",label:"Task",children:(0,e.jsx)("input",{className:"k-input",id:"ledger-task",type:"text",name:"task",defaultValue:s.filters.task,placeholder:"Any task"})}),(0,e.jsxs)("div",{className:"k-acts",children:[(0,e.jsx)(f,{sm:!0,type:"submit",label:"Filter"}),(0,e.jsx)(N,{sm:!0,variant:"ghost",href:"/ledger",label:"Clear"})]})]})})]}),s.rows.length===0?(0,e.jsx)(ee,{title:i===0?"Nothing yet.":"No actions match these filters.",text:i===0?"Approvals, invites, tokens and sign-ins appear here.":"Clear the filters to see every action."}):(0,e.jsx)("div",{className:"h-audit-list","aria-label":"Action history",children:s.rows.map(t=>(0,e.jsxs)("article",{className:"h-audit","data-ledger-id":t.id,children:[(0,e.jsx)("span",{className:"h-audit-time k-num",children:(0,e.jsx)("time",{dateTime:t.at,title:ge(t.at),children:ge(t.at)})}),(0,e.jsxs)("span",{className:"h-audit-what",children:[(0,e.jsx)("a",{className:"h-actor",href:t.actorHref,title:"Only this actor's actions",children:t.actor})," ",t.action,t.detail!==null&&(0,e.jsx)("span",{className:"h-audit-detail",children:t.detail})]}),(0,e.jsxs)("span",{className:"h-audit-place",children:[t.place," ",t.subject!==null&&(0,e.jsx)("a",{className:t.subject.mono?"k-link k-mono":"k-link",href:t.subject.href,children:t.subject.label})]}),(0,e.jsxs)("span",{className:"h-audit-out",children:[t.outcome," · ",t.source]})]},t.id))}),(0,e.jsxs)("div",{className:"h-foot-row",children:[(s.newestHref!==null||s.nextHref!==null)&&(0,e.jsxs)(U,{children:[s.newestHref!==null&&(0,e.jsx)(N,{sm:!0,variant:"ghost",href:s.newestHref,label:"Newest actions"}),s.nextHref!==null&&(0,e.jsx)(N,{sm:!0,variant:"ghost",href:s.nextHref,rel:"next",label:"Older actions"})]}),(0,e.jsx)(p,{children:"Accepted requests record acceptance; worker events record results. History starts from the upgrade that added it. Review evidence is on each task or run. The CSV holds every matching action."})]})]})}function Hn({view:s}){return(0,e.jsx)("div",{"data-kit-page":"",children:s.sections.map(i=>(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"menu-group-label",children:i.label}),(0,e.jsx)("div",{className:"menu-list",children:i.rows.map(t=>(0,e.jsxs)("a",{className:"menu-row",href:t.href,children:[(0,e.jsx)("strong",{children:t.label}),(0,e.jsx)("span",{className:"meta",children:t.hint})]},t.href))})]},i.label))})}function Dn({view:s}){return(0,e.jsx)(ve,{path:s.path,title:s.title,...s.text===void 0?{}:{text:s.text}})}function On({view:s}){return(0,e.jsx)("div",{className:"k-refusal",children:s.notFound!==null?(0,e.jsx)(ve,{path:s.notFound.path,title:s.notFound.title,text:s.notFound.text}):(0,e.jsxs)("div",{className:"k-doc",children:[(0,e.jsx)("a",{className:"k-backlink",href:s.backHref,children:"Back"}),(0,e.jsx)("header",{className:"k-dh",children:(0,e.jsx)("div",{children:(0,e.jsx)("h1",{children:"Request refused"})})}),(0,e.jsx)(A,{children:s.message}),(0,e.jsx)(U,{children:s.act===null?(0,e.jsx)(N,{variant:"outline",href:s.backHref,label:"Go back"}):(0,e.jsx)(N,{variant:"primary",href:s.act.href,label:s.act.label})})]})})}function Vn({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.heading}),(0,e.jsx)("p",{children:s.body}),(0,e.jsx)("p",{className:"refusal-back",children:(0,e.jsx)("a",{className:"button-link",href:s.backHref,children:s.backLabel})})]})}function Ln({view:s}){let i=s.open?(0,e.jsx)(N,{variant:"primary",lead:"plus",label:"New task",href:"/tasks/new",className:"k-desk-only"}):(0,e.jsxs)(x,{action:"/projects/select",id:"project-open",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:s.selfHref}),(0,e.jsx)("input",{type:"hidden",name:"path",value:s.path}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Open project",className:"k-desk-only"})]}),t=(n,l,r)=>s.open&&n>0?(0,e.jsxs)("a",{className:"k-link",href:r,children:[n," ",l]}):(0,e.jsxs)("span",{children:[n," ",l]});return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:s.name,back:"/projects"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:["/projects","Projects"],title:s.name,meta:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("code",{className:"k-mono",children:s.shortPath})," · ",s.openedWords]}),right:i,same:!0}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"p-now",children:[(0,e.jsx)("h3",{id:"p-now",children:"Now"}),s.peek===null?(0,e.jsx)(p,{children:"Not scanned yet."}):(0,e.jsxs)("p",{children:[t(s.peek.waiting,s.peek.waiting===1?"needs you":"need you","/")," ·"," ",t(s.peek.running,"running","/")," ·"," ",t(s.peek.queued,"queued","/?view=order")," ·"," ",t(s.peek.doneRecently,"built today","/?view=done")]})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"p-tasks",children:[(0,e.jsx)("h3",{id:"p-tasks",children:"Tasks"}),s.tasks.length===0?(0,e.jsxs)(p,{children:["Nothing needs you or is running in ",s.name,"."]}):(0,e.jsxs)(e.Fragment,{children:[s.tasks.map((n,l)=>(0,e.jsx)(te,{href:n.href,chip:n.needs?(0,e.jsx)(W,{word:"Needs you",tone:"needs"}):(0,e.jsx)(W,{word:"Running",tone:"live"}),title:n.title,desc:n.reason,wait:n.needs,meta:n.age!==null?(0,e.jsx)("span",{className:"k-num",children:n.age}):void 0},l)),s.moreTasks>0&&(0,e.jsx)(p,{children:s.open?(0,e.jsxs)("a",{className:"k-link",href:"/",children:[s.moreTasks," more in Work"]}):`${s.moreTasks} more`})]})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"p-setup",children:[(0,e.jsx)("h3",{id:"p-setup",children:"Setup"}),(0,e.jsx)(G,{rows:[["Folder",(0,e.jsx)("code",{className:"k-mono",children:s.path})],...s.setup.checks!==null?[["Checks",(0,e.jsx)("a",{className:"k-link",href:s.setup.checks.href,children:s.setup.checks.level})]]:[],...s.setup.pullRequests!==null?[["Pull requests",(0,e.jsx)("a",{className:"k-link",href:s.setup.pullRequests.href,children:s.setup.pullRequests.on?"On":"Off"})]]:[],["Knowledge",(0,e.jsx)("a",{className:"k-link",href:s.setup.knowledgeHref,children:"Open knowledge"})],...s.setup.codeMapHref!==null?[["Code map",(0,e.jsx)("a",{className:"k-link",href:s.setup.codeMapHref,children:"Open code map"})]]:[],...s.setup.flakyHref!==null?[["Flaky tests",(0,e.jsx)("a",{className:"k-link",href:s.setup.flakyHref,children:"Open flaky tests"})]]:[]]}),s.setup.settingsHref!==null&&(0,e.jsxs)(p,{children:["Network access, the sandbox and removing the project are in ",(0,e.jsx)("a",{className:"k-link",href:s.setup.settingsHref,children:"Settings → Project"}),"."]})]}),s.activity!==null&&(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"p-activity",children:[(0,e.jsx)("h3",{id:"p-activity",children:"Activity"}),s.activity.unavailable?(0,e.jsx)(A,{children:"Activity is unavailable right now. Nothing changed. Reload the page to try again."}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(p,{children:s.activity.scope}),s.activity.limitNote!==null&&(0,e.jsx)(p,{children:s.activity.limitNote}),s.activity.metrics.map(n=>(0,e.jsxs)(z,{summary:`${n.label} · ${n.value}`,children:[(0,e.jsx)(p,{children:n.detail}),n.rows.length===0?(0,e.jsx)(p,{children:"No tasks in this group."}):n.rows.map((l,r)=>(0,e.jsx)(te,{href:l.href,chip:null,title:l.title,desc:l.desc,meta:l.elapsed!==null?(0,e.jsx)("span",{className:"k-num",children:l.elapsed}):void 0},r))]},n.label))]})]})]}),(0,e.jsx)(ue,{children:s.open?(0,e.jsx)(N,{variant:"primary",lead:"plus",label:"New task",href:"/tasks/new"}):(0,e.jsx)(f,{variant:"primary",type:"submit",form:"project-open",label:"Open project"})})]})}function En({view:s}){let i=t=>`/projects/browse?at=${encodeURIComponent(t)}`;return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Choose a folder",back:"/projects"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:["/projects","Projects"],title:"Choose a folder",meta:(0,e.jsx)("code",{className:"k-mono",children:s.here}),right:s.parentHref!==null?(0,e.jsx)(N,{sm:!0,variant:"ghost",lead:"back",href:s.parentHref,label:"Up one folder"}):void 0,same:!0}),s.roots.length>1&&(0,e.jsx)(Re,{label:"Projects folders",current:s.root,items:s.roots.map(t=>({key:t.path,label:t.name,href:t.href}))}),(0,e.jsx)("div",{children:s.entries.length===0?(0,e.jsx)(p,{children:"This folder has no folders inside."}):s.entries.map(t=>(0,e.jsx)(te,{href:t.href,chip:null,title:t.name,desc:t.registered?"Project":t.git?"Git repository":"Folder",action:t.git?(0,e.jsxs)(x,{action:"/projects/open",children:[(0,e.jsx)("input",{type:"hidden",name:"path",value:t.path}),(0,e.jsx)(f,{sm:!0,type:"submit",label:t.registered?"Open":"Add and open"})]}):(0,e.jsx)(N,{sm:!0,variant:"ghost",href:i(t.path),label:"Open folder"})},t.path))}),(0,e.jsxs)(p,{children:["Git repositories are listed first and can be added. Showing folders under ",(0,e.jsx)("code",{className:"k-mono",children:s.rootShort}),"."]})]})]})}function Mn({view:s}){let i=(n,l)=>(0,e.jsx)(x,{action:"/projects/github",children:(0,e.jsx)(f,{sm:!0,variant:l?"primary":"outline",type:"submit",label:n})}),t=(0,e.jsx)(N,{sm:!0,variant:"ghost",href:"/projects/browse",label:"Choose a folder instead"});return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Add from GitHub",back:"/projects"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:["/projects","Projects"],title:"Add from GitHub",meta:"Repositories the GitHub CLI on this computer can see.",right:s.state!=="unlisted"?i("Refresh list",!1):void 0,same:!0}),s.localUnanswered&&(0,e.jsx)(A,{children:"Your projects folder didn’t answer, so copies already on this computer aren’t matched yet. Try again in a moment."}),(0,e.jsx)("div",{children:s.state==="unlisted"?(0,e.jsx)(ee,{title:"Your repositories aren’t listed yet.",text:"Toolroll asks the GitHub CLI signed in on this computer.",action:(0,e.jsx)(U,{children:i("List repositories",!0)})}):s.state==="gh-missing"?(0,e.jsx)(ee,{title:"The GitHub CLI isn’t installed on this computer.",text:"Install gh on the computer running Toolroll (brew install gh), sign in with gh auth login, then check again.",action:(0,e.jsxs)(U,{children:[i("Check again",!1),t]})}):s.state==="gh-auth"?(0,e.jsx)(ee,{title:"The GitHub CLI isn’t signed in.",text:"In a terminal on the computer running Toolroll, run gh auth login, then check again.",action:(0,e.jsxs)(U,{children:[i("Check again",!1),t]})}):s.state==="error"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(A,{children:[s.errorMessage??"Couldn't list repositories."," Nothing changed."]}),(0,e.jsx)(U,{children:i("Try again",!1)})]}):s.repos.length===0?(0,e.jsx)(ee,{title:"No repositories to list.",text:"The GitHub account signed in on this computer has none."}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ne,{label:"Repositories",count:(0,e.jsx)(ye,{n:s.repos.length})}),s.repos.map(n=>(0,e.jsx)(te,{href:`https://github.com/${n.nameWithOwner}`,chip:null,title:n.nameWithOwner,desc:(0,e.jsxs)(e.Fragment,{children:[n.description!==""&&(0,e.jsxs)(e.Fragment,{children:[n.description," · "]}),n.localPath===null?(0,e.jsxs)(e.Fragment,{children:[n.isPrivate?"Private":"Public",n.updatedAge!==null?` · updated ${n.updatedAge}`:""]}):n.isRegistered?(0,e.jsxs)(e.Fragment,{children:["Project ",(0,e.jsx)("code",{className:"k-mono",children:n.localName})]}):(0,e.jsxs)(e.Fragment,{children:["Already cloned at ",(0,e.jsx)("code",{className:"k-mono",children:n.localShort})]})]}),action:n.localPath!==null&&n.isOpen&&n.selfHref!==null?(0,e.jsx)(N,{sm:!0,variant:"ghost",href:n.selfHref,label:"Open now"}):n.localPath!==null?(0,e.jsxs)(x,{action:"/projects/open",children:[(0,e.jsx)("input",{type:"hidden",name:"path",value:n.localPath}),(0,e.jsx)(f,{sm:!0,type:"submit",label:n.isRegistered?"Open":"Add and open"})]}):s.cloneReady?(0,e.jsxs)(x,{action:"/projects/onboard-preview",children:[(0,e.jsx)("input",{type:"hidden",name:"repo",value:n.nameWithOwner}),(0,e.jsx)("input",{type:"hidden",name:"root",value:"0"}),(0,e.jsx)(f,{sm:!0,type:"submit",label:"Clone here"})]}):(0,e.jsx)("span",{className:"k-muted",children:"Choose a projects folder first"})},n.nameWithOwner))]})})]})]})}function He({chosen:s}){let i=s.refusal!==null?s.refusal:s.state==="open"?"Already a project here.":s.state==="outside"?"It’s outside your projects folder, so Toolroll asks for your password.":s.state==="blocked"?"It’s outside your projects folder. Only an approver signed in with a password can add it.":"Adds it as a project.",t=(n,l)=>(0,e.jsxs)(x,{action:"/projects/open",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:"/projects"}),(0,e.jsx)("input",{type:"hidden",name:"path",value:s.path}),(0,e.jsx)("input",{type:"hidden",name:"via",value:"path"}),l&&(0,e.jsx)(me,{kind:"typed-password",field:"password",children:(0,e.jsxs)("div",{className:"k-field",children:[(0,e.jsx)("label",{className:"k-label",htmlFor:"pick-password",children:"Your password"}),(0,e.jsx)(J,{id:"pick-password",type:"password",name:"password","data-so-typed":"",autoComplete:"current-password",required:!0})]})}),(0,e.jsx)(U,{children:(0,e.jsx)(f,{type:"submit",variant:"primary",label:n})})]});return(0,e.jsx)("div",{"aria-label":`Add ${s.name}`,children:(0,e.jsx)(le,{status:(0,e.jsx)("h2",{children:s.name}),text:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("code",{className:"k-mono",children:s.shortPath})," · ",i]}),acts:s.refusal!==null||s.state==="blocked"?null:s.state==="open"?t("Open",!1):s.state==="outside"?t("Add and open",!0):t("Add and open",!1),terms:""})})}function Bn({view:s}){let i=s.entries.filter(t=>t.git).length;return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Choose a repository",back:"/projects"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:["/projects","Projects"],title:"Choose a repository",meta:s.at!==null?(0,e.jsx)("nav",{className:"k-mono","aria-label":"Folder",children:s.at.crumbs.map((t,n)=>(0,e.jsxs)("span",{children:[n>0&&(0,e.jsx)("span",{"aria-hidden":"true",children:" / "}),t.href===null?(0,e.jsx)("span",{"aria-current":"location",children:t.label}):(0,e.jsx)("a",{className:"k-link",href:t.href,children:t.label})]},n))}):void 0,same:!0}),s.problem!==null&&(0,e.jsx)(A,{children:s.problem}),s.said!==null&&(0,e.jsx)(de,{children:s.said}),s.chosen!==null&&(0,e.jsx)(He,{chosen:s.chosen}),(s.shortcuts.length>0||s.at?.upHref!=null)&&(0,e.jsxs)("nav",{className:"k-acts","aria-label":"Go to",children:[s.at?.upHref!=null&&(0,e.jsx)(N,{sm:!0,lead:"back",href:s.at.upHref,label:"Up one folder"}),s.shortcuts.map(t=>(0,e.jsx)(N,{sm:!0,variant:"ghost",href:t.href,label:t.label},t.href))]}),(0,e.jsx)("div",{children:s.lookProblem!==null?(0,e.jsx)(A,{children:s.lookProblem}):s.entries.length===0&&s.chosen!==null?null:s.entries.length===0?(0,e.jsx)(ee,{title:"No repositories here.",text:s.at?.upHref?"Go up one folder, or try a shortcut.":"Try a shortcut."}):(0,e.jsxs)(e.Fragment,{children:[i===0&&(0,e.jsx)(p,{children:"No repositories here. Open a folder to look inside it."}),(0,e.jsx)(Ne,{label:"Folders",count:(0,e.jsx)(ye,{n:s.entries.length})}),s.entries.map(t=>(0,e.jsx)(te,{href:t.href,chip:t.git?(0,e.jsx)(W,{word:t.registered?"Project":"Git repository"}):null,title:t.name,desc:t.git?t.registered?"Already added":"Choose to add it":"Folder"},t.href))]})})]})]})}function Gn({view:s}){let i="Add a project from outside your projects folder";return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:i,back:"/projects"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:["/projects","Projects"],title:i,same:!0}),(0,e.jsx)(He,{chosen:{name:s.name,path:s.path,shortPath:s.shortPath,state:"outside",refusal:null}})]})]})}function Yn({view:s}){let i=n=>{let l=new URLSearchParams(s.versionId===null?n:{v:String(s.versionId),...n});return`${s.base}?${l.toString()}`},t=s.subview?.kind==="overview";return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Code map",back:s.backHref}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:[s.base.replace(/\/map$/,""),s.name],title:"Code map",meta:s.meta,right:s.canRefresh?(0,e.jsxs)(x,{action:`${s.base}/refresh`,children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:s.selfHref}),(0,e.jsx)("input",{type:"hidden",name:"repo",value:s.repo}),(0,e.jsx)(f,{sm:!0,type:"submit",label:"Check now"})]}):void 0,same:!0}),s.problem!==null?(0,e.jsx)(A,{children:s.problem}):s.said!==null?(0,e.jsx)(de,{children:s.said}):null,s.statusWarn!==null&&(s.statusWarn.tone==="notice"?(0,e.jsx)(A,{children:s.statusWarn.text}):(0,e.jsx)(de,{children:s.statusWarn.text})),s.emptyState!==null?(0,e.jsx)(ee,{title:s.emptyState.title,text:s.emptyState.text}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("form",{className:"cm-search",method:"get",action:s.base,role:"search",children:[s.versionId!==null&&(0,e.jsx)("input",{type:"hidden",name:"v",value:String(s.versionId)}),(0,e.jsx)(J,{id:"cm-q",name:"q",type:"search",defaultValue:s.subview?.kind==="search"?s.subview.query:"","aria-label":"Search files and exported names",placeholder:"Search files and exported names"}),(0,e.jsx)(f,{sm:!0,type:"submit",label:"Search"})]}),s.provenance!==null&&(0,e.jsxs)(z,{summary:"Where this comes from",children:[(0,e.jsx)(p,{children:s.provenance.label}),(0,e.jsx)(G,{rows:[["Remote",s.remoteUrl===null?"None":(0,e.jsx)("code",{className:"k-mono cm-path",children:s.remoteUrl})],["Files",s.provenance.filesSummary],...s.provenance.unreadable!==null?[["Unreadable",s.provenance.unreadable]]:[],...s.provenance.withheld!==null?[["Withheld",s.provenance.withheld]]:[],...s.provenance.notFollowed!==null?[["Not followed",s.provenance.notFollowed]]:[],...s.provenance.leftOut!==null?[["Left out",s.provenance.leftOut]]:[]]}),(0,e.jsx)(p,{children:"require() calls aren't counted. Other languages show paths and sizes only."}),s.provenance.warnings.map((n,l)=>(0,e.jsx)(p,{children:n},l)),s.provenance.proxy!==null&&(0,e.jsxs)(p,{children:["Read through your proxy at ",s.provenance.proxy,"."]}),s.provenance.enforced!==null&&(0,e.jsx)(p,{children:s.provenance.enforced})]}),!t&&(0,e.jsx)("p",{children:(0,e.jsx)("a",{className:"k-link",href:i({}),children:"All areas"})}),s.subview?.kind==="overview"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-areas",children:[(0,e.jsx)("h3",{id:"cm-areas",children:"Areas"}),s.subview.areas.length===0?(0,e.jsx)(p,{children:"This repository is empty."}):(0,e.jsx)("ul",{className:"cm-list",children:s.subview.areas.map(n=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("a",{className:"k-link cm-title",href:i({area:n.id}),children:n.name}),(0,e.jsxs)("span",{className:"cm-meta",children:[Q(n.files,"file"),n.languages.length>0&&` · ${n.languages.join(", ")}`,n.tests>0&&` · ${Q(n.tests,"test")}`]}),n.uses.length>0&&(0,e.jsxs)("span",{className:"cm-meta",children:["Uses ",n.uses.map((l,r)=>(0,e.jsxs)("span",{children:[r>0&&", ",(0,e.jsx)("a",{className:"k-link",href:i({area:l.id}),children:l.name})]},l.id))]}),n.usedBy.length>0&&(0,e.jsxs)("span",{className:"cm-meta",children:["Used by ",n.usedBy.map((l,r)=>(0,e.jsxs)("span",{children:[r>0&&", ",(0,e.jsx)("a",{className:"k-link",href:i({area:l.id}),children:l.name})]},l.id))]})]},n.id))})]}),s.subview.report!==null&&(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-report",children:[(0,e.jsx)("h3",{id:"cm-report",children:"Builds with and without the map"}),!s.subview.report.enough&&(0,e.jsx)(p,{children:"Not enough builds in both groups yet to compare reliably."}),(0,e.jsx)(G,{rows:s.subview.report.rows.map(n=>[n.label,`With ${n.map} · without ${n.holdout}`])})]})]}),s.subview?.kind==="search"&&(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-found",children:[(0,e.jsx)("h3",{id:"cm-found",children:Q(s.subview.hits.length,"match","matches")}),s.subview.hits.length===0?(0,e.jsx)(p,{children:"Nothing in this version matches."}):(0,e.jsx)("ul",{className:"cm-list",children:s.subview.hits.map((n,l)=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("a",{className:"k-link cm-title",href:i({file:n.path}),children:n.name??n.path}),n.name!==null&&(0,e.jsxs)("span",{className:"cm-meta",children:[n.path,n.line!==null&&` · line ${n.line}`]})]},l))})]}),s.subview?.kind==="area-missing"&&(0,e.jsx)(A,{children:"That area isn't in this version of the map."}),s.subview?.kind==="file-missing"&&(0,e.jsx)(A,{children:"That file isn't in this version of the map."}),s.subview?.kind==="area"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-area",children:[(0,e.jsx)("h3",{id:"cm-area",children:s.subview.name}),(0,e.jsx)(G,{rows:[["Files",String(s.subview.filesCount)],["Tests",String(s.subview.testsCount)],...s.subview.entryPoints.length>0?[["Entry points",s.subview.entryPoints.map((n,l)=>(0,e.jsxs)("span",{children:[l>0&&", ",(0,e.jsx)("a",{className:"k-link",href:i({file:n}),children:n})]},n))]]:[],...s.subview.external.length>0?[["Packages",s.subview.external.join(", ")]]:[],...s.subview.uses.length>0?[["Uses",s.subview.uses.map((n,l)=>(0,e.jsxs)("span",{children:[l>0&&", ",(0,e.jsx)("a",{className:"k-link",href:i({area:n.id}),children:n.id})," (",n.count,")"]},n.id))]]:[],...s.subview.usedBy.length>0?[["Used by",s.subview.usedBy.map((n,l)=>(0,e.jsxs)("span",{children:[l>0&&", ",(0,e.jsx)("a",{className:"k-link",href:i({area:n.id}),children:n.id})," (",n.count,")"]},n.id))]]:[]]})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-files",children:[(0,e.jsx)("h3",{id:"cm-files",children:"Files"}),(0,e.jsx)("ul",{className:"cm-list",children:s.subview.files.map(n=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("a",{className:"k-link cm-title",href:i({file:n.path}),children:n.path}),(0,e.jsxs)("span",{className:"cm-meta",children:[n.lang," · ",Q(n.bytes,"byte"),n.test!==null&&` · Tests: ${n.test}`]}),n.symbolsCount>0&&(0,e.jsxs)("span",{className:"cm-meta",children:["Exported names: ",n.symbolsSample.join(", "),n.symbolsCount>n.symbolsSample.length?` and ${n.symbolsCount-n.symbolsSample.length} more`:""]})]},n.path))}),s.subview.moreFiles>0&&(0,e.jsxs)(p,{children:[s.subview.moreFiles," more. Search to find them."]})]})]}),s.subview?.kind==="file"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-file",children:[(0,e.jsx)("h3",{id:"cm-file",children:(0,e.jsx)("code",{className:"k-mono cm-path",children:s.subview.path})}),s.subview.githubUrl!==null&&(0,e.jsx)("p",{children:(0,e.jsxs)("a",{className:"k-link",rel:"noopener noreferrer",target:"_blank",href:s.subview.githubUrl,children:["Open on GitHub at ",s.subview.commitShort]})}),(0,e.jsx)(G,{rows:[["Area",(0,e.jsx)("a",{className:"k-link",href:i({area:s.subview.area}),children:s.subview.area})],["Language",s.subview.lang],...s.subview.test!==null?[["Tests",(0,e.jsx)("a",{className:"k-link",href:i({file:s.subview.test}),children:s.subview.test})]]:[]]})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-names",children:[(0,e.jsx)("h3",{id:"cm-names",children:"Exported names"}),s.subview.symbols.length===0?(0,e.jsx)(p,{children:s.subview.state==="read"?"None.":"Names and imports aren't read for this file."}):(0,e.jsx)("ul",{className:"cm-list",children:s.subview.symbols.map((n,l)=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("span",{className:"cm-title",children:n.name}),(0,e.jsxs)("span",{className:"cm-meta",children:[n.kind," · line ",n.line]})]},l))})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-imports",children:[(0,e.jsx)("h3",{id:"cm-imports",children:"Imports"}),s.subview.imports.length===0?(0,e.jsx)(p,{children:"None."}):(0,e.jsx)("ul",{className:"cm-list",children:s.subview.imports.map((n,l)=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("a",{className:"k-link cm-title",href:i({file:n.path}),children:n.path}),(0,e.jsxs)("span",{className:"cm-meta",children:["line ",n.line]})]},l))})]}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"cm-by",children:[(0,e.jsx)("h3",{id:"cm-by",children:"Imported by"}),s.subview.importedBy.length===0?(0,e.jsx)(p,{children:"None."}):(0,e.jsx)("ul",{className:"cm-list",children:s.subview.importedBy.map((n,l)=>(0,e.jsxs)("li",{className:"cm-item",children:[(0,e.jsx)("a",{className:"k-link cm-title",href:i({file:n.path}),children:n.path}),(0,e.jsxs)("span",{className:"cm-meta",children:["line ",n.line]})]},l))})]})]})]})]})]})}function Kn({view:s}){let i=(t,n,l)=>(0,e.jsxs)(x,{action:"/tasks/add",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:l}),(0,e.jsx)("input",{type:"hidden",name:"title",value:t}),(0,e.jsx)("input",{type:"hidden",name:"goal",value:n}),(0,e.jsx)("input",{type:"hidden",name:"repo",value:s.repo}),(0,e.jsx)(f,{sm:!0,type:"submit",label:"Make a task to fix it"})]});return s.mode.kind==="row"?(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Flaky test",back:s.backHref}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:[s.backHref,"Flaky tests"],title:s.mode.name,meta:s.mode.status,right:i(s.mode.fixTitle,s.mode.fixGoal,s.backHref)}),(0,e.jsx)(G,{rows:s.mode.facts}),(0,e.jsxs)("section",{className:"k-sec","aria-labelledby":"f-history",children:[(0,e.jsx)("h3",{id:"f-history",children:"History"}),s.mode.history.length===0?(0,e.jsx)(p,{children:"No history recorded."}):s.mode.history.map((t,n)=>(0,e.jsx)(te,{chip:null,title:t.kindWords,desc:t.desc,meta:(0,e.jsx)("span",{className:"k-num",children:t.age})},n))]})]})]}):(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Flaky tests",back:s.backHref}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{back:[s.backHref,s.name],title:"Flaky tests",meta:"Mixed outcomes under recorded conditions"}),!s.mode.complete&&(0,e.jsxs)(p,{children:["Not enough recorded history: test results are kept for 180 days, so ",s.mode.days," days can't be counted in full."]}),s.mode.rows.length===0?s.mode.complete&&(0,e.jsx)(ee,{title:"No mixed outcomes recorded"}):(0,e.jsx)("div",{className:"flaky-rows",children:s.mode.rows.map(t=>(0,e.jsx)(te,{href:t.href,chip:(0,e.jsx)(W,{word:t.status,dot:!1}),title:t.name,desc:t.desc,meta:(0,e.jsx)("span",{className:"k-num",children:t.age}),action:i(t.fixTitle,t.fixGoal,s.selfHref)},t.key))}),(0,e.jsxs)(z,{summary:"What this covers",children:[(0,e.jsx)(p,{children:s.mode.coverageWords}),s.mode.notPaired>0&&(0,e.jsxs)(p,{children:[s.mode.notPaired," GitHub re-run",s.mode.notPaired===1?"":"s"," not paired."]}),(0,e.jsx)(p,{children:"Not recorded: network, other processes, time of day."})]})]})]})}function _n({view:s}){let[i,t]=(0,I.useState)(""),n=s.groups.reduce((l,r)=>l+r.items.length,0);return(0,e.jsxs)("div",{className:"put-away","data-kit-page":"",children:[(0,e.jsx)("nav",{className:"kit-crumbs","aria-label":"Breadcrumb",children:(0,e.jsxs)("ol",{children:[(0,e.jsx)("li",{children:(0,e.jsx)("a",{href:"/",children:"Work"})}),(0,e.jsx)("li",{children:(0,e.jsx)("span",{"aria-current":"page",children:"Archive old tasks"})})]})}),(0,e.jsx)("h1",{children:"Archive old tasks"}),(0,e.jsx)("p",{className:"kit-state",children:n===0?"Old releases, routine runs and fixed CI notices are archived automatically.":`${n} ${n===1?"task":"tasks"} can be archived. They leave every list and keep their history.`}),s.problem!==null&&(0,e.jsx)("p",{className:"kit-problem",role:"alert",children:s.problem}),s.releasesSkipped!==null&&(0,e.jsxs)("p",{className:"kit-hint",children:["Release tasks were left out: ",s.releasesSkipped,"."]}),(0,e.jsxs)("form",{method:"get",action:"/tasks/archive",className:"put-away-days",children:[(0,e.jsxs)("label",{children:["Also finished tasks untouched for"," ",(0,e.jsx)("input",{type:"number",name:"days",min:1,max:365,defaultValue:s.days,inputMode:"numeric"})," days"]}),(0,e.jsx)("button",{type:"submit",className:"secondary",children:"Update list"})]}),n===0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"kit-state",children:"Nothing to archive right now."}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:"/?view=archived",children:"See archived tasks →"})})]}):(0,e.jsxs)(x,{action:"/work/put-away",id:"put-away",className:"kit-form","data-kit-form":"tasks-put-away","data-kit-step-up":"",children:[(0,e.jsx)("input",{type:"hidden",name:"digest",value:s.digest}),(0,e.jsx)("input",{type:"hidden",name:"days",value:String(s.days)}),s.groups.map(l=>(0,e.jsxs)("fieldset",{className:"put-away-group","data-tidy-group":l.rule,children:[(0,e.jsxs)("legend",{children:[l.label,(0,e.jsx)("span",{className:"count",children:l.items.length})]}),(0,e.jsx)("ul",{children:l.items.map(r=>(0,e.jsx)("li",{children:(0,e.jsxs)("label",{className:"put-away-item","data-tidy-task":r.taskId,children:[(0,e.jsx)("input",{type:"checkbox",name:"task",value:r.taskId,defaultChecked:!0}),(0,e.jsx)("span",{className:"put-away-title",children:r.title}),(0,e.jsx)("span",{className:"put-away-why",children:r.reason}),(0,e.jsxs)("span",{className:"put-away-id",children:[r.taskId,r.repoName!==null&&` · ${r.repoName}`,r.versionsCount>1&&` · ${r.versionsCount} versions`]})]})},r.taskId))})]},l.rule)),(0,e.jsx)("div",{className:"kit-proof","data-kit-proof":"",children:(0,e.jsx)(X,{proof:"tasks-put-away",value:i,onChange:t})}),(0,e.jsxs)("div",{className:"kit-save-bar","data-kit-save-bar":"",children:[(0,e.jsxs)("span",{className:"kit-save-state","aria-live":"polite","data-kit-state":"",children:[n," ",n===1?"task":"tasks"," selected"]}),(0,e.jsx)("button",{type:"submit",className:"kit-save",children:"Archive selected"})]})]})]})}function Jn({view:s}){let[i,t]=(0,I.useState)(s.text),[n,l]=(0,I.useState)(s.planOn),[r,b]=(0,I.useState)(s.permissionMode),v=s.projects.find(c=>c.value===s.chosenProject)?.label??"your project";return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"New task",back:"/"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:"New task",back:["/","Work"],meta:s.solo?"Small changes build when you press Build. Anything bigger waits for your yes.":"Nothing is built until you approve its plan.",same:!0}),(0,e.jsxs)(x,{action:"/tasks/add",className:"k-form k-dock-send",id:"nt-form",children:[(0,e.jsx)("input",{type:"hidden",name:"planning-policy",value:"choice"}),s.projectRevision!==null&&(0,e.jsx)("input",{type:"hidden",name:"projectRevision",value:String(s.projectRevision)}),s.fromTemplate&&(0,e.jsx)(p,{children:"Filled in from a template. Change anything; it still waits for your approval."}),s.typedProject&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Y,{label:"Project folder",hint:"No projects yet: name the folder of a git repository.",children:({id:c})=>(0,e.jsx)(J,{id:c,name:"repo",defaultValue:s.chosenProject,required:!0,placeholder:"/path/to/repository",autoCapitalize:"none",spellCheck:!1})}),(0,e.jsxs)(p,{children:[(0,e.jsx)("a",{className:"k-link",href:"/projects?return=%2Ftasks%2Fnew",children:"Add a project"})," to choose it here next time."]})]}),(0,e.jsx)(Ie,{id:"nt",name:"title",label:"What should change?",placeholder:"What should change? One or two sentences is enough.",value:i,onChange:t,onSend:()=>{},submit:!0,gate:!1,sendLabel:"File task",rows:4,maxRows:10,maxLength:200,error:s.problem,before:(0,e.jsxs)(e.Fragment,{children:[!s.typedProject&&(0,e.jsx)(pe,{id:"nt-project",name:"repo","aria-label":"Project",defaultValue:s.chosenProject,sm:!0,items:s.projects.map(c=>[c.value,c.label])}),(0,e.jsxs)("label",{className:"k-tchip",children:[(0,e.jsx)("input",{id:"nt-plan",type:"checkbox",name:"plan-first",value:"1",checked:n,onChange:c=>l(c.target.checked)}),(0,e.jsx)("span",{children:"Read code before planning"})]})]}),note:n?"The agent reads the code and asks you anything unclear, then writes the plan.":"The agent writes the plan straight from your words. Faster for small, obvious changes."}),(0,e.jsx)(z,{summary:"More options",open:s.optionsUsed,children:(0,e.jsxs)("div",{className:"k-form",children:[(0,e.jsx)(Y,{label:"From an issue or PR (optional)",hint:"A github.com link in this project. Its text becomes the plan, and you approve it.",children:({id:c})=>(0,e.jsx)(J,{id:c,name:"from",defaultValue:s.fromLink,placeholder:"https://github.com/…",autoCapitalize:"none",spellCheck:!1,inputMode:"url"})}),(0,e.jsx)(Y,{label:"Checks",children:({id:c})=>(0,e.jsx)(pe,{id:c,name:"quality-mode",wide:!0,defaultValue:s.quality,items:[["default","Default checks"],["strict","Strict (release)"]]})}),s.candidates.length>0&&(0,e.jsx)(Y,{label:"Starts",children:({id:c})=>(0,e.jsx)(pe,{id:c,name:"after",wide:!0,defaultValue:s.after,items:[["","Right away"],...s.candidates.map(j=>[j.id,`After ${j.id}: ${j.title}`])]})}),(0,e.jsx)(Y,{label:"Goal (optional)",hint:"With requirements below, an unchanged plan can be approved automatically.",children:({id:c})=>(0,e.jsx)(re,{id:c,name:"goal",rows:2,defaultValue:s.goal,placeholder:"What success looks like"})}),(0,e.jsx)(Y,{label:"Acceptance",hint:"Needed with a goal. One per line: statement | evidence,kinds | how",children:({id:c})=>(0,e.jsx)(re,{id:c,name:"acceptance",rows:2,defaultValue:s.acceptance,placeholder:"Requests over the limit return 429 | check"})}),(0,e.jsx)(Y,{label:"Not this (optional)",children:({id:c})=>(0,e.jsx)(J,{id:c,name:"not",defaultValue:s.not})}),(0,e.jsx)(Y,{label:"Likely touches (optional)",hint:"Paths, separated by commas.",children:({id:c})=>(0,e.jsx)(J,{id:c,name:"touches",defaultValue:s.touches})}),(0,e.jsx)("div",{className:"k-checks",children:(0,e.jsxs)("label",{children:[(0,e.jsx)("input",{type:"checkbox",name:"scout",value:"1",defaultChecked:s.scout}),"Research only: a read-only report, no code changes"]})}),(0,e.jsx)(Y,{label:"Task id (optional)",children:({id:c})=>(0,e.jsx)(J,{id:c,name:"id",defaultValue:s.taskId,placeholder:"Made from the request"})}),(0,e.jsxs)("div",{className:"k-field",children:[(0,e.jsx)("span",{className:"k-label",children:"Agent permissions"}),(0,e.jsx)(we,{name:"permission-mode",legend:"Agent permissions",current:r,onChange:b,items:[{value:"auto",label:"Auto",text:"Asks before risky actions."},{value:"bypassPermissions",label:"Full access",text:"Never asks and can change files anywhere on this computer. Trusted repositories only."}]}),(0,e.jsx)("p",{className:"k-hint",children:"From Settings. You can still change it on the plan before you approve."})]})]})})]}),s.suggestions.length>0&&(0,e.jsxs)("section",{className:"k-ideas-wrap","aria-label":`Ideas for ${v}`,children:[(0,e.jsxs)("p",{className:"k-note",children:["Ideas for ",v]}),(0,e.jsx)("div",{className:"k-ideas",children:s.suggestions.map(c=>(0,e.jsx)("a",{className:"k-btn k-btn-outline k-idea",href:c.href,onClick:j=>{j.preventDefault(),t(c.draft)},children:c.label},c.label))})]}),(0,e.jsxs)(p,{children:["Work you do often? ",(0,e.jsx)("a",{className:"k-link",href:"/recipes",children:"Use a saved recipe"}),"."]})]}),(0,e.jsx)(ue,{children:(0,e.jsx)(f,{variant:"primary",type:"submit",form:"nt-form",label:"File task"})})]})}function zn({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:"Build this?",back:"/tasks/new"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:"Build this?",back:["/tasks/new","New task"],meta:"Build approves exactly these terms.",same:!0}),(0,e.jsx)(G,{rows:s.terms.map(([i,t])=>[i,(0,e.jsx)(e.Fragment,{children:t.split(`
3
+ `).map((n,l)=>(0,e.jsx)("div",{children:n},l))})])}),(0,e.jsxs)(U,{children:[(0,e.jsxs)(x,{action:"/tasks/fast",className:"k-form",id:"fast-build",children:[(0,e.jsx)("input",{type:"hidden",name:"preview",value:s.preview}),(0,e.jsx)("input",{type:"hidden",name:"digest",value:s.digest}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Build"})]}),(0,e.jsxs)(x,{action:"/tasks/add",className:"k-form",children:[(0,e.jsx)("input",{type:"hidden",name:"plain",value:"1"}),(0,e.jsx)("input",{type:"hidden",name:"title",value:s.title}),(0,e.jsx)("input",{type:"hidden",name:"repo",value:s.repo}),(0,e.jsx)("input",{type:"hidden",name:"planning-policy",value:"choice"}),(0,e.jsx)("input",{type:"hidden",name:"plan-first",value:"1"}),(0,e.jsx)(f,{type:"submit",label:"Plan it first"})]})]})]})]})}function Qn({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)(E,{title:s.name,back:"/tasks/new"}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:s.name,back:["/tasks/new","New task"],meta:"Written outside Toolroll. You'll approve its plan before anything builds.",same:!0}),(0,e.jsxs)("blockquote",{className:"k-quote",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:s.title})}),(0,e.jsx)("p",{className:"k-pre",children:s.body===""?"No description.":s.body})]}),(0,e.jsxs)(x,{action:"/tasks/add",className:"k-form",children:[(0,e.jsx)("input",{type:"hidden",name:"from",value:s.url}),(0,e.jsx)("input",{type:"hidden",name:"repo",value:s.repo}),(0,e.jsx)("input",{type:"hidden",name:"title",value:s.title}),s.head!==null&&(0,e.jsx)("input",{type:"hidden",name:"from-head",value:s.head}),(0,e.jsx)("input",{type:"hidden",name:"from-read",value:"1"}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Add task"})]})]})]})}function Zn({view:s,csrf:i,result:t}){let[n,l]=(0,I.useState)(""),[r,b]=(0,I.useState)(""),[v,c]=(0,I.useState)(null);(0,I.useEffect)(()=>{if(!s.running||!s.peekable||s.provider!=="claude")return;let d=!1,k=0,h=!1,g="",S,C=async()=>{if(!d)try{let F=await fetch(`/r/${s.runId}?fragment=transcript&from=${k}&inkey=${h?"1":"0"}&ktail=${encodeURIComponent(g)}`,{headers:{accept:"application/json"},credentials:"same-origin",cache:"no-store"});if(F.ok){let T=await F.json();typeof T.text=="string"&&T.text!==""&&c(K=>(K??"")+T.text),typeof T.nextOffset=="number"&&(k=T.nextOffset),typeof T.inKey=="boolean"&&(h=T.inKey),typeof T.keyTail=="string"&&(g=T.keyTail),!T.final&&!d&&(S=setTimeout(C,2e3))}}catch{d||(S=setTimeout(C,4e3))}};return C(),()=>{d=!0,clearTimeout(S)}},[s.runId,s.running,s.peekable,s.provider]);let j=s.editorToggle!==null&&i!==""&&(0,e.jsxs)(x,{action:"/session/editor-links",className:"h-inline",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:`/r/${s.runId}`}),(0,e.jsx)("input",{type:"hidden",name:"on",value:s.editorToggle.on?"0":"1"}),(0,e.jsx)(f,{sm:!0,variant:"ghost",type:"submit",label:s.editorToggle.on?"Stop opening files in VS Code here":"Open files in VS Code from this device"}),(0,e.jsx)(p,{children:"Only useful when this browser runs on the machine that holds the worktrees."})]});return(0,e.jsxs)("div",{className:"h-page","data-kit-page":"",children:[(0,e.jsx)(E,{title:s.title,back:s.taskHref}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:s.title,back:[s.taskHref,"Task"],meta:(0,e.jsxs)(e.Fragment,{children:["Task ",(0,e.jsx)("a",{className:"k-mono k-link",href:s.taskHref,children:s.taskId}),s.startedAt!==null&&(0,e.jsxs)(e.Fragment,{children:[" · started ",(0,e.jsx)("time",{dateTime:s.startedAt,title:ge(s.startedAt),children:se(s.startedAt)})]})]})}),(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Summary"}),(0,e.jsx)("div",{id:"run-facts",children:(0,e.jsx)(G,{rows:s.facts.map(d=>[d.label,d.href!==void 0?(0,e.jsx)("a",{className:"k-link",href:d.href,children:d.value}):d.mono?(0,e.jsx)("span",{className:"k-mono",children:d.value}):d.value])})})]}),s.reasonDetail!=null&&(0,e.jsxs)("section",{className:"k-sec",id:"run-reason-detail",children:[(0,e.jsx)("h3",{children:"Error details"}),(0,e.jsx)("pre",{className:"k-mono",children:s.reasonDetail})]}),s.running&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"What the agent is saying"}),s.peekable?s.provider!=="claude"?(0,e.jsxs)(p,{children:["The live transcript needs the claude harness for now; this build runs on ",s.provider,"."]}):(0,e.jsx)("pre",{id:"live-transcript",className:"k-mono h-pre h-live",children:v??""}):(0,e.jsxs)(p,{children:["The live transcript is off. Start serve with ",(0,e.jsx)("span",{className:"k-mono",children:"--runner <name>"})," naming this machine's worker, and it appears here."]})]}),s.selectedResult!==null&&t!==void 0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"h-panel",children:t(s.selectedResult,i,!1)}),j]}):(0,e.jsxs)(e.Fragment,{children:[s.handoff!==null&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Result"}),(0,e.jsx)("p",{className:"h-read",children:s.handoff.conclusion}),s.handoff.changes.length>0&&(0,e.jsxs)("div",{className:"h-list",children:[(0,e.jsx)("p",{className:"k-note",children:"Completed"}),(0,e.jsx)("ul",{children:s.handoff.changes.map((d,k)=>(0,e.jsx)("li",{children:d},k))})]}),s.handoff.verification.length>0&&(0,e.jsxs)("div",{className:"h-list",children:[(0,e.jsx)("p",{className:"k-note",children:"Checks the agent reported"}),(0,e.jsx)("ul",{children:s.handoff.verification.map((d,k)=>(0,e.jsx)("li",{children:d},k))})]}),s.handoff.followUps.length>0&&(0,e.jsxs)("div",{className:"h-list",children:[(0,e.jsx)("p",{className:"k-note",children:"Follow-up"}),(0,e.jsx)("ul",{children:s.handoff.followUps.map((d,k)=>(0,e.jsx)("li",{children:d},k))})]})]}),s.proofBundle!==null&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Checks"}),(0,e.jsx)("p",{children:s.proofBundle.summary}),(0,e.jsx)(G,{rows:s.proofBundle.checks.map(d=>[d.label,d.value])})]}),s.terminalDiff!==null&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Changes"}),s.terminalDiff.problem!==null?(0,e.jsx)(A,{children:s.terminalDiff.problem}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("ul",{className:"h-files",children:s.terminalDiff.files.map(d=>(0,e.jsxs)("li",{children:[d.editorHref!==null?(0,e.jsx)("a",{className:"k-mono k-link",href:d.editorHref,children:d.path}):(0,e.jsx)("span",{className:"k-mono",children:d.path}),d.added!==null&&d.removed!==null&&(0,e.jsxs)("span",{className:"k-num k-muted",children:["+",d.added," −",d.removed]})]},d.path))}),s.terminalDiff.patchText!==null&&(0,e.jsxs)(z,{summary:"Diff",children:[(0,e.jsx)("pre",{className:"k-mono",children:s.terminalDiff.patchText}),s.terminalDiff.truncated&&(0,e.jsx)(p,{children:"Diff truncated."})]}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{className:"k-link",href:s.terminalDiff.downloadHref,download:!0,children:"Download patch"})})]})]}),(s.comments.length>0||s.canComment)&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Review and revise"}),(0,e.jsx)(p,{children:"Annotate the diff above. When the batch is ready, create one scoped revision task from it."}),s.comments.length>0&&(0,e.jsx)("ul",{className:"h-notes diff-comments",children:s.comments.map(d=>(0,e.jsxs)("li",{className:"diff-comment",children:[(0,e.jsx)("span",{className:"k-num k-muted",children:(0,e.jsx)("time",{dateTime:d.createdAt,children:se(d.createdAt)})}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:d.author})," ",d.path!==null&&(d.editorHref!==null?(0,e.jsxs)("a",{className:"k-mono k-link",href:d.editorHref,children:[d.path,d.line===null?"":`:${d.line}`]}):(0,e.jsxs)("span",{className:"k-mono",children:[d.path,d.line===null?"":`:${d.line}`]}))," ",d.note]})]},d.id))}),s.canComment&&(0,e.jsxs)(x,{action:`/r/${s.runId}/comment`,className:"h-form",id:"comment-form",children:[(0,e.jsxs)("div",{className:"h-pair",children:[(0,e.jsx)(Y,{label:"File",children:({id:d})=>(0,e.jsx)(J,{id:d,className:"k-mono",name:"path",placeholder:"Choose a line above",value:n,onChange:k=>l(k.target.value)})}),(0,e.jsx)(Y,{label:"Line",children:({id:d})=>(0,e.jsx)(J,{id:d,name:"line",placeholder:"—",inputMode:"numeric",value:r,onChange:k=>b(k.target.value)})})]}),(0,e.jsx)(Y,{label:"Change requested",hint:"Up to 2000 characters",children:({id:d})=>(0,e.jsx)(re,{id:d,name:"note",rows:2,maxLength:2e3,placeholder:"What should change, and why",autoFocus:s.noted})}),(0,e.jsx)(U,{children:(0,e.jsx)(f,{sm:!0,type:"submit",label:"Add annotation"})})]}),s.revisionSeal!==null&&(0,e.jsxs)(x,{action:`/r/${s.runId}/revise`,className:"revision-from-comments",children:[(0,e.jsx)("input",{type:"hidden",name:"batch",value:s.revisionSeal.batch}),(0,e.jsx)("input",{type:"hidden",name:"source",value:s.revisionSeal.source}),(0,e.jsx)("input",{type:"hidden",name:"request",value:s.revisionSeal.request}),(0,e.jsx)(le,{status:(0,e.jsxs)("h2",{children:[Q(s.comments.length,"annotation")," ready"]}),text:"Creates one revision carrying this exact batch. You review its scope before anything builds.",acts:(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Create revision from annotations"}),terms:"Nothing builds until its scope is approved."})]}),j]}),s.ciRepairPr!==null&&i!==""&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsxs)("h3",{children:["Checks are failing on pull request #",s.ciRepairPr]}),(0,e.jsx)(p,{children:"Seen by the pull request watcher. Drafting a repair makes one unapproved task; you approve its scope before anything builds."}),(0,e.jsx)(x,{action:`/r/${s.runId}/draft-repair`,className:"h-inline",children:(0,e.jsx)(f,{sm:!0,type:"submit",label:"Draft a repair task"})})]})]}),s.artifacts.length>0&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Saved files"}),(0,e.jsx)("ul",{className:"h-files",children:s.artifacts.map(d=>(0,e.jsxs)("li",{children:[(0,e.jsx)("a",{className:"k-link",href:`/r/${s.runId}/evidence/${d.id}`,children:d.kindWords}),(0,e.jsx)("span",{className:"k-num k-muted",children:d.truncated?`${fe(d.bytesStored)} of ${fe(d.bytesOriginal)} · partial`:fe(d.bytesStored)})]},d.id))})]}),(s.notes.length>0||s.canNote)&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Notes"}),s.notes.length===0?(0,e.jsx)(p,{children:"No notes yet. A note stays with this attempt for whoever reads it next."}):(0,e.jsx)("ul",{className:"h-notes",children:s.notes.map(d=>(0,e.jsxs)("li",{children:[(0,e.jsx)("span",{className:"k-num k-muted",children:(0,e.jsx)("time",{dateTime:d.createdAt,children:se(d.createdAt)})}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:d.author})," ",d.note]})]},d.id))}),s.canNote&&(0,e.jsxs)(x,{action:`/r/${s.runId}/note`,className:"h-addnote",children:[(0,e.jsx)("label",{className:"k-sr",htmlFor:"run-note",children:"Add a note"}),(0,e.jsx)(J,{id:"run-note",name:"note",placeholder:"A note for whoever reads this attempt next",autoComplete:"off"}),(0,e.jsx)(f,{sm:!0,type:"submit",label:"Add note"})]})]})]})]})}function Xn({view:s}){let i=s.draft?.choice!==null&&s.draft?.choice!==void 0&&s.options.some(c=>c.id===s.draft.choice)?s.draft.choice:s.recommendation,[t,n]=(0,I.useState)(i),l=s.returnTo===null?["/","Home"]:[s.returnTo,"Back to the chat"],r=s.state!=="answered",b=r&&s.supersededReason===null,v=s.options.filter(c=>!c.reversible);return(0,e.jsxs)("div",{className:"h-page","data-kit-page":"",children:[(0,e.jsx)(E,{title:s.projectName??"Question",back:l[0]}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:s.taskTitle,back:l,meta:(0,e.jsxs)(e.Fragment,{children:[s.projectName!==null&&`${s.projectName} · `,(0,e.jsx)("span",{className:"k-mono",children:s.taskId}),s.runWords!==null&&` · ${s.runWords}`," asked ",(0,e.jsx)("time",{dateTime:s.createdAt,children:se(s.createdAt)}),s.deadline!==null&&r&&(0,e.jsxs)(e.Fragment,{children:[" · answer by ",(0,e.jsx)("time",{dateTime:s.deadline,children:se(s.deadline)})]})]}),same:!0}),s.supersededReason!==null?(0,e.jsx)(le,{status:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Closed"}),(0,e.jsx)("h2",{children:s.question})]}),text:s.supersededReason,acts:(0,e.jsx)(N,{href:`/t/${encodeURIComponent(s.taskId)}`,label:"Open task"}),terms:"Nothing waits on this question now."}):r?(0,e.jsxs)(x,{action:`/d/${s.id}/answer`,className:"h-question",id:"answer-form",children:[s.returnTo!==null&&(0,e.jsx)("input",{type:"hidden",name:"return",value:s.returnTo}),(0,e.jsx)(le,{wait:!0,status:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Needs you",tone:"needs"}),(0,e.jsx)("h2",{children:s.question})]}),text:s.recap,body:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(we,{name:"choice",legend:"Choose one",current:t,onChange:n,items:s.options.map(c=>({value:c.id,label:c.label,text:c.consequence,tag:(0,e.jsxs)(e.Fragment,{children:[c.id===s.recommendation&&(0,e.jsx)(W,{word:"Recommended",dot:!1}),!c.reversible&&(0,e.jsx)(W,{word:"Can't be undone",tone:"failed",dot:!1})]})}))}),(0,e.jsxs)("div",{className:"k-field",children:[(0,e.jsxs)("label",{className:"k-label",htmlFor:"answer-note",children:["Note for the agent ",(0,e.jsx)("span",{className:"k-muted",children:"(optional)"})]}),(0,e.jsx)(re,{id:"answer-note",name:"note",rows:2,maxLength:2e3,placeholder:"Anything it should know with your answer",defaultValue:s.draft?.note??""})]}),v.length>0&&(0,e.jsxs)("label",{className:"h-check",children:[(0,e.jsx)("input",{type:"checkbox",name:"confirm",value:"yes"}),(0,e.jsxs)("span",{children:["I understand ",v.length===1?`“${v[0].label}” can't be undone`:"the options marked so can't be undone","."]})]})]}),acts:(0,e.jsx)(f,{variant:"primary",type:"submit",docked:!0,label:"Answer"}),terms:`Answering needs no password.${s.overdue?" The answer was due; the build still waits for it.":""}`,err:s.refusal===null?void 0:`${Ae(s.refusal)}. Nothing changed.`})]}):(()=>{let c=s.options.find(j=>j.id===s.choice);return(0,e.jsx)(le,{status:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Answered",tone:"done"}),(0,e.jsx)("h2",{children:s.question})]}),text:(0,e.jsxs)(e.Fragment,{children:[c?.label??s.choice??""," · by ",s.answeredBy??"someone",s.answeredAt!==null&&(0,e.jsxs)(e.Fragment,{children:[" at ",(0,e.jsx)("time",{dateTime:s.answeredAt,children:se(s.answeredAt)})]}),s.note!==null&&` · “${s.note}”`]}),acts:(0,e.jsx)(N,{href:`/t/${encodeURIComponent(s.taskId)}`,label:"Open task"}),terms:c?.consequence??""})})(),s.artifacts.length>0&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"What the agent looked at"}),(0,e.jsx)("ul",{className:"h-files",children:s.artifacts.map(c=>(0,e.jsxs)("li",{children:[(0,e.jsx)("a",{className:"k-link",href:`/d/${s.id}/evidence/${c.id}`,children:c.kindWords}),(0,e.jsxs)("span",{className:"k-num k-muted",children:[fe(c.bytesStored),c.truncated?" · partial":""]})]},c.id))})]}),r&&s.runWords!==null&&s.runId!==null&&(0,e.jsxs)("section",{className:"k-sec",children:[(0,e.jsx)("h3",{children:"Where it stopped"}),(0,e.jsxs)("p",{className:"h-read k-muted",children:[Ae(s.runWords)," asked this and holds its work until you answer. ",(0,e.jsx)("a",{className:"k-link",href:`/r/${s.runId}?record=1`,children:"See the attempt"})]})]})]}),b&&(0,e.jsx)(ue,{children:(0,e.jsx)(f,{variant:"primary",type:"submit",form:"answer-form",label:"Answer"})})]})}function ei({view:s}){let{pack:i}=s,t=`/t/${encodeURIComponent(i.task.id)}`,n=`${t}/evidence?format=json`;return(0,e.jsxs)("div",{className:"h-page","data-kit-page":"","data-evidence-pack":i.task.id,children:[(0,e.jsx)(E,{title:"Full record",back:t}),(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:"Full record",back:[t,"Task"],meta:(0,e.jsxs)(e.Fragment,{children:[i.task.title,i.task.project!==null&&` · ${i.task.project}`," · ",(0,e.jsx)("span",{className:"k-mono",children:i.task.id})]}),right:(0,e.jsxs)("span",{className:"k-acts h-tools",children:[(0,e.jsx)(N,{sm:!0,href:n,download:!0,label:"Download JSON"}),(0,e.jsx)(f,{sm:!0,variant:"ghost",label:"Print",onClick:()=>window.print()})]})}),(0,e.jsx)("p",{className:"k-note h-lead",children:"Read-only. Everything below is sealed in the audit log; nothing here can be changed."}),(0,e.jsx)(Le,{pack:i}),(0,e.jsx)("div",{className:"h-phone-tools",children:(0,e.jsx)(N,{href:n,download:!0,label:"Download JSON"})})]})]})}var Me=s=>s.replace(/[\x00-\x1f\x7f\u202a-\u202e]/g,"");function We(s){let i=s.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-s.length%4)%4),t=atob(i),n=new ArrayBuffer(t.length),l=new Uint8Array(n);for(let r=0;r<t.length;r+=1)l[r]=t.charCodeAt(r);return l}function je(s){let i=new Uint8Array(s),t="";for(let n=0;n<i.length;n+=1)t+=String.fromCharCode(i[n]);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function si({view:s}){let i=(0,I.useContext)(ie),[t,n]=(0,I.useState)(""),[l,r]=(0,I.useState)(!1),[b,v]=(0,I.useState)(!1),[c,j]=(0,I.useState)(null),[d,k]=(0,I.useState)(null),h=`/t/${encodeURIComponent(s.taskId)}`,g=`Release ${s.packageVersion}`,S=s.terms.filter(y=>y.key.startsWith("release.")||y.key.startsWith("releaseCheck.")),C=s.terms.filter(y=>!y.key.startsWith("release.")&&!y.key.startsWith("releaseCheck.")),F=async()=>{if(j(null),k(null),typeof navigator>"u"||typeof navigator.credentials?.get!="function"||typeof PublicKeyCredential>"u"){j("This browser doesn't support passkeys here. Use Approve on your iPhone instead.");return}r(!0);try{let y=await fetch(`${h}/release/passkey/challenge`,{method:"POST",credentials:"same-origin",headers:ae({"content-type":"application/x-www-form-urlencoded",accept:"application/json"}),body:new URLSearchParams({csrf:i,digest:s.digest}).toString()}),$=await y.json();if(!y.ok||!$.ok||!$.challenge||!$.rpId||!$.deviceId){j($.error??"Couldn't start passkey confirmation.");return}let Z=await navigator.credentials.get({publicKey:{challenge:We($.challenge),rpId:$.rpId,userVerification:"required",allowCredentials:($.allowCredentials??[]).map(q=>({id:We(q.id),type:"public-key"}))}});if(Z===null||Z.type!=="public-key"){j("Passkey confirmation was cancelled.");return}let ne=Z,o=ne.response,R=o.userHandle===null?"":je(o.userHandle),m=JSON.stringify({deviceId:$.deviceId,challenge:$.challenge,assertion:{credentialId:je(ne.rawId),authenticatorData:je(o.authenticatorData),clientDataJSON:je(o.clientDataJSON),signature:je(o.signature),userHandle:R}}),P=await fetch(`${h}/approve`,{method:"POST",credentials:"same-origin",redirect:"follow",headers:ae({"content-type":"application/x-www-form-urlencoded"}),body:new URLSearchParams({csrf:i,nonce:s.nonce,digest:s.digest,sheet:"release",passkey:m}).toString()});if(P.ok){window.location.assign(P.url||window.location.href);return}j("Release approval was refused. Reload and try again.")}catch(y){y instanceof DOMException&&y.name==="NotAllowedError"?j("Passkey confirmation was cancelled."):j("Passkey confirmation couldn't finish. Try again or approve on your iPhone.")}finally{r(!1)}},T=async()=>{j(null),k(null),v(!0);try{let y=await fetch(`${h}/release/push-phone`,{method:"POST",credentials:"same-origin",headers:ae({"content-type":"application/x-www-form-urlencoded",accept:"application/json"}),body:new URLSearchParams({csrf:i,digest:s.digest}).toString()}),$=await y.json();y.ok&&$.ok?k($.message??"Sent a release approval prompt to your iPhone."):j($.error??"Couldn't send the release approval prompt to your iPhone.")}catch{j("Couldn't reach Toolroll to notify your iPhone.")}finally{v(!1)}},K=(0,e.jsxs)(e.Fragment,{children:[s.accessWarning!==null&&(0,e.jsx)(A,{children:s.accessWarning}),(0,e.jsx)(G,{rows:[["Commit",(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("code",{className:"k-mono",title:s.approvedSha,children:s.approvedSha.slice(0,7)})," · ",(0,e.jsx)("code",{className:"k-mono",children:s.branch})]})],["Check",s.checkKind],["On approve",`Runs the release check on ${s.approvedSha.slice(0,7)}, then deploys, merges, tags and publishes once GitHub CI and the check pass.`],["Later commits",s.carries?"Later commits that only change tests, docs or the changelog carry this approval.":"Every later commit asks again."]]})]}),D=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Needs you",tone:"needs"}),(0,e.jsx)("h2",{children:"Ready for your approval"})]}),_=s.ciWords,M=null,u="",B=!0;return s.approved!==null?(B=!1,D=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Approved",tone:"done"}),(0,e.jsx)("h2",{children:"Release approved"})]}),_=`Approved by ${s.approved.by}. ${s.ciWords}`,M=(0,e.jsx)(N,{variant:"outline",href:h,label:"Open the task"})):s.refusal!==null?(B=!1,D=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W,{word:"Can't approve",tone:"failed"}),(0,e.jsx)("h2",{children:"Can't approve this release now"})]}),_=s.refusal,M=(0,e.jsx)(N,{variant:"outline",href:h,label:"Open the task"})):s.local!==null?(_=`${s.ciWords} Releases need a full sign-in on this computer.`,M=(0,e.jsx)(N,{variant:"primary",href:s.local.href,label:s.local.action}),u=s.local.message):(u="Requires your live passkey, on your iPhone. Passwords and browser sessions can't approve a release.",M=s.nonce===""?null:(0,e.jsxs)(x,{action:`${h}/approve`,className:"k-form","data-release-approve":s.digest,onSubmit:y=>{y.preventDefault(),F()},children:[(0,e.jsx)("input",{type:"hidden",name:"nonce",value:s.nonce}),(0,e.jsx)("input",{type:"hidden",name:"digest",value:s.digest}),(0,e.jsx)("input",{type:"hidden",name:"sheet",value:"release"}),c!==null&&(0,e.jsx)(A,{children:c}),d!==null&&(0,e.jsx)(de,{children:d}),(0,e.jsxs)(U,{children:[(0,e.jsx)(f,{variant:Pe()?"outline":"primary",type:"button",label:"Approve on your iPhone",busy:b?"Sending…":!1,disabled:b,onClick:()=>{T()},"data-release-phone-push":""}),Pe()&&(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Approve with passkey here",busy:l?"Waiting for passkey…":!1,disabled:l,"data-release-passkey-approve":""})]})]})),(0,e.jsx)("div",{"data-kit-page":"","data-release-sheet":s.taskId,children:(0,e.jsxs)(L,{children:[(0,e.jsx)(V,{title:g,back:[h,"Task"],meta:`${s.projectName} · pull request #${s.pr}`}),s.problem!==null&&(0,e.jsx)(A,{children:s.problem}),(0,e.jsx)(le,{wait:B,status:D,text:_,body:K,acts:M,terms:u}),s.stopped!==null&&(0,e.jsxs)("section",{className:"k-sec","data-release-stopped":"",children:[(0,e.jsxs)(de,{children:["The release isn't running (it stopped at ",s.stopped.step,")."]}),(0,e.jsxs)(x,{action:"/release/start",className:"k-form","data-release-start-form":"",children:[s.repo!==void 0&&(0,e.jsx)("input",{type:"hidden",name:"repo",value:s.repo}),(0,e.jsx)("input",{type:"hidden",name:"branch",value:s.branch}),(0,e.jsx)(U,{children:(0,e.jsx)(f,{sm:!0,variant:"outline",type:"submit",label:"Start release"})})]})]}),s.held!==null&&(0,e.jsxs)("section",{className:"k-sec","data-release-held":"",children:[(0,e.jsx)("h3",{children:"Held after its merge"}),(0,e.jsxs)(p,{children:[s.held,"."]}),(0,e.jsxs)(x,{action:`${h}/release/go-on`,className:"k-form",children:[(0,e.jsx)(X,{proof:"monitoring",value:t,onChange:n,label:"Your password"}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Let it go on"})]})]}),s.changes.commits===null?(0,e.jsx)(p,{children:s.changes.baselineUnreadable?"What changed couldn't be read: the last verified release's commit can't be read.":`What changed couldn't be read${s.changes.why===void 0?"":` (${s.changes.why})`}. See pull request #${s.pr} on GitHub.`}):(0,e.jsxs)(z,{summary:`What changed: ${Q(s.changes.commits.length,"commit")}`,open:s.changes.commits.length>0&&s.changes.commits.length<=5,children:[(0,e.jsx)(p,{children:s.changes.baseline===null?`Pull request #${s.pr}'s commits`:`Since the last verified release (${s.changes.baseline.slice(0,7)})`}),s.changes.commits.length===0?(0,e.jsx)(p,{children:"No commits."}):(0,e.jsx)("ul",{className:"k-list",children:s.changes.commits.map(y=>(0,e.jsxs)("li",{children:[(0,e.jsx)("code",{className:"k-mono",children:y.sha.slice(0,7)})," ",Me(y.subject)]},y.sha))})]}),(0,e.jsxs)(z,{summary:`Every term (${s.terms.length})`,children:[S.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{children:"Release"}),(0,e.jsx)(G,{rows:S.map(y=>[y.label,(0,e.jsx)("span",{className:"k-mono",children:y.value})])})]}),C.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{children:"Underlying scope & settings"}),(0,e.jsx)(G,{rows:C.map(y=>[y.label,(0,e.jsx)("span",{className:"k-mono",children:y.value})])})]})]})]})})}function ai({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsxs)("h1",{children:["Resume build #",s.run,"?"]}),(0,e.jsxs)(x,{action:`/t/${encodeURIComponent(s.taskId)}/resume`,className:"card resume-form",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:s.returnTo}),(0,e.jsx)("input",{type:"hidden",name:"nonce",value:s.nonceValue}),(0,e.jsx)("input",{type:"hidden",name:"run",value:String(s.run)}),(0,e.jsx)("p",{className:"resume-target",children:(0,e.jsx)("strong",{children:s.taskTitle})}),(0,e.jsxs)("p",{className:"row",children:["It continues from the saved work",s.committed?" and its commit":"",". Resuming approves nothing new."]}),s.blocked!==null&&(0,e.jsx)("p",{className:"row problem-words",children:s.blocked}),(0,e.jsx)(me,{kind:"step-up",field:"token",children:(0,e.jsxs)("label",{children:["Your password",(0,e.jsx)("input",{type:"password",name:"token",autoComplete:"current-password"})]})}),(0,e.jsx)("button",{type:"submit",children:"Resume"})]})]})}function ti({view:s}){let i=(0,I.useContext)(ie),[t,n]=(0,I.useState)(null),[l,r]=(0,I.useState)({}),b=async(c,j,d)=>{let k=new URLSearchParams({respond:"fragment",csrf:i,projectRevision:String(s.projectRevision),queueRevision:String(s.queueRevision),task:c,column:j,before:d});try{let h=await fetch("/queue/move",{method:"POST",headers:ae({"content-type":"application/x-www-form-urlencoded"}),body:k.toString(),credentials:"same-origin"});if(h.ok){window.location.reload();return}if(h.status===409){let g=await h.text();r(S=>({...S,[c]:g}))}}catch{}},v=[{key:"anyone",title:"shared queue",runner:null,empty:"nothing waiting — every task is reserved or running",worker:null},...s.workers.map(c=>({key:c.name,title:`${c.name}${c.retired?" (retired)":""}`,runner:c.name,empty:"nothing queued — this builder takes from the shared queue",worker:c}))];return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:"Order the queue"}),(0,e.jsxs)("p",{className:"meta board-view",children:[(0,e.jsx)("a",{href:"/?view=board",children:"Board"})," · ",(0,e.jsx)("strong",{children:"order"})," ",(0,e.jsx)("span",{className:"meta",children:"— drag to reorder, or onto a builder to keep it for that builder"})]}),(0,e.jsx)("div",{className:"lanes","data-queue-revision":s.queueRevision,children:v.map(c=>{let j=s.tasks.filter(d=>d.assignedRunner===c.runner);return(0,e.jsxs)("section",{className:"lane queue-column","data-column":c.key,onDragOver:d=>{t!==null&&d.preventDefault()},onDrop:d=>{if(d.preventDefault(),t!==null){let k=t;n(null),b(k,c.key,"")}},children:[(0,e.jsx)("h2",{children:c.title}),c.worker===null?(0,e.jsx)("p",{className:"meta",children:"Workers take from here when their column is empty — top card first"}):c.worker.retired?(0,e.jsx)("p",{className:"meta",children:"This builder is retired — drag these elsewhere, or register the name again"}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("p",{className:"meta mono",children:[c.worker.building," building in this project · unattended capacity ",c.worker.capacity]}),(0,e.jsxs)(x,{action:"/queue/note",className:"row",children:[(0,e.jsx)("input",{type:"hidden",name:"projectRevision",value:String(s.projectRevision)}),(0,e.jsx)("input",{type:"hidden",name:"runner",value:c.worker.name}),(0,e.jsx)("input",{type:"text",name:"note",defaultValue:c.worker.note??"",placeholder:"what this worker is working through","aria-label":"column note",maxLength:200}),(0,e.jsx)("button",{type:"submit",children:"Save"})]}),(0,e.jsx)("p",{className:"meta",children:"Takes from the shared queue when this column is empty"})]}),j.length===0?(0,e.jsx)("p",{className:"meta lane-empty",children:c.empty}):j.map((d,k)=>(0,e.jsxs)("div",{className:"card queue-card","data-task":d.id,"data-taken":d.taken?"1":"0",draggable:!d.taken,onDragStart:()=>{d.taken||n(d.id)},onDragEnd:()=>n(null),onDrop:h=>{if(h.stopPropagation(),h.preventDefault(),t!==null&&t!==d.id&&!d.taken){let g=t;n(null),b(g,c.key,d.id)}},children:[(0,e.jsxs)("p",{className:"row",children:[(0,e.jsx)("a",{href:`/t/${encodeURIComponent(d.id)}`,children:d.title})," ",(0,e.jsx)("span",{className:"badge",children:d.taken?"Starting — a builder has it":c.key==="anyone"?"Queued":`Reserved for ${c.key}`}),d.dispatch!==null&&(0,e.jsx)("a",{className:"badge",href:`/t/${encodeURIComponent(d.id)}`,title:d.dispatch.summary,children:d.dispatch.headline})]}),k===0&&c.key==="anyone"&&s.allWorkersBusy&&!d.taken&&(0,e.jsx)("p",{className:"meta",children:"Every builder has work kept for it — this waits until a column empties"}),(0,e.jsxs)("p",{className:"row meta",children:[(0,e.jsx)("span",{className:"mono",children:d.id}),!d.taken&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(x,{action:"/queue/move",className:"inline",children:[(0,e.jsx)("input",{type:"hidden",name:"projectRevision",value:String(s.projectRevision)}),(0,e.jsx)("input",{type:"hidden",name:"queueRevision",value:String(s.queueRevision)}),(0,e.jsx)("input",{type:"hidden",name:"task",value:d.id}),(0,e.jsx)("input",{type:"hidden",name:"column",value:c.key}),(0,e.jsx)("input",{type:"hidden",name:"before",value:"__front__"}),(0,e.jsx)("button",{type:"submit",className:"icon-button","aria-label":"move to the front",children:"↑"})]}),(0,e.jsxs)(x,{action:"/queue/move",className:"inline",children:[(0,e.jsx)("input",{type:"hidden",name:"projectRevision",value:String(s.projectRevision)}),(0,e.jsx)("input",{type:"hidden",name:"queueRevision",value:String(s.queueRevision)}),(0,e.jsx)("input",{type:"hidden",name:"task",value:d.id}),(0,e.jsxs)("select",{name:"column","aria-label":"reserve for",defaultValue:c.key,children:[(0,e.jsx)("option",{value:"anyone",children:"anyone"}),s.workers.filter(h=>!h.retired).map(h=>(0,e.jsx)("option",{value:h.name,children:h.name},h.name))]}),(0,e.jsx)("button",{type:"submit",children:"Move"})]})]})]}),l[d.id]!==void 0&&(0,e.jsx)("p",{className:"problem queue-problem",role:"alert",children:l[d.id]})]},d.id))]},c.key)})})]})}function ni({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.title}),s.lines.map((i,t)=>(0,e.jsx)("p",{children:i},t)),s.dirtyFiles&&s.dirtyFiles.length>0&&(0,e.jsx)("ul",{children:s.dirtyFiles.slice(0,20).map((i,t)=>(0,e.jsx)("li",{className:"k-mono",children:i},t))}),s.unresolved!==void 0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(G,{rows:[["Branch",(0,e.jsx)("code",{className:"k-mono",children:s.unresolved.branch})],["Previous commit",(0,e.jsx)("code",{className:"k-mono",children:s.unresolved.old.slice(0,7)})],["Landing commit",(0,e.jsx)("code",{className:"k-mono",children:s.unresolved.commit.slice(0,7)})]]}),(0,e.jsxs)(x,{action:s.action,children:[s.into!==""&&(0,e.jsx)("input",{type:"hidden",name:"into",value:s.into}),(0,e.jsx)("input",{type:"hidden",name:"intent",value:String(s.unresolved.intentId)}),(0,e.jsx)("input",{type:"hidden",name:"intent-commit",value:s.unresolved.commit}),(0,e.jsx)("input",{type:"hidden",name:"intent-old",value:s.unresolved.old}),(0,e.jsxs)(U,{children:[(0,e.jsx)(f,{variant:"primary",type:"submit",name:"resolve",value:"complete",label:"Finish landing"}),(0,e.jsx)(f,{variant:"outline",type:"submit",name:"resolve",value:"rollback",label:"Restore branch"}),(0,e.jsx)(f,{variant:"ghost",type:"submit",name:"resolve",value:"dismiss",label:"Clear notice"}),(0,e.jsx)(N,{variant:"ghost",href:s.cancelHref,label:"Cancel"})]})]})]}):(0,e.jsxs)(x,{action:s.action,children:[(0,e.jsx)("input",{type:"hidden",name:"key",value:s.key}),s.into!==""&&(0,e.jsx)("input",{type:"hidden",name:"into",value:s.into}),s.undo&&(0,e.jsx)("input",{type:"hidden",name:"undo",value:"1"}),s.whenClean&&(0,e.jsx)("input",{type:"hidden",name:"when-clean",value:"1"}),(0,e.jsxs)(U,{children:[(0,e.jsx)(f,{variant:"primary",type:"submit",label:s.submitLabel}),s.openPrHref&&(0,e.jsx)(N,{variant:"outline",href:s.openPrHref,label:"Open PR"}),(0,e.jsx)(N,{variant:"ghost",href:s.cancelHref,label:"Cancel"})]})]})]})}function ii({view:s,csrf:i,result:t}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.title}),(0,e.jsx)("p",{children:s.state}),(0,e.jsx)("p",{className:"problem","data-history-problem":"",children:s.problem}),s.result!==null&&t!==void 0&&(0,e.jsx)("section",{className:"task-result-tab",id:"task-result","aria-label":"Result","data-result-task":s.result.selected.taskId,children:t(s.result.selected,i,s.result.current)})]})}var Be=["Fix the flaky refund test","Rewrite the empty Payouts page","Put the new invoice view behind a flag"];function Ge({diff:s}){return(0,e.jsx)(e.Fragment,{children:s.replace(/\n$/,"").split(`
4
+ `).map((i,t)=>{let n=i.startsWith("diff --git")||i.startsWith("new file")?"file":i.startsWith("+++")||i.startsWith("---")?"meta":i.startsWith("@@")?"hunk":i.startsWith("+")?"add":i.startsWith("-")?"del":"ctx";return(0,e.jsx)("span",{className:`demo-diff-${n}`,children:i||" "},t)})})}function Ye({exchange:s,result:i}){if(i===null)return(0,e.jsx)("section",{className:"card demo-result",children:(0,e.jsx)("p",{className:"meta",children:"This result's saved evidence is unavailable."})});let t=i.checks.status==="passed",n=s.state==="complete"?"Complete":s.state==="sent-back"?"Building":t?"Ready":"Failed";return(0,e.jsxs)("section",{className:"card demo-result",id:`demo-${s.id}-work`,"aria-label":"Result",children:[(0,e.jsxs)("p",{className:"demo-state",children:[(0,e.jsx)("span",{className:`badge${n==="Complete"?" demo-complete":n==="Ready"?" demo-ready":""}`,"data-headline":n,children:n}),(0,e.jsx)("span",{className:"meta",children:s.plan.project})]}),(0,e.jsx)("h2",{children:s.plan.title}),(0,e.jsx)("p",{children:s.plan.conclusion}),(0,e.jsxs)("p",{className:"meta",children:[i.files," ",i.files===1?"file":"files"," changed · +",i.additions," −",i.deletions," ·"," ",(0,e.jsx)("span",{className:t?"demo-pass":"demo-fail",children:i.checks.detail})]}),s.state==="ready"?(0,e.jsxs)("div",{className:"demo-actions",children:[(0,e.jsx)(x,{action:`/chat/demo/${s.id}/complete`,children:(0,e.jsx)("button",{type:"submit",className:"demo-primary",children:"Complete"})}),(0,e.jsxs)("details",{className:"demo-more",children:[(0,e.jsx)("summary",{children:"Request changes"}),(0,e.jsxs)(x,{action:`/chat/demo/${s.id}/revise`,children:[(0,e.jsx)("label",{htmlFor:`demo-revise-${s.id}`,children:"What should change?"}),(0,e.jsx)("textarea",{id:`demo-revise-${s.id}`,name:"note",rows:2,maxLength:500,required:!0}),(0,e.jsx)("button",{type:"submit",children:"Send back"})]})]})]}):(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:i.taskHref,children:"Open the task"})}),i.diff!==null&&(0,e.jsxs)("details",{className:"demo-evidence",open:s.state==="ready"||void 0,children:[(0,e.jsx)("summary",{children:"Changes"}),(0,e.jsx)("pre",{className:"demo-diff",children:(0,e.jsx)(Ge,{diff:i.diff})})]}),i.checkLog!==null&&(0,e.jsxs)("details",{className:"demo-evidence",children:[(0,e.jsx)("summary",{children:"Check log"}),(0,e.jsx)("pre",{className:"demo-log",children:i.checkLog})]}),i.screenshot!==null&&(0,e.jsxs)("details",{className:"demo-evidence",children:[(0,e.jsx)("summary",{children:"Screenshot"}),(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:i.screenshot.href,alt:i.screenshot.caption,width:960,height:600}),(0,e.jsx)("figcaption",{className:"meta",children:i.screenshot.caption})]})]})]})}function li({view:s}){let i=s.exchanges.some(l=>l.state==="working"),t=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!i)return;let l=setInterval(()=>{window.location.reload()},1e3);return()=>clearInterval(l)},[i]);let n=l=>{l.key==="Enter"&&!l.shiftKey&&!l.nativeEvent.isComposing&&l.currentTarget.value.trim()!==""&&(l.preventDefault(),t.current?.requestSubmit())};return(0,e.jsxs)("div",{className:`demo-chat${s.exchanges.length===0?" demo-chat--empty":""}`,children:[s.problem!==null&&(0,e.jsx)("p",{className:"problem",role:"alert",children:s.problem}),(0,e.jsx)("div",{id:"demo-thread",className:"demo-thread","aria-live":"polite","data-version":s.version,"data-working":i?"1":"0",children:s.exchanges.length===0?(0,e.jsxs)("section",{className:"demo-hint","aria-label":"Get started",children:[(0,e.jsx)("h2",{className:"demo-hint-title",children:"What should we work on?"}),(0,e.jsx)("p",{className:"demo-hint-sub",children:"Ask for something, like “fix the flaky refund test”, or start from one of these."}),(0,e.jsx)(x,{action:"/chat/demo/ask",className:"demo-suggestions",children:Be.map(l=>(0,e.jsx)("button",{type:"submit",name:"message",value:l,children:l},l))})]}):s.exchanges.map(l=>{let r=[["planning","Planning"],["building","Building"],["checking","Running checks"]],b=Math.max(0,r.findIndex(([c])=>c===l.stage)),v=l.note===null?l.plan.goal:`${l.plan.goal} Also: ${l.note}`;return(0,e.jsxs)("article",{className:"demo-turn",id:`demo-${l.id}`,children:[(0,e.jsx)("div",{className:"demo-said demo-you",children:(0,e.jsx)("p",{children:l.asked})}),(0,e.jsxs)("div",{className:"demo-said demo-lead",children:[(0,e.jsxs)("p",{className:"demo-who",children:[(0,e.jsx)("span",{className:"demo-avatar","aria-hidden":"true",children:"T"}),"Toolroll"]}),(0,e.jsx)("p",{children:l.reply})]}),(0,e.jsxs)("section",{className:"card demo-plan","aria-label":"Plan",children:[(0,e.jsxs)("p",{className:"demo-kicker",children:["Plan · ",l.plan.project]}),(0,e.jsx)("h2",{children:l.plan.title}),(0,e.jsx)("p",{children:v}),(0,e.jsx)("h3",{children:"Boundaries"}),(0,e.jsx)("ul",{children:l.plan.boundaries.map((c,j)=>(0,e.jsx)("li",{children:c},j))}),(0,e.jsx)("h3",{children:"Checks"}),(0,e.jsx)("ul",{children:l.plan.checks.map((c,j)=>(0,e.jsx)("li",{children:c},j))}),l.state==="proposed"?(0,e.jsxs)("div",{className:"demo-actions",children:[(0,e.jsx)(x,{action:`/chat/demo/${l.id}/approve`,className:"approve-form",children:(0,e.jsx)("button",{type:"submit",children:"Approve"})}),(0,e.jsxs)("details",{className:"demo-more",children:[(0,e.jsx)("summary",{children:"Change it"}),(0,e.jsxs)(x,{action:`/chat/demo/${l.id}/change`,children:[(0,e.jsx)("label",{htmlFor:`demo-change-${l.id}`,children:"What should change?"}),(0,e.jsx)("textarea",{id:`demo-change-${l.id}`,name:"note",rows:2,maxLength:500,required:!0}),(0,e.jsx)("button",{type:"submit",children:"Update plan"})]})]})]}):(0,e.jsx)("p",{className:"meta",children:l.state==="replaced"?"Replaced by the updated plan below.":"Approved."})]}),l.state==="working"&&(0,e.jsxs)("section",{className:"card demo-build",id:`demo-${l.id}-work`,"aria-label":"Build","aria-busy":"true",children:[(0,e.jsx)("p",{className:"demo-kicker",children:l.plan.project}),(0,e.jsxs)("h2",{children:[r[b][1],"…"]}),(0,e.jsx)("ol",{className:"demo-steps",children:r.map(([,c],j)=>(0,e.jsx)("li",{className:j<b?"done":j===b?"now":"","aria-current":j===b?"step":void 0,children:c},c))}),l.progress!==null&&(0,e.jsx)("p",{className:"meta demo-progress",children:l.progress})]}),(l.state==="ready"||l.state==="complete"||l.state==="sent-back")&&(0,e.jsx)(Ye,{exchange:l,result:s.results[l.id]??null}),l.state==="complete"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"demo-said demo-lead",children:[(0,e.jsxs)("p",{className:"demo-who",children:[(0,e.jsx)("span",{className:"demo-avatar","aria-hidden":"true",children:"T"}),"Toolroll"]}),(0,e.jsx)("p",{children:"Done. That's the whole loop: ask, approve, Ready, Complete. Ask for something else whenever you like."})]}),(0,e.jsxs)("section",{className:"card demo-handoff","data-demo-handoff":"","aria-label":"Your own project",children:[(0,e.jsx)("h2",{children:"Now try it on your own project"}),(0,e.jsx)("p",{children:"In your repository's folder, run:"}),(0,e.jsx)("pre",{className:"demo-command",children:(0,e.jsx)("code",{children:s.startCommand})}),(0,e.jsx)("p",{className:"meta",children:"It opens in that terminal. Press w there to open it in the browser."})]})]})]},l.id)})}),(0,e.jsxs)(x,{ref:t,action:"/chat/demo/ask",className:"demo-composer",children:[(0,e.jsx)("label",{htmlFor:"demo-message",className:"so-sr-only",children:"Ask for a change"}),(0,e.jsxs)("div",{className:"demo-composer-card",children:[(0,e.jsx)("textarea",{id:"demo-message",name:"message",rows:1,maxLength:500,placeholder:"Ask for a change",required:!0,"aria-describedby":"demo-composer-hint",onKeyDown:n}),(0,e.jsxs)("div",{className:"demo-composer-bar",children:[(0,e.jsx)("span",{id:"demo-composer-hint",children:"Enter to send · Shift + Enter for a new line"}),(0,e.jsx)("button",{type:"submit",className:"demo-primary demo-send","aria-label":"Send",children:"Send"})]})]})]})]})}function ri({view:s}){let[i,t]=(0,I.useState)(""),[n,l]=(0,I.useState)("");if(s.disabledState!==null){let r=s.disabledState;return(0,e.jsxs)("div",{"data-kit-page":"",children:[s.problem!==null&&(0,e.jsx)("div",{className:"problem",children:s.problem}),!(r.code==="unconfigured"&&r.firstRunShown)&&(r.code==="demo"?(0,e.jsxs)("div",{className:"card",id:"latest",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"Chat isn’t available in demo mode"})}),(0,e.jsxs)("p",{className:"meta",children:["Demo data never contacts an external model. Start Toolroll with a real project to use chat: ",(0,e.jsx)("code",{children:s.startCommand})," in your repository."]})]}):r.code==="unconfigured"?(0,e.jsxs)("div",{className:"card",id:"latest","data-lead-off":"",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"The lead is off."})}),(0,e.jsx)("p",{className:"meta",children:r.canManage?(0,e.jsxs)(e.Fragment,{children:["Turn it on in ",(0,e.jsx)("a",{href:"/settings/lead",children:"Settings → Lead"}),"."]}):"An approver can turn it on."})]}):r.code==="unpriced"||r.code==="no-key"?(0,e.jsxs)("div",{className:"card",id:"latest",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"The lead can’t run yet."})}),(0,e.jsxs)("p",{className:"meta",children:[r.why,r.canManage&&(0,e.jsxs)(e.Fragment,{children:[" · ",(0,e.jsx)("a",{href:"/settings/lead",children:"Settings → Lead"})]})]})]}):(0,e.jsxs)("div",{className:"card",id:"latest",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"Chat is off."})}),(0,e.jsx)("p",{className:"meta",children:r.why})]}))]})}return(0,e.jsxs)("div",{"data-kit-page":"",children:[s.problem!==null&&(0,e.jsx)("div",{className:"problem",children:s.problem}),!s.canManage&&(0,e.jsxs)("div",{className:"card chat-readonly",children:[(0,e.jsx)("strong",{children:"Read-only view"}),(0,e.jsx)("p",{className:"meta",children:"An approver can start the unified conversation and confirm its proposed actions. You can still open every live card and project board here."})]}),s.canManage&&s.mint!==null&&(0,e.jsxs)("div",{className:"card mate-mint",id:"latest",children:[(0,e.jsx)("p",{children:(0,e.jsx)("strong",{children:"Start a conversation"})}),(0,e.jsxs)(x,{action:"/chat/mate/mint",children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:s.mint.returnTo}),(0,e.jsx)("div",{className:"mate-terms",children:s.mint.subscription?(0,e.jsxs)("span",{className:"meta",children:["Uses your ",s.mint.providerLabel," membership · no dollar limit · daily turn limits apply"]}):(0,e.jsxs)("label",{children:["Spend up to ",(0,e.jsxs)("span",{className:"inline-field",children:["$",(0,e.jsx)("input",{type:"text",name:"ceiling-usd",inputMode:"decimal",defaultValue:"5",style:{width:"5rem"}})]})," ",(0,e.jsxs)("span",{className:"meta",children:["(weekly chat ceiling ",s.mint.weeklyCeilingWords," still applies)"]})]})}),(0,e.jsxs)("label",{className:"arm",children:[(0,e.jsx)("input",{type:"checkbox",name:"follow",value:"yes"})," Let the lead follow crew updates"]}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Start chat"})]})]}),s.canManage&&s.coordinatorProposals.map(r=>(0,e.jsx)(Te,{proposal:r},r.card.id)),(0,e.jsxs)("details",{className:"chat-limits",children:[(0,e.jsxs)("summary",{children:["Model & limits",(0,e.jsx)("span",{className:"meta",children:s.subscription?"membership":s.provider})]}),(0,e.jsxs)("div",{className:"chat-budget",children:[(0,e.jsxs)("span",{className:"mono",children:[s.provider," · ",s.model]}),(0,e.jsxs)("span",{children:[s.turnsToday," / ",s.dailyTurns," turns today"]}),s.subscription?(0,e.jsx)("span",{children:"membership login · no dollar limit"}):(0,e.jsxs)("span",{children:["this week ",s.weeklySpentWords," of ",s.weeklyCeilingWords]})]})]}),s.latched.map(r=>(0,e.jsxs)("div",{className:"problem",children:[(0,e.jsx)("strong",{children:"Chat is paused."})," An earlier reply stopped before its cost was known; it may have cost up to ",r.reservedWords,"."," ",(0,e.jsx)("a",{href:`/chat/ack/${r.id}`,children:"Confirm that cost"})," to turn chat back on."]},r.id)),s.pending!==null?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"card",children:(0,e.jsxs)("p",{children:[(0,e.jsx)("strong",{children:"Thinking…"})," ",s.pending.details]})}),(0,e.jsx)("p",{className:"meta",children:(0,e.jsx)("a",{href:"/chat",children:"refresh now"})})]}):(0,e.jsxs)(e.Fragment,{children:[s.lastTurn!==null&&(0,e.jsx)("div",{className:"card",id:"latest",children:s.lastTurn.staticError!==null?(0,e.jsx)("p",{className:"meta",children:s.lastTurn.staticError}):(0,e.jsxs)(e.Fragment,{children:[s.lastTurn.reply!==null&&(0,e.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:s.lastTurn.reply}),s.lastTurn.proposalsDiscarded&&(0,e.jsx)("p",{className:"meta",children:"A draft block in this answer was malformed and was discarded whole"})]})}),s.candidates.map(r=>(0,e.jsxs)("div",{className:"card",children:[(0,e.jsxs)("p",{children:[(0,e.jsx)("strong",{children:r.title})," ",(0,e.jsxs)("span",{className:"badge",children:["Draft ",r.kind]})]}),(0,e.jsx)("p",{className:"meta",children:"Drafted by the model from fleet context — nothing is filed; drafts do not survive a restart"}),(0,e.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:r.goal}),r.outOfScope!==null&&(0,e.jsxs)("p",{className:"meta",children:["Not: ",r.outOfScope]}),r.touches.length>0&&(0,e.jsxs)("p",{className:"meta",children:["Touches: ",r.touches.join(", ")]}),(0,e.jsxs)("p",{className:"meta",children:["Repo: ",(0,e.jsx)("span",{className:"mono",children:r.repoName})]}),(0,e.jsxs)(x,{action:`/chat/file/${r.key}`,className:"inline",children:[(0,e.jsx)(X,{proof:"mode-sign",value:n,onChange:l,label:"Your password"}),(0,e.jsx)(f,{type:"submit",label:"File unapproved"})]})]},r.key)),!s.subscription&&s.canManage&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{children:"Ask"}),(0,e.jsxs)(x,{action:"/chat",className:"card",children:[(0,e.jsxs)("label",{children:["Message",(0,e.jsx)("textarea",{name:"message",rows:3,maxLength:2e3})]}),(0,e.jsx)(X,{proof:"mode-sign",value:i,onChange:t,label:"Your password",hint:"every message — chat spends"}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Ask"})]})]}),s.canManage&&(0,e.jsxs)("p",{className:"meta",id:"chat-settings",children:[(0,e.jsx)("a",{href:"/settings/lead",children:"Chat settings"})," · provider, model and limits"]}),s.recentTurns.length>0&&(0,e.jsxs)("details",{className:"chat-turn-history",children:[(0,e.jsxs)("summary",{children:["Conversation activity ",(0,e.jsxs)("span",{className:"meta",children:[s.recentTurns.length," recent turns"]})]}),s.recentTurns.map(r=>(0,e.jsxs)("p",{className:"row",children:[(0,e.jsxs)("span",{className:"mono",children:["#",r.id]})," ",r.state,r.failureReason!==null&&` · ${r.failureReason}`," ",(0,e.jsxs)("span",{className:"right meta",children:[r.tokensIn??"–"," in / ",r.tokensOut??"–"," out · ",r.costWords]})]},r.id))]})]})]})}function di({view:s}){let i=(0,I.useContext)(ie),[t,n]=(0,I.useState)("");return s.mode==="outcome"?(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.title}),(0,e.jsx)("p",{children:s.said}),(0,e.jsx)("a",{className:"button-link",href:s.destination,children:s.linkLabel})]}):s.mode==="team-proposal"?(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:s.backHref,children:"Back to conversation"})}),(0,e.jsx)(Ve,{cards:[s.card],csrf:i,onChanged:()=>window.location.reload()})]}):s.mode==="chat-ack"?(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:"Unknown spend"}),(0,e.jsxs)("div",{className:"card",children:[(0,e.jsxs)("p",{children:["Turn ",(0,e.jsxs)("span",{className:"mono",children:["#",s.turnId]})," on ",(0,e.jsxs)("span",{className:"mono",children:[s.provider," · ",s.model]})," may have started before it failed (",s.failureReason,"), and its cost could not be measured."]}),s.replyChargeWords===null?(0,e.jsx)("p",{children:(0,e.jsxs)("strong",{children:["Acknowledging charges the reserved worst case, ",s.reservedWords,", to the ledger and re-enables chat on this credential."]})}):(0,e.jsx)("p",{children:(0,e.jsxs)("strong",{children:["This lead reply's worst case, ",s.replyChargeWords,", has already been counted against its conversation. Acknowledging adds nothing more and re-enables chat on this credential."]})}),(0,e.jsx)("p",{className:"meta",children:"Check the provider's own usage dashboard if you want the exact figure first; the ledger keeps whichever is known."}),(0,e.jsxs)(x,{action:`/chat/ack/${s.turnId}`,children:[(0,e.jsx)("input",{type:"hidden",name:"nonce",value:s.nonce}),(0,e.jsx)(X,{proof:"mode-sign",value:t,onChange:n,label:"Your password"}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:"Accept the charge — re-enable chat"})]})]})]}):(0,e.jsxs)("section",{className:"shared-action","data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.title}),s.evidenceRunId!==null&&(0,e.jsx)("a",{href:`/r/${s.evidenceRunId}`,children:"Inspect this result"}),s.terms.map((l,r)=>(0,e.jsx)("p",{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:l},r)),(0,e.jsxs)(x,{action:`/chat/proposal/${s.proposalId}/confirm`,children:[(0,e.jsx)("input",{type:"hidden",name:"return",value:"/chat"}),(0,e.jsx)("input",{type:"hidden",name:"nonce",value:s.nonce}),(0,e.jsxs)("label",{className:"arm",children:[(0,e.jsx)("input",{type:"checkbox",name:"confirm",value:"yes",required:!0}),"I confirm this exact action"]}),s.passwordMode==="local-refusal"&&s.localRefusal!==void 0?(0,e.jsxs)("p",{className:"approval-password-note",children:[s.localRefusal.message," ",(0,e.jsx)("a",{href:s.localRefusal.href,children:s.localRefusal.action})]}):s.passwordMode==="remembered"?(0,e.jsxs)(me,{kind:"step-up",field:"token",children:[(0,e.jsxs)("label",{children:["Your password",(0,e.jsx)("input",{type:"password",name:"token",autoComplete:"current-password"})]}),s.freshSince!=null&&(0,e.jsxs)("p",{className:"approval-password-note","data-approval-fresh":"",children:["Your password from ",(0,e.jsx)("time",{dateTime:s.freshSince,children:se(s.freshSince)})," is remembered on this computer — leave this blank to approve with it, or type it again."]})]}):s.passwordMode==="required"&&(0,e.jsx)(X,{proof:"mode-sign",value:t,onChange:n,label:"Your password"}),(0,e.jsx)(f,{variant:"primary",type:"submit",label:s.label})]})]})}function ci({view:s}){return(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)("h1",{children:s.title}),s.said!==null&&(0,e.jsx)("p",{role:"status",children:s.said}),(0,e.jsxs)("p",{className:"meta",children:[s.line," · at most ",s.maxParallel," at once · each item is its own task in its own worktree"]}),(0,e.jsxs)("table",{className:"sweep-table",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{children:"#"}),(0,e.jsx)("th",{children:"Item"}),(0,e.jsx)("th",{children:"State"}),(0,e.jsx)("th",{children:"Verdict"}),(0,e.jsx)("th",{})]})}),(0,e.jsx)("tbody",{children:s.rows.map(i=>(0,e.jsxs)("tr",{"data-sweep-row":i.ordinal,children:[(0,e.jsx)("td",{children:i.ordinal+1}),(0,e.jsx)("td",{children:(0,e.jsx)("a",{href:`/t/${encodeURIComponent(i.task)}`,children:i.label})}),(0,e.jsx)("td",{children:(0,e.jsx)("span",{className:"chip",children:i.stateLabel})}),(0,e.jsx)("td",{children:i.verdict===null?(0,e.jsx)("span",{className:"meta",children:"—"}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("strong",{children:i.verdict.verdict})," ",(0,e.jsx)("span",{className:"meta",children:i.verdict.why})]})}),(0,e.jsx)("td",{children:i.resultTaskId!==null&&(0,e.jsx)("a",{href:`/t/${encodeURIComponent(i.resultTaskId)}`,children:"Result →"})})]},i.ordinal))})]}),s.cancel!==null&&(0,e.jsxs)("details",{className:"card",children:[(0,e.jsxs)("summary",{children:["Cancel the rest (",s.cancel.openCount,")"]}),(0,e.jsxs)(x,{action:`/sweeps/${s.id}/cancel-rest`,children:[(0,e.jsx)("input",{type:"hidden",name:"snapshot",value:s.cancel.snapshot}),(0,e.jsxs)("p",{children:["Cancels ",s.cancel.openCount-s.cancel.runningCount," unfinished"," ",s.cancel.openCount-s.cancel.runningCount===1?"item":"items",s.cancel.runningCount>0&&` and stops ${s.cancel.runningCount} running ${s.cancel.runningCount===1?"build":"builds"}`,":"," ",s.cancel.labels.join(", "),". Finished results stay."]}),(0,e.jsxs)("label",{className:"arm",children:[(0,e.jsx)("input",{type:"checkbox",name:"confirm",value:"yes",required:!0})," Cancel the rest"]}),(0,e.jsx)(f,{variant:"danger",type:"submit",label:"Cancel the rest"})]})]})]})}function oi({view:s}){let i={"signed-in":"Signed in","signed-out":"Not signed in","not-installed":"Not installed",checking:"Checking…"},t={"signed-in":"Signed in","signed-out":"Not signed in",unknown:"Installed","not-installed":"Not installed"},n=(h,g,S,C=!1)=>(0,e.jsxs)(x,{action:"/settings/lead/on",children:[(0,e.jsx)("input",{type:"hidden",name:"agent",value:h}),(0,e.jsx)("input",{type:"hidden",name:"return",value:"/welcome"}),(0,e.jsx)(f,{sm:!S,variant:S?"primary":"outline",docked:C,type:"submit",label:g})]}),l=h=>h.split("`").map((g,S)=>S%2===1?(0,e.jsx)("code",{className:"k-mono",children:g},S):g),r=s.lead==="agent"&&s.inventory==="full"?s.agent.agents.find(h=>h.canUse)??null:null,b=s.lead==="project"&&s.project.notTakingWork,v=s.lead==="project"&&!b,c=s.project.totalCount===0?"Add a folder":"Add another folder",j=s.lead==="task",d="/projects?return=%2Fwelcome",k=null;return r!==null?k=n(r.id,`Use ${r.name}`,!0):v?k=(0,e.jsx)(N,{variant:"primary",href:d,label:c}):b?k=(0,e.jsx)(N,{variant:"primary",href:s.startBuilderHref,label:"Start taking work"}):j&&(k=(0,e.jsx)(N,{variant:"primary",href:"/tasks/new",label:"Write a task"})),(0,e.jsxs)("div",{"data-kit-page":"",children:[(0,e.jsx)($e,{title:"Welcome"}),(0,e.jsxs)("div",{className:"k-doc welcome","data-welcome":"",children:[(0,e.jsxs)("div",{className:"k-hello",children:[(0,e.jsx)("h2",{children:"Get to your first result."}),(0,e.jsx)("p",{children:s.left===0?"Setup is done.":`${Q(s.left,"step")} left.`})]}),(0,e.jsxs)("section",{className:"k-sec welcome-step",id:"welcome-agent","data-step":"agent","data-done":s.agent.done?"1":"0","aria-labelledby":"welcome-agent-h",children:[(0,e.jsxs)("div",{className:"k-secthead",children:[(0,e.jsx)("h3",{id:"welcome-agent-h",children:"1. Agent"}),s.agent.done&&(0,e.jsx)(W,{word:"Done",tone:"done"})]}),(0,e.jsx)(p,{children:"The AI coding agent that plans and builds your tasks."}),s.inventory==="full"&&(0,e.jsxs)("div",{className:"welcome-rows",children:[s.agent.agents.map(h=>(0,e.jsxs)("div",{className:"k-srec","data-agent":h.id,"data-state":h.state,children:[(0,e.jsxs)("div",{className:"k-srec-m",children:[(0,e.jsx)("span",{className:"k-srec-t",children:h.name}),(0,e.jsx)("span",{className:"k-srec-s",children:h.command===null?i[h.state]:(0,e.jsxs)(e.Fragment,{children:[i[h.state],". To sign in, run this on the computer running Toolroll:",(0,e.jsx)("code",{className:"k-codeline",children:h.command})]})})]}),(0,e.jsx)("div",{className:"k-srec-a",children:h.inUse?(0,e.jsx)(W,{word:"In use",dot:!1}):h.canUse&&n(h.id,"Use this one",r?.id===h.id,r?.id===h.id)})]},h.id)),s.agent.others.map(h=>(0,e.jsx)("div",{className:"k-srec","data-agent":h.id,"data-state":h.state,children:(0,e.jsxs)("div",{className:"k-srec-m",children:[(0,e.jsx)("span",{className:"k-srec-t",children:h.name}),(0,e.jsx)("span",{className:"k-srec-s",children:h.state!=="signed-in"&&h.signIn!==null?(0,e.jsxs)(e.Fragment,{children:[t[h.state],". To sign in, run this on the computer running Toolroll:",(0,e.jsx)("code",{className:"k-codeline",children:h.signIn})]}):h.next!==null?(0,e.jsxs)(e.Fragment,{children:[t[h.state],". ",l(h.next)]}):t[h.state]})]})},h.id))]}),s.inventory==="summary"?s.agent.firstTask!==null?(0,e.jsxs)(p,{children:["Your first task goes to ",s.agent.firstTask,"."]}):(0,e.jsx)(p,{children:s.agent.checking?"Checking for a signed-in agent on this computer…":s.agent.noAgentYet}):s.inventory==="full"&&(s.agent.checking?(0,e.jsx)(p,{children:"Checking for a signed-in agent on this computer…"}):s.agent.done?s.agent.buildsWith!==null?(0,e.jsxs)(p,{children:["Tasks are built with ",s.agent.buildsWith,". ",(0,e.jsx)("a",{className:"k-link",href:"/settings/models",children:"Change"})]}):s.agent.firstTask!==null&&(0,e.jsxs)(p,{children:["Your first task goes to ",s.agent.firstTask,"."]}):(0,e.jsx)(p,{children:"Sign in to one of these, then come back to this page."}))]}),(0,e.jsxs)("section",{className:"k-sec welcome-step",id:"welcome-project","data-step":"project","data-done":s.project.done?"1":"0","aria-labelledby":"welcome-project-h",children:[(0,e.jsxs)("div",{className:"k-secthead",children:[(0,e.jsx)("h3",{id:"welcome-project-h",children:"2. Project"}),s.project.done&&(0,e.jsx)(W,{word:"Done",tone:"done"})]}),(0,e.jsx)(p,{children:s.project.totalCount===0?"A git repository on this computer for agents to work in.":s.project.notTakingWork?`${Q(s.project.totalCount,"project")} added. Tasks can't start yet: this computer isn't taking work for them.`:`${Q(s.project.totalCount,"project")} added.`}),s.project.listed.length>0&&(0,e.jsx)("div",{className:"welcome-rows",children:s.project.listed.map(h=>(0,e.jsx)("div",{className:"k-srec","data-project":"",children:(0,e.jsxs)("div",{className:"k-srec-m",children:[(0,e.jsx)("span",{className:"k-srec-t",children:h.name}),(0,e.jsx)("span",{className:"k-srec-s",children:(0,e.jsx)("span",{className:"k-mono",children:h.path})})]})},h.path))}),s.project.moreCount>0&&(0,e.jsxs)(p,{children:["And ",Q(s.project.moreCount,"more project")," in ",(0,e.jsx)("a",{className:"k-link",href:"/projects",children:"Projects"}),"."]}),s.project.problemWords!==null&&(0,e.jsx)(A,{children:s.project.problemWords}),(0,e.jsxs)("div",{className:"k-acts welcome-acts",children:[s.project.notTakingWork&&(0,e.jsx)(N,{sm:!0,href:s.startBuilderHref,variant:b?"primary":"outline",...b?{className:"k-docked"}:{},label:"Start taking work"}),(0,e.jsx)(N,{sm:!0,href:d,variant:v?"primary":"outline",...v?{className:"k-docked"}:{},label:c}),s.canAdd&&(0,e.jsx)(N,{sm:!0,href:"/projects/github",label:"From GitHub"}),s.canAdd&&s.project.samplePath!==null&&(0,e.jsx)(x,{action:"/welcome/sample",className:"welcome-form",children:(0,e.jsx)(f,{sm:!0,type:"submit",label:"Try a sample project"})})]}),s.project.totalCount===0&&s.canAdd&&s.project.samplePath!==null&&(0,e.jsxs)(p,{children:["The sample is a tiny repository, made at ",(0,e.jsx)("span",{className:"k-mono",children:s.project.samplePath}),"."]})]}),(0,e.jsxs)("section",{className:"k-sec welcome-step",id:"welcome-task","data-step":"task","data-done":s.task.done?"1":"0","aria-labelledby":"welcome-task-h",children:[(0,e.jsxs)("div",{className:"k-secthead",children:[(0,e.jsx)("h3",{id:"welcome-task-h",children:"3. First task"}),s.task.waitsForAgent?(0,e.jsx)(W,{word:"Filed",dot:!1}):s.task.done&&(0,e.jsx)(W,{word:"Done",tone:"done"})]}),s.task.done?(0,e.jsx)(p,{children:s.task.waitsForAgent?"It starts by itself once an agent is signed in (step 1).":(0,e.jsxs)(e.Fragment,{children:["Filed. Its plan waits for your approval in ",(0,e.jsx)("a",{className:"k-link",href:"/",children:"Work"}),"."]})}):s.task.open?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(p,{children:"Describe a change in a sentence or two. Nothing starts until you approve its plan."}),s.task.starters.length>0&&(0,e.jsx)("div",{className:"k-ideas","aria-label":"Ideas to start from","data-starters":"",children:s.task.starters.map(h=>(0,e.jsx)("a",{className:"k-btn k-btn-outline k-idea",href:h.href,children:h.label},h.href))}),(0,e.jsx)(U,{children:(0,e.jsx)(N,{sm:!0,href:"/tasks/new",variant:j?"primary":"outline",...j?{className:"k-docked"}:{},label:"Write a task"})})]}):(0,e.jsx)(p,{children:"Add a project first."})]})]}),k!==null&&(0,e.jsx)(ue,{children:k})]})}var w=xe(Ce(),1),a=xe(Se(),1);function Ke({text:s}){let i=/\[([^\]\n]+)\]\((https?:\/\/[^\s)]+)\)|`([^`\n]+)`|\*\*([^*\n]+)\*\*|(https?:\/\/[^\s<>]+)/g,t=[],n=0,l=0;for(let r of s.matchAll(i)){if(r.index>n&&t.push(s.slice(n,r.index)),r[3]!==void 0)t.push((0,a.jsx)("code",{children:r[3]},l++));else if(r[4]!==void 0)t.push((0,a.jsx)("strong",{children:r[4]},l++));else{let b=r[2]??r[5],v=b.replace(/[.,;!?]+$/,"");t.push((0,a.jsx)("a",{href:v,target:"_blank",rel:"noopener noreferrer",children:r[1]??v},l++)),b.length>v.length&&t.push(b.slice(v.length))}n=r.index+r[0].length}return n<s.length&&t.push(s.slice(n)),(0,a.jsx)(a.Fragment,{children:t})}function _e(s){return/already has an active writer/i.test(s)?"This conversation is open in another Codex app. Close it there, then resume here.":s}var Fe=new Set(["starting","working","needs-input","stopping"]);function hi({view:s}){let i=(0,w.useContext)(ie),[t,n]=(0,w.useState)(s.selected),[l,r]=(0,w.useState)(s.error??""),[b,v]=(0,w.useState)(""),[c,j]=(0,w.useState)(""),[d,k]=(0,w.useState)(""),[h,g]=(0,w.useState)({}),[S,C]=(0,w.useState)(!1),[F,T]=(0,w.useState)(null),[K,D]=(0,w.useState)(!1),_=(0,w.useRef)(null);(0,w.useEffect)(()=>{n(s.selected),r(s.error??""),T(null)},[s]),(0,w.useEffect)(()=>{if(t===null)return;let o=!1,R,m=async()=>{if(!o)try{let P=await fetch(`/code/${encodeURIComponent(t.id)}/state?revision=${encodeURIComponent(String(t.revision))}`,{headers:{accept:"application/json"},credentials:"same-origin",cache:"no-store"});if(P.ok){let q=await P.json();if(q.unchanged!==!0&&q.session){let H=q.session,oe=q.requests??[],ke={starting:"Starting Codex",ready:"Ready",working:"Working","needs-input":oe.some(O=>O.kind!=="questions")?"Permission needed":"Needs your answer",stopping:"Stopping",interrupted:"Stopped",failed:"Stopped with an error",uncertain:"Delivery not confirmed",closed:"Session closed"};n(O=>O===null?null:{...O,status:H.status,statusLabel:ke[H.status]??"Status unavailable",nativeThreadId:H.nativeThreadId??O.nativeThreadId,turnId:H.turnId??null,deliveryReviewRequired:!!H.deliveryReviewRequired,revision:q.revision??O.revision,items:q.items??O.items,requests:oe}),H.error&&r(H.error)}v("")}}catch{o||v("Connection lost. Reconnecting…")}finally{o||(R=setTimeout(m,Fe.has(t.status)?1e3:5e3))}};return R=setTimeout(m,Fe.has(t.status)?1e3:5e3),()=>{o=!0,clearTimeout(R)}},[t?.id,t?.revision,t?.status]);let M=async()=>{if(!(t===null||K)){D(!0);try{let o=await fetch(`/code/${encodeURIComponent(t.id)}/changes`,{method:"POST",headers:ae({accept:"application/json"}),body:new URLSearchParams({csrf:i}),credentials:"same-origin",cache:"no-store"});if(!o.ok)throw new Error("Could not load changes. Try Refresh changes.");let R=await o.json();T({loaded:!0,status:R.status??"",diff:R.diff??"",truncated:!!R.truncated,error:""})}catch(o){T({loaded:!0,status:"",diff:"",truncated:!1,error:o instanceof Error?o.message:"Could not load changes."})}finally{D(!1)}}},u=t?.repo??s.project,B=`/code${u?`?project=${encodeURIComponent(u)}`:""}`,y=_e(l),$=t!==null&&(!t.nativeThreadId||!["ready","working","failed","interrupted"].includes(t.status)),Z=t?.items.filter(o=>o.type!=="reasoning")??[],ne=o=>({commandExecution:"Command",fileChange:"File changes",mcpToolCall:"Tool",reasoning:"Reasoning",plan:"Plan",error:"Error"})[o]??"Activity";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"problem",role:"status","data-deprecated":"session",children:s.deprecatedNotice}),(0,a.jsxs)("section",{className:"coding-workspace","data-coding-session":t?.id??"","data-coding-owner":s.owner,"data-coding-project":u??s.projects[0]?.path??"","data-coding-status":t?.status??"","data-coding-native-thread":String(!!t?.nativeThreadId),"data-coding-revision":t?.revision??-1,children:[(0,a.jsxs)("aside",{className:"coding-sidebar",children:[(0,a.jsxs)("div",{className:"coding-sidebar-top",children:[(0,a.jsx)("h2",{children:"Sessions"}),t!==null&&(0,a.jsx)("a",{className:"coding-link-button",href:B,children:"New session"})]}),(0,a.jsx)("nav",{className:"coding-session-list","aria-label":"Coding sessions",children:(0,a.jsx)("ul",{children:s.sessions.length===0?(0,a.jsx)("li",{className:"coding-meta",children:"No sessions yet."}):s.sessions.map(o=>(0,a.jsx)("li",{children:(0,a.jsxs)("a",{href:`/code/${encodeURIComponent(o.id)}`,"aria-current":t?.id===o.id?"page":void 0,children:[(0,a.jsx)("span",{children:o.title}),(0,a.jsxs)("small",{children:[o.projectName," · ",(0,a.jsx)("span",{"data-coding-status-for":o.id,children:t?.id===o.id?t.statusLabel:o.statusLabel})]})]})},o.id))})}),(0,a.jsxs)("details",{className:"coding-mobile-sessions",children:[(0,a.jsxs)("summary",{children:["Sessions",s.sessions.length>0?` (${s.sessions.length})`:""]}),(0,a.jsx)("nav",{"aria-label":"Coding sessions",children:(0,a.jsx)("ul",{children:s.sessions.length===0?(0,a.jsx)("li",{className:"coding-meta",children:"No sessions yet."}):s.sessions.map(o=>(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:`/code/${encodeURIComponent(o.id)}`,children:o.title})},o.id))})})]})]}),(0,a.jsxs)("div",{className:"coding-main",children:[l!==""&&(0,a.jsxs)("div",{id:"coding-error",className:"coding-notice",role:"alert",children:[y,y!==l&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:"Technical details"}),(0,a.jsx)("pre",{children:l})]})]}),b!==""&&(0,a.jsx)("p",{id:"coding-connection",className:"coding-meta",role:"status",children:b}),t===null?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("header",{className:"coding-header",children:(0,a.jsx)("h1",{children:"Build with Codex"})}),!s.available&&(0,a.jsx)("p",{className:"coding-notice",children:"Codex is unavailable on this installation. Install and sign in to Codex on the host to start coding."}),s.projects.length===0?(0,a.jsxs)("div",{className:"coding-empty",children:[(0,a.jsx)("p",{children:"Add a project to start coding."}),(0,a.jsx)("a",{className:"coding-link-button",href:"/projects",children:"Open projects"})]}):(0,a.jsxs)(x,{action:"/code/start",className:"coding-start","data-coding-form":"start",onSubmit:()=>C(!0),children:[(0,a.jsx)("input",{type:"hidden",name:"requestId",value:s.requestId}),(0,a.jsxs)("label",{children:["Project",(0,a.jsx)("select",{name:"repo",required:!0,defaultValue:u??s.projects[0]?.path,children:s.projects.map(o=>(0,a.jsx)("option",{value:o.path,children:o.name},o.path))})]}),(0,a.jsxs)("label",{children:["What would you like to change?",(0,a.jsx)("textarea",{name:"prompt",rows:5,required:!0,maxLength:24e3,placeholder:"Describe the result you want…",value:c,onChange:o=>j(o.target.value)})]}),(0,a.jsxs)("details",{className:"coding-options",children:[(0,a.jsx)("summary",{children:"Session options"}),(0,a.jsxs)("label",{children:["Title ",(0,a.jsx)("span",{className:"coding-meta",children:"Optional"}),(0,a.jsx)("input",{name:"title",maxLength:160,autoComplete:"off"})]}),(0,a.jsxs)("label",{children:["Model ",(0,a.jsx)("span",{className:"coding-meta",children:"Optional; uses the installed default"}),(0,a.jsx)("input",{name:"model",maxLength:120,placeholder:"Installed default",autoComplete:"off"})]})]}),(0,a.jsx)("p",{className:"coding-terms",children:"Codex uses this installation’s login and edits a separate copy of this project. It can run commands and read files outside the project. Connected tools (MCP servers) keep their own access to this computer and connected services. Additional command and file access requires your approval."}),(0,a.jsx)(X,{proof:"approval",value:d,onChange:k,label:"Password to start"}),(0,a.jsx)("button",{type:"submit",disabled:!s.available||S,children:"Start coding"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("header",{className:"coding-header",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{children:t.title}),(0,a.jsxs)("p",{className:"coding-meta",children:[t.projectName," · Codex",t.model?` · ${t.model}`:""]})]}),(0,a.jsxs)("details",{className:"coding-session-detail",children:[(0,a.jsx)("summary",{"aria-label":"Session details",children:"Details"}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{children:"Branch"}),(0,a.jsx)("dd",{children:t.branch}),(0,a.jsx)("dt",{children:"Worktree"}),(0,a.jsx)("dd",{children:t.worktree}),(0,a.jsx)("dt",{children:"Native session"}),(0,a.jsx)("dd",{children:t.nativeThreadId??"Not established"}),t.initialPrompt!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{children:"Initial request"}),(0,a.jsx)("dd",{className:"coding-text",children:t.initialPrompt})]})]})]})]}),(0,a.jsxs)("div",{className:"coding-state-row",children:[(0,a.jsx)("p",{id:"coding-state",role:"status",children:t.statusLabel}),(0,a.jsx)("div",{id:"coding-controls",children:Fe.has(t.status)&&t.turnId!==null?(0,a.jsx)(x,{action:`/code/${encodeURIComponent(t.id)}/stop`,"data-coding-form":"stop",children:(0,a.jsx)("button",{className:"coding-secondary",disabled:t.status==="stopping",children:"Stop"})}):t.status==="uncertain"?(0,a.jsx)(x,{action:`/code/${encodeURIComponent(t.id)}/${t.deliveryReviewRequired?"continue":"recover"}`,"data-coding-form":"recover",children:(0,a.jsx)("button",{children:t.deliveryReviewRequired?t.nativeThreadId?"Continue with saved work":"Keep work and close session":"Check saved session"})}):t.nativeThreadId!==null&&(t.status==="failed"||t.status==="interrupted")&&(0,a.jsx)(x,{action:`/code/${encodeURIComponent(t.id)}/resume`,"data-coding-form":"resume",children:(0,a.jsx)("button",{children:"Resume session"})})})]}),(0,a.jsx)("div",{id:"coding-requests",children:t.requests.map(o=>{let R=o.kind==="questions";return(0,a.jsxs)("section",{className:"coding-request","data-coding-request":o.id,children:[(0,a.jsx)("h3",{children:o.title||(R?"Your answer":"Allow extra access?")}),(0,a.jsxs)(x,{action:`/code/${encodeURIComponent(t.id)}/answer`,"data-coding-form":"answer",children:[(0,a.jsx)("input",{type:"hidden",name:"requestId",value:o.id}),R?o.questions.map((m,P)=>(0,a.jsxs)("label",{children:[m.question,(0,a.jsx)("input",{type:"text",name:`question:${m.id}`,list:m.options.length>0?`coding-options-${o.id}-${P}`:void 0,required:!0,autoComplete:"off"}),m.options.length>0&&(0,a.jsx)("datalist",{id:`coding-options-${o.id}-${P}`,children:m.options.map((q,H)=>(0,a.jsx)("option",{value:q.label,children:q.description},H))})]},m.id)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("pre",{className:"coding-permission-detail",children:o.detail}),(0,a.jsx)(X,{proof:"monitoring",value:h[o.id]??"",onChange:m=>g(P=>({...P,[o.id]:m})),label:"Password to approve this request"})]}),(0,a.jsxs)("div",{className:"coding-actions",children:[(0,a.jsx)("button",{type:"submit",name:"decision",value:"accept",children:R?"Send answer":"Approve access"}),(0,a.jsx)("button",{type:"submit",name:"decision",value:"decline",formNoValidate:!0,className:"coding-secondary",children:R?"Cancel question":"Decline"})]})]})]},o.id)})}),(0,a.jsx)("div",{ref:_,id:"coding-conversation",className:"coding-conversation",tabIndex:0,"aria-label":"Conversation",hidden:t.status==="closed"&&Z.length===0,children:Z.length===0?(0,a.jsx)("p",{className:"coding-meta coding-no-messages",children:"No messages yet."}):Z.map(o=>{let R=o.type==="user"||o.type==="userMessage"?"You":o.type==="agent"||o.type==="assistant"||o.type==="agentMessage"?"Codex":null;return R!==null?(0,a.jsxs)("article",{className:`coding-message${R==="You"?" coding-user":""}`,"data-coding-item":o.id,children:[(0,a.jsx)("strong",{children:R}),(0,a.jsx)("div",{className:"coding-text",children:(0,a.jsx)(Ke,{text:o.text})})]},o.id):(0,a.jsxs)("details",{className:"coding-tool","data-coding-item":o.id,children:[(0,a.jsxs)("summary",{children:[ne(o.type),o.status?(0,a.jsxs)("span",{className:"coding-meta",children:[" · ",o.status]}):null]}),(0,a.jsx)("pre",{children:o.text})]},o.id)})}),(0,a.jsxs)(x,{action:`/code/${encodeURIComponent(t.id)}/send`,"data-coding-form":"send",className:"coding-composer",hidden:t.status==="closed",children:[(0,a.jsx)("input",{type:"hidden",name:"requestId",value:s.requestId}),(0,a.jsx)("label",{htmlFor:"coding-prompt",children:"Message Codex"}),(0,a.jsx)("textarea",{id:"coding-prompt",name:"prompt",rows:2,maxLength:24e3,required:!0,placeholder:"Describe a change or ask about the result…",value:c,onChange:o=>j(o.target.value)}),(0,a.jsx)("div",{className:"coding-actions",children:(0,a.jsx)("button",{type:"submit",disabled:$,children:t.status==="working"?"Send update":"Send message"})})]}),(0,a.jsxs)("details",{id:"coding-changes",className:"coding-changes",onToggle:o=>{o.currentTarget.open&&F===null&&M()},children:[(0,a.jsx)("summary",{children:"Changes"}),(0,a.jsx)("div",{id:"coding-change-content",children:F===null?(0,a.jsx)("p",{className:"coding-meta",children:"Open to load the current changes."}):F.error!==""?(0,a.jsx)("p",{className:"coding-meta",children:F.error}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"coding-meta",children:F.diff?"Changes since this session started.":F.status?"Changed files are listed below.":"No file changes."}),F.status!==""&&(0,a.jsx)("ul",{children:F.status.split(`
5
+ `).filter(o=>o.trim()).map((o,R)=>{let m=o.slice(0,2),P=m.includes("?")||m.includes("A")?"Added":m.includes("D")?"Removed":m.includes("R")?"Renamed":"Modified";return(0,a.jsxs)("li",{children:[P,": ",o.slice(3)]},R)})}),F.diff!==""&&(0,a.jsx)("pre",{tabIndex:0,"aria-label":"Current diff",children:F.diff}),F.truncated&&(0,a.jsx)("p",{children:"This diff is shortened. Inspect the complete changes in the worktree before shipping."})]})}),(0,a.jsx)("button",{type:"button",id:"coding-refresh-changes",className:"coding-secondary",disabled:K,onClick:()=>{M()},children:"Refresh changes"}),(0,a.jsx)("p",{id:"coding-shipping",hidden:t.status==="closed"||t.status==="uncertain",children:(0,a.jsx)(x,{action:`/code/${encodeURIComponent(t.id)}/ship/preview`,children:(0,a.jsx)("button",{type:"submit",className:"coding-link-button",children:"Review for shipping"})})})]})]})]})]})]})}function pi({view:s}){if(s.mode==="confirm")return(0,a.jsxs)("section",{className:"coding-workspace coding-handoff",children:[(0,a.jsx)("h1",{children:"Review for shipping"}),(0,a.jsx)("p",{children:s.title}),(0,a.jsx)(x,{action:`/code/${encodeURIComponent(s.sessionId)}/ship/preview`,children:(0,a.jsx)("button",{type:"submit",children:"Review the committed change"})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:`/code/${encodeURIComponent(s.sessionId)}`,children:"Back to coding"})})]});let i=s.error?.startsWith("Review screenshots are not ready.")===!0;return(0,a.jsxs)("section",{className:"coding-workspace coding-handoff","data-coding-session":"",children:[(0,a.jsx)("h1",{children:"Review for shipping"}),(0,a.jsx)("p",{children:s.title}),s.error!==null&&(i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"coding-notice",role:"alert",children:"Screenshots needed. Ask Codex to capture and commit them, then try again."}),(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:"Technical details"}),(0,a.jsx)("p",{children:s.error})]})]}):(0,a.jsx)("p",{className:"coding-notice",role:"alert",children:s.error})),(0,a.jsxs)(x,{action:`/code/${encodeURIComponent(s.sessionId)}/ship`,className:"coding-start",children:[(0,a.jsx)("input",{type:"hidden",name:"base",value:s.base}),(0,a.jsx)("input",{type:"hidden",name:"candidate",value:s.candidate}),(0,a.jsx)("input",{type:"hidden",name:"title",value:s.title}),(0,a.jsxs)("label",{children:["Outcome",(0,a.jsx)("textarea",{name:"goal",rows:4,required:!0,maxLength:16e3,defaultValue:s.goal})]}),(0,a.jsxs)("label",{children:["Checks for review",(0,a.jsx)("textarea",{name:"acceptance",rows:4,required:!0,maxLength:16e3,placeholder:"One observable result per line",defaultValue:s.acceptance})]}),(0,a.jsxs)("label",{className:"coding-check",children:[(0,a.jsx)("input",{type:"checkbox",name:"visual",value:"yes",defaultChecked:s.visual}),"Include desktop and phone screenshots"]}),(0,a.jsxs)("details",{children:[(0,a.jsxs)("summary",{children:[s.changedPaths.length," ",s.changedPaths.length===1?"changed file":"changed files"," · commit ",s.candidate.slice(0,8)]}),(0,a.jsx)("ul",{children:s.changedPaths.map(t=>(0,a.jsx)("li",{children:(0,a.jsx)("code",{children:t})},t))}),(0,a.jsxs)("p",{className:"coding-meta",children:["Review covers the complete change from ",s.base," to ",s.candidate,"."]})]}),(0,a.jsx)("p",{className:"coding-terms",children:"Verification and publication use this project’s existing approval process."}),(0,a.jsx)("button",{type:"submit",children:"Create review task"})]}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:`/code/${encodeURIComponent(s.sessionId)}`,children:"Back to coding"})})]})}function mi({view:s}){return(0,a.jsxs)("div",{"data-kit-page":"",children:[(0,a.jsx)("h1",{children:s.heading}),(0,a.jsx)("p",{children:s.message}),(0,a.jsx)("a",{className:"k-link",href:s.backHref,children:s.backLabel})]})}function De(s,i){return s!==void 0&&s.length>0?s:[...new Set(i.map(t=>t.provider))].map(t=>({id:t,label:t.charAt(0).toUpperCase()+t.slice(1),ready:!0,mark:null,reason:null,fix:null}))}function Je({fix:s}){let i=[s.indexOf(", "),s.indexOf(" (")].filter(l=>l>0),t=i.length===0?-1:Math.min(...i),n=t===-1?s:s.slice(0,t);return(0,a.jsxs)("span",{className:"block",children:["Run ",(0,a.jsx)("code",{className:"k-mono wrap-anywhere",children:n}),t===-1?"":`${s.slice(t)}.`]})}function ze(s){return s==="xhigh"?"Extra high":s.charAt(0).toUpperCase()+s.slice(1)}function be(s,i){return s.find(t=>t.id===i)?.label??i}function Oe({agents:s,models:i,provider:t,modelId:n,effort:l,disabled:r,onSelect:b}){let v=i.filter(g=>g.provider===t),c=s.find(g=>g.id===t),j=c!==void 0&&!c.ready,d=c!==void 0&&c.reason!==null?c:null,k=v.find(g=>g.id===n)??v[0]??null,h=k?.efforts??[];return(0,a.jsxs)("div",{className:"k-form max-w-2xl","data-direct-chat-harness-picker":"",children:[(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"dc-agent-select",children:"Agent"}),(0,a.jsx)("span",{className:"k-selw wide",children:(0,a.jsx)("select",{id:"dc-agent-select",className:"k-sel","data-direct-chat-agents":"",value:t,disabled:r,"aria-describedby":d!==null?"dc-agent-fix":void 0,onChange:g=>{let S=g.target.value,C=i.find(F=>F.provider===S);b({provider:S,modelId:C?.id??"",effort:C?.defaultEffort??"high"})},children:s.map(g=>(0,a.jsx)("option",{value:g.id,"data-direct-chat-agent":g.id,"data-direct-chat-agent-ready":g.ready?"yes":"no",children:g.mark===null?g.label:`${g.label} (${g.mark})`},g.id))})}),d!==null&&(0,a.jsxs)("p",{className:"k-note",id:"dc-agent-fix","data-direct-chat-provider-fix":"",children:[d.reason,d.fix!==null&&(0,a.jsx)(Je,{fix:d.fix})]})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"dc-model-select",children:"Model"}),(0,a.jsx)("span",{className:"k-selw wide",children:(0,a.jsx)("select",{id:"dc-model-select",className:"k-sel","data-direct-chat-model-select":"",value:k?.id??n,disabled:r||j,onChange:g=>{let S=g.target.value,C=v.find(F=>F.id===S);b({provider:t,modelId:S,effort:C?.defaultEffort??l})},children:v.length>0?v.map(g=>(0,a.jsx)("option",{value:g.id,children:g.label},g.id)):(0,a.jsx)("option",{value:n||"default",children:n||"Default"})})})]}),h.length>0&&(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"dc-effort-select",children:"Effort"}),(0,a.jsx)("span",{className:"k-selw wide",children:(0,a.jsx)("select",{id:"dc-effort-select",className:"k-sel","data-direct-chat-effort-select":"",value:h.includes(l)?l:k?.defaultEffort??h[0]??"",disabled:r||j,onChange:g=>b({provider:t,modelId:k?.id??n,effort:g.target.value}),children:h.map(g=>(0,a.jsx)("option",{value:g,children:ze(g)},g))})})]})]})]})}function ui({view:s}){let i=(0,w.useContext)(ie),[t,n]=(0,w.useState)(s.models??[]),[l,r]=(0,w.useState)(s.agents),b=De(l,t),v=s.projects??[],c=(b.find(m=>m.ready)??b[0])?.id??"claude",[j,d]=(0,w.useState)(c),[k,h]=(0,w.useState)(()=>t.find(m=>m.provider===c)?.id??""),[g,S]=(0,w.useState)(()=>t.find(m=>m.provider===c)?.defaultEffort??"high"),[C,F]=(0,w.useState)(()=>v[0]?.path??""),[T,K]=(0,w.useState)(""),[D,_]=(0,w.useState)(!1),[M,u]=(0,w.useState)(null),[B,y]=(0,w.useState)(null),[$,Z]=(0,w.useState)(0);(0,w.useEffect)(()=>{let m=new AbortController,P=new URLSearchParams({project:C});return y(null),Promise.all([fetch(`/engine/direct-chats?${P}`,{signal:m.signal}),fetch(`/engine/agents?${P}`,{signal:m.signal})]).then(async([q,H])=>{if(!q.ok||!H.ok)throw new Error("Couldn't load this project's agents.");let oe=await q.json(),ke=await H.json();m.signal.aborted||(n(oe.models),r(ke.agents.flatMap(O=>O.chat?.supported?[{id:O.id,label:s.agents?.find(he=>he.id===O.id)?.label??O.name,...O.chat}]:[])),h(O=>oe.models.some(he=>he.provider===j&&he.id===O)?O:oe.models.find(he=>he.provider===j)?.id??""),y(C),u(null))}).catch(q=>{m.signal.aborted||u(q instanceof Error?q.message:"Couldn't load this project's agents.")}),()=>m.abort()},[C,j,$]);let ne=b.find(m=>m.id===j)?.ready===!1||B!==C,o=B!==C&&M!==null;async function R(m){if(m.preventDefault(),o){u(null),Z(P=>P+1);return}if(!(!T.trim()||!C||D||ne)){_(!0),u(null);try{let P=new URLSearchParams({csrf:i,project:C,provider:j,model:k,effort:g,prompt:T.trim(),request:s.requestId??""}),q=await fetch("/engine/direct-chats",{method:"POST",headers:ae({"content-type":"application/x-www-form-urlencoded",accept:"application/json"}),body:P.toString()}),H=await q.json().catch(()=>({}));if(q.ok&&H.ok&&H.threadId){window.location.href=`/direct-chats/${encodeURIComponent(H.threadId)}`;return}u(H.error??"Could not start Direct Chat.")}catch{u("Could not reach the Toolroll console.")}finally{_(!1)}}}return(0,a.jsxs)("div",{"data-kit-page":"",children:[(0,a.jsx)("h1",{children:"Direct Chats"}),s.problem!==null?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A,{children:s.problem}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{className:"k-link",href:"/direct-chats",children:"All Direct Chats"})})]}):(0,a.jsxs)(a.Fragment,{children:[v.length>0&&(0,a.jsxs)("form",{className:"card k-form max-w-2xl",onSubmit:m=>{R(m)},"data-direct-chat-new-composer":"",children:[(0,a.jsx)(Oe,{agents:b,models:t,provider:j,modelId:k,effort:g,disabled:D,onSelect:m=>{d(m.provider),h(m.modelId),S(m.effort)}}),(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"dc-new-project",children:"Project"}),(0,a.jsx)("span",{className:"k-selw wide",children:(0,a.jsx)("select",{id:"dc-new-project",className:"k-sel",value:C,onChange:m=>F(m.target.value),disabled:D,children:v.map(m=>(0,a.jsx)("option",{value:m.path,children:m.name},m.path))})})]}),(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"dc-new-prompt",children:"Message"}),(0,a.jsx)(re,{id:"dc-new-prompt",rows:3,value:T,onChange:m=>K(m.target.value),required:!0,maxLength:2e4,disabled:D,placeholder:"Ask about the project or describe a change…"})]}),M!==null&&(0,a.jsx)(A,{children:M}),(0,a.jsx)(U,{children:(0,a.jsx)(f,{variant:"primary",type:"submit",formNoValidate:o,label:o?"Retry agents":D?"Starting…":`Start with ${be(b,j)}`,disabled:D||!o&&ne})})]}),s.threads.length===0?(0,a.jsx)("p",{children:"No Direct Chats yet. Ask the lead in Chat to start one in a project."}):(0,a.jsx)("ul",{className:"k-list","data-direct-chats":"",children:s.threads.map(m=>(0,a.jsxs)("li",{className:"k-row","data-direct-chat":m.id,children:[(0,a.jsx)("a",{className:"k-link",href:`/direct-chats/${encodeURIComponent(m.id)}`,children:(0,a.jsx)("b",{children:m.title||"Direct Chat"})})," ",(0,a.jsxs)("span",{className:"k-note",children:[m.project," · ",m.providerLabel??be(b,m.provider),m.running?" · Working":m.statusLabel!==null?` · ${m.statusLabel}`:"",m.changedFilesCount>0?` · ${m.changedFilesCount} ${m.changedFilesCount===1?"file":"files"} changed`:""]})]},m.id))})]})]})}function xi({view:s}){let i=(0,w.useContext)(ie),t=s.models??[],n=De(s.agents,t),l=s.pickerProvider??s.provider??"claude",r=s.queuedSwitch??null,[b,v]=(0,w.useState)(r?.pickerProvider??r?.provider??l),[c,j]=(0,w.useState)(r?.modelId??s.modelId),[d,k]=(0,w.useState)(r?.effort??s.effort??"high"),[h,g]=(0,w.useState)(r),[S,C]=(0,w.useState)(null),[F,T]=(0,w.useState)(null),[K,D]=(0,w.useState)(!1),_=n.find(u=>u.id===b)?.ready===!1;async function M(u){if(v(u.provider),j(u.modelId),k(u.effort),n.find(B=>B.id===u.provider)?.ready===!1){T(null),C(null);return}D(!0),T(null),C(null);try{let B=new URLSearchParams({csrf:i,provider:u.provider,model:u.modelId,effort:u.effort}),y=await fetch(`/engine/direct-chats/${encodeURIComponent(s.id)}/model`,{method:"POST",headers:ae({"content-type":"application/x-www-form-urlencoded",accept:"application/json"}),body:B.toString()}),$=await y.json().catch(()=>({}));if(!y.ok||!$.ok){T($.error??"Could not switch harness.");return}$.queued&&$.queuedSwitch?g({provider:$.queuedSwitch.provider,providerLabel:$.queuedSwitch.providerLabel??be(n,$.queuedSwitch.provider),modelId:$.queuedSwitch.modelId,effort:$.queuedSwitch.effort}):(g(null),C($.said??"Model updated."))}catch{T("Could not reach the Toolroll console.")}finally{D(!1)}}return(0,a.jsxs)("div",{"data-kit-page":"",children:[(0,a.jsx)("h1",{children:s.title||"Direct Chat"}),(0,a.jsxs)("p",{className:"k-note",children:[s.project," · ",s.providerLabel,s.modelId?` · ${s.modelId}`:"",s.running?" · Working":""]}),s.turns.map(u=>(0,a.jsxs)("div",{children:[u.switchedFromProvider!==null&&u.switchedFromProvider!==void 0&&(0,a.jsxs)("p",{className:"k-note",role:"separator","data-direct-chat-switch-divider":"",children:["Switched from ",u.switchedFromLabel??be(n,u.switchedFromProvider)," → ",u.providerLabel??s.providerLabel]}),(0,a.jsxs)("section",{className:"card","data-turn":u.id,children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("b",{children:"You"})," · ",(0,a.jsx)("span",{className:"k-note",children:u.statusLabel})]}),(0,a.jsx)("p",{className:"pre-wrap",children:u.userPrompt}),u.assistantText.trim()!==""&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:(0,a.jsx)("b",{children:u.providerLabel??s.providerLabel})}),(0,a.jsx)("p",{className:"pre-wrap",children:u.assistantText})]}),u.errorText!==null&&(0,a.jsx)(A,{children:u.errorText})]})]},u.id)),s.isLegacy?(0,a.jsx)("p",{className:"k-note","data-direct-chat-read-only":"",children:"Imported from an earlier version: read only. Start a new Direct Chat to go on."}):(0,a.jsxs)("section",{className:"card k-form","data-direct-chat-composer":"",children:[(0,a.jsx)(Oe,{agents:n,models:t,provider:b,modelId:c,effort:d,disabled:K,onSelect:u=>{M(u)}}),h!==null&&(0,a.jsxs)("p",{className:"k-note","data-direct-chat-queued-switch":"",children:["Switching to ",h.providerLabel," after this turn…"]}),S!==null&&h===null&&(0,a.jsx)("p",{className:"k-note",children:S}),F!==null&&(0,a.jsx)(A,{children:F}),s.running?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{children:"It's working on your last message. You can pick the next harness above while it finishes."}),s.queuedFollowUp!==null&&s.queuedFollowUp!==void 0&&(0,a.jsx)(Ue,{queued:s.queuedFollowUp})]}):(0,a.jsxs)(x,{action:`/direct-chats/${encodeURIComponent(s.id)}/reply`,className:"k-form",onSubmit:u=>{(_||K||F!==null)&&u.preventDefault()},children:[s.queuedFollowUp!==null&&s.queuedFollowUp!==void 0&&(0,a.jsx)(Ue,{queued:s.queuedFollowUp}),(0,a.jsx)("input",{type:"hidden",name:"request",value:s.requestId}),(0,a.jsxs)("div",{className:"k-field",children:[(0,a.jsx)("label",{className:"k-label",htmlFor:"direct-chat-reply",children:"Reply"}),(0,a.jsx)(re,{id:"direct-chat-reply",name:"prompt",rows:3,required:!0,maxLength:2e4})]}),(0,a.jsx)(U,{children:(0,a.jsx)(f,{variant:"primary",type:"submit",label:"Send",disabled:_||K||F!==null})})]})]}),(0,a.jsx)("h2",{children:"Changes"}),s.diff.unread&&(0,a.jsxs)("p",{className:"k-note","data-direct-chat-diff-unread":"",children:["Toolroll couldn't read its copy of the project after its last turn",s.diff.changedFiles.length===0?"":", so these are the changes it saw before","."]}),s.diff.changedFiles.length===0?!s.diff.unread&&(0,a.jsx)(p,{children:"No changes in its copy of the project."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(p,{children:[s.diff.changedFiles.length," ",s.diff.changedFiles.length===1?"file":"files"," changed in its own copy of the project, as of its last turn",s.running?" (it's still working)":"","."]}),(0,a.jsx)("ul",{children:s.diff.changedFiles.map(u=>(0,a.jsx)("li",{className:"k-mono",children:u},u))}),s.diff.diffText!==""&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:"The changes"}),(0,a.jsxs)("pre",{className:"k-mono","data-direct-chat-diff":"",children:[s.diff.diffText,s.diff.truncated?`
6
+ … (shortened)`:""]})]})]}),(0,a.jsx)("h2",{children:"Ship"}),s.reviewAgain&&(0,a.jsx)("p",{className:"k-note","data-direct-chat-review-again":"",children:"That Ship review isn't kept after you leave it. Press Review Ship to see it again."}),s.ships.length>0&&(0,a.jsx)("ul",{children:s.ships.map((u,B)=>(0,a.jsxs)("li",{children:[u.mode==="keep-branch"?"Saved as branch":"Shipped"," ",(0,a.jsx)("span",{className:"k-mono",children:u.branch})," · ",u.state,u.taskId!==null&&(0,a.jsxs)(a.Fragment,{children:[" · ",(0,a.jsx)("a",{className:"k-link",href:`/t/${encodeURIComponent(u.taskId)}`,children:"Open task"})]}),u.mergeCommand!==null?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),"To bring it in: ",(0,a.jsx)("code",{className:"k-mono","data-direct-chat-merge":"",children:u.mergeCommand})]}):u.unsafeFolderNote!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"k-note",children:u.unsafeFolderNote})]})]},B))}),!s.running&&s.diff.changedFiles.length>0?(0,a.jsx)(x,{action:`/direct-chats/${encodeURIComponent(s.id)}/ship-review`,children:(0,a.jsx)(f,{variant:"primary",type:"submit",label:"Review Ship"})}):s.ships.length===0&&(0,a.jsx)(p,{children:s.running?"Ship opens when it finishes.":"Nothing to ship yet."}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{className:"k-link",href:"/direct-chats",children:"All Direct Chats"})})]})}function ji({view:s}){return(0,a.jsxs)("div",{"data-kit-page":"",children:[(0,a.jsxs)("h1",{children:["Ship ",s.title]}),(0,a.jsxs)("ul",{children:[(0,a.jsxs)("li",{children:[s.mode==="keep-branch"?"Save the branch":"Ship from branch"," ",(0,a.jsx)("span",{className:"k-mono",children:s.branch})]}),(0,a.jsxs)("li",{children:[s.changedFiles.length," ",s.changedFiles.length===1?"file":"files",": ",s.changedFiles.slice(0,20).join(", "),s.changedFiles.length>20?"…":""]}),(0,a.jsx)("li",{children:s.checkCommand===null?"No check command":(0,a.jsxs)(a.Fragment,{children:["Check: ",(0,a.jsx)("span",{className:"k-mono",children:s.checkCommand})]})}),(0,a.jsx)("li",{children:s.mergeSummary}),s.autoMergeReason!==null&&(0,a.jsx)("li",{children:s.autoMergeReason})]}),(0,a.jsxs)(x,{action:`/direct-chats/${encodeURIComponent(s.threadId)}/ship`,children:[(0,a.jsx)("input",{type:"hidden",name:"mode",value:s.mode}),(0,a.jsx)("input",{type:"hidden",name:"termsDigest",value:s.termsDigest}),(0,a.jsx)("input",{type:"hidden",name:"title",value:s.title}),(0,a.jsx)("input",{type:"hidden",name:"goal",value:s.goal}),!s.localOwner&&(0,a.jsx)(me,{kind:"step-up",field:"password",children:(0,a.jsxs)("label",{children:["Password",(0,a.jsx)("input",{type:"password",name:"password",autoComplete:"current-password",required:!0})]})}),(0,a.jsxs)(U,{children:[(0,a.jsx)(f,{variant:"primary",type:"submit",label:s.mode==="keep-branch"?"Save the branch":"Ship it"}),(0,a.jsx)(N,{variant:"ghost",href:`/direct-chats/${encodeURIComponent(s.threadId)}`,label:"Cancel"})]})]})]})}function Ue({queued:s}){let i=s.held!==null&&s.held!==void 0&&s.held!=="";return(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-1","data-direct-chat-queued-followup":"","data-held":i?"":void 0,children:[(0,a.jsx)("p",{className:"k-note",children:i?s.held:"Sends when the agent finishes:"}),(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words border-l-2 border-border pl-3 text-muted-foreground",children:s.prompt})]})}export{di as ActionReviewView,_n as ArchiveTasksView,ri as ChatFallbackView,Yn as CodeMapView,mi as CodeNoticeView,pi as CodeShippingView,hi as CodeThreadView,Xn as DecisionView,li as DemoChatView,xi as DirectChatDetailView,ji as DirectChatShipView,ui as DirectChatsListView,ei as EvidenceView,zn as FastStartView,Kn as FlakyTestsView,Qn as ImportTaskView,Un as LedgerView,Hn as MenuView,Jn as NewTaskView,Dn as NotFoundView,Vn as NoticePageView,En as ProjectBrowseView,Ln as ProjectDetailView,Mn as ProjectGithubView,Gn as ProjectOutsideAddView,Bn as ProjectPickView,ti as QueueOrderView,On as RefusalView,si as ReleaseSheetView,Zn as RunView,ci as SweepView,ii as TaskHistoryProblemView,ni as TaskLandView,ai as TaskResumeView,oi as WelcomeView};
@@ -0,0 +1,2 @@
1
+ /*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
2
+ import{a as o1,b as r1,c as t1,d as i1,e as m1,f as f1,g as d1,h as n1,i as h1,j as x1}from"./chunk-shared.26bb0114998968cccb7bae5f6ffa8979ddecfafd8bc18bb6985760f6bcc030e6.js";import{p6$a as s,p6$b as $}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import"./chunk-shared.c3e5be1c5f441e94905a4bc2005d816d2a0b0e4108bae43e37ec274a911c6847.js";import"./chunk-shared.fd5f2699d3b0017797e5b5e1e1d92eb98818740ebf20a95364bbb7deea0c8242.js";import{p9$a as e,p9$b as o,p9$c as r,p9$d as t,p9$e as i,p9$f as m,p9$g as f,p9$h as d,p9$i as n}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import"./chunk-shared.6d0b8728b3e309886cfb6eaf596d3f20592939e521bb60bb090824f34da6b086.js";import{p7$a as g,p7$b as l,p7$c as j,p7$d as k,p7$e as u,p7$f as q,p7$g as w,p7$h as y,p7$i as R,p7$j as E}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p8$a as v,p8$b as z,p8$c as A,p8$d as B,p8$e as C,p8$f as D,p8$g as F,p8$h as G,p8$i as I,p8$j as J,p8$k as L,p8$l as M,p8$m as S,p8$n as V,p8$o as K,p8$p as N,p8$q as O,p8$r as P,p8$s as Q,p8$t as T}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import"./chunk-shared.0874336833f8101a63b169d8c2e55ca0f281e43e65d4bd6604555c791ea9dd87.js";import"./chunk-shared.d1f25785c8c168cc75aa99c4be8ca56abfc5eafa3490f8817ff15e61cb901915.js";import{p10$A as Y,p10$B as Z,p10$C as _,p10$D as aa,p10$E as pa,p10$F as sa,p10$G as $a,p10$H as ba,p10$I as ca,p10$J as ea,p10$a as oa,p10$b as ra,p10$c as ta,p10$d as ia,p10$e as ma,p10$f as fa,p10$g as da,p10$h as na,p10$i as ha,p10$j as xa,p10$k as ga,p10$l as la,p10$m as ja,p10$n as ka,p10$o as ua,p10$p as qa,p10$q as wa,p10$r as ya,p10$s as Ra,p10$t as Ea,p10$u as Ha,p10$v as Wa,p10$w as va,p10$x as za,p10$y as Aa,p10$z as Ba}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p11$a as Fa,p11$b as Ga}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p1$$ as La,p1$$a as Ma,p1$$b as Sa,p1$A as Va,p1$Aa as Ka,p1$Ab as Na,p1$B as Oa,p1$Ba as Pa,p1$Bb as Qa,p1$C as Ta,p1$Ca as Ua,p1$Cb as Xa,p1$D as Ya,p1$Da as Za,p1$Db as _a,p1$E as ap,p1$Ea as pp,p1$Eb as sp,p1$F as $p,p1$Fa as bp,p1$Fb as cp,p1$G as ep,p1$Ga as op,p1$Gb as rp,p1$H as tp,p1$Ha as ip,p1$Hb as mp,p1$I as fp,p1$Ia as dp,p1$Ib as np,p1$J as hp,p1$Ja as xp,p1$Jb as gp,p1$K as lp,p1$Ka as jp,p1$Kb as kp,p1$L as up,p1$La as qp,p1$Lb as wp,p1$M as yp,p1$Ma as Rp,p1$Mb as Ep,p1$N as Hp,p1$Na as Wp,p1$Nb as vp,p1$O as zp,p1$Oa as Ap,p1$Ob as Bp,p1$P as Cp,p1$Pa as Dp,p1$Pb as Fp,p1$Q as Gp,p1$Qa as Ip,p1$Qb as Jp,p1$R as Lp,p1$Ra as Mp,p1$Rb as Sp,p1$S as Vp,p1$Sa as Kp,p1$Sb as Np,p1$T as Op,p1$Ta as Pp,p1$Tb as Qp,p1$U as Tp,p1$Ua as Up,p1$Ub as Xp,p1$V as Yp,p1$Va as Zp,p1$Vb as _p,p1$W as as,p1$Wa as ps,p1$Wb as ss,p1$X as $s,p1$Xa as bs,p1$Xb as cs,p1$Y as es,p1$Ya as os,p1$Yb as rs,p1$Z as ts,p1$Za as is,p1$Zb as ms,p1$_ as fs,p1$_a as ds,p1$_b as ns,p1$a as hs,p1$aa as xs,p1$ab as gs,p1$ac as ls,p1$b as js,p1$ba as ks,p1$bb as us,p1$bc as qs,p1$c as ws,p1$ca as ys,p1$cb as Rs,p1$cc as Es,p1$d as Hs,p1$da as Ws,p1$db as vs,p1$dc as zs,p1$e as As,p1$ea as Bs,p1$eb as Cs,p1$ec as Ds,p1$f as Fs,p1$fa as Gs,p1$fb as Is,p1$fc as Js,p1$g as Ls,p1$ga as Ms,p1$gb as Ss,p1$gc as Vs,p1$h as Ks,p1$ha as Ns,p1$hb as Os,p1$hc as Ps,p1$i as Qs,p1$ia as Ts,p1$ib as Us,p1$ic as Xs,p1$j as Ys,p1$ja as Zs,p1$jb as _s,p1$jc as a$,p1$k as p$,p1$ka as s$,p1$kb as $$,p1$kc as b$,p1$l as c$,p1$la as e$,p1$lb as o$,p1$lc as r$,p1$m as t$,p1$ma as i$,p1$mb as m$,p1$mc as f$,p1$n as d$,p1$na as n$,p1$nb as h$,p1$nc as x$,p1$o as g$,p1$oa as l$,p1$ob as j$,p1$p as k$,p1$pa as u$,p1$pb as q$,p1$q as w$,p1$qa as y$,p1$qb as R$,p1$r as E$,p1$ra as H$,p1$rb as W$,p1$s as v$,p1$sa as z$,p1$sb as A$,p1$t as B$,p1$ta as C$,p1$tb as D$,p1$u as F$,p1$ua as G$,p1$ub as I$,p1$v as J$,p1$va as L$,p1$vb as M$,p1$w as S$,p1$wa as V$,p1$wb as K$,p1$x as N$,p1$xa as O$,p1$xb as P$,p1$y as Q$,p1$ya as T$,p1$yb as U$,p1$z as X$,p1$za as Y$,p1$zb as Z$}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";import{p2$a as p1,p2$b as s1,p2$c as $1,p2$d as b1,p2$e as c1}from"./chunk-core.5490609e81c3a5f78da3e06b9795d71c287016ebc7fd02794b1122b474ebb07f.js";export{t1 as Excerpt,r1 as MismatchHeadline,x1 as ResultView,h1 as SelectedResult,o1 as WorkspaceResult,i1 as durationWords,d1 as efficiencyLine,n1 as efficiencyRecorded,f1 as networkLine,m1 as tokenWords};