@ashlr/hub 3.11.0 → 3.11.2
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.
- package/CHANGELOG.md +96 -0
- package/dist/authority-surface.json +12 -7
- package/dist/build-identity.json +2 -2
- package/dist/core/universe/builtins/preparation/manifest.json +1 -1
- package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +5 -4
- package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +4 -3
- package/dist/core/universe/campaign.js +9 -1
- package/dist/core/universe/campaign.js.map +1 -1
- package/dist/core/universe/runner.d.ts +3 -0
- package/dist/core/universe/runner.js +7 -3
- package/dist/core/universe/runner.js.map +1 -1
- package/dist/core/verse/compaction-point.d.ts +55 -0
- package/dist/core/verse/compaction-point.js +75 -0
- package/dist/core/verse/compaction-point.js.map +1 -0
- package/dist/core/verse/context-math.d.ts +1 -38
- package/dist/core/verse/context-math.js +5 -59
- package/dist/core/verse/context-math.js.map +1 -1
- package/dist/core/web/public/next/assets/{ActionMenu-CQvNJvHY.js → ActionMenu-_DhtX2gO.js} +2 -2
- package/dist/core/web/public/next/assets/{ActionMenu-CQvNJvHY.js.map → ActionMenu-_DhtX2gO.js.map} +1 -1
- package/dist/core/web/public/next/assets/Advanced-CAAfaBke.js +2 -0
- package/dist/core/web/public/next/assets/{Advanced-DEM93sKI.js.map → Advanced-CAAfaBke.js.map} +1 -1
- package/dist/core/web/public/next/assets/App-BAywyjE8.js +7 -0
- package/dist/core/web/public/next/assets/{App-CimXmK0L.js.map → App-BAywyjE8.js.map} +1 -1
- package/dist/core/web/public/next/assets/AppsSection-CUypKeog.js +2 -0
- package/dist/core/web/public/next/assets/{AppsSection-D6U-dSj6.js.map → AppsSection-CUypKeog.js.map} +1 -1
- package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js → AreaTrend-CblDqC8Q.js} +2 -2
- package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js.map → AreaTrend-CblDqC8Q.js.map} +1 -1
- package/dist/core/web/public/next/assets/AutonomySection-D3d8lYO3.js +2 -0
- package/dist/core/web/public/next/assets/{AutonomySection-3V9pUyxm.js.map → AutonomySection-D3d8lYO3.js.map} +1 -1
- package/dist/core/web/public/next/assets/BranchBar-DU0jAV1E.js +2 -0
- package/dist/core/web/public/next/assets/{BranchBar-U8UdpfEB.js.map → BranchBar-DU0jAV1E.js.map} +1 -1
- package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js → BudgetControl-Mm1ZL4u6.js} +2 -2
- package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js.map → BudgetControl-Mm1ZL4u6.js.map} +1 -1
- package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js → BurnDown-C1fgcFqo.js} +2 -2
- package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js.map → BurnDown-C1fgcFqo.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js → Button-DqgLUZvd.js} +2 -2
- package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js.map → Button-DqgLUZvd.js.map} +1 -1
- package/dist/core/web/public/next/assets/CapacityStrip-nWFHvqFB.js +2 -0
- package/dist/core/web/public/next/assets/CapacityStrip-nWFHvqFB.js.map +1 -0
- package/dist/core/web/public/next/assets/ChatSection-DUZNpiVr.js +3 -0
- package/dist/core/web/public/next/assets/ChatSection-DUZNpiVr.js.map +1 -0
- package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js → CloudBudgetForm-2OW38o_C.js} +2 -2
- package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js.map → CloudBudgetForm-2OW38o_C.js.map} +1 -1
- package/dist/core/web/public/next/assets/CommandPalette-C5w2o1-r.js +2 -0
- package/dist/core/web/public/next/assets/{CommandPalette-FiD4N8XD.js.map → CommandPalette-C5w2o1-r.js.map} +1 -1
- package/dist/core/web/public/next/assets/CommandSection-Bx2knNqY.js +2 -0
- package/dist/core/web/public/next/assets/{CommandSection-DN8KwH-X.js.map → CommandSection-Bx2knNqY.js.map} +1 -1
- package/dist/core/web/public/next/assets/ConfirmDialog-B7ZwCQOX.js +2 -0
- package/dist/core/web/public/next/assets/ConfirmDialog-B7ZwCQOX.js.map +1 -0
- package/dist/core/web/public/next/assets/ConfirmDialog-Dx15x0Ho.css +1 -0
- package/dist/core/web/public/next/assets/Dialog-BpgcEW6b.js +2 -0
- package/dist/core/web/public/next/assets/Dialog-BpgcEW6b.js.map +1 -0
- package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
- package/dist/core/web/public/next/assets/{DiffPane-DLJ3gGGK.js → DiffPane-DpqRUtCx.js} +2 -2
- package/dist/core/web/public/next/assets/{DiffPane-DLJ3gGGK.js.map → DiffPane-DpqRUtCx.js.map} +1 -1
- package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js → DiffViewer-CoV5-nUf.js} +2 -2
- package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js.map → DiffViewer-CoV5-nUf.js.map} +1 -1
- package/dist/core/web/public/next/assets/DockHost-C0Pq7Jak.js +2 -0
- package/dist/core/web/public/next/assets/{DockHost-DvR-hPhZ.js.map → DockHost-C0Pq7Jak.js.map} +1 -1
- package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js → EmptyState-DYW29ncw.js} +2 -2
- package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js.map → EmptyState-DYW29ncw.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js → Epistemic-DVx6oHzp.js} +2 -2
- package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js.map → Epistemic-DVx6oHzp.js.map} +1 -1
- package/dist/core/web/public/next/assets/FleetSection-DSETviPK.js +3 -0
- package/dist/core/web/public/next/assets/{FleetSection-D_zRBCub.js.map → FleetSection-DSETviPK.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js → Funnel-DxiGqJrt.js} +2 -2
- package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js.map → Funnel-DxiGqJrt.js.map} +1 -1
- package/dist/core/web/public/next/assets/GearTray-C3I89sIt.js +2 -0
- package/dist/core/web/public/next/assets/{GearTray-C7k4l_BW.js.map → GearTray-C3I89sIt.js.map} +1 -1
- package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js → GrowthSection-C3m2bPEz.js} +2 -2
- package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js.map → GrowthSection-C3m2bPEz.js.map} +1 -1
- package/dist/core/web/public/next/assets/HandoffDialog-Bjb96a0N.js +2 -0
- package/dist/core/web/public/next/assets/{HandoffDialog-FPVOqOMN.js.map → HandoffDialog-Bjb96a0N.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js → Input-ekTehVaH.js} +2 -2
- package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js.map → Input-ekTehVaH.js.map} +1 -1
- package/dist/core/web/public/next/assets/LeaderCard-85VBbbaZ.js +2 -0
- package/dist/core/web/public/next/assets/{LeaderCard-4R0BhDzT.js.map → LeaderCard-85VBbbaZ.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js → MatrixHeatmap-Bo8j0QPC.js} +2 -2
- package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js.map → MatrixHeatmap-Bo8j0QPC.js.map} +1 -1
- package/dist/core/web/public/next/assets/McpSection-DvHFaVyp.js +2 -0
- package/dist/core/web/public/next/assets/{McpSection-CJ__OJKl.js.map → McpSection-DvHFaVyp.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js → MessageMarkdown-fsY_ltVa.js} +3 -3
- package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js.map → MessageMarkdown-fsY_ltVa.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js → MessageMarkdownRenderer-DDdtu82l.js} +2 -2
- package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js.map → MessageMarkdownRenderer-DDdtu82l.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js → Meter-CeGDXdDM.js} +2 -2
- package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js.map → Meter-CeGDXdDM.js.map} +1 -1
- package/dist/core/web/public/next/assets/MindSection-CDVhHvXl.js +2 -0
- package/dist/core/web/public/next/assets/{MindSection-BjXHkQPS.js.map → MindSection-CDVhHvXl.js.map} +1 -1
- package/dist/core/web/public/next/assets/MutationTokenDialog-CrfJ0PdD.css +1 -0
- package/dist/core/web/public/next/assets/MutationTokenDialog-DTQzEOHR.js +2 -0
- package/dist/core/web/public/next/assets/MutationTokenDialog-DTQzEOHR.js.map +1 -0
- package/dist/core/web/public/next/assets/NeedsYouDrawer-6AuN0BF3.js +2 -0
- package/dist/core/web/public/next/assets/{NeedsYouDrawer-rSd1ZHAR.js.map → NeedsYouDrawer-6AuN0BF3.js.map} +1 -1
- package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js → NeedsYouList-ChnRmbSk.js} +2 -2
- package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js.map → NeedsYouList-ChnRmbSk.js.map} +1 -1
- package/dist/core/web/public/next/assets/NewChatDialog-B06E7sqg.js +3 -0
- package/dist/core/web/public/next/assets/{NewChatDialog-BeDQ1eW3.js.map → NewChatDialog-B06E7sqg.js.map} +1 -1
- package/dist/core/web/public/next/assets/OnboardingFlow-C2M3zov9.js +2 -0
- package/dist/core/web/public/next/assets/{OnboardingFlow-CkTZtt-m.js.map → OnboardingFlow-C2M3zov9.js.map} +1 -1
- package/dist/core/web/public/next/assets/PreviewPane-Bd6HsX1k.js +2 -0
- package/dist/core/web/public/next/assets/{PreviewPane-kzbbSK4u.js.map → PreviewPane-Bd6HsX1k.js.map} +1 -1
- package/dist/core/web/public/next/assets/ProviderLogo-Bz7KR5j3.js +2 -0
- package/dist/core/web/public/next/assets/ProviderLogo-Bz7KR5j3.js.map +1 -0
- package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js → RailStatus-CctCuuLy.js} +2 -2
- package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js.map → RailStatus-CctCuuLy.js.map} +1 -1
- package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js → RefreshIndicator-CKY5BGdD.js} +2 -2
- package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js.map → RefreshIndicator-CKY5BGdD.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-CM_8pJs6.css → ResourcePoolConsoleApp-BX9JLkT4.css} +1 -1
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js → ResourcePoolConsoleApp-CspIsW_G.js} +5 -5
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js.map → ResourcePoolConsoleApp-CspIsW_G.js.map} +1 -1
- package/dist/core/web/public/next/assets/ResourcesChrome-B7fHZ6zX.js +3 -0
- package/dist/core/web/public/next/assets/ResourcesChrome-B7fHZ6zX.js.map +1 -0
- package/dist/core/web/public/next/assets/ResourcesChrome-uZEqC2EM.css +1 -0
- package/dist/core/web/public/next/assets/ResourcesDrawer-B7-N9n7-.js +2 -0
- package/dist/core/web/public/next/assets/ResourcesDrawer-B7-N9n7-.js.map +1 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-C_B11J0s.js +2 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-C_B11J0s.js.map +1 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-DdxhTdZ6.css +1 -0
- package/dist/core/web/public/next/assets/{RunInCloudAction-C3LBp7C4.js → RunInCloudAction-_juw4EXd.js} +2 -2
- package/dist/core/web/public/next/assets/{RunInCloudAction-C3LBp7C4.js.map → RunInCloudAction-_juw4EXd.js.map} +1 -1
- package/dist/core/web/public/next/assets/SeatSelector-D_YXvkPy.js +3 -0
- package/dist/core/web/public/next/assets/{SeatSelector-DpvvbjNm.js.map → SeatSelector-D_YXvkPy.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js → Segmented-DnKP6rr7.js} +2 -2
- package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js.map → Segmented-DnKP6rr7.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js → Select-DlbUupTX.js} +2 -2
- package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js.map → Select-DlbUupTX.js.map} +1 -1
- package/dist/core/web/public/next/assets/SessionGate-DnuTZACL.js +2 -0
- package/dist/core/web/public/next/assets/SessionGate-DnuTZACL.js.map +1 -0
- package/dist/core/web/public/next/assets/SessionGate-DvMpXNpJ.css +1 -0
- package/dist/core/web/public/next/assets/SessionInsightChip-C33-k-Q5.js +2 -0
- package/dist/core/web/public/next/assets/{SessionInsightChip-CWye87Ju.js.map → SessionInsightChip-C33-k-Q5.js.map} +1 -1
- package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js → SessionSearch-DhhR9Csg.js} +2 -2
- package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js.map → SessionSearch-DhhR9Csg.js.map} +1 -1
- package/dist/core/web/public/next/assets/SettingsSection-C0xQvCz3.js +2 -0
- package/dist/core/web/public/next/assets/SettingsSection-C0xQvCz3.js.map +1 -0
- package/dist/core/web/public/next/assets/Sheet-BvNYOYv5.js +2 -0
- package/dist/core/web/public/next/assets/{Sheet-DZKcQXQg.js.map → Sheet-BvNYOYv5.js.map} +1 -1
- package/dist/core/web/public/next/assets/ShortcutsOverlay-1nUBVO-Z.js +2 -0
- package/dist/core/web/public/next/assets/{ShortcutsOverlay-BpDimdPq.js.map → ShortcutsOverlay-1nUBVO-Z.js.map} +1 -1
- package/dist/core/web/public/next/assets/Sidebar-YrVvvBNM.js +3 -0
- package/dist/core/web/public/next/assets/{Sidebar-BoBzBEFX.js.map → Sidebar-YrVvvBNM.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js → Slider-B2c-dbQb.js} +2 -2
- package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js.map → Slider-B2c-dbQb.js.map} +1 -1
- package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js → StatusBadge-Q9YYkijx.js} +2 -2
- package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js.map → StatusBadge-Q9YYkijx.js.map} +1 -1
- package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js → StepBand-Ci-C0GUG.js} +2 -2
- package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js.map → StepBand-Ci-C0GUG.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js → Surface-DBovMq4P.js} +2 -2
- package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js.map → Surface-DBovMq4P.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js → Swimlane-Cdc4TqDe.js} +2 -2
- package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js.map → Swimlane-Cdc4TqDe.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js → Switch-CUrvzO2k.js} +2 -2
- package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js.map → Switch-CUrvzO2k.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js → Tag-Bv8u6APt.js} +2 -2
- package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js.map → Tag-Bv8u6APt.js.map} +1 -1
- package/dist/core/web/public/next/assets/TerminalPane-BE4Xlqi5.js +7 -0
- package/dist/core/web/public/next/assets/{TerminalPane-_1aH4ndN.js.map → TerminalPane-BE4Xlqi5.js.map} +1 -1
- package/dist/core/web/public/next/assets/UniverseConsoleApp-BGwejf0m.js +2 -0
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-BUsq-inZ.js.map → UniverseConsoleApp-BGwejf0m.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-Dh7A-hLD.css → UniverseConsoleApp-DfuT-wFw.css} +1 -1
- package/dist/core/web/public/next/assets/{UniverseView-Dogy_dsB.js → UniverseView-CgKa-WXC.js} +4 -4
- package/dist/core/web/public/next/assets/{UniverseView-Dogy_dsB.js.map → UniverseView-CgKa-WXC.js.map} +1 -1
- package/dist/core/web/public/next/assets/UsageSection-CazsHm1f.js +2 -0
- package/dist/core/web/public/next/assets/{UsageSection-DiX_dTyo.js.map → UsageSection-CazsHm1f.js.map} +1 -1
- package/dist/core/web/public/next/assets/VerseConsoleApp-CTF3Shs0.js +3 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-CTF3Shs0.js.map +1 -0
- package/dist/core/web/public/next/assets/Workspace-CgdyXiEV.js +10 -0
- package/dist/core/web/public/next/assets/Workspace-CgdyXiEV.js.map +1 -0
- package/dist/core/web/public/next/assets/Workspace-Dwri2jFJ.css +1 -0
- package/dist/core/web/public/next/assets/actions-MtxBGS5B.js +2 -0
- package/dist/core/web/public/next/assets/{actions-s2lfm_5k.js.map → actions-MtxBGS5B.js.map} +1 -1
- package/dist/core/web/public/next/assets/budget-queries-CP7hgR-p.js +2 -0
- package/dist/core/web/public/next/assets/{budget-queries-wUshcovN.js.map → budget-queries-CP7hgR-p.js.map} +1 -1
- package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js → capacity-strip-model-fHfu5cph.js} +2 -2
- package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js.map → capacity-strip-model-fHfu5cph.js.map} +1 -1
- package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js → charts-Bis9WSiS.js} +2 -2
- package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js.map → charts-Bis9WSiS.js.map} +1 -1
- package/dist/core/web/public/next/assets/cloud-queries-BsOepFz6.js +2 -0
- package/dist/core/web/public/next/assets/{cloud-queries-CnV1yaNG.js.map → cloud-queries-BsOepFz6.js.map} +1 -1
- package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js → cloud.module-DoFnr8ZH.js} +2 -2
- package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js.map → cloud.module-DoFnr8ZH.js.map} +1 -1
- package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js → command-bus-CMvbYP5K.js} +2 -2
- package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js.map → command-bus-CMvbYP5K.js.map} +1 -1
- package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js +2 -0
- package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js.map +1 -0
- package/dist/core/web/public/next/assets/compaction-point-VL9oegWS.js +2 -0
- package/dist/core/web/public/next/assets/compaction-point-VL9oegWS.js.map +1 -0
- package/dist/core/web/public/next/assets/{composer-keys-DBRymxQn.js → composer-keys-su0g1h9o.js} +2 -2
- package/dist/core/web/public/next/assets/{composer-keys-DBRymxQn.js.map → composer-keys-su0g1h9o.js.map} +1 -1
- package/dist/core/web/public/next/assets/context-model-Ci3Ch9t5.js +2 -0
- package/dist/core/web/public/next/assets/{context-model-Dwd49-dp.js.map → context-model-Ci3Ch9t5.js.map} +1 -1
- package/dist/core/web/public/next/assets/context-model-CjiJTnf1.js +2 -0
- package/dist/core/web/public/next/assets/{context-model-MT17V86_.js.map → context-model-CjiJTnf1.js.map} +1 -1
- package/dist/core/web/public/next/assets/context-queries-BDXT6LQ3.js +2 -0
- package/dist/core/web/public/next/assets/{context-queries-xVKIeynP.js.map → context-queries-BDXT6LQ3.js.map} +1 -1
- package/dist/core/web/public/next/assets/control-queries-Dv-h1Clu.js +2 -0
- package/dist/core/web/public/next/assets/{control-queries-DOZR-D8G.js.map → control-queries-Dv-h1Clu.js.map} +1 -1
- package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js → dock-icons-t--Eugrd.js} +2 -2
- package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js.map → dock-icons-t--Eugrd.js.map} +1 -1
- package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js → dock-store-qIu7kSQE.js} +2 -2
- package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js.map → dock-store-qIu7kSQE.js.map} +1 -1
- package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js → fleet-model-IRbwfhkR.js} +2 -2
- package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js.map → fleet-model-IRbwfhkR.js.map} +1 -1
- package/dist/core/web/public/next/assets/fleet-queries-7FVNByX1.js +2 -0
- package/dist/core/web/public/next/assets/{fleet-queries-BSdRlUwJ.js.map → fleet-queries-7FVNByX1.js.map} +1 -1
- package/dist/core/web/public/next/assets/focus-trap-QqQxQdvH.js +2 -0
- package/dist/core/web/public/next/assets/focus-trap-QqQxQdvH.js.map +1 -0
- package/dist/core/web/public/next/assets/{format-B8DAVcn2.js → format-CaMmVQCn.js} +2 -2
- package/dist/core/web/public/next/assets/{format-B8DAVcn2.js.map → format-CaMmVQCn.js.map} +1 -1
- package/dist/core/web/public/next/assets/git-model-B4S_GUNA.js +5 -0
- package/dist/core/web/public/next/assets/{git-model-CivuBY_D.js.map → git-model-B4S_GUNA.js.map} +1 -1
- package/dist/core/web/public/next/assets/global-BkNl4e6E.js +2 -0
- package/dist/core/web/public/next/assets/global-BkNl4e6E.js.map +1 -0
- package/dist/core/web/public/next/assets/global-BlI2BYa1.css +1 -0
- package/dist/core/web/public/next/assets/guarded-action-DHiL8tY5.js +3 -0
- package/dist/core/web/public/next/assets/guarded-action-DHiL8tY5.js.map +1 -0
- package/dist/core/web/public/next/assets/guarded-runners-DmGEkM2P.js +2 -0
- package/dist/core/web/public/next/assets/guarded-runners-DmGEkM2P.js.map +1 -0
- package/dist/core/web/public/next/assets/icon-base-NtFmP2yB.js +2 -0
- package/dist/core/web/public/next/assets/icon-base-NtFmP2yB.js.map +1 -0
- package/dist/core/web/public/next/assets/icons-C5EFt_Ts.js +2 -0
- package/dist/core/web/public/next/assets/icons-C5EFt_Ts.js.map +1 -0
- package/dist/core/web/public/next/assets/{index-oAAq8XJa.js → index-DbDw9UAs.js} +3 -3
- package/dist/core/web/public/next/assets/{index-oAAq8XJa.js.map → index-DbDw9UAs.js.map} +1 -1
- package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js → live-model-DEwrl7_A.js} +2 -2
- package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js.map → live-model-DEwrl7_A.js.map} +1 -1
- package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js → mind.module-CLhqMQak.js} +2 -2
- package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js.map → mind.module-CLhqMQak.js.map} +1 -1
- package/dist/core/web/public/next/assets/mutations-Kvzsg-iK.js +2 -0
- package/dist/core/web/public/next/assets/{mutations-Dpsql5t7.js.map → mutations-Kvzsg-iK.js.map} +1 -1
- package/dist/core/web/public/next/assets/nav-C0IunEYF.js +2 -0
- package/dist/core/web/public/next/assets/nav-C0IunEYF.js.map +1 -0
- package/dist/core/web/public/next/assets/overnight-queries-C_AfcL7q.js +2 -0
- package/dist/core/web/public/next/assets/{overnight-queries-X-44Gsw5.js.map → overnight-queries-C_AfcL7q.js.map} +1 -1
- package/dist/core/web/public/next/assets/preloaded-CctOitLu.js +2 -0
- package/dist/core/web/public/next/assets/preloaded-CctOitLu.js.map +1 -0
- package/dist/core/web/public/next/assets/primitives-CbAGCNKt.js +1 -0
- package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js → queries-THD05gHP.js} +2 -2
- package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js.map → queries-THD05gHP.js.map} +1 -1
- package/dist/core/web/public/next/assets/reasoning-pref-BVPu0SME.js +2 -0
- package/dist/core/web/public/next/assets/{reasoning-pref-B9-DJUXP.js.map → reasoning-pref-BVPu0SME.js.map} +1 -1
- package/dist/core/web/public/next/assets/reveal-anchor-wCT5b4m3.js +2 -0
- package/dist/core/web/public/next/assets/reveal-anchor-wCT5b4m3.js.map +1 -0
- package/dist/core/web/public/next/assets/seat-subscription-CR_VylsK.js +2 -0
- package/dist/core/web/public/next/assets/{seat-subscription-CH6fW4fJ.js.map → seat-subscription-CR_VylsK.js.map} +1 -1
- package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js → section-visibility-B0xXUQJ0.js} +2 -2
- package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js.map → section-visibility-B0xXUQJ0.js.map} +1 -1
- package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js → sidebar-model-C5wVXGpb.js} +2 -2
- package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js.map → sidebar-model-C5wVXGpb.js.map} +1 -1
- package/dist/core/web/public/next/assets/slots-DDd8cEoh.js +3 -0
- package/dist/core/web/public/next/assets/{slots-Ds9ZIqUL.js.map → slots-DDd8cEoh.js.map} +1 -1
- package/dist/core/web/public/next/assets/surface-data-BFxAlefI.js +2 -0
- package/dist/core/web/public/next/assets/{surface-data-J52iIGMD.js.map → surface-data-BFxAlefI.js.map} +1 -1
- package/dist/core/web/public/next/assets/surface-prefetch-CHusyO9q.js +2 -0
- package/dist/core/web/public/next/assets/{surface-prefetch-CgZ-LEJK.js.map → surface-prefetch-CHusyO9q.js.map} +1 -1
- package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js → tasks-model-DvkWveXs.js} +2 -2
- package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js.map → tasks-model-DvkWveXs.js.map} +1 -1
- package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js → terminal-icons-Dp6pJgV2.js} +2 -2
- package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js.map → terminal-icons-Dp6pJgV2.js.map} +1 -1
- package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js → usage-queries-CUTmnegA.js} +2 -2
- package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js.map → usage-queries-CUTmnegA.js.map} +1 -1
- package/dist/core/web/public/next/assets/use-guarded-action-UCX2u1t1.js +2 -0
- package/dist/core/web/public/next/assets/{use-guarded-action-C2HlSzkz.js.map → use-guarded-action-UCX2u1t1.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js → use-ticker-OXAjob3y.js} +2 -2
- package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js.map → use-ticker-OXAjob3y.js.map} +1 -1
- package/dist/core/web/public/next/assets/use-token-gate-CDDRAoKH.js +2 -0
- package/dist/core/web/public/next/assets/{use-token-gate-B3IJL6bf.js.map → use-token-gate-CDDRAoKH.js.map} +1 -1
- package/dist/core/web/public/next/assets/useChartWidth-BW6SwYIK.css +1 -0
- package/dist/core/web/public/next/assets/useChartWidth-D9M7kUw7.js +2 -0
- package/dist/core/web/public/next/assets/{useChartWidth-lZ9PrQn0.js.map → useChartWidth-D9M7kUw7.js.map} +1 -1
- package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js → useSeatsRefresh-B2dCVcj9.js} +2 -2
- package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js.map → useSeatsRefresh-B2dCVcj9.js.map} +1 -1
- package/dist/core/web/public/next/assets/useVerseTranscript-BL3CljSI.js +2 -0
- package/dist/core/web/public/next/assets/useVerseTranscript-BL3CljSI.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-icons-DASWdYuE.js +2 -0
- package/dist/core/web/public/next/assets/verse-icons-DASWdYuE.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-model-BQ0Y2CSr.js +2 -0
- package/dist/core/web/public/next/assets/verse-model-BQ0Y2CSr.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js +3 -0
- package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-ui-store-D7YXi63q.js +3 -0
- package/dist/core/web/public/next/assets/{verse-ui-store-zafyzXKD.js.map → verse-ui-store-D7YXi63q.js.map} +1 -1
- package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js → viewport-BYGH5EgA.js} +2 -2
- package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js.map → viewport-BYGH5EgA.js.map} +1 -1
- package/dist/core/web/public/next/assets/warmup-AsqwWCUi.js +3 -0
- package/dist/core/web/public/next/assets/{warmup-BR6pxAKs.js.map → warmup-AsqwWCUi.js.map} +1 -1
- package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js → workspace-model-CXorJr0G.js} +2 -2
- package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js.map → workspace-model-CXorJr0G.js.map} +1 -1
- package/dist/core/web/public/next/index.html +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/package.json +5 -2
- package/dist/cli/activation.d.ts +0 -41
- package/dist/cli/activation.js +0 -485
- package/dist/cli/activation.js.map +0 -1
- package/dist/core/fleet/generated-repair-resolution.d.ts +0 -36
- package/dist/core/fleet/generated-repair-resolution.js +0 -245
- package/dist/core/fleet/generated-repair-resolution.js.map +0 -1
- package/dist/core/local-runtime/llama/port.d.ts +0 -17
- package/dist/core/local-runtime/llama/port.js +0 -47
- package/dist/core/local-runtime/llama/port.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-host.d.ts +0 -54
- package/dist/core/local-runtime/llama/proxy-host.js +0 -159
- package/dist/core/local-runtime/llama/proxy-host.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-process.d.ts +0 -148
- package/dist/core/local-runtime/llama/proxy-process.js +0 -250
- package/dist/core/local-runtime/llama/proxy-process.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-record.d.ts +0 -40
- package/dist/core/local-runtime/llama/proxy-record.js +0 -133
- package/dist/core/local-runtime/llama/proxy-record.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +0 -118
- package/dist/core/local-runtime/llama/proxy-supervisor.js +0 -511
- package/dist/core/local-runtime/llama/proxy-supervisor.js.map +0 -1
- package/dist/core/web/public/next/assets/Advanced-DEM93sKI.js +0 -2
- package/dist/core/web/public/next/assets/App-CimXmK0L.js +0 -7
- package/dist/core/web/public/next/assets/AppsSection-D6U-dSj6.js +0 -2
- package/dist/core/web/public/next/assets/AutonomySection-3V9pUyxm.js +0 -2
- package/dist/core/web/public/next/assets/BranchBar-U8UdpfEB.js +0 -2
- package/dist/core/web/public/next/assets/CapacityStrip-C667yQe8.js +0 -2
- package/dist/core/web/public/next/assets/CapacityStrip-C667yQe8.js.map +0 -1
- package/dist/core/web/public/next/assets/ChatSection-CCcIPpOq.js +0 -3
- package/dist/core/web/public/next/assets/ChatSection-CCcIPpOq.js.map +0 -1
- package/dist/core/web/public/next/assets/CommandPalette-FiD4N8XD.js +0 -2
- package/dist/core/web/public/next/assets/CommandSection-DN8KwH-X.js +0 -2
- package/dist/core/web/public/next/assets/DockHost-DvR-hPhZ.js +0 -2
- package/dist/core/web/public/next/assets/FleetSection-D_zRBCub.js +0 -3
- package/dist/core/web/public/next/assets/GearTray-C7k4l_BW.js +0 -2
- package/dist/core/web/public/next/assets/HandoffDialog-FPVOqOMN.js +0 -2
- package/dist/core/web/public/next/assets/LeaderCard-4R0BhDzT.js +0 -2
- package/dist/core/web/public/next/assets/McpSection-CJ__OJKl.js +0 -2
- package/dist/core/web/public/next/assets/MindSection-BjXHkQPS.js +0 -2
- package/dist/core/web/public/next/assets/MutationTokenDialog-Cum_DqQZ.css +0 -1
- package/dist/core/web/public/next/assets/MutationTokenDialog-SkRxqV_I.js +0 -2
- package/dist/core/web/public/next/assets/MutationTokenDialog-SkRxqV_I.js.map +0 -1
- package/dist/core/web/public/next/assets/NeedsYouDrawer-rSd1ZHAR.js +0 -2
- package/dist/core/web/public/next/assets/NewChatDialog-BeDQ1eW3.js +0 -3
- package/dist/core/web/public/next/assets/OnboardingFlow-CkTZtt-m.js +0 -2
- package/dist/core/web/public/next/assets/PreviewPane-kzbbSK4u.js +0 -2
- package/dist/core/web/public/next/assets/ResourcesChrome-B3Z3O98t.css +0 -1
- package/dist/core/web/public/next/assets/ResourcesChrome-BzV6bkIa.js +0 -3
- package/dist/core/web/public/next/assets/ResourcesChrome-BzV6bkIa.js.map +0 -1
- package/dist/core/web/public/next/assets/ResourcesDrawer-o4ILHdep.js +0 -2
- package/dist/core/web/public/next/assets/ResourcesDrawer-o4ILHdep.js.map +0 -1
- package/dist/core/web/public/next/assets/RouteErrorBoundary-6RMd_aZg.css +0 -1
- package/dist/core/web/public/next/assets/RouteErrorBoundary-C5SxA2Dg.js +0 -2
- package/dist/core/web/public/next/assets/RouteErrorBoundary-C5SxA2Dg.js.map +0 -1
- package/dist/core/web/public/next/assets/SeatSelector-DpvvbjNm.js +0 -3
- package/dist/core/web/public/next/assets/SessionInsightChip-CWye87Ju.js +0 -2
- package/dist/core/web/public/next/assets/SettingsSection-Dr18upeE.js +0 -2
- package/dist/core/web/public/next/assets/SettingsSection-Dr18upeE.js.map +0 -1
- package/dist/core/web/public/next/assets/Sheet-DZKcQXQg.js +0 -2
- package/dist/core/web/public/next/assets/ShortcutsOverlay-BpDimdPq.js +0 -2
- package/dist/core/web/public/next/assets/Sidebar-BoBzBEFX.js +0 -3
- package/dist/core/web/public/next/assets/TerminalPane-_1aH4ndN.js +0 -7
- package/dist/core/web/public/next/assets/UniverseConsoleApp-BUsq-inZ.js +0 -2
- package/dist/core/web/public/next/assets/UsageSection-DiX_dTyo.js +0 -2
- package/dist/core/web/public/next/assets/VerseConsoleApp-WVeyJnW7.js +0 -3
- package/dist/core/web/public/next/assets/VerseConsoleApp-WVeyJnW7.js.map +0 -1
- package/dist/core/web/public/next/assets/Workspace-BYW9dm90.css +0 -1
- package/dist/core/web/public/next/assets/Workspace-BbxZHwQd.js +0 -10
- package/dist/core/web/public/next/assets/Workspace-BbxZHwQd.js.map +0 -1
- package/dist/core/web/public/next/assets/actions-s2lfm_5k.js +0 -2
- package/dist/core/web/public/next/assets/budget-queries-wUshcovN.js +0 -2
- package/dist/core/web/public/next/assets/cloud-queries-CnV1yaNG.js +0 -2
- package/dist/core/web/public/next/assets/command-catalog-BdtDH93o.js +0 -2
- package/dist/core/web/public/next/assets/command-catalog-BdtDH93o.js.map +0 -1
- package/dist/core/web/public/next/assets/context-model-Dwd49-dp.js +0 -2
- package/dist/core/web/public/next/assets/context-model-MT17V86_.js +0 -2
- package/dist/core/web/public/next/assets/context-queries-xVKIeynP.js +0 -2
- package/dist/core/web/public/next/assets/control-queries-DOZR-D8G.js +0 -2
- package/dist/core/web/public/next/assets/dock-panes-UKS-mXhr.js +0 -2
- package/dist/core/web/public/next/assets/dock-panes-UKS-mXhr.js.map +0 -1
- package/dist/core/web/public/next/assets/fleet-queries-BSdRlUwJ.js +0 -2
- package/dist/core/web/public/next/assets/git-model-CivuBY_D.js +0 -5
- package/dist/core/web/public/next/assets/global-Di2PUgj4.js +0 -2
- package/dist/core/web/public/next/assets/global-Di2PUgj4.js.map +0 -1
- package/dist/core/web/public/next/assets/global-_tOCFt9y.css +0 -1
- package/dist/core/web/public/next/assets/guarded-action-CvOHcqyH.js +0 -2
- package/dist/core/web/public/next/assets/guarded-action-CvOHcqyH.js.map +0 -1
- package/dist/core/web/public/next/assets/icons-B_yuAgdN.js +0 -2
- package/dist/core/web/public/next/assets/icons-B_yuAgdN.js.map +0 -1
- package/dist/core/web/public/next/assets/mutations-Dpsql5t7.js +0 -2
- package/dist/core/web/public/next/assets/overnight-queries-X-44Gsw5.js +0 -2
- package/dist/core/web/public/next/assets/primitives-BDIcUvob.js +0 -1
- package/dist/core/web/public/next/assets/reasoning-pref-B9-DJUXP.js +0 -2
- package/dist/core/web/public/next/assets/seat-subscription-CH6fW4fJ.js +0 -2
- package/dist/core/web/public/next/assets/slots-Ds9ZIqUL.js +0 -3
- package/dist/core/web/public/next/assets/surface-data-J52iIGMD.js +0 -2
- package/dist/core/web/public/next/assets/surface-prefetch-CgZ-LEJK.js +0 -2
- package/dist/core/web/public/next/assets/use-guarded-action-C2HlSzkz.js +0 -2
- package/dist/core/web/public/next/assets/use-token-gate-B3IJL6bf.js +0 -2
- package/dist/core/web/public/next/assets/useActivity-Bk3XgXjL.js +0 -2
- package/dist/core/web/public/next/assets/useActivity-Bk3XgXjL.js.map +0 -1
- package/dist/core/web/public/next/assets/useChartWidth-BAtVgn2n.css +0 -1
- package/dist/core/web/public/next/assets/useChartWidth-lZ9PrQn0.js +0 -2
- package/dist/core/web/public/next/assets/verse-model-D7NZQFAR.js +0 -2
- package/dist/core/web/public/next/assets/verse-model-D7NZQFAR.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-queries-DvIJcn6Z.js +0 -2
- package/dist/core/web/public/next/assets/verse-queries-DvIJcn6Z.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-store-DjBWj04q.js +0 -3
- package/dist/core/web/public/next/assets/verse-store-DjBWj04q.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-ui-store-zafyzXKD.js +0 -3
- package/dist/core/web/public/next/assets/warmup-BR6pxAKs.js +0 -3
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{c as r,h as i,it as a,m as o,ut as s}from"./global-Di2PUgj4.js";import{n as c,r as l}from"./MutationTokenDialog-SkRxqV_I.js";import{n as u}from"./StatusBadge-BwnBNFQr.js";import{t as d}from"./RefreshIndicator-BLnr9IOM.js";import{D as f,E as p,L as m,O as h,P as g,c as _,l as v,n as y,p as b,t as x,u as S}from"./useChartWidth-lZ9PrQn0.js";import{c as C}from"./colors-BZ3a9wFf.js";import{t as ee}from"./Swimlane-DR4OgON_.js";import{n as w,t as T}from"./BurnDown-x4PWH9JF.js";import{s as E}from"./command-catalog-BdtDH93o.js";import{n as D}from"./viewport-BEqGUoTA.js";import"./verse-queries-DvIJcn6Z.js";import{i as O,r as k}from"./section-visibility-qFqc_d4Z.js";import{i as A}from"./useActivity-Bk3XgXjL.js";import{C as j,_ as te,a as ne,l as re,m as M,v as N,y as P}from"./icons-B_yuAgdN.js";import{_ as ie,g as ae,j as F,t as oe,v as se,y as ce}from"./VerseConsoleApp-WVeyJnW7.js";import{t as le}from"./Segmented-BL40udoO.js";import{t as ue,v as de,y as fe}from"./format-B8DAVcn2.js";import{f as pe,n as me}from"./verse-model-D7NZQFAR.js";import{t as he}from"./Tag-_-K1h7Hk.js";import{n as ge}from"./budget-queries-wUshcovN.js";import{n as _e,t as I}from"./Button-DYv_KKxr.js";import{t as ve}from"./Meter-D-hncpkO.js";import{t as ye}from"./Switch-CcR5Llk5.js";import{t as be}from"./BudgetControl-DOTlMSmW.js";import{n as xe,t as Se}from"./types-D5XOdyw8.js";import{S as Ce,_ as we,b as Te,c as Ee,d as De,g as Oe,h as L,i as ke,l as Ae,p as je,r as Me,s as Ne,t as R,u as Pe,v as Fe,x as Ie,y as Le}from"./cloud.module-CiwatLj3.js";import{a as Re,i as ze,n as Be,o as Ve,r as He,s as Ue,t as We}from"./cloud-queries-CnV1yaNG.js";import{t as Ge}from"./use-ticker-BNc1H4ZC.js";import{t as Ke}from"./use-guarded-action-C2HlSzkz.js";import{a as qe,f as Je,i as Ye,n as Xe,o as Ze,r as Qe,s as z,t as $e,u as et}from"./surface-data-J52iIGMD.js";import{t as tt}from"./Input-B9-VLcHS.js";import{t as nt}from"./Sheet-DZKcQXQg.js";import{n as rt,r as B,t as it}from"./actions-s2lfm_5k.js";import{n as at,r as ot,t as st}from"./dark-since-DOMvtB_G.js";import{a as ct,i as V,n as H,r as U,t as lt}from"./Surface-B3TZVoER.js";import{_ as ut,d as dt,f as ft,s as pt,v as mt}from"./live-model-DCw_IFRI.js";import{n as ht}from"./LeaderCard-4R0BhDzT.js";import{d as gt,n as _t,u as vt}from"./NeedsYouList-CG-nB1tr.js";import{t as yt}from"./CloudBudgetForm-DJeJvBEu.js";var W=n(e(),1),G={off:0,propose:1,autonomous:2},K={off:`Off`,propose:`Propose`,autonomous:`Autonomous`},bt={off:`Off`,propose:`Propose`,autonomous:`Auto`},xt=[`off`,`propose`,`autonomous`];function St(e,t){let n=G[e.switch],r=G[t];return r===n?`same`:r<n?`lower`:r<=G[e.maxSwitchWithoutGrant]?`raise`:`raise-needs-grant`}function Ct(e){return xt.map(t=>{let n=G[t]>Math.max(G[e.switch],G[e.maxSwitchWithoutGrant]);return{value:t,label:K[t],short:bt[t],needsGrant:n,ariaLabel:n?`${K[t]} (needs a new grant — Touch ID)`:K[t]}})}var q=864e5,wt=36e5;function Tt(e){if(!Number.isFinite(e)||e<=0)return`0m`;if(e>=3*q)return`${Math.floor(e/q)}d`;if(e>=q){let t=Math.floor(e/q),n=Math.floor((e-t*q)/wt);return n?`${t}d ${n}h`:`${t}d`}return e>=wt?`${Math.floor(e/wt)}h`:`${Math.max(1,Math.floor(e/6e4))}m`}var J={none:`No grant`,active:`Active`,paused:`Paused, re-approve`,expired:`Expired, renew`,revoked:`Revoked, new grant`,invalid:`Grant invalid`};function Et(e,t){if(!e)return{label:`Grant unknown`,tone:`unknown`,detail:`The authority service did not answer, so the grant state is unknown.`,action:null};let n=e.grant;switch(n.state){case`active`:{let e=n.expiresAt?Date.parse(n.expiresAt):NaN;if(!Number.isFinite(e))return{label:`Active`,tone:`success`,detail:`A grant is active; its expiry could not be read.`,action:null};let r=e-t,i=r<q?`danger`:r<3*q?`warning`:`success`;return{label:Tt(r),tone:i,detail:`Grant active until ${new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}${r<3*q?` — renew soon`:``}.`,action:r<3*q?`grant`:null}}case`paused`:return{label:J.paused,tone:`warning`,detail:n.reason??`The grant is paused until you re-approve it.`,action:`re-approve`};case`expired`:return{label:J.expired,tone:`danger`,detail:n.reason??`The grant expired; autonomy is dark until a new one is signed.`,action:`grant`};case`revoked`:return{label:J.revoked,tone:`danger`,detail:n.reason??`The grant was revoked; a new one needs Touch ID.`,action:`grant`};case`invalid`:return{label:J.invalid,tone:`danger`,detail:n.reason??`The installed grant failed verification.`,action:`grant`};default:return{label:J.none,tone:`neutral`,detail:`No standing grant is installed; autonomy can only propose.`,action:`grant`}}}function Dt(e){return e?e.kill?{key:`mode`,text:`Stopped`,tone:`danger`}:e.grant.state===`paused`?{key:`mode`,text:`Paused, re-approve`,tone:`warning`}:{key:`mode`,text:K[e.effectiveSwitch],tone:e.effectiveSwitch===`autonomous`?`success`:`neutral`}:{key:`mode`,text:`Autonomy unknown`,tone:`unknown`}}function Ot(e){let t=[Dt(e.authority)],n=e.building!==null||e.mergedToday!==null||e.revertsToday!==null;return e.darkSince&&!(e.building&&e.building>0)?t.push({key:`dark`,text:`fleet dark since ${st(e.darkSince)}`,tone:`neutral`}):n?(e.building!==null&&t.push({key:`building`,text:`${e.building} building`}),e.mergedToday!==null&&t.push({key:`merged`,text:`${e.mergedToday} merged today`}),e.revertsToday!==null&&t.push({key:`reverts`,text:`${e.revertsToday} revert${e.revertsToday===1?``:`s`}`,tone:e.revertsToday>0?`warning`:void 0})):t.push({key:`fleet`,text:`fleet status unknown`,tone:`unknown`}),e.reserve&&t.push({key:`reserve`,text:`${e.reserve.label} ${Math.round(e.reserve.percent)}% reserved for you`}),t}function kt(e,t){let n=e.kind;return n===`new`?`grant`:n===`reapprove`?`re-approve`:t}function At(e){if(typeof e!=`object`||!e)return null;let t=e.result?.stop;if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.liveExecutionLeases==`number`&&Number.isFinite(n.liveExecutionLeases)?Math.max(0,Math.round(n.liveExecutionLeases)):null,i=[];n.quiesced===!0||r===0?i.push(`Stopped. No agent is still running.`):r===null?i.push(`Stopped. Agents started before Stop may still be finishing; no new work starts.`):i.push(`Stopped. ${r} agent${r===1?``:`s`} started before Stop ${r===1?`is`:`are`} still finishing; no new work starts.`),typeof n.mergesRevoked==`number`&&n.mergesRevoked>0&&i.push(`${n.mergesRevoked} armed merge${n.mergesRevoked===1?` was`:`s were`} revoked.`);let a=Array.isArray(n.mergeRevokeFailures)?n.mergeRevokeFailures.length:0;return a>0&&i.push(`${a} armed merge${a===1?``:`s`} could not be revoked; Stop still blocks ${a===1?`it`:`them`}.`),i.join(` `)}var Y=t(),jt=864e5;function Mt(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):`—`}function Nt(e){let t=Date.parse(e.issuedAt),n=Date.parse(e.expiresAt);return Number.isFinite(t)&&Number.isFinite(n)?Math.round((n-t)/jt):null}function Pt(e){let t=e.criteria,n=[`${e.repos.length} repo${e.repos.length===1?``:`s`}`,`${e.maxRisk} risk`,`≤ ${e.maxFiles} files / ${e.maxLines} lines`,`≤ ${e.maxMergesPerRepoPerDay} merges/repo/day`],r=[`${t.minMerges} merges`,`${t.minHours} h`,t.minPostMergeGreenPct?`≥ ${t.minPostMergeGreenPct}% green`:null,`≤ ${t.maxRevertRatePct}% reverts`].filter(Boolean);return`${n.join(` · `)} — advances after ${r.join(`, `)}`}function Ft({draft:e}){let t=e.payload,n=Nt(t);return(0,Y.jsxs)(`div`,{className:B.scope,children:[(0,Y.jsxs)(`section`,{className:B.scopeBlock,"aria-label":`Expiry`,children:[(0,Y.jsx)(V,{children:`Expiry`}),(0,Y.jsxs)(`p`,{className:B.scopeLead,children:[n===null?`—`:`${n} days`,`, until `,Mt(t.expiresAt)]}),(0,Y.jsxs)(`p`,{className:B.scopeMeta,children:[`Signed by key `,(0,Y.jsx)(`span`,{className:B.mono,children:t.keyId}),` · sequence `,t.grantSeq,` · bound to this Mac`]})]}),(0,Y.jsxs)(`section`,{className:B.scopeBlock,"aria-label":`Repositories`,children:[(0,Y.jsxs)(V,{children:[`Repositories (`,t.repos.length,`)`]}),(0,Y.jsxs)(`table`,{className:B.scopeTable,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{scope:`col`,children:`Repo`}),(0,Y.jsx)(`th`,{scope:`col`,children:`Up to`}),(0,Y.jsx)(`th`,{scope:`col`,children:`Checks`}),(0,Y.jsx)(`th`,{scope:`col`,children:`Risk`}),(0,Y.jsx)(`th`,{scope:`col`,className:B.num,children:`Merges/day`})]})}),(0,Y.jsx)(`tbody`,{children:t.repos.map(e=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`td`,{className:B.mono,children:e.nameWithOwner}),(0,Y.jsx)(`td`,{children:e.stage===`merge`?`Merge`:`Propose`}),(0,Y.jsx)(`td`,{children:e.enforcement===`server`?`GitHub`:`Local only`}),(0,Y.jsx)(`td`,{children:e.maxRisk}),(0,Y.jsx)(`td`,{className:B.num,children:e.maxMergesPerDay})]},e.nameWithOwner))})]}),(0,Y.jsxs)(`p`,{className:B.scopeMeta,children:[`Every merge ≤ `,t.merge.maxFiles,` files / `,t.merge.maxLines,` lines · ashlr-hub itself: `,t.merge.selfRepo===`propose-only`?`propose only`:`merge outside authority code`]})]}),(0,Y.jsxs)(`section`,{className:B.scopeBlock,"aria-label":`Spend`,children:[(0,Y.jsx)(V,{children:`Spend`}),(0,Y.jsxs)(`p`,{className:B.scopeLead,children:[`Up to `,t.spend.maxMode===`all-in`?`All-in`:t.spend.maxMode===`balanced`?`Balanced`:`Reserve`,` · metered APIs $`,t.spend.meteredUsdPerDay,`/day`]}),(0,Y.jsx)(`ul`,{className:B.scopeList,children:Object.entries(t.spend.seats).map(([e,t])=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`span`,{className:B.mono,children:e}),t.enabled?`: keeps ${t.reserveFloorPercent}% for you`:`: not used by autonomy`,t.enabled&&t.maxSessionWindowPercent!==void 0?`, never above ${t.maxSessionWindowPercent}% of its 5-hour window`:``,t.enabled?` · ${t.roles.join(`, `)}`:``]},e))})]}),(0,Y.jsxs)(`section`,{className:B.scopeBlock,"aria-label":`Engines and Leader`,children:[(0,Y.jsx)(V,{children:`Engines and Leader`}),(0,Y.jsx)(`p`,{className:B.scopeLead,children:t.engines.join(`, `)||`none`}),(0,Y.jsxs)(`p`,{className:B.scopeMeta,children:[`Leader classes `,t.leader.classes.length?t.leader.classes.join(` + `):`none (proposes only)`,` · class-B veto window `,t.leader.vetoMinutes,` min · goal conductor `,t.conductorGoals?`on`:`off`]})]}),(0,Y.jsxs)(`section`,{className:B.scopeBlock,"aria-label":`Rollout ladder`,children:[(0,Y.jsxs)(V,{children:[`Rollout ladder (`,t.rollout.stages.length,` stages, advances by itself)`]}),(0,Y.jsx)(`ol`,{className:B.ladder,children:t.rollout.stages.map(e=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`span`,{className:B.ladderId,children:e.id}),(0,Y.jsx)(`span`,{children:Pt(e)})]},e.id))}),(0,Y.jsx)(`p`,{className:B.scopeMeta,children:`Any sandbox violation or reserve breach drops it back one stage. It can never climb past the last stage.`})]}),(0,Y.jsxs)(`p`,{className:B.scopeMeta,children:[`Draft digest `,(0,Y.jsxs)(`span`,{className:B.mono,children:[e.digest.slice(0,16),`…`]})]})]})}function It({open:e,intent:t,then:n,busy:r,why:i,onApprove:a,onClose:o}){let s=(0,W.useId)();return e?(0,Y.jsx)(Lt,{titleId:s,intent:t,then:n,busy:r,why:i,onApprove:a,onClose:o}):null}function Lt({titleId:e,intent:t,then:n,busy:r,why:i,onApprove:a,onClose:s}){let c=o($e,{freshMs:0}),l=c.data?.value??null,u=c.data?.reason??null;return(0,Y.jsx)(nt,{open:!0,onClose:s,titleId:e,width:600,title:t===`re-approve`?`Re-approve the standing grant`:`Approve a standing grant`,description:i,footer:(0,Y.jsxs)(`div`,{className:B.sheetFooter,children:[(0,Y.jsxs)(`p`,{className:B.sheetFootnote,children:[`Touch ID appears on this Mac. Lowering authority — Off, Stop, Revoke — never needs it.`,n?` After approval the switch moves to ${K[n]}.`:``]}),(0,Y.jsxs)(`span`,{className:B.sheetButtons,children:[(0,Y.jsx)(I,{variant:`ghost`,onClick:s,children:`Cancel`}),(0,Y.jsx)(I,{variant:`primary`,icon:(0,Y.jsx)(M,{}),disabled:!l,busy:r,onClick:()=>l&&a(l),children:`Approve with Touch ID`})]})]}),children:c.status===`loading`&&!c.data?(0,Y.jsx)(`p`,{className:B.muted,"aria-busy":`true`,children:`Preparing the grant draft…`}):l?(0,Y.jsx)(Ft,{draft:l}):(0,Y.jsx)(H,{tone:`unknown`,children:u??`The grant draft could not be read, so nothing can be approved from here.`})})}var Rt={"all-in":`All-in`,balanced:`Balanced`,reserve:`Reserve`};function zt(){let e=E(`fleet.stop`)?.guard?.confirm;return{title:e?.title??`Stop the fleet?`,body:e?.body??`Autonomous work halts within one tick and stays stopped until you resume it. Chats keep running.`,confirmLabel:e?.confirmLabel??`Stop fleet`,destructive:!0}}var Bt={title:`Resume the fleet?`,body:`Autonomy picks up at the switch position on its next tick. Stopping again is one click.`,confirmLabel:`Resume fleet`,destructive:!1};function Vt({tone:e}){return(0,Y.jsx)(`span`,{className:B.dot,"data-tone":e,"aria-hidden":`true`})}function Ht({read:e,loading:t,budgetMode:n,actions:r,compact:i,now:a}){let o=e?.value??null,[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(!1),p=!o,m=Et(o,a);function h(e){if(!o)return;let t=St(o,e);if(t!==`same`){if(t===`raise-needs-grant`){let t=o.grant.state===`paused`;c({intent:t?`re-approve`:`grant`,then:e,why:t?`${o.grant.reason??`The grant is paused.`} ${K[e]} needs it re-approved.`:`${K[e]} is beyond what the installed grant allows, so it needs a new grant.`});return}r.act(()=>z({action:`switch`,to:e}),`Switch autonomy to ${K[e]}`)}}function g(e){if(!s)return;let{then:t}=s,n=kt(e,s.intent);r.act(()=>z({action:n,draftDigest:e.digest}),n===`re-approve`?`Re-approve the standing grant`:`Sign a new standing grant`,{onDone:e=>{c(null),t&&e&&G[t]<=G[e.maxSwitchWithoutGrant]&&t!==e.switch&&r.act(()=>z({action:`switch`,to:t}),`Switch autonomy to ${K[t]}`)}})}let _=Ct(o||{switch:`off`,maxSwitchWithoutGrant:`off`}),v=o?.kill??!1,y=p||r.busy||r.readOnly,b=(0,Y.jsxs)(`div`,{className:B.switchWrap,title:p?e?.reason??`Reading autonomy state…`:void 0,children:[i?null:(0,Y.jsx)(`span`,{className:B.barLabel,"aria-hidden":`true`,children:`Autonomy`}),(0,Y.jsx)(le,{size:`sm`,"aria-label":`Autonomy`,value:o?.switch??`off`,onChange:h,options:_.map(e=>({value:e.value,label:(0,Y.jsxs)(`span`,{className:B.switchOption,children:[i?e.short:e.label,e.needsGrant?(0,Y.jsx)(M,{className:B.touchMark,width:12,height:12,"aria-hidden":`true`}):null]}),ariaLabel:e.ariaLabel,disabled:y}))})]}),x=()=>r.act(()=>z({action:`stop`}),`Stop the fleet`,{confirm:zt(),onDone:e=>u(At(e))}),S=()=>r.act(()=>z({action:`clear-stop`}),`Resume the fleet`,{confirm:Bt,onDone:()=>u(null)}),C=v?i?(0,Y.jsx)(I,{variant:`subtle`,size:`sm`,icon:(0,Y.jsx)(te,{}),iconOnly:!0,"aria-label":`Resume the fleet`,disabled:y,onClick:S}):(0,Y.jsx)(I,{variant:`subtle`,size:`sm`,icon:(0,Y.jsx)(te,{}),disabled:y,onClick:S,children:`Resume`}):i?(0,Y.jsx)(I,{variant:`danger`,size:`sm`,icon:(0,Y.jsx)(j,{}),iconOnly:!0,"aria-label":`Stop the fleet`,disabled:y,onClick:x}):(0,Y.jsx)(I,{variant:`danger`,size:`sm`,icon:(0,Y.jsx)(j,{}),disabled:y,onClick:x,children:`Stop`});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:B.bar,role:`toolbar`,"aria-label":`Autonomy controls`,"data-loading":t||void 0,children:[b,i?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ut,{mode:n,onOpen:()=>f(!0)}),(0,Y.jsx)(Wt,{chip:m,onOpen:e=>c({intent:e,then:null,why:m.detail})})]}),(0,Y.jsx)(`span`,{className:B.barSpacer}),C]}),v&&l?(0,Y.jsx)(`p`,{className:B.muted,role:`status`,children:l}):null,i?(0,Y.jsxs)(`div`,{className:B.barSecondary,children:[(0,Y.jsx)(Ut,{mode:n,onOpen:()=>f(!0)}),(0,Y.jsx)(Wt,{chip:m,onOpen:e=>c({intent:e,then:null,why:m.detail})})]}):null,(0,Y.jsx)(It,{open:s!==null,intent:s?.intent??`grant`,then:s?.then??null,why:s?.why??``,busy:r.busy,onApprove:g,onClose:()=>c(null)}),(0,Y.jsx)(Gt,{open:d,onClose:()=>f(!1),status:o})]})}function Ut({mode:e,onOpen:t}){return(0,Y.jsxs)(`button`,{type:`button`,className:B.pill,"aria-haspopup":`dialog`,onClick:t,children:[(0,Y.jsx)(`span`,{className:B.pillLabel,children:`Budget`}),(0,Y.jsx)(`span`,{children:e?Rt[e]:`—`}),(0,Y.jsx)(ne,{width:14,height:14,"aria-hidden":`true`})]})}function Wt({chip:e,onOpen:t}){let n=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Vt,{tone:e.tone}),(0,Y.jsx)(`span`,{className:B.pillLabel,children:`Grant`}),(0,Y.jsx)(`span`,{children:e.label})]});if(!e.action)return(0,Y.jsx)(`span`,{className:B.chip,"data-tone":e.tone,title:e.detail,"aria-label":`Grant: ${e.label}. ${e.detail}`,role:`status`,children:n});let r=e.action;return(0,Y.jsx)(`button`,{type:`button`,className:B.chip,"data-tone":e.tone,title:e.detail,"aria-haspopup":`dialog`,onClick:()=>t(r),"aria-label":`Grant: ${e.label}. ${e.detail}`,children:n})}function Gt({open:e,onClose:t,status:n}){let r=n?.grant.state===`active`?n.grant.maxMode:null;return(0,Y.jsx)(nt,{open:e,onClose:t,titleId:`command-budget-sheet`,width:560,title:`Budget`,description:r?`Your grant allows up to ${Rt[r]}. Autonomy never spends past it, whatever is selected here — moving toward Reserve is always instant.`:`No active grant: autonomy only proposes. The budget still decides which seats it would use.`,children:e?(0,Y.jsx)(be,{maxMode:r}):null})}function Kt(e,t){if(!e.resetsAt)return null;let n=Date.parse(e.resetsAt);return Number.isFinite(n)?n-t:null}function qt(e,t,n){let r=t.id;if(e===`claude`){if(r===`five_hour`)return`session`;if(r===`seven_day`)return`weekly`;if(r.startsWith(`seven_day_`))return`model`}if(e===`grok`)return`weekly`;let i=Kt(t,n);if(e===`codex`){if(r.endsWith(`_secondary`))return`weekly`;if(r.endsWith(`_primary`))return i!==null&&i>189e5?`weekly`:`session`}return i!==null&&i<=189e5?`session`:`weekly`}var Jt=864e5,Yt=36e5;function X(e,t,n,r=0){let i=e.length-r,a=i-n;if(a<0||n<=0)return null;let o=0;for(let n=a;n<i;n++){let r=t(e[n]);if(r===null||!Number.isFinite(r))return null;o+=r}return o}function Xt(e,t,n){return e.slice(Math.max(0,e.length-n)).map(t)}function Zt(e){let t=e.filter(e=>e!==null&&Number.isFinite(e));return t.length?t.reduce((e,t)=>e+t,0)/t.length:null}function Qt(e){let t=e.meteredCostUsd;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:null}function $t(e){if(!e)return null;let t=new Map(e.seatInfo.map(e=>[e.seatId,e])),n=[];for(let r of e.headroom){let e=t.get(r.seatId);if(!e||e.free)continue;let i=r.bindingWindow===`session`?r.sessionUsedPercent:r.bindingWindow===`weekly`?r.weeklyUsedPercent:null;n.push(`${e.label} ${i===null||!Number.isFinite(i)?`—`:oe(i)}`)}return n.length?`${n.join(` · `)} of window used`:null}var en=e=>e>0?`+${e}`:String(e),Z=e=>`${e>0?`+`:``}${e.toFixed(1)}`,tn=e=>`${e>0?`+`:e<0?`−`:``}$${Math.abs(e).toFixed(2)}`;function nn(e){if(e===null||!Number.isFinite(e)||e<0)return`—`;let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.floor(t/60);if(n<48)return t%60?`${n}h ${t%60}m`:`${n}h`;let r=Math.floor(n/24);return n%24?`${r}d ${n%24}h`:`${r}d`}function rn(e){if(!e||e.repos.length===0)return[];let t=Math.max(...e.repos.map(e=>e.greenTrend.length));return Array.from({length:t},(n,r)=>Zt(e.repos.map(e=>e.greenTrend[r-(t-e.greenTrend.length)]??null)))}function an({fleet:e,history:t,learning:n,policy:r,budget:i}){let a=t?.days??[],o=e=>e.merges.realized,s=Qt,c=e?.summary.merged7d??X(a,o,7),l=X(a,o,7,7),u=X(a,o,7),d=u!==null&&l!==null?u-l:null,f=e?.summary.postMergeGreenPct7d??null,p=rn(e),m=p.length>=14?Zt(p.slice(-7)):null,h=p.length>=14?Zt(p.slice(-14,-7)):null,g=m!==null&&h!==null?m-h:null,_=X(a,s,7),v=X(a,s,7,7),y=r?r.spend.meteredUsdPerDay:null,b=_===null?`—`:`$${_.toFixed(2)}${y===null?``:` / $${(y*7).toFixed(0)}`}`,x=a.some(e=>Qt(e)!==null),S=y===null?null:y===0?`metered APIs off ($0 cap)`:`cap $${y}/day`,C=$t(i),ee=[S,x?null:`metered split not reported yet`,C?`subscriptions: ${C}`:`subscriptions are window usage, not dollars — see seat capacity`].filter(Boolean).join(` · `),w=n?.active??null,T=(w?.experimentId?n?.experiments.find(e=>e.id===w.experimentId)??null:null)?.lift??null;return[{id:`merged`,label:`Merged · 7d`,value:c===null?`—`:String(c),delta:d===null?null:{value:d,unit:Math.abs(d)===1?`merge`:`merges`,versus:`vs prior 7d`,goodWhenPositive:!0,format:en},trend:a.length?Xt(a,o,14):void 0,trendLabel:`Merges per day, last 14 days`,caption:e?.summary.mergedToday==null?`fleet merges on default branches`:`${e.summary.mergedToday} today`},{id:`green`,label:`Post-merge green`,value:f===null?`—`:`${Math.round(f)}%`,delta:g===null?null:{value:g,unit:`pts`,versus:`vs prior 7d`,goodWhenPositive:!0,format:Z},trend:p.length?p:void 0,trendLabel:`Post-merge green percent per day`,caption:f===null?`no completed post-merge watch yet`:`CI + suite 2 h after each merge`},{id:`cycle`,label:`Cycle time`,value:nn(e?.summary.cycleTimeP50Ms7d??null),delta:null,trend:void 0,trendLabel:`Cycle time`,caption:`median, proposal → merge, 7d`},{id:`spend`,label:`Metered spend · 7d`,value:b,delta:_!==null&&v!==null?{value:_-v,versus:`vs prior 7d`,goodWhenPositive:!1,format:tn}:null,trend:x?Xt(a,s,14):void 0,trendLabel:`Metered (per-token API) spend per day`,caption:ee},{id:`lift`,label:`Lift`,value:T?`${Z(T.mean)} pts`:`—`,delta:null,trend:void 0,trendLabel:`Harness lift`,caption:w?`harness ${w.id} vs baseline${T?` (95% ${Z(T.ciLow)} to ${Z(T.ciHigh)})`:``}`:`no harness adopted — defaults in force`}]}var on=(e,t)=>e!==null&&Date.parse(e)>t;function sn({lastLookedAt:e,fleet:t,leader:n,activity:r}){if(!e)return[];let i=Date.parse(e);if(!Number.isFinite(i))return[];let a=[],o=(t?.runs??[]).filter(e=>on(e.endedAt,i)),s=e=>o.filter(t=>t.outcome===e).length,c=s(`merged`),l=s(`reverted`),u=s(`failed`)+s(`refused`);c&&a.push({id:`merged`,text:`${c} merged`,tone:`success`}),l&&a.push({id:`reverted`,text:`${l} reverted`,tone:`danger`}),u&&a.push({id:`failed`,text:`${u} refused or failed`,tone:`warning`});let d=(n?.timeline??[]).filter(e=>Date.parse(e.at)>i&&e.status===`ok`).length;d&&a.push({id:`memos`,text:`${d} new memo${d===1?``:`s`}`,tone:`info`});let f=(r?.needsYou??[]).filter(e=>Date.parse(e.since)>i).length;return f&&a.push({id:`needs`,text:`${f} new for you`,tone:`warning`}),a}var cn={high:0,warn:1,info:2};function ln(e){return[...e].sort((e,t)=>cn[e.severity]-cn[t.severity]||Date.parse(t.since)-Date.parse(e.since))}function un(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&typeof t==`string`&&t.trim().length>0&&n.set(e,t.trim())};for(let e of t?.seatInfo??[])r(e.seatId,e.label);for(let t of e??[])r(t.id,t.label);return n}function dn(e){return e?Object.entries(e.sources).filter(([,e])=>e!==`ok`).map(([e])=>e):[]}function fn(e,t){return`${e}#${t}`}var pn=20;function mn(e,t){let n=e.length;return n>=2&&e[n-1].used===t&&e[n-2].used===t}function hn(e,t){if(!t)return{...e};let n=Date.parse(t.sampledAt);if(!Number.isFinite(n))return{...e};let r={...e};for(let e of t.headroom){let t=[[`session`,e.sessionUsedPercent],[`weekly`,e.weeklyUsedPercent]];for(let[i,a]of t){if(a===null||!Number.isFinite(a))continue;let t=fn(e.seatId,i),o=r[t]??[];if(o.length&&o[o.length-1].t>=n)continue;let s=o.length&&a+pn<o[o.length-1].used?[]:o;r[t]=[...mn(s,a)?s.slice(0,-1):s,{t:n,used:a}].slice(-240)}}return r}function gn(e,t){let n=typeof t?.generatedAt==`string`?Date.parse(t.generatedAt):NaN,r=new Map;for(let e of Array.isArray(t?.series)?t.series:[]){if(!e||typeof e.seatId!=`string`||e.window!==`session`&&e.window!==`weekly`||!Array.isArray(e.points))continue;let t=[];for(let n of e.points){if(!Array.isArray(n))continue;let[e,r]=n;typeof e==`number`&&Number.isFinite(e)&&typeof r==`number`&&Number.isFinite(r)&&r>=0&&r<=100&&t.push({t:e,used:r})}if(t.length===0)continue;let n=fn(e.seatId,e.window);r.set(n,[...r.get(n)??[],...t])}let i={},a=new Set;for(let t of new Set([...Object.keys(e),...r.keys()])){let o=r.get(t)??[],s=e[t]??[];if(o.length>0){a.add(t);let e=Math.max(...o.map(e=>e.t)),r=Number.isFinite(n)?Math.max(n,e):e;s=s.filter(e=>e.t>r)}let c=new Map;for(let e of o)c.set(e.t,e);for(let e of s)c.set(e.t,e);let l=[...c.values()].sort((e,t)=>e.t-t.t),u=0;for(let e=1;e<l.length;e++)l[e].used+pn<l[e-1].used&&(u=e);let d=[];for(let e of l.slice(u))mn(d,e.used)&&d.pop(),d.push(e);i[t]=d.slice(-2e3)}return{readings:i,recorded:a}}var _n={session:5*Yt,weekly:7*Jt};function vn(e,t){if(!t||e.bindingWindow===null)return null;let n=100-t.reservePercent,r=t.maxSessionWindowPercent??100,i,a;e.bindingWindow===`weekly`||e.weeklyUsedPercent===null&&n<r?(i=n,a=`Reserved for you`):(i=r,a=`5-hour ceiling`);let o=100-i;return o>0?{value:o,label:a}:null}function yn(e){let t=e===`session`?{weekday:`short`,hour:`numeric`,minute:`2-digit`}:{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`};return e=>{let n=new Date(e);return Number.isNaN(n.getTime())?``:n.toLocaleString(`en-US`,t)}}function bn(e,t,n,r){if(!e?.capacity||n===null||t===`local`)return null;for(let i of e.capacity.windows){let e=typeof i.resetDescription==`string`?i.resetDescription.trim():``;if(e.length!==0&&qt(t,{id:i.id,usedPercent:i.usedPercent,resetsAt:i.resetsAt,resetDescription:i.resetDescription,limitReached:i.limitReached},r)===n)return e}return null}function xn(e){return`resets ${e.replace(/^resets\s+/i,``)}`}var Sn=[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`aug`,`sep`,`oct`,`nov`,`dec`],Cn=/^(?:resets\s+)?(?:([A-Za-z]{3}) ([1-9]|[12]\d|3[01]) at )?([1-9]|1[0-2])(?::([0-5]\d))?(am|pm) \(([A-Za-z0-9_+-]+(?:\/[A-Za-z0-9_+-]+){0,2})\)$/i;function wn(e,t){let n=t.formatToParts(new Date(e)),r=e=>Number(n.find(t=>t.type===e)?.value),i={y:r(`year`),mo:r(`month`)-1,d:r(`day`),h:r(`hour`)%24,mi:r(`minute`)};return Object.values(i).every(Number.isFinite)?i:null}var Tn=e=>Date.UTC(e.y,e.mo,e.d,e.h,e.mi);function En(e,t){let n=Tn(e),r=n;for(let e=0;e<3;e++){let e=wn(r,t);if(!e)return null;let i=n-Tn(e);if(i===0)return r;r+=i}return null}function Dn(e,t){let n=Cn.exec(e.trim());if(!n||!Number.isFinite(t))return null;let[,r,i,a,o,s,c]=n,l;try{l=new Intl.DateTimeFormat(`en-US`,{timeZone:c,hourCycle:`h23`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`})}catch{return null}let u=wn(t,l);if(!u)return null;let d=Number(a)%12+(s.toLowerCase()===`pm`?12:0),f=o===void 0?0:Number(o),p=[];if(r!==void 0){let e=Sn.indexOf(r.toLowerCase()),t=Number(i);if(e<0)return null;for(let n of[u.y-1,u.y,u.y+1])new Date(Date.UTC(n,e,t)).getUTCDate()===t&&p.push({y:n,mo:e,d:t,h:d,mi:f})}else for(let e of[-1,0,1]){let t=new Date(Date.UTC(u.y,u.mo,u.d+e));p.push({y:t.getUTCFullYear(),mo:t.getUTCMonth(),d:t.getUTCDate(),h:d,mi:f})}let m=null;for(let e of p){let n=En(e,l);n!==null&&(m===null||Math.abs(n-t)<Math.abs(m-t))&&(m=n)}return m}var On=9e5,kn=Date.UTC(2e3,0,1);function An(e,t,n,r){let i=e?Date.parse(e):NaN;if(Number.isFinite(i)&&i>=kn)return{at:i,from:`provider`};if(t===null||n===null)return null;let a=Dn(t,r);return a===null||a<r-On||a>r+n+On?null:{at:a,from:`words`}}function jn(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.trim().length>0).map(mt):[]}var Mn=6e4,Nn=new Set([`reserve`,`session-ceiling`]);function Pn(e){return typeof e==`string`?e.trim().replace(/^resets\s+/i,``):``}function Fn(e){for(let t of e){if(!Nn.has(t.kind))continue;let e=Pn(t.resetDescription);if(e)return e}return null}function In(e,t,n){let r=typeof e.resetsAt==`string`?Date.parse(e.resetsAt):NaN;if(Number.isFinite(r))return t.resetAt!==null&&Math.abs(r-t.resetAt)<=Mn?null:fe(e.resetsAt,n);let i=Pn(e.resetDescription);return!i||t.resetText!==null&&Pn(t.resetText).toLowerCase()===i.toLowerCase()?null:i}function Ln(e,t,n){if(!e)return null;let r=ft(ut(e.text,n));if(!r)return null;let i=In(e,t,n);return i?`${r} Resets ${i}.`:r}function Rn(e,t,n,r){if(!e)return[];let i=new Map(e.seatInfo.map(e=>[e.seatId,e])),a=new Map((n??[]).map(e=>[e.id,e])),o=Date.parse(e.sampledAt),s=Number.isFinite(o)?o:Date.now();return e.headroom.map(n=>{let o=i.get(n.seatId),c=o?.engine??`local`,l=n.bindingWindow?_n[n.bindingWindow]:null,u=jn(n.reasons),d=bn(a.get(n.seatId),c,n.bindingWindow,s)??(n.bindingWindow===null||c===`local`?null:Fn(u)),f=l===null?null:An(n.resetAt,d,l,s),p=f&&l!==null?f.at-l:null,m=n.bindingWindow?fn(n.seatId,n.bindingWindow):null,h=m?t[m]??[]:[];return{seatId:n.seatId,label:o?.label??n.seatId,engine:c,window:n.bindingWindow,points:h.filter(e=>p===null||e.t>=p).map(e=>({t:e.t,remaining:Math.max(0,100-e.used)})),start:p,resetAt:f?.at??null,resetFrom:f?.from??null,resetText:d,reservePercent:e.effective[n.seatId]?.reservePercent??0,line:vn(n,e.effective[n.seatId]),enabled:e.effective[n.seatId]?.enabled??!1,free:o?.free??!1,eligible:n.eligibleForAutonomy,reason:Ln(u[0],{resetAt:f?.at??null,resetText:d},s),recorded:m!==null&&(r?.has(m)??!1)}}).sort((e,t)=>Number(e.free)-Number(t.free)||e.label.localeCompare(t.label))}function zn(e){if(!e)return null;let t=e.seatInfo.find(e=>e.engine===`claude`);if(!t)return null;let n=e.effective[t.seatId];return n?{label:`Claude`,percent:n.reservePercent}:null}function Bn({kpis:e}){return(0,Y.jsx)(`div`,{className:B.kpis,role:`group`,"aria-label":`Key numbers`,children:e.map(e=>(0,Y.jsx)(w,{label:e.label,value:e.value,delta:e.delta,trend:e.trend,trendLabel:e.trendLabel,caption:e.caption},e.id))})}var Vn=3e4,Hn={high:`Urgent`,warn:`Soon`,info:`FYI`},Un={approvals:`approvals`,authority:`authority`,fleet:`fleet`,leader:`Leader`,chats:`chats`,accounts:`accounts`};function Wn(e,t){if(t.confirm)return{...t.confirm,destructive:t.destructive};if(t.kind===`approve`||t.kind===`reject`||t.kind===`veto`)return{title:`${t.kind===`approve`?`Approve`:t.kind===`reject`?`Reject`:`Veto`}?`,body:gt(e).text,confirmLabel:t.label,destructive:t.destructive}}function Gn(e){let t=e.target;switch(t.kind){case`url`:return/^https:\/\//.test(t.url)?{label:`Open`,href:t.url}:null;case`section`:return{label:`Show`,onOpen:()=>ie(t.section,t.anchor)};case`session`:return{label:`Open chat`,onOpen:()=>se(t.sessionId)};case`approval`:case`seat`:return{label:`Open`,onOpen:()=>ce(e.id)};default:return null}}function Kn(e){return e===null?null:e.replace(/(^|· )(Partial )?([a-z][\w-]*) run$/,(e,t,n,r)=>{let i=pe(r)?me[r]:`${r.charAt(0).toUpperCase()}${r.slice(1)}`;return`${t}${n??``}${i} run`})}function qn({item:e,view:t,seatNames:n}){let r=e.subject,i=[];if(t.repo&&i.push((0,Y.jsx)(`span`,{className:B.needsRepo,title:t.repoFull,children:t.repo},`repo`)),r.pr&&i.push((0,Y.jsxs)(`span`,{children:[`#`,r.pr]},`pr`)),r.seatId){let e=n?.get(r.seatId)??r.seatId;i.push((0,Y.jsx)(`span`,{title:e===r.seatId?void 0:r.seatId,children:e},`seat`))}return i.push((0,Y.jsx)(`span`,{title:t.ageStamp,children:t.age},`age`)),(0,Y.jsx)(`span`,{className:B.needsMeta,children:i.map((e,t)=>(0,Y.jsxs)(W.Fragment,{children:[t>0?(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}):null,e]},e.key))})}function Jn({item:e,actions:t,now:n,seatNames:r}){let i=Gn(e),a=e.actions.filter(e=>e.request!==null),o=vt(e,n),s=Kn(o.kindLabel);return(0,Y.jsxs)(`li`,{className:B.needsRow,"data-severity":e.severity,id:ae(e.id),children:[(0,Y.jsx)(`span`,{className:B.sevDot,"data-severity":e.severity,"aria-hidden":`true`}),(0,Y.jsxs)(`div`,{className:B.needsText,children:[s?(0,Y.jsx)(`span`,{className:B.needsKind,children:s}):null,(0,Y.jsxs)(`span`,{className:B.needsTitle,title:o.fullTitle,children:[(0,Y.jsxs)(`span`,{className:`visually-hidden`,children:[Hn[e.severity],`: `]}),o.title]}),o.run?(0,Y.jsx)(_t,{run:o.run}):null,o.detail?(0,Y.jsx)(`span`,{className:B.needsDetail,children:o.detail}):null,(0,Y.jsx)(qn,{item:e,view:o,seatNames:r})]}),(0,Y.jsxs)(`div`,{className:B.needsActions,children:[a.map(n=>(0,Y.jsx)(I,{size:`sm`,variant:n.destructive?`danger`:n.kind===`approve`?`primary`:`subtle`,disabled:t.busy||t.readOnly,onClick:()=>t.act(()=>et(n.request.path,n.request.body),`${n.label}: ${o.title}`,{confirm:Wn(e,n)}),children:n.label},n.kind)),i?i.href?(0,Y.jsxs)(`a`,{className:B.linkButton,href:i.href,target:`_blank`,rel:`noopener noreferrer`,children:[i.label,(0,Y.jsx)(re,{width:12,height:12,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`visually-hidden`,children:` (opens in a new tab)`})]}):(0,Y.jsx)(`button`,{type:`button`,className:B.linkButton,onClick:i.onOpen,children:i.label}):null]})]})}function Yn(e){return e.status===`unavailable`?{activity:null,loading:!1,reason:`The Needs-you inbox is not in this build yet, so this card has no source.`,stale:!1}:e.data?{activity:e.data,loading:!1,reason:null,stale:e.status===`stale`}:{activity:null,loading:!0,reason:null,stale:!1}}function Xn({state:e,actions:t,fleetLine:n,seatNames:r}){let{activity:i,loading:a,reason:o,stale:s}=Yn(e),c=Ge(Vn),l=i?ln(i.needsYou):[],u=dn(i),d=l.slice(0,5),f=i?i.needsYou.length:null;return(0,Y.jsx)(lt,{title:f===null?`Needs you`:`Needs you (${f})`,caption:f===null||f===0?void 0:`Most urgent first`,tone:f?`attention`:void 0,actions:(0,Y.jsxs)(`button`,{type:`button`,className:B.linkButton,onClick:()=>ce(),"aria-keyshortcuts":`Meta+J`,children:[`Open all `,(0,Y.jsx)(`kbd`,{className:B.kbd,children:`⌘J`})]}),children:a?(0,Y.jsx)(`p`,{className:B.muted,"aria-busy":`true`,children:`Reading the inbox…`}):i?d.length===0?u.length||s?(0,Y.jsx)(H,{tone:`unknown`,children:u.length?`Nothing to show, but ${u.map(e=>Un[e]??e).join(`, `)} ${u.length===1?`is`:`are`} not answering — this is not an all-clear.`:`Nothing to show, but the last refresh failed — this is not an all-clear.`}):(0,Y.jsxs)(`div`,{className:B.allClear,role:`status`,children:[(0,Y.jsx)(`span`,{className:B.allClearTitle,children:`All clear`}),(0,Y.jsx)(`span`,{className:B.allClearBody,children:n})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`ul`,{className:B.needsList,children:d.map(e=>(0,Y.jsx)(Jn,{item:e,actions:t,now:c,seatNames:r},e.id))}),l.length>d.length?(0,Y.jsxs)(`button`,{type:`button`,className:B.moreLink,onClick:()=>ce(),children:[l.length-d.length,` more in the drawer`]}):null,u.length?(0,Y.jsxs)(`p`,{className:B.muted,children:[u.map(e=>Un[e]??e).join(`, `),` not answering — the list may be incomplete.`]}):null,s?(0,Y.jsx)(`p`,{className:B.muted,children:`The last refresh failed; showing the previous list.`}):null]}):(0,Y.jsxs)(H,{tone:`unknown`,children:[o??`The Needs-you inbox did not answer.`,` Nothing is shown rather than a false all-clear.`]})})}var Zn={session:`5-hour`,weekly:`weekly`};function Qn(){return(0,Y.jsx)(`svg`,{width:`1.6em`,height:`0.8em`,viewBox:`0 0 24 12`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,strokeLinecap:`round`,focusable:`false`,"aria-hidden":`true`,children:(0,Y.jsx)(`path`,{d:`M6 2.5a3.5 3.5 0 1 0 0 7c2.5 0 3.5-2 6-3.5s3.5-3.5 6-3.5a3.5 3.5 0 1 1 0 7c-2.5 0-3.5-2-6-3.5S8.5 2.5 6 2.5Z`})})}var $n=16,er=14,tr=160,Q=e=>`${Math.round(e)}%`,nr=h(0,100,4),rr=.05,ir=`Readings since Verse opened — the line fills in as it watches this seat.`;function ar(e,t,n){return e.recorded&&t!==null?`No reading was recorded in this window before ${n(t)}.`:ir}function or({title:e,description:t,caveat:n,points:r,from:i,to:a,line:o,width:s,formatTime:c,ariaLabel:l}){let u=(0,W.useRef)(null),d=x(u,s),h=r.filter(e=>e.t>=i&&e.t<=a).sort((e,t)=>e.t-t.t),ee=S(),w=m(nr.map(e=>Q(e)),28,56,ee),T=Math.max(40,d-w-er),E=f(i,a,w,w+T),D=f(0,100,134,$n),O=e=>D(Math.min(100,Math.max(0,e))),k=g(h.map(e=>({x:e.t,y:e.remaining}))).map(e=>e.map(e=>({x:E(e.x),y:O(e.y)}))),A=[...h].reverse().find(e=>e.remaining!==null)??null;return(0,Y.jsx)(y,{title:e,description:t,caveat:n,status:A?{kind:`ready`}:{kind:`empty`,message:`No reading inside this window.`},table:(0,Y.jsx)(v,{caption:e,columns:[{key:`t`,label:`When`,render:e=>c(e.t)},{key:`r`,label:`Remaining`,numeric:!0,render:e=>e.remaining===null?`—`:Q(e.remaining)}],rows:h,rowKey:e=>String(e.t)}),children:(0,Y.jsx)(`div`,{ref:u,className:_.plotWrap,children:(0,Y.jsxs)(`svg`,{className:_.svg,width:d,height:tr,viewBox:`0 0 ${d} ${tr}`,role:`img`,"aria-label":l,children:[nr.map(e=>(0,Y.jsxs)(`g`,{children:[(0,Y.jsx)(`line`,{className:_.grid,x1:w,x2:w+T,y1:D(e),y2:D(e)}),(0,Y.jsx)(`text`,{className:_.tick,x:w-6,y:D(e),dy:`0.32em`,textAnchor:`end`,children:Q(e)})]},e)),(0,Y.jsx)(`line`,{className:_.axis,x1:w,x2:w+T,y1:D(0),y2:D(0)}),(0,Y.jsx)(`text`,{className:_.tick,x:w,y:152,textAnchor:`start`,children:c(i)}),(0,Y.jsx)(`text`,{className:_.tick,x:w+T,y:152,textAnchor:`end`,children:`Now`}),o?(0,Y.jsxs)(`g`,{"data-role":`reserve`,children:[(0,Y.jsx)(`line`,{className:_.reference,x1:w,x2:w+T,y1:D(o.value),y2:D(o.value)}),(0,Y.jsxs)(`text`,{"data-role":`reserve-label`,className:`${_.tick} ${_.halo}`,x:w+4,y:D(o.value)-5,textAnchor:`start`,children:[o.label,` · `,Q(o.value)]})]}):null,k.map((e,t)=>(0,Y.jsxs)(`g`,{"data-role":`remaining`,children:[(0,Y.jsx)(`path`,{className:_.wash,fill:C,d:b(e,e.map(e=>({x:e.x,y:D(0)})))}),(0,Y.jsx)(`path`,{className:_.line,stroke:C,d:p(e)})]},t)),A&&A.remaining!==null?(0,Y.jsx)(`circle`,{className:_.marker,cx:E(A.t),cy:O(A.remaining),r:4,fill:C}):null]})})})}function sr({burn:e,now:t,width:n}){if(e.free)return(0,Y.jsxs)(`section`,{className:B.freeSeat,"aria-label":`${e.label}: free local seat`,children:[(0,Y.jsxs)(`span`,{className:B.freeHead,children:[(0,Y.jsx)(he,{engine:e.engine}),(0,Y.jsx)(`span`,{className:B.freeTitle,children:e.label})]}),(0,Y.jsx)(`span`,{className:B.freeValue,children:(0,Y.jsx)(Qn,{})}),(0,Y.jsxs)(`span`,{className:B.freeBody,children:[`Local — free, no provider window. `,e.eligible?`Takes autonomous work.`:e.reason??``]})]});let r=`${e.label}${e.window?` · ${Zn[e.window]}`:``}`,i=ue(e.enabled?e.eligible?`Autonomy may use it now`:e.reason??`Held back from autonomy`:`Not used by autonomy`),a=[...e.points].reverse().find(e=>e.remaining!==null)?.remaining??null,o=(0,Y.jsxs)(`section`,{className:B.freeSeat,"aria-label":r,children:[(0,Y.jsxs)(`span`,{className:B.freeHead,children:[(0,Y.jsx)(he,{engine:e.engine}),(0,Y.jsx)(`span`,{className:B.freeTitle,children:e.label})]}),(0,Y.jsx)(H,{tone:`unknown`,children:`No window reading — unknown usage is never treated as headroom.`})]});if(e.window===null)return o;let s=_n[e.window],c=yn(e.window),l=e.resetText?xn(e.resetText):null,u=e.points.filter(e=>e.remaining!==null),d=u.length?Math.min(...u.map(e=>e.t)):null,f=e=>u.length<2||d===null||d-e>rr*s;if(e.resetAt===null||e.start===null){if(a===null)return o;let p=Math.max(...u.map(e=>e.t)),m=Math.max(t,p),h=m-s,g=l??`reset time not reported`,_=l?`The provider's reset words could not be placed on a clock`:`No reset time was reported for this window`;return(0,Y.jsx)(or,{title:r,description:`${Q(a)} left · ${g} · ${i}`,caveat:`${_}, so nothing is projected to a reset.${f(h)?` ${ar(e,d,c)}`:``}`,points:e.points,from:h,to:m,line:e.line,width:n,formatTime:c,ariaLabel:`${r}: ${Q(a)} left, ${g}. ${ft(i)}`})}let p=e.resetFrom===`words`&&l!==null?`${a===null?``:`${Q(a)} left · `}${l} · ${i}`:i;return(0,Y.jsx)(T,{title:r,description:p,caveat:f(e.start)?ar(e,d,c):void 0,status:e.points.length===0?{kind:`empty`,message:`No reading yet in this window.`}:void 0,points:e.points,capacity:100,start:e.start,resetAt:e.resetAt,now:t,reserve:e.line??void 0,height:tr,width:n,formatValue:Q,formatTime:c})}function cr({burns:e,now:t,compact:n}){return e.length===0?(0,Y.jsx)(H,{tone:`unknown`,children:`Seat capacity is not available — the budget route did not answer.`}):(0,Y.jsx)(`div`,{className:n?B.burnStrip:B.burnGrid,role:`group`,"aria-label":`Capacity per seat`,children:e.map(e=>(0,Y.jsx)(`div`,{className:B.burnItem,children:(0,Y.jsx)(sr,{burn:e,now:t,width:n?300:void 0})},e.seatId))})}var lr=new Intl.NumberFormat(`en-US`);function ur({open:e,onClose:t,actions:n,estimatePerSessionUsd:i,onLaunched:a,defaultRepo:o=Me}){let s=(0,W.useId)(),l=(0,W.useId)(),u=(0,W.useId)(),d=(0,W.useRef)(null),[f,p]=(0,W.useState)({repo:o,baseBranch:``,prompt:``}),[m,h]=(0,W.useState)({}),[g,_]=(0,W.useState)(null);(0,W.useEffect)(()=>{e&&(h({}),_(null))},[e]);let v=e=>{_(null),p(t=>({...t,...e})),h(t=>{let n={...t};for(let t of Object.keys(e))delete n[t];return n})},y=e=>{e.preventDefault();let i=Ce(f);if(!i.ok){h(i.errors);return}h({}),_(null),n.act(async()=>{try{let e=await ze({...i.request,origin:`operator`});p(e=>({...e,prompt:``})),a(e.task),t()}catch(e){if(e instanceof r)throw e;_(Ke(e))}},`Launch a Claude Code cloud session with this task.`)},b=f.prompt.trim().length;return(0,Y.jsx)(c,{open:e,onClose:t,titleId:s,title:`New cloud task`,description:`Runs as a Claude Code cloud session on your Claude account. It delivers a draft PR; nothing merges on its own.`,widthClassName:R.dialogWidth,initialFocusRef:d,children:(0,Y.jsxs)(`form`,{className:R.form,onSubmit:y,noValidate:!0,children:[(0,Y.jsxs)(`div`,{className:R.fieldGrid,children:[(0,Y.jsx)(tt,{label:`Repository`,hint:`GitHub owner/name`,mono:!0,value:f.repo,error:m.repo,autoComplete:`off`,spellCheck:!1,onChange:e=>v({repo:e.target.value})}),(0,Y.jsx)(tt,{label:`Base branch`,hint:`Must be pushed. Empty uses the default branch.`,mono:!0,value:f.baseBranch,placeholder:`default branch`,error:m.baseBranch,autoComplete:`off`,spellCheck:!1,onChange:e=>v({baseBranch:e.target.value})})]}),(0,Y.jsxs)(`div`,{className:R.textareaField,children:[(0,Y.jsx)(`label`,{className:R.label,htmlFor:l,children:`Task`}),(0,Y.jsx)(`textarea`,{ref:d,id:l,className:R.textarea,value:f.prompt,placeholder:`What should the cloud session do? It reads the repo's own guidance and opens a draft PR.`,"aria-invalid":m.prompt?!0:void 0,"aria-describedby":m.prompt?u:void 0,onChange:e=>v({prompt:e.target.value})}),m.prompt?(0,Y.jsx)(`p`,{id:u,className:R.fieldError,role:`alert`,children:m.prompt}):null,(0,Y.jsxs)(`p`,{className:R.muted,children:[lr.format(b),` of `,lr.format(xe),` characters`,i===null?``:` · estimated at ${Pe(i)} per session`]})]}),g?(0,Y.jsx)(`p`,{className:R.notice,"data-tone":`danger`,role:`alert`,children:g}):null,(0,Y.jsxs)(`div`,{className:R.formActions,children:[(0,Y.jsx)(I,{variant:`ghost`,onClick:t,disabled:n.busy,children:`Cancel`}),(0,Y.jsx)(I,{type:`submit`,variant:`primary`,busy:n.busy,children:`Launch`})]})]})})}function dr({href:e,children:t,label:n}){return(0,Y.jsxs)(`a`,{className:R.link,href:e,target:`_blank`,rel:`noreferrer noopener`,"aria-label":n,children:[t,` `,(0,Y.jsx)(re,{width:12,height:12,"aria-hidden":`true`})]})}function fr({task:e,actions:t,now:n}){let r=L(e.sessionUrl,`claude.ai`),i=e.pr?L(e.pr.url,`github.com`):null,a=Te(e,n);return(0,Y.jsxs)(`li`,{className:R.task,"data-state":e.state,children:[(0,Y.jsx)(`span`,{className:R.taskChip,children:(0,Y.jsx)(u,{status:e.state,tone:ke[e.state],children:Le(e)})}),(0,Y.jsxs)(`span`,{className:R.taskMain,children:[(0,Y.jsx)(`p`,{className:R.taskTitle,children:e.title}),(0,Y.jsx)(`span`,{className:R.muted,children:Ie(e,n)}),a?(0,Y.jsx)(`span`,{className:R.facts,children:a}):null,(0,Y.jsxs)(`span`,{className:R.taskLinks,children:[r?(0,Y.jsx)(dr,{href:r,label:`Open “${e.title}” in Claude`,children:`Open in Claude`}):null,i&&e.pr?(0,Y.jsx)(dr,{href:i,label:`Pull request #${e.pr.number} on GitHub`,children:`PR #${e.pr.number}`}):null,Ne(e)?(0,Y.jsx)(`button`,{type:`button`,className:R.linkButton,disabled:t.busy||t.readOnly,"aria-label":`Dismiss “${e.title}”`,onClick:()=>t.act(()=>He(e.id),`Dismiss the cloud task “${e.title}”.`,{confirm:{title:`Dismiss this cloud task?`,body:`Verse stops tracking “${e.title}”. Nothing on GitHub or claude.ai changes — the session and any PR stay where they are.`,confirmLabel:`Dismiss`}}),children:`Dismiss`}):null]})]})]})}function pr({overview:e,actions:t,onClose:n}){let r=(0,W.useRef)(null),i=(0,W.useId)();return l({open:!0,containerRef:r,onClose:n}),(0,Y.jsxs)(`div`,{ref:r,className:R.popover,role:`dialog`,"aria-modal":`false`,"aria-labelledby":i,tabIndex:-1,children:[(0,Y.jsx)(`h4`,{id:i,className:R.popoverTitle,children:`Cloud budget`}),(0,Y.jsx)(yt,{idPrefix:`cloud-card-budget`,budget:e.budget.budget,busy:t.busy,disabled:t.readOnly,onSave:e=>t.act(()=>Ue(e),`Change the cloud budget.`,{onDone:n}),onCancel:n})]})}function mr({overview:e,actions:t,now:n,onNotice:r}){let i=e.budget,a=Ae(i),o=Oe(e.seat),s=De(i.canLaunch,`The cloud budget does not allow another launch right now.`),{shown:c,hidden:l}=Ee(e.tasks,n),u=i.budget.selfImprove;return(0,Y.jsxs)(`div`,{className:R.body,children:[(0,Y.jsxs)(`div`,{className:R.meterBlock,children:[(0,Y.jsx)(ve,{value:a.value,max:a.max,label:`Credits remaining`,valueText:a.text,tone:a.tone,"aria-label":`Estimated credits remaining: ${a.text}, ${a.usedText}`}),(0,Y.jsxs)(`p`,{className:R.estimateNote,children:[de(i.estimateNote,n),` `,(0,Y.jsx)(dr,{href:Se,label:`Check the real balance on claude.ai`,children:`Check usage on claude.ai`})]}),a.warning?(0,Y.jsx)(`p`,{className:R.notice,"data-tone":`warning`,role:`note`,children:a.warning}):null]}),(0,Y.jsx)(`p`,{className:R.facts,children:Fe(i,n)}),o?(0,Y.jsx)(`p`,{className:R.notice,"data-tone":`warning`,role:`note`,children:o}):null,s?(0,Y.jsxs)(`p`,{className:R.notice,"data-tone":`warning`,role:`note`,"data-testid":`cloud-budget-refused`,children:[`New launches are paused: `,s]}):null,(0,Y.jsxs)(`div`,{className:R.toggleRow,children:[(0,Y.jsx)(ye,{checked:u.enabled,label:`Self-improvement`,disabled:t.busy||t.readOnly,onChange:e=>t.act(()=>Ue({selfImprove:{enabled:e}}),e?`Let Verse launch its own self-improvement tasks.`:`Stop Verse launching its own self-improvement tasks.`,{onDone:()=>r({tone:`success`,text:e?`Self-improvement is on — up to ${u.maxPerDay} a day.`:`Self-improvement is off.`})})}),(0,Y.jsx)(`span`,{className:`${R.muted} ${R.toggleText}`,children:we(i)})]}),c.length===0?(0,Y.jsx)(H,{children:`No cloud tasks yet. Start one with New cloud task, or let Verse improve itself.`}):(0,Y.jsx)(`ul`,{className:R.tasks,"aria-label":`Cloud tasks`,children:c.map(e=>(0,Y.jsx)(fr,{task:e,actions:t,now:n},e.id))}),l>0?(0,Y.jsxs)(`p`,{className:R.muted,children:[l,` more `,l===1?`task is`:`tasks are`,` listed by ashlr cloud list.`]}):null]})}function hr({actions:e,now:t=Date.now()}){let n=o(Be,{freshMs:15e3}),r=i(Be);k(r,We);let[a,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(null),f=n.data?.value??null,p=!n.data&&(n.status===`loading`||n.status===`idle`),m=f?je(f.seat,f.budget):null,h=e.busy||e.readOnly,g=f?.backlog.nextUp?f.backlog.items.find(e=>e.id===f.backlog.nextUp)??null:null,_=f?Oe(f.seat)??De(f.budget.canLaunch,`The cloud budget does not allow another launch right now.`)??(g?null:`The self-improvement backlog has nothing left to launch.`):null,v=f?f.budget.budget.estimatedCostPerSessionUsd:null,y=f?(0,Y.jsxs)(`span`,{className:R.headActions,children:[(0,Y.jsx)(F,{label:m??`Start a cloud session with your own task`,children:(0,Y.jsx)(I,{size:`sm`,variant:`primary`,icon:(0,Y.jsx)(N,{width:14,height:14}),disabled:h||m!==null,onClick:()=>s(!0),children:`New cloud task`})}),(0,Y.jsx)(F,{label:_??(g?`Launch the next backlog item: ${g.title}`:`Launch the next backlog item`),children:(0,Y.jsx)(I,{size:`sm`,disabled:h||_!==null,onClick:()=>{f&&g&&e.act(()=>Ve({count:1}),`Launch the next self-improvement task as a cloud session.`,{confirm:{title:`Improve Verse now?`,body:`Launches “${g.title}” as a cloud session on ${g.repo??f.budget.budget.selfImprove.repo}${v===null?``:`, estimated at ${Pe(v)}`}. It delivers a draft PR; nothing merges on its own.`,confirmLabel:`Launch`},onDone:e=>{let t=e.launched[0]??null;if(t)d({tone:`success`,text:`Started “${t.title}”.`,href:L(t.sessionUrl,`claude.ai`),linkText:`Open in Claude`});else{let t=e.skipped[0]?.reason??`Nothing was launched, and the server sent no reason.`;d({tone:`warning`,text:de(t)})}}})},children:`Improve Verse`})}),(0,Y.jsx)(F,{label:`Credits, per-session estimate and daily caps`,children:(0,Y.jsx)(I,{size:`sm`,variant:`ghost`,"aria-expanded":c,"aria-haspopup":`dialog`,onClick:()=>l(e=>!e),disabled:e.readOnly,children:`Edit budget`})}),(0,Y.jsx)(F,{label:`Check GitHub for task updates now`,children:(0,Y.jsx)(_e,{size:`sm`,variant:`ghost`,icon:(0,Y.jsx)(P,{width:14,height:14}),"aria-label":`Check GitHub for task updates now`,disabled:h,onClick:()=>e.act(()=>Re(),`Re-read the cloud tasks from GitHub.`)})}),c?(0,Y.jsx)(pr,{overview:f,actions:e,onClose:()=>l(!1)}):null]}):null;return(0,Y.jsx)(lt,{title:`Cloud`,caption:`Claude Code cloud sessions on your Claude credits`,actions:y,children:p?(0,Y.jsx)(`p`,{className:R.muted,"aria-busy":`true`,children:`Reading the cloud lane…`}):f?(0,Y.jsxs)(Y.Fragment,{children:[u?(0,Y.jsx)(`div`,{className:R.notice,"data-tone":u.tone,role:`status`,children:(0,Y.jsxs)(`span`,{className:R.noticeRow,children:[(0,Y.jsxs)(`span`,{children:[u.text,u.href?(0,Y.jsxs)(Y.Fragment,{children:[` `,(0,Y.jsx)(dr,{href:u.href,children:u.linkText??`Open`})]}):null]}),(0,Y.jsx)(`button`,{type:`button`,className:R.linkButton,onClick:()=>d(null),children:`Dismiss`})]})}):null,(0,Y.jsx)(mr,{overview:f,actions:e,now:t,onNotice:d}),(0,Y.jsx)(ur,{open:a,onClose:()=>s(!1),actions:e,estimatePerSessionUsd:v,onLaunched:e=>d({tone:`success`,text:`Started “${e.title}”.`,href:L(e.sessionUrl,`claude.ai`),linkText:`Open in Claude`})})]}):(0,Y.jsx)(H,{tone:`unknown`,children:n.data?.reason??n.error?.message??`The cloud lane did not answer.`})})}function gr(e){let t=Ot(e);return(0,Y.jsx)(`p`,{className:B.verdict,"data-testid":`verdict`,children:t.map((e,t)=>(0,Y.jsxs)(`span`,{className:B.verdictPart,"data-tone":e.tone,children:[t>0?(0,Y.jsx)(`span`,{className:B.verdictSep,"aria-hidden":`true`,children:` · `}):null,e.text]},e.key))})}var _r=`ashlr.verse.command.lastLooked.v1`;function vr(){try{let e=window.localStorage.getItem(_r);return e&&Number.isFinite(Date.parse(e))?e:null}catch{return null}}function yr(e){try{window.localStorage.setItem(_r,e)}catch{}}function br(){let e=O(),[t,n]=(0,W.useState)(null),r=(0,W.useRef)(!1);return(0,W.useEffect)(()=>{e&&!r.current&&(n(vr()),yr(new Date().toISOString())),r.current=e},[e]),t}function xr({lastLookedAt:e,items:t}){if(!e)return null;let n=new Date(e),r=n.toDateString()===new Date().toDateString()?n.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`}):n.toLocaleString(`en-US`,{weekday:`short`,hour:`numeric`,minute:`2-digit`});return(0,Y.jsxs)(`div`,{className:B.since,role:`group`,"aria-label":`Since you looked at ${r}`,children:[(0,Y.jsxs)(`span`,{className:B.sinceLead,children:[`Since `,r]}),t.length===0?(0,Y.jsx)(`span`,{className:B.sinceEmpty,children:`nothing new`}):t.map(e=>(0,Y.jsx)(`span`,{className:B.sinceChip,"data-tone":e.tone,children:e.text},e.id))]})}var Sr=36e5,Cr=1e4,wr=3e4,Tr=3e5,$={};function Er(){let{compact:e}=D(),t=o(Xe),n=o(Ye),r=A(),c=o(qe),l=o(Ze,{freshMs:6e4}),u=o(Qe,{freshMs:6e4}),f=o(ge,{freshMs:15e3}),p=o(Je,{freshMs:6e4}),m={authority:i(Xe),fleet:i(Ye),leader:i(qe),learning:i(Ze),history:i(Qe),budget:i(ge),seatHistory:i(Je)};k(()=>{m.authority(),m.fleet()},Cr),k(()=>{m.leader(),m.budget()},wr),k(()=>{m.history(),m.learning(),m.seatHistory()},Tr);let h=Ge(3e4),g=rt(),_=br(),v=(0,W.useSyncExternalStore)((0,W.useCallback)(e=>s(`verse-bootstrap`,e),[]),()=>a(`verse-bootstrap`),()=>a(`verse-bootstrap`)).data?.seats??null,[y,b]=(0,W.useState)($),x=f.data??null;(0,W.useEffect)(()=>{x&&($=hn($,x),b($))},[x]);let S=t.data?.value??null,C=n.data?.value??null,w=u.data?.value??null,T=at(C),E=(0,W.useMemo)(()=>an({fleet:C,history:w,learning:l.data?.value??null,policy:S?.policy??null,budget:x}),[C,w,l.data,S,x]),O=p.data?.value??null,j=(0,W.useMemo)(()=>gn(y,O),[y,O]),te=(0,W.useMemo)(()=>Rn(x,j.readings,v,j.recorded),[x,j,v]),ne=(0,W.useMemo)(()=>un(v,x),[v,x]),re=sn({lastLookedAt:_,fleet:C,leader:c.data?.value??null,activity:r.data}),M=e?6:12,N=h-M*Sr,P=(0,W.useMemo)(()=>C?pt(C.runs,N,h):[],[C,N,h]),ie=n.data?C?C.state===`dark`&&P.length===0?ot(C):P.length===0?{kind:`empty`,message:`No runs in the last ${M} hours.`}:{kind:`ready`}:{kind:`unknown`,reason:n.data.reason??`the live fleet view did not answer.`}:{kind:`loading`},ae=C?C.state===`dark`?`Fleet dark${T?` since ${st(T)}`:``}.`:`Fleet ${C.state}: ${C.summary.building??`—`} building, ${C.summary.queued??`—`} queued.`:`Fleet status unknown.`,F=[t,n].some(e=>e.status===`refreshing`);return(0,Y.jsxs)(ct,{title:`Command`,actions:F?(0,Y.jsx)(d,{}):null,lead:(0,Y.jsxs)(`div`,{className:B.lead,children:[(0,Y.jsx)(Ht,{read:t.data,loading:t.status===`loading`,budgetMode:x?.mode??null,actions:g,compact:e,now:h}),(0,Y.jsx)(it,{actions:g}),(0,Y.jsx)(gr,{authority:S,building:C?.summary.building??null,mergedToday:C?.summary.mergedToday??null,revertsToday:C?.summary.revertsToday??null,reserve:zn(x),darkSince:T}),(0,Y.jsx)(xr,{lastLookedAt:_,items:re})]}),children:[(0,Y.jsx)(U,{span:5,children:(0,Y.jsx)(Xn,{state:r,actions:g,fleetLine:ae,seatNames:ne})}),(0,Y.jsx)(U,{span:7,children:(0,Y.jsx)(ht,{read:c.data,loading:c.status===`loading`,actions:g})}),(0,Y.jsx)(U,{span:12,children:(0,Y.jsx)(Bn,{kpis:E})}),(0,Y.jsx)(U,{span:12,children:(0,Y.jsx)(cr,{burns:te,now:h,compact:e})}),(0,Y.jsx)(U,{span:12,children:(0,Y.jsx)(hr,{actions:g,now:h})}),(0,Y.jsx)(U,{span:12,children:(0,Y.jsx)(ee,{title:`Last ${M} hours`,description:`Fleet lanes; bars coloured by status, outlines are queued or parked`,status:ie,lanes:P,from:N,to:h,now:h,toneOf:dt})}),g.dialogs]})}export{Cr as COMMAND_FAST_POLL_MS,Tr as COMMAND_HISTORY_POLL_MS,wr as COMMAND_SLOW_POLL_MS,Er as CommandSection};
|
|
2
|
-
//# sourceMappingURL=CommandSection-DN8KwH-X.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{a as r,g as i,m as a,s as o}from"./global-Di2PUgj4.js";import{t as s}from"./MutationTokenDialog-SkRxqV_I.js";import{c,s as l}from"./command-catalog-BdtDH93o.js";import{t as u}from"./workbench-types-DzN-5trg.js";import{_ as d,a as f,b as p,c as m,d as h,g,h as _,l as v,n as y,r as b,u as x}from"./dock-store-BA1cHOYA.js";import{l as S,r as C,w}from"./verse-store-DjBWj04q.js";import{f as T}from"./format-B8DAVcn2.js";import{T as E,g as ee,o as D,s as O}from"./verse-model-D7NZQFAR.js";import{a as te,c as k,d as A,l as ne,u as re}from"./context-queries-xVKIeynP.js";import{T as ie,f as j,t as ae,v as M,w as oe}from"./context-model-MT17V86_.js";import{_ as se,a as ce,i as le,l as N,m as ue,n as de,r as fe,v as P,w as pe,x as me}from"./context-model-Dwd49-dp.js";import{d as F,p as I,u as L}from"./workspace-model-D_tWD5Wt.js";import{n as R,t as z}from"./ActionMenu-CQvNJvHY.js";import{s as he}from"./tool-semantics-GX8ScuSH.js";import{d as B,h as ge,i as V,l as _e,n as H}from"./dock-icons-8EtARwUm.js";import{currentTurnTasks as U}from"./tasks-model-ent8f0jZ.js";import{n as ve,t as W}from"./use-token-gate-B3IJL6bf.js";import{t as ye}from"./EmptyState-DhNgDDrF.js";import{a as be,n as xe,r as Se}from"./slots-Ds9ZIqUL.js";import{n as G,t as K}from"./dock-panes-UKS-mXhr.js";import{t as Ce}from"./Switch-CcR5Llk5.js";import{t as q}from"./context.module-BijAfoJw.js";import{r as we,s as Te}from"./ChatSection-CCcIPpOq.js";var J=n(e(),1),Y={usage:`_usage_1xfeo_5`,muted:`_muted_1xfeo_21`,subTitle:`_subTitle_1xfeo_23`,idleWarn:`_idleWarn_1xfeo_35`},X=t();function Ee({session:e,seats:t,events:n,now:r}){let i=e.usage,a=oe(e,t),o=ie(n??[]),s=i.inputTokens+i.cacheReadTokens+i.cacheCreationTokens,c=M(i),l=e.compactionCount??o.compactions,u=j(e,a.tokens,r,S(n??[])),d=a.exact?``:`≤`,f=o.exact?``:`≤`;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`dl`,{className:Y.usage,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Input`}),(0,X.jsx)(`dd`,{children:C(i.inputTokens)})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Output`}),(0,X.jsx)(`dd`,{children:C(i.outputTokens)})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Cache read`}),(0,X.jsx)(`dd`,{children:C(i.cacheReadTokens)})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Cache write`}),(0,X.jsx)(`dd`,{children:C(i.cacheCreationTokens)})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Turns`}),(0,X.jsx)(`dd`,{children:e.turnCount})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Context`}),(0,X.jsxs)(`dd`,{title:a.exact?void 0:`An upper bound: the CLI reported only the turn total, which sums every call.`,children:[d,C(a.tokens),a.window===null?``:` / ${C(a.window)}`]})]})]}),(0,X.jsx)(`h4`,{className:Y.subTitle,children:`Efficiency`}),(0,X.jsxs)(`dl`,{className:Y.usage,"aria-label":`Context efficiency`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Cache hit`}),(0,X.jsx)(`dd`,{title:`Share of prompt tokens served from the provider's cache: cache read ÷ (input + cache read + cache write).`,children:c===null?s>0?`none reported`:`—`:T(c)})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Compactions`}),(0,X.jsx)(`dd`,{children:l})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Avg context / turn`}),(0,X.jsx)(`dd`,{children:o.average===null?`—`:`${f}${C(o.average)}`})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Peak context`}),(0,X.jsx)(`dd`,{children:o.peak===null?`—`:`${f}${C(o.peak)}`})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Mode`}),(0,X.jsx)(`dd`,{children:ae[a.mode]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`dt`,{children:`Compacts at`}),(0,X.jsx)(`dd`,{children:a.autoCompactAt===null?`—`:`≈${C(a.autoCompactAt)}`})]})]}),(0,X.jsxs)(`p`,{className:Y.muted,children:[a.source===null?a.window===null?`Window unknown for this chat.`:`Window as stored when this chat was created; how it was known was not recorded.`:`Window ${E(a.source,e.engine)}.`,o.turns>0&&!o.exact?` Figures marked ≤ are upper bounds: the CLI reported only turn totals.`:``]}),(0,X.jsx)(`p`,{className:Y.muted,children:e.memoryEnabled===!0?e.engine===`local`?`Shared project memory was given to this chat’s agent when it started.`:`Shared project memory was given to this chat’s agent when it started: a block of up to ${de/1024} KB in its system prompt, re-sent every turn (cached after the first), plus the agent’s own reads and updates of MEMORY.md — a little of this seat’s usage.`:`This chat started without shared project memory.`}),u===null?null:(0,X.jsx)(`p`,{role:`status`,className:Y.idleWarn,children:u.local?`Idle for ${O(u.idleMs)}: the local model has likely dropped this chat from its cache, so the next turn re-processes ~${C(u.tokens)} tokens before it replies — time, not spend.`:`Idle for ${O(u.idleMs)}, past the ~1 h prompt-cache lifetime: the next turn likely re-reads ~${C(u.tokens)} tokens uncached, at full price.`})]})}function De({projectPath:e,refreshKey:t}){let n=(0,J.useId)();return e?(0,X.jsx)(Me,{projectPath:e,refreshKey:t},e):(0,X.jsxs)(`section`,{className:q.memory,"aria-labelledby":n,children:[(0,X.jsx)(`h3`,{id:n,className:q.memoryHead,children:`Project memory`}),(0,X.jsx)(`p`,{className:q.hint,children:`Open a chat to see the memory its project shares across seats.`})]})}var Oe=`Saving writes MEMORY.md for this project. Every seat on it reads this file.`,ke=`Clearing empties MEMORY.md for every chat on this project.`,Ae=`This changes whether new chats on this project are given shared memory.`,je=`This changes whether new chats on ANY project are given shared memory.`;function Me({projectPath:e,refreshKey:t}){let n=(0,J.useId)(),c=(0,J.useId)(),l=(0,J.useId)(),u=(0,J.useMemo)(()=>re(e),[e]),d=a(u),f=i(u),p=a(ne),m=ve(),h=ee(e),[g,_]=(0,J.useState)(`view`),[v,y]=(0,J.useState)(``),[b,x]=(0,J.useState)(``),[S,C]=(0,J.useState)(!1),[T,E]=(0,J.useState)(null),[D,O]=(0,J.useState)(null),[ie,j]=(0,J.useState)(null),[ae,M]=(0,J.useState)(null),oe=(0,J.useRef)(null),de=(0,J.useRef)(t);(0,J.useEffect)(()=>{t!==de.current&&(de.current=t,f())},[t,f]),(0,J.useEffect)(()=>{let e=oe.current;g===`edit`&&e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[g]);let[F,I]=(0,J.useState)(null);(0,J.useEffect)(()=>{F!==null&&d.status===`success`&&I(null)},[F,d.status]);let L=F!==null&&d.status!==`success`?F:d.data,R=d.error instanceof o&&d.error.status===404,z=p.data?!p.data.memory.enabled:!1,he=(0,J.useMemo)(()=>pe(v),[v]),B=he>w,ge=(0,J.useMemo)(()=>ue({projectPath:e,content:v}),[e,v]),V=!B&&ge>fe,_e=g===`edit`?me(v):null,H=g===`edit`&&S?se(v):0;function U(e,t){y(e),x(e),C(t),E(null),j(null),M(null),_(`edit`)}async function ye(t=!1){if(!D){O(`saving`),j(null);try{let n=await te(e);if(!t&&n.content!==b){E(n);return}let r=await m.run(Oe,()=>A(e,v));if(r===null)return;I(r),E(null),_(`view`),M(r.content.length===0?`Saved — MEMORY.md is now empty.`:`Saved.`)}catch(e){j(W(e))}finally{O(null)}}}async function be(){if(!D){O(`clearing`),j(null);try{let t=await m.run(ke,()=>A(e,``));if(t===null)return;I(t),_(`view`),M(`Cleared. Agents start MEMORY.md afresh on their next write.`)}catch(e){j(W(e))}finally{O(null)}}}async function xe(t){if(!D){O(`toggling`),j(null),M(null);try{await m.run(Ae,()=>k({projectPath:e,memoryEnabled:t}))!==null&&M(t?`New chats on ${h} will get shared memory. Chats already open keep what they started with.`:`New chats on ${h} will start without shared memory. The file is kept.`)}catch(e){j(W(e))}finally{O(null)}}}async function Se(e){if(!D){O(`toggling`),j(null),M(null);try{await m.run(je,()=>k({memoryEnabled:e}))}catch(e){j(W(e))}finally{O(null)}}}let G=L?z?`off everywhere`:L.enabled?`on`:`off`:null;return(0,X.jsxs)(`section`,{className:q.memory,"aria-labelledby":n,"data-project":e,children:[(0,X.jsxs)(`h3`,{id:n,className:q.memoryHead,children:[(0,X.jsx)(`span`,{children:`Project memory`}),G?(0,X.jsx)(`span`,{className:q.memoryState,children:G}):null,R?null:(0,X.jsx)(`button`,{type:`button`,className:q.memoryHeadAction,onClick:f,"aria-label":`Refresh project memory`,children:`Refresh`})]}),(0,X.jsxs)(`p`,{className:q.hint,children:[`One `,(0,X.jsx)(`code`,{children:`MEMORY.md`}),` shared by every chat on `,(0,X.jsx)(`strong`,{title:e,children:h}),`, whichever seat runs it. Agents keep it current — decisions and why, conventions, gotchas, plan status.`]}),R?(0,X.jsxs)(`p`,{className:q.hint,children:[`This server has no project memory yet — update Ashlr and restart `,(0,X.jsx)(`code`,{children:`ashlr verse`}),`.`]}):d.status===`loading`||d.status===`idle`&&!L?(0,X.jsxs)(`div`,{"aria-busy":`true`,children:[(0,X.jsx)(r,{width:`80%`}),(0,X.jsx)(r,{width:`60%`}),(0,X.jsx)(r,{width:`70%`})]}):L?(0,X.jsxs)(X.Fragment,{children:[z?(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`p`,{className:q.hint,children:`Shared memory is off for every project, so new chats start without it.`}),(0,X.jsx)(`div`,{className:q.memoryActions,children:(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small}`,disabled:D!==null,onClick:()=>void Se(!0),children:`Turn memory on`})})]}):(0,X.jsx)(Ce,{checked:L.enabled,disabled:D!==null||!p.data,onChange:e=>void xe(e),label:`Give new chats on ${h} this memory`}),g===`edit`?(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`label`,{className:q.label,htmlFor:c,children:`Edit MEMORY.md`}),(0,X.jsx)(`textarea`,{id:c,ref:oe,className:q.textarea,value:v,rows:12,spellCheck:!1,"aria-describedby":l,"aria-invalid":B||V?!0:void 0,onChange:e=>y(e.target.value)}),(0,X.jsxs)(`p`,{id:l,className:`${q.hint} ${q.counter} ${B||V?q.counterOver:``}`,children:[N(he),` of `,N(w),B?` — over the limit; trim it to save.`:``,V?` — ${N(ge)} once line breaks and quotes are encoded for sending, over the ${N(fe)} request limit; trim it to save.`:``]}),_e?(0,X.jsxs)(`p`,{className:q.warn,role:`alert`,children:[`This looks like it contains `,_e,`. MEMORY.md is sent to every seat’s model — remove it before saving.`]}):null,H>0?(0,X.jsxs)(`p`,{className:q.warn,role:`alert`,children:[H===1?`One`:H,` `,(0,X.jsx)(`code`,{children:ce}),` placeholder`,H===1?` stands`:`s stand`,` in for secret-looking text that is still in MEMORY.md. Saving `,H===1?`it`:`them`,` would replace the real value`,H===1?``:`s`,`, so Save stays off until `,H===1?`it is`:`they are`,` gone. Deleting a placeholder drops that value from the file; to keep it, edit MEMORY.md directly under `,(0,X.jsx)(`code`,{children:`~/.ashlr/verse/memory`}),`.`]}):S?(0,X.jsxs)(`p`,{className:q.hint,children:[`This copy was sanitized for the browser, so a home-folder path appears as `,(0,X.jsx)(`code`,{children:`~`}),`. Saving writes the text as shown; `,(0,X.jsx)(`code`,{children:`~`}),` names the same folder for every reader.`]}):null,T?(0,X.jsxs)(`div`,{className:q.warn,role:`alert`,children:[(0,X.jsxs)(`p`,{className:q.hint,children:[`An agent changed MEMORY.md while you were editing`,P(T.updatedAt)?` (${P(T.updatedAt)})`:``,`.`]}),(0,X.jsxs)(`div`,{className:q.memoryActions,children:[(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small}`,disabled:D!==null||H>0,onClick:()=>void ye(!0),children:`Overwrite with mine`}),(0,X.jsx)(`button`,{type:`button`,className:`${q.cancel} ${q.small}`,disabled:D!==null,onClick:()=>U(T.content,T.contentSanitized===!0),children:`Start over from theirs`})]})]}):null,(0,X.jsxs)(`div`,{className:q.memoryActions,children:[(0,X.jsx)(`button`,{type:`button`,className:`${q.primary} ${q.small}`,disabled:D!==null||B||V||v===b||T!==null||H>0,onClick:()=>void ye(!1),children:D===`saving`?`Saving…`:`Save`}),(0,X.jsx)(`button`,{type:`button`,className:`${q.cancel} ${q.small}`,disabled:D===`saving`,onClick:()=>{_(`view`),E(null),j(null)},children:`Cancel`})]})]}):L.content.length===0?(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`p`,{className:q.hint,children:`MEMORY.md is empty. Agents add to it as they work, or write the first entries yourself.`}),(0,X.jsx)(`div`,{className:q.memoryActions,children:(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small}`,onClick:()=>U(``,!1),children:`Write it`})})]}):(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`pre`,{className:q.memoryBody,tabIndex:0,"aria-label":`MEMORY.md for ${h}`,children:L.content}),(0,X.jsxs)(`p`,{className:`${q.hint} ${q.memoryMeta}`,children:[(0,X.jsx)(`span`,{children:N(L.bytes)}),P(L.updatedAt)?(0,X.jsxs)(`span`,{children:[`updated `,P(L.updatedAt)]}):null]}),L.contentSanitized?(0,X.jsxs)(`p`,{className:q.hint,children:[`Shown sanitized for the browser: a home-folder path appears as `,(0,X.jsx)(`code`,{children:`~`}),` and secret-looking text as`,` `,(0,X.jsx)(`code`,{children:ce}),`.`,se(L.content)>0?` The real values are still in the file.`:``]}):null,g===`confirm-clear`?(0,X.jsxs)(`div`,{className:q.warn,role:`alert`,children:[(0,X.jsxs)(`p`,{className:q.hint,children:[`Clear MEMORY.md for `,h,`? Every chat on this project loses what it says. Other files in the folder stay.`]}),(0,X.jsxs)(`div`,{className:q.memoryActions,children:[(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small} ${q.danger}`,disabled:D!==null,onClick:()=>void be(),children:D===`clearing`?`Clearing…`:`Clear it`}),(0,X.jsx)(`button`,{type:`button`,className:`${q.cancel} ${q.small}`,onClick:()=>_(`view`),children:`Keep`})]})]}):(0,X.jsxs)(`div`,{className:q.memoryActions,children:[(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small}`,onClick:()=>U(L.content,L.contentSanitized===!0),children:`Edit`}),(0,X.jsx)(`button`,{type:`button`,className:`${q.cancel} ${q.small}`,onClick:()=>{M(null),_(`confirm-clear`)},children:`Clear…`})]})]}),L.files.length>0?(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`span`,{className:q.label,children:`Also in this folder`}),(0,X.jsx)(`ul`,{className:q.memoryFiles,children:L.files.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsx)(`code`,{children:e})},e))})]}):null,ae?(0,X.jsx)(`p`,{className:q.hint,role:`status`,children:ae}):null,ie?(0,X.jsx)(`p`,{className:q.error,role:`alert`,children:ie}):null,(0,X.jsxs)(`details`,{children:[(0,X.jsx)(`summary`,{className:q.hint,children:`How project memory works`}),(0,X.jsxs)(`div`,{className:q.field,children:[(0,X.jsx)(`p`,{className:q.hint,children:`Claude, Codex and local seats can read and edit the file. Grok’s CLI can reach only its working folder, so a Grok seat is given the text and can only read it.`}),(0,X.jsx)(`p`,{className:q.hint,children:`A chat copies the memory into its instructions when it starts, so every turn re-sends the same prefix and the provider’s prompt cache keeps working. Chats already open see your edits when they next read the file; the switch above applies to new chats.`}),(0,X.jsxs)(`p`,{className:q.hint,children:[`It lives on this machine under `,(0,X.jsx)(`code`,{children:`~/.ashlr/verse/memory`}),`, readable only by you. It is sent to every seat’s model, so never put secrets in it.`]}),(0,X.jsx)(`p`,{className:q.hint,children:le}),z?null:(0,X.jsxs)(`p`,{className:q.hint,children:[`Memory is on for every project unless switched off per project.`,` `,(0,X.jsx)(`button`,{type:`button`,className:q.link,disabled:D!==null,onClick:()=>void Se(!1),children:`Turn it off for every project`})]})]})]})]}):(0,X.jsxs)(`div`,{className:q.searchError,role:`alert`,children:[(0,X.jsxs)(`span`,{children:[`Could not read this project’s memory: `,W(d.error)]}),(0,X.jsx)(`button`,{type:`button`,className:`${q.secondary} ${q.small}`,onClick:f,children:`Retry`})]}),(0,X.jsx)(s,{open:m.dialog.open,reason:m.dialog.reason,tokenLabel:`Mutation token`,tokenHelp:`the mutation token ashlr verse printed`,onClose:m.dialog.onClose,onUnlocked:m.dialog.onUnlocked})]})}var Z={roots:`_roots_afeac_8`,title:`_title_afeac_10`,count:`_count_afeac_22`,workspace:`_workspace_afeac_30`,list:`_list_afeac_36`,root:`_root_afeac_8`,rootHead:`_rootHead_afeac_57`,name:`_name_afeac_64`,badge:`_badge_afeac_72`,path:`_path_afeac_84`,git:`_git_afeac_97`,remote:`_remote_afeac_98`,caveat:`_caveat_afeac_99`,note:`_note_afeac_116`,error:`_error_afeac_117`};function Ne({session:e,data:t,error:n=null}){return!e||t!==null&&t.roots.length<=1&&t.workspaceId===null?null:(0,X.jsxs)(`section`,{className:Z.roots,"aria-labelledby":`verse-res-roots`,children:[(0,X.jsxs)(`h3`,{id:`verse-res-roots`,className:Z.title,children:[`Folders`,t?(0,X.jsx)(`span`,{className:Z.count,children:t.roots.length}):null]}),t?.workspaceName?(0,X.jsxs)(`p`,{className:Z.workspace,children:[`Workspace `,(0,X.jsx)(`strong`,{children:t.workspaceName})]}):null,n?(0,X.jsx)(`p`,{role:`alert`,className:Z.error,children:n}):null,(0,X.jsx)(`ul`,{className:Z.list,children:(t?.roots??[]).map(e=>{let t=F(e),n=L(e);return(0,X.jsxs)(`li`,{className:Z.root,"data-tone":I(e),children:[(0,X.jsxs)(`div`,{className:Z.rootHead,children:[(0,X.jsx)(`span`,{className:Z.name,children:e.name}),(0,X.jsx)(`span`,{className:Z.badge,children:e.primary?`primary`:`added`})]}),(0,X.jsx)(`p`,{className:Z.path,title:e.path,children:ge(e.path)}),(0,X.jsx)(`p`,{className:Z.git,children:t??`not a git repo`}),e.git?.remote?(0,X.jsx)(`p`,{className:Z.remote,children:e.git.remote}):null,n?(0,X.jsx)(`p`,{className:Z.caveat,children:n}):null]},e.path)})}),(t?.notes??[]).map(e=>(0,X.jsx)(`p`,{className:Z.note,children:e},e))]})}var Q={pane:`_pane_1f7em_6`,section:`_section_1f7em_13`,sectionTitle:`_sectionTitle_1f7em_19`,count:`_count_1f7em_31`,muted:`_muted_1f7em_37`,action:`_action_1f7em_43`,hint:`_hint_1f7em_46`,reserve:`_reserve_1f7em_54`,link:`_link_1f7em_73`,task:`_task_1f7em_74`,taskList:`_taskList_1f7em_88`,taskMark:`_taskMark_1f7em_113`,"pane-pulse":`_pane-pulse_1f7em_1`,taskName:`_taskName_1f7em_125`,taskDetail:`_taskDetail_1f7em_134`,taskTime:`_taskTime_1f7em_142`,engineTick:`_engineTick_1f7em_152`},Pe=3e4;function Fe(e){let[t,n]=(0,J.useState)(()=>Date.now());return(0,J.useEffect)(()=>{if(!e)return;n(Date.now());let t=setInterval(()=>n(Date.now()),Pe);return()=>clearInterval(t)},[e]),t}function Ie({session:e,seats:t,events:n,roots:r,rootsError:i,onHandoff:a,handoffDisabledReason:o=null,onOpenAccounts:s,visible:c}){let l=Fe(c&&e!==null);return(0,X.jsxs)(`div`,{className:Q.pane,"aria-label":`Context`,children:[(0,X.jsxs)(`section`,{className:Q.section,"aria-labelledby":`dock-context-chat`,children:[(0,X.jsx)(`h3`,{id:`dock-context-chat`,className:Q.sectionTitle,children:`This chat`}),e?(0,X.jsx)(Ee,{session:e,seats:t,events:n,now:l}):(0,X.jsx)(`p`,{className:Q.muted,children:`Open a chat to see its usage and context.`})]}),e?(0,X.jsx)(`div`,{className:Q.section,children:(0,X.jsx)(Ne,{session:e,data:r,error:i})}):null,e&&a?(0,X.jsxs)(`section`,{className:Q.section,"aria-labelledby":`dock-context-handoff`,children:[(0,X.jsx)(`h3`,{id:`dock-context-handoff`,className:Q.sectionTitle,children:`Handoff`}),(0,X.jsx)(`p`,{className:Q.muted,children:`Verse drafts a note from this chat's log — free — and opens a fresh chat with it in the message box. Nothing is sent until you press Send.`}),(0,X.jsx)(`button`,{type:`button`,className:Q.action,onClick:a,disabled:o!==null,title:o??void 0,children:`Continue in a fresh chat…`}),(0,X.jsx)(`p`,{className:`${Q.muted} ${Q.reserve}`,children:o??``})]}):null,(0,X.jsx)(`div`,{className:Q.section,children:(0,X.jsx)(De,{projectPath:e?.projectPath??null,refreshKey:e?.turnCount??0})}),(0,X.jsx)(`div`,{className:Q.section,children:(0,X.jsx)(`button`,{type:`button`,className:Q.link,onClick:s,children:`Accounts & capacity →`})})]})}var $={dock:`_dock_10ssf_8`,sheetLayer:`_sheetLayer_10ssf_25`,scrim:`_scrim_10ssf_37`,"dock-fade":`_dock-fade_10ssf_1`,"dock-in-right":`_dock-in-right_10ssf_1`,"dock-in-up":`_dock-in-up_10ssf_1`,grabber:`_grabber_10ssf_64`,head:`_head_10ssf_75`,tabs:`_tabs_10ssf_86`,tabWrap:`_tabWrap_10ssf_97`,tab:`_tab_10ssf_86`,tabClose:`_tabClose_10ssf_135`,headActions:`_headActions_10ssf_156`,iconButton:`_iconButton_10ssf_162`,plus:`_plus_10ssf_179`,body:`_body_10ssf_185`,pane:`_pane_10ssf_191`,splitHandle:`_splitHandle_10ssf_200`,widthHandle:`_widthHandle_10ssf_220`};function Le(e){let t=l(e)?.keys[0];return t?c(t):null}var Re=16,ze=64,Be=.05;function Ve(e){let{presentation:t,windowWidth:n,columnWidth:r}=e,{state:i,requests:a}=_(),o=(0,J.useRef)(null),s=(0,J.useRef)(new Map),c=(0,J.useId)(),[l,u]=(0,J.useState)(null),[m,v]=(0,J.useState)(()=>new Set(i.open&&i.active?[i.active]:[])),x=i.tabs.filter(G),S=i.active!==null&&x.includes(i.active)?i.active:x[0]??null,C=i.splitWith!==null&&x.includes(i.splitWith)&&i.splitWith!==S?i.splitWith:null,w=i.open&&S!==null,T=t!==`column`;(0,J.useEffect)(()=>{w&&v(e=>{let t=[S,C].filter(e=>e!==null),n=new Set([...e].filter(e=>x.includes(e)));for(let e of t)n.add(e);return n.size===e.size&&[...n].every(t=>e.has(t))?e:n})},[w,S,C,x.join(`|`)]),(0,J.useEffect)(()=>{if(!w||!T)return;let e=document.activeElement;return o.current?.focus({preventScroll:!0}),()=>{e&&document.contains(e)&&e.focus({preventScroll:!0})}},[w,T]);let E=(0,J.useCallback)(e=>{if(!T)return;let t=e.target instanceof Element&&e.target.closest(`[data-dock-pane="terminal"]`)!==null;if(e.key===`Escape`&&!t&&!e.defaultPrevented){e.preventDefault(),y();return}if(e.key!==`Tab`||t)return;let n=o.current;if(!n)return;let r=Array.from(n.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.closest(`[hidden]`));if(r.length===0)return;let i=r[0],a=r[r.length-1];e.shiftKey&&document.activeElement===i?(e.preventDefault(),a.focus()):!e.shiftKey&&document.activeElement===a&&(e.preventDefault(),i.focus())},[T]);if(!w)return null;function ee(e,t){let n=x.indexOf(t),r;if(e.key===`ArrowRight`)r=x[(n+1)%x.length];else if(e.key===`ArrowLeft`)r=x[(n-1+x.length)%x.length];else if(e.key===`Home`)r=x[0];else if(e.key===`End`)r=x[x.length-1];else if((e.key===`Delete`||e.key===`Backspace`)&&x.length>0){e.preventDefault(),b(t);return}r&&(e.preventDefault(),f(r),s.current.get(r)?.focus())}let D=d.map(e=>e.id).filter(e=>G(e)&&!x.includes(e)),O=D.map(e=>({id:e,label:K[e],icon:V[e]({}),onSelect:()=>f(e)})),te=[...d.map(e=>e.id).filter(e=>G(e)&&e!==S).map(e=>({id:e,label:`${K[e]} below`,icon:V[e]({}),onSelect:()=>h(e)})),...C?[{id:`unsplit`,label:`One pane`,separated:!0,onSelect:()=>h(null)}]:[]],k=Le(`dock.toggle`),A=t===`column`?r:p(i.width,n),ne=`Dock: ${K[S]}${C?` over ${K[C]}`:``}`,re=(0,X.jsxs)(`aside`,{ref:o,className:$.dock,"data-presentation":t,"data-split":C?`true`:void 0,"aria-label":ne,role:T?`dialog`:`complementary`,"aria-modal":T?!0:void 0,tabIndex:-1,style:t===`bottom-sheet`?{height:`${g.bottomSheetHeightVh}vh`}:{width:A},onKeyDown:E,children:[t===`column`?(0,X.jsx)(Ue,{width:A,windowWidth:n}):null,t===`bottom-sheet`?(0,X.jsx)(`span`,{className:$.grabber,"aria-hidden":`true`}):null,(0,X.jsxs)(`div`,{className:$.head,children:[(0,X.jsx)(`div`,{className:$.tabs,role:`tablist`,"aria-label":`Dock panes`,children:x.map(e=>{let t=V[e],n=e===S,r=e===C;return(0,X.jsxs)(`div`,{className:$.tabWrap,"data-selected":n||void 0,"data-below":r||void 0,children:[(0,X.jsxs)(`button`,{ref:t=>{t?s.current.set(e,t):s.current.delete(e)},type:`button`,role:`tab`,id:`${c}-tab-${e}`,"aria-selected":n,"aria-controls":`${c}-pane-${e}`,tabIndex:n?0:-1,className:$.tab,onClick:()=>f(e),onKeyDown:t=>ee(t,e),title:r?`${K[e]} (lower pane)`:void 0,children:[(0,X.jsx)(t,{size:14}),(0,X.jsx)(`span`,{className:$.tabLabel,children:K[e]})]}),(0,X.jsx)(`button`,{type:`button`,className:$.tabClose,"aria-label":`Close ${K[e]}`,title:`Close ${K[e]}`,tabIndex:-1,onClick:()=>b(e),children:(0,X.jsx)(H,{size:12})})]},e)})}),(0,X.jsxs)(`div`,{className:$.headActions,children:[(0,X.jsx)(`button`,{type:`button`,className:$.iconButton,"aria-label":`Add a pane`,title:D.length>0?`Add a pane`:`Every pane is already open`,"aria-haspopup":`menu`,"aria-expanded":l?.kind===`add`,disabled:D.length===0,onClick:e=>u({kind:`add`,anchor:R(e.currentTarget),from:e.currentTarget}),children:(0,X.jsx)(`span`,{className:$.plus,"aria-hidden":`true`,children:`+`})}),t!==`bottom-sheet`&&te.length>0?(0,X.jsx)(`button`,{type:`button`,className:$.iconButton,"aria-label":C?`Split: change or undo`:`Split the dock`,title:C?`Change the split`:`Split: show a second pane below`,"aria-haspopup":`menu`,"aria-expanded":l?.kind===`split`,"aria-pressed":C!==null,onClick:e=>u({kind:`split`,anchor:R(e.currentTarget),from:e.currentTarget}),children:(0,X.jsx)(_e,{size:14})}):null,(0,X.jsx)(`button`,{type:`button`,className:$.iconButton,"aria-label":`Close the dock`,title:`Close the dock${k?` (${k})`:``}`,onClick:y,children:(0,X.jsx)(H,{size:14})})]})]}),(0,X.jsxs)(`div`,{className:$.body,children:[x.filter(e=>m.has(e)||e===S||e===C).map(n=>{let r=n===S||n===C&&t!==`bottom-sheet`,o=n===S?`top`:n===C?`bottom`:`hidden`;return(0,X.jsx)(`div`,{id:`${c}-pane-${n}`,role:`tabpanel`,"aria-labelledby":`${c}-tab-${n}`,className:$.pane,"data-dock-pane":n,"data-position":r?o:`hidden`,hidden:!r,inert:!r,style:r&&C&&t!==`bottom-sheet`?{flexBasis:`${(o===`top`?i.splitRatio:1-i.splitRatio)*100}%`,order:o===`top`?0:2}:void 0,children:(0,X.jsx)(He,{pane:n,visible:r,...e,requests:a})},n)}),C&&t!==`bottom-sheet`?(0,X.jsx)(We,{ratio:i.splitRatio,lower:K[C]}):null]}),l?(0,X.jsx)(z,{label:l.kind===`add`?`Add a pane`:`Split the dock`,items:l.kind===`add`?O:te,anchor:l.anchor,returnFocus:l.from,onClose:()=>u(null)}):null]});return T?(0,X.jsxs)(`div`,{className:$.sheetLayer,"data-presentation":t,children:[(0,X.jsx)(`button`,{type:`button`,className:$.scrim,"aria-label":`Close the dock`,tabIndex:-1,onClick:y}),re]}):re}function He({pane:e,visible:t,sessionId:n,roots:r,turnFiles:i,onSendToChat:a,onAddToMessage:o,renderTasks:s,renderContext:c,requests:l}){if(e===`tasks`)return(0,X.jsx)(X.Fragment,{children:s(t)});if(e===`context`)return(0,X.jsx)(X.Fragment,{children:c(t)});if(n===null){let t=Le(`chat.new`);return(0,X.jsx)(ye,{compact:!0,title:`Open a chat to use ${K[e]}`,body:`Pick a chat in the sidebar${t?` or start one with ${t}`:``}. ${K[e]} works in that chat's folders.`})}switch(e){case`terminal`:return(0,X.jsx)(be,{sessionId:n,roots:r,request:l.terminal,onSendToChat:a,visible:t});case`preview`:return(0,X.jsx)(Se,{sessionId:n,roots:r,request:l.preview,visible:t,onOpenTerminal:m});case`diff`:return(0,X.jsx)(xe,{sessionId:n,roots:r,request:l.diff,turnFiles:i,onAddToMessage:o,visible:t});default:return null}}function Ue({width:e,windowWidth:t}){let n=Math.max(g.minWidth,Math.floor(t*g.maxWidthFraction)),r=(0,J.useRef)(null),[i,a]=(0,J.useState)(!1);function o(t){t.button===0&&(t.preventDefault(),r.current={startX:t.clientX,startWidth:e},t.currentTarget.setPointerCapture?.(t.pointerId),a(!0),document.body.setAttribute(`data-verse-resizing`,`true`))}function s(e){let n=r.current;n&&x(p(n.startWidth+(n.startX-e.clientX),t))}function c(){r.current=null,a(!1),document.body.removeAttribute(`data-verse-resizing`)}(0,J.useEffect)(()=>()=>document.body.removeAttribute(`data-verse-resizing`),[]);function l(r){let i=r.shiftKey?ze:Re,a=null;r.key===`ArrowLeft`?a=e+i:r.key===`ArrowRight`?a=e-i:r.key===`Home`?a=g.minWidth:r.key===`End`&&(a=n),a!==null&&(r.preventDefault(),x(p(a,t)))}return(0,X.jsx)(`div`,{className:$.widthHandle,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the dock`,"aria-valuemin":g.minWidth,"aria-valuemax":n,"aria-valuenow":Math.round(e),tabIndex:0,"data-dragging":i||void 0,onPointerDown:o,onPointerMove:s,onPointerUp:c,onPointerCancel:c,onLostPointerCapture:c,onDoubleClick:()=>x(g.defaultWidth),onKeyDown:l})}function We({ratio:e,lower:t}){let n=(0,J.useRef)(null),r=(0,J.useRef)(null);function i(e){if(e.button!==0)return;let t=n.current?.parentElement;if(!t)return;e.preventDefault();let i=t.getBoundingClientRect();r.current={top:i.top,height:i.height},e.currentTarget.setPointerCapture?.(e.pointerId)}function a(e){let t=r.current;!t||t.height<=0||v((e.clientY-t.top)/t.height)}function o(t){t.key===`ArrowUp`?(t.preventDefault(),v(e-Be)):t.key===`ArrowDown`&&(t.preventDefault(),v(e+Be))}return(0,X.jsx)(`div`,{ref:n,className:$.splitHandle,role:`separator`,"aria-orientation":`horizontal`,"aria-label":`Resize: ${t} below`,"aria-valuemin":Math.round(g.splitRatio.min*100),"aria-valuemax":Math.round(g.splitRatio.max*100),"aria-valuenow":Math.round(e*100),tabIndex:0,style:{order:1},onPointerDown:i,onPointerMove:a,onPointerUp:()=>{r.current=null},onPointerCancel:()=>{r.current=null},onDoubleClick:()=>v(g.splitRatio.default),onKeyDown:o})}var Ge=20,Ke={running:`running`,done:`done`,failed:`failed`};function qe({turnTasks:e,otherChats:t,hasSession:n,onOpenSession:r}){let i=l(`chat.new`)?.keys[0],a=i?c(i):null,o=e.filter(e=>e.status===`running`),s=e.filter(e=>e.status!==`running`).slice(0,Ge);return(0,X.jsxs)(`div`,{className:Q.pane,"aria-label":`Tasks`,children:[(0,X.jsxs)(`section`,{className:Q.section,"aria-labelledby":`dock-tasks-turn`,children:[(0,X.jsxs)(`h3`,{id:`dock-tasks-turn`,className:Q.sectionTitle,children:[`This chat `,(0,X.jsx)(`span`,{className:Q.count,children:o.length>0?`${o.length} running`:``})]}),n?e.length===0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:Q.muted,children:`No tool calls in the latest turn.`}),(0,X.jsx)(`p`,{className:Q.hint,children:`Send a message: each tool the agent runs shows up here, and a click jumps to it in the chat.`})]}):(0,X.jsx)(`ul`,{className:Q.taskList,children:[...o,...s].map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,className:Q.task,"data-status":e.status,onClick:()=>{Te(he(e.toolUseId))},"aria-label":`${e.kind===`subagent`?`Subagent`:e.name}: ${e.detail}, ${Ke[e.status]}. Jump to it in the chat.`,children:[(0,X.jsx)(`span`,{className:Q.taskMark,"data-status":e.status,"aria-hidden":`true`}),(0,X.jsx)(`span`,{className:Q.taskName,title:e.kind===`subagent`?`Subagent`:e.name,children:e.kind===`subagent`?`Subagent`:e.name}),(0,X.jsx)(`span`,{className:Q.taskDetail,title:e.detail,children:e.detail}),(0,X.jsx)(`span`,{className:Q.taskTime,children:e.status===`running`?(0,X.jsx)(B,{since:e.startedAt}):e.status===`failed`?`failed`:e.durationMs!==null&&e.durationMs>0?D(e.durationMs):`done`})]})},e.toolUseId))}):(0,X.jsx)(`p`,{className:Q.muted,children:`Open a chat to see its tool calls here.`})]}),(0,X.jsxs)(`section`,{className:Q.section,"aria-labelledby":`dock-tasks-chats`,children:[(0,X.jsxs)(`h3`,{id:`dock-tasks-chats`,className:Q.sectionTitle,children:[`Other chats `,(0,X.jsx)(`span`,{className:Q.count,children:t.length>0?`${t.length} running`:``})]}),t.length===0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:Q.muted,children:`No other chat is running.`}),(0,X.jsxs)(`p`,{className:Q.hint,children:[a?`Start another with ${a}`:`Start another chat`,` and it shows here while it works, one click away.`]})]}):(0,X.jsx)(`ul`,{className:Q.taskList,children:t.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,className:Q.task,"data-status":`running`,onClick:()=>r(e.sessionId),"aria-label":`${e.title||`Untitled chat`}, running${e.live?`: ${e.live}`:``}. Open this chat.`,children:[(0,X.jsx)(Je,{engine:e.engine}),(0,X.jsx)(`span`,{className:Q.taskName,title:e.title||`Untitled chat`,children:e.title||`Untitled chat`}),(0,X.jsx)(`span`,{className:Q.taskDetail,title:e.live??void 0,children:e.live??``}),(0,X.jsx)(`span`,{className:Q.taskTime,children:e.startedAt?(0,X.jsx)(B,{since:e.startedAt}):`running`})]})},e.sessionId))})]})]})}function Je({engine:e}){return(0,X.jsx)(`span`,{className:Q.engineTick,"data-engine":e,"aria-hidden":`true`,children:u[e]})}function Ye(e){let{session:t,seats:n,events:r,rootsData:i,rootsError:a,otherRunning:o,dispatchEnabled:s,onOpenSession:c,onHandoff:l,onOpenAccounts:u}=e,d=s?t?.status===`running`?`Available when the current turn finishes.`:null:`Sending is disabled on this server.`;return(0,X.jsx)(Ve,{presentation:e.presentation,windowWidth:e.windowWidth,columnWidth:e.columnWidth,sessionId:t?.id??null,roots:e.roots,turnFiles:e.turnFiles,onSendToChat:e.onSendToChat,onAddToMessage:e.onAddToMessage,renderTasks:()=>(0,X.jsx)(Xe,{sessionId:t?.id??null,otherChats:o,onOpenSession:c}),renderContext:e=>(0,X.jsx)(Ie,{session:t,seats:n,events:r,roots:i,rootsError:a,visible:e,onHandoff:t?()=>l(t.id):void 0,handoffDisabledReason:d,onOpenAccounts:u})})}function Xe({sessionId:e,otherChats:t,onOpenSession:n}){let r=we(e),i=(0,J.useMemo)(()=>U(r.items),[r.items]);return(0,X.jsx)(qe,{turnTasks:i,otherChats:t,hasSession:e!==null,onOpenSession:n})}export{Ye as DockHost};
|
|
2
|
-
//# sourceMappingURL=DockHost-DvR-hPhZ.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Advanced-DEM93sKI.js","assets/index-oAAq8XJa.js","assets/global-Di2PUgj4.js","assets/global-_tOCFt9y.css","assets/MutationTokenDialog-SkRxqV_I.js","assets/MutationTokenDialog-Cum_DqQZ.css","assets/Epistemic-uARPnx9x.js","assets/Epistemic-OaGnEJkn.css","assets/StatusBadge-BwnBNFQr.js","assets/StatusBadge-BVi0IBb9.css","assets/RouteErrorBoundary-C5SxA2Dg.js","assets/RouteErrorBoundary-6RMd_aZg.css","assets/RefreshIndicator-BLnr9IOM.js","assets/RefreshIndicator-CVv22U_j.css","assets/verse-queries-DvIJcn6Z.js","assets/workbench-types-DzN-5trg.js","assets/VerseConsoleApp-WVeyJnW7.js","assets/command-catalog-BdtDH93o.js","assets/guarded-action-CvOHcqyH.js","assets/viewport-BEqGUoTA.js","assets/verse-ui-store-zafyzXKD.js","assets/dock-store-BA1cHOYA.js","assets/composer-keys-DBRymxQn.js","assets/command-bus-DqimKCUY.js","assets/section-visibility-qFqc_d4Z.js","assets/useActivity-Bk3XgXjL.js","assets/icons-B_yuAgdN.js","assets/VerseConsoleApp-Cxqr-3qc.css","assets/Segmented-BL40udoO.js","assets/Segmented-BnjHbKzH.css","assets/format-B8DAVcn2.js","assets/format-DKrNjdwD.js","assets/verse-model-D7NZQFAR.js","assets/workspace-model-D_tWD5Wt.js","assets/Meter-D-hncpkO.js","assets/Meter-CYt9KpM0.css","assets/Select-FWLnAw_j.js","assets/Select-DSu5ghId.css","assets/control-queries-DOZR-D8G.js","assets/mutations-Dpsql5t7.js","assets/use-ticker-BNc1H4ZC.js","assets/fleet-model-CNe8Wh-s.js","assets/fleet-queries-BSdRlUwJ.js","assets/overnight-queries-X-44Gsw5.js","assets/use-guarded-action-C2HlSzkz.js","assets/Advanced-Bywv_iYR.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,n as t,s as n,t as r}from"./index-oAAq8XJa.js";import{h as i,m as a}from"./global-Di2PUgj4.js";import{t as o}from"./RefreshIndicator-BLnr9IOM.js";import{n as s,t as c}from"./Swimlane-DR4OgON_.js";import{n as l,t as u}from"./Funnel-CL8uHONq.js";import{n as ee}from"./viewport-BEqGUoTA.js";import{r as d}from"./section-visibility-qFqc_d4Z.js";import{o as f}from"./icons-B_yuAgdN.js";import{g as p}from"./VerseConsoleApp-WVeyJnW7.js";import{l as m}from"./format-B8DAVcn2.js";import{t as h}from"./Tag-_-K1h7Hk.js";import{n as te,t as g}from"./budget-queries-wUshcovN.js";import{t as _}from"./Button-DYv_KKxr.js";import{f as v,t as y}from"./cloud.module-CiwatLj3.js";import{n as b,t as ne}from"./cloud-queries-CnV1yaNG.js";import{t as re}from"./use-ticker-BNc1H4ZC.js";import{a as ie,r as x}from"./overnight-queries-X-44Gsw5.js";import{c as S,i as C}from"./surface-data-J52iIGMD.js";import{n as w,t as ae}from"./actions-s2lfm_5k.js";import{r as oe}from"./dark-since-DOMvtB_G.js";import{a as se,i as T,n as E,r as D,t as O}from"./Surface-B3TZVoER.js";import{a as ce,c as le,d as k,f as ue,g as de,h as fe,i as pe,l as me,m as he,n as ge,o as A,p as j,r as M,s as N,t as P,u as F}from"./live-model-DCw_IFRI.js";var I=n(e(),1),L=t();function _e({classes:e={}}){let t=a(b,{freshMs:15e3}),n=i(b);d(n,ne);let r=t.data?.value??null;if(!r)return null;let o=v(r.tasks),s=`Claude Code cloud sessions Verse launched that have not delivered a PR yet. ${r.budget.sessionsToday} of ${r.budget.budget.maxSessionsPerDay} sessions used today.`;return(0,L.jsxs)(`li`,{className:`${e.lane??``} ${y.laneChip}`,"data-active":o>0||void 0,title:s,"aria-label":`Cloud: ${o} running`,children:[(0,L.jsx)(`span`,{className:e.name,children:`Cloud`}),(0,L.jsx)(`span`,{className:e.sep,"aria-hidden":`true`,children:` · `}),(0,L.jsxs)(`span`,{className:e.slots,children:[o,` running`]})]})}var R={stack:`_stack_j599h_5`,muted:`_muted_j599h_11`,link:`_link_j599h_18`,disclosure:`_disclosure_j599h_34`,num:`_num_j599h_39`,lanes:`_lanes_j599h_45`,lane:`_lane_j599h_45`,laneName:`_laneName_j599h_72`,laneSlots:`_laneSlots_j599h_77`,laneSep:`_laneSep_j599h_83`,laneStrip:`_laneStrip_j599h_88`,laneNotes:`_laneNotes_j599h_94`,laneNoteLanes:`_laneNoteLanes_j599h_107`,decision:`_decision_j599h_113`,decisionLead:`_decisionLead_j599h_119`,mode:`_mode_j599h_129`,decisionWhy:`_decisionWhy_j599h_142`,candidates:`_candidates_j599h_149`,exclusions:`_exclusions_j599h_150`,excluded:`_excluded_j599h_170`,excludedWhy:`_excludedWhy_j599h_175`,excludedWhen:`_excludedWhen_j599h_179`,overnight:`_overnight_j599h_184`,overnightLead:`_overnightLead_j599h_190`,facts:`_facts_j599h_196`,discarded:`_discarded_j599h_219`,discardTitle:`_discardTitle_j599h_234`,discardWhy:`_discardWhy_j599h_238`,tableWrap:`_tableWrap_j599h_243`,table:`_table_j599h_243`,repoName:`_repoName_j599h_276`,actionCell:`_actionCell_j599h_283`,stage:`_stage_j599h_287`,stageNote:`_stageNote_j599h_309`,green:`_green_j599h_314`,greenValue:`_greenValue_j599h_320`,holds:`_holds_j599h_325`,hold:`_hold_j599h_325`,repoCards:`_repoCards_j599h_347`,repoCard:`_repoCard_j599h_347`,repoCardHead:`_repoCardHead_j599h_365`,advanced:`_advanced_j599h_373`,chevron:`_chevron_j599h_399`,disclosureNote:`_disclosureNote_j599h_407`},z=36e5;function B(e,t,n){if(!e)return{kind:`loading`};let r=e.value;return r?r.state===`dark`&&!n?oe(r):n?{kind:`ready`}:{kind:`empty`,message:t}:{kind:`unknown`,reason:e.reason??`the live fleet view did not answer.`}}function ve({lane:e}){let t=pe(e);return(0,L.jsxs)(`li`,{className:R.lane,"data-off":e.slots===0||void 0,title:A(e)??void 0,children:[(0,L.jsx)(h,{engine:P[e.lane]}),(0,L.jsx)(`span`,{className:R.laneName,children:t.name}),(0,L.jsx)(`span`,{className:R.laneSep,"aria-hidden":`true`,children:` · `}),(0,L.jsx)(`span`,{className:R.laneSlots,children:t.slots})]})}function ye({live:e}){if(!e||e.lanes.length===0)return null;let t=ce(e.lanes);return(0,L.jsxs)(`div`,{className:R.laneStrip,children:[(0,L.jsxs)(`ul`,{className:R.lanes,"aria-label":`Lanes: busy of slots`,children:[e.lanes.map(e=>(0,L.jsx)(ve,{lane:e},e.lane)),(0,L.jsx)(_e,{classes:{lane:R.lane,name:R.laneName,sep:R.laneSep,slots:R.laneSlots}})]}),t.length>0?(0,L.jsx)(`ul`,{className:R.laneNotes,"aria-label":`Why lanes are limited`,children:t.map(e=>(0,L.jsxs)(`li`,{children:[e.all?null:(0,L.jsxs)(`span`,{className:R.laneNoteLanes,children:[e.lanes.map(e=>ge[e]).join(`, `),`: `]}),ue(e.reason)]},e.lanes.join(`,`)))}):null]})}function V({read:e,now:t,hours:n}){let r=e?.value??null,i=t-n*z,a=r?N(r.runs,i,t,{includeParked:!1}):[];return(0,L.jsx)(c,{title:`Live fleet`,description:`Lanes × slots, last ${n} h · bars coloured by phase or outcome · outlines are queued`,status:B(e,`Nothing ran in the last ${n} hours.`,a.length>0),lanes:a,from:i,to:t,now:t,toneOf:k})}function be({read:e}){let t=(e?.value??null)?.funnel??null,n=M(t),r=F(t),i=t?`${new Date(t.from).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})} – ${new Date(t.to).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}`:void 0;return(0,L.jsxs)(`div`,{className:R.stack,children:[(0,L.jsx)(u,{title:`Gate funnel`,description:i?`Proposals through G0–G7, ${i}`:`Proposals through the merge gates G0–G7`,status:B(e,`No proposal reached the gates in this window.`,n.length>0),stages:n}),(0,L.jsx)(l,{title:`Refusals by gate`,description:r.total?`${r.total} refusals · top reasons keep their colour`:`Why proposals stopped`,status:B(e,`Nothing was refused in this window.`,r.total>0),categories:r.categories,segments:r.segments,values:r.values,height:180})]})}function H(e,t){let n=e?.seatInfo.find(e=>e.seatId===t);return{label:n?.label??t,engine:n?.engine??null}}function U({decision:e,view:t,now:n}){let r=e.seatId?H(t,e.seatId):null;return(0,L.jsxs)(`div`,{className:R.decision,children:[(0,L.jsxs)(`p`,{className:R.decisionLead,children:[r?(0,L.jsxs)(L.Fragment,{children:[r.engine?(0,L.jsx)(h,{engine:r.engine}):null,(0,L.jsx)(`strong`,{children:r.label})]}):(0,L.jsx)(`strong`,{children:`No seat`}),(0,L.jsx)(`span`,{className:R.mode,children:e.mode})]}),(0,L.jsx)(`p`,{className:R.decisionWhy,children:j(e)}),e.candidates.length>1?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(T,{children:`Then`}),(0,L.jsx)(`ol`,{className:R.candidates,children:e.candidates.slice(+!!e.seatId).map(e=>(0,L.jsx)(`li`,{children:H(t,e).label},e))})]}):null,e.exclusions.length?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(T,{children:`Held back`}),(0,L.jsx)(`ul`,{className:R.exclusions,"aria-label":`Held back seats`,children:e.exclusions.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{className:R.excluded,children:H(t,e.seatId).label}),(0,L.jsx)(`span`,{className:R.excludedWhy,children:de(e)}),(0,L.jsxs)(`span`,{className:R.excludedWhen,children:[`eligible again: `,he(fe(e),n)]})]},e.seatId))})]}):null]})}function xe({read:e,preview:t,view:n,now:r}){let i=le(e?.value??null);return(0,L.jsx)(O,{title:`Why this seat`,caption:i?`Latest dispatch: ${i.run.title} (${m(i.run.phaseStartedAt??i.run.startedAt)})`:t?`The next medium autonomous task would go to…`:void 0,children:i?(0,L.jsx)(U,{decision:i.decision,view:n,now:r}):t?(0,L.jsx)(U,{decision:t,view:n,now:r}):(0,L.jsx)(E,{tone:`unknown`,children:`No routing decision to show — nothing was dispatched, and the router preview did not answer.`})})}function Se({read:e,now:t}){let n=e?.value??null,r=n?me(n.runs,t):{lanes:[],from:t-z,to:t+2*z,unknownRelease:0};return(0,L.jsx)(c,{title:`Parked`,description:`Waiting for a seat to free up — each bar ends when it should`,caveat:r.unknownRelease?`${r.unknownRelease} item${r.unknownRelease===1?` has`:`s have`} no known release time; ${r.unknownRelease===1?`it runs`:`they run`} to the right edge.`:void 0,status:B(e,`Nothing is parked.`,r.lanes.length>0),lanes:r.lanes,from:r.from,to:r.to,now:t,toneOf:k,formatTick:e=>new Date(e).toLocaleString(`en-US`,{weekday:`short`,hour:`numeric`})})}function Ce({read:e,onOpenAdvanced:t}){let n=e?.value??null,r=n?.run??null;return(0,L.jsx)(O,{title:`Overnight`,caption:n?n.armed?`Armed`:`Not armed`:void 0,actions:(0,L.jsx)(`button`,{type:`button`,className:R.link,onClick:t,children:`Arm or stop in Advanced`}),children:e?n?!n.armed&&!r?(0,L.jsx)(E,{children:`Nothing armed. The fleet runs on its normal schedule; arm an unattended run from Advanced when you walk away.`}):(0,L.jsxs)(`div`,{className:R.overnight,children:[r?.stopRule?(0,L.jsx)(`p`,{className:R.overnightLead,children:ie(r.stopRule)}):null,(0,L.jsxs)(`dl`,{className:R.facts,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Started`}),(0,L.jsx)(`dd`,{children:r?.startedAt?m(r.startedAt):`—`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Iterations`}),(0,L.jsx)(`dd`,{children:r?.iterationsDone??`—`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Merged`}),(0,L.jsx)(`dd`,{children:r?r.merged.length:`—`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Discarded`}),(0,L.jsx)(`dd`,{children:r?r.discarded.length:`—`})]})]}),r?.activity?(0,L.jsxs)(`p`,{className:R.muted,children:[`Now: `,r.activity]}):null,r&&r.discarded.length?(0,L.jsx)(`ul`,{className:R.discarded,"aria-label":`Discarded work`,children:r.discarded.slice(0,3).map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{className:R.discardTitle,children:e.title}),(0,L.jsx)(`span`,{className:R.discardWhy,children:e.reason})]},e.id))}):null]}):(0,L.jsx)(E,{tone:`unknown`,children:e.reason??`The overnight lane did not answer.`}):(0,L.jsx)(`p`,{className:R.muted,"aria-busy":`true`,children:`Reading the overnight lane…`})})}var W={quarantine:`Quarantined`,"owner-hold":`On hold (you)`,"leader-pause":`Paused by Leader`,cooldown:`Cooling down`};function we(e,t){let n=e.until?Date.parse(e.until):NaN,r=Number.isFinite(n)?Math.max(0,n-t):null,i=r===null?`until resumed`:r<36e5?`${Math.ceil(r/6e4)}m left`:`${Math.round(r/36e5)}h left`;return`${W[e.kind]} · ${i}`}function G(e){return e.includes(`/`)?e.split(`/`)[1]:e}function K({row:e}){return e.stage===null?(0,L.jsx)(`span`,{className:R.stage,"data-stage":`none`,children:`Not in grant`}):(0,L.jsxs)(`span`,{className:R.stage,"data-stage":e.stage,children:[e.stage===`merge`?`Merge`:`Propose`,e.enforcement===`local`?(0,L.jsx)(`span`,{className:R.stageNote,children:` · local checks`}):null]})}function q({row:e,actions:t}){let n=t.busy||t.readOnly;return e.holds.length?(0,L.jsx)(_,{size:`sm`,variant:`subtle`,disabled:n,"aria-label":`Resume ${e.repo}`,onClick:()=>t.act(()=>S({action:`resume-repo`,repo:e.repo}),`Resume ${e.repo}`,{confirm:{title:`Resume ${G(e.repo)}?`,body:`Clears ${e.holds.map(e=>W[e.kind].toLowerCase()).join(` and `)}. New fleet work can start there on the next tick.`,confirmLabel:`Resume`}}),children:`Resume`}):e.stage===null?null:(0,L.jsx)(_,{size:`sm`,variant:`ghost`,disabled:n,"aria-label":`Pause ${e.repo}`,onClick:()=>t.act(()=>S({action:`pause-repo`,repo:e.repo,reason:`Paused by Mason from the Fleet surface`}),`Pause ${e.repo}`,{confirm:{title:`Pause ${G(e.repo)}?`,body:`No new fleet work starts there until you resume it. Runs already in flight finish and are watched as usual.`,confirmLabel:`Pause repo`,destructive:!0}}),children:`Pause`})}function J({row:e}){return(0,L.jsxs)(`span`,{className:R.green,children:[(0,L.jsx)(`span`,{className:R.greenValue,children:e.greenPct7d===null?`—`:`${Math.round(e.greenPct7d)}%`}),(0,L.jsx)(s,{points:e.greenTrend,width:64,height:18,ariaLabel:`${e.repo} post-merge green, 14 days`,describe:e=>`${Math.round(e)}%`})]})}function Y({row:e,now:t}){return e.holds.length?(0,L.jsx)(`span`,{className:R.holds,children:e.holds.map(e=>(0,L.jsx)(`span`,{className:R.hold,"data-kind":e.kind,title:e.reason,children:we(e,t)},e.kind))}):(0,L.jsx)(`span`,{className:R.muted,children:`—`})}function X(e){if(e===void 0)return null;if(e===null)return`Fleet mirrors: unknown — the enrollment registry could not be read.`;if(e.count===0)return`Fleet mirrors: none yet — the fleet clones a repo the first time it works on it.`;let t=e.repos.slice(0,6).join(`, `),n=e.repos.length>6?` and ${e.repos.length-6} more`:``;return`Fleet mirrors: ${e.count} working ${e.count===1?`copy`:`copies`}${t?` (${t}${n})`:``} — the fleet's own clones of the repos above, not repos of their own.`}var Z=e=>e.mergesToday===null?`—`:`${e.mergesToday}${e.maxMergesPerDay===null?``:` / ${e.maxMergesPerDay}`}`;function Te({read:e,actions:t,now:n,compact:r}){let i=e?.value??null,a=i?.repos??[];return(0,L.jsxs)(O,{title:`Repositories`,caption:i?`${a.length} enrolled · stage is what the grant and rollout allow right now`:void 0,children:[e?i?a.length===0?(0,L.jsx)(E,{children:`No repositories are enrolled.`}):r?(0,L.jsx)(`ul`,{className:R.repoCards,children:a.map(e=>(0,L.jsxs)(`li`,{className:R.repoCard,id:p(`repo-${e.repo}`),children:[(0,L.jsxs)(`div`,{className:R.repoCardHead,children:[(0,L.jsx)(`span`,{className:R.repoName,children:e.repo}),(0,L.jsx)(q,{row:e,actions:t})]}),(0,L.jsxs)(`dl`,{className:R.facts,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Stage`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(K,{row:e})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Last merge`}),(0,L.jsx)(`dd`,{children:e.lastMergeAt?m(e.lastMergeAt):`—`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Today`}),(0,L.jsx)(`dd`,{children:Z(e)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Green 7d`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(J,{row:e})})]})]}),(0,L.jsx)(Y,{row:e,now:n})]},e.repo))}):(0,L.jsx)(`div`,{className:R.tableWrap,children:(0,L.jsxs)(`table`,{className:R.table,children:[(0,L.jsx)(`caption`,{className:`visually-hidden`,children:`Enrolled repositories`}),(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Repository`}),(0,L.jsx)(`th`,{scope:`col`,children:`Stage`}),(0,L.jsx)(`th`,{scope:`col`,children:`Last merge`}),(0,L.jsx)(`th`,{scope:`col`,className:R.num,children:`Today`}),(0,L.jsx)(`th`,{scope:`col`,children:`Post-merge green · 14d`}),(0,L.jsx)(`th`,{scope:`col`,className:R.num,children:`Open PRs`}),(0,L.jsx)(`th`,{scope:`col`,children:`Holds`}),(0,L.jsx)(`th`,{scope:`col`,children:(0,L.jsx)(`span`,{className:`visually-hidden`,children:`Action`})})]})}),(0,L.jsx)(`tbody`,{children:a.map(e=>(0,L.jsxs)(`tr`,{id:p(`repo-${e.repo}`),"data-held":e.holds.length>0||void 0,children:[(0,L.jsx)(`th`,{scope:`row`,className:R.repoName,children:e.repo}),(0,L.jsx)(`td`,{children:(0,L.jsx)(K,{row:e})}),(0,L.jsx)(`td`,{children:e.lastMergeAt?m(e.lastMergeAt):`—`}),(0,L.jsx)(`td`,{className:R.num,children:Z(e)}),(0,L.jsx)(`td`,{children:(0,L.jsx)(J,{row:e})}),(0,L.jsx)(`td`,{className:R.num,children:e.openFleetPrs??`—`}),(0,L.jsx)(`td`,{children:(0,L.jsx)(Y,{row:e,now:n})}),(0,L.jsx)(`td`,{className:R.actionCell,children:(0,L.jsx)(q,{row:e,actions:t})})]},e.repo))})]})}):(0,L.jsx)(E,{tone:`unknown`,children:e.reason??`The live fleet view did not answer.`}):(0,L.jsx)(`p`,{className:R.muted,"aria-busy":`true`,children:`Reading repositories…`}),i&&X(i.mirrors)?(0,L.jsx)(`p`,{className:R.muted,children:X(i.mirrors)}):null]})}var Q=5e3,$=3e4,Ee=(0,I.lazy)(()=>r(()=>import(`./Advanced-DEM93sKI.js`).then(e=>e.t).then(e=>({default:()=>(0,L.jsx)(e.FleetAdvanced,{embedded:!0})})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])));function De(){let{compact:e}=ee(),t=a(C),n=a(x),r=a(te,{freshMs:15e3}),s=a(g,{freshMs:15e3}),c=i(C),l=i(x),u=i(g);d(c,Q),d(()=>{l(),u()},$);let p=re(15e3),m=w(),[h,_]=(0,I.useState)(!1),v=(0,I.useId)(),y=t.data?.value??null;function b(){_(!0),requestAnimationFrame(()=>document.getElementById(v)?.scrollIntoView?.({block:`start`,behavior:`smooth`}))}return(0,L.jsxs)(se,{title:`Fleet`,actions:t.status===`refreshing`?(0,L.jsx)(o,{}):null,lead:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ae,{actions:m}),(0,L.jsx)(ye,{live:y})]}),children:[(0,L.jsx)(D,{span:12,children:(0,L.jsx)(V,{read:t.data,now:p,hours:e?6:12})}),(0,L.jsx)(D,{span:7,children:(0,L.jsx)(be,{read:t.data})}),(0,L.jsx)(D,{span:5,children:(0,L.jsx)(xe,{read:t.data,preview:s.data??null,view:r.data??null,now:p})}),(0,L.jsx)(D,{span:7,children:(0,L.jsx)(Se,{read:t.data,now:p})}),(0,L.jsx)(D,{span:5,children:(0,L.jsx)(Ce,{read:n.data,onOpenAdvanced:b})}),(0,L.jsx)(D,{span:12,children:(0,L.jsx)(Te,{read:t.data,actions:m,now:p,compact:e})}),(0,L.jsx)(D,{span:12,children:(0,L.jsxs)(`div`,{className:R.advanced,children:[(0,L.jsxs)(`button`,{type:`button`,className:R.disclosure,"aria-expanded":h,"aria-controls":v,onClick:()=>_(e=>!e),children:[(0,L.jsx)(f,{className:R.chevron,width:14,height:14,"aria-hidden":`true`}),`Advanced`,(0,L.jsx)(`span`,{className:R.disclosureNote,children:`daemon, overnight, local runtime, caps, scope, activity, safety, goals`})]}),(0,L.jsx)(`div`,{id:v,hidden:!h,children:h?(0,L.jsx)(I.Suspense,{fallback:(0,L.jsx)(`p`,{className:R.muted,"aria-busy":`true`,children:`Loading the advanced panels…`}),children:(0,L.jsx)(Ee,{})}):null})]})}),m.dialogs]})}export{Q as FLEET_POLL_MS,$ as FLEET_SLOW_POLL_MS,De as FleetSection};
|
|
3
|
-
//# sourceMappingURL=FleetSection-D_zRBCub.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,s as r}from"./index-oAAq8XJa.js";import{_ as i}from"./global-Di2PUgj4.js";import{a,c as o,s}from"./command-catalog-BdtDH93o.js";import{C as c,O as l,h as u}from"./verse-ui-store-zafyzXKD.js";import{p as d}from"./icons-B_yuAgdN.js";import{f,m as p,n as m,u as h}from"./VerseConsoleApp-WVeyJnW7.js";var g=r(e(),1),_=r(t(),1),v={menu:`_menu_bwc3k_3`,pop:`_pop_bwc3k_1`,item:`_item_bwc3k_16`,icon:`_icon_bwc3k_33`,check:`_check_bwc3k_40`,label:`_label_bwc3k_49`,key:`_key_bwc3k_51`,separator:`_separator_bwc3k_57`,groupLabel:`_groupLabel_bwc3k_62`},y=n();function b(e){let t=s(e)?.keys[0];return t?o(t,a()):null}var x=[{value:`system`,label:`Match system`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}];function S({open:e,anchorRef:t,onClose:n,compact:r}){let a=p(),o=i(),s=(0,g.useRef)(null),[S,C]=(0,g.useState)(0),[w,T]=(0,g.useState)(null),E=[{key:`settings`,role:`menuitem`,label:`Settings`,icon:(0,y.jsx)(h,{}),shortcut:b(`section.settings`),run:()=>c(`settings`)},{key:`apps`,role:`menuitem`,label:`Apps & Accounts`,icon:(0,y.jsx)(m,{}),run:()=>c(`apps`)},{key:`usage`,role:`menuitem`,label:`Usage`,icon:(0,y.jsx)(f,{}),run:()=>c(`usage`)},{key:`shortcuts`,role:`menuitem`,label:`Keyboard shortcuts`,icon:(0,y.jsx)(d,{}),shortcut:b(`shortcuts.open`),run:()=>u(`shortcuts`)},...r?[]:[{key:`rail`,role:`menuitemcheckbox`,label:`Show rail labels`,shortcut:b(`rail.toggle-labels`),checked:a.railExpanded,run:l,stay:!0}],...x.map(e=>({key:`theme-${e.value}`,role:`menuitemradio`,label:e.label,checked:o.theme===e.value,run:()=>o.set(e.value),stay:!0}))];(0,g.useLayoutEffect)(()=>{if(!e)return;let n=t.current?.getBoundingClientRect();n&&T(r?{left:8,bottom:Math.max(8,window.innerHeight-n.top+8)}:{left:n.right+8,bottom:Math.max(8,window.innerHeight-n.bottom)})},[e,t,r]);let[D,O]=(0,g.useState)(e);e!==D&&(O(e),e&&C(0));let k=(0,g.useRef)(n);k.current=n,(0,g.useEffect)(()=>{if(!e)return;function n(e){let n=e.target;s.current?.contains(n)||t.current?.contains(n)||k.current()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t]);let A=w!==null;(0,g.useEffect)(()=>{e&&A&&s.current?.querySelector(`[data-index="${S}"]`)?.focus()},[S,e,A]);let j=(0,g.useRef)(!1);if((0,g.useEffect)(()=>{!e&&j.current&&(j.current=!1,t.current?.focus())},[e,t]),!e)return null;function M(e=!0){j.current=e,n()}function N(e){e.run(),e.stay||M(!1)}function P(e){let t=E.length;switch(e.key){case`ArrowDown`:e.preventDefault(),C(e=>(e+1)%t);break;case`ArrowUp`:e.preventDefault(),C(e=>(e-1+t)%t);break;case`Home`:e.preventDefault(),C(0);break;case`End`:e.preventDefault(),C(t-1);break;case`Escape`:e.preventDefault(),e.stopPropagation(),M();break;case`Tab`:M(!1)}}let F=E.findIndex(e=>e.key.startsWith(`theme-`));return(0,_.createPortal)((0,y.jsx)(`div`,{ref:s,role:`menu`,"aria-label":`Settings and more`,className:v.menu,"data-compact":r||void 0,style:w?{left:w.left,bottom:w.bottom}:{visibility:`hidden`},onKeyDown:P,children:E.map((e,t)=>(0,y.jsxs)(`div`,{role:`none`,children:[t===F?(0,y.jsx)(`div`,{role:`separator`,className:v.separator,children:(0,y.jsx)(`span`,{className:v.groupLabel,children:`Theme`})}):null,e.key===`rail`?(0,y.jsx)(`div`,{role:`separator`,className:v.separator}):null,(0,y.jsxs)(`button`,{type:`button`,role:e.role,"data-index":t,tabIndex:t===S?0:-1,"aria-checked":e.role===`menuitem`?void 0:e.checked===!0,className:v.item,onClick:()=>N(e),onMouseMove:()=>t!==S&&C(t),children:[(0,y.jsx)(`span`,{className:v.icon,"aria-hidden":`true`,children:e.role===`menuitem`?e.icon:e.checked?(0,y.jsx)(`span`,{className:v.check}):null}),(0,y.jsx)(`span`,{className:v.label,children:e.label}),e.shortcut?(0,y.jsx)(`kbd`,{className:v.key,children:e.shortcut}):null]})]},e.key))}),document.body)}export{S as GearTray};
|
|
2
|
-
//# sourceMappingURL=GearTray-C7k4l_BW.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{k as r,m as i}from"./global-Di2PUgj4.js";import{n as a,t as ee}from"./MutationTokenDialog-SkRxqV_I.js";import{v as te}from"./verse-ui-store-zafyzXKD.js";import{i as ne,l as re,m as ie}from"./verse-queries-DvIJcn6Z.js";import{t as ae}from"./Segmented-BL40udoO.js";import{b as oe,f as o,g as se,o as s,p as c,u as ce,y as l}from"./verse-store-DjBWj04q.js";import{t as le,v as ue}from"./format-B8DAVcn2.js";import{_ as de,n as fe}from"./verse-model-D7NZQFAR.js";import{l as pe,r as me,t as he}from"./context-queries-xVKIeynP.js";import{o as ge,s as _e}from"./context-model-MT17V86_.js";import{t as ve}from"./SeatSelector-DpvvbjNm.js";import{C as ye,S as be,c as u,d as xe,f as Se,g as Ce,h as we,m as Te,o as d,s as Ee,w as De,y as f}from"./context-model-Dwd49-dp.js";import{o as Oe}from"./workspace-model-D_tWD5Wt.js";import{n as ke,t as p}from"./use-token-gate-B3IJL6bf.js";import{t as m}from"./context.module-BijAfoJw.js";var h=n(e(),1),g=t();function _(e,t,n){if(!n)return u(e,t);if(e.length===0)return null;let r=e.find(e=>e.id===n.seatId);if(!r)return u(e,t);let i=we(r,n.model);if(i)return{seatId:r.id,model:i.id};let a=r.models.find(e=>!e.unavailableReason);return{seatId:r.id,model:a?a.id:n.model}}var Ae=4e3,je="Building the handoff reads this chat’s log and runs `git diff --stat` on its folders. It spends nothing.",Me=`Asking for a summary sends one turn to this chat’s seat.`,Ne=`Stopping the summary turn.`,Pe=`Creating the chat records a new session on this machine. Nothing is sent to a model until you press Send in it.`;function Fe(e,t){let n=null,r=!1;for(let i of e)if(`turnId`in i&&i.turnId===t){if(i.type===`error`)n=i.message;else if(i.type===`assistant-message`||i.type===`text-delta`&&i.text.trim().length>0)r=!0;else if(i.type===`cancelled`)return{kind:`cancelled`};else if(i.type===`turn-done`)return i.ok?r?{kind:`ok`}:{kind:`empty`}:{kind:`failed`,message:n}}return null}function v(e){return e.open?(0,g.jsx)(y,{...e}):null}function y({session:e,seats:t,onClose:n,onCreated:u,initialTarget:v}){let y=(0,h.useId)(),b=(0,h.useId)(),x=(0,h.useId)(),S=(0,h.useId)(),Ie=(0,h.useId)(),C=(0,h.useId)(),w=(0,h.useId)(),T=(0,h.useRef)(null),E=ke(),Le=i(pe),[D,Re]=(0,h.useState)(null),[O,k]=(0,h.useState)(`idle`),[A,j]=(0,h.useState)(null),[M,ze]=(0,h.useState)(``),[N,Be]=(0,h.useState)(``),[Ve,He]=(0,h.useState)(!1),P=(0,h.useRef)(0),F=(0,h.useRef)(!0);(0,h.useEffect)(()=>(F.current=!0,()=>{F.current=!1}),[]);let Ue=(0,h.useRef)(null);Ue.current=D;let We=E.run,I=(0,h.useCallback)(async t=>{let n=P.current+=1;k(`loading`),j(null);try{let r=await We(je,()=>me(e.id,t));if(!F.current||n!==P.current)return;if(r===null){k(Ue.current?`ready`:`locked`);return}Re(r),ze(r.text),k(`ready`)}catch(e){if(!F.current||n!==P.current)return;j(p(e)),k(`error`)}},[We,e.id]);(0,h.useEffect)(()=>{r()?I({includeLastAssistant:!1,focus:``}):k(`locked`)},[]);let L=D!==null&&M!==D.text,Ge=(0,h.useMemo)(()=>De(M)>65536||Te({text:M})>65536,[M]),Ke=M.length>l,[R,qe]=(0,h.useState)(()=>_(t,e,v));(0,h.useEffect)(()=>{R===null&&t.length>0&&qe(_(t,e,v))},[R,t,e,v]);let z=R?de(t,R.seatId)??null:null,B=R?we(z,R.model):null,[V,Je]=(0,h.useState)(null),Ye=Ee({option:B,target:R,source:e,preferences:Le.data}),H=V!==null&&f(B,V)!==void 0?V:Ye,Xe=Ce(B),U=be(z,B),W=xe(M.length,B,H,z?.engine??null),Ze=[_e(B),ge(z?.engine)].filter(Boolean).join(` `),Qe=1+(e.extraRoots?.filter(t=>t&&t!==e.projectPath).length??0),$e=Oe(z?.engine??null,Qe);function et(e){qe({seatId:e.seatId,model:e.model}),Je(null)}let[tt,nt]=(0,h.useState)(()=>Se(e.title)),[G,K]=(0,h.useState)({phase:`idle`}),q=de(t,e.seatId)?.label??fe[e.engine],J=G.phase===`sending`||G.phase===`waiting`||G.phase===`cancelling`,Y=e.status===`running`?`A turn is running in this chat. Wait for it to finish first.`:e.turnCount===0?`This chat has no turns yet, so there is nothing to summarize.`:null;async function rt(){K({phase:`sending`});try{let t=await E.run(Me,async()=>{c(e.id,`running`);try{let t=await ie(e.id,oe);return o(e.id,t.session,t.turnId),t.turnId}catch(t){throw c(e.id,`idle`),t}});if(!F.current)return;K(t===null?{phase:`idle`}:{phase:`waiting`,turnId:t})}catch(e){F.current&&K({phase:`failed`,message:p(e)})}}async function it(){if(G.phase!==`waiting`)return;let t=G.turnId;K({phase:`cancelling`,turnId:t});try{await E.run(Ne,()=>ne(e.id))===null&&F.current&&K({phase:`waiting`,turnId:t})}catch(e){F.current&&K({phase:`failed`,message:p(e)})}}let at=(0,h.useRef)(N);at.current=N,(0,h.useEffect)(()=>{if(G.phase!==`waiting`&&G.phase!==`cancelling`)return;let t=G.turnId,n=!1,r=()=>{if(n)return;let r=Fe(s(e.id).events,t);if(r!==null)switch(n=!0,r.kind){case`ok`:K({phase:`done`}),He(!0),I({includeLastAssistant:!0,focus:at.current});break;case`cancelled`:K({phase:`failed`,message:`Summary stopped. The automatic preview is unchanged.`});break;case`empty`:K({phase:`failed`,message:`${q} finished without writing a summary. The automatic preview is unchanged.`});break;default:K({phase:`failed`,message:`The summary turn failed${r.message?`: ${le(ue(r.message))}`:``}. The automatic preview is unchanged.`})}};r();let i=se(r),a=setInterval(()=>{let t=s(e.id).stream;t!==`open`&&t!==`connecting`&&t!==`reconnecting`&&re(e.id).then(t=>ce(e.id,t.session,t.events)).catch(()=>{})},Ae);return()=>{n=!0,i(),clearInterval(a)}},[G,e.id]);let[X,ot]=(0,h.useState)(!1),[Z,st]=(0,h.useState)(null),ct=M.trim().length>0,Q=U??(D?null:`Build the handoff first.`)??(ct?null:`The handoff is empty — rebuild it or write one.`)??(Ge?`The handoff is over the 64 KB limit for one message. Trim it first.`:null)??(J?`Wait for the summary to finish, or stop it.`:null);async function lt(){if(!R||Q!==null||X)return;ot(!0),st(null);let t=M;try{let r=await E.run(Pe,()=>he({source:e,seatId:R.seatId,model:R.model,contextMode:f(B,H),title:tt.trim()||void 0}));if(r===null)return;o(r.id,r),te(r.projectPath,{seatId:r.seatId,model:r.model}),u(r,t),n()}catch(e){F.current&&st(p(e))}finally{F.current&&ot(!1)}}let ut=()=>{E.dialog.open||n()},dt=Math.ceil(M.length/4),$=()=>void I({includeLastAssistant:Ve,focus:N});return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a,{open:!0,onClose:ut,titleId:y,title:`Continue in a fresh chat`,initialFocusRef:T,widthClassName:m.dialogWidth,description:(0,g.jsxs)(g.Fragment,{children:[`Start a new chat from a written handoff of “`,e.title||`Untitled chat`,`” instead of its full history.`]}),children:(0,g.jsxs)(`form`,{className:m.form,noValidate:!0,onSubmit:e=>{e.preventDefault(),lt()},children:[(0,g.jsxs)(`div`,{className:m.field,children:[(0,g.jsxs)(`label`,{className:m.label,htmlFor:b,children:[`Focus for the next chat `,(0,g.jsx)(`span`,{className:m.optional,children:`optional`})]}),(0,g.jsxs)(`div`,{className:m.row,children:[(0,g.jsx)(`input`,{id:b,ref:T,className:m.input,value:N,maxLength:500,placeholder:`e.g. finish the migration, then run the full test suite`,autoComplete:`off`,onChange:e=>Be(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),O!==`loading`&&$())}}),(0,g.jsx)(`button`,{type:`button`,className:m.secondary,onClick:$,disabled:O===`loading`||J,children:L?`Rebuild (replaces your edits)`:`Rebuild`})]})]}),(0,g.jsxs)(`div`,{className:m.field,children:[(0,g.jsx)(`label`,{className:m.label,htmlFor:x,children:`Handoff — becomes the new chat’s first message`}),O===`locked`&&!D?(0,g.jsxs)(`div`,{className:m.locked,role:`status`,children:[(0,g.jsxs)(`p`,{children:[`Building the handoff needs the mutation token: it reads this chat’s log and runs `,(0,g.jsx)(`code`,{children:`git diff --stat`}),`. It spends nothing.`]}),(0,g.jsx)(`button`,{type:`button`,className:m.secondary,onClick:$,children:`Unlock and build the handoff`})]}):(0,g.jsx)(`textarea`,{id:x,className:m.textarea,value:M,rows:12,spellCheck:!1,"aria-describedby":S,"aria-busy":O===`loading`||void 0,disabled:!D,placeholder:O===`loading`?`Building the handoff from this chat’s log…`:``,onChange:e=>ze(e.target.value)}),(0,g.jsx)(`p`,{id:S,className:m.hint,"aria-live":`polite`,children:O===`loading`?D?`Rebuilding…`:`Reading this chat’s log…`:D?(0,g.jsxs)(g.Fragment,{children:[M.length.toLocaleString(),` chars · ~`,dt.toLocaleString(),` tokens`,` · `,D.stats.turnsCovered,` `,D.stats.turnsCovered===1?`turn`:`turns`,` · `,D.stats.filesTouched,` `,D.stats.filesTouched===1?`file`:`files`,` touched`,L?` · edited`:``,Ve?` · includes ${q}’s own summary`:``]}):null}),D&&D.stats.truncated.length>0?(0,g.jsxs)(`p`,{className:m.hint,children:[`To stay under `,l.toLocaleString(),` characters these sections were left out: `,D.stats.truncated.join(`, `),`.`]}):null,Ge?(0,g.jsx)(`p`,{className:m.error,role:`alert`,children:`Over the 64 KB limit for one message (counted as it is sent, line breaks and quotes encoded) — the new chat could not send it. Trim it first.`}):Ke?(0,g.jsxs)(`p`,{className:m.warn,children:[`Longer than the `,l.toLocaleString(),`-character handoff budget. It can still be sent; the new chat just starts bigger.`]}):null,O===`error`&&A?(0,g.jsxs)(`p`,{className:m.error,role:`alert`,children:[`Could not build the handoff: `,A,` `,(0,g.jsx)(`button`,{type:`button`,className:m.link,onClick:$,children:`Try again`})]}):null]}),(0,g.jsxs)(`section`,{className:m.aside,"aria-labelledby":`${y}-summary`,children:[(0,g.jsxs)(`h3`,{id:`${y}-summary`,className:m.label,children:[`Better summary `,(0,g.jsx)(`span`,{className:m.optional,children:`optional, spends`})]}),(0,g.jsxs)(`p`,{className:m.hint,children:[`The handoff above is assembled from this chat’s log. For one in the agent’s own words, ask `,q,` to write it first — its reply is added to the handoff. `,ye(e.engine,q)]}),G.phase===`waiting`||G.phase===`cancelling`?(0,g.jsxs)(`div`,{className:m.row,role:`status`,children:[(0,g.jsx)(`span`,{className:m.pending,"aria-hidden":`true`}),(0,g.jsx)(`span`,{className:m.hint,children:G.phase===`cancelling`?`Stopping the summary…`:`Waiting for ${q} to finish its summary…`}),(0,g.jsx)(`button`,{type:`button`,className:m.secondary,onClick:()=>void it(),disabled:G.phase===`cancelling`,children:`Stop the summary`})]}):(0,g.jsxs)(`div`,{className:m.row,children:[(0,g.jsx)(`button`,{type:`button`,className:m.secondary,onClick:()=>void rt(),disabled:Y!==null||G.phase===`sending`,children:G.phase===`sending`?`Sending…`:G.phase===`done`?`Ask ${q} again`:`Ask ${q} to summarize first`}),G.phase===`done`?(0,g.jsx)(`span`,{className:m.hint,role:`status`,children:`Summary added.`}):null]}),Y!==null&&!J?(0,g.jsx)(`p`,{className:m.hint,children:Y}):null,Y===null&&G.phase===`idle`&&L?(0,g.jsx)(`p`,{className:m.hint,children:`The handoff is rebuilt with the summary, which replaces your edits above.`}):null,G.phase===`failed`?(0,g.jsx)(`p`,{className:m.error,role:`alert`,children:G.message}):null]}),(0,g.jsxs)(`div`,{className:m.field,children:[(0,g.jsx)(ve,{id:Ie,seats:t,value:R,onChange:et,label:`Continue on`,modeFor:(e,t)=>R&&e.id===R.seatId&&t.id===R.model?H:`standard`}),U?(0,g.jsx)(`p`,{className:m.error,role:`alert`,children:U}):null,$e?(0,g.jsx)(`p`,{className:m.hint,children:$e}):null]}),B&&!U?(0,g.jsxs)(`div`,{className:m.field,children:[Xe?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{id:w,className:m.label,children:`Context mode`}),(0,g.jsx)(ae,{"aria-labelledby":w,size:`sm`,value:H,onChange:e=>Je(e),options:[{value:`standard`,label:`Standard`},{value:`expansive`,label:`Expansive`}]}),(0,g.jsxs)(`p`,{className:m.hint,children:[d(B,H),`.`,` `,H===`expansive`?`Expansive keeps far more of the conversation before compacting, but every turn re-sends all of it — each turn costs more usage.${Ze?` ${Ze}`:``}`:`Standard compacts sooner and keeps each turn cheaper. Expansive is one click away if the work needs it.`]})]}):d(B,`standard`)?(0,g.jsxs)(`p`,{className:m.hint,children:[d(B,`standard`),`.`]}):null,(0,g.jsx)(`p`,{className:`${m.fit} ${m[`fit-${W.tone}`]??``}`,"data-verdict":W.verdict??`unknown`,children:W.text})]}):null,(0,g.jsxs)(`div`,{className:m.field,children:[(0,g.jsx)(`label`,{className:m.label,htmlFor:C,children:`Title`}),(0,g.jsx)(`input`,{id:C,className:m.input,value:tt,maxLength:120,autoComplete:`off`,onChange:e=>nt(e.target.value)})]}),Z?(0,g.jsx)(`p`,{className:m.error,role:`alert`,children:Z}):null,(0,g.jsx)(`p`,{className:m.cost,children:`Creating the chat is free — nothing is sent to a model. The handoff goes into the new chat’s composer; read it, then press Send. That first turn is the first thing spent.`}),(0,g.jsxs)(`div`,{className:m.actions,children:[Q&&D?(0,g.jsx)(`span`,{className:m.blocked,children:Q}):null,(0,g.jsx)(`button`,{type:`button`,className:m.cancel,onClick:n,children:`Cancel`}),(0,g.jsx)(`button`,{type:`submit`,className:m.primary,disabled:Q!==null||X,children:X?`Creating…`:`Create chat`})]})]})}),(0,g.jsx)(ee,{open:E.dialog.open,reason:E.dialog.reason,tokenLabel:`Mutation token`,tokenHelp:`the mutation token ashlr verse printed`,onClose:E.dialog.onClose,onUnlocked:E.dialog.onUnlocked})]})}export{v as HandoffDialog};
|
|
2
|
-
//# sourceMappingURL=HandoffDialog-FPVOqOMN.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./index-oAAq8XJa.js";import{_ as t,g as n}from"./VerseConsoleApp-WVeyJnW7.js";import{l as r}from"./format-B8DAVcn2.js";import{t as i}from"./Button-DYv_KKxr.js";import{t as a}from"./use-ticker-BNc1H4ZC.js";import{l as o}from"./surface-data-J52iIGMD.js";import{r as s}from"./actions-s2lfm_5k.js";import{i as c,n as l,t as u}from"./Surface-B3TZVoER.js";function d(e){return e.status===`applied`||e.status===`scheduled`}function f(e,t){if(e.status!==`scheduled`||!e.applyAfter)return null;let n=Date.parse(e.createdAt),r=Date.parse(e.applyAfter);return!Number.isFinite(n)||!Number.isFinite(r)||r<=n?null:Math.max(0,Math.min(1,(r-t)/(r-n)))}function p(e,t){if(!e)return``;let n=Date.parse(e)-t;if(!Number.isFinite(n))return``;if(n<=0)return`applying…`;let r=Math.ceil(n/6e4);return r<60?`${r}m`:`${Math.floor(r/60)}h ${String(r%60).padStart(2,`0`)}m`}var m={"merges/day":`merges/day`};function h(e){if(!e)return null;let t=Date.parse(e.byDate),n=Number.isFinite(t)?new Date(t).toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`}):e.byDate,r=Number.isInteger(e.delta)?String(Math.abs(e.delta)):Math.abs(e.delta).toFixed(1);return`${e.delta>=0?`+`:`−`}${r} ${m[e.metric]??e.metric} by ${n}`}function g(e){return e.expectedDelta?e.outcome?e.outcome.hit===null?`ungraded`:e.outcome.hit?`hit`:`miss`:`pending`:`ungraded`}var _={hit:`hit`,miss:`missed`,pending:`graded in 7 days`,ungraded:`not gradeable`};function v(e){if(!e?.latest)return[];let t=new Map(e.actions.map(e=>[e.id,e])),n=e.latest.actions.map(e=>t.get(e.id)??e),r={A:0,B:1,C:2};return n.sort((e,t)=>r[e.class]-r[t.class]||Date.parse(t.createdAt)-Date.parse(e.createdAt))}var y={scheduled:`Scheduled`,applied:`Applied`,vetoed:`Vetoed`,refused:`Refused`,failed:`Failed`,escalated:`Needs you`},b=e(),x=8,S=2*Math.PI*x;function C({action:e}){let t=a(1e3),n=f(e,t);if(n===null)return null;let r=p(e.applyAfter,t);return(0,b.jsxs)(`span`,{className:s.ring,role:`timer`,"aria-label":`Applies in ${r} unless vetoed`,children:[(0,b.jsxs)(`svg`,{width:20,height:20,viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:10,cy:10,r:x,className:s.ringTrack}),(0,b.jsx)(`circle`,{"data-role":`remaining`,cx:10,cy:10,r:x,className:s.ringFill,strokeDasharray:`${(S*n).toFixed(2)} ${S.toFixed(2)}`,transform:`rotate(-90 10 10)`})]}),(0,b.jsx)(`span`,{className:s.ringText,children:r})]})}function w(e){return{title:`Veto this action?`,body:e.status===`scheduled`?`“${e.summary}” will not apply. The Leader records the veto and learns from it.`:`“${e.summary}” is undone exactly as it was applied. The Leader records the veto and learns from it.`,confirmLabel:`Veto`,destructive:!0}}function T({action:e,actions:t,compact:r=!1}){let a=d(e);return(0,b.jsxs)(`li`,{className:s.actionRow,"data-status":e.status,id:n(`action-${e.id}`),children:[(0,b.jsx)(`span`,{className:s.classBadge,"data-class":e.class,title:`Class ${e.class}`,children:e.class}),(0,b.jsxs)(`span`,{className:s.actionText,children:[(0,b.jsx)(`span`,{className:s.actionSummary,children:e.summary}),r?null:(0,b.jsx)(`span`,{className:s.actionWhy,children:e.why})]}),(0,b.jsxs)(`span`,{className:s.actionState,children:[e.status===`scheduled`?(0,b.jsx)(C,{action:e}):(0,b.jsx)(`span`,{className:s.statusWord,"data-status":e.status,children:y[e.status]}),a?(0,b.jsx)(i,{size:`sm`,variant:`ghost`,className:s.vetoChip,disabled:t.busy||t.readOnly,"aria-label":`Veto: ${e.summary}`,onClick:()=>t.act(()=>o({action:`veto`,actionId:e.id}),`Veto “${e.summary}”`,{confirm:w(e)}),children:`Veto`}):null]})]})}function E({read:e,loading:n,actions:i}){let a=e?.value??null,f=a?.latest??null,p=v(a),m=h(f?.move?.expectedDelta??null),g=p.some(d);return(0,b.jsx)(u,{title:`Leader`,caption:f?`Memo ${r(f.at)}${f.seatId?` · ${f.seatId}`:``}${a?.nextRunAt?` · next run ${new Date(a.nextRunAt).toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`})}`:``}`:void 0,actions:(0,b.jsxs)(b.Fragment,{children:[f?.dryRun?(0,b.jsx)(`span`,{className:s.dryRun,children:`Dry run`}):null,(0,b.jsxs)(`button`,{type:`button`,className:s.linkButton,onClick:()=>t(`mind`,null),"aria-keyshortcuts":`Meta+4`,children:[`Open Mind `,(0,b.jsx)(`kbd`,{className:s.kbd,children:`⌘4`})]})]}),children:n&&!e?(0,b.jsx)(`p`,{className:s.muted,"aria-busy":`true`,children:`Reading the Leader…`}):a?f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`dl`,{className:s.memo,children:[(0,b.jsxs)(`div`,{className:s.memoRow,children:[(0,b.jsx)(`dt`,{children:(0,b.jsx)(c,{children:`Bottleneck`})}),(0,b.jsx)(`dd`,{className:s.memoText,children:f.bottleneck?.statement??`—`})]}),(0,b.jsxs)(`div`,{className:s.memoRow,children:[(0,b.jsx)(`dt`,{children:(0,b.jsx)(c,{children:`The move`})}),(0,b.jsxs)(`dd`,{className:s.memoText,children:[f.move?.statement??`—`,m?(0,b.jsx)(`span`,{className:s.delta,children:m}):null]})]})]}),p.length?(0,b.jsx)(`ul`,{className:s.actionList,"aria-label":`Leader actions`,children:p.map(e=>(0,b.jsx)(T,{action:e,actions:i},e.id))}):null,f.dryRun?(0,b.jsx)(`p`,{className:s.muted,children:`Shadow stage: these actions are shown, never applied.`}):null,g&&!f.dryRun?(0,b.jsx)(`button`,{type:`button`,className:s.moreLink,disabled:i.busy||i.readOnly,onClick:()=>i.act(()=>o({action:`veto-memo`,memoId:f.id}),`Veto the whole memo`,{confirm:{title:`Veto the whole memo?`,body:`Every applied action is undone exactly and every scheduled one is cancelled. The Leader records the veto.`,confirmLabel:`Veto memo`,destructive:!0}}),children:`Veto the whole memo`}):null]}):(0,b.jsxs)(l,{children:[`No memo yet`,a.lastRun?` — last run ${r(a.lastRun.at)}: ${a.lastRun.reason??a.lastRun.outcome}`:``,`.`,a.nextRunAt?` Next run ${new Date(a.nextRunAt).toLocaleString(`en-US`,{weekday:`short`,hour:`numeric`,minute:`2-digit`})}.`:``]}):(0,b.jsx)(l,{tone:`unknown`,children:e?.reason??`The Leader did not answer.`})})}export{d as a,h as i,E as n,g as o,_ as r,T as t};
|
|
2
|
-
//# sourceMappingURL=LeaderCard-4R0BhDzT.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{h as r,m as i}from"./global-Di2PUgj4.js";import{t as a}from"./RefreshIndicator-BLnr9IOM.js";import{t as o}from"./AreaTrend-LD9lCPkT.js";import{n as s,t as c}from"./MatrixHeatmap-DiuushcS.js";import{n as l}from"./viewport-BEqGUoTA.js";import{T as u,x as d}from"./verse-queries-DvIJcn6Z.js";import{r as f}from"./section-visibility-qFqc_d4Z.js";import{g as p}from"./VerseConsoleApp-WVeyJnW7.js";import{l as m}from"./format-B8DAVcn2.js";import{a as h,d as g,l as _}from"./surface-data-J52iIGMD.js";import{a as v,c as y,i as b,l as x,n as S,r as C,s as w,t as T,u as E}from"./mind.module-vnuJcwvD.js";import{n as D,t as O}from"./actions-s2lfm_5k.js";import{a as k,i as A,n as j,r as M,t as N}from"./Surface-B3TZVoER.js";import{a as P,i as F,o as I,r as L,t as R}from"./LeaderCard-4R0BhDzT.js";var z=n(e(),1),B=t(),V={hit:`✓`,miss:`✗`,pending:`…`,ungraded:`—`};function H(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`}):`—`}function U({read:e,actions:t}){let n=e?.value??null,r=n?.timeline??[],i=n?.latest?.id??null,a=n?.latest?.actions.some(e=>P(n.actions.find(t=>t.id===e.id)??e))??!1;return(0,B.jsx)(N,{title:`Memos`,caption:n?`${r.length} in view · each move graded 7 days later`:void 0,children:e?n?r.length===0?(0,B.jsxs)(j,{children:[`No memos yet`,n.lastRun?` — last run: ${n.lastRun.reason??n.lastRun.outcome}`:``,`.`]}):(0,B.jsx)(`ol`,{className:T.timeline,children:r.map(e=>{let n=I(e),r=F(e.expectedDelta);return(0,B.jsxs)(`li`,{className:T.memo,"data-outcome":n,id:p(`memo-${e.id}`),children:[(0,B.jsx)(`span`,{className:T.memoDay,children:H(e.at)}),(0,B.jsx)(`span`,{className:T.mark,"data-outcome":n,"aria-hidden":`true`,children:V[n]}),(0,B.jsxs)(`div`,{className:T.memoBody,children:[(0,B.jsx)(`span`,{className:T.memoMove,children:e.move??(e.status===`ok`?`No move`:`No memo (${e.status.replace(/-/g,` `)})`)}),e.bottleneck?(0,B.jsxs)(`span`,{className:T.memoWhy,children:[`Bottleneck: `,e.bottleneck]}):null,(0,B.jsxs)(`span`,{className:T.memoMeta,children:[r?`Expected ${r}`:`No expected delta`,` · `,(0,B.jsx)(`span`,{"data-outcome":n,children:n===`hit`||n===`miss`?`${L[n]} (actual ${e.outcome?.actualDelta===null||e.outcome?.actualDelta===void 0?`—`:`${e.outcome.actualDelta>=0?`+`:``}${e.outcome.actualDelta}`})`:L[n]}),` · ${e.actionCount} action${e.actionCount===1?``:`s`}`]})]}),e.id===i&&a?(0,B.jsx)(`button`,{type:`button`,className:T.veto,"aria-label":`Veto the memo of ${H(e.at)}`,disabled:t.busy||t.readOnly,onClick:()=>t.act(()=>_({action:`veto-memo`,memoId:e.id}),`Veto the whole memo`,{confirm:{title:`Veto this memo?`,body:`Every applied action is undone exactly and every scheduled one is cancelled. The Leader records the veto.`,confirmLabel:`Veto memo`,destructive:!0}}),children:`Veto`}):null]},e.id)})}):(0,B.jsx)(j,{tone:`unknown`,children:e.reason??`The Leader did not answer.`}):(0,B.jsx)(`p`,{className:T.muted,"aria-busy":`true`,children:`Reading the Leader…`})})}function W({read:e}){let t=e?.value??null,n=t?.hitRate??null,r=(t?.standards??[]).filter(e=>e.retiredAt===null);return(0,B.jsxs)(`div`,{className:T.stack,children:[(0,B.jsx)(s,{title:`Leader hit rate`,description:n?`${n.hits} of ${n.graded} graded moves · ${n.windowDays} days`:void 0,status:e?t?void 0:{kind:`unknown`,reason:e.reason??`the Leader did not answer.`}:{kind:`loading`},value:n?.rate??null,showState:!1,caption:n&&n.rate===null?`nothing graded yet — moves are graded 7 days after they are made`:void 0,size:180}),(0,B.jsx)(N,{title:`Standards`,caption:t?`${r.length} in force`:void 0,children:t?r.length===0?(0,B.jsx)(j,{children:`No standards yet.`}):(0,B.jsx)(`ul`,{className:T.standards,children:r.map(e=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`span`,{className:T.standardRule,children:e.rule}),(0,B.jsxs)(`span`,{className:T.standardMeta,children:[e.appliesTo,` · `,e.source===`mason`?`yours`:`Leader`,` · `,m(e.addedAt)]})]},e.id))}):(0,B.jsx)(j,{tone:`unknown`,children:e?.reason??`The Leader did not answer.`})})]})}var G={high:`High`,warn:`Worth a look`,info:`FYI`};function K({place:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:T.insightPlace,title:e.full,children:e.label}),e.scratch?(0,B.jsx)(`span`,{className:T.scratchTag,title:`A scratch folder under the system temp directory`,children:`scratch`}):null]})}function q({insights:e,reason:t,loading:n=!1,places:r}){return n?(0,B.jsx)(`p`,{className:T.muted,"aria-busy":`true`,children:`Reading the reasoning digest…`}):t===null?e.length===0?(0,B.jsx)(j,{children:`No loops, repeated failures or verification gaps in the last 30 days.`}):(0,B.jsx)(`ul`,{className:T.insights,"aria-label":`Reasoning insights`,children:e.map(e=>{let t=e.repo?r?.get(e.repo)??y(e.repo):null,n=m(e.lastAt),i=[e.engine,`${e.count}×`,n===`—`?null:`last seen ${n}`].filter(Boolean).join(` · `);return(0,B.jsxs)(`li`,{className:T.insight,"data-severity":e.severity,children:[(0,B.jsxs)(`span`,{className:T.insightKind,children:[(0,B.jsx)(A,{children:S[e.kind]}),(0,B.jsx)(`span`,{className:T.insightSeverity,"data-severity":e.severity,children:G[e.severity]})]}),(0,B.jsx)(`span`,{className:T.insightTitle,children:e.title}),(0,B.jsxs)(`span`,{className:T.insightMeta,children:[t?(0,B.jsx)(K,{place:t}):null,t&&i?` · `:null,i]})]},e.id)})}):(0,B.jsx)(j,{tone:`unknown`,children:t})}function J({read:e,actions:t}){let n=e?.value??null,r=n?.actions??[];return(0,B.jsx)(N,{title:`Action log`,caption:n?`Newest first · Veto runs the recorded inverse`:void 0,children:e?n?r.length===0?(0,B.jsx)(j,{children:`The Leader has not acted yet.`}):(0,B.jsx)(`ul`,{className:T.log,"aria-label":`Leader actions`,children:r.map(e=>(0,B.jsx)(R,{action:e,actions:t},e.id))}):(0,B.jsx)(j,{tone:`unknown`,children:e.reason??`The Leader did not answer.`}):(0,B.jsx)(`p`,{className:T.muted,"aria-busy":`true`,children:`Reading the action log…`})})}var Y=6e4,X=3e5;function Z(){let{compact:e}=l(),t=i(h),n=i(g,{freshMs:6e4}),s=r(h),m=r(g);f(()=>{s(),m()},Y);let _=D(),y=(0,z.useId)(),S=i(d,{freshMs:X}),A=i(u,{freshMs:X}),j=n.data?.value??null,P=(0,z.useMemo)(()=>b(j),[j]),F=(0,z.useMemo)(()=>E(A.data?.workspaces,S.data?.projects),[A.data,S.data]),I=(0,z.useMemo)(()=>x(j?j.insights.flatMap(e=>e.repo?[e.repo]:[]):[],F),[j,F]),L=e=>{let t=I.get(e);return t?`${t.label}${t.scratch?` · scratch`:``}`:e},[R,V]=(0,z.useState)(null),H=R!==null&&P.includes(R)?R:null,G=(0,z.useMemo)(()=>C(j,H),[j,H]),K=w(j),Z=v(j),Q=(e,t)=>n.data?j?e?{kind:`ready`}:{kind:`empty`,message:t}:{kind:`unknown`,reason:n.data.reason??`the reasoning digest did not answer.`}:{kind:`loading`},$=j?j.totals.steps>0:!1;return(0,B.jsxs)(k,{title:`Mind`,actions:[t,n].some(e=>e.status===`refreshing`)?(0,B.jsx)(a,{}):null,lead:(0,B.jsx)(O,{actions:_}),children:[(0,B.jsx)(M,{span:8,children:(0,B.jsx)(U,{read:t.data,actions:_})}),(0,B.jsx)(M,{span:4,children:(0,B.jsx)(W,{read:t.data})}),(0,B.jsx)(M,{span:12,children:(0,B.jsx)(N,{title:`What the reasoning shows`,caption:j?`Last 30 days · ${j.totals.steps.toLocaleString(`en-US`)} reasoning steps across ${j.totals.sessions} sessions`:void 0,children:(0,B.jsx)(`div`,{id:p(`insights`),children:(0,B.jsx)(q,{insights:K,places:I,loading:!n.data,reason:!n.data||j?null:n.data.reason??`The reasoning digest did not answer.`})})})}),(0,B.jsx)(M,{span:8,children:(0,B.jsx)(c,{title:`Insights by kind and engine`,description:H?`In ${L(H)}`:`All repos · 30 days`,status:Q($&&G.columns.length>0,`No reasoning was recorded in the last 30 days.`),rows:G.rows,columns:G.columns,values:G.values,unit:`insights`,defaultView:e?`table`:`chart`,actions:P.length>1?(0,B.jsxs)(`label`,{className:T.facet,htmlFor:y,children:[`Repo`,(0,B.jsxs)(`select`,{id:y,value:H??``,onChange:e=>V(e.target.value||null),children:[(0,B.jsx)(`option`,{value:``,children:`All`}),P.map(e=>(0,B.jsx)(`option`,{value:e,title:e,children:L(e)},e))]})]}):null})}),(0,B.jsx)(M,{span:4,children:(0,B.jsx)(o,{title:`Struggles and wins`,description:`Per day · days with no reasoning are gaps`,status:Q($,`No reasoning was recorded in the last 30 days.`),series:Z,height:200})}),(0,B.jsx)(M,{span:12,children:(0,B.jsx)(J,{read:t.data,actions:_})}),_.dialogs]})}export{Y as MIND_POLL_MS,Z as MindSection};
|
|
2
|
-
//# sourceMappingURL=MindSection-BjXHkQPS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._backdrop_10r5p_1{background:var(--bg-overlay);z-index:var(--z-dialog);animation:_fade_10r5p_1 var(--duration-fast) var(--ease-standard);justify-content:center;align-items:flex-start;padding-top:12vh;display:flex;position:fixed;inset:0}._dialog_10r5p_13{width:min(480px, calc(100vw - var(--space-8)));background:var(--bg-surface-raised);border:1px solid var(--border-default);border-radius:var(--radius-lg);max-height:76vh;box-shadow:var(--shadow-dialog);padding:var(--space-5);animation:_rise_10r5p_1 var(--duration-base) var(--ease-decelerate);overflow:auto}._title_10r5p_25{margin:0 0 var(--space-4);font-family:var(--font-display);font-size:var(--text-md-size);line-height:var(--text-md-line);font-weight:var(--font-weight-semibold);letter-spacing:var(--tracking-display)}._description_10r5p_36{margin:calc(var(--space-4) * -1 + var(--space-1)) 0 var(--space-4);color:var(--text-secondary);font-size:var(--text-sm-size);line-height:var(--text-sm-line)}@keyframes _fade_10r5p_1{0%{opacity:0}}@keyframes _rise_10r5p_1{0%{opacity:0;transform:translateY(4px)}}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._backdrop_10r5p_1,:root:not([data-motion=full]) ._dialog_10r5p_13{animation:none}}:root[data-motion=reduce] ._backdrop_10r5p_1,:root[data-motion=reduce] ._dialog_10r5p_13{animation:none}._body_1kukj_1{font-size:var(--text-sm-size);line-height:var(--text-sm-line);color:var(--text-secondary);margin-bottom:var(--space-4)}._form_1kukj_8{gap:var(--space-2);flex-direction:column;display:flex}._label_1kukj_14{font-size:var(--text-sm-size);font-weight:var(--font-weight-medium)}._inputRow_1kukj_19{gap:var(--space-2);display:flex}._input_1kukj_19{padding:var(--space-3);border-radius:var(--radius-md);border:1px solid var(--border-default);background:var(--bg-input);font-family:var(--font-mono);font-size:var(--text-sm-size);flex:1;min-width:0}._input_1kukj_19:focus-visible{border-color:var(--border-focus);box-shadow:var(--shadow-focus-ring)}._reveal_1kukj_40{padding:0 var(--space-3);border-radius:var(--radius-md);border:1px solid var(--border-default);font-size:var(--text-sm-size);color:var(--text-secondary)}._reveal_1kukj_40:hover{background:var(--bg-hover)}._error_1kukj_51{color:var(--status-danger-fg);font-size:var(--text-sm-size)}._actions_1kukj_56{justify-content:flex-end;gap:var(--space-2);margin-top:var(--space-3);display:flex}._cancel_1kukj_63{padding:var(--space-2) var(--space-4);border-radius:var(--radius-md);color:var(--text-secondary)}._cancel_1kukj_63:hover{background:var(--bg-hover)}._submit_1kukj_72{padding:var(--space-2) var(--space-4);border-radius:var(--radius-md);background:var(--accent-500);color:var(--text-on-accent);font-weight:var(--font-weight-medium)}._submit_1kukj_72:hover:not(:disabled){background:var(--accent-600)}._submit_1kukj_72:disabled{opacity:.5;cursor:not-allowed}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,s as r}from"./index-oAAq8XJa.js";import{p as i}from"./global-Di2PUgj4.js";var a=r(t(),1),o=r(e(),1),s=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`);function c(e){return Array.from(e.querySelectorAll(s)).filter(e=>e.offsetParent!==null)}function l({open:e,containerRef:t,onClose:n,initialFocusRef:r}){(0,o.useEffect)(()=>{if(!e)return;let n=document.activeElement;return(r?.current??t.current)?.focus({preventScroll:!0}),()=>{n?.focus?.({preventScroll:!0})}},[e]),(0,o.useEffect)(()=>{if(!e)return;function r(e){if(e.key===`Escape`){e.stopPropagation(),n();return}if(e.key!==`Tab`)return;let r=t.current;if(!r)return;let i=c(r);if(i.length===0)return;let a=i[0],o=i[i.length-1];e.shiftKey&&document.activeElement===a?(e.preventDefault(),o.focus()):!e.shiftKey&&document.activeElement===o&&(e.preventDefault(),a.focus())}return document.addEventListener(`keydown`,r,!0),()=>document.removeEventListener(`keydown`,r,!0)},[e,n])}var u={backdrop:`_backdrop_10r5p_1`,fade:`_fade_10r5p_1`,dialog:`_dialog_10r5p_13`,rise:`_rise_10r5p_1`,title:`_title_10r5p_25`,description:`_description_10r5p_36`},d=n();function f({open:e,onClose:t,titleId:n,title:r,description:i,children:s,initialFocusRef:c,widthClassName:f}){let p=(0,o.useRef)(null),m=(0,o.useId)(),h=!!i;return l({open:e,containerRef:p,onClose:t,initialFocusRef:c}),e?(0,a.createPortal)((0,d.jsx)(`div`,{className:u.backdrop,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,d.jsxs)(`div`,{ref:p,className:`${u.dialog} ${f??``}`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":n,"aria-describedby":h?m:void 0,tabIndex:-1,children:[(0,d.jsx)(`h2`,{id:n,className:u.title,children:r}),h?(0,d.jsx)(`p`,{id:m,className:u.description,children:i}):null,s]})}),document.body):null}var p={body:`_body_1kukj_1`,form:`_form_1kukj_8`,label:`_label_1kukj_14`,inputRow:`_inputRow_1kukj_19`,input:`_input_1kukj_19`,reveal:`_reveal_1kukj_40`,error:`_error_1kukj_51`,actions:`_actions_1kukj_56`,cancel:`_cancel_1kukj_63`,submit:`_submit_1kukj_72`},m=/^[a-f0-9]{64}$/;function h({open:e,onClose:t,onUnlocked:n,reason:r,tokenLabel:a=`Mutation token`,tokenHelp:s=`the mutation token ashlr serve printed`}){let{setToken:c}=i(),[l,u]=(0,o.useState)(``),[h,g]=(0,o.useState)(!1),[_,v]=(0,o.useState)(null),y=(0,o.useRef)(null),b=(0,o.useId)(),x=(0,o.useId)();function S(e){e.preventDefault();let r=l.trim();if(!m.test(r)){v(`Expected 64 hex characters — ${s}.`);return}c(r),u(``),v(null),t(),n?.()}return(0,d.jsxs)(f,{open:e,onClose:t,titleId:b,title:`Unlock actions`,initialFocusRef:y,children:[(0,d.jsxs)(`p`,{className:p.body,children:[r??`This action mutates the fleet and requires the dispatch token.`,` It is held in memory only, for this browser tab, and is cleared automatically after 20 minutes idle.`]}),(0,d.jsxs)(`form`,{onSubmit:S,className:p.form,noValidate:!0,children:[(0,d.jsx)(`label`,{htmlFor:x,className:p.label,children:a}),(0,d.jsxs)(`div`,{className:p.inputRow,children:[(0,d.jsx)(`input`,{ref:y,id:x,type:h?`text`:`password`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,className:p.input,value:l,onChange:e=>u(e.target.value),"aria-invalid":_?!0:void 0,placeholder:`64 hex characters`}),(0,d.jsx)(`button`,{type:`button`,className:p.reveal,onClick:()=>g(e=>!e),"aria-pressed":h,children:h?`Hide`:`Show`})]}),_?(0,d.jsx)(`p`,{className:p.error,role:`alert`,children:_}):null,(0,d.jsxs)(`div`,{className:p.actions,children:[(0,d.jsx)(`button`,{type:`button`,className:p.cancel,onClick:t,children:`Cancel`}),(0,d.jsx)(`button`,{type:`submit`,className:p.submit,disabled:l.trim().length===0,children:`Unlock`})]})]})]})}export{f as n,l as r,h as t};
|
|
2
|
-
//# sourceMappingURL=MutationTokenDialog-SkRxqV_I.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MutationTokenDialog-SkRxqV_I.js","names":[],"sources":["../../../../../../src/web-ui/components/primitives/focus-trap.ts","../../../../../../src/web-ui/components/primitives/Dialog.module.css","../../../../../../src/web-ui/components/primitives/Dialog.tsx","../../../../../../src/web-ui/components/auth/MutationTokenDialog.module.css","../../../../../../src/web-ui/components/auth/MutationTokenDialog.tsx"],"sourcesContent":["/**\n * components/primitives/focus-trap.ts — the modal focus contract, extracted\n * from Dialog.tsx so Sheet.tsx (the slide-over overlay) gets exactly the same\n * behavior instead of a second, subtly different implementation:\n *\n * - focus moves into the overlay (or `initialFocusRef`) on open\n * - focus is trapped inside while open (Tab/Shift+Tab wrap)\n * - focus returns to the element that opened it on close\n * - Escape closes\n *\n * Dialog.tsx is unchanged in behavior — it now calls this instead of\n * inlining it. Any future overlay MUST use this rather than hand-rolling a\n * trap (DESIGN.md §3, \"primitives own their accessibility\").\n */\nimport { useEffect, type RefObject } from 'react';\n\nexport const FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/** Focusable descendants that are actually rendered (offsetParent is null for hidden nodes). */\nexport function focusableWithin(node: HTMLElement): HTMLElement[] {\n return Array.from(node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter((el) => el.offsetParent !== null);\n}\n\nexport interface FocusTrapOptions {\n open: boolean;\n containerRef: RefObject<HTMLElement | null>;\n onClose: () => void;\n initialFocusRef?: RefObject<HTMLElement | null>;\n}\n\nexport function useFocusTrap({ open, containerRef, onClose, initialFocusRef }: FocusTrapOptions): void {\n useEffect(() => {\n if (!open) return;\n const previouslyFocused = document.activeElement as HTMLElement | null;\n const target = initialFocusRef?.current ?? containerRef.current;\n target?.focus({ preventScroll: true });\n\n return () => {\n previouslyFocused?.focus?.({ preventScroll: true });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the refs are refs (stable identity is not the point); only `open` should re-run this.\n }, [open]);\n\n useEffect(() => {\n if (!open) return;\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n e.stopPropagation();\n onClose();\n return;\n }\n if (e.key !== 'Tab') return;\n const node = containerRef.current;\n if (!node) return;\n const focusable = focusableWithin(node);\n if (focusable.length === 0) return;\n const first = focusable[0]!;\n const last = focusable[focusable.length - 1]!;\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n document.addEventListener('keydown', onKeyDown, true);\n return () => document.removeEventListener('keydown', onKeyDown, true);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- containerRef is a ref; re-binding on every render would drop in-flight key handling.\n }, [open, onClose]);\n}\n",".backdrop {\n position: fixed;\n inset: 0;\n background: var(--bg-overlay);\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 12vh;\n z-index: var(--z-dialog);\n animation: fade var(--duration-fast) var(--ease-standard);\n}\n\n.dialog {\n width: min(480px, calc(100vw - var(--space-8)));\n max-height: 76vh;\n overflow: auto;\n background: var(--bg-surface-raised);\n border: 1px solid var(--border-default);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-dialog);\n padding: var(--space-5);\n animation: rise var(--duration-base) var(--ease-decelerate);\n}\n\n.title {\n margin: 0 0 var(--space-4);\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n font-weight: var(--font-weight-semibold);\n letter-spacing: var(--tracking-display);\n}\n\n/* Sits between title and body: the title's bottom margin collapses into\n this one's top, so give the pair the same rhythm as a title alone. */\n.description {\n margin: calc(var(--space-4) * -1 + var(--space-1)) 0 var(--space-4);\n color: var(--text-secondary);\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n}\n\n@keyframes fade {\n from {\n opacity: 0;\n }\n}\n\n@keyframes rise {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-motion=\"full\"]) .backdrop,\n :root:not([data-motion=\"full\"]) .dialog {\n animation: none;\n }\n}\n\n:root[data-motion=\"reduce\"] .backdrop,\n:root[data-motion=\"reduce\"] .dialog {\n animation: none;\n}\n","/**\n * components/primitives/Dialog.tsx — focus-managed modal base. Used by\n * MutationTokenDialog, CommandPalette and the Verse confirm flows so all of\n * them get the same accessible behavior instead of each hand-rolling it:\n *\n * - focus moves to the dialog (or `initialFocusRef`) on open\n * - focus is trapped inside while open (Tab/Shift+Tab wrap)\n * - focus returns to the trigger element on close\n * - Escape closes\n * - a click on the backdrop closes\n * - a `description` is the dialog's accessible description\n * (aria-describedby), so it is announced with the title on open — focus\n * usually lands on a button, and a plain <p> beside it was never read\n *\n * The trap itself lives in ./focus-trap.ts, shared with Sheet.tsx — the\n * behavior here is unchanged, it just stopped being copy-pasteable.\n */\nimport { useId, useRef, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useFocusTrap } from './focus-trap.js';\nimport styles from './Dialog.module.css';\n\nexport interface DialogProps {\n open: boolean;\n onClose: () => void;\n titleId: string;\n title: ReactNode;\n children: ReactNode;\n /**\n * Optional one-line description under the title — also the dialog's\n * aria-describedby, so put the consequence a confirm is asking about here.\n */\n description?: ReactNode;\n initialFocusRef?: React.RefObject<HTMLElement | null>;\n widthClassName?: string;\n}\n\nexport function Dialog({\n open,\n onClose,\n titleId,\n title,\n description,\n children,\n initialFocusRef,\n widthClassName,\n}: DialogProps) {\n const dialogRef = useRef<HTMLDivElement>(null);\n const descriptionId = useId();\n // Same test that decides whether the <p> renders, so the id never dangles.\n const described = Boolean(description);\n\n useFocusTrap({ open, containerRef: dialogRef, onClose, initialFocusRef });\n\n if (!open) return null;\n\n return createPortal(\n <div className={styles.backdrop} onMouseDown={(e) => e.target === e.currentTarget && onClose()}>\n <div\n ref={dialogRef}\n className={`${styles.dialog} ${widthClassName ?? ''}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={described ? descriptionId : undefined}\n tabIndex={-1}\n >\n <h2 id={titleId} className={styles.title}>\n {title}\n </h2>\n {described ? <p id={descriptionId} className={styles.description}>{description}</p> : null}\n {children}\n </div>\n </div>,\n document.body,\n );\n}\n",".body {\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-secondary);\n margin-bottom: var(--space-4);\n}\n\n.form {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n}\n\n.label {\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-medium);\n}\n\n.inputRow {\n display: flex;\n gap: var(--space-2);\n}\n\n.input {\n flex: 1;\n padding: var(--space-3);\n border-radius: var(--radius-md);\n border: 1px solid var(--border-default);\n background: var(--bg-input);\n font-family: var(--font-mono);\n font-size: var(--text-sm-size);\n min-width: 0;\n}\n\n.input:focus-visible {\n border-color: var(--border-focus);\n box-shadow: var(--shadow-focus-ring);\n}\n\n.reveal {\n padding: 0 var(--space-3);\n border-radius: var(--radius-md);\n border: 1px solid var(--border-default);\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n}\n.reveal:hover {\n background: var(--bg-hover);\n}\n\n.error {\n color: var(--status-danger-fg);\n font-size: var(--text-sm-size);\n}\n\n.actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--space-2);\n margin-top: var(--space-3);\n}\n\n.cancel {\n padding: var(--space-2) var(--space-4);\n border-radius: var(--radius-md);\n color: var(--text-secondary);\n}\n.cancel:hover {\n background: var(--bg-hover);\n}\n\n.submit {\n padding: var(--space-2) var(--space-4);\n border-radius: var(--radius-md);\n background: var(--accent-500);\n color: var(--text-on-accent);\n font-weight: var(--font-weight-medium);\n}\n.submit:hover:not(:disabled) {\n background: var(--accent-600);\n}\n.submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n","/**\n * components/auth/MutationTokenDialog.tsx — replaces window.prompt() for\n * the mutation token (foundation brief item 5, the \"biggest reason\n * operators abandon the UI for the CLI\" finding). A focus-managed dialog\n * instead of a blocking native prompt, and a session-scoped hold (see\n * auth-store.ts) so approving 12 proposals is one paste, not twelve.\n *\n * The token is NEVER written to localStorage/sessionStorage/cookies — only\n * held in an in-memory module variable in auth-store.ts, cleared on tab\n * close, idle timeout, or the explicit \"Lock\" action here.\n */\nimport { useId, useRef, useState, type FormEvent } from 'react';\nimport { Dialog } from '../primitives/Dialog.js';\nimport { useMutationHold } from '../../data/hooks.js';\nimport styles from './MutationTokenDialog.module.css';\n\nconst TOKEN_RE = /^[a-f0-9]{64}$/;\n\nexport interface MutationTokenDialogProps {\n open: boolean;\n onClose: () => void;\n onUnlocked?: () => void;\n /** Human context for why the token is being requested right now. */\n reason?: string;\n /** Scoped consoles can name their own startup token without changing the hold. */\n tokenLabel?: string;\n tokenHelp?: string;\n}\n\nexport function MutationTokenDialog({ open, onClose, onUnlocked, reason, tokenLabel = 'Mutation token',\n tokenHelp = 'the mutation token ashlr serve printed' }: MutationTokenDialogProps) {\n const { setToken } = useMutationHold();\n const [value, setValue] = useState('');\n const [reveal, setReveal] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const titleId = useId();\n const inputId = useId();\n\n function submit(e: FormEvent) {\n e.preventDefault();\n const trimmed = value.trim();\n if (!TOKEN_RE.test(trimmed)) {\n setError(`Expected 64 hex characters — ${tokenHelp}.`);\n return;\n }\n setToken(trimmed);\n setValue('');\n setError(null);\n onClose();\n onUnlocked?.();\n }\n\n return (\n <Dialog open={open} onClose={onClose} titleId={titleId} title=\"Unlock actions\" initialFocusRef={inputRef}>\n <p className={styles.body}>\n {reason ?? 'This action mutates the fleet and requires the dispatch token.'} It is held in\n memory only, for this browser tab, and is cleared automatically after 20 minutes idle.\n </p>\n <form onSubmit={submit} className={styles.form} noValidate>\n <label htmlFor={inputId} className={styles.label}>\n {tokenLabel}\n </label>\n <div className={styles.inputRow}>\n <input\n ref={inputRef}\n id={inputId}\n type={reveal ? 'text' : 'password'}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n className={styles.input}\n value={value}\n onChange={(e) => setValue(e.target.value)}\n aria-invalid={error ? true : undefined}\n placeholder=\"64 hex characters\"\n />\n <button\n type=\"button\"\n className={styles.reveal}\n onClick={() => setReveal((r) => !r)}\n aria-pressed={reveal}\n >\n {reveal ? 'Hide' : 'Show'}\n </button>\n </div>\n {error ? (\n <p className={styles.error} role=\"alert\">\n {error}\n </p>\n ) : null}\n <div className={styles.actions}>\n <button type=\"button\" className={styles.cancel} onClick={onClose}>\n Cancel\n </button>\n <button type=\"submit\" className={styles.submit} disabled={value.trim().length === 0}>\n Unlock\n </button>\n </div>\n </form>\n </Dialog>\n );\n}\n"],"mappings":"2HAgBa,EAAqB,CAChC,UACA,yBACA,wBACA,yBACA,2BACA,iCACF,CAAC,CAAC,KAAK,GAAG,EAGV,SAAgB,EAAgB,EAAkC,CAChE,OAAO,MAAM,KAAK,EAAK,iBAA8B,CAAkB,CAAC,CAAC,CAAC,OAAQ,GAAO,EAAG,eAAiB,IAAI,CACnH,CASA,SAAgB,EAAa,CAAE,OAAM,eAAc,UAAS,mBAA2C,EACrG,EAAA,EAAA,UAAA,KAAgB,CACd,GAAI,CAAC,EAAM,OACX,IAAM,EAAoB,SAAS,cAInC,OAHe,GAAiB,SAAW,EAAa,QAAA,EAChD,MAAM,CAAE,cAAe,EAAK,CAAC,MAExB,CACX,GAAmB,QAAQ,CAAE,cAAe,EAAK,CAAC,CACpD,CAEF,EAAG,CAAC,CAAI,CAAC,GAET,EAAA,EAAA,UAAA,KAAgB,CACd,GAAI,CAAC,EAAM,OACX,SAAS,EAAU,EAAkB,CACnC,GAAI,EAAE,MAAQ,SAAU,CACtB,EAAE,gBAAgB,EAClB,EAAQ,EACR,MACF,CACA,GAAI,EAAE,MAAQ,MAAO,OACrB,IAAM,EAAO,EAAa,QAC1B,GAAI,CAAC,EAAM,OACX,IAAM,EAAY,EAAgB,CAAI,EACtC,GAAI,EAAU,SAAW,EAAG,OAC5B,IAAM,EAAQ,EAAU,GAClB,EAAO,EAAU,EAAU,OAAS,GACtC,EAAE,UAAY,SAAS,gBAAkB,GAC3C,EAAE,eAAe,EACjB,EAAK,MAAM,GACF,CAAC,EAAE,UAAY,SAAS,gBAAkB,IACnD,EAAE,eAAe,EACjB,EAAM,MAAM,EAEhB,CAEA,OADA,SAAS,iBAAiB,UAAW,EAAW,EAAI,MACvC,SAAS,oBAAoB,UAAW,EAAW,EAAI,CAEtE,EAAG,CAAC,EAAM,CAAO,CAAC,CACpB,4KExCA,SAAgB,EAAO,CACrB,OACA,UACA,UACA,QACA,cACA,WACA,kBACA,kBACc,CACd,IAAM,GAAA,EAAY,EAAA,OAAA,CAAuB,IAAI,EACvC,GAAA,EAAgB,EAAA,MAAA,CAAM,EAEtB,EAAY,EAAQ,EAM1B,OAJA,EAAa,CAAE,OAAM,aAAc,EAAW,UAAS,iBAAgB,CAAC,EAEnE,GAEL,EAAO,EAAA,aAAA,EACL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,SAAU,YAAc,GAAM,EAAE,SAAW,EAAE,eAAiB,EAAQ,EAC3F,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CACE,IAAK,EACL,UAAW,GAAG,EAAO,OAAO,GAAG,GAAkB,KACjD,KAAK,SACL,aAAW,OACX,kBAAiB,EACjB,mBAAkB,EAAY,EAAgB,IAAA,GAC9C,SAAU,GAPZ,SAAA,EASE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,GAAI,EAAS,UAAW,EAAO,MAChC,SAAA,CACC,CAAA,EACH,GAAY,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,GAAI,EAAe,UAAW,EAAO,YAAc,SAAA,CAAe,CAAA,EAAI,KACrF,CACE,GACF,CAAA,EACL,SAAS,IACX,EArBkB,IAsBpB,mQE5DM,EAAW,iBAajB,SAAgB,EAAoB,CAAE,OAAM,UAAS,aAAY,SAAQ,aAAa,iBACpF,YAAY,0CAAsE,CAClF,GAAM,CAAE,YAAa,EAAgB,EAC/B,CAAC,EAAO,IAAA,EAAY,EAAA,SAAA,CAAS,EAAE,EAC/B,CAAC,EAAQ,IAAA,EAAa,EAAA,SAAA,CAAS,EAAK,EACpC,CAAC,EAAO,IAAA,EAAY,EAAA,SAAA,CAAwB,IAAI,EAChD,GAAA,EAAW,EAAA,OAAA,CAAyB,IAAI,EACxC,GAAA,EAAU,EAAA,MAAA,CAAM,EAChB,GAAA,EAAU,EAAA,MAAA,CAAM,EAEtB,SAAS,EAAO,EAAc,CAC5B,EAAE,eAAe,EACjB,IAAM,EAAU,EAAM,KAAK,EAC3B,GAAI,CAAC,EAAS,KAAK,CAAO,EAAG,CAC3B,EAAS,gCAAgC,EAAU,EAAE,EACrD,MACF,CACA,EAAS,CAAO,EAChB,EAAS,EAAE,EACX,EAAS,IAAI,EACb,EAAQ,EACR,IAAa,CACf,CAEA,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAc,OAAe,UAAkB,UAAS,MAAM,iBAAiB,gBAAiB,EAAhG,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,IAAD,CAAG,UAAW,EAAO,KAArB,SAAA,CACG,GAAU,iEAAiE,uGAE3E,CACH,CAAA,GAAA,EAAA,EAAA,KAAA,CAAC,OAAD,CAAM,SAAU,EAAQ,UAAW,EAAO,KAAM,WAAA,GAAhD,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,QAAS,EAAS,UAAW,EAAO,MACxC,SAAA,CACI,CAAA,GACP,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,SAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,QAAD,CACE,IAAK,EACL,GAAI,EACJ,KAAM,EAAS,OAAS,WACxB,aAAa,MACb,YAAY,MACZ,WAAY,GACZ,UAAW,EAAO,MACX,QACP,SAAW,GAAM,EAAS,EAAE,OAAO,KAAK,EACxC,eAAc,EAAQ,GAAO,IAAA,GAC7B,YAAY,mBACb,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAO,OAClB,YAAe,EAAW,GAAM,CAAC,CAAC,EAClC,eAAc,EAEb,SAAA,EAAS,OAAS,MACb,CAAA,CACL,IACJ,GACC,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,EAAO,MAAO,KAAK,QAC9B,SAAA,CACA,CAAA,EACD,MACJ,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,QAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,OAAQ,QAAS,EAAS,SAAA,QAE1D,CAAA,GACR,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,OAAQ,SAAU,EAAM,KAAK,CAAC,CAAC,SAAW,EAAG,SAAA,QAE7E,CAAA,CACL,GACD,CACA,CAAA,CAAA,GAEZ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,s as r}from"./index-oAAq8XJa.js";import{D as i,P as a,a as o,at as s,c,k as l,m as ee,o as u,ot as d,s as f,u as p}from"./global-Di2PUgj4.js";import{r as m,t as h}from"./MutationTokenDialog-SkRxqV_I.js";import{t as te}from"./Epistemic-uARPnx9x.js";import{n as g}from"./StatusBadge-BwnBNFQr.js";import{h as _}from"./queries-BA4rNGD-.js";import{r as ne,t as v}from"./mutations-Dpsql5t7.js";import{i as y,r as b}from"./RouteErrorBoundary-C5SxA2Dg.js";import{t as x}from"./RefreshIndicator-BLnr9IOM.js";import{t as S}from"./DiffViewer-B7NWPjIO.js";import{l as C}from"./command-catalog-BdtDH93o.js";import{b as w,n as T}from"./workbench-types-DzN-5trg.js";import{i as E,n as D,r as re}from"./guarded-action-CvOHcqyH.js";import{n as O}from"./viewport-BEqGUoTA.js";import{C as k,S as A,b as j,g as M,r as N,s as P,t as F}from"./verse-ui-store-zafyzXKD.js";import{x as I}from"./verse-queries-DvIJcn6Z.js";import{i as L,r as R}from"./useActivity-Bk3XgXjL.js";import{T as z,l as B}from"./icons-B_yuAgdN.js";import{m as ie,s as ae}from"./VerseConsoleApp-WVeyJnW7.js";import{v as V}from"./format-B8DAVcn2.js";import{n as oe,t as H}from"./Button-DYv_KKxr.js";import{C as U,D as W,E as G,S as K,T as q,_ as se,a as J,b as ce,c as le,d as ue,f as de,g as fe,h as pe,i as me,l as he,m as ge,n as _e,o as ve,p as ye,r as Y,s as be,t as xe,u as Se,v as Ce,w as we,x as Te,y as Ee}from"./NeedsYouList-CG-nB1tr.js";var X=r(e(),1),De=r(t(),1),Z={layout:`_layout_141uy_8`,listPane:`_listPane_141uy_9`,detailPane:`_detailPane_141uy_10`,filters:`_filters_141uy_12`,filterField:`_filterField_141uy_13`,filterLabel:`_filterLabel_141uy_14`,filterSelect:`_filterSelect_141uy_31`,count:`_count_141uy_46`,rows:`_rows_141uy_48`,row:`_row_141uy_48`,rowActive:`_rowActive_141uy_63`,riskRule:`_riskRule_141uy_68`,rowTitle:`_rowTitle_141uy_72`,rowMeta:`_rowMeta_141uy_73`,rowMetaMono:`_rowMetaMono_141uy_82`,rowAge:`_rowAge_141uy_83`,riskWord:`_riskWord_141uy_84`,detail:`_detail_141uy_10`,detailHead:`_detailHead_141uy_91`,eyebrow:`_eyebrow_141uy_92`,detailTitle:`_detailTitle_141uy_95`,project:`_project_141uy_109`,runFacts:`_runFacts_141uy_110`,diffStats:`_diffStats_141uy_112`,runSource:`_runSource_141uy_113`,hint:`_hint_141uy_114`,detailMeta:`_detailMeta_141uy_115`,summary:`_summary_141uy_117`,block:`_block_141uy_119`,blockTitle:`_blockTitle_141uy_120`,defs:`_defs_141uy_129`,muted:`_muted_141uy_133`,failedChecks:`_failedChecks_141uy_134`,actions:`_actions_141uy_136`,actionNote:`_actionNote_141uy_137`,reject:`_reject_141uy_138`,approve:`_approve_141uy_139`,decided:`_decided_141uy_155`,empty:`_empty_141uy_157`,emptyStrong:`_emptyStrong_141uy_158`,error:`_error_141uy_159`,skeletons:`_skeletons_141uy_160`},Q=n(),Oe={"judge-ship-would-merge":{label:`Ship (would merge)`,tone:`success`},"judge-ship-review-required":{label:`Ship (review required)`,tone:`success`},"judge-review":{label:`Review`,tone:`warning`},"judge-noise":{label:`Noise`,tone:`neutral`},"judge-harmful":{label:`Harmful`,tone:`danger`},"judge-verdict-unrecognized":{label:`Unrecognized verdict`,tone:`unknown`},"judge-parse-failure":{label:`Judge parse failure — not a review`,tone:`unknown`},"judge-network-failure":{label:`Judge network failure — not a review`,tone:`unknown`}};function ke(e){let t=e.filter(e=>e.action===`judged`&&e.judgeReasonCode);return t.length===0?null:t.reduce((e,t)=>Date.parse(t.ts)>Date.parse(e.ts)?t:e)}function Ae({id:e,dispatchEnabled:t,onDispatchDisabled:n,onDecided:r}){let i=ee(_(e)),[a,s]=(0,X.useState)(null),[u,d]=(0,X.useState)(!1),[f,p]=(0,X.useState)(!1),[m,b]=(0,X.useState)(!1),[C,w]=(0,X.useState)(null);function T(e){w(null),s(e),p(!0)}function E(){d(!1),l()?(p(!0),O()):s(null)}function re(){if(a){if(!l()){p(!1),d(!0);return}O()}}async function O(){if(a){b(!0),w(null);try{a===`approve`?await v(e):await ne(e),p(!1),s(null),r()}catch(e){e instanceof c?(p(!1),s(null),n()):w(D(e))}finally{b(!1)}}}if(i.status===`loading`)return(0,Q.jsxs)(`div`,{className:Z.detail,children:[(0,Q.jsx)(o,{width:`55%`}),(0,Q.jsx)(o,{width:`30%`}),(0,Q.jsx)(o,{width:`88%`})]});if(i.status===`error`||!i.data)return(0,Q.jsx)(`p`,{className:Z.error,role:`alert`,children:i.error?.message??`Could not load this proposal.`});let k=i.data,A=k.decisionEvidence,j=ke(A?.decisions??[]),M=j?.judgeReasonCode?Oe[j.judgeReasonCode]:null,N=k.status===`pending`&&t,P=Ee(k),F=se(k.kind,k.repo),I=G(k.title),L=W(k.repo),R=we(k.summary),z=R?R.rest:k.summary?V(k.summary):null;return(0,Q.jsxs)(`div`,{className:Z.detail,children:[(0,Q.jsxs)(`header`,{className:Z.detailHead,children:[(0,Q.jsxs)(`p`,{className:Z.eyebrow,children:[Te(k.kind),I.eyebrow?` \u00b7 ${I.eyebrow}`:``]}),(0,Q.jsx)(`h3`,{className:Z.detailTitle,title:k.title,children:I.text}),(0,Q.jsxs)(`div`,{className:Z.detailMeta,children:[(0,Q.jsx)(g,{status:k.status}),L?(0,Q.jsx)(`span`,{className:Z.project,title:k.repo??void 0,children:L}):(0,Q.jsx)(`span`,{children:`no repository`}),(0,Q.jsx)(`span`,{children:k.riskClass?`${k.riskClass} risk`:`risk unstated`}),P?(0,Q.jsx)(`code`,{title:`The model that produced this change`,children:P}):null,(0,Q.jsxs)(`span`,{title:K(k.createdAt),children:[`created `,U(k.createdAt)]}),k.decidedAt?(0,Q.jsxs)(`span`,{title:K(k.decidedAt),children:[`decided `,U(k.decidedAt)]}):null,i.status===`refreshing`?(0,Q.jsx)(x,{}):null]}),R?(0,Q.jsxs)(`p`,{className:Z.runFacts,children:[(0,Q.jsx)(`span`,{className:Z.diffStats,"aria-hidden":`true`,children:ce(R)}),(0,Q.jsx)(`span`,{className:`visually-hidden`,children:Ce(R)}),(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,Q.jsxs)(`span`,{className:Z.runSource,title:R.sourceHint??void 0,children:[R.partial?`Partial · `:``,R.sourceLabel]}),P===null?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,Q.jsx)(`code`,{title:`The model that produced this change`,children:R.model})]}):null]}):null,z?(0,Q.jsx)(`p`,{className:Z.summary,children:z}):null]}),(0,Q.jsxs)(`section`,{className:Z.block,"aria-label":`Evidence`,children:[(0,Q.jsx)(`h4`,{className:Z.blockTitle,children:`Evidence`}),(0,Q.jsxs)(`dl`,{className:Z.defs,children:[(0,Q.jsx)(`dt`,{children:`Judge verdict`}),(0,Q.jsx)(`dd`,{children:(0,Q.jsx)(te,{quality:A?.sourceQuality,label:`judge verdict`,children:M&&j?.judgeReasonCode?(0,Q.jsx)(g,{status:j.judgeReasonCode,tone:M.tone,children:M.label}):(0,Q.jsx)(`span`,{className:Z.muted,children:`not yet judged`})})}),(0,Q.jsx)(`dt`,{children:`Verification`}),(0,Q.jsx)(`dd`,{children:k.verifyResult?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(g,{status:k.verifyResult.passed?`success`:`failed`,children:k.verifyResult.passed?`passed`:`failed`}),k.verifyResult.ran&&k.verifyResult.ran.length>0?(0,Q.jsxs)(`span`,{className:Z.muted,children:[` · ran `,k.verifyResult.ran.map(e=>e.kind).join(`, `)]}):null,!k.verifyResult.passed&&k.verifyResult.failureCategory&&k.verifyResult.failureCategory!==`code`?(0,Q.jsxs)(`span`,{className:Z.muted,children:[` · `,k.verifyResult.failureCategory,` failure — the verifier itself, not the diff`]}):null,k.verifyResult.failed&&k.verifyResult.failed.length>0?(0,Q.jsxs)(`p`,{className:Z.failedChecks,children:[`failed: `,k.verifyResult.failed.join(`, `)]}):null]}):(0,Q.jsx)(`span`,{className:Z.muted,children:`not verified`})}),k.decisionReason?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Decision reason`}),(0,Q.jsx)(`dd`,{children:V(k.decisionReason)})]}):null,k.evidenceOutcome?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Gates`}),(0,Q.jsxs)(`dd`,{className:Z.muted,children:[k.evidenceOutcome.gateCount??0,` gate`,k.evidenceOutcome.gateCount===1?``:`s`,k.evidenceOutcome.policyAction?` · policy ${k.evidenceOutcome.policyAction}`:``,k.evidenceOutcome.trustBasis?` · trust ${k.evidenceOutcome.trustBasis}`:``]})]}):null,k.result?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Result`}),(0,Q.jsx)(`dd`,{children:V(k.result)})]}):null]})]}),(0,Q.jsxs)(`section`,{className:Z.block,"aria-label":`Provenance`,children:[(0,Q.jsx)(`h4`,{className:Z.blockTitle,children:`Provenance`}),(0,Q.jsxs)(`dl`,{className:Z.defs,children:[(0,Q.jsx)(`dt`,{children:`Produced by`}),(0,Q.jsx)(`dd`,{children:P?(0,Q.jsx)(`code`,{children:P}):(0,Q.jsx)(`span`,{className:Z.muted,children:`unknown engine`})}),(0,Q.jsx)(`dt`,{children:`Origin`}),(0,Q.jsx)(`dd`,{children:k.origin}),R?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`How it was made`}),(0,Q.jsxs)(`dd`,{children:[(0,Q.jsx)(`span`,{title:R.sourceHint??void 0,children:R.sourceLabel}),R.sourceHint?(0,Q.jsx)(`p`,{className:Z.hint,children:R.sourceHint}):null]})]}):null,k.repo?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Repository`}),(0,Q.jsx)(`dd`,{children:(0,Q.jsx)(`code`,{children:k.repo})})]}):null,k.workItemId?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Work item`}),(0,Q.jsx)(`dd`,{children:(0,Q.jsx)(`code`,{children:k.workItemId})})]}):null,k.runId?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Run`}),(0,Q.jsx)(`dd`,{children:(0,Q.jsx)(`code`,{children:k.runId})})]}):null,(0,Q.jsx)(`dt`,{children:`Attestation`}),(0,Q.jsxs)(`dd`,{className:Z.muted,children:[k.producerProvenanceSig?`signed by the sandboxed producer (v${k.producerProvenanceVersion??2})`:k.provenanceSig?`legacy signature present`:`unsigned — earns no positive routing credit`,k.diffHash?` · diff hashed at signing time`:``]})]})]}),(0,Q.jsxs)(`section`,{className:Z.block,"aria-label":`Diff`,children:[(0,Q.jsx)(`h4`,{className:Z.blockTitle,children:`Diff`}),(0,Q.jsx)(S,{diff:k.diff,proposalKind:k.kind})]}),k.status===`pending`?(0,Q.jsxs)(`footer`,{className:Z.actions,children:[(0,Q.jsx)(`p`,{className:Z.actionNote,children:t?F:`Read-only session — approve and reject are unavailable without dispatch.`}),C&&!f?(0,Q.jsx)(`p`,{className:Z.error,role:`alert`,children:C}):null,(0,Q.jsx)(`button`,{type:`button`,className:Z.reject,disabled:!N||m,onClick:()=>T(`reject`),children:`Reject`}),(0,Q.jsx)(`button`,{type:`button`,className:Z.approve,disabled:!N||m,onClick:()=>T(`approve`),children:`Approve…`})]}):(0,Q.jsxs)(`footer`,{className:Z.decided,children:[`This proposal is already `,(0,Q.jsx)(`strong`,{children:k.status}),` — no further action is available.`]}),(0,Q.jsx)(h,{open:u,onClose:E,reason:a===`approve`?`Approving a proposal writes to a real repository and requires the dispatch token.`:`Rejecting a proposal requires the dispatch token.`,tokenHelp:`the mutation token ashlr verse printed`}),(0,Q.jsx)(y,{open:f,onClose:()=>{p(!1),s(null),w(null)},title:a===`approve`?`Approve this ${k.kind} against ${L??`the repository`}?`:`Reject this proposal?`,body:a===`approve`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`strong`,{children:I.text}),(0,Q.jsx)(`br`,{}),Te(k.kind),` · `,(0,Q.jsx)(`strong`,{children:L??`unknown repository`}),k.repo?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`code`,{children:k.repo})]}):null,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`br`,{}),F,q(k.kind)?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`br`,{}),`This one leaves your machine.`]}):null]}):(0,Q.jsxs)(Q.Fragment,{children:[`This rejects `,(0,Q.jsx)(`strong`,{children:I.text}),` and discards it. It stays in history as rejected and is never applied.`]}),confirmLabel:a===`approve`?`Approve and ${q(k.kind)?`open the pull request`:`apply`}`:`Reject`,destructive:a===`approve`,busy:m,error:C,onConfirm:re})]})}var $=new Map,je=new Set;function Me(){for(let e of[...je])e()}function Ne(e,t=Date.now()){$=new Map($).set(e,t),Me()}function Pe(e,t=Date.now()){let n=!1,r=new Map($);for(let[i,a]of r)(!e.has(i)||t-a>6e4)&&(r.delete(i),n=!0);n&&($=r,Me())}function Fe(){return(0,X.useSyncExternalStore)(e=>(je.add(e),()=>je.delete(e)),()=>$,()=>$)}function Ie(e){Ne(e.id),e.source===`approvals`&&(s(`inbox`),s(`dashboard-snapshot`),d(`inbox-list:`),e.target.kind===`approval`&&s(`proposal-detail-${e.target.proposalId}`)),R()}function Le(e,t,n){let r=t.request;if(!r){n.openTarget(e);return}if(!w(r.path)){n.toast(`That action points outside this app and was not sent.`,`danger`);return}let o=be(e,t),s=ue(e).text,c=async()=>{let e=i();if(!e)throw new f(`Mutation token was rejected.`,401,r.path);await p(r.path,r.body,e),a()},l=me.has(t.kind)||o!==null;E({title:o?.title??t.label,body:o?.body??s,confirmLabel:o?.confirmLabel??t.label,destructive:t.destructive,token:!0,tokenReason:`${t.label} changes state on this machine and requires the dispatch token.`,skipConfirm:!l,run:c,onDone:()=>{Ie(e),n.toast(`${t.label}: ${s}`,`success`)},onError:l?void 0:e=>n.toast(e,`danger`)})}var Re={"drawer.approve":`approve`,"drawer.reject":`reject`,"drawer.veto":`veto`,"drawer.done":`done`};function ze(e){return e instanceof HTMLElement?e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName):!1}function Be(){let e=ie(),t=L(),n=b(),r=ee(I),{compact:i}=O(),a=Fe(),o=(0,X.useId)(),s=(0,X.useRef)(null),c=(0,X.useRef)(null),l=(0,X.useRef)(null),[d,f]=(0,X.useState)(null),[p,h]=(0,X.useState)(null),[te,g]=(0,X.useState)(!1),[_,ne]=(0,X.useState)(()=>Date.now());(0,X.useEffect)(()=>{let e=setInterval(()=>ne(Date.now()),15e3);return()=>clearInterval(e)},[]);let v=t.data,y=v?.needsYou;(0,X.useEffect)(()=>{y&&Pe(new Set(y.map(e=>e.id)))},[y]);let x=(0,X.useMemo)(()=>(y??[]).filter(e=>!a.has(e.id)),[y,a]),S=e.needsYouSplit,w=(0,X.useMemo)(()=>he(x,S),[x,S]),T=(0,X.useMemo)(()=>ge(x),[x]),E=pe(v?.sources??null,S),D=(r.data?.dispatchEnabled??!0)&&!te,j=e.needsYouFocus;(0,X.useEffect)(()=>{if(!j)return;let e=x.find(e=>e.id===j);e&&(f(e.id),h(e.id))},[j,x]),(0,X.useEffect)(()=>{if(w.length===0){d!==null&&f(null);return}(!d||!w.some(e=>e.id===d))&&f(w[0].id)},[w,d]);let N=p?x.find(e=>e.id===p)??null:null;(0,X.useEffect)(()=>{p&&!N&&h(null)},[p,N]);let B=(0,X.useCallback)(()=>h(null),[]),V=(0,X.useCallback)(()=>{re()||document.querySelector(`[aria-modal="true"]:not([data-verse-overlay])`)||(p?B():P())},[p,B]);m({open:!0,containerRef:s,onClose:V,initialFocusRef:c});let H=(0,X.useRef)(!1);(0,X.useEffect)(()=>{p?(H.current=!0,l.current?.focus({preventScroll:!0})):H.current&&(H.current=!1,c.current?.focus({preventScroll:!0}))},[p]);let U=w.length>0;(0,X.useEffect)(()=>{if(!U||p)return;let e=document.activeElement;(e===null||e===document.body||e===s.current)&&c.current?.focus({preventScroll:!0})},[U,p]);let W=(0,X.useCallback)(e=>{let t=e.target;switch(t.kind){case`approval`:f(e.id),h(e.id);return;case`session`:P(),M(t.sessionId);return;case`section`:P(),k(t.section,t.anchor);return;case`seat`:P(),k(`apps`,`seat:${t.seatId}`);return;case`url`:window.open(t.url,`_blank`,`noopener,noreferrer`);return;default:return}},[]),G=(0,X.useCallback)((e,t)=>{let r=ve(e,t);if(!r){n.show(`Nothing to ${t} on this item.`,`neutral`);return}if(!D&&r.request){n.show("This server was started without dispatch — run `ashlr verse` to act.",`neutral`);return}Le(e,r,{openTarget:W,toast:n.show})},[D,W,n]);function K(e){if(w.length===0)return;let t=Math.max(0,w.findIndex(e=>e.id===d)),n=w[(t+e+w.length)%w.length];f(n.id),p&&h(n.id)}function q(e){let t=F.indexOf(S),n=F[(t+e+F.length)%F.length];A(n),h(null)}function se(e){if(e.defaultPrevented||ze(e.target)||!(e.target instanceof Node)||!s.current?.contains(e.target))return;let t=C(e.nativeEvent,[`drawer`]);if(!t||t.id===`drawer.open`&&e.target instanceof HTMLButtonElement)return;e.preventDefault(),e.stopPropagation();let n=w.find(e=>e.id===(p??d))??null;switch(t.id){case`drawer.next`:K(1);return;case`drawer.prev`:K(-1);return;case`drawer.split-next`:q(1);return;case`drawer.split-prev`:q(-1);return;case`drawer.open`:n&&h(n.id);return;default:{let e=Re[t.id];e&&n&&G(n,e)}}}let ce=!v&&(t.status===`loading`||t.status===`idle`),ue=!v&&t.status===`unavailable`;return(0,De.createPortal)((0,Q.jsx)(`div`,{className:Y.backdrop,onMouseDown:e=>e.target===e.currentTarget&&P(),children:(0,Q.jsxs)(`div`,{ref:s,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,className:Y.panel,"data-presentation":i?`full`:`side`,"data-verse-overlay":`needs-you`,"data-scope":`drawer`,tabIndex:-1,onKeyDown:se,children:[(0,Q.jsxs)(`header`,{className:Y.head,children:[(0,Q.jsxs)(`h2`,{id:o,className:Y.title,children:[`Needs you`,v?(0,Q.jsx)(`span`,{className:Y.titleCount,children:T.all}):null]}),(0,Q.jsx)(oe,{variant:`ghost`,size:`sm`,icon:(0,Q.jsx)(z,{}),"aria-label":`Close Needs you`,onClick:P})]}),(0,Q.jsx)(`div`,{role:`tablist`,"aria-label":`Splits`,className:Y.splits,onKeyDown:e=>{(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&(e.preventDefault(),q(e.key===`ArrowRight`?1:-1))},children:F.map(e=>(0,Q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":e===S,tabIndex:e===S?0:-1,className:Y.split,onClick:()=>{A(e),h(null)},children:[J[e],(0,Q.jsx)(`span`,{className:Y.splitCount,"aria-label":`${T[e]} items`,children:T[e]})]},e))}),(0,Q.jsxs)(`div`,{className:Y.body,children:[N?(0,Q.jsxs)(`div`,{ref:l,className:Y.detail,tabIndex:-1,"aria-label":`Item detail`,children:[(0,Q.jsxs)(`button`,{type:`button`,className:Y.back,onClick:B,children:[`‹ All `,J[S].toLowerCase()]}),N.target.kind===`approval`?(0,Q.jsx)(`div`,{className:Y.approval,children:(0,Q.jsx)(Ae,{id:N.target.proposalId,dispatchEnabled:D,onDispatchDisabled:()=>g(!0),onDecided:()=>{Ne(N.id),R(),B()}},N.target.proposalId)}):(0,Q.jsx)(We,{item:N,now:_,seats:r.data?.seats??Ue,onAct:G,onOpenTarget:W,dispatchEnabled:D})]}):ce?(0,Q.jsxs)(`div`,{className:Y.loading,role:`status`,"aria-label":`Loading`,children:[(0,Q.jsx)(u,{}),(0,Q.jsx)(u,{}),(0,Q.jsx)(u,{})]}):ue?(0,Q.jsxs)(`div`,{className:Y.empty,children:[(0,Q.jsx)(`p`,{className:Y.emptyTitle,children:`Needs you isn't available on this server`}),(0,Q.jsx)(`p`,{className:Y.emptyBody,children:`This build does not report activity yet, so nothing here can be vouched for. Approvals still work from the inbox.`})]}):w.length===0?(0,Q.jsx)(Ve,{coverageText:le(E),vouched:E.vouched,autonomyLabel:v?.autonomy?.label??null,split:S}):(0,Q.jsx)(xe,{ref:c,items:w,selectedId:d,onSelect:f,onOpen:e=>{f(e),h(e)},now:_,label:`${J[S]} needing you`}),w.length===0&&!N?(0,Q.jsx)(`div`,{ref:c,tabIndex:-1,className:Y.focusSink,"aria-hidden":`true`}):null]}),i?null:(0,Q.jsxs)(`footer`,{className:Y.foot,"aria-hidden":`true`,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`J`}),(0,Q.jsx)(`kbd`,{className:Y.key,children:`K`}),` move`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:(0,Q.jsx)(ae,{})}),` open`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`A`}),` approve`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`R`}),` reject`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`V`}),` veto`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`E`}),` done`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`kbd`,{className:Y.key,children:`H`}),(0,Q.jsx)(`kbd`,{className:Y.key,children:`L`}),` splits`]})]}),!E.vouched&&w.length>0?(0,Q.jsxs)(`p`,{className:Y.caveat,role:`note`,children:[le(E),` — this list may be incomplete.`]}):null]})}),document.body)}function Ve({vouched:e,coverageText:t,autonomyLabel:n,split:r}){return e?(0,Q.jsxs)(`div`,{className:Y.empty,"data-state":`clear`,children:[(0,Q.jsx)(`span`,{className:Y.clearMark,"aria-hidden":`true`}),(0,Q.jsx)(`p`,{className:Y.emptyTitle,children:`All clear`}),(0,Q.jsx)(`p`,{className:Y.emptyBody,children:n?`Fleet: ${n}.`:`Nothing is waiting on you.`})]}):(0,Q.jsxs)(`div`,{className:Y.empty,"data-state":`unknown`,children:[(0,Q.jsxs)(`p`,{className:Y.emptyTitle,children:[`Nothing to show`,r===`all`?``:` in ${J[r]}`,` — but it isn't an all-clear`]}),(0,Q.jsxs)(`p`,{className:Y.emptyBody,children:[t,`.`]})]})}var He=e=>{switch(e.target.kind){case`session`:return`Open chat`;case`section`:return`Open ${j(e.target.section).label}`;case`seat`:return`Open Apps & Accounts`;case`url`:return`Open on GitHub`;default:return null}},Ue=[];function We({item:e,now:t,seats:n,onAct:r,onOpenTarget:i,dispatchEnabled:a}){let o=He(e),s=Se(e,t),c=e.subject.seatId?ye(n,e.subject.seatId):null,l=s.run?de(n,s.run.model,e.subject.seatId):null;return(0,Q.jsxs)(`article`,{className:Y.item,children:[(0,Q.jsxs)(`header`,{className:Y.itemHead,children:[s.kindLabel?(0,Q.jsx)(`p`,{className:Y.rowKind,children:s.kindLabel}):null,(0,Q.jsx)(`h3`,{className:Y.itemTitle,title:s.fullTitle,children:s.title}),s.run?(0,Q.jsx)(_e,{run:s.run}):null]}),s.detail?(0,Q.jsx)(`p`,{className:Y.itemDetail,children:s.detail}):null,(0,Q.jsxs)(`dl`,{className:Y.defs,children:[s.repo?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Repo`}),(0,Q.jsx)(`dd`,{className:Y.repo,title:s.repoFull,children:s.repo})]}):null,e.subject.pr?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Pull request`}),(0,Q.jsxs)(`dd`,{children:[`#`,e.subject.pr]})]}):null,c?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Seat`}),(0,Q.jsx)(`dd`,{className:c.raw?void 0:Y.mono,title:c.raw,children:c.text})]}):null,l?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Model`}),(0,Q.jsx)(`dd`,{className:l.raw?void 0:Y.mono,title:l.raw,children:l.text})]}):null,(0,Q.jsx)(`dt`,{children:`Raised`}),(0,Q.jsx)(`dd`,{title:s.ageStamp,children:s.age}),e.expiresAt?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`dt`,{children:`Closes`}),(0,Q.jsx)(`dd`,{className:Y.deadline,children:fe(e.expiresAt,t)})]}):null]}),(0,Q.jsxs)(`div`,{className:Y.itemActions,children:[o?(0,Q.jsx)(H,{variant:`subtle`,size:`sm`,onClick:()=>i(e),trailingIcon:e.target.kind===`url`?(0,Q.jsx)(B,{}):void 0,children:o}):null,e.actions.map(t=>{let n=T[t.kind],i=t.request!==null;return(0,Q.jsxs)(H,{size:`sm`,variant:t.destructive?`danger`:t.kind===`approve`?`primary`:`subtle`,disabled:i&&!a,onClick:()=>r(e,t.kind),"aria-keyshortcuts":n,children:[t.label,n?(0,Q.jsx)(`kbd`,{className:Y.inlineKey,"aria-hidden":`true`,children:n}):null]},t.kind)})]}),a?null:(0,Q.jsx)(`p`,{className:Y.caveat,children:"Read-only session — actions need `ashlr verse`."})]})}export{Be as NeedsYouDrawer,N as VERSE_ANCHOR_EVENT};
|
|
2
|
-
//# sourceMappingURL=NeedsYouDrawer-rSd1ZHAR.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{$ as r,W as i,h as a,s as o}from"./global-Di2PUgj4.js";import{n as ee}from"./MutationTokenDialog-SkRxqV_I.js";import{o as s,r as c,x as te}from"./verse-queries-DvIJcn6Z.js";import{t as l}from"./Segmented-BL40udoO.js";import{r as u}from"./verse-store-DjBWj04q.js";import{i as ne}from"./verse-model-D7NZQFAR.js";import{c as d,i as re,n as f}from"./context-queries-xVKIeynP.js";import{a as p,v as m}from"./git-model-CivuBY_D.js";import{C as h,_ as ie,a as ae,b as oe,c as g,g as _,h as v,i as se,l as ce,n as y,t as b,u as x,x as le,y as S}from"./context-model-MT17V86_.js";import{n as ue,t as de}from"./SeatSelector-DpvvbjNm.js";import{r as fe}from"./CapacityStrip-C667yQe8.js";import{a as pe,m as me,o as he,s as ge,v as _e}from"./workspace-model-D_tWD5Wt.js";import{n as ve,t as ye}from"./folder-picker-C8zo3A56.js";var C=n(e(),1),w={option:`_option_qkog4_1`,toggle:`_toggle_qkog4_12`,details:`_details_qkog4_24`,nameLabel:`_nameLabel_qkog4_30`,name:`_name_qkog4_30`,hint:`_hint_qkog4_46`},T=t(),E=/^[a-z0-9][a-z0-9._-]{0,62}$/i;function D(e){return E.test(e)&&!e.endsWith(`.lock`)&&!e.includes(`..`)}function be(e=new Date){let t=e=>String(e).padStart(2,`0`);return`chat-${t(e.getMonth()+1)}${t(e.getDate())}-${t(e.getHours())}${t(e.getMinutes())}`}function O(e){return e.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[^a-z0-9]+/,``).replace(/-{2,}/g,`-`).slice(0,63)}function xe({repoName:e,value:t,onChange:n,disabled:r=!1}){let i=(0,C.useId)(),a=(0,C.useId)(),o=D(t.name);return(0,T.jsxs)(`fieldset`,{className:w.option,disabled:r,children:[(0,T.jsxs)(`label`,{className:w.toggle,children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:t.enabled,onChange:e=>n({enabled:e.target.checked,name:t.name||be()}),"aria-describedby":a}),`Isolate in a worktree`]}),t.enabled?(0,T.jsxs)(`div`,{className:w.details,children:[(0,T.jsx)(`label`,{className:w.nameLabel,htmlFor:i,children:`Name`}),(0,T.jsx)(`input`,{id:i,className:w.name,value:t.name,onChange:e=>n({...t,name:O(e.target.value)}),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":!o||void 0,"aria-describedby":a,maxLength:63})]}):null,(0,T.jsx)(`p`,{id:a,className:w.hint,children:t.enabled?o?(0,T.jsxs)(T.Fragment,{children:[`Creates `,(0,T.jsxs)(`code`,{children:[`~/.ashlr-worktrees/`,e,`/`,t.name]}),` on a new branch `,(0,T.jsxs)(`code`,{children:[`verse/`,t.name]}),`, from the current commit. Uncommitted changes stay in `,e,`.`]}):`Use letters, digits, dots, dashes or underscores.`:`The chat works on its own branch in its own folder, so your checkout is untouched.`})]})}async function Se(e,t){return t.enabled?(await m(e,t.name)).path:e}var k={width:`_width_stwix_1`,form:`_form_stwix_3`,field:`_field_stwix_4`,label:`_label_stwix_5`,optional:`_optional_stwix_13`,select:`_select_stwix_15`,input:`_input_stwix_16`,hint:`_hint_stwix_40`,error:`_error_stwix_41`,actions:`_actions_stwix_49`,cancel:`_cancel_stwix_50`,create:`_create_stwix_51`,capacity:`_capacity_stwix_72`,rootRow:`_rootRow_stwix_78`,removeRoot:`_removeRoot_stwix_87`,addRoot:`_addRoot_stwix_88`,context:`_context_stwix_108`,contextHead:`_contextHead_stwix_115`,contextBudget:`_contextBudget_stwix_122`,warn:`_warn_stwix_130`,fit:`_fit_stwix_137`,fitLine:`_fitLine_stwix_138`,fitBadge:`_fitBadge_stwix_147`,seatFacts:`_seatFacts_stwix_165`},Ce=`\0workspace:`,A=`\0other`,we=(e,t)=>t();function Te(e,t){return e?.seats[t]?.contextMode??`standard`}function Ee(e,t,n){return e?r(e)?S(e,t):n!==`standard`&&i(e,`standard`)!==null?`standard`:null:null}function j(e){return e instanceof c?`Unlock actions with the mutation token to save a default.`:e instanceof o?e.detail??e.message:e instanceof Error?e.message:String(e)}function M({open:e,onClose:t,projects:n,seats:i,workspaces:o=[],initialProjectPath:c,initialSeat:l,busy:u=!1,error:ne,onCreate:m,runMutation:ie=we}){let ae=(0,C.useId)(),oe=(0,C.useId)(),g=(0,C.useId)(),v=(0,C.useId)(),se=(0,C.useId)(),ce=(0,C.useRef)(null),[y,x]=(0,C.useState)(``),[le,w]=(0,C.useState)(``),[E,O]=(0,C.useState)(null),[M,Ae]=(0,C.useState)(``),[je,N]=(0,C.useState)(null),[P,F]=(0,C.useState)([]),[Me,Ne]=(0,C.useState)([]),[Pe,I]=(0,C.useState)(!1),[Fe,L]=(0,C.useState)(null),[R,z]=(0,C.useState)(null),[Ie,Le]=(0,C.useState)(null),[Re,B]=(0,C.useState)(null),[ze,Be]=(0,C.useState)(!1),[Ve,V]=(0,C.useState)(null),[He,H]=(0,C.useState)({status:`idle`}),[U,Ue]=(0,C.useState)({enabled:!1,name:``}),[We,Ge]=(0,C.useState)(!1),Ke=(0,C.useRef)(new Map),qe=(0,C.useMemo)(()=>[...n].sort((e,t)=>Number(t.enrolled)-Number(e.enrolled)||e.name.localeCompare(t.name)),[n]),Je=(0,C.useRef)({initialProjectPath:c,initialSeat:l,projects:n,seats:i,sortedProjects:qe});Je.current={initialProjectPath:c,initialSeat:l,projects:n,seats:i,sortedProjects:qe},(0,C.useEffect)(()=>{if(!e)return;let{initialProjectPath:t,initialSeat:n,projects:r,seats:i,sortedProjects:a}=Je.current,o=t&&r.some(e=>e.path===t)?t:null;x(o??(t?A:a[0]?.path??A)),w(o?``:t??``),O(Oe(n??null,i)??ue(i)),Ae(``),N(null),F([]),L(null),I(!1),Ne([]),B(null),V(null),Be(!1),Ue({enabled:!1,name:be()}),Ge(!1),Ke.current=new Map},[e]),(0,C.useEffect)(()=>{if(!e)return;let t=!1;return Le(null),re().then(e=>{t||z(e)}).catch(e=>{t||(z(null),Le(j(e)))}),()=>{t=!0}},[e]),(0,C.useEffect)(()=>{e&&E===null&&i.length!==0&&O(Oe(l??null,i)??ue(i))},[e,E,i,l]);let Ye=a(te);(0,C.useEffect)(()=>{e&&Ye()},[e,Ye]);let Xe=(0,C.useMemo)(()=>{let e=new Map;for(let t of o)e.set(t.id,t);for(let t of Me)e.has(t.id)||e.set(t.id,t);return[...e.values()]},[o,Me]),W=y.startsWith(Ce),G=W?y.slice(11):null,K=W?``:y===A?le.trim():y,q=E===null?null:i.find(e=>e.id===E.seatId)??null,J=q===null||E===null?null:h(q,E.model),Ze=q?.health.state===`unavailable`,Y=q!==null&&J!==null?_(q,J):null,Qe=!W&&K.length>0,$e=Qe&&U.enabled,et=!u&&!We&&(W||K.length>0)&&E!==null&&!Ze&&J!==null&&Y===null&&(!$e||D(U.name)),tt=G===null?null:Xe.find(e=>e.id===G)??null,X=E===null?`standard`:Te(R,E.seatId),Z=S(J,Re??X),nt=r(J),rt=S(J,X),it=(0,C.useCallback)((e,t)=>E!==null&&e.id===E.seatId&&t.id===E.model?Z:S(t,Te(R,e.id)),[E,Z,R]);function at(e){O(e),B(null),V(null)}async function ot(){if(E===null||q===null)return;let e=Z;Be(!0),V(null);try{let t=await ie(`Saving ${b[e]} as the default context mode for ${q.label}.`,()=>d({seatId:E.seatId,contextMode:e}).then(e=>({ok:!0,prefs:e}),e=>({ok:!1,error:e})));if(t===null)return;if(!t.ok){V({ok:!1,text:j(t.error)});return}z(t.prefs),B(null),V({ok:!0,text:`New chats on ${q.label} now start in ${b[e]}.`})}catch(e){V({ok:!1,text:j(e)})}finally{Be(!1)}}let st=(0,C.useMemo)(()=>{if(G!==null)return{key:`w:${G}`,query:{workspaceId:G}};if(W)return null;let e=me(K,P);if(!e.ok)return null;let[t,...n]=e.roots;return{key:`p:${e.roots.join(`
|
|
2
|
-
`)}`,query:n.length>0?{projectPath:t,extraRoots:n}:{projectPath:t}}},[G,W,K,P]),ct=(0,C.useRef)(st);ct.current=st;let Q=st?.key??null;(0,C.useEffect)(()=>{let t=ct.current;if(!e||Q===null||t===null){H({status:`idle`});return}let n=Ke.current.get(Q);if(n){H({status:`ready`,key:Q,fit:n});return}let r=!1;H({status:`loading`,key:Q});let i=setTimeout(()=>{f(t.query).then(e=>{Ke.current.set(Q,e),r||H({status:`ready`,key:Q,fit:e})}).catch(e=>{r||H({status:`error`,key:Q,message:j(e)})})},350);return()=>{r=!0,clearTimeout(i)}},[e,Q]);let $=Q===null?{status:`idle`}:He.status!==`idle`&&He.key===Q?He:{status:`loading`,key:Q},lt=$.status===`ready`?$.fit:null,ut=ge(q?.engine??null,1+P.length),dt=he(q?.engine??null,tt?.roots.length??0),ft=ye();async function pt(){let e=await ve();e!==null&&e.length>0&&(x(A),w(e))}async function mt(e){let t=await ve();t!==null&&t.length>0&&F(P.map((n,r)=>r===e?t:n))}async function ht(){let e=me(K,P);if(!e.ok){N(e.error);return}I(!0),N(null),L(null);try{let t=pe(e.roots[0]),n=await s({name:t,roots:e.roots});Ne(e=>[...e,n]),x(`${Ce}${n.id}`),L(`Saved. “${n.name}” is in this list from now on.`)}catch(e){N(e instanceof Error?e.message:String(e))}finally{I(!1)}}function gt(e){if(e.preventDefault(),!E){N(`Pick a seat first.`);return}if(J===null){N(`Pick a model this seat offers.`);return}if(Y!==null){N(`${J.label} cannot run on this seat: ${Y}.`);return}if(G!==null){N(null);let e={workspaceId:G,seatId:E.seatId,model:E.model};delete e.projectPath;let t=M.trim();t&&(e.title=t);let n=Ee(J,Z,X);n!==null&&(e.contextMode=n),m(e);return}let t=me(K,P);if(!t.ok){N(t.error);return}if($e&&!D(U.name)){N(`Name the worktree with letters, digits, dots, dashes or underscores.`);return}N(null);let[n,...r]=t.roots,i={projectPath:n,seatId:E.seatId,model:E.model};r.length>0&&(i.extraRoots=r);let a=M.trim();a&&(i.title=a);let o=Ee(J,Z,X);if(o!==null&&(i.contextMode=o),!$e){m(i);return}_t(n,i)}async function _t(e,t){Ge(!0);try{let n=await ie(`Creating the worktree ${U.name} (a new branch verse/${U.name}) for this chat.`,()=>Se(e,U).then(e=>({ok:!0,folder:e}),e=>({ok:!1,error:e})));if(n===null)return;if(!n.ok){N(`The worktree could not be created: ${p(n.error)}`);return}await m({...t,projectPath:n.folder})}catch(e){N(p(e))}finally{Ge(!1)}}let vt=je??ne??null;return(0,T.jsx)(ee,{open:e,onClose:t,titleId:ae,title:`New chat`,initialFocusRef:ce,widthClassName:k.width,children:(0,T.jsxs)(`form`,{className:k.form,onSubmit:gt,noValidate:!0,children:[(0,T.jsxs)(`label`,{className:k.field,htmlFor:oe,children:[(0,T.jsx)(`span`,{className:k.label,children:`Project`}),(0,T.jsxs)(`select`,{id:oe,ref:ce,value:y,onChange:e=>x(e.target.value),className:k.select,children:[Xe.length>0?(0,T.jsx)(`optgroup`,{label:`Saved projects`,children:Xe.map(e=>(0,T.jsxs)(`option`,{value:`${Ce}${e.id}`,children:[e.name,` — `,_e(e)]},e.id))}):null,qe.map(e=>(0,T.jsxs)(`option`,{value:e.path,children:[e.name,e.enrolled?``:` (recent)`,` — `,e.path]},e.path)),(0,T.jsx)(`option`,{value:A,children:`Other folder…`})]})]}),y===A&&!W?(0,T.jsxs)(`label`,{className:k.field,htmlFor:g,children:[(0,T.jsx)(`span`,{className:k.label,children:`Folder path`}),(0,T.jsxs)(`div`,{className:k.rootRow,children:[(0,T.jsx)(`input`,{id:g,className:k.input,value:le,onChange:e=>w(e.target.value),placeholder:`/absolute/path/to/project`,autoComplete:`off`,spellCheck:!1}),ft?(0,T.jsx)(`button`,{type:`button`,className:k.addRoot,onClick:()=>void pt(),children:`Choose folder…`}):null]})]}):null,dt?(0,T.jsx)(`p`,{className:k.hint,children:dt}):null,W?null:(0,T.jsxs)(`div`,{className:k.field,children:[(0,T.jsxs)(`span`,{className:k.label,children:[`Also include `,(0,T.jsx)(`span`,{className:k.optional,children:`optional`})]}),P.map((e,t)=>(0,T.jsxs)(`div`,{className:k.rootRow,children:[(0,T.jsx)(`input`,{className:k.input,value:e,onChange:e=>F(P.map((n,r)=>r===t?e.target.value:n)),placeholder:`/absolute/path/to/another/folder`,"aria-label":`Additional folder ${t+1}`,autoComplete:`off`,spellCheck:!1}),ft?(0,T.jsx)(`button`,{type:`button`,className:k.removeRoot,onClick:()=>void mt(t),"aria-label":`Choose additional folder ${t+1}`,children:`Choose folder…`}):null,(0,T.jsx)(`button`,{type:`button`,className:k.removeRoot,onClick:()=>F(P.filter((e,n)=>n!==t)),"aria-label":`Remove additional folder ${t+1}`,children:`Remove`})]},t)),P.length+1<8?(0,T.jsx)(`button`,{type:`button`,className:k.addRoot,onClick:()=>F([...P,``]),children:`Add a folder`}):null,ut?(0,T.jsx)(`p`,{className:k.hint,children:ut}):null,(0,T.jsxs)(`div`,{className:k.rootRow,children:[(0,T.jsx)(`button`,{type:`button`,className:k.addRoot,onClick:()=>void ht(),disabled:Pe||K.length===0,children:Pe?`Saving…`:`Save as a project`}),(0,T.jsx)(`span`,{className:k.hint,children:`Keeps these folders in the list above. No chat needed first.`})]})]}),Fe?(0,T.jsx)(`p`,{role:`status`,className:k.hint,children:Fe}):null,Qe?(0,T.jsx)(xe,{repoName:De(K),value:U,onChange:Ue,disabled:We||u}):null,(0,T.jsx)(de,{id:se,seats:i,value:E,onChange:at,workingSetTokens:lt?.totalEstTokens??null,modeFor:it}),q===null?null:(0,T.jsx)(`div`,{className:k.capacity,children:(0,T.jsx)(fe,{seats:i,seatIds:[q.id],local:`each`,headline:!1,title:`${q.label} capacity`})}),q===null||J===null?null:(0,T.jsx)(ke,{seat:q,option:J,unavailableReason:Y,mode:Z,offersModes:nt,savedDefault:rt,prefsLoaded:R!==null,prefsError:Ie,onMode:e=>{B(e),V(null)},savingDefault:ze,defaultNote:Ve,onMakeDefault:()=>void ot(),fitState:$}),i.length===0?(0,T.jsx)(`p`,{className:k.hint,children:`No seats yet — connect an account or start Ollama, then reload.`}):null,(0,T.jsxs)(`label`,{className:k.field,htmlFor:v,children:[(0,T.jsxs)(`span`,{className:k.label,children:[`Title `,(0,T.jsx)(`span`,{className:k.optional,children:`optional`})]}),(0,T.jsx)(`input`,{id:v,className:k.input,value:M,onChange:e=>Ae(e.target.value),placeholder:`Defaults to your first message`,maxLength:120})]}),vt?(0,T.jsx)(`p`,{role:`alert`,className:k.error,children:vt}):null,(0,T.jsxs)(`div`,{className:k.actions,children:[(0,T.jsx)(`button`,{type:`button`,className:k.cancel,onClick:t,children:`Cancel`}),(0,T.jsx)(`button`,{type:`submit`,className:k.create,disabled:!et,children:We?`Creating worktree…`:u?`Creating…`:`Start chat`})]})]})})}function De(e){let t=e.replace(/[\\/]+$/,``).split(/[\\/]/);return t[t.length-1]||e}function Oe(e,t){if(e===null)return null;let n=t.find(t=>t.id===e.seatId),r=h(n,e.model);return r===null?e:{seatId:e.seatId,model:r.id}}function ke({seat:e,option:t,unavailableReason:n,mode:r,offersModes:a,savedDefault:o,prefsLoaded:ee,prefsError:s,onMode:c,savingDefault:te,defaultNote:d,onMakeDefault:re,fitState:f}){let p=(0,C.useId)(),m=ae(t,r),h=oe(e),_=le(e),S=f.status===`ready`?v(f.fit.totalEstTokens,t,r,e.engine):null;return(0,T.jsxs)(`div`,{className:k.context,role:`group`,"aria-labelledby":p,children:[(0,T.jsxs)(`div`,{className:k.contextHead,children:[(0,T.jsx)(`span`,{id:p,className:k.label,children:`Context`}),(0,T.jsx)(`span`,{className:k.contextBudget,children:m===null?`Window unknown`:`${u(m.contextWindow)} window${m.autoCompactAt===null?``:` · compacts ≈${u(m.autoCompactAt)}`}`})]}),m!==null&&t.windowSource?(0,T.jsxs)(`p`,{className:k.hint,children:[`Window `,ne[t.windowSource],`.`]}):null,n===null?null:(0,T.jsxs)(`p`,{className:k.warn,children:[t.label,` cannot run on this seat: `,n,`. Pick another model.`]}),a?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(l,{"aria-label":`Context mode`,size:`sm`,value:r,onChange:c,options:[`standard`,`expansive`].map(e=>{let n=i(t,e);return{value:e,label:n===null?b[e]:`${b[e]} · ≈${u(n.autoCompactAt??n.contextWindow)}`,ariaLabel:b[e]}})}),(0,T.jsx)(`p`,{className:k.hint,children:se(e.engine,t,r)}),ee&&r!==o?(0,T.jsx)(`div`,{className:k.rootRow,children:(0,T.jsx)(`button`,{type:`button`,className:k.addRoot,onClick:re,disabled:te,children:te?`Saving…`:`Make ${b[r]} the default for ${e.label}`})}):null,d===null?null:(0,T.jsx)(`p`,{role:d.ok?`status`:`alert`,className:d.ok?k.hint:k.error,children:d.text}),s===null?null:(0,T.jsxs)(`p`,{className:k.hint,children:[`Saved defaults could not be read (`,s,`); this chat starts in `,b[r],` unless you pick otherwise.`]})]}):(0,T.jsx)(`p`,{className:k.hint,children:ie(e.engine,t)}),(0,T.jsx)(`div`,{className:k.fit,"aria-live":`polite`,children:f.status===`idle`?null:f.status===`loading`?(0,T.jsx)(`p`,{className:k.hint,children:`Sizing the chosen folders…`}):f.status===`error`?(0,T.jsxs)(`p`,{className:k.hint,children:[`Could not size the chosen folders: `,f.message]}):S===null?(0,T.jsxs)(`p`,{className:k.hint,children:[`~`,u(f.fit.totalEstTokens),` tokens of tracked code; this model’s budget is unknown, so no fit is claimed.`]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`p`,{className:k.fitLine,children:[(0,T.jsx)(`span`,{className:k.fitBadge,"data-fit":S,children:y[S]}),(0,T.jsx)(`span`,{children:g({verdict:S,tokens:f.fit.totalEstTokens,option:t,mode:r,floor:ce(f.fit)})})]}),(0,T.jsx)(`p`,{className:k.hint,children:x(e.engine)})]})}),h===null&&_.length===0?null:(0,T.jsxs)(`ul`,{className:k.seatFacts,"aria-label":`${e.label} facts`,children:[h===null?null:(0,T.jsxs)(`li`,{children:[`Runs `,h,`.`]}),_.map(e=>(0,T.jsx)(`li`,{children:e},e))]})]})}export{M as NewChatDialog};
|
|
3
|
-
//# sourceMappingURL=NewChatDialog-BeDQ1eW3.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{m as r}from"./global-Di2PUgj4.js";import{C as i,n as a,y as o}from"./verse-ui-store-zafyzXKD.js";import{S as s,T as c,c as l,f as u,i as d,n as f,t as p}from"./icons-B_yuAgdN.js";import{A as m,D as h,E as g,O as _,c as v}from"./VerseConsoleApp-WVeyJnW7.js";import{v as y}from"./format-B8DAVcn2.js";import{r as b}from"./CapacityStrip-C667yQe8.js";import{t as x}from"./Button-DYv_KKxr.js";import"./primitives-BDIcUvob.js";import{a as S,s as C}from"./usage-queries-Bn8ccqyN.js";var w=n(e(),1),T=[{id:`welcome`,title:`Welcome to Verse`,subtitle:`Five sections, one rail. Two minutes and you will know what each one does.`},{id:`accounts`,title:`Your seats`,subtitle:`Which provider accounts this machine can actually dispatch to right now.`},{id:`local`,title:`Local runtime`,subtitle:`Whether there is a model on this machine, and what that changes.`},{id:`stops`,title:`Three ways to stop`,subtitle:`They do not have the same blast radius. This is the one screen that says so.`},{id:`finish`,title:`Make it yours`,subtitle:`Theme, accent, density and font live in Settings. Then start a chat.`}];function E(e){return Number.isFinite(e)?Math.min(T.length-1,Math.max(0,Math.trunc(e))):0}var D=`Local seats cost nothing and consume no provider quota, so the autonomous loop can keep working after a cloud window is used up.`,O=`Without one, every turn and every autonomous tick spends a provider account, and a used-up window stops the work.`;function k(e){if(e.loading)return{tone:`unknown`,state:`checking`,summary:`Probing the local runtimes on this machine…`,meaning:D,fix:null,modelCount:0,toolCapableCount:0,stale:!1};if(!e.snapshot)return{tone:`unknown`,state:`not reported`,summary:`This server does not report local runtimes, so Verse cannot say whether one is available here.`,meaning:O,fix:e.unavailableReason,modelCount:0,toolCapableCount:0,stale:!1};let t=e.snapshot.models,n=t.filter(e=>e.supportsTools===!0).length,r=e.snapshot.runtimes.some(e=>e.stale);return e.snapshot.reachable?t.length===0?{tone:`attention`,state:`no models`,summary:`A local runtime answered, but it has no models installed.`,meaning:O,fix:`Pull a model into the runtime, then press Refresh in Usage.`,modelCount:0,toolCapableCount:0,stale:r}:{tone:`ok`,state:r?`available (retained reading)`:`available`,summary:`${t.length} local ${t.length===1?`model`:`models`} available`+(n>0?`, ${n} of them tool-capable.`:`, none of them tool-capable.`)+(r?` This is a retained reading, not a fresh probe.`:``),meaning:n>0?D:`${D} A model that cannot call tools can answer, but cannot run an agentic turn.`,fix:null,modelCount:t.length,toolCapableCount:n,stale:r}:{tone:`attention`,state:`unreachable`,summary:`No local runtime answered. Verse cannot tell whether one is not running or not installed — the probe only knows it got no answer.`,meaning:O,fix:`Start Ollama (or LM Studio) and press Refresh in Usage. If neither is installed, everything still works — it all runs on the cloud seats.`,modelCount:0,toolCapableCount:0,stale:r}}var A=[{name:`Pause`,scope:`Halts autonomous dispatch only. A running loop parks instead of exiting.`,limit:`Your own chats and the agent’s write tools keep working.`,reversible:`Reversible in one click, with no restart and no confirmation.`,tone:`ok`},{name:`Stop loop`,scope:`Stops the daemon — and engages the GLOBAL kill switch while doing it.`,limit:`That means it also refuses the agent’s own write tools, exactly like the emergency control.`,reversible:`Reversible, but confirm-guarded. For an ordinary halt, use Pause.`,tone:`attention`},{name:`Emergency stop`,scope:`Engages the global kill switch (~/.ashlr/KILL) directly.`,limit:`Every mutating path refuses: the loop, dispatch, and the agent’s own write tools.`,reversible:`Reversible, confirm-guarded, and deliberately separated from the other two.`,tone:`attention`}],j={card:`_card_13g9r_14`,"onboarding-in":`_onboarding-in_13g9r_1`,head:`_head_13g9r_56`,headText:`_headText_13g9r_64`,eyebrow:`_eyebrow_13g9r_72`,title:`_title_13g9r_80`,subtitle:`_subtitle_13g9r_88`,body:`_body_13g9r_96`,lead:`_lead_13g9r_107`,aside:`_aside_13g9r_113`,caveat:`_caveat_13g9r_114`,kbd:`_kbd_13g9r_125`,sections:`_sections_13g9r_138`,findings:`_findings_13g9r_139`,sectionRow:`_sectionRow_13g9r_148`,sectionIcon:`_sectionIcon_13g9r_160`,localIcon:`_localIcon_13g9r_161`,sectionText:`_sectionText_13g9r_173`,sectionName:`_sectionName_13g9r_180`,sectionBlurb:`_sectionBlurb_13g9r_190`,finding:`_finding_13g9r_139`,findingHead:`_findingHead_13g9r_210`,stopName:`_stopName_13g9r_218`,findingDetail:`_findingDetail_13g9r_225`,findingNote:`_findingNote_13g9r_231`,findingFix:`_findingFix_13g9r_237`,fixLabel:`_fixLabel_13g9r_245`,fixText:`_fixText_13g9r_254`,code:`_code_13g9r_260`,tone:`_tone_13g9r_276`,toneLabel:`_toneLabel_13g9r_283`,foot:`_foot_13g9r_305`,pips:`_pips_13g9r_315`,pip:`_pip_13g9r_315`,actions:`_actions_13g9r_338`},M=t();function N({tone:e,label:t}){let n=e===`ok`?d:e===`attention`?p:u;return(0,M.jsxs)(`span`,{className:j.tone,"data-tone":e,children:[(0,M.jsx)(n,{size:13,"aria-hidden":`true`,focusable:`false`}),(0,M.jsx)(`span`,{className:j.toneLabel,children:t})]})}function P({children:e}){return(0,M.jsx)(`div`,{className:j.body,children:e})}function F(){return(0,M.jsxs)(P,{children:[(0,M.jsx)(`p`,{className:j.lead,children:`Verse is the desktop surface over this machine’s agentic fleet. Everything it shows comes from one local server — no session, token or artifact leaves this machine.`}),(0,M.jsx)(`ul`,{className:j.sections,children:a.map((e,t)=>{let n=v[e.id];return(0,M.jsxs)(`li`,{className:j.sectionRow,children:[(0,M.jsx)(`span`,{className:j.sectionIcon,"aria-hidden":`true`,children:(0,M.jsx)(n,{})}),(0,M.jsxs)(`span`,{className:j.sectionText,children:[(0,M.jsxs)(`span`,{className:j.sectionName,children:[e.label,` `,(0,M.jsxs)(`kbd`,{className:j.kbd,children:[`⌘`,t+1]})]}),(0,M.jsx)(`span`,{className:j.sectionBlurb,children:e.blurb})]})]},e.id)})}),(0,M.jsxs)(`p`,{className:j.sectionBlurb,children:[(0,M.jsx)(`kbd`,{className:j.kbd,children:`⌘K`}),` runs anything by name · `,(0,M.jsx)(`kbd`,{className:j.kbd,children:`⌘J`}),` is everything waiting on you · Settings, Apps & Accounts and Usage are under the gear.`]})]})}function I(){return(0,M.jsxs)(P,{children:[(0,M.jsx)(b,{density:`compact`,headline:!0,local:`collapse`,labelledBy:`verse-onboarding-title`,emptyText:`No seats reported yet. Connect an account in Apps & Accounts, or start Ollama for local models.`,renderActions:e=>e.connection?.fixCommand?(0,M.jsxs)(`p`,{className:j.findingFix,children:[(0,M.jsx)(`span`,{className:j.fixLabel,children:`Fix`}),(0,M.jsx)(`code`,{className:j.code,children:e.connection.fixCommand.join(` `)})]}):null}),(0,M.jsx)(`p`,{className:j.aside,children:`Every window, reset and reserve lives in Apps & Accounts, under the gear.`})]})}function L(){let e=r(S),t=(0,w.useMemo)(()=>{let t=e.data?.reason??e.error?.message??null;return k({snapshot:e.data?.available?C(e.data.raw):null,loading:e.data===void 0&&e.status!==`error`,unavailableReason:t===null?null:y(t)})},[e.data,e.status,e.error]);return(0,M.jsxs)(P,{children:[(0,M.jsxs)(`div`,{className:j.findingHead,children:[(0,M.jsx)(`span`,{className:j.localIcon,"aria-hidden":`true`,children:(0,M.jsx)(l,{size:15})}),(0,M.jsx)(N,{tone:t.tone,label:t.state})]}),(0,M.jsx)(`p`,{className:j.lead,children:t.summary}),(0,M.jsx)(`p`,{className:j.findingDetail,children:t.meaning}),t.fix?(0,M.jsxs)(`p`,{className:j.findingFix,children:[(0,M.jsx)(`span`,{className:j.fixLabel,children:`Fix`}),(0,M.jsx)(`span`,{className:j.fixText,children:t.fix})]}):null]})}function R(){return(0,M.jsxs)(P,{children:[(0,M.jsxs)(`p`,{className:j.lead,children:[`Fleet `,(0,M.jsx)(`kbd`,{className:j.kbd,children:`⌘2`}),` has three stop controls. They are not interchangeable, and the difference is the most important thing on this screen.`]}),(0,M.jsx)(`ul`,{className:j.findings,children:A.map(e=>(0,M.jsxs)(`li`,{className:j.finding,children:[(0,M.jsxs)(`div`,{className:j.findingHead,children:[(0,M.jsx)(`span`,{className:j.stopName,children:e.name}),(0,M.jsx)(N,{tone:e.tone,label:e.tone===`ok`?`narrow`:`global`})]}),(0,M.jsx)(`p`,{className:j.findingDetail,children:e.scope}),(0,M.jsx)(`p`,{className:j.findingDetail,children:e.limit}),(0,M.jsx)(`p`,{className:j.findingNote,children:e.reversible})]},e.name))})]})}function z(){return(0,M.jsxs)(P,{children:[(0,M.jsxs)(`p`,{className:j.lead,children:[`Settings `,(0,M.jsx)(`kbd`,{className:j.kbd,children:`⌘,`}),` carries theme, accent hue, density, display font, corner radius and reduced motion. Every change applies as you make it — there is no save button.`]}),(0,M.jsx)(x,{variant:`subtle`,icon:(0,M.jsx)(s,{size:14}),onClick:()=>i(`settings`),children:`Open Settings`}),(0,M.jsx)(`p`,{className:j.aside,children:`You can replay this tour any time from Settings → Onboarding.`})]})}var B=[F,I,L,R,z];function V(){let{open:e,step:t}=g(),n=E(t),r=T[n],i=B[n],a=n===T.length-1,s=(0,w.useCallback)(()=>_(),[]),l=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(!e)return;function t(e){if(e.key!==`Escape`)return;let t=l.current;t&&e.target instanceof Node&&t.contains(e.target)&&(e.preventDefault(),_())}return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e]),e?(0,M.jsxs)(`aside`,{ref:l,className:j.card,"aria-labelledby":`verse-onboarding-title`,role:`region`,children:[(0,M.jsxs)(`header`,{className:j.head,children:[(0,M.jsxs)(`div`,{className:j.headText,children:[(0,M.jsxs)(`p`,{className:j.eyebrow,children:[`Getting started · `,n+1,` of `,T.length]}),(0,M.jsx)(`h2`,{id:`verse-onboarding-title`,className:j.title,children:r.title}),(0,M.jsx)(`p`,{className:j.subtitle,children:r.subtitle})]}),(0,M.jsx)(x,{iconOnly:!0,variant:`ghost`,size:`sm`,"aria-label":`Close getting started`,title:`Close getting started`,icon:(0,M.jsx)(c,{size:14}),onClick:s})]}),(0,M.jsx)(i,{}),(0,M.jsxs)(`footer`,{className:j.foot,children:[(0,M.jsx)(`ol`,{className:j.pips,"aria-hidden":`true`,children:T.map((e,t)=>(0,M.jsx)(`li`,{className:j.pip,"data-state":t===n?`current`:t<n?`done`:`todo`},e.id))}),(0,M.jsxs)(`div`,{className:j.actions,children:[(0,M.jsx)(x,{variant:`ghost`,size:`sm`,onClick:s,children:`Skip setup`}),n>0?(0,M.jsx)(x,{variant:`subtle`,size:`sm`,onClick:()=>m(n-1),children:`Back`}):null,a?(0,M.jsx)(x,{variant:`primary`,size:`sm`,icon:(0,M.jsx)(f,{size:14}),onClick:()=>{h(),o(`new-chat`)},children:`Start a first chat`}):(0,M.jsx)(x,{variant:`primary`,size:`sm`,onClick:()=>m(n+1),children:`Next`})]})]})]}):null}export{V as OnboardingFlow};
|
|
2
|
-
//# sourceMappingURL=OnboardingFlow-CkTZtt-m.js.map
|