@ashlr/hub 3.11.3 → 3.12.0
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 +104 -0
- package/README.md +44 -18
- package/dist/authority-surface.json +74 -59
- package/dist/build-identity.json +2 -2
- package/dist/cli/authority.d.ts +39 -0
- package/dist/cli/authority.js +222 -55
- package/dist/cli/authority.js.map +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/verse.d.ts +3 -0
- package/dist/cli/verse.js +10 -0
- package/dist/cli/verse.js.map +1 -1
- package/dist/core/authority/trust-roots.js +7 -1
- package/dist/core/authority/trust-roots.js.map +1 -1
- package/dist/core/authority/types.d.ts +2 -2
- package/dist/core/cloud/cloud-api.js +1 -1
- package/dist/core/cloud/cloud-api.js.map +1 -1
- package/dist/core/cloud/delivery-contract.d.ts +1 -1
- package/dist/core/cloud/delivery-contract.js +25 -15
- package/dist/core/cloud/delivery-contract.js.map +1 -1
- package/dist/core/cloud/store.js +6 -0
- package/dist/core/cloud/store.js.map +1 -1
- package/dist/core/cloud/tracker.d.ts +2 -0
- package/dist/core/cloud/tracker.js +140 -37
- package/dist/core/cloud/tracker.js.map +1 -1
- package/dist/core/cloud/types.d.ts +9 -1
- package/dist/core/cloud/types.js.map +1 -1
- package/dist/core/comms/dispatch.d.ts +5 -0
- package/dist/core/comms/dispatch.js +12 -1
- package/dist/core/comms/dispatch.js.map +1 -1
- package/dist/core/comms/requests.d.ts +27 -1
- package/dist/core/comms/requests.js +50 -1
- package/dist/core/comms/requests.js.map +1 -1
- package/dist/core/daemon/loop.d.ts +14 -0
- package/dist/core/daemon/loop.js +35 -0
- package/dist/core/daemon/loop.js.map +1 -1
- package/dist/core/fabric/claude-usage.js +23 -1
- package/dist/core/fabric/claude-usage.js.map +1 -1
- package/dist/core/fleet/dispatch-router.d.ts +7 -0
- package/dist/core/fleet/dispatch-router.js +4 -1
- package/dist/core/fleet/dispatch-router.js.map +1 -1
- package/dist/core/fleet/tick-hooks-live.d.ts +5 -1
- package/dist/core/fleet/tick-hooks-live.js +10 -1
- package/dist/core/fleet/tick-hooks-live.js.map +1 -1
- package/dist/core/local-runtime/llama/config.d.ts +14 -0
- package/dist/core/local-runtime/llama/config.js +20 -2
- package/dist/core/local-runtime/llama/config.js.map +1 -1
- package/dist/core/local-runtime/llama/process.d.ts +19 -0
- package/dist/core/local-runtime/llama/process.js +67 -17
- package/dist/core/local-runtime/llama/process.js.map +1 -1
- package/dist/core/local-runtime/llama/supervisor.js +14 -3
- package/dist/core/local-runtime/llama/supervisor.js.map +1 -1
- package/dist/core/observability/rollup.d.ts +12 -0
- package/dist/core/observability/rollup.js +37 -2
- package/dist/core/observability/rollup.js.map +1 -1
- package/dist/core/observability/usage-source.js +49 -1
- package/dist/core/observability/usage-source.js.map +1 -1
- package/dist/core/resources/connection-monitor.js +47 -4
- package/dist/core/resources/connection-monitor.js.map +1 -1
- package/dist/core/resources/engineering-mission-store.d.ts +1 -1
- package/dist/core/routing/headroom.js +7 -2
- package/dist/core/routing/headroom.js.map +1 -1
- package/dist/core/routing/router.d.ts +48 -0
- package/dist/core/routing/router.js +129 -13
- package/dist/core/routing/router.js.map +1 -1
- package/dist/core/run/best-of-n.d.ts +7 -0
- package/dist/core/run/best-of-n.js +3 -0
- package/dist/core/run/best-of-n.js.map +1 -1
- package/dist/core/run/harness-dispatch.d.ts +147 -0
- package/dist/core/run/harness-dispatch.js +234 -0
- package/dist/core/run/harness-dispatch.js.map +1 -0
- package/dist/core/run/orchestrator.js +3 -0
- package/dist/core/run/orchestrator.js.map +1 -1
- package/dist/core/run/provider-client.d.ts +8 -0
- package/dist/core/run/provider-client.js +4 -0
- package/dist/core/run/provider-client.js.map +1 -1
- package/dist/core/run/sandboxed-engine.d.ts +8 -0
- package/dist/core/run/sandboxed-engine.js +60 -7
- package/dist/core/run/sandboxed-engine.js.map +1 -1
- package/dist/core/types.d.ts +14 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/universe/builtins/preparation/manifest.json +1 -1
- package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +188 -6
- package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +187 -5
- package/dist/core/universe/firm-demo.d.ts +1 -1
- package/dist/core/universe/firm-graph.d.ts +2 -2
- package/dist/core/util/scrub.js +16 -3
- package/dist/core/util/scrub.js.map +1 -1
- package/dist/core/verse/accounts.d.ts +9 -1
- package/dist/core/verse/accounts.js +52 -11
- package/dist/core/verse/accounts.js.map +1 -1
- package/dist/core/verse/apps-api.d.ts +12 -0
- package/dist/core/verse/apps-api.js +22 -4
- package/dist/core/verse/apps-api.js.map +1 -1
- package/dist/core/verse/apps.js +22 -12
- package/dist/core/verse/apps.js.map +1 -1
- package/dist/core/verse/local-models.js +3 -7
- package/dist/core/verse/local-models.js.map +1 -1
- package/dist/core/verse/model-display-name.d.ts +34 -0
- package/dist/core/verse/model-display-name.js +125 -0
- package/dist/core/verse/model-display-name.js.map +1 -0
- package/dist/core/verse/seats.d.ts +11 -2
- package/dist/core/verse/seats.js +42 -18
- package/dist/core/verse/seats.js.map +1 -1
- package/dist/core/verse/transient-events.d.ts +21 -0
- package/dist/core/verse/transient-events.js +12 -0
- package/dist/core/verse/transient-events.js.map +1 -0
- package/dist/core/verse/types.d.ts +6 -13
- package/dist/core/verse/types.js +5 -36
- package/dist/core/verse/types.js.map +1 -1
- package/dist/core/web/public/next/assets/ActionMenu-B4-39f2S.js +2 -0
- package/dist/core/web/public/next/assets/{ActionMenu-FxXeRbPx.js.map → ActionMenu-B4-39f2S.js.map} +1 -1
- package/dist/core/web/public/next/assets/Advanced-B-LqYXvd.js +2 -0
- package/dist/core/web/public/next/assets/Advanced-B-LqYXvd.js.map +1 -0
- package/dist/core/web/public/next/assets/App-E2zCDRxm.js +7 -0
- package/dist/core/web/public/next/assets/App-E2zCDRxm.js.map +1 -0
- package/dist/core/web/public/next/assets/AppsSection-8wXPPhZb.js +2 -0
- package/dist/core/web/public/next/assets/AppsSection-8wXPPhZb.js.map +1 -0
- package/dist/core/web/public/next/assets/AreaTrend-BFimExYn.js +2 -0
- package/dist/core/web/public/next/assets/{AreaTrend-CDxrQU4b.js.map → AreaTrend-BFimExYn.js.map} +1 -1
- package/dist/core/web/public/next/assets/AutonomyOffState-B5eEkmiz.js +2 -0
- package/dist/core/web/public/next/assets/AutonomyOffState-B5eEkmiz.js.map +1 -0
- package/dist/core/web/public/next/assets/AutonomyOffState-DmbE71vI.css +1 -0
- package/dist/core/web/public/next/assets/AutonomySection-B46igJKR.js +2 -0
- package/dist/core/web/public/next/assets/{AutonomySection-DuQkHGD_.js.map → AutonomySection-B46igJKR.js.map} +1 -1
- package/dist/core/web/public/next/assets/BranchBar-BRkrEQGs.js +2 -0
- package/dist/core/web/public/next/assets/{BranchBar-CLsvOcyK.js.map → BranchBar-BRkrEQGs.js.map} +1 -1
- package/dist/core/web/public/next/assets/BudgetControl-T_RjPrw9.js +2 -0
- package/dist/core/web/public/next/assets/{BudgetControl-TL3FeZ1D.js.map → BudgetControl-T_RjPrw9.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Button-HHXgoXGr.js → Button-BhO-WKPp.js} +2 -2
- package/dist/core/web/public/next/assets/{Button-HHXgoXGr.js.map → Button-BhO-WKPp.js.map} +1 -1
- package/dist/core/web/public/next/assets/CapacityStrip-CkFz5vq2.js +2 -0
- package/dist/core/web/public/next/assets/{CapacityStrip-qReu0RaF.js.map → CapacityStrip-CkFz5vq2.js.map} +1 -1
- package/dist/core/web/public/next/assets/{useChartWidth-BW6SwYIK.css → ChartFrame-BVuBe6RP.css} +1 -1
- package/dist/core/web/public/next/assets/ChartFrame-SygZ7B3x.js +2 -0
- package/dist/core/web/public/next/assets/ChartFrame-SygZ7B3x.js.map +1 -0
- package/dist/core/web/public/next/assets/ChatSection-D6WybBpB.js +3 -0
- package/dist/core/web/public/next/assets/ChatSection-D6WybBpB.js.map +1 -0
- package/dist/core/web/public/next/assets/CloudBudgetForm-Bd91iStN.js +2 -0
- package/dist/core/web/public/next/assets/CloudBudgetForm-Bd91iStN.js.map +1 -0
- package/dist/core/web/public/next/assets/CommandPalette-B6SgDJH-.js +2 -0
- package/dist/core/web/public/next/assets/CommandPalette-B6SgDJH-.js.map +1 -0
- package/dist/core/web/public/next/assets/CommandSection-CvAVd1w4.css +1 -0
- package/dist/core/web/public/next/assets/CommandSection-DgMGoepd.js +2 -0
- package/dist/core/web/public/next/assets/CommandSection-DgMGoepd.js.map +1 -0
- package/dist/core/web/public/next/assets/ConfirmDialog-Bv4hdK2T.js +2 -0
- package/dist/core/web/public/next/assets/{ConfirmDialog-DLrLKM0c.js.map → ConfirmDialog-Bv4hdK2T.js.map} +1 -1
- package/dist/core/web/public/next/assets/DeleteChatDialog-CH1Ix8Eh.js +2 -0
- package/dist/core/web/public/next/assets/DeleteChatDialog-CH1Ix8Eh.js.map +1 -0
- package/dist/core/web/public/next/assets/Dialog-BSsIFNqD.js +2 -0
- package/dist/core/web/public/next/assets/{Dialog-BS9Dxi3G.js.map → Dialog-BSsIFNqD.js.map} +1 -1
- package/dist/core/web/public/next/assets/DiffPane-BpNuJmth.js +2 -0
- package/dist/core/web/public/next/assets/{DiffPane-TOmUf3b2.js.map → DiffPane-BpNuJmth.js.map} +1 -1
- package/dist/core/web/public/next/assets/DiffViewer-CJarUvs0.js +2 -0
- package/dist/core/web/public/next/assets/{DiffViewer-BpH56302.js.map → DiffViewer-CJarUvs0.js.map} +1 -1
- package/dist/core/web/public/next/assets/DockHost-DW9q0NdR.js +2 -0
- package/dist/core/web/public/next/assets/DockHost-DW9q0NdR.js.map +1 -0
- package/dist/core/web/public/next/assets/{EmptyState-BqR5YAmf.js → EmptyState-DPrd2aak.js} +2 -2
- package/dist/core/web/public/next/assets/{EmptyState-BqR5YAmf.js.map → EmptyState-DPrd2aak.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Epistemic-dhvDTwAZ.js → Epistemic-D7MxSmED.js} +2 -2
- package/dist/core/web/public/next/assets/{Epistemic-dhvDTwAZ.js.map → Epistemic-D7MxSmED.js.map} +1 -1
- package/dist/core/web/public/next/assets/FleetSection-BdZN6rGS.js +3 -0
- package/dist/core/web/public/next/assets/FleetSection-BdZN6rGS.js.map +1 -0
- package/dist/core/web/public/next/assets/Funnel-BeNQZWv2.js +2 -0
- package/dist/core/web/public/next/assets/{Funnel-D2u7Wlzc.js.map → Funnel-BeNQZWv2.js.map} +1 -1
- package/dist/core/web/public/next/assets/GearTray-CIPtzeIx.js +2 -0
- package/dist/core/web/public/next/assets/{GearTray-Cb2npoxM.js.map → GearTray-CIPtzeIx.js.map} +1 -1
- package/dist/core/web/public/next/assets/GrowthSection-iiQg6wvK.js +2 -0
- package/dist/core/web/public/next/assets/{GrowthSection-C5aDPs8B.js.map → GrowthSection-iiQg6wvK.js.map} +1 -1
- package/dist/core/web/public/next/assets/HandoffDialog-DrQ6ofuy.js +2 -0
- package/dist/core/web/public/next/assets/{HandoffDialog-BF3AYg-X.js.map → HandoffDialog-DrQ6ofuy.js.map} +1 -1
- package/dist/core/web/public/next/assets/Input-C0MQxEM6.js +2 -0
- package/dist/core/web/public/next/assets/{Input-B5dmGLZx.js.map → Input-C0MQxEM6.js.map} +1 -1
- package/dist/core/web/public/next/assets/LeaderCard-BRr3_yE-.js +2 -0
- package/dist/core/web/public/next/assets/LeaderCard-BRr3_yE-.js.map +1 -0
- package/dist/core/web/public/next/assets/MatrixHeatmap-DZvZeWXL.js +2 -0
- package/dist/core/web/public/next/assets/{MatrixHeatmap-BgEUs2Eu.js.map → MatrixHeatmap-DZvZeWXL.js.map} +1 -1
- package/dist/core/web/public/next/assets/McpSection-BRuCcTjT.js +2 -0
- package/dist/core/web/public/next/assets/{McpSection-DZkiOuoq.js.map → McpSection-BRuCcTjT.js.map} +1 -1
- package/dist/core/web/public/next/assets/MessageMarkdown-bRvD5nSc.js +3 -0
- package/dist/core/web/public/next/assets/{MessageMarkdown-BauY8ZTY.js.map → MessageMarkdown-bRvD5nSc.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DLBNLfsn.js → MessageMarkdownRenderer-FjjkPKA2.js} +4 -4
- package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DLBNLfsn.js.map → MessageMarkdownRenderer-FjjkPKA2.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Meter-DNeocJnD.js → Meter-CFNLpwA-.js} +2 -2
- package/dist/core/web/public/next/assets/{Meter-DNeocJnD.js.map → Meter-CFNLpwA-.js.map} +1 -1
- package/dist/core/web/public/next/assets/MindSection-BTIiQS8P.js +2 -0
- package/dist/core/web/public/next/assets/MindSection-BTIiQS8P.js.map +1 -0
- package/dist/core/web/public/next/assets/MutationTokenDialog-T7gv3a9r.js +2 -0
- package/dist/core/web/public/next/assets/{MutationTokenDialog-mxrw0Yvy.js.map → MutationTokenDialog-T7gv3a9r.js.map} +1 -1
- package/dist/core/web/public/next/assets/NeedsYouDrawer-lYN4G_aM.js +2 -0
- package/dist/core/web/public/next/assets/{NeedsYouDrawer-CO-Balfp.js.map → NeedsYouDrawer-lYN4G_aM.js.map} +1 -1
- package/dist/core/web/public/next/assets/NeedsYouList-BgH8ezqf.js +2 -0
- package/dist/core/web/public/next/assets/{NeedsYouList-CzDZbzRD.js.map → NeedsYouList-BgH8ezqf.js.map} +1 -1
- package/dist/core/web/public/next/assets/NewChatDialog-Db5Xjrk8.js +3 -0
- package/dist/core/web/public/next/assets/NewChatDialog-Db5Xjrk8.js.map +1 -0
- package/dist/core/web/public/next/assets/OnboardingFlow-HUNQGQuU.css +1 -0
- package/dist/core/web/public/next/assets/OnboardingFlow-LoY-zuSe.js +2 -0
- package/dist/core/web/public/next/assets/OnboardingFlow-LoY-zuSe.js.map +1 -0
- package/dist/core/web/public/next/assets/OnboardingGate-C4VXn7BJ.js +3 -0
- package/dist/core/web/public/next/assets/OnboardingGate-C4VXn7BJ.js.map +1 -0
- package/dist/core/web/public/next/assets/PreviewPane-BPBbcROb.js +2 -0
- package/dist/core/web/public/next/assets/{PreviewPane-BS-CleCd.js.map → PreviewPane-BPBbcROb.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ProviderLogo-C5mBg8i0.js → ProviderLogo-CT2cSfkg.js} +2 -2
- package/dist/core/web/public/next/assets/{ProviderLogo-C5mBg8i0.js.map → ProviderLogo-CT2cSfkg.js.map} +1 -1
- package/dist/core/web/public/next/assets/RailStatus-Vgl0GYtd.js +2 -0
- package/dist/core/web/public/next/assets/{RailStatus-cPRyOmrk.js.map → RailStatus-Vgl0GYtd.js.map} +1 -1
- package/dist/core/web/public/next/assets/{RefreshIndicator-CMwSCiz5.js → RefreshIndicator-CSyqpY_q.js} +2 -2
- package/dist/core/web/public/next/assets/{RefreshIndicator-CMwSCiz5.js.map → RefreshIndicator-CSyqpY_q.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BFi1opsC.js → ResourcePoolConsoleApp-BX2nkdmZ.js} +4 -4
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BFi1opsC.js.map → ResourcePoolConsoleApp-BX2nkdmZ.js.map} +1 -1
- package/dist/core/web/public/next/assets/ResourcesChrome-B2U2lO1H.js +3 -0
- package/dist/core/web/public/next/assets/ResourcesChrome-B2U2lO1H.js.map +1 -0
- package/dist/core/web/public/next/assets/ResourcesDrawer-BCFJ2Uq8.css +1 -0
- package/dist/core/web/public/next/assets/ResourcesDrawer-DlUKOjl9.js +2 -0
- package/dist/core/web/public/next/assets/ResourcesDrawer-DlUKOjl9.js.map +1 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-BaC7YVzR.js +2 -0
- package/dist/core/web/public/next/assets/{RouteErrorBoundary-DYtwc2ja.js.map → RouteErrorBoundary-BaC7YVzR.js.map} +1 -1
- package/dist/core/web/public/next/assets/RunInCloudAction-D5PDHJPE.js +2 -0
- package/dist/core/web/public/next/assets/{RunInCloudAction-BEGEEM8O.js.map → RunInCloudAction-D5PDHJPE.js.map} +1 -1
- package/dist/core/web/public/next/assets/SeatSelector-Cg75LInq.js +3 -0
- package/dist/core/web/public/next/assets/{SeatSelector-CYHRR7Wp.js.map → SeatSelector-Cg75LInq.js.map} +1 -1
- package/dist/core/web/public/next/assets/Segmented-CametjLt.js +2 -0
- package/dist/core/web/public/next/assets/{Segmented-BE53BenI.js.map → Segmented-CametjLt.js.map} +1 -1
- package/dist/core/web/public/next/assets/Select-De52fghU.js +2 -0
- package/dist/core/web/public/next/assets/{Select-BwSGkHCS.js.map → Select-De52fghU.js.map} +1 -1
- package/dist/core/web/public/next/assets/SessionGate-CzlcNq3O.js +2 -0
- package/dist/core/web/public/next/assets/{SessionGate-e0dFJm9d.js.map → SessionGate-CzlcNq3O.js.map} +1 -1
- package/dist/core/web/public/next/assets/SessionInsightChip-Bk_Owa7u.js +2 -0
- package/dist/core/web/public/next/assets/{SessionInsightChip-CxlSyueJ.js.map → SessionInsightChip-Bk_Owa7u.js.map} +1 -1
- package/dist/core/web/public/next/assets/SessionSearch-C6C8DHN8.js +2 -0
- package/dist/core/web/public/next/assets/{SessionSearch-_yp7S2TP.js.map → SessionSearch-C6C8DHN8.js.map} +1 -1
- package/dist/core/web/public/next/assets/SettingsSection-mI9wQYZg.js +2 -0
- package/dist/core/web/public/next/assets/SettingsSection-mI9wQYZg.js.map +1 -0
- package/dist/core/web/public/next/assets/Sheet-CJhK9Dqv.js +2 -0
- package/dist/core/web/public/next/assets/{Sheet-DVP2Mgy6.js.map → Sheet-CJhK9Dqv.js.map} +1 -1
- package/dist/core/web/public/next/assets/ShortcutsOverlay-DDW-i9Fc.js +2 -0
- package/dist/core/web/public/next/assets/{ShortcutsOverlay-BcIcoClX.js.map → ShortcutsOverlay-DDW-i9Fc.js.map} +1 -1
- package/dist/core/web/public/next/assets/Sidebar-DT7ykaqS.js +3 -0
- package/dist/core/web/public/next/assets/Sidebar-DT7ykaqS.js.map +1 -0
- package/dist/core/web/public/next/assets/Slider-Bwd9HfXl.js +2 -0
- package/dist/core/web/public/next/assets/{Slider-BypUWjpH.js.map → Slider-Bwd9HfXl.js.map} +1 -1
- package/dist/core/web/public/next/assets/StatTile-DPZ5yyaU.js +2 -0
- package/dist/core/web/public/next/assets/StatTile-DPZ5yyaU.js.map +1 -0
- package/dist/core/web/public/next/assets/{StatusBadge-HCZp416_.js → StatusBadge-DHKRtttH.js} +2 -2
- package/dist/core/web/public/next/assets/{StatusBadge-HCZp416_.js.map → StatusBadge-DHKRtttH.js.map} +1 -1
- package/dist/core/web/public/next/assets/StepBand-DQykLkk_.js +2 -0
- package/dist/core/web/public/next/assets/{StepBand-Duz1PUes.js.map → StepBand-DQykLkk_.js.map} +1 -1
- package/dist/core/web/public/next/assets/Surface-D--LXgQm.js +2 -0
- package/dist/core/web/public/next/assets/Surface-D--LXgQm.js.map +1 -0
- package/dist/core/web/public/next/assets/Surface-e1z6GdZt.css +1 -0
- package/dist/core/web/public/next/assets/Swimlane-BzH6OCee.js +2 -0
- package/dist/core/web/public/next/assets/{Swimlane-DGcIcnNA.js.map → Swimlane-BzH6OCee.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Switch-iveI-8NY.js → Switch-PMixU6b0.js} +2 -2
- package/dist/core/web/public/next/assets/{Switch-iveI-8NY.js.map → Switch-PMixU6b0.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Tag-DH15CUJp.js → Tag-fordBsrJ.js} +2 -2
- package/dist/core/web/public/next/assets/{Tag-DH15CUJp.js.map → Tag-fordBsrJ.js.map} +1 -1
- package/dist/core/web/public/next/assets/TerminalPane-BSnGdUuF.js +7 -0
- package/dist/core/web/public/next/assets/TerminalPane-BSnGdUuF.js.map +1 -0
- package/dist/core/web/public/next/assets/UniverseConsoleApp-DtXFhAhw.js +2 -0
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-C8yQ0AaR.js.map → UniverseConsoleApp-DtXFhAhw.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseView-_nPURPqe.js → UniverseView-sWm3pnTW.js} +3 -3
- package/dist/core/web/public/next/assets/{UniverseView-_nPURPqe.js.map → UniverseView-sWm3pnTW.js.map} +1 -1
- package/dist/core/web/public/next/assets/UsageSection-CiD1DbuF.js +3 -0
- package/dist/core/web/public/next/assets/UsageSection-CiD1DbuF.js.map +1 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-BCY5uSok.js +3 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-BCY5uSok.js.map +1 -0
- package/dist/core/web/public/next/assets/Workspace-BQSZFSeO.js +10 -0
- package/dist/core/web/public/next/assets/Workspace-BQSZFSeO.js.map +1 -0
- package/dist/core/web/public/next/assets/actions-BmIf9avl.css +1 -0
- package/dist/core/web/public/next/assets/actions-Ci6I4C0l.js +2 -0
- package/dist/core/web/public/next/assets/actions-Ci6I4C0l.js.map +1 -0
- package/dist/core/web/public/next/assets/apps-model-DlwnfqwJ.js +2 -0
- package/dist/core/web/public/next/assets/apps-model-DlwnfqwJ.js.map +1 -0
- package/dist/core/web/public/next/assets/authority-model-BFuPezSo.js +2 -0
- package/dist/core/web/public/next/assets/authority-model-BFuPezSo.js.map +1 -0
- package/dist/core/web/public/next/assets/binding-left-DZpq5sLf.js +2 -0
- package/dist/core/web/public/next/assets/binding-left-DZpq5sLf.js.map +1 -0
- package/dist/core/web/public/next/assets/{budget-queries-V3wcJVK_.js → budget-queries-DsAjH8ac.js} +2 -2
- package/dist/core/web/public/next/assets/{budget-queries-V3wcJVK_.js.map → budget-queries-DsAjH8ac.js.map} +1 -1
- package/dist/core/web/public/next/assets/capacity-strip-model-Dn1cNOhz.js +2 -0
- package/dist/core/web/public/next/assets/capacity-strip-model-Dn1cNOhz.js.map +1 -0
- package/dist/core/web/public/next/assets/charts-C_xJbJiw.js +2 -0
- package/dist/core/web/public/next/assets/charts-C_xJbJiw.js.map +1 -0
- package/dist/core/web/public/next/assets/charts-DhKTrQLw.css +1 -0
- package/dist/core/web/public/next/assets/clipboard-DkZdqlxf.js +2 -0
- package/dist/core/web/public/next/assets/clipboard-DkZdqlxf.js.map +1 -0
- package/dist/core/web/public/next/assets/cloud-D-HXms6q.css +1 -0
- package/dist/core/web/public/next/assets/cloud-model-CX407gPY.js +2 -0
- package/dist/core/web/public/next/assets/cloud-model-CX407gPY.js.map +1 -0
- package/dist/core/web/public/next/assets/cloud-queries-QAhpExlz.js +2 -0
- package/dist/core/web/public/next/assets/cloud-queries-QAhpExlz.js.map +1 -0
- package/dist/core/web/public/next/assets/cloud.module-DOP-N4Ch.js +2 -0
- package/dist/core/web/public/next/assets/cloud.module-DOP-N4Ch.js.map +1 -0
- package/dist/core/web/public/next/assets/command-catalog-CF0cQQac.js +2 -0
- package/dist/core/web/public/next/assets/command-catalog-CF0cQQac.js.map +1 -0
- package/dist/core/web/public/next/assets/context-model-Co4wh3SM.js +2 -0
- package/dist/core/web/public/next/assets/context-model-Co4wh3SM.js.map +1 -0
- package/dist/core/web/public/next/assets/context-model-DV1zCfAm.js +3 -0
- package/dist/core/web/public/next/assets/context-model-DV1zCfAm.js.map +1 -0
- package/dist/core/web/public/next/assets/{context-queries-CrPcHWTz.js → context-queries-CktFQqSS.js} +2 -2
- package/dist/core/web/public/next/assets/{context-queries-CrPcHWTz.js.map → context-queries-CktFQqSS.js.map} +1 -1
- package/dist/core/web/public/next/assets/{control-queries-CmgBgKV7.js → control-queries-DAvlh_YM.js} +2 -2
- package/dist/core/web/public/next/assets/{control-queries-CmgBgKV7.js.map → control-queries-DAvlh_YM.js.map} +1 -1
- package/dist/core/web/public/next/assets/copy-setup-CqRSfELB.js +2 -0
- package/dist/core/web/public/next/assets/copy-setup-CqRSfELB.js.map +1 -0
- package/dist/core/web/public/next/assets/dock-icons-BFuBbqJl.js +2 -0
- package/dist/core/web/public/next/assets/{dock-icons-CUh8dOxJ.js.map → dock-icons-BFuBbqJl.js.map} +1 -1
- package/dist/core/web/public/next/assets/fleet-model-Dfd5JyLR.js +2 -0
- package/dist/core/web/public/next/assets/fleet-model-Dfd5JyLR.js.map +1 -0
- package/dist/core/web/public/next/assets/fleet-queries-RtMTd5rR.js +2 -0
- package/dist/core/web/public/next/assets/fleet-queries-RtMTd5rR.js.map +1 -0
- package/dist/core/web/public/next/assets/{focus-trap-HtcoXeEq.js → focus-trap-BdrbWfC4.js} +2 -2
- package/dist/core/web/public/next/assets/{focus-trap-HtcoXeEq.js.map → focus-trap-BdrbWfC4.js.map} +1 -1
- package/dist/core/web/public/next/assets/format-Dk4Fmxax.js +2 -0
- package/dist/core/web/public/next/assets/format-Dk4Fmxax.js.map +1 -0
- package/dist/core/web/public/next/assets/{git-model-bk_RXh3y.js → git-model-_BnI_Ogh.js} +2 -2
- package/dist/core/web/public/next/assets/{git-model-bk_RXh3y.js.map → git-model-_BnI_Ogh.js.map} +1 -1
- package/dist/core/web/public/next/assets/global-CNNGMril.js +2 -0
- package/dist/core/web/public/next/assets/{global-oEl9Qj8u.js.map → global-CNNGMril.js.map} +1 -1
- package/dist/core/web/public/next/assets/{guarded-runners-LHLXmXIk.js → guarded-runners-DPh2d32e.js} +2 -2
- package/dist/core/web/public/next/assets/{guarded-runners-LHLXmXIk.js.map → guarded-runners-DPh2d32e.js.map} +1 -1
- package/dist/core/web/public/next/assets/icons-0haWy6nh.js +2 -0
- package/dist/core/web/public/next/assets/icons-0haWy6nh.js.map +1 -0
- package/dist/core/web/public/next/assets/{index-BVxOlseC.js → index-QesfXBsb.js} +3 -3
- package/dist/core/web/public/next/assets/{index-BVxOlseC.js.map → index-QesfXBsb.js.map} +1 -1
- package/dist/core/web/public/next/assets/live-model-De-q0ZFK.js +2 -0
- package/dist/core/web/public/next/assets/live-model-De-q0ZFK.js.map +1 -0
- package/dist/core/web/public/next/assets/local-model-C9xNi9fN.js +2 -0
- package/dist/core/web/public/next/assets/local-model-C9xNi9fN.js.map +1 -0
- package/dist/core/web/public/next/assets/mind.module-BrK2nFOL.js +2 -0
- package/dist/core/web/public/next/assets/{mind.module-gTGAuJt1.js.map → mind.module-BrK2nFOL.js.map} +1 -1
- package/dist/core/web/public/next/assets/mutations-DTCtKCn_.js +2 -0
- package/dist/core/web/public/next/assets/{mutations-C5S7okTW.js.map → mutations-DTCtKCn_.js.map} +1 -1
- package/dist/core/web/public/next/assets/nav-KmGX0CVz.js +2 -0
- package/dist/core/web/public/next/assets/{nav-NVtnuG7A.js.map → nav-KmGX0CVz.js.map} +1 -1
- package/dist/core/web/public/next/assets/{overnight-queries-DGm3qL1b.js → overnight-queries-mlO0xzsr.js} +2 -2
- package/dist/core/web/public/next/assets/{overnight-queries-DGm3qL1b.js.map → overnight-queries-mlO0xzsr.js.map} +1 -1
- package/dist/core/web/public/next/assets/primitives-D0Fb3TtS.js +1 -0
- package/dist/core/web/public/next/assets/{queries-CYisSAAB.js → queries-CyBE8nsW.js} +2 -2
- package/dist/core/web/public/next/assets/{queries-CYisSAAB.js.map → queries-CyBE8nsW.js.map} +1 -1
- package/dist/core/web/public/next/assets/reasoning-pref-CaoA4_Vl.js +2 -0
- package/dist/core/web/public/next/assets/{reasoning-pref-BUcFF_5G.js.map → reasoning-pref-CaoA4_Vl.js.map} +1 -1
- package/dist/core/web/public/next/assets/{reveal-anchor-D-tV8xau.js → reveal-anchor-BP1VqnPU.js} +2 -2
- package/dist/core/web/public/next/assets/{reveal-anchor-D-tV8xau.js.map → reveal-anchor-BP1VqnPU.js.map} +1 -1
- package/dist/core/web/public/next/assets/seat-subscription-C5Tvr0WQ.js +2 -0
- package/dist/core/web/public/next/assets/{seat-subscription-B-f9ViU2.js.map → seat-subscription-C5Tvr0WQ.js.map} +1 -1
- package/dist/core/web/public/next/assets/{sidebar-model-DQ-FyBHW.js → sidebar-model-B5Qk95k_.js} +2 -2
- package/dist/core/web/public/next/assets/{sidebar-model-DQ-FyBHW.js.map → sidebar-model-B5Qk95k_.js.map} +1 -1
- package/dist/core/web/public/next/assets/slots-DHKQDoE6.js +3 -0
- package/dist/core/web/public/next/assets/{slots-BhP8b8tf.js.map → slots-DHKQDoE6.js.map} +1 -1
- package/dist/core/web/public/next/assets/surface-data-CchClvHo.js +2 -0
- package/dist/core/web/public/next/assets/surface-data-CchClvHo.js.map +1 -0
- package/dist/core/web/public/next/assets/surface-prefetch-BWr0LBQn.js +2 -0
- package/dist/core/web/public/next/assets/surface-prefetch-BWr0LBQn.js.map +1 -0
- package/dist/core/web/public/next/assets/{tasks-model-BKDNqmmt.js → tasks-model-D6WFVULI.js} +2 -2
- package/dist/core/web/public/next/assets/{tasks-model-BKDNqmmt.js.map → tasks-model-D6WFVULI.js.map} +1 -1
- package/dist/core/web/public/next/assets/{terminal-icons-D2xe-aM1.js → terminal-icons-BvCvuXk2.js} +2 -2
- package/dist/core/web/public/next/assets/{terminal-icons-D2xe-aM1.js.map → terminal-icons-BvCvuXk2.js.map} +1 -1
- package/dist/core/web/public/next/assets/transient-events-nTLhMBND.js +2 -0
- package/dist/core/web/public/next/assets/transient-events-nTLhMBND.js.map +1 -0
- package/dist/core/web/public/next/assets/types-D5XOdyw8.js.map +1 -1
- package/dist/core/web/public/next/assets/{usage-queries-BZuAANlI.js → usage-queries-D1SU1t7r.js} +2 -2
- package/dist/core/web/public/next/assets/{usage-queries-BZuAANlI.js.map → usage-queries-D1SU1t7r.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-guarded-action-Cf4MeNBa.js → use-guarded-action-BZmBv7CJ.js} +2 -2
- package/dist/core/web/public/next/assets/{use-guarded-action-Cf4MeNBa.js.map → use-guarded-action-BZmBv7CJ.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-ticker-D9yi49my.js → use-ticker-CkJ4-0wU.js} +2 -2
- package/dist/core/web/public/next/assets/{use-ticker-D9yi49my.js.map → use-ticker-CkJ4-0wU.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-token-gate-DqrSXdX6.js → use-token-gate-CYcfk_GS.js} +2 -2
- package/dist/core/web/public/next/assets/{use-token-gate-DqrSXdX6.js.map → use-token-gate-CYcfk_GS.js.map} +1 -1
- package/dist/core/web/public/next/assets/useOnboarding-CujRS6PK.js +2 -0
- package/dist/core/web/public/next/assets/useOnboarding-CujRS6PK.js.map +1 -0
- package/dist/core/web/public/next/assets/useSeatsRefresh-BEaQdkZs.js +2 -0
- package/dist/core/web/public/next/assets/useSeatsRefresh-BEaQdkZs.js.map +1 -0
- package/dist/core/web/public/next/assets/useVerseTranscript-BQ0J6Xhx.js +2 -0
- package/dist/core/web/public/next/assets/{useVerseTranscript-CDYrrWOO.js.map → useVerseTranscript-BQ0J6Xhx.js.map} +1 -1
- package/dist/core/web/public/next/assets/verse-icons-DndgEgKS.js +2 -0
- package/dist/core/web/public/next/assets/verse-icons-DndgEgKS.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-model-MMySehjj.js +2 -0
- package/dist/core/web/public/next/assets/verse-model-MMySehjj.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-store-DNVRuiJL.js +2 -0
- package/dist/core/web/public/next/assets/verse-store-DNVRuiJL.js.map +1 -0
- package/dist/core/web/public/next/assets/warmup-CNEH_-be.js +3 -0
- package/dist/core/web/public/next/assets/{warmup-HG5vYbsN.js.map → warmup-CNEH_-be.js.map} +1 -1
- package/dist/core/web/public/next/assets/why-seat-model-jlDTwYSc.js +2 -0
- package/dist/core/web/public/next/assets/why-seat-model-jlDTwYSc.js.map +1 -0
- package/dist/core/web/public/next/assets/{workspace-model-CbhdPhei.js → workspace-model-Dukb2wwv.js} +2 -2
- package/dist/core/web/public/next/assets/{workspace-model-CbhdPhei.js.map → workspace-model-Dukb2wwv.js.map} +1 -1
- package/dist/core/web/public/next/index.html +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/docs/README.md +2 -1
- package/package.json +1 -1
- package/dist/core/web/public/next/assets/ActionMenu-FxXeRbPx.js +0 -2
- package/dist/core/web/public/next/assets/Advanced-D_eS4472.js +0 -2
- package/dist/core/web/public/next/assets/Advanced-D_eS4472.js.map +0 -1
- package/dist/core/web/public/next/assets/App-Cj4zKbG3.js +0 -7
- package/dist/core/web/public/next/assets/App-Cj4zKbG3.js.map +0 -1
- package/dist/core/web/public/next/assets/AppsSection-Ddu_RCQE.js +0 -2
- package/dist/core/web/public/next/assets/AppsSection-Ddu_RCQE.js.map +0 -1
- package/dist/core/web/public/next/assets/AreaTrend-CDxrQU4b.js +0 -2
- package/dist/core/web/public/next/assets/AutonomySection-DuQkHGD_.js +0 -2
- package/dist/core/web/public/next/assets/BranchBar-CLsvOcyK.js +0 -2
- package/dist/core/web/public/next/assets/BudgetControl-TL3FeZ1D.js +0 -2
- package/dist/core/web/public/next/assets/BurnDown-sFXkUGdB.js +0 -2
- package/dist/core/web/public/next/assets/BurnDown-sFXkUGdB.js.map +0 -1
- package/dist/core/web/public/next/assets/CapacityStrip-qReu0RaF.js +0 -2
- package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js +0 -3
- package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js.map +0 -1
- package/dist/core/web/public/next/assets/CloudBudgetForm-DJbiT1wi.js +0 -2
- package/dist/core/web/public/next/assets/CloudBudgetForm-DJbiT1wi.js.map +0 -1
- package/dist/core/web/public/next/assets/CommandPalette-zYLFZRnj.js +0 -2
- package/dist/core/web/public/next/assets/CommandPalette-zYLFZRnj.js.map +0 -1
- package/dist/core/web/public/next/assets/CommandSection-rIeMK5Ch.js +0 -2
- package/dist/core/web/public/next/assets/CommandSection-rIeMK5Ch.js.map +0 -1
- package/dist/core/web/public/next/assets/ConfirmDialog-DLrLKM0c.js +0 -2
- package/dist/core/web/public/next/assets/Dialog-BS9Dxi3G.js +0 -2
- package/dist/core/web/public/next/assets/DiffPane-TOmUf3b2.js +0 -2
- package/dist/core/web/public/next/assets/DiffViewer-BpH56302.js +0 -2
- package/dist/core/web/public/next/assets/DockHost-DzkzR-HD.js +0 -2
- package/dist/core/web/public/next/assets/DockHost-DzkzR-HD.js.map +0 -1
- package/dist/core/web/public/next/assets/FleetSection-ViAb549H.js +0 -3
- package/dist/core/web/public/next/assets/FleetSection-ViAb549H.js.map +0 -1
- package/dist/core/web/public/next/assets/Funnel-D2u7Wlzc.js +0 -2
- package/dist/core/web/public/next/assets/GearTray-Cb2npoxM.js +0 -2
- package/dist/core/web/public/next/assets/GrowthSection-C5aDPs8B.js +0 -2
- package/dist/core/web/public/next/assets/HandoffDialog-BF3AYg-X.js +0 -2
- package/dist/core/web/public/next/assets/Input-B5dmGLZx.js +0 -2
- package/dist/core/web/public/next/assets/LeaderCard-DZrmjDbI.js +0 -2
- package/dist/core/web/public/next/assets/LeaderCard-DZrmjDbI.js.map +0 -1
- package/dist/core/web/public/next/assets/MatrixHeatmap-BgEUs2Eu.js +0 -2
- package/dist/core/web/public/next/assets/McpSection-DZkiOuoq.js +0 -2
- package/dist/core/web/public/next/assets/MessageMarkdown-BauY8ZTY.js +0 -3
- package/dist/core/web/public/next/assets/MindSection-BvJXFjyX.js +0 -2
- package/dist/core/web/public/next/assets/MindSection-BvJXFjyX.js.map +0 -1
- package/dist/core/web/public/next/assets/MutationTokenDialog-mxrw0Yvy.js +0 -2
- package/dist/core/web/public/next/assets/NeedsYouDrawer-CO-Balfp.js +0 -2
- package/dist/core/web/public/next/assets/NeedsYouList-CzDZbzRD.js +0 -2
- package/dist/core/web/public/next/assets/NewChatDialog-B8eJjlFf.js +0 -3
- package/dist/core/web/public/next/assets/NewChatDialog-B8eJjlFf.js.map +0 -1
- package/dist/core/web/public/next/assets/OnboardingFlow-Cij6KWat.js +0 -2
- package/dist/core/web/public/next/assets/OnboardingFlow-Cij6KWat.js.map +0 -1
- package/dist/core/web/public/next/assets/OnboardingFlow-DSpPj8UE.css +0 -1
- package/dist/core/web/public/next/assets/PreviewPane-BS-CleCd.js +0 -2
- package/dist/core/web/public/next/assets/RailStatus-cPRyOmrk.js +0 -2
- package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.js +0 -3
- package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.js.map +0 -1
- package/dist/core/web/public/next/assets/ResourcesDrawer-BDecg6nO.js +0 -2
- package/dist/core/web/public/next/assets/ResourcesDrawer-BDecg6nO.js.map +0 -1
- package/dist/core/web/public/next/assets/ResourcesDrawer-CSKIO_wZ.css +0 -1
- package/dist/core/web/public/next/assets/RouteErrorBoundary-DYtwc2ja.js +0 -2
- package/dist/core/web/public/next/assets/RunInCloudAction-BEGEEM8O.js +0 -2
- package/dist/core/web/public/next/assets/SeatSelector-CYHRR7Wp.js +0 -3
- package/dist/core/web/public/next/assets/Segmented-BE53BenI.js +0 -2
- package/dist/core/web/public/next/assets/Select-BwSGkHCS.js +0 -2
- package/dist/core/web/public/next/assets/SessionGate-e0dFJm9d.js +0 -2
- package/dist/core/web/public/next/assets/SessionInsightChip-CxlSyueJ.js +0 -2
- package/dist/core/web/public/next/assets/SessionSearch-_yp7S2TP.js +0 -2
- package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js +0 -2
- package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js.map +0 -1
- package/dist/core/web/public/next/assets/Sheet-DVP2Mgy6.js +0 -2
- package/dist/core/web/public/next/assets/ShortcutsOverlay-BcIcoClX.js +0 -2
- package/dist/core/web/public/next/assets/Sidebar-DjQOqPbm.js +0 -3
- package/dist/core/web/public/next/assets/Sidebar-DjQOqPbm.js.map +0 -1
- package/dist/core/web/public/next/assets/Slider-BypUWjpH.js +0 -2
- package/dist/core/web/public/next/assets/StepBand-Duz1PUes.js +0 -2
- package/dist/core/web/public/next/assets/Surface-B75lVfzm.js +0 -2
- package/dist/core/web/public/next/assets/Surface-B75lVfzm.js.map +0 -1
- package/dist/core/web/public/next/assets/Surface-DMca0gAe.css +0 -1
- package/dist/core/web/public/next/assets/Swimlane-DGcIcnNA.js +0 -2
- package/dist/core/web/public/next/assets/TerminalPane-MQT-veKZ.js +0 -7
- package/dist/core/web/public/next/assets/TerminalPane-MQT-veKZ.js.map +0 -1
- package/dist/core/web/public/next/assets/UniverseConsoleApp-C8yQ0AaR.js +0 -2
- package/dist/core/web/public/next/assets/UsageSection-CqxRGJ40.js +0 -2
- package/dist/core/web/public/next/assets/UsageSection-CqxRGJ40.js.map +0 -1
- package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js +0 -3
- package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js.map +0 -1
- package/dist/core/web/public/next/assets/Workspace-DfcFGzME.js +0 -10
- package/dist/core/web/public/next/assets/Workspace-DfcFGzME.js.map +0 -1
- package/dist/core/web/public/next/assets/actions-Ddfg2iLl.css +0 -1
- package/dist/core/web/public/next/assets/actions-tWevL9HV.js +0 -2
- package/dist/core/web/public/next/assets/actions-tWevL9HV.js.map +0 -1
- package/dist/core/web/public/next/assets/apps-model-CDFvmsQV.js +0 -2
- package/dist/core/web/public/next/assets/apps-model-CDFvmsQV.js.map +0 -1
- package/dist/core/web/public/next/assets/capacity-strip-model-BDbmQ3e3.js +0 -2
- package/dist/core/web/public/next/assets/capacity-strip-model-BDbmQ3e3.js.map +0 -1
- package/dist/core/web/public/next/assets/charts-CfAjuKMv.js +0 -2
- package/dist/core/web/public/next/assets/charts-CfAjuKMv.js.map +0 -1
- package/dist/core/web/public/next/assets/charts-uSX6xVYN.css +0 -1
- package/dist/core/web/public/next/assets/cloud-C1KPNRHC.css +0 -1
- package/dist/core/web/public/next/assets/cloud-queries-Br_r0UAz.js +0 -2
- package/dist/core/web/public/next/assets/cloud-queries-Br_r0UAz.js.map +0 -1
- package/dist/core/web/public/next/assets/cloud.module-ascz58c3.js +0 -2
- package/dist/core/web/public/next/assets/cloud.module-ascz58c3.js.map +0 -1
- package/dist/core/web/public/next/assets/command-bus-xYZoK9nQ.js +0 -2
- package/dist/core/web/public/next/assets/command-bus-xYZoK9nQ.js.map +0 -1
- package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js +0 -2
- package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js.map +0 -1
- package/dist/core/web/public/next/assets/composer-keys-su0g1h9o.js +0 -2
- package/dist/core/web/public/next/assets/composer-keys-su0g1h9o.js.map +0 -1
- package/dist/core/web/public/next/assets/context-model-BC-HOmPo.js +0 -2
- package/dist/core/web/public/next/assets/context-model-BC-HOmPo.js.map +0 -1
- package/dist/core/web/public/next/assets/context-model-CIBmSugV.js +0 -2
- package/dist/core/web/public/next/assets/context-model-CIBmSugV.js.map +0 -1
- package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js +0 -2
- package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js.map +0 -1
- package/dist/core/web/public/next/assets/dock-icons-CUh8dOxJ.js +0 -2
- package/dist/core/web/public/next/assets/dock-store-B2vlxqPu.js +0 -2
- package/dist/core/web/public/next/assets/dock-store-B2vlxqPu.js.map +0 -1
- package/dist/core/web/public/next/assets/fleet-model-7i-FbzKI.js +0 -2
- package/dist/core/web/public/next/assets/fleet-model-7i-FbzKI.js.map +0 -1
- package/dist/core/web/public/next/assets/fleet-queries-DzGoqq8X.js +0 -2
- package/dist/core/web/public/next/assets/fleet-queries-DzGoqq8X.js.map +0 -1
- package/dist/core/web/public/next/assets/format-BkWdOQDL.js +0 -2
- package/dist/core/web/public/next/assets/format-BkWdOQDL.js.map +0 -1
- package/dist/core/web/public/next/assets/global-oEl9Qj8u.js +0 -2
- package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js +0 -3
- package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js.map +0 -1
- package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js +0 -2
- package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js.map +0 -1
- package/dist/core/web/public/next/assets/icons-DEQa2rTx.js +0 -2
- package/dist/core/web/public/next/assets/icons-DEQa2rTx.js.map +0 -1
- package/dist/core/web/public/next/assets/live-model-bmsJgnYD.js +0 -2
- package/dist/core/web/public/next/assets/live-model-bmsJgnYD.js.map +0 -1
- package/dist/core/web/public/next/assets/local-model-DFyjKX0b.js +0 -2
- package/dist/core/web/public/next/assets/local-model-DFyjKX0b.js.map +0 -1
- package/dist/core/web/public/next/assets/mind.module-gTGAuJt1.js +0 -2
- package/dist/core/web/public/next/assets/mutations-C5S7okTW.js +0 -2
- package/dist/core/web/public/next/assets/nav-NVtnuG7A.js +0 -2
- package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js +0 -2
- package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js.map +0 -1
- package/dist/core/web/public/next/assets/primitives-DyCKYSBG.js +0 -1
- package/dist/core/web/public/next/assets/reasoning-pref-BUcFF_5G.js +0 -2
- package/dist/core/web/public/next/assets/seat-subscription-B-f9ViU2.js +0 -2
- package/dist/core/web/public/next/assets/section-visibility-Yctxu-if.js +0 -2
- package/dist/core/web/public/next/assets/section-visibility-Yctxu-if.js.map +0 -1
- package/dist/core/web/public/next/assets/slots-BhP8b8tf.js +0 -3
- package/dist/core/web/public/next/assets/surface-data-DTI7LjvH.js +0 -2
- package/dist/core/web/public/next/assets/surface-data-DTI7LjvH.js.map +0 -1
- package/dist/core/web/public/next/assets/surface-prefetch-CdUEBFrl.js +0 -2
- package/dist/core/web/public/next/assets/surface-prefetch-CdUEBFrl.js.map +0 -1
- package/dist/core/web/public/next/assets/useChartWidth-owwodNVz.js +0 -2
- package/dist/core/web/public/next/assets/useChartWidth-owwodNVz.js.map +0 -1
- package/dist/core/web/public/next/assets/useSeatsRefresh-DgFy-Ph4.js +0 -2
- package/dist/core/web/public/next/assets/useSeatsRefresh-DgFy-Ph4.js.map +0 -1
- package/dist/core/web/public/next/assets/useVerseTranscript-CDYrrWOO.js +0 -2
- package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js +0 -2
- package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.js +0 -2
- package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js +0 -3
- package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-ui-store-62DxpVHS.js +0 -3
- package/dist/core/web/public/next/assets/verse-ui-store-62DxpVHS.js.map +0 -1
- package/dist/core/web/public/next/assets/viewport-nTubFCwf.js +0 -2
- package/dist/core/web/public/next/assets/viewport-nTubFCwf.js.map +0 -1
- package/dist/core/web/public/next/assets/warmup-HG5vYbsN.js +0 -3
- package/dist/core/web/public/next/assets/workbench-types-DzN-5trg.js +0 -2
- package/dist/core/web/public/next/assets/workbench-types-DzN-5trg.js.map +0 -1
- /package/dist/core/web/public/next/assets/{BurnDown-BuLMsJMx.css → StatTile-BuLMsJMx.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandSection-rIeMK5Ch.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/command/authority-model.ts","../../../../../../src/web-ui/routes/verse/command/GrantSheet.tsx","../../../../../../src/web-ui/routes/verse/command/AutonomyBar.tsx","../../../../../../src/core/routing/headroom.ts","../../../../../../src/web-ui/routes/verse/command/command-model.ts","../../../../../../src/web-ui/routes/verse/command/KpiRow.tsx","../../../../../../src/web-ui/routes/verse/command/NeedsYouCard.tsx","../../../../../../src/web-ui/routes/verse/command/SeatBurnDowns.tsx","../../../../../../src/web-ui/routes/verse/cloud/CloudLaunchDialog.tsx","../../../../../../src/web-ui/routes/verse/cloud/CloudCard.tsx","../../../../../../src/web-ui/routes/verse/command/VerdictLine.tsx","../../../../../../src/web-ui/routes/verse/sections/CommandSection.tsx"],"sourcesContent":["/**\n * routes/verse/command/authority-model.ts — the pure decisions behind the\n * Command top bar (unit C7; SPEC-310B §0 I1 + §6, SPEC-310C §5).\n *\n * I1 is the whole design: ONLY a grant signed under Touch ID raises\n * authority; LOWERING is instant and needs no auth. So every click on the\n * switch is classified before anything is sent:\n *\n * lower → POST at once (Off is always one click away);\n * raise → POST at once, but only up to `maxSwitchWithoutGrant`\n * — the installed grant already allows it;\n * raise-needs-grant→ nothing is sent; the Touch ID sheet opens with the\n * draft grant's full scope and expiry. The server is\n * still the authority (409 `grant-required` on a stale\n * page) — this only keeps the page from asking for\n * something it knows will be refused.\n *\n * Framework-free; tested directly.\n */\nimport type { AuthorityGrantDraft, AuthorityStatusV1, AutonomySwitch, GrantState } from '../../../../core/authority/types.js';\nimport { darkSinceLabel } from '../fleet/dark-since.js';\n\nexport const SWITCH_RANK: Readonly<Record<AutonomySwitch, number>> = { off: 0, propose: 1, autonomous: 2 };\n\nexport const SWITCH_LABEL: Readonly<Record<AutonomySwitch, string>> = {\n off: 'Off',\n propose: 'Propose',\n autonomous: 'Autonomous',\n};\n\n/** Short labels for the 375 px bar (same order, same meaning). */\nexport const SWITCH_SHORT: Readonly<Record<AutonomySwitch, string>> = {\n off: 'Off',\n propose: 'Propose',\n autonomous: 'Auto',\n};\n\nexport const SWITCH_ORDER: readonly AutonomySwitch[] = ['off', 'propose', 'autonomous'];\n\nexport type SwitchChange = 'same' | 'lower' | 'raise' | 'raise-needs-grant';\n\n/** What a click on `to` means, given the status the page last read. */\nexport function classifySwitch(status: Pick<AuthorityStatusV1, 'switch' | 'maxSwitchWithoutGrant'>, to: AutonomySwitch): SwitchChange {\n const from = SWITCH_RANK[status.switch];\n const target = SWITCH_RANK[to];\n if (target === from) return 'same';\n if (target < from) return 'lower';\n return target <= SWITCH_RANK[status.maxSwitchWithoutGrant] ? 'raise' : 'raise-needs-grant';\n}\n\nexport interface SwitchOption {\n value: AutonomySwitch;\n label: string;\n short: string;\n /** Selecting it opens the Touch ID sheet instead of switching. */\n needsGrant: boolean;\n /** Spoken name, carrying the grant requirement in words. */\n ariaLabel: string;\n}\n\nexport function switchOptions(status: Pick<AuthorityStatusV1, 'switch' | 'maxSwitchWithoutGrant'>): SwitchOption[] {\n return SWITCH_ORDER.map((value) => {\n const needsGrant = SWITCH_RANK[value] > Math.max(SWITCH_RANK[status.switch], SWITCH_RANK[status.maxSwitchWithoutGrant]);\n return {\n value,\n label: SWITCH_LABEL[value],\n short: SWITCH_SHORT[value],\n needsGrant,\n ariaLabel: needsGrant ? `${SWITCH_LABEL[value]} (needs a new grant — Touch ID)` : SWITCH_LABEL[value],\n };\n });\n}\n\n// ---------------------------------------------------------------------------\n// Grant chip\n// ---------------------------------------------------------------------------\n\nexport type ChipTone = 'neutral' | 'success' | 'warning' | 'danger' | 'unknown';\n\nexport interface GrantChip {\n label: string;\n tone: ChipTone;\n /** Longer sentence for the tooltip / accessible description. */\n detail: string;\n /** Clicking the chip opens the Touch ID sheet for this action; null = informational. */\n action: 'grant' | 're-approve' | null;\n}\n\nconst DAY = 86_400_000;\nconst HOUR = 3_600_000;\n\n/** \"23d\", \"2d 4h\", \"5h\", \"40m\" — time left, coarse on purpose (it is a chip). */\nexport function timeLeft(ms: number): string {\n if (!Number.isFinite(ms) || ms <= 0) return '0m';\n if (ms >= 3 * DAY) return `${Math.floor(ms / DAY)}d`;\n if (ms >= DAY) {\n const d = Math.floor(ms / DAY);\n const h = Math.floor((ms - d * DAY) / HOUR);\n return h ? `${d}d ${h}h` : `${d}d`;\n }\n if (ms >= HOUR) return `${Math.floor(ms / HOUR)}h`;\n return `${Math.max(1, Math.floor(ms / 60_000))}m`;\n}\n\nconst STATE_WORDS: Record<GrantState, string> = {\n none: 'No grant',\n active: 'Active',\n paused: 'Paused, re-approve',\n expired: 'Expired, renew',\n revoked: 'Revoked, new grant',\n invalid: 'Grant invalid',\n};\n\nexport function grantChip(status: AuthorityStatusV1 | null, now: number): GrantChip {\n if (!status) return { label: 'Grant unknown', tone: 'unknown', detail: 'The authority service did not answer, so the grant state is unknown.', action: null };\n const g = status.grant;\n switch (g.state) {\n case 'active': {\n const expires = g.expiresAt ? Date.parse(g.expiresAt) : NaN;\n if (!Number.isFinite(expires)) return { label: 'Active', tone: 'success', detail: 'A grant is active; its expiry could not be read.', action: null };\n const left = expires - now;\n const tone: ChipTone = left < DAY ? 'danger' : left < 3 * DAY ? 'warning' : 'success';\n return {\n label: timeLeft(left),\n tone,\n detail: `Grant active until ${new Date(expires).toLocaleString('en-US', { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' })}${left < 3 * DAY ? ' — renew soon' : ''}.`,\n action: left < 3 * DAY ? 'grant' : null,\n };\n }\n case 'paused':\n return { label: STATE_WORDS.paused, tone: 'warning', detail: g.reason ?? 'The grant is paused until you re-approve it.', action: 're-approve' };\n case 'expired':\n return { label: STATE_WORDS.expired, tone: 'danger', detail: g.reason ?? 'The grant expired; autonomy is dark until a new one is signed.', action: 'grant' };\n case 'revoked':\n return { label: STATE_WORDS.revoked, tone: 'danger', detail: g.reason ?? 'The grant was revoked; a new one needs Touch ID.', action: 'grant' };\n case 'invalid':\n return { label: STATE_WORDS.invalid, tone: 'danger', detail: g.reason ?? 'The installed grant failed verification.', action: 'grant' };\n case 'none':\n default:\n return { label: STATE_WORDS.none, tone: 'neutral', detail: 'No standing grant is installed; autonomy can only propose.', action: 'grant' };\n }\n}\n\n// ---------------------------------------------------------------------------\n// Verdict line\n// ---------------------------------------------------------------------------\n\nexport interface VerdictInputs {\n authority: AuthorityStatusV1 | null;\n /** FleetLiveSummary fields, null = unknown. */\n building: number | null;\n mergedToday: number | null;\n revertsToday: number | null;\n /** \"Claude\" and the percent reserved for Mason on that seat; null = unknown / no such seat. */\n reserve: { label: string; percent: number } | null;\n /**\n * THE dark-since instant — `fleetDarkSince(live)` (fleet/dark-since.ts),\n * null unless the fleet is dark. Never fleet history's \"quiet since\": an\n * idle fleet that has not produced lately is not dark.\n */\n darkSince: string | null;\n}\n\nexport interface VerdictPart {\n key: string;\n text: string;\n tone?: ChipTone;\n}\n\n/** The mode word first: what autonomy is doing right now, in one word. */\nexport function modeWord(authority: AuthorityStatusV1 | null): VerdictPart {\n if (!authority) return { key: 'mode', text: 'Autonomy unknown', tone: 'unknown' };\n if (authority.kill) return { key: 'mode', text: 'Stopped', tone: 'danger' };\n if (authority.grant.state === 'paused') return { key: 'mode', text: 'Paused, re-approve', tone: 'warning' };\n return { key: 'mode', text: SWITCH_LABEL[authority.effectiveSwitch], tone: authority.effectiveSwitch === 'autonomous' ? 'success' : 'neutral' };\n}\n\n/**\n * \"Autonomous · 5 building · 7 merged today · 0 reverts · Claude 46%\n * reserved for you\". A number that is unknown is LEFT OUT rather than shown\n * as 0 (the line would otherwise claim \"0 reverts\" it never counted); when\n * the whole fleet read is missing the line says so instead.\n */\nexport function verdictParts(v: VerdictInputs): VerdictPart[] {\n const parts: VerdictPart[] = [modeWord(v.authority)];\n const anyFleet = v.building !== null || v.mergedToday !== null || v.revertsToday !== null;\n if (v.darkSince && !(v.building && v.building > 0)) {\n // The same local-day label the Fleet surface's dark charts use.\n parts.push({ key: 'dark', text: `fleet dark since ${darkSinceLabel(v.darkSince)}`, tone: 'neutral' });\n } else if (!anyFleet) {\n parts.push({ key: 'fleet', text: 'fleet status unknown', tone: 'unknown' });\n } else {\n if (v.building !== null) parts.push({ key: 'building', text: `${v.building} building` });\n if (v.mergedToday !== null) parts.push({ key: 'merged', text: `${v.mergedToday} merged today` });\n if (v.revertsToday !== null) parts.push({ key: 'reverts', text: `${v.revertsToday} revert${v.revertsToday === 1 ? '' : 's'}`, tone: v.revertsToday > 0 ? 'warning' : undefined });\n }\n if (v.reserve) parts.push({ key: 'reserve', text: `${v.reserve.label} ${Math.round(v.reserve.percent)}% reserved for you` });\n return parts;\n}\n\n/**\n * Which POST signs a draft: the DRAFT's own `kind` decides (B-U1: GET\n * /api/verse/authority/draft answers with `kind`, and POST refuses a digest\n * whose kind does not match the action). The clicked intent is only the\n * fallback for a server that sends no kind — a grant that is no longer\n * continuable is drafted as a NEW one, and signing it must say so.\n */\nexport function actionForDraft(draft: AuthorityGrantDraft, fallback: 'grant' | 're-approve'): 'grant' | 're-approve' {\n const kind = (draft as AuthorityGrantDraft & { kind?: unknown }).kind;\n if (kind === 'new') return 'grant';\n if (kind === 'reapprove') return 're-approve';\n return fallback;\n}\n\n/**\n * What Stop actually did, in one sentence (B-U6 → C: the Stop UI shows the\n * drain result). The POST answers with the status plus `result.stop`\n * (authority/clamp.ts StopResult). Stop from Verse never waits, so agents\n * admitted before it may still be finishing; that is said with the count,\n * never as \"stopped\" alone. Unknown leases are counted as live upstream\n * (fail closed). Null when the response carries no stop result.\n */\nexport function stopOutcomeSentence(response: unknown): string | null {\n if (response === null || typeof response !== 'object') return null;\n const stop = (response as { result?: { stop?: unknown } }).result?.stop;\n if (stop === null || typeof stop !== 'object') return null;\n const r = stop as { quiesced?: unknown; liveExecutionLeases?: unknown; mergesRevoked?: unknown; mergeRevokeFailures?: unknown };\n const live = typeof r.liveExecutionLeases === 'number' && Number.isFinite(r.liveExecutionLeases) ? Math.max(0, Math.round(r.liveExecutionLeases)) : null;\n const parts: string[] = [];\n if (r.quiesced === true || live === 0) parts.push('Stopped. No agent is still running.');\n else if (live !== null) parts.push(`Stopped. ${live} agent${live === 1 ? '' : 's'} started before Stop ${live === 1 ? 'is' : 'are'} still finishing; no new work starts.`);\n else parts.push('Stopped. Agents started before Stop may still be finishing; no new work starts.');\n if (typeof r.mergesRevoked === 'number' && r.mergesRevoked > 0) {\n parts.push(`${r.mergesRevoked} armed merge${r.mergesRevoked === 1 ? ' was' : 's were'} revoked.`);\n }\n const failed = Array.isArray(r.mergeRevokeFailures) ? r.mergeRevokeFailures.length : 0;\n if (failed > 0) parts.push(`${failed} armed merge${failed === 1 ? '' : 's'} could not be revoked; Stop still blocks ${failed === 1 ? 'it' : 'them'}.`);\n return parts.join(' ');\n}\n","/**\n * routes/verse/command/GrantSheet.tsx — the Touch ID sheet (SPEC-310B §6:\n * \"Raising it past the grant opens the Touch ID sheet, which shows scope and\n * expiry\"; unit C7).\n *\n * It shows EXACTLY what the custody helper will sign — the server's draft\n * StandingGrantV1 and its digest — before anything is sent: repos and how\n * far each may go, merge caps, spend (mode ceiling, metered dollars, every\n * seat's reserve floor), engines, the Leader's classes and veto window, the\n * rollout ladder with each rung's exit criteria, and the expiry. Approving\n * echoes the draft's digest back, so the server signs what Mason read, not\n * whatever it would draft a second later. The Touch ID prompt itself is the\n * helper's, on this Mac; this page never sees a key.\n *\n * All copy is plain text; the draft is server data but rendered as text only.\n */\nimport { useId } from 'react';\nimport type { AuthorityGrantDraft, RolloutStage, StandingGrantV1 } from '../../../../core/authority/types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Sheet } from '../../../components/primitives/Sheet.js';\nimport { IconLock } from '../../../components/primitives/icons.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { authorityDraftQuery, type OptionalRead } from './surface-data.js';\nimport { SWITCH_LABEL } from './authority-model.js';\nimport { CardNote, MicroLabel } from './Surface.js';\nimport type { AutonomySwitch } from '../../../../core/authority/types.js';\nimport styles from './command.module.css';\n\nexport type GrantIntent = 'grant' | 're-approve';\n\nexport interface GrantSheetProps {\n open: boolean;\n intent: GrantIntent;\n /** The switch position the operator asked for (applied after the grant, if it allows it). */\n then: AutonomySwitch | null;\n busy: boolean;\n /** Why the sheet opened, in one sentence (\"Autonomous needs a new grant.\"). */\n why: string;\n onApprove: (draft: AuthorityGrantDraft) => void;\n onClose: () => void;\n}\n\nconst DAY = 86_400_000;\n\nfunction fmtDate(iso: string): string {\n const t = Date.parse(iso);\n return Number.isFinite(t) ? new Date(t).toLocaleString('en-US', { weekday: 'short', month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }) : '—';\n}\n\nexport function grantDays(g: Pick<StandingGrantV1, 'issuedAt' | 'expiresAt'>): number | null {\n const a = Date.parse(g.issuedAt);\n const b = Date.parse(g.expiresAt);\n return Number.isFinite(a) && Number.isFinite(b) ? Math.round((b - a) / DAY) : null;\n}\n\nfunction stageLine(s: RolloutStage): string {\n const c = s.criteria;\n const parts = [\n `${s.repos.length} repo${s.repos.length === 1 ? '' : 's'}`,\n `${s.maxRisk} risk`,\n `≤ ${s.maxFiles} files / ${s.maxLines} lines`,\n `≤ ${s.maxMergesPerRepoPerDay} merges/repo/day`,\n ];\n const exit = [`${c.minMerges} merges`, `${c.minHours} h`, c.minPostMergeGreenPct ? `≥ ${c.minPostMergeGreenPct}% green` : null, `≤ ${c.maxRevertRatePct}% reverts`].filter(Boolean);\n return `${parts.join(' · ')} — advances after ${exit.join(', ')}`;\n}\n\nexport function DraftScope({ draft }: { draft: AuthorityGrantDraft }) {\n const g = draft.payload;\n const days = grantDays(g);\n return (\n <div className={styles.scope}>\n <section className={styles.scopeBlock} aria-label=\"Expiry\">\n <MicroLabel>Expiry</MicroLabel>\n <p className={styles.scopeLead}>\n {days !== null ? `${days} days` : '—'}, until {fmtDate(g.expiresAt)}\n </p>\n <p className={styles.scopeMeta}>\n Signed by key <span className={styles.mono}>{g.keyId}</span> · sequence {g.grantSeq} · bound to this Mac\n </p>\n </section>\n\n <section className={styles.scopeBlock} aria-label=\"Repositories\">\n <MicroLabel>Repositories ({g.repos.length})</MicroLabel>\n <table className={styles.scopeTable}>\n <thead>\n <tr>\n <th scope=\"col\">Repo</th>\n <th scope=\"col\">Up to</th>\n <th scope=\"col\">Checks</th>\n <th scope=\"col\">Risk</th>\n <th scope=\"col\" className={styles.num}>Merges/day</th>\n </tr>\n </thead>\n <tbody>\n {g.repos.map((r) => (\n <tr key={r.nameWithOwner}>\n <td className={styles.mono}>{r.nameWithOwner}</td>\n <td>{r.stage === 'merge' ? 'Merge' : 'Propose'}</td>\n <td>{r.enforcement === 'server' ? 'GitHub' : 'Local only'}</td>\n <td>{r.maxRisk}</td>\n <td className={styles.num}>{r.maxMergesPerDay}</td>\n </tr>\n ))}\n </tbody>\n </table>\n <p className={styles.scopeMeta}>\n Every merge ≤ {g.merge.maxFiles} files / {g.merge.maxLines} lines · ashlr-hub itself: {g.merge.selfRepo === 'propose-only' ? 'propose only' : 'merge outside authority code'}\n </p>\n </section>\n\n <section className={styles.scopeBlock} aria-label=\"Spend\">\n <MicroLabel>Spend</MicroLabel>\n <p className={styles.scopeLead}>\n Up to {g.spend.maxMode === 'all-in' ? 'All-in' : g.spend.maxMode === 'balanced' ? 'Balanced' : 'Reserve'} · metered APIs ${g.spend.meteredUsdPerDay}/day\n </p>\n <ul className={styles.scopeList}>\n {Object.entries(g.spend.seats).map(([seatId, seat]) => (\n <li key={seatId}>\n <span className={styles.mono}>{seatId}</span>\n {seat.enabled ? `: keeps ${seat.reserveFloorPercent}% for you` : ': not used by autonomy'}\n {seat.enabled && seat.maxSessionWindowPercent !== undefined ? `, never above ${seat.maxSessionWindowPercent}% of its 5-hour window` : ''}\n {seat.enabled ? ` · ${seat.roles.join(', ')}` : ''}\n </li>\n ))}\n </ul>\n </section>\n\n <section className={styles.scopeBlock} aria-label=\"Engines and Leader\">\n <MicroLabel>Engines and Leader</MicroLabel>\n <p className={styles.scopeLead}>{g.engines.join(', ') || 'none'}</p>\n <p className={styles.scopeMeta}>\n Leader classes {g.leader.classes.length ? g.leader.classes.join(' + ') : 'none (proposes only)'} · class-B veto window {g.leader.vetoMinutes} min ·\n goal conductor {g.conductorGoals ? 'on' : 'off'}\n </p>\n </section>\n\n <section className={styles.scopeBlock} aria-label=\"Rollout ladder\">\n <MicroLabel>Rollout ladder ({g.rollout.stages.length} stages, advances by itself)</MicroLabel>\n <ol className={styles.ladder}>\n {g.rollout.stages.map((s) => (\n <li key={s.id}>\n <span className={styles.ladderId}>{s.id}</span>\n <span>{stageLine(s)}</span>\n </li>\n ))}\n </ol>\n <p className={styles.scopeMeta}>Any sandbox violation or reserve breach drops it back one stage. It can never climb past the last stage.</p>\n </section>\n\n <p className={styles.scopeMeta}>\n Draft digest <span className={styles.mono}>{draft.digest.slice(0, 16)}…</span>\n </p>\n </div>\n );\n}\n\nexport function GrantSheet({ open, intent, then, busy, why, onApprove, onClose }: GrantSheetProps) {\n const titleId = useId();\n // Only read the draft while the sheet is open: drafting is cheap on the\n // server, but a draft read while the sheet is closed would be stale by the\n // time anyone approved it.\n return open ? <GrantSheetBody titleId={titleId} intent={intent} then={then} busy={busy} why={why} onApprove={onApprove} onClose={onClose} /> : null;\n}\n\nfunction GrantSheetBody({ titleId, intent, then, busy, why, onApprove, onClose }: Omit<GrantSheetProps, 'open'> & { titleId: string }) {\n const read = useQuery(authorityDraftQuery, { freshMs: 0 });\n const draft = (read.data as OptionalRead<AuthorityGrantDraft> | undefined)?.value ?? null;\n const reason = read.data?.reason ?? null;\n return (\n <Sheet\n open\n onClose={onClose}\n titleId={titleId}\n width={600}\n title={intent === 're-approve' ? 'Re-approve the standing grant' : 'Approve a standing grant'}\n description={why}\n footer={\n <div className={styles.sheetFooter}>\n <p className={styles.sheetFootnote}>\n Touch ID appears on this Mac. Lowering authority — Off, Stop, Revoke — never needs it.\n {then ? ` After approval the switch moves to ${SWITCH_LABEL[then]}.` : ''}\n </p>\n <span className={styles.sheetButtons}>\n <Button variant=\"ghost\" onClick={onClose}>\n Cancel\n </Button>\n <Button variant=\"primary\" icon={<IconLock />} disabled={!draft} busy={busy} onClick={() => draft && onApprove(draft)}>\n Approve with Touch ID\n </Button>\n </span>\n </div>\n }\n >\n {read.status === 'loading' && !read.data ? (\n <p className={styles.muted} aria-busy=\"true\">Preparing the grant draft…</p>\n ) : draft ? (\n <DraftScope draft={draft} />\n ) : (\n <CardNote tone=\"unknown\">{reason ?? 'The grant draft could not be read, so nothing can be approved from here.'}</CardNote>\n )}\n </Sheet>\n );\n}\n","/**\n * routes/verse/command/AutonomyBar.tsx — Command's top bar (SPEC-310B §6,\n * SPEC-310C §5; unit C7):\n *\n * Autonomy [Off | Propose | Autonomous] Budget · Balanced ▾ Grant 23d ■ Stop\n *\n * - Lowering the switch is instant (no confirm, no Touch ID — I1).\n * - Raising within what the installed grant allows is instant too.\n * - Raising PAST the grant opens the Touch ID sheet with the draft's full\n * scope and expiry; the switch then moves once the grant is signed.\n * - The Budget pill opens A9's BudgetControl, with the grant's mode\n * ceiling stated above it (autonomy never spends past it whatever the\n * control shows — the server clamps; see CROSS-UNIT REQUEST to C6).\n * - The grant chip reads \"23d\", or \"Paused, re-approve\" and opens the sheet.\n * - Stop asks for confirmation (the catalog's `fleet.stop` guard copy),\n * then writes KILL; while stopped it becomes Resume.\n *\n * At 375 px the bar is just [Autonomy][■] (SPEC-310C §5); the budget pill\n * and grant chip move under the verdict line (rendered by CommandSection).\n */\nimport { useState, type ReactNode } from 'react';\nimport type { AuthorityGrantDraft, AuthorityStatusV1, AutonomySwitch } from '../../../../core/authority/types.js';\nimport type { BudgetMode } from '../../../../core/routing/types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Segmented } from '../../../components/primitives/Segmented.js';\nimport { Sheet } from '../../../components/primitives/Sheet.js';\nimport { IconChevronDown, IconLock, IconPlay, IconStop } from '../../../components/primitives/icons.js';\nimport { BudgetControl } from '../budget/BudgetControl.js';\nimport { findCommand } from '../shell/command-catalog.js';\nimport { actionForDraft, SWITCH_LABEL, SWITCH_RANK, classifySwitch, grantChip, stopOutcomeSentence, switchOptions, type ChipTone } from './authority-model.js';\nimport { GrantSheet, type GrantIntent } from './GrantSheet.js';\nimport { postAuthority, type OptionalRead } from './surface-data.js';\nimport type { ConfirmSpec, SurfaceActions } from './actions.js';\nimport styles from './command.module.css';\n\nconst MODE_WORD: Record<BudgetMode, string> = { 'all-in': 'All-in', balanced: 'Balanced', reserve: 'Reserve' };\n\n/** The catalog's Stop copy, so ⌘K \"Stop the fleet…\" and this button confirm with the same words. */\nexport function stopConfirm(): ConfirmSpec {\n const guard = findCommand('fleet.stop')?.guard?.confirm;\n return {\n title: guard?.title ?? 'Stop the fleet?',\n body: guard?.body ?? 'Autonomous work halts within one tick and stays stopped until you resume it. Chats keep running.',\n confirmLabel: guard?.confirmLabel ?? 'Stop fleet',\n destructive: true,\n };\n}\n\nconst RESUME_CONFIRM: ConfirmSpec = {\n title: 'Resume the fleet?',\n body: 'Autonomy picks up at the switch position on its next tick. Stopping again is one click.',\n confirmLabel: 'Resume fleet',\n destructive: false,\n};\n\nexport function ChipDot({ tone }: { tone: ChipTone }) {\n return <span className={styles.dot} data-tone={tone} aria-hidden=\"true\" />;\n}\n\nexport interface AutonomyBarProps {\n read: OptionalRead<AuthorityStatusV1> | undefined;\n loading: boolean;\n budgetMode: BudgetMode | null;\n actions: SurfaceActions;\n compact: boolean;\n now: number;\n}\n\nexport function AutonomyBar({ read, loading, budgetMode, actions, compact, now }: AutonomyBarProps) {\n const status = read?.value ?? null;\n const [sheet, setSheet] = useState<{ intent: GrantIntent; then: AutonomySwitch | null; why: string } | null>(null);\n /** What the last Stop did (drain count, merges revoked) — shown while stopped. */\n const [stopNote, setStopNote] = useState<string | null>(null);\n const [budgetOpen, setBudgetOpen] = useState(false);\n const unavailable = !status;\n const chip = grantChip(status, now);\n\n function onSwitch(to: AutonomySwitch): void {\n if (!status) return;\n const change = classifySwitch(status, to);\n if (change === 'same') return;\n if (change === 'raise-needs-grant') {\n const paused = status.grant.state === 'paused';\n setSheet({\n intent: paused ? 're-approve' : 'grant',\n then: to,\n why: paused\n ? `${status.grant.reason ?? 'The grant is paused.'} ${SWITCH_LABEL[to]} needs it re-approved.`\n : `${SWITCH_LABEL[to]} is beyond what the installed grant allows, so it needs a new grant.`,\n });\n return;\n }\n // Lower, or raise within the grant: straight to the server, no dialog.\n actions.act(() => postAuthority({ action: 'switch', to }), `Switch autonomy to ${SWITCH_LABEL[to]}`);\n }\n\n function approve(draft: AuthorityGrantDraft): void {\n if (!sheet) return;\n const { then } = sheet;\n // The DRAFT decides grant vs re-approve (B-U1: GET …/draft answers with\n // `kind`, and POST refuses a digest whose kind does not match the action).\n // The sheet's intent is only what the operator clicked; a grant that is no\n // longer continuable is drafted as a new one, and signing it must say so.\n const intent = actionForDraft(draft, sheet.intent);\n actions.act(\n () => postAuthority({ action: intent, draftDigest: draft.digest }),\n intent === 're-approve' ? 'Re-approve the standing grant' : 'Sign a new standing grant',\n {\n onDone: (next) => {\n setSheet(null);\n // Apply the requested position only if the NEW grant allows it.\n if (then && next && SWITCH_RANK[then] <= SWITCH_RANK[next.maxSwitchWithoutGrant] && then !== next.switch) {\n actions.act(() => postAuthority({ action: 'switch', to: then }), `Switch autonomy to ${SWITCH_LABEL[then]}`);\n }\n },\n },\n );\n }\n\n const options = status ? switchOptions(status) : switchOptions({ switch: 'off', maxSwitchWithoutGrant: 'off' });\n const stopped = status?.kill ?? false;\n const disabled = unavailable || actions.busy || actions.readOnly;\n\n const switchControl = (\n <div className={styles.switchWrap} title={unavailable ? (read?.reason ?? 'Reading autonomy state…') : undefined}>\n {!compact ? <span className={styles.barLabel} aria-hidden=\"true\">Autonomy</span> : null}\n <Segmented<AutonomySwitch>\n size=\"sm\"\n aria-label=\"Autonomy\"\n value={status?.switch ?? 'off'}\n onChange={onSwitch}\n options={options.map((o) => ({\n value: o.value,\n label: (\n <span className={styles.switchOption}>\n {compact ? o.short : o.label}\n {o.needsGrant ? <IconLock className={styles.touchMark} width={12} height={12} aria-hidden=\"true\" /> : null}\n </span>\n ),\n ariaLabel: o.ariaLabel,\n disabled,\n }))}\n />\n </div>\n );\n\n const onStop = () => actions.act(() => postAuthority({ action: 'stop' }), 'Stop the fleet', {\n confirm: stopConfirm(),\n onDone: (next) => setStopNote(stopOutcomeSentence(next)),\n });\n const onResume = () => actions.act(() => postAuthority({ action: 'clear-stop' }), 'Resume the fleet', {\n confirm: RESUME_CONFIRM,\n onDone: () => setStopNote(null),\n });\n const stopButton = stopped\n ? compact\n ? <Button variant=\"subtle\" size=\"sm\" icon={<IconPlay />} iconOnly aria-label=\"Resume the fleet\" disabled={disabled} onClick={onResume} />\n : <Button variant=\"subtle\" size=\"sm\" icon={<IconPlay />} disabled={disabled} onClick={onResume}>Resume</Button>\n : compact\n ? <Button variant=\"danger\" size=\"sm\" icon={<IconStop />} iconOnly aria-label=\"Stop the fleet\" disabled={disabled} onClick={onStop} />\n : <Button variant=\"danger\" size=\"sm\" icon={<IconStop />} disabled={disabled} onClick={onStop}>Stop</Button>;\n\n return (\n <>\n <div className={styles.bar} role=\"toolbar\" aria-label=\"Autonomy controls\" data-loading={loading || undefined}>\n {switchControl}\n {!compact ? (\n <>\n <BudgetPill mode={budgetMode} onOpen={() => setBudgetOpen(true)} />\n <GrantChip chip={chip} onOpen={(intent) => setSheet({ intent, then: null, why: chip.detail })} />\n </>\n ) : null}\n <span className={styles.barSpacer} />\n {stopButton}\n </div>\n {stopped && stopNote ? <p className={styles.muted} role=\"status\">{stopNote}</p> : null}\n {compact ? (\n <div className={styles.barSecondary}>\n <BudgetPill mode={budgetMode} onOpen={() => setBudgetOpen(true)} />\n <GrantChip chip={chip} onOpen={(intent) => setSheet({ intent, then: null, why: chip.detail })} />\n </div>\n ) : null}\n <GrantSheet\n open={sheet !== null}\n intent={sheet?.intent ?? 'grant'}\n then={sheet?.then ?? null}\n why={sheet?.why ?? ''}\n busy={actions.busy}\n onApprove={approve}\n onClose={() => setSheet(null)}\n />\n <BudgetSheet open={budgetOpen} onClose={() => setBudgetOpen(false)} status={status} />\n </>\n );\n}\n\nexport function BudgetPill({ mode, onOpen }: { mode: BudgetMode | null; onOpen: () => void }) {\n return (\n <button type=\"button\" className={styles.pill} aria-haspopup=\"dialog\" onClick={onOpen}>\n <span className={styles.pillLabel}>Budget</span>\n <span>{mode ? MODE_WORD[mode] : '—'}</span>\n <IconChevronDown width={14} height={14} aria-hidden=\"true\" />\n </button>\n );\n}\n\nexport function GrantChip({ chip, onOpen }: { chip: ReturnType<typeof grantChip>; onOpen: (intent: GrantIntent) => void }) {\n const body: ReactNode = (\n <>\n <ChipDot tone={chip.tone} />\n <span className={styles.pillLabel}>Grant</span>\n <span>{chip.label}</span>\n </>\n );\n if (!chip.action) {\n return (\n <span className={styles.chip} data-tone={chip.tone} title={chip.detail} aria-label={`Grant: ${chip.label}. ${chip.detail}`} role=\"status\">\n {body}\n </span>\n );\n }\n const intent = chip.action;\n return (\n <button type=\"button\" className={styles.chip} data-tone={chip.tone} title={chip.detail} aria-haspopup=\"dialog\" onClick={() => onOpen(intent)} aria-label={`Grant: ${chip.label}. ${chip.detail}`}>\n {body}\n </button>\n );\n}\n\nfunction BudgetSheet({ open, onClose, status }: { open: boolean; onClose: () => void; status: AuthorityStatusV1 | null }) {\n const max = status?.grant.state === 'active' ? status.grant.maxMode : null;\n return (\n <Sheet\n open={open}\n onClose={onClose}\n titleId=\"command-budget-sheet\"\n width={560}\n title=\"Budget\"\n description={\n max\n ? `Your grant allows up to ${MODE_WORD[max]}. Autonomy never spends past it, whatever is selected here — moving toward Reserve is always instant.`\n : 'No active grant: autonomy only proposes. The budget still decides which seats it would use.'\n }\n >\n {/* The grant's ceiling disables the modes above it (A9 control, C7 request). */}\n {open ? <BudgetControl maxMode={max} /> : null}\n </Sheet>\n );\n}\n","/**\n * Live headroom per seat — how much of each seat autonomy may still use under\n * its budget policy (V3.10 unit A9).\n *\n * INPUT is a `SeatCapacity`: the public Verse seat projection (the same\n * windows `GET /api/verse/accounts` serves — Claude `five_hour`/`seven_day`,\n * Codex `codex_<bucket>_{primary,secondary}`, Grok's billing period) reduced to\n * what budgeting needs. OUTPUT is the contract's `SeatHeadroom`, plus the\n * reopening time the router needs for `SeatExclusion.nextEligibleAt`.\n *\n * HONESTY RULES (docs/VERSE-TELEMETRY-V2.md, and Mason's decision):\n * - Unknown usage is NOT headroom. A paid seat with no reading, a reported\n * account window with a null percent, or a reading older than\n * `readingMaxAgeMs` is ineligible for autonomy. This is the fix for the old\n * Claude fail-open, where \"no signal\" was treated as \"go ahead\".\n * - A spent PER-MODEL window is not a spent account. Claude's\n * `seven_day_fable` can read 100% while `five_hour` reads 15%; only the\n * account-wide windows bind (seats.ts `seatUsability` has the same rule).\n * - Claude publishes no machine-readable reset. Its reset is quoted in the\n * provider's own words and never turned into a timestamp or a countdown.\n * - Codex credits are paid overage. Autonomy never spends them, so a spent\n * Codex window blocks autonomy even when a balance exists.\n *\n * WINDOW SEMANTICS\n * - `reservePercent` keeps that share of the LONG (weekly / billing-period)\n * window for Mason: autonomy stops at `100 − reserve` used. A seat that\n * reports only a short window applies the reserve to that one.\n * - `maxSessionWindowPercent` is the ceiling on the SHORT (5-hour) window, so\n * a live interactive session is never starved (\"never touch Claude while\n * its 5-hour window is above 70%\").\n * - The binding window is whichever of the two leaves autonomy LESS room.\n *\n * BROWSER-SAFE and PURE: type-only imports, no clock reads (callers pass\n * `nowMs`), no I/O.\n */\nimport type { VerseSeat, VerseSeatCapacity } from '../verse/types.js';\nimport type { BudgetEngine } from './policy.js';\nimport { reasonSentences } from './seat-reasons.js';\nimport type { SeatBudgetPolicy, SeatHeadroom, SeatReason } from './types.js';\n\n/** A reading older than this is too stale to spend against (the collector polls every 30 s when active). */\nexport const HEADROOM_READING_MAX_AGE_MS = 15 * 60_000;\n\n/**\n * A window whose reset is further away than this cannot be a 5-hour window,\n * whatever its id says. Codex's `primary` bucket is USUALLY the 5-hour window,\n * but on 2026-09-24 both accounts reported a `primary` resetting ~42 h out —\n * so the reset distance, when known, overrides the id.\n */\nexport const SESSION_WINDOW_MAX_MS = 5 * 60 * 60_000 + 15 * 60_000;\n\nexport type SeatWindowClass = 'session' | 'weekly' | 'model';\n\nexport interface CapacityWindow {\n id: string;\n /** Provider percent; null = NO SIGNAL (not zero). */\n usedPercent: number | null;\n /** Machine reset; always null for Claude. */\n resetsAt: string | null;\n /** The provider's own reset wording (Claude), verbatim. */\n resetDescription: string | null;\n /** Provider explicitly flagged the limit (a denial, not a measurement). */\n limitReached: boolean;\n}\n\n/** What the budget layer needs to know about one seat. JSON-safe; persisted in the capacity snapshot. */\nexport interface SeatCapacity {\n seatId: string;\n engine: BudgetEngine;\n label: string;\n /** True for local runtime seats: $0 and no provider window. */\n free: boolean;\n windows: CapacityWindow[];\n /** The account reports no usable login. */\n signedOut: boolean;\n /** Can a turn reach this seat at all? Null when unknown. */\n reachable: boolean | null;\n /** Default model's context window in tokens; null when unknown. */\n contextWindow: number | null;\n /** When the windows were read; null when never. */\n observedAt: string | null;\n /** Today's metered spend in USD; null when unknown or not metered. */\n spentTodayUsd: number | null;\n}\n\n/** `SeatHeadroom` plus the facts the router needs but the wire shape does not carry. */\nexport interface SeatAssessment {\n headroom: SeatHeadroom;\n /** When the blocking condition is expected to lift; null when unknown / never / not blocked. */\n reopensAt: string | null;\n /** True when usage is known to be spent (limit flagged or ≥ 100%) on an account window. */\n exhausted: boolean;\n /** True when usage evidence is missing, partial or stale. */\n unknownUsage: boolean;\n /** The sentences naming each spent account window (a subset of `headroom.reasons`). */\n spentReasons: string[];\n /** `headroom.reasons` as data (same order): each sentence without its reset clause, plus the reset. */\n details: SeatReason[];\n /** `spentReasons` as data. */\n spentDetails: SeatReason[];\n}\n\nexport interface AssessOptions {\n nowMs: number;\n readingMaxAgeMs?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Projection from the public seat shape\n// ---------------------------------------------------------------------------\n\n/**\n * Reduce a public `VerseSeat` to a `SeatCapacity`. `liveCapacity`, when given,\n * replaces the seat's own (possibly cached) capacity — the caller re-reads\n * telemetry per request exactly as verse-api's `liveSeats` does.\n */\nexport function capacityFromSeat(seat: VerseSeat, liveCapacity?: VerseSeatCapacity | null): SeatCapacity {\n const free = seat.engine === 'local';\n const capacity = liveCapacity === undefined ? seat.capacity ?? null : liveCapacity;\n const windows: CapacityWindow[] = free || !capacity ? [] : capacity.windows.map((w) => ({\n id: w.id,\n usedPercent: typeof w.usedPercent === 'number' && Number.isFinite(w.usedPercent)\n ? Math.max(0, Math.min(100, w.usedPercent))\n : null,\n resetsAt: w.resetsAt,\n resetDescription: w.resetDescription,\n limitReached: w.limitReached === true,\n }));\n const signedOut = !free && capacity?.usability === 'signed-out';\n return {\n seatId: seat.id,\n engine: seat.engine,\n label: seat.label,\n free,\n windows,\n signedOut,\n // A local seat is only listed when the runtime answered discovery. A\n // native seat is reachable unless signed out; \"no reading\" is a usage\n // question, not a reachability one.\n reachable: free ? true : signedOut ? false : null,\n contextWindow: typeof seat.contextWindow === 'number' && seat.contextWindow > 0 ? seat.contextWindow : null,\n observedAt: free ? null : capacity?.observedAt ?? seat.health.observedAt ?? null,\n spentTodayUsd: null,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Window classification\n// ---------------------------------------------------------------------------\n\nfunction resetDistanceMs(window: CapacityWindow, nowMs: number): number | null {\n if (!window.resetsAt) return null;\n const at = Date.parse(window.resetsAt);\n return Number.isFinite(at) ? at - nowMs : null;\n}\n\n/** Which role a window plays for budgeting. Per-model windows never bind. */\nexport function classifyWindow(engine: BudgetEngine, window: CapacityWindow, nowMs: number): SeatWindowClass {\n const id = window.id;\n if (engine === 'claude') {\n if (id === 'five_hour') return 'session';\n if (id === 'seven_day') return 'weekly';\n if (id.startsWith('seven_day_')) return 'model';\n }\n if (engine === 'grok') return 'weekly';\n const distance = resetDistanceMs(window, nowMs);\n if (engine === 'codex') {\n if (id.endsWith('_secondary')) return 'weekly';\n if (id.endsWith('_primary')) return distance !== null && distance > SESSION_WINDOW_MAX_MS ? 'weekly' : 'session';\n }\n // Unknown id: only a reset we can SEE inside five hours makes it short.\n return distance !== null && distance <= SESSION_WINDOW_MAX_MS ? 'session' : 'weekly';\n}\n\n/** Human name for a window, for reasons. */\nexport function windowName(engine: BudgetEngine, window: CapacityWindow, cls: SeatWindowClass): string {\n if (cls === 'session') return '5-hour window';\n if (cls === 'model') {\n const model = window.id.startsWith('seven_day_') ? window.id.slice('seven_day_'.length) : window.id;\n return `${model.charAt(0).toUpperCase()}${model.slice(1)}-only weekly window`;\n }\n if (engine === 'grok' || window.id.endsWith('_monthly')) {\n return window.id.endsWith('_monthly') ? 'monthly billing window' : window.id.endsWith('_weekly') ? 'weekly window' : 'billing-period window';\n }\n return 'weekly window';\n}\n\n/**\n * A window's reset as data: the machine instant when there is one, else\n * Claude's own words, verbatim — never a synthesized time. `reasonSentence`\n * turns it back into the \" (resets …)\" clause the string form has always had.\n */\nfunction resetOf(window: CapacityWindow): Pick<SeatReason, 'resetsAt' | 'resetDescription'> {\n if (window.resetsAt) return { resetsAt: window.resetsAt, resetDescription: null };\n return { resetsAt: null, resetDescription: window.resetDescription ?? null };\n}\n\nfunction isSpent(window: CapacityWindow): boolean {\n return window.limitReached || (window.usedPercent !== null && window.usedPercent >= 100);\n}\n\nfunction pct(value: number): string {\n return `${Math.round(value)}%`;\n}\n\nfunction formatAge(ms: number): string {\n const minutes = Math.round(ms / 60_000);\n if (minutes < 120) return `${minutes} min`;\n const hours = Math.round(minutes / 60);\n return hours < 48 ? `${hours} h` : `${Math.round(hours / 24)} days`;\n}\n\n// ---------------------------------------------------------------------------\n// Assessment\n// ---------------------------------------------------------------------------\n\ninterface ClassedWindow {\n window: CapacityWindow;\n cls: SeatWindowClass;\n}\n\n/** The highest reading among `rows`, with its window; null when none carried a percent. */\nfunction peak(rows: ClassedWindow[]): ClassedWindow | null {\n let best: ClassedWindow | null = null;\n for (const row of rows) {\n if (row.window.usedPercent === null) continue;\n if (best === null || row.window.usedPercent > best.window.usedPercent!) best = row;\n }\n return best;\n}\n\n/**\n * When EVERY spent window in `rows` has reset — the seat is blocked until the\n * last of them does, so this is the latest reset. Null unless every row has a\n * machine-readable reset (one unknown reset makes the reopening unknown).\n */\nfunction lastReset(rows: ClassedWindow[]): string | null {\n const times: string[] = [];\n for (const row of rows) {\n const at = row.window.resetsAt;\n if (!at || !Number.isFinite(Date.parse(at))) return null;\n times.push(at);\n }\n times.sort((a, b) => Date.parse(b) - Date.parse(a));\n return times[0] ?? null;\n}\n\n/** Full assessment of one seat for AUTONOMOUS use under `policy`. Pure. */\nexport function assessSeat(capacity: SeatCapacity, policy: SeatBudgetPolicy, opts: AssessOptions): SeatAssessment {\n const { nowMs } = opts;\n const maxAge = opts.readingMaxAgeMs ?? HEADROOM_READING_MAX_AGE_MS;\n // Reasons are built as data; `headroom.reasons` is derived from them.\n const details: SeatReason[] = [];\n\n // ── Local: free, windowless, bounded only by reachability ──────────────\n if (capacity.free) {\n const reachable = capacity.reachable !== false;\n if (!policy.enabled) details.push({ kind: 'switched-off', text: 'Autonomy is switched off for this seat.' });\n if (!reachable) details.push({ kind: 'unreachable', text: 'The local model runtime is not reachable.' });\n const eligible = policy.enabled && reachable;\n if (eligible) details.push({ kind: 'headroom', text: 'Local model — free, with no usage window to protect.' });\n return {\n headroom: {\n seatId: capacity.seatId,\n sessionUsedPercent: null,\n weeklyUsedPercent: null,\n bindingWindow: null,\n // No window binds a local seat; \"all of it\" is the honest number while\n // the runtime answers, and unknown while it does not.\n autonomyHeadroomPercent: reachable ? 100 : null,\n resetAt: null,\n eligibleForAutonomy: eligible,\n reasons: reasonSentences(details),\n },\n reopensAt: null,\n exhausted: false,\n unknownUsage: false,\n spentReasons: [],\n details,\n spentDetails: [],\n };\n }\n\n // ── Paid seat ──────────────────────────────────────────────────────────\n const classed: ClassedWindow[] = capacity.windows.map((window) => ({\n window,\n cls: classifyWindow(capacity.engine, window, nowMs),\n }));\n const account = classed.filter((row) => row.cls !== 'model');\n const sessionRows = account.filter((row) => row.cls === 'session');\n const weeklyRows = account.filter((row) => row.cls === 'weekly');\n const sessionPeak = peak(sessionRows);\n const weeklyPeak = peak(weeklyRows);\n const sessionUsed = sessionPeak?.window.usedPercent ?? null;\n const weeklyUsed = weeklyPeak?.window.usedPercent ?? null;\n\n // Evidence quality.\n const observedMs = capacity.observedAt ? Date.parse(capacity.observedAt) : NaN;\n const ageMs = Number.isFinite(observedMs) ? nowMs - observedMs : null;\n const stale = ageMs === null || ageMs > maxAge;\n const hasReading = sessionUsed !== null || weeklyUsed !== null;\n const nullWindow = account.find((row) => row.window.usedPercent === null && !row.window.limitReached);\n\n // Ceilings. The reserve protects the LONG window; with no long window it\n // protects the short one. The session ceiling protects a live session.\n const reserveCeiling = 100 - policy.reservePercent;\n const sessionCeiling = policy.maxSessionWindowPercent ?? 100;\n // With no long window the short one carries BOTH limits; say which one bit.\n const sessionLimitIsReserve = weeklyRows.length === 0 && reserveCeiling < sessionCeiling;\n const sessionLimit = sessionLimitIsReserve ? reserveCeiling : sessionCeiling;\n let weeklyRoom: number | null = null;\n let sessionRoom: number | null = null;\n if (weeklyUsed !== null) weeklyRoom = reserveCeiling - weeklyUsed;\n if (sessionUsed !== null) sessionRoom = sessionLimit - sessionUsed;\n let bindingWindow: SeatHeadroom['bindingWindow'] = null;\n let room: number | null = null;\n if (weeklyRoom !== null && (sessionRoom === null || weeklyRoom <= sessionRoom)) {\n bindingWindow = 'weekly';\n room = weeklyRoom;\n } else if (sessionRoom !== null) {\n bindingWindow = 'session';\n room = sessionRoom;\n }\n const bindingRow = bindingWindow === 'weekly' ? weeklyPeak : bindingWindow === 'session' ? sessionPeak : null;\n\n // Blockers, most fundamental first. Every one gets a plain sentence.\n let reopensAt: string | null = null;\n const spentRows = account.filter((row) => isSpent(row.window));\n const exhausted = spentRows.length > 0;\n const unknownUsage = !hasReading || stale || nullWindow !== undefined;\n\n if (!policy.enabled) details.push({ kind: 'switched-off', text: 'Autonomy is switched off for this seat.' });\n if (capacity.signedOut) {\n details.push({ kind: 'signed-out', text: 'Signed out — reconnect this account before anything can run on it.' });\n }\n\n const spentDetails: SeatReason[] = [];\n if (exhausted) {\n for (const row of spentRows) {\n const used = row.window.limitReached ? 'limit reached' : `${pct(row.window.usedPercent!)} used`;\n spentDetails.push({\n kind: 'spent',\n text: `The ${windowName(capacity.engine, row.window, row.cls)} is spent — ${used}.`,\n ...resetOf(row.window),\n });\n }\n details.push(...spentDetails);\n reopensAt = lastReset(spentRows);\n }\n\n if (!hasReading) {\n details.push({\n kind: 'unknown-usage',\n text: account.length === 0\n ? 'No usage reading for this seat — unknown usage is not headroom, so autonomy stays off it.'\n : 'Its usage windows carried no percentage — unknown usage is not headroom, so autonomy stays off it.',\n });\n } else if (stale) {\n details.push({\n kind: 'unknown-usage',\n text: ageMs === null\n ? 'The usage reading has no timestamp — too uncertain to spend against.'\n : `The usage reading is ${formatAge(ageMs)} old — too stale to spend against (limit ${formatAge(maxAge)}).`,\n });\n } else if (nullWindow) {\n details.push({\n kind: 'unknown-usage',\n text: `The ${windowName(capacity.engine, nullWindow.window, nullWindow.cls)} carried no percentage — `\n + 'unknown usage is not headroom.',\n });\n }\n\n const usdCap = policy.dailyUsdCap;\n let overUsd = false;\n if (usdCap !== undefined) {\n if (capacity.spentTodayUsd === null) {\n overUsd = true;\n details.push({ kind: 'spend-cap', text: `A $${usdCap.toFixed(2)} daily cap is set but today's spend on this seat is unknown.` });\n } else if (capacity.spentTodayUsd >= usdCap) {\n overUsd = true;\n details.push({ kind: 'spend-cap', text: `Spent $${capacity.spentTodayUsd.toFixed(2)} of its $${usdCap.toFixed(2)} daily cap.` });\n }\n }\n\n // Ceiling reasons only matter when the reading itself is trustworthy.\n const ceilingBlocked = !exhausted && !unknownUsage && room !== null && room <= 0;\n if (ceilingBlocked && bindingRow) {\n const name = windowName(capacity.engine, bindingRow.window, bindingRow.cls);\n const used = pct(bindingRow.window.usedPercent!);\n if (bindingWindow === 'session' && !sessionLimitIsReserve) {\n details.push({\n kind: 'session-ceiling',\n text: `The ${name} is ${used} used; autonomy stops at ${pct(sessionLimit)} to protect your live session.`,\n ...resetOf(bindingRow.window),\n });\n } else {\n details.push({\n kind: 'reserve',\n text: `The ${name} is ${used} used; ${pct(policy.reservePercent)} is kept for you, so autonomy `\n + `stops at ${pct(reserveCeiling)}.`,\n ...resetOf(bindingRow.window),\n });\n }\n reopensAt = bindingRow.window.resetsAt;\n }\n\n // Model-scoped windows are facts worth showing, never blockers.\n for (const row of classed) {\n if (row.cls === 'model' && isSpent(row.window)) {\n details.push({\n kind: 'model-window',\n text: `The ${windowName(capacity.engine, row.window, row.cls)} is spent — it limits that model only, not the account.`,\n });\n }\n }\n\n const eligible = policy.enabled && !capacity.signedOut && !exhausted && !unknownUsage && !overUsd\n && room !== null && room > 0;\n if (eligible && bindingRow) {\n const name = windowName(capacity.engine, bindingRow.window, bindingRow.cls);\n const kept = bindingWindow === 'weekly' || sessionLimitIsReserve\n ? policy.reservePercent > 0 ? ` (${pct(policy.reservePercent)} kept for you)` : ''\n : sessionLimit < 100 ? ` (autonomy stops at ${pct(sessionLimit)} to protect your live session)` : '';\n details.unshift({ kind: 'headroom', text: `${pct(room!)} of the ${name} is left for autonomy${kept}.` });\n }\n\n return {\n headroom: {\n seatId: capacity.seatId,\n sessionUsedPercent: sessionUsed,\n weeklyUsedPercent: weeklyUsed,\n bindingWindow,\n autonomyHeadroomPercent: room === null ? null : Math.max(0, Math.round(room)),\n resetAt: bindingRow?.window.resetsAt ?? null,\n eligibleForAutonomy: eligible,\n reasons: reasonSentences(details),\n },\n // A seat that is merely switched off, signed out, or unknown has no\n // known reopening — only a window reset is a date we can name.\n reopensAt: !policy.enabled || capacity.signedOut || unknownUsage || overUsd ? null : reopensAt,\n exhausted,\n unknownUsage,\n spentReasons: reasonSentences(spentDetails),\n details,\n spentDetails,\n };\n}\n\n/** The contract's `SeatHeadroom` for one seat. */\nexport function computeHeadroom(capacity: SeatCapacity, policy: SeatBudgetPolicy, opts: AssessOptions): SeatHeadroom {\n return assessSeat(capacity, policy, opts).headroom;\n}\n","/**\n * routes/verse/command/command-model.ts — the pure numbers behind Command's\n * KPI row, \"Since you looked\" strip, seat burn-downs and the Needs-you card\n * (unit C7; SPEC-310B §6, SPEC-310C §5).\n *\n * Honesty (docs/VERSE-TELEMETRY-V2.md): a KPI whose source did not answer\n * is \"—\", and a delta is computed only when BOTH windows are fully known — a\n * week with one unreadable day has no honest \"vs prior 7d\". Framework-free;\n * tested directly.\n */\nimport type { FleetLiveSnapshotV1, FleetLiveRun } from '../../../../core/fleet/fleet-types.js';\nimport type { LeaderStateV1 } from '../../../../core/vision/leader-types.js';\nimport type { LearningStateV1 } from '../../../../core/learn/harness-types.js';\nimport type { NeedsYouItem, NeedsYouSeverity, VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport type { FleetHistoryDay, FleetHistoryResponse } from '../../../../core/verse/fleet-history-types.js';\nimport type { BudgetView } from '../../../../core/routing/policy.js';\nimport type { CapacityHistoryResponse } from '../../../../core/routing/capacity-history-types.js';\nimport type { SeatReason, SeatReasonKind } from '../../../../core/routing/types.js';\nimport type { VerseSeat } from '../../../../core/verse/types.js';\nimport { classifyWindow } from '../../../../core/routing/headroom.js';\nimport { describeResetAt } from '../../../../core/verse/seat-readiness.js';\nimport type { EffectivePolicy } from '../../../../core/authority/types.js';\nimport type { StatTileDelta } from '../../../components/charts/StatTile.js';\nimport { asSentence, localTimes, parseLegacyReason } from '../fleet/why-seat-model.js';\nimport { usedPercentText } from '../percent-text.js';\n\nconst DAY = 86_400_000;\nconst HOUR = 3_600_000;\n\n// ---------------------------------------------------------------------------\n// Windows over the daily history\n// ---------------------------------------------------------------------------\n\n/** Sum of `pick` over days [end-len, end); null if any day in the window is unknown or missing. */\nexport function windowSum(days: readonly FleetHistoryDay[], pick: (d: FleetHistoryDay) => number | null, len: number, endOffset = 0): number | null {\n const end = days.length - endOffset;\n const start = end - len;\n if (start < 0 || len <= 0) return null;\n let total = 0;\n for (let i = start; i < end; i++) {\n const v = pick(days[i]!);\n if (v === null || !Number.isFinite(v)) return null;\n total += v;\n }\n return total;\n}\n\n/** The last `len` values of `pick`, oldest first (nulls kept — the sparkline breaks there). */\nexport function lastValues(days: readonly FleetHistoryDay[], pick: (d: FleetHistoryDay) => number | null, len: number): (number | null)[] {\n return days.slice(Math.max(0, days.length - len)).map(pick);\n}\n\nfunction mean(values: readonly (number | null)[]): number | null {\n const known = values.filter((v): v is number => v !== null && Number.isFinite(v));\n return known.length ? known.reduce((a, b) => a + b, 0) / known.length : null;\n}\n\n// ---------------------------------------------------------------------------\n// KPI row\n// ---------------------------------------------------------------------------\n\nexport interface Kpi {\n id: 'merged' | 'green' | 'cycle' | 'spend' | 'lift';\n label: string;\n /** Display string; \"—\" when unknown. */\n value: string;\n delta: StatTileDelta | null;\n trend: (number | null)[] | undefined;\n trendLabel: string;\n caption: string;\n}\n\nexport interface KpiInputs {\n fleet: FleetLiveSnapshotV1 | null;\n history: FleetHistoryResponse | null;\n learning: LearningStateV1 | null;\n policy: EffectivePolicy | null;\n /**\n * The live budget view, for subscription usage as PERCENT of each paid\n * seat's binding window. Optional so a caller without it still renders the\n * metered figure honestly; the caption then points at the seat burn-downs.\n */\n budget?: BudgetView | null;\n}\n\n/**\n * The per-token (metered API) part of a day's spend, when the server splits\n * it out. WHY not `estCostUsd`: that field prices EVERY run's tokens from a\n * static table — Claude/Codex/Grok subscription CLI runs included — so\n * showing it as \"spend vs the metered cap\" reported subscription work as a\n * budget breach (review 3.10 c10; the default grant's cap is $0/day).\n * Subscriptions are not billed per token: their cost is window usage, shown\n * as percent. fleet-history reports `meteredCostUsd` per day (per-token API\n * engines only — core/verse/fleet-history.ts `runBilling`); a server that\n * predates it leaves the figure unknown — \"—\", never the mixed estimate.\n */\nexport function meteredCost(d: FleetHistoryDay): number | null {\n const v = (d as FleetHistoryDay & { meteredCostUsd?: number | null }).meteredCostUsd;\n return typeof v === 'number' && Number.isFinite(v) && v >= 0 ? v : null;\n}\n\n/** \"Claude 54% · Grok 31% of window used\" — paid seats' binding-window usage, never dollars. */\nexport function subscriptionUsage(view: BudgetView | null | undefined): string | null {\n if (!view) return null;\n const info = new Map(view.seatInfo.map((s) => [s.seatId, s]));\n const parts: string[] = [];\n for (const h of view.headroom) {\n const seat = info.get(h.seatId);\n if (!seat || seat.free) continue;\n const used = h.bindingWindow === 'session' ? h.sessionUsedPercent : h.bindingWindow === 'weekly' ? h.weeklyUsedPercent : null;\n parts.push(`${seat.label} ${used === null || !Number.isFinite(used) ? '—' : usedPercentText(used)}`);\n }\n return parts.length ? `${parts.join(' · ')} of window used` : null;\n}\n\nconst signedInt = (v: number) => (v > 0 ? `+${v}` : String(v));\nconst signedPts = (v: number) => `${v > 0 ? '+' : ''}${v.toFixed(1)}`;\nconst signedUsd = (v: number) => `${v > 0 ? '+' : v < 0 ? '−' : ''}$${Math.abs(v).toFixed(2)}`;\n\n/** \"2h 14m\", \"38m\", \"3d 2h\". */\nexport function formatSpan(ms: number | null): string {\n if (ms === null || !Number.isFinite(ms) || ms < 0) return '—';\n const m = Math.round(ms / 60_000);\n if (m < 60) return `${m}m`;\n const h = Math.floor(m / 60);\n if (h < 48) return m % 60 ? `${h}h ${m % 60}m` : `${h}h`;\n const d = Math.floor(h / 24);\n return h % 24 ? `${d}d ${h % 24}h` : `${d}d`;\n}\n\n/** Mean daily post-merge green % across repos, per day (oldest first, 14 days). */\nexport function greenTrend(fleet: FleetLiveSnapshotV1 | null): (number | null)[] {\n if (!fleet || fleet.repos.length === 0) return [];\n const len = Math.max(...fleet.repos.map((r) => r.greenTrend.length));\n return Array.from({ length: len }, (_, i) => mean(fleet.repos.map((r) => r.greenTrend[i - (len - r.greenTrend.length)] ?? null)));\n}\n\nexport function buildKpis({ fleet, history, learning, policy, budget }: KpiInputs): Kpi[] {\n const days = history?.days ?? [];\n const merges = (d: FleetHistoryDay) => d.merges.realized;\n const spend = meteredCost;\n\n // Merged · 7d — the live summary when the daemon answers, else the history window.\n const merged7 = fleet?.summary.merged7d ?? windowSum(days, merges, 7);\n const mergedPrior = windowSum(days, merges, 7, 7);\n const mergedNow = windowSum(days, merges, 7);\n const mergedDelta = mergedNow !== null && mergedPrior !== null ? mergedNow - mergedPrior : null;\n\n // Post-merge green — the 7-day figure plus the 14-day repo trend.\n const green = fleet?.summary.postMergeGreenPct7d ?? null;\n const gTrend = greenTrend(fleet);\n const gNow = gTrend.length >= 14 ? mean(gTrend.slice(-7)) : null;\n const gPrior = gTrend.length >= 14 ? mean(gTrend.slice(-14, -7)) : null;\n const greenDelta = gNow !== null && gPrior !== null ? gNow - gPrior : null;\n\n // Metered spend vs cap — per-token API spend ONLY (see meteredCost);\n // subscriptions go in the caption as percent of their window.\n const spend7 = windowSum(days, spend, 7);\n const spendPrior = windowSum(days, spend, 7, 7);\n const capPerDay = policy ? policy.spend.meteredUsdPerDay : null;\n const spendValue = spend7 === null ? '—' : `$${spend7.toFixed(2)}${capPerDay !== null ? ` / $${(capPerDay * 7).toFixed(0)}` : ''}`;\n const meteredKnown = days.some((d) => meteredCost(d) !== null);\n const capWords = capPerDay === null ? null : capPerDay === 0 ? 'metered APIs off ($0 cap)' : `cap $${capPerDay}/day`;\n const subs = subscriptionUsage(budget);\n const spendCaption = [\n capWords,\n meteredKnown ? null : 'metered split not reported yet',\n subs ? `subscriptions: ${subs}` : 'subscriptions are window usage, not dollars — see seat capacity',\n ]\n .filter(Boolean)\n .join(' · ');\n\n // Lift — the active harness's own experiment (null = baseline in force).\n const active = learning?.active ?? null;\n const activeExp = active?.experimentId ? learning?.experiments.find((e) => e.id === active.experimentId) ?? null : null;\n const lift = activeExp?.lift ?? null;\n\n return [\n {\n id: 'merged',\n label: 'Merged · 7d',\n value: merged7 === null ? '—' : String(merged7),\n delta: mergedDelta === null ? null : { value: mergedDelta, unit: Math.abs(mergedDelta) === 1 ? 'merge' : 'merges', versus: 'vs prior 7d', goodWhenPositive: true, format: signedInt },\n trend: days.length ? lastValues(days, merges, 14) : undefined,\n trendLabel: 'Merges per day, last 14 days',\n caption: fleet?.summary.mergedToday != null ? `${fleet.summary.mergedToday} today` : 'fleet merges on default branches',\n },\n {\n id: 'green',\n label: 'Post-merge green',\n value: green === null ? '—' : `${Math.round(green)}%`,\n delta: greenDelta === null ? null : { value: greenDelta, unit: 'pts', versus: 'vs prior 7d', goodWhenPositive: true, format: signedPts },\n trend: gTrend.length ? gTrend : undefined,\n trendLabel: 'Post-merge green percent per day',\n caption: green === null ? 'no completed post-merge watch yet' : 'CI + suite 2 h after each merge',\n },\n {\n id: 'cycle',\n label: 'Cycle time',\n value: formatSpan(fleet?.summary.cycleTimeP50Ms7d ?? null),\n delta: null,\n trend: undefined,\n trendLabel: 'Cycle time',\n caption: 'median, proposal → merge, 7d',\n },\n {\n id: 'spend',\n label: 'Metered spend · 7d',\n value: spendValue,\n delta: spend7 !== null && spendPrior !== null ? { value: spend7 - spendPrior, versus: 'vs prior 7d', goodWhenPositive: false, format: signedUsd } : null,\n trend: meteredKnown ? lastValues(days, spend, 14) : undefined,\n trendLabel: 'Metered (per-token API) spend per day',\n caption: spendCaption,\n },\n {\n id: 'lift',\n label: 'Lift',\n value: lift ? `${signedPts(lift.mean)} pts` : '—',\n delta: null,\n trend: undefined,\n trendLabel: 'Harness lift',\n caption: active ? `harness ${active.id} vs baseline${lift ? ` (95% ${signedPts(lift.ciLow)} to ${signedPts(lift.ciHigh)})` : ''}` : 'no harness adopted — defaults in force',\n },\n ];\n}\n\n// ---------------------------------------------------------------------------\n// Since you looked\n// ---------------------------------------------------------------------------\n\nexport interface SinceItem {\n id: string;\n text: string;\n tone: 'success' | 'danger' | 'warning' | 'neutral' | 'info';\n}\n\nexport interface SinceInputs {\n /** ISO of the previous visit; null = first visit (nothing is \"new\"). */\n lastLookedAt: string | null;\n fleet: FleetLiveSnapshotV1 | null;\n leader: LeaderStateV1 | null;\n activity: VerseActivityResponse | null;\n}\n\nconst after = (iso: string | null, t: number) => iso !== null && Date.parse(iso) > t;\n\n/** What changed since the operator last opened Command, newest kinds first. */\nexport function sinceYouLooked({ lastLookedAt, fleet, leader, activity }: SinceInputs): SinceItem[] {\n if (!lastLookedAt) return [];\n const t = Date.parse(lastLookedAt);\n if (!Number.isFinite(t)) return [];\n const out: SinceItem[] = [];\n const ended = (fleet?.runs ?? []).filter((r) => after(r.endedAt, t));\n const count = (o: FleetLiveRun['outcome']) => ended.filter((r) => r.outcome === o).length;\n const merged = count('merged');\n const reverted = count('reverted');\n const failed = count('failed') + count('refused');\n if (merged) out.push({ id: 'merged', text: `${merged} merged`, tone: 'success' });\n if (reverted) out.push({ id: 'reverted', text: `${reverted} reverted`, tone: 'danger' });\n if (failed) out.push({ id: 'failed', text: `${failed} refused or failed`, tone: 'warning' });\n const memos = (leader?.timeline ?? []).filter((m) => Date.parse(m.at) > t && m.status === 'ok').length;\n if (memos) out.push({ id: 'memos', text: `${memos} new memo${memos === 1 ? '' : 's'}`, tone: 'info' });\n const fresh = (activity?.needsYou ?? []).filter((i) => Date.parse(i.since) > t).length;\n if (fresh) out.push({ id: 'needs', text: `${fresh} new for you`, tone: 'warning' });\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// Needs you (Command card)\n// ---------------------------------------------------------------------------\n\nconst SEVERITY_RANK: Record<NeedsYouSeverity, number> = { high: 0, warn: 1, info: 2 };\n\n/** Most severe first, then newest. Pure — the drawer (C1) owns the full list. */\nexport function rankNeedsYou(items: readonly NeedsYouItem[]): NeedsYouItem[] {\n return [...items].sort((a, b) => SEVERITY_RANK[a.severity] - SEVERITY_RANK[b.severity] || Date.parse(b.since) - Date.parse(a.since));\n}\n\n/**\n * Seat id → the label every other surface names that seat by (\"Claude Max\",\n * never \"claude-a\"): the live roster when the cache holds it, else the\n * budget route's seat info (polled on Command, so present when the roster is\n * not). Both carry the same `VerseSeat.label` for the same id.\n */\nexport function seatNames(\n seats: readonly Pick<VerseSeat, 'id' | 'label'>[] | null | undefined,\n view: Pick<BudgetView, 'seatInfo'> | null | undefined,\n): Map<string, string> {\n const names = new Map<string, string>();\n const put = (id: unknown, label: unknown) => {\n if (typeof id === 'string' && typeof label === 'string' && label.trim().length > 0) names.set(id, label.trim());\n };\n for (const s of view?.seatInfo ?? []) put(s.seatId, s.label);\n for (const s of seats ?? []) put(s.id, s.label);\n return names;\n}\n\n/** Sources that did not answer — the card must not say \"All clear\" while any is listed. */\nexport function silentSources(activity: VerseActivityResponse | null): string[] {\n if (!activity) return [];\n return Object.entries(activity.sources).filter(([, state]) => state !== 'ok').map(([source]) => source);\n}\n\n// ---------------------------------------------------------------------------\n// Seat burn-downs\n// ---------------------------------------------------------------------------\n\nexport type SeatWindow = 'session' | 'weekly';\n\nexport interface SeatReading {\n t: number;\n /** Percent of the window used, 0–100. */\n used: number;\n}\n\n/**\n * Readings are kept per seat WINDOW, not per seat: the binding window can flip\n * between the 5-hour and the weekly window from one poll to the next, and a\n * line that mixed the two would draw a jump that never happened. Seat ids may\n * contain `:` and `/`, never `#` (the server keys its history the same way).\n */\nexport function seriesKey(seatId: string, window: SeatWindow): string {\n return `${seatId}#${window}`;\n}\n\n/**\n * The readings this page has seen since Verse opened, per seat window. The\n * budget route serves ONE reading per seat, so on their own these start the\n * burn-down empty on every load; `mergeSeatHistory` adds the server's recorded\n * history (GET /api/verse/budget/history — core/routing/capacity-history.ts,\n * written by the capacity publishers), so a reload keeps the whole window.\n * Memory only, bounded; never a guessed history.\n *\n * The bound counts CHANGES, not polls: a flat run keeps only its two ends\n * (see `recordReading`). At one poll per 30 s a plain 240-reading ring held\n * two hours — a sliver of a 7-day window — while window percent moves in\n * whole points a few times an hour.\n */\nexport const SEAT_READINGS_MAX = 240;\n/** A merged line (recorded history + this page's readings), flat runs collapsed: a week of changes fits. */\nexport const SEAT_HISTORY_MAX = 2000;\n/** A drop this large between consecutive readings is a window reset: the line starts again. */\nconst RESET_DROP = 20;\n\nfunction isFlatEnd(line: readonly SeatReading[], used: number): boolean {\n const n = line.length;\n return n >= 2 && line[n - 1]!.used === used && line[n - 2]!.used === used;\n}\n\nexport function recordReading(history: Readonly<Record<string, SeatReading[]>>, view: BudgetView | null): Record<string, SeatReading[]> {\n if (!view) return { ...history };\n const t = Date.parse(view.sampledAt);\n if (!Number.isFinite(t)) return { ...history };\n const next: Record<string, SeatReading[]> = { ...history };\n for (const h of view.headroom) {\n const windows: [SeatWindow, number | null][] = [['session', h.sessionUsedPercent], ['weekly', h.weeklyUsedPercent]];\n for (const [window, used] of windows) {\n if (used === null || !Number.isFinite(used)) continue;\n const key = seriesKey(h.seatId, window);\n const prev = next[key] ?? [];\n if (prev.length && prev[prev.length - 1]!.t >= t) continue;\n // A reset (used dropped sharply) starts a new window — drop the old one.\n const fresh = prev.length && used + RESET_DROP < prev[prev.length - 1]!.used ? [] : prev;\n // A flat run keeps only its first and latest reading: the line through\n // them is identical, and the ring then spans hours or days, not minutes.\n next[key] = [...(isFlatEnd(fresh, used) ? fresh.slice(0, -1) : fresh), { t, used }].slice(-SEAT_READINGS_MAX);\n }\n }\n return next;\n}\n\nexport interface MergedSeatHistory {\n /** One line per seat window, oldest first, starting after its last reset. */\n readings: Record<string, SeatReading[]>;\n /** Series keys the server's recorded history contributed readings to. */\n recorded: ReadonlySet<string>;\n}\n\n/**\n * The server's recorded history merged with this page's live readings, per\n * seat window: oldest first, one reading per instant, cut after the last\n * reset drop and with flat runs collapsed — the same rules `recordReading`\n * applies, so the line reads the same either way. `server` is untrusted wire\n * data: malformed series and points are skipped.\n *\n * ONE CLOCK PER STRETCH OF LINE (review 3.10.1). The two sources stamp the\n * same observation differently: a recorded row carries the provider\n * reading's `observedAt` (capacity-history.ts), a live reading the budget\n * route's `sampledAt` — when it was ASKED, which is later, and the budget\n * wire carries no `observedAt` to do better. Interleaved, the same value\n * lands at two instants and an older value can sort after a newer one: a\n * poll just after a reset still serving 85% drew 85 → 3 → 85 → 3. So the\n * recorded history is authoritative for every instant it covers — up to the\n * moment the server answered (`generatedAt`), or its newest row when that is\n * later or `generatedAt` is unreadable — and live readings only extend a\n * recorded line past that point. The server records the snapshot behind\n * each budget read (capacity-history-api.ts, throttled to 15 s), so a live\n * reading hidden this way is recorded at its own `observedAt` by the next\n * history read, and until then the next live poll carries the same value.\n * A live reading after `generatedAt` came from a collector that had already\n * seen every recorded observation, so the extension never runs backwards.\n * Both instants are the Verse server's own clock. A window with no recorded\n * series keeps every live reading.\n */\nexport function mergeSeatHistory(live: Readonly<Record<string, SeatReading[]>>, server: CapacityHistoryResponse | null): MergedSeatHistory {\n const generatedAt = typeof server?.generatedAt === 'string' ? Date.parse(server.generatedAt) : Number.NaN;\n const persisted = new Map<string, SeatReading[]>();\n for (const series of Array.isArray(server?.series) ? server!.series : []) {\n if (!series || typeof series.seatId !== 'string' || (series.window !== 'session' && series.window !== 'weekly') || !Array.isArray(series.points)) continue;\n const points: SeatReading[] = [];\n for (const p of series.points) {\n if (!Array.isArray(p)) continue;\n const [t, used] = p as unknown[];\n if (typeof t === 'number' && Number.isFinite(t) && typeof used === 'number' && Number.isFinite(used) && used >= 0 && used <= 100) points.push({ t, used });\n }\n if (points.length === 0) continue;\n const key = seriesKey(series.seatId, series.window);\n persisted.set(key, [...(persisted.get(key) ?? []), ...points]);\n }\n const readings: Record<string, SeatReading[]> = {};\n const recorded = new Set<string>();\n for (const key of new Set([...Object.keys(live), ...persisted.keys()])) {\n const fromServer = persisted.get(key) ?? [];\n let fromPage = live[key] ?? [];\n if (fromServer.length > 0) {\n recorded.add(key);\n const newestRecorded = Math.max(...fromServer.map((r) => r.t));\n const coveredTo = Number.isFinite(generatedAt) ? Math.max(generatedAt, newestRecorded) : newestRecorded;\n fromPage = fromPage.filter((r) => r.t > coveredTo);\n }\n // Recorded rows can repeat an instant (two series under one key); the\n // last one read stands. Live readings are strictly later than all of them.\n const byT = new Map<number, SeatReading>();\n for (const r of fromServer) byT.set(r.t, r);\n for (const r of fromPage) byT.set(r.t, r);\n const sorted = [...byT.values()].sort((a, b) => a.t - b.t);\n let start = 0;\n for (let i = 1; i < sorted.length; i++) if (sorted[i]!.used + RESET_DROP < sorted[i - 1]!.used) start = i;\n const line: SeatReading[] = [];\n for (const r of sorted.slice(start)) {\n if (isFlatEnd(line, r.used)) line.pop();\n line.push(r);\n }\n readings[key] = line.slice(-SEAT_HISTORY_MAX);\n }\n return { readings, recorded };\n}\n\nexport interface SeatBurn {\n seatId: string;\n label: string;\n engine: 'claude' | 'codex' | 'grok' | 'local';\n window: 'session' | 'weekly' | null;\n /** Remaining percent readings (100 − used), inside [start, resetAt] when the reset is known. */\n points: { t: number; remaining: number | null }[];\n /** `resetAt` minus the window's length; null exactly when `resetAt` is. */\n start: number | null;\n resetAt: number | null;\n /**\n * Where `resetAt` came from: the budget route's machine instant\n * ('provider'), the provider's own reset words read on the clock they name\n * ('words' — see `resetInstantFromWords`), or nowhere (null).\n */\n resetFrom: 'provider' | 'words' | null;\n /**\n * The provider's own reset wording for the binding window, verbatim\n * (\"Sep 25 at 7pm (America/New_York)\"), when the seat roster carries it.\n * Claude publishes ONLY this — never a machine instant. The card always\n * shows the words; when they name a clock time inside this window they\n * also place the reset (`resetFrom: 'words'`), otherwise the card draws the\n * readings with no reset point or projection.\n */\n resetText: string | null;\n reservePercent: number;\n /**\n * The line autonomy stops at IN THE WINDOW THIS CHART DRAWS, as remaining\n * percent (see `bindingLine`); null when that window has no limit.\n */\n line: { value: number; label: string } | null;\n enabled: boolean;\n free: boolean;\n eligible: boolean;\n /**\n * The router's first reason for this seat in words (`seatReasonText`):\n * complete sentences, local times, never the log form's \" (resets <ISO>).\"\n * clause. Null when the route gave none.\n */\n reason: string | null;\n /**\n * True when the server's recorded history contributed to this window's\n * line; false when every point is one this page saw since Verse opened.\n * Picks the card's note when the line starts late in the window.\n */\n recorded: boolean;\n}\n\n/** Length of each provider window, for the chart domain (reset − length → reset). */\nexport const WINDOW_MS = { session: 5 * HOUR, weekly: 7 * DAY } as const;\n\n/**\n * The stop line for the binding window, mirroring core/routing/headroom.ts\n * exactly (review 3.10 d2). The reserve protects the LONG (weekly) window;\n * the 5-hour window is capped by `maxSessionWindowPercent` — except when the\n * seat has no weekly window at all, where the short one carries both limits\n * and the tighter one wins. Drawing the weekly reserve on a 5-hour chart put\n * Mason's balanced cutoff at 60% used instead of 70% and made the verdict say\n * \"autonomy has stopped\" while the server still had the seat eligible.\n *\n * `weeklyUsedPercent === null` stands in for \"no weekly window\": a weekly\n * window whose reading is unknown makes the seat ineligible server-side\n * anyway (unknown usage is never headroom), and the card shows that reason.\n */\nexport function bindingLine(\n h: { bindingWindow: 'session' | 'weekly' | null; weeklyUsedPercent: number | null },\n policy: { reservePercent: number; maxSessionWindowPercent?: number } | undefined,\n): { value: number; label: string } | null {\n if (!policy || h.bindingWindow === null) return null;\n const reserveCeiling = 100 - policy.reservePercent;\n const sessionCeiling = policy.maxSessionWindowPercent ?? 100;\n let ceiling: number;\n let label: string;\n if (h.bindingWindow === 'weekly') {\n ceiling = reserveCeiling;\n label = 'Reserved for you';\n } else if (h.weeklyUsedPercent === null && reserveCeiling < sessionCeiling) {\n ceiling = reserveCeiling;\n label = 'Reserved for you';\n } else {\n ceiling = sessionCeiling;\n label = '5-hour ceiling';\n }\n const value = 100 - ceiling;\n return value > 0 ? { value, label } : null;\n}\n\n/**\n * Axis/verdict time format per window (review 3.10 c17). A weekly window\n * starts exactly seven days before it resets, so weekday + time alone printed\n * \"Sat 10:27 AM … Resets Sat 10:27 AM\"; the weekly form carries the date.\n * It carries ONLY the date (3.10.1): inside one week the weekday repeats what\n * the date says, and at a quarter-width card \"Fri, Sep 18 at 11:46 PM\" +\n * \"Resets Fri, Sep 25 at 11:46 PM\" were wider than the plot and collided.\n */\nexport function burnTimeFormat(window: 'session' | 'weekly' | null): (ms: number) => string {\n const opts: Intl.DateTimeFormatOptions =\n window === 'session'\n ? { weekday: 'short', hour: 'numeric', minute: '2-digit' }\n : { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' };\n return (ms) => {\n const d = new Date(ms);\n return Number.isNaN(d.getTime()) ? '' : d.toLocaleString('en-US', opts);\n };\n}\n\n/**\n * The provider's reset wording for the seat window that plays `binding`'s\n * role. WHY the seat roster and not the budget route: `SeatHeadroom` (the\n * frozen budget wire shape) carries only a machine `resetAt`, which is\n * structurally null for Claude — the provider's sentence lives on the seat's\n * capacity windows. The window is picked with the SAME classifier the server\n * used to choose the binding window (core/routing/headroom.ts), so the words\n * belong to the window the chart draws, not to a per-model window beside it.\n */\nexport function bindingResetText(\n seat: Pick<VerseSeat, 'capacity'> | undefined,\n engine: SeatBurn['engine'],\n binding: 'session' | 'weekly' | null,\n nowMs: number,\n): string | null {\n if (!seat?.capacity || binding === null || engine === 'local') return null;\n for (const w of seat.capacity.windows) {\n const text = typeof w.resetDescription === 'string' ? w.resetDescription.trim() : '';\n if (text.length === 0) continue;\n if (classifyWindow(engine, { id: w.id, usedPercent: w.usedPercent, resetsAt: w.resetsAt, resetDescription: w.resetDescription, limitReached: w.limitReached }, nowMs) === binding) return text;\n }\n return null;\n}\n\n/**\n * \"resets Sep 25 at 7pm (America/New_York)\" from the provider's words. The\n * collector strips the leading \"resets\" (claude-account-usage.ts) but other\n * paths keep it; either way the sentence itself is shown verbatim.\n */\nexport function resetWords(text: string): string {\n return `resets ${text.replace(/^resets\\s+/i, '')}`;\n}\n\nconst MONTHS: readonly string[] = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];\n\n/**\n * The collector's own reset grammar (core/resources/claude-account-usage.ts\n * `RESET`), with the leading \"resets\" optional because other paths keep it.\n * Anything outside it — a changed native format, free prose — stays words.\n */\nconst RESET_WORDS_RE = /^(?: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;\n\ninterface WallClock { y: number; mo: number; d: number; h: number; mi: number }\n\nfunction wallClock(ms: number, fmt: Intl.DateTimeFormat): WallClock | null {\n const parts = fmt.formatToParts(new Date(ms));\n const n = (type: Intl.DateTimeFormatPartTypes) => Number(parts.find((p) => p.type === type)?.value);\n const c = { y: n('year'), mo: n('month') - 1, d: n('day'), h: n('hour') % 24, mi: n('minute') };\n return Object.values(c).every(Number.isFinite) ? c : null;\n}\n\nconst wallAsUtc = (c: WallClock) => Date.UTC(c.y, c.mo, c.d, c.h, c.mi);\n\n/**\n * The instant whose wall clock in `fmt`'s zone reads `want`: start from the\n * wall time as if it were UTC and correct by the zone's offset until the\n * clock agrees. Null when it never does — a time skipped by a DST jump.\n */\nfunction instantAt(want: WallClock, fmt: Intl.DateTimeFormat): number | null {\n const target = wallAsUtc(want);\n let at = target;\n for (let i = 0; i < 3; i++) {\n const seen = wallClock(at, fmt);\n if (!seen) return null;\n const drift = target - wallAsUtc(seen);\n if (drift === 0) return at;\n at += drift;\n }\n return null;\n}\n\n/**\n * The instant named by the provider's reset words — \"Sep 25 at 6:59pm\n * (America/New_York)\" or \"1:40am (America/New_York)\" — or null when the words\n * are not in the collector's grammar or name an unknown zone.\n *\n * WHY this is not \"synthesizing a countdown from a description\"\n * (core/verse/types.ts): the words ARE an instant — a wall-clock minute in a\n * named IANA zone — so reading them on that zone's clock adds nothing the\n * provider did not say. The only thing the words leave out is the year (or,\n * for \"1:40am\", the day), and the candidate nearest `nowMs` is taken; the\n * caller still refuses an instant outside the window's own span\n * (`seatBurns`), so a misread can never stretch or shift the chart by more\n * than the window it draws. Without this, Claude — the seat that matters\n * most — was the one card with no window, no pace line and no projection.\n */\nexport function resetInstantFromWords(text: string, nowMs: number): number | null {\n const m = RESET_WORDS_RE.exec(text.trim());\n if (!m || !Number.isFinite(nowMs)) return null;\n const [, month, day, hour, minute, meridiem, zone] = m;\n let fmt: Intl.DateTimeFormat;\n try {\n fmt = new Intl.DateTimeFormat('en-US', { timeZone: zone, hourCycle: 'h23', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' });\n } catch {\n return null; // RangeError: not a zone this runtime knows.\n }\n const today = wallClock(nowMs, fmt);\n if (!today) return null;\n const h = (Number(hour) % 12) + (meridiem!.toLowerCase() === 'pm' ? 12 : 0);\n const mi = minute === undefined ? 0 : Number(minute);\n const candidates: WallClock[] = [];\n if (month !== undefined) {\n const mo = MONTHS.indexOf(month.toLowerCase());\n const d = Number(day);\n if (mo < 0) return null;\n for (const y of [today.y - 1, today.y, today.y + 1]) {\n // Feb 30 would roll into March — refuse it rather than move the reset.\n if (new Date(Date.UTC(y, mo, d)).getUTCDate() === d) candidates.push({ y, mo, d, h, mi });\n }\n } else {\n for (const k of [-1, 0, 1]) {\n const date = new Date(Date.UTC(today.y, today.mo, today.d + k));\n candidates.push({ y: date.getUTCFullYear(), mo: date.getUTCMonth(), d: date.getUTCDate(), h, mi });\n }\n }\n let best: number | null = null;\n for (const c of candidates) {\n const at = instantAt(c, fmt);\n if (at !== null && (best === null || Math.abs(at - nowMs) < Math.abs(best - nowMs))) best = at;\n }\n return best;\n}\n\n/**\n * How far a words-derived reset may sit in the past (a reading taken just\n * before the rollover) or beyond one window ahead (the provider rounds its\n * words to the minute or the hour).\n */\nconst WORDS_RESET_SLACK_MS = 15 * 60_000;\n\n/**\n * The binding window's reset instant: the budget route's machine instant when\n * there is one, else the provider's words read on their own clock — but only\n * when that instant can close the window the current reading sits in (no\n * more than one window ahead, no more than a few minutes past). Words that\n * fail either test stay words, and the card says the reset is not placed.\n */\n/** Earliest instant accepted as a real reset (2000-01-01T00:00:00Z). */\nconst PLAUSIBLE_RESET_FLOOR_MS = Date.UTC(2000, 0, 1);\n\nexport function bindingReset(\n machine: string | null,\n resetText: string | null,\n windowMs: number | null,\n nowMs: number,\n): { at: number; from: 'provider' | 'words' } | null {\n const at = machine ? Date.parse(machine) : NaN;\n // A placeholder instant (epoch 0 or anything before 2000) is not a reset —\n // fall through to the provider's words, as if no instant were sent.\n if (Number.isFinite(at) && at >= PLAUSIBLE_RESET_FLOOR_MS) return { at, from: 'provider' };\n if (resetText === null || windowMs === null) return null;\n const words = resetInstantFromWords(resetText, nowMs);\n if (words === null || words < nowMs - WORDS_RESET_SLACK_MS || words > nowMs + windowMs + WORDS_RESET_SLACK_MS) return null;\n return { at: words, from: 'words' };\n}\n\n// ---------------------------------------------------------------------------\n// Seat reasons, in words (3.10.1)\n// ---------------------------------------------------------------------------\n\n/**\n * The budget route's reasons as data. `SeatHeadroom.reasons` carries each\n * one in the router's LOG form — \"… so autonomy stops at 92% (resets\n * 2026-09-26T03:46:56.000Z).\" (core/routing/seat-reasons.ts\n * `reasonSentence`) — so the reset clause is split back off with the Fleet\n * surface's own parser: an instant → `resetsAt`, Claude's words →\n * `resetDescription`. Non-strings and blanks are skipped (wire data).\n */\nexport function seatReasons(reasons: readonly unknown[] | null | undefined): SeatReason[] {\n if (!Array.isArray(reasons)) return [];\n return reasons.filter((r): r is string => typeof r === 'string' && r.trim().length > 0).map(parseLegacyReason);\n}\n\n/** Two resets this close are the same one (the router and the chart read the same window). */\nconst SAME_RESET_MS = 60_000;\n\n/**\n * Reasons whose reset is, by construction, the BINDING window's: headroom.ts\n * attaches `resetOf(bindingRow.window)` to exactly these. A `spent` reason\n * can name the other window (a spent 5-hour window beside a weekly one that\n * is even further past its reserve), so it is never taken for the chart's.\n */\nconst BINDING_RESET_KINDS: ReadonlySet<SeatReasonKind> = new Set<SeatReasonKind>(['reserve', 'session-ceiling']);\n\n/** Claude's words without the \"resets\" some paths lead with. */\nfunction bareResetWords(text: string | null | undefined): string {\n return typeof text === 'string' ? text.trim().replace(/^resets\\s+/i, '') : '';\n}\n\n/**\n * The binding window's reset words from the router's own reasons — the\n * fallback when the roster (read from cache, never fetched here) has none,\n * so a card never says \"reset time not reported\" beside a reason that names\n * the reset.\n */\nexport function reasonResetText(reasons: readonly SeatReason[]): string | null {\n for (const r of reasons) {\n if (!BINDING_RESET_KINDS.has(r.kind)) continue;\n const words = bareResetWords(r.resetDescription);\n if (words) return words;\n }\n return null;\n}\n\n/**\n * When `reason` lifts, in the viewer's words — or null when the card already\n * says it: the chart's reset marker (\"Resets Sep 26, 11:46 PM\", a machine\n * instant or Claude's words placed on their clock) or the header's verbatim\n * words. A reset the card does NOT show (another window's) is kept: a machine\n * instant in the viewer's zone (`describeResetAt`, as Fleet and Accounts\n * word it), Claude's words verbatim.\n */\nfunction unshownReset(reason: SeatReason, card: { resetAt: number | null; resetText: string | null }, nowMs: number): string | null {\n const at = typeof reason.resetsAt === 'string' ? Date.parse(reason.resetsAt) : Number.NaN;\n if (Number.isFinite(at)) {\n if (card.resetAt !== null && Math.abs(at - card.resetAt) <= SAME_RESET_MS) return null;\n return describeResetAt(reason.resetsAt, nowMs);\n }\n const words = bareResetWords(reason.resetDescription);\n if (!words) return null;\n if (card.resetText !== null && bareResetWords(card.resetText).toLowerCase() === words.toLowerCase()) return null;\n return words;\n}\n\n/**\n * What a card says about why the router holds a seat back: the reason's own\n * sentence (any instant inside it in local time — Fleet's `localTimes`),\n * closed by exactly one full stop, then \"Resets ….\" only when the card does\n * not already show that reset (`unshownReset`). Never the log form: held-back\n * cards printed \"… stops at 92% (resets 2026-09-26T03:46:56.000Z).\" and, for\n * Claude, \"… (resets Sep 25 at 7pm (America/New_York)).\" verbatim.\n */\nexport function seatReasonText(reason: SeatReason | undefined, card: { resetAt: number | null; resetText: string | null }, nowMs: number): string | null {\n if (!reason) return null;\n const text = asSentence(localTimes(reason.text, nowMs));\n if (!text) return null;\n const when = unshownReset(reason, card, nowMs);\n return when ? `${text} Resets ${when}.` : text;\n}\n\n/**\n * One burn-down per seat, paid seats first (they are the ones that run out).\n * `history` is keyed by `seriesKey` (seat + window); each card draws its\n * BINDING window's line. `seats` (the live roster, optional) supplies the\n * provider's reset wording for seats that publish no machine reset time (see\n * `bindingResetText`), which also places their reset when it names a clock\n * time (`bindingReset`); without a roster, a reason held at the binding\n * window's reserve or ceiling supplies the same words (`reasonResetText`).\n * `recorded` (from `mergeSeatHistory`) names the lines the server's recorded\n * history contributed to. Each card's `reason` is the router's first reason\n * in words (`seatReasonText`).\n */\nexport function seatBurns(\n view: BudgetView | null,\n history: Readonly<Record<string, SeatReading[]>>,\n seats?: readonly VerseSeat[] | null,\n recorded?: ReadonlySet<string> | null,\n): SeatBurn[] {\n if (!view) return [];\n const info = new Map(view.seatInfo.map((s) => [s.seatId, s]));\n const roster = new Map((seats ?? []).map((s) => [s.id, s]));\n const sampled = Date.parse(view.sampledAt);\n const nowMs = Number.isFinite(sampled) ? sampled : Date.now();\n return view.headroom\n .map((h): SeatBurn => {\n const i = info.get(h.seatId);\n const engine = i?.engine ?? 'local';\n const windowMs = h.bindingWindow ? WINDOW_MS[h.bindingWindow] : null;\n const reasons = seatReasons(h.reasons);\n const resetText =\n bindingResetText(roster.get(h.seatId), engine, h.bindingWindow, nowMs) ??\n (h.bindingWindow === null || engine === 'local' ? null : reasonResetText(reasons));\n // A reset is only placed on a chart that has a window to put before it.\n const reset = windowMs === null ? null : bindingReset(h.resetAt, resetText, windowMs, nowMs);\n const start = reset && windowMs !== null ? reset.at - windowMs : null;\n const key = h.bindingWindow ? seriesKey(h.seatId, h.bindingWindow) : null;\n const readings = key ? history[key] ?? [] : [];\n return {\n seatId: h.seatId,\n label: i?.label ?? h.seatId,\n engine,\n window: h.bindingWindow,\n points: readings.filter((r) => start === null || r.t >= start).map((r) => ({ t: r.t, remaining: Math.max(0, 100 - r.used) })),\n start,\n resetAt: reset?.at ?? null,\n resetFrom: reset?.from ?? null,\n resetText,\n reservePercent: view.effective[h.seatId]?.reservePercent ?? 0,\n line: bindingLine(h, view.effective[h.seatId]),\n enabled: view.effective[h.seatId]?.enabled ?? false,\n free: i?.free ?? false,\n eligible: h.eligibleForAutonomy,\n reason: seatReasonText(reasons[0], { resetAt: reset?.at ?? null, resetText }, nowMs),\n recorded: key !== null && (recorded?.has(key) ?? false),\n };\n })\n .sort((a, b) => Number(a.free) - Number(b.free) || a.label.localeCompare(b.label));\n}\n\n/** \"Claude 40% reserved for you\" — the first enabled Claude seat's reserve, from the live budget. */\nexport function claudeReserve(view: BudgetView | null): { label: string; percent: number } | null {\n if (!view) return null;\n const seat = view.seatInfo.find((s) => s.engine === 'claude');\n if (!seat) return null;\n const policy = view.effective[seat.seatId];\n return policy ? { label: 'Claude', percent: policy.reservePercent } : null;\n}\n","/**\n * routes/verse/command/KpiRow.tsx — five StatTiles (SPEC-310B §6: merged in\n * 7 days, post-merge green %, cycle time, spend vs cap, lift), each with a\n * \"vs prior 7d\" delta when both weeks are fully known. Five across at 1440,\n * two per row at 375.\n */\nimport { StatTile } from '../../../components/charts/StatTile.js';\nimport type { Kpi } from './command-model.js';\nimport styles from './command.module.css';\n\nexport function KpiRow({ kpis }: { kpis: Kpi[] }) {\n return (\n <div className={styles.kpis} role=\"group\" aria-label=\"Key numbers\">\n {kpis.map((k) => (\n <StatTile key={k.id} label={k.label} value={k.value} delta={k.delta} trend={k.trend} trendLabel={k.trendLabel} caption={k.caption} />\n ))}\n </div>\n );\n}\n","/**\n * routes/verse/command/NeedsYouCard.tsx — Command's \"Needs you\" card (span 5\n * at 1440, FIRST at 375; SPEC-310C §5). The five most urgent items from the\n * one inbox (owner-lane PRs, class-C asks, veto windows, holds, grant\n * renewal, reconnects — R1 producers via C1's activity route), each with its\n * own actions. The full, keyboard-triaged list is the ⌘J drawer (C1); this\n * card is the glance and the one-click path.\n *\n * Honesty: when any producer did not answer, the card never says \"All\n * clear\" — it names the silent sources instead (\"fleet not answering\").\n * Every approve / reject / veto confirms first (NeedsYouAction contract),\n * then asks for the token; items render their text as plain text only.\n *\n * Rows read like the drawer's (shell/needs-you-model needsYouRowView, one\n * copy): a \"Patch · Claude run\" label over a title that ends on a whole word\n * (two lines at most, the server's text as its tooltip), \"2 files · +384 −0 ·\n * Test-and-repair loop\" for a sandboxed run, the repo's short name, the seat\n * by its label (\"Claude Max\", the id on hover — never \"claude-a\"), and \"38\n * days ago\" with the exact local time on hover.\n */\nimport { Fragment, type ReactElement } from 'react';\nimport type { NeedsYouAction, NeedsYouItem, VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { IconExternalLink } from '../../../components/primitives/icons.js';\nimport { useNow } from '../autonomy/use-ticker.js';\nimport { ENGINE_LABEL, isVerseEngine } from '../verse-model.js';\nimport { rankNeedsYou, silentSources } from './command-model.js';\nimport { anchorId, goToSection, openChat, openNeedsYou } from './nav.js';\nimport { postNeedsYouAction } from './surface-data.js';\nimport type { ActivityState } from '../shell/useActivity.js';\nimport { needsYouRowView, readableItemTitle, type NeedsYouRowView } from '../shell/needs-you-model.js';\nimport { NeedsYouRunFacts } from '../shell/NeedsYouList.js';\nimport { Card, CardNote } from './Surface.js';\nimport type { ConfirmSpec, SurfaceActions } from './actions.js';\nimport styles from './command.module.css';\n\nexport const NEEDS_YOU_CARD_LIMIT = 5;\n\n/** Relative ages (\"38 days ago\") only need to stay true to the minute. */\nconst AGE_TICK_MS = 30_000;\n\nconst SEVERITY_WORD = { high: 'Urgent', warn: 'Soon', info: 'FYI' } as const;\nconst SOURCE_WORD: Record<string, string> = {\n approvals: 'approvals',\n authority: 'authority',\n fleet: 'fleet',\n leader: 'Leader',\n chats: 'chats',\n accounts: 'accounts',\n};\n\n/** Generic confirmation for the kinds the drawer always confirms (approve / reject / veto). */\nexport function confirmFor(item: NeedsYouItem, action: NeedsYouAction): ConfirmSpec | undefined {\n if (action.confirm) return { ...action.confirm, destructive: action.destructive };\n if (action.kind === 'approve' || action.kind === 'reject' || action.kind === 'veto') {\n const verb = action.kind === 'approve' ? 'Approve' : action.kind === 'reject' ? 'Reject' : 'Veto';\n return { title: `${verb}?`, body: readableItemTitle(item).text, confirmLabel: action.label, destructive: action.destructive };\n }\n return undefined;\n}\n\nfunction targetLink(item: NeedsYouItem): { label: string; onOpen?: () => void; href?: string } | null {\n const t = item.target;\n switch (t.kind) {\n case 'url':\n return /^https:\\/\\//.test(t.url) ? { label: 'Open', href: t.url } : null;\n case 'section':\n return { label: 'Show', onOpen: () => goToSection(t.section, t.anchor) };\n case 'session':\n return { label: 'Open chat', onOpen: () => openChat(t.sessionId) };\n case 'approval':\n case 'seat':\n return { label: 'Open', onOpen: () => openNeedsYou(item.id) };\n default:\n return null;\n }\n}\n\n/** Seat id → display label (command-model `seatNames`). */\nexport type SeatNames = ReadonlyMap<string, string>;\n\n/**\n * The row's kind label with its engine named the way every other surface\n * names it (verse-model ENGINE_LABEL): the shared title reader\n * (approvals-model `readableTitle`) keeps the wire's lower case for a\n * PARTIAL run, so \"Patch · Claude run\" sat beside \"Patch · Partial claude\n * run\". Only the trailing \"<engine> run\" eyebrow is touched.\n */\nexport function cardKindLabel(label: string | null): string | null {\n if (label === null) return null;\n return label.replace(/(^|· )(Partial )?([a-z][\\w-]*) run$/, (_m, lead: string, partial: string | undefined, engine: string) => {\n const name = isVerseEngine(engine) ? ENGINE_LABEL[engine] : `${engine.charAt(0).toUpperCase()}${engine.slice(1)}`;\n return `${lead}${partial ?? ''}${name} run`;\n });\n}\n\n/** \"binshield · #81 · Claude Max · 38 days ago\" — the full repo, the seat id and the exact time ride in tooltips. */\nfunction Meta({ item, view, seatNames }: { item: NeedsYouItem; view: NeedsYouRowView; seatNames: SeatNames | undefined }) {\n const s = item.subject;\n const parts: ReactElement[] = [];\n if (view.repo) parts.push(<span key=\"repo\" className={styles.needsRepo} title={view.repoFull}>{view.repo}</span>);\n if (s.pr) parts.push(<span key=\"pr\">#{s.pr}</span>);\n if (s.seatId) {\n // Unknown to both the roster and the budget route: the id is all there is.\n const name = seatNames?.get(s.seatId) ?? s.seatId;\n parts.push(<span key=\"seat\" title={name === s.seatId ? undefined : s.seatId}>{name}</span>);\n }\n parts.push(<span key=\"age\" title={view.ageStamp}>{view.age}</span>);\n return (\n <span className={styles.needsMeta}>\n {parts.map((part, i) => (\n <Fragment key={part.key}>\n {i > 0 ? <span aria-hidden=\"true\">·</span> : null}\n {part}\n </Fragment>\n ))}\n </span>\n );\n}\n\nexport function NeedsYouRow({ item, actions, now, seatNames }: { item: NeedsYouItem; actions: SurfaceActions; now: number; seatNames?: SeatNames }) {\n const link = targetLink(item);\n const runnable = item.actions.filter((a) => a.request !== null);\n const view = needsYouRowView(item, now);\n const kind = cardKindLabel(view.kindLabel);\n return (\n <li className={styles.needsRow} data-severity={item.severity} id={anchorId(item.id)}>\n <span className={styles.sevDot} data-severity={item.severity} aria-hidden=\"true\" />\n <div className={styles.needsText}>\n {kind ? <span className={styles.needsKind}>{kind}</span> : null}\n {/* Two lines at most, ending on a whole word; the server's title is the tooltip. */}\n <span className={styles.needsTitle} title={view.fullTitle}>\n <span className=\"visually-hidden\">{SEVERITY_WORD[item.severity]}: </span>\n {view.title}\n </span>\n {view.run ? <NeedsYouRunFacts run={view.run} /> : null}\n {view.detail ? <span className={styles.needsDetail}>{view.detail}</span> : null}\n <Meta item={item} view={view} seatNames={seatNames} />\n </div>\n <div className={styles.needsActions}>\n {runnable.map((action) => (\n <Button\n key={action.kind}\n size=\"sm\"\n variant={action.destructive ? 'danger' : action.kind === 'approve' ? 'primary' : 'subtle'}\n disabled={actions.busy || actions.readOnly}\n onClick={() =>\n actions.act(() => postNeedsYouAction(action.request!.path, action.request!.body), `${action.label}: ${view.title}`, {\n confirm: confirmFor(item, action),\n })\n }\n >\n {action.label}\n </Button>\n ))}\n {link ? (\n link.href ? (\n <a className={styles.linkButton} href={link.href} target=\"_blank\" rel=\"noopener noreferrer\">\n {link.label}\n <IconExternalLink width={12} height={12} aria-hidden=\"true\" />\n <span className=\"visually-hidden\"> (opens in a new tab)</span>\n </a>\n ) : (\n <button type=\"button\" className={styles.linkButton} onClick={link.onOpen}>\n {link.label}\n </button>\n )\n ) : null}\n </div>\n </li>\n );\n}\n\n/** C1's activity store in the surfaces' OptionalRead words. */\nexport function activityRead(state: ActivityState): { activity: VerseActivityResponse | null; loading: boolean; reason: string | null; stale: boolean } {\n if (state.status === 'unavailable') {\n return { activity: null, loading: false, reason: 'The Needs-you inbox is not in this build yet, so this card has no source.', stale: false };\n }\n if (!state.data) return { activity: null, loading: true, reason: null, stale: false };\n return { activity: state.data, loading: false, reason: null, stale: state.status === 'stale' };\n}\n\nexport function NeedsYouCard({\n state,\n actions,\n fleetLine,\n seatNames,\n}: {\n state: ActivityState;\n actions: SurfaceActions;\n fleetLine: string;\n /** Labels for the seats items name; an id neither source knows is shown as sent. */\n seatNames?: SeatNames;\n}) {\n const { activity, loading, reason, stale } = activityRead(state);\n const now = useNow(AGE_TICK_MS);\n const items = activity ? rankNeedsYou(activity.needsYou) : [];\n const silent = silentSources(activity);\n const shown = items.slice(0, NEEDS_YOU_CARD_LIMIT);\n const count = activity ? activity.needsYou.length : null;\n return (\n <Card\n title={count === null ? 'Needs you' : `Needs you (${count})`}\n caption={count === null ? undefined : count === 0 ? undefined : 'Most urgent first'}\n tone={count ? 'attention' : undefined}\n actions={\n <button type=\"button\" className={styles.linkButton} onClick={() => openNeedsYou()} aria-keyshortcuts=\"Meta+J\">\n Open all <kbd className={styles.kbd}>⌘J</kbd>\n </button>\n }\n >\n {loading ? (\n <p className={styles.muted} aria-busy=\"true\">Reading the inbox…</p>\n ) : !activity ? (\n <CardNote tone=\"unknown\">{reason ?? 'The Needs-you inbox did not answer.'} Nothing is shown rather than a false all-clear.</CardNote>\n ) : shown.length === 0 ? (\n silent.length || stale ? (\n <CardNote tone=\"unknown\">\n {silent.length\n ? `Nothing to show, but ${silent.map((s) => SOURCE_WORD[s] ?? s).join(', ')} ${silent.length === 1 ? 'is' : 'are'} not answering — this is not an all-clear.`\n : 'Nothing to show, but the last refresh failed — this is not an all-clear.'}\n </CardNote>\n ) : (\n <div className={styles.allClear} role=\"status\">\n <span className={styles.allClearTitle}>All clear</span>\n <span className={styles.allClearBody}>{fleetLine}</span>\n </div>\n )\n ) : (\n <>\n <ul className={styles.needsList}>\n {shown.map((item) => (\n <NeedsYouRow key={item.id} item={item} actions={actions} now={now} seatNames={seatNames} />\n ))}\n </ul>\n {items.length > shown.length ? (\n <button type=\"button\" className={styles.moreLink} onClick={() => openNeedsYou()}>\n {items.length - shown.length} more in the drawer\n </button>\n ) : null}\n {silent.length ? (\n <p className={styles.muted}>{silent.map((s) => SOURCE_WORD[s] ?? s).join(', ')} not answering — the list may be incomplete.</p>\n ) : null}\n {stale ? <p className={styles.muted}>The last refresh failed; showing the previous list.</p> : null}\n </>\n )}\n </Card>\n );\n}\n","/**\n * routes/verse/command/SeatBurnDowns.tsx — one burn-down per seat (span 3\n * each at 1440; a snap-scrolling strip at 375): remaining capacity in the\n * binding window, the line autonomy stops at in THAT window (the weekly\n * reserve, or the 5-hour ceiling), the projection and the reset\n * (SPEC-310B §6 \"BurnDown per seat: reserve band, ceiling, projected\n * exhaustion, reset time\").\n *\n * Every paid card draws the same frame — 0–100% up the side, the window\n * along the bottom — so the cards compare at a glance:\n * - reset known (a machine instant, or Claude's words read on their own\n * clock — command-model `bindingReset`): the whole window, reset − length\n * → reset, with the even-pace line, the projection and the reset marker;\n * - reset unknown: the window's length ending NOW, readings and stop line\n * only — nothing points at an instant nobody published. Never the span of\n * the handful of readings (a one-minute axis read as a crisis).\n *\n * The line is the server's recorded seat history (GET /api/verse/budget/\n * history) merged with the readings this viewer has seen since Verse opened\n * (command-model `mergeSeatHistory`). When it still starts late in the window\n * the card says why: nothing was recorded earlier, or — with no recorded\n * history — the page has only been watching since it opened. A local seat\n * has no window: it gets a quiet \"free\" tile, not an empty chart.\n */\nimport { useRef } from 'react';\nimport { BurnDown } from '../../../components/charts/BurnDown.js';\nimport { ChartFrame } from '../../../components/charts/ChartFrame.js';\nimport { TableView, type TableColumn } from '../../../components/charts/TableView.js';\nimport { CHART_SEQUENTIAL } from '../../../components/charts/colors.js';\nimport { areaPath, linePath, linearScale, niceTicks, splitRuns, tickGutter, type BurnPoint } from '../../../components/charts/chart-math.js';\nimport { useChartWidth } from '../../../components/charts/useChartWidth.js';\nimport { useTextScale } from '../../../components/charts/useTextScale.js';\nimport plot from '../../../components/charts/plot.module.css';\nimport { EngineMarker } from '../../../components/primitives/Tag.js';\nimport { asClause } from '../autonomy/format.js';\nimport { asSentence } from '../fleet/why-seat-model.js';\nimport { WINDOW_MS, burnTimeFormat, resetWords, type SeatBurn } from './command-model.js';\nimport { CardNote } from './Surface.js';\nimport styles from './command.module.css';\n\nconst WINDOW_WORD = { session: '5-hour', weekly: 'weekly' } as const;\n\n/**\n * '∞' as SVG, not text (review 3.10 c18): U+221E is outside the Ashlr Sans\n * Latin subset, so the text glyph made Command fetch the 230 KB full face.\n * Decorative — the sentence beside it says \"free\".\n */\nfunction InfinityMark() {\n return (\n <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\">\n <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\" />\n </svg>\n );\n}\n\nconst PAD_T = 16;\nconst PAD_B = 26;\nconst PAD_R = 14;\nconst CHART_HEIGHT = 160;\nconst pct = (v: number) => `${Math.round(v)}%`;\n/** The percent axis every seat card shares, so the cards compare at a glance. */\nconst PERCENT_TICKS = niceTicks(0, 100, 4);\n/** A line that starts this far into the window did not see the window's start. */\nconst PARTIAL_WINDOW_FRACTION = 0.05;\nconst SINCE_OPENED = 'Readings since Verse opened — the line fills in as it watches this seat.';\n\n/** Why a line starts late in its window — only asked when it does. */\nfunction lateStartNote(burn: SeatBurn, firstSeen: number | null, formatTime: (ms: number) => string): string {\n // Recorded history reached this window: the gap is real — nothing was read then.\n if (burn.recorded && firstSeen !== null) return `No reading was recorded in this window before ${formatTime(firstSeen)}.`;\n return SINCE_OPENED;\n}\n\n/**\n * A window whose reset nobody placed: the window's length ending now, the\n * readings and the stop line on the shared 0–100% axis. No even-pace line,\n * projection or reset marker — each would point at an instant nobody\n * published. WHY not a kit chart: BurnDown needs a reset, and AreaTrend sizes\n * both axes to the data — which is what drew Claude's one-minute, 0–40% card.\n */\nfunction TrailingWindow({\n title,\n description,\n caveat,\n points,\n from,\n to,\n line,\n width: fixedWidth,\n formatTime,\n ariaLabel,\n}: {\n title: string;\n description: string;\n caveat: string;\n points: BurnPoint[];\n from: number;\n to: number;\n line: SeatBurn['line'];\n width?: number;\n formatTime: (ms: number) => string;\n ariaLabel: string;\n}) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const width = useChartWidth(wrapRef, fixedWidth);\n const inWindow = points.filter((p) => p.t >= from && p.t <= to).sort((a, b) => a.t - b.t);\n const textScale = useTextScale();\n // Same gutter rule as the chart kit, so Large/XLarge display sizes fit too.\n const padL = tickGutter(PERCENT_TICKS.map((t) => pct(t)), 28, 56, textScale);\n const plotW = Math.max(40, width - padL - PAD_R);\n const plotH = CHART_HEIGHT - PAD_T - PAD_B;\n const xs = linearScale(from, to, padL, padL + plotW);\n const ys = linearScale(0, 100, PAD_T + plotH, PAD_T);\n const y = (v: number) => ys(Math.min(100, Math.max(0, v)));\n const runs = splitRuns(inWindow.map((p) => ({ x: p.t, y: p.remaining }))).map((run) => run.map((p) => ({ x: xs(p.x), y: y(p.y) })));\n const latest = [...inWindow].reverse().find((p) => p.remaining !== null) ?? null;\n const columns: TableColumn<BurnPoint>[] = [\n { key: 't', label: 'When', render: (p) => formatTime(p.t) },\n { key: 'r', label: 'Remaining', numeric: true, render: (p) => (p.remaining === null ? '—' : pct(p.remaining)) },\n ];\n return (\n <ChartFrame\n title={title}\n description={description}\n caveat={caveat}\n status={latest ? { kind: 'ready' } : { kind: 'empty', message: 'No reading inside this window.' }}\n table={<TableView caption={title} columns={columns} rows={inWindow} rowKey={(p) => String(p.t)} />}\n >\n <div ref={wrapRef} className={plot.plotWrap}>\n <svg className={plot.svg} width={width} height={CHART_HEIGHT} viewBox={`0 0 ${width} ${CHART_HEIGHT}`} role=\"img\" aria-label={ariaLabel}>\n {PERCENT_TICKS.map((t) => (\n <g key={t}>\n <line className={plot.grid} x1={padL} x2={padL + plotW} y1={ys(t)} y2={ys(t)} />\n <text className={plot.tick} x={padL - 6} y={ys(t)} dy=\"0.32em\" textAnchor=\"end\">{pct(t)}</text>\n </g>\n ))}\n <line className={plot.axis} x1={padL} x2={padL + plotW} y1={ys(0)} y2={ys(0)} />\n {/* Two labels only, one per end: the window's start and \"Now\". */}\n <text className={plot.tick} x={padL} y={CHART_HEIGHT - 8} textAnchor=\"start\">{formatTime(from)}</text>\n <text className={plot.tick} x={padL + plotW} y={CHART_HEIGHT - 8} textAnchor=\"end\">Now</text>\n {line ? (\n <g data-role=\"reserve\">\n <line className={plot.reference} x1={padL} x2={padL + plotW} y1={ys(line.value)} y2={ys(line.value)} />\n <text data-role=\"reserve-label\" className={`${plot.tick} ${plot.halo}`} x={padL + 4} y={ys(line.value) - 5} textAnchor=\"start\">\n {line.label} · {pct(line.value)}\n </text>\n </g>\n ) : null}\n {runs.map((run, i) => (\n <g key={i} data-role=\"remaining\">\n <path className={plot.wash} fill={CHART_SEQUENTIAL} d={areaPath(run, run.map((p) => ({ x: p.x, y: ys(0) })))} />\n <path className={plot.line} stroke={CHART_SEQUENTIAL} d={linePath(run)} />\n </g>\n ))}\n {latest && latest.remaining !== null ? (\n <circle className={plot.marker} cx={xs(latest.t)} cy={y(latest.remaining)} r={4} fill={CHART_SEQUENTIAL} />\n ) : null}\n </svg>\n </div>\n </ChartFrame>\n );\n}\n\nexport function SeatBurnCard({ burn, now, width }: { burn: SeatBurn; now: number; width?: number }) {\n if (burn.free) {\n return (\n <section className={styles.freeSeat} aria-label={`${burn.label}: free local seat`}>\n <span className={styles.freeHead}>\n <EngineMarker engine={burn.engine} />\n <span className={styles.freeTitle}>{burn.label}</span>\n </span>\n <span className={styles.freeValue}>\n <InfinityMark />\n </span>\n <span className={styles.freeBody}>Local — free, no provider window. {burn.eligible ? 'Takes autonomous work.' : burn.reason ?? ''}</span>\n </section>\n );\n }\n const title = `${burn.label}${burn.window ? ` · ${WINDOW_WORD[burn.window]}` : ''}`;\n // A clause in the header's \" · \" list (the reason's own full stop dropped);\n // `asSentence` closes it again, once, where a sentence follows.\n const eligibility = asClause(burn.enabled ? (burn.eligible ? 'Autonomy may use it now' : burn.reason ?? 'Held back from autonomy') : 'Not used by autonomy');\n const latest = [...burn.points].reverse().find((p) => p.remaining !== null)?.remaining ?? null;\n const noReading = (\n <section className={styles.freeSeat} aria-label={title}>\n <span className={styles.freeHead}>\n <EngineMarker engine={burn.engine} />\n <span className={styles.freeTitle}>{burn.label}</span>\n </span>\n <CardNote tone=\"unknown\">No window reading — unknown usage is never treated as headroom.</CardNote>\n </section>\n );\n if (burn.window === null) return noReading;\n const windowMs = WINDOW_MS[burn.window];\n const formatTime = burnTimeFormat(burn.window);\n const words = burn.resetText ? resetWords(burn.resetText) : null;\n const known = burn.points.filter((p) => p.remaining !== null);\n const firstSeen = known.length ? Math.min(...known.map((p) => p.t)) : null;\n // The line starts at the first reading anyone kept (recorded history, else\n // this viewer's own); say so when that was well into the window, or the\n // empty left of the chart reads as \"idle\".\n const partial = (from: number) => known.length < 2 || firstSeen === null || firstSeen - from > PARTIAL_WINDOW_FRACTION * windowMs;\n\n if (burn.resetAt === null || burn.start === null) {\n if (latest === null) return noReading;\n // Readings, but no reset anyone placed: no machine instant, and either no\n // provider words or words that don't name a clock time inside this window.\n const newest = Math.max(...known.map((p) => p.t));\n const to = Math.max(now, newest);\n const from = to - windowMs;\n const reset = words ?? 'reset time not reported';\n const why = words ? \"The provider's reset words could not be placed on a clock\" : 'No reset time was reported for this window';\n return (\n <TrailingWindow\n title={title}\n description={`${pct(latest)} left · ${reset} · ${eligibility}`}\n caveat={`${why}, so nothing is projected to a reset.${partial(from) ? ` ${lateStartNote(burn, firstSeen, formatTime)}` : ''}`}\n points={burn.points}\n from={from}\n to={to}\n line={burn.line}\n width={width}\n formatTime={formatTime}\n ariaLabel={`${title}: ${pct(latest)} left, ${reset}. ${asSentence(eligibility)}`}\n />\n );\n }\n // Claude's reset comes from its own words: keep them in the header, verbatim,\n // so the placed reset can always be checked against what the provider said.\n const placedByWords = burn.resetFrom === 'words' && words !== null;\n const description = placedByWords ? `${latest !== null ? `${pct(latest)} left · ` : ''}${words} · ${eligibility}` : eligibility;\n return (\n <BurnDown\n title={title}\n description={description}\n caveat={partial(burn.start) ? lateStartNote(burn, firstSeen, formatTime) : undefined}\n status={burn.points.length === 0 ? { kind: 'empty', message: 'No reading yet in this window.' } : undefined}\n points={burn.points}\n capacity={100}\n // The reset is the chart's right edge and its marker; no separate end\n // label is passed (the kit writes \"Resets …\" there once).\n start={burn.start}\n resetAt={burn.resetAt}\n now={now}\n // The binding window's own stop line (command-model.ts bindingLine), so\n // the verdict under the chart agrees with the server's eligibility.\n reserve={burn.line ?? undefined}\n height={CHART_HEIGHT}\n width={width}\n formatValue={pct}\n formatTime={formatTime}\n />\n );\n}\n\nexport function SeatBurnDowns({ burns, now, compact }: { burns: SeatBurn[]; now: number; compact: boolean }) {\n if (burns.length === 0) {\n return <CardNote tone=\"unknown\">Seat capacity is not available — the budget route did not answer.</CardNote>;\n }\n return (\n <div className={compact ? styles.burnStrip : styles.burnGrid} role=\"group\" aria-label=\"Capacity per seat\">\n {burns.map((b) => (\n <div key={b.seatId} className={styles.burnItem}>\n <SeatBurnCard burn={b} now={now} width={compact ? 300 : undefined} />\n </div>\n ))}\n </div>\n );\n}\n","/**\n * routes/verse/cloud/CloudLaunchDialog.tsx — \"New cloud task\" (3.11 unit C3):\n * repo (default ashlrai/ashlr-hub), base branch, the task, Launch.\n *\n * Validation runs on Launch, field by field, in the words the service would\n * use (cloud-model validateLaunch) — the server re-checks everything. The\n * request goes through the surface's guarded action (token first when none\n * is held); a refusal (budget, seat, a CLI that printed no session) stays IN\n * the dialog in the server's own sentence, with the draft intact, so the\n * operator can fix the one thing and press Launch again.\n */\nimport { useEffect, useId, useRef, useState, type FormEvent } from 'react';\nimport { CLOUD_PROMPT_MAX_CHARS, type CloudTaskV1 } from '../../../../core/cloud/types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Dialog } from '../../../components/primitives/Dialog.js';\nimport { Input } from '../../../components/primitives/Input.js';\nimport { DispatchDisabledError } from '../../../data/client.js';\nimport { describeControlError } from '../autonomy/use-guarded-action.js';\nimport type { SurfaceActions } from '../command/actions.js';\nimport { launchCloudTask } from './cloud-queries.js';\nimport { CLOUD_DEFAULT_REPO, formatDollars, validateLaunch, type LaunchDraft, type LaunchErrors } from './cloud-model.js';\nimport styles from './cloud.module.css';\n\nexport interface CloudLaunchDialogProps {\n open: boolean;\n onClose: () => void;\n actions: Pick<SurfaceActions, 'act' | 'busy'>;\n /** The flat per-session estimate, for the \"Estimated at $3\" line. */\n estimatePerSessionUsd: number | null;\n onLaunched: (task: CloudTaskV1) => void;\n defaultRepo?: string;\n}\n\nconst COUNT = new Intl.NumberFormat('en-US');\n\nexport function CloudLaunchDialog({ open, onClose, actions, estimatePerSessionUsd, onLaunched, defaultRepo = CLOUD_DEFAULT_REPO }: CloudLaunchDialogProps) {\n const titleId = useId();\n const promptId = useId();\n const promptErrorId = useId();\n const taskRef = useRef<HTMLTextAreaElement>(null);\n const [draft, setDraft] = useState<LaunchDraft>({ repo: defaultRepo, baseBranch: '', prompt: '' });\n const [errors, setErrors] = useState<LaunchErrors>({});\n const [refusal, setRefusal] = useState<string | null>(null);\n\n // Each opening starts clean except for the repo, which is usually the same.\n useEffect(() => {\n if (!open) return;\n setErrors({});\n setRefusal(null);\n }, [open]);\n\n const edit = (patch: Partial<LaunchDraft>) => {\n setRefusal(null);\n setDraft((prev) => ({ ...prev, ...patch }));\n setErrors((prev) => {\n const next = { ...prev };\n for (const key of Object.keys(patch) as Array<keyof LaunchDraft>) delete next[key];\n return next;\n });\n };\n\n const submit = (event: FormEvent) => {\n event.preventDefault();\n const result = validateLaunch(draft);\n if (!result.ok) {\n setErrors(result.errors);\n return;\n }\n setErrors({});\n setRefusal(null);\n actions.act(async () => {\n try {\n const response = await launchCloudTask({ ...result.request, origin: 'operator' });\n setDraft((prev) => ({ ...prev, prompt: '' }));\n onLaunched(response.task);\n onClose();\n } catch (err) {\n // A read-only server is the surface's state (its ActionStatus line);\n // every other refusal belongs next to the Launch button.\n if (err instanceof DispatchDisabledError) throw err;\n setRefusal(describeControlError(err));\n }\n }, 'Launch a Claude Code cloud session with this task.');\n };\n\n const length = draft.prompt.trim().length;\n return (\n <Dialog\n open={open}\n onClose={onClose}\n titleId={titleId}\n title=\"New cloud task\"\n description=\"Runs as a Claude Code cloud session on your Claude account. It delivers a draft PR; nothing merges on its own.\"\n widthClassName={styles.dialogWidth}\n initialFocusRef={taskRef}\n >\n <form className={styles.form} onSubmit={submit} noValidate>\n <div className={styles.fieldGrid}>\n <Input\n label=\"Repository\"\n hint=\"GitHub owner/name\"\n mono\n value={draft.repo}\n error={errors.repo}\n autoComplete=\"off\"\n spellCheck={false}\n onChange={(e) => edit({ repo: e.target.value })}\n />\n <Input\n label=\"Base branch\"\n hint=\"Must be pushed. Empty uses the default branch.\"\n mono\n value={draft.baseBranch}\n placeholder=\"default branch\"\n error={errors.baseBranch}\n autoComplete=\"off\"\n spellCheck={false}\n onChange={(e) => edit({ baseBranch: e.target.value })}\n />\n </div>\n <div className={styles.textareaField}>\n <label className={styles.label} htmlFor={promptId}>Task</label>\n <textarea\n ref={taskRef}\n id={promptId}\n className={styles.textarea}\n value={draft.prompt}\n placeholder=\"What should the cloud session do? It reads the repo's own guidance and opens a draft PR.\"\n aria-invalid={errors.prompt ? true : undefined}\n aria-describedby={errors.prompt ? promptErrorId : undefined}\n onChange={(e) => edit({ prompt: e.target.value })}\n />\n {errors.prompt ? <p id={promptErrorId} className={styles.fieldError} role=\"alert\">{errors.prompt}</p> : null}\n <p className={styles.muted}>\n {COUNT.format(length)} of {COUNT.format(CLOUD_PROMPT_MAX_CHARS)} characters\n {estimatePerSessionUsd !== null ? ` · estimated at ${formatDollars(estimatePerSessionUsd)} per session` : ''}\n </p>\n </div>\n {refusal ? <p className={styles.notice} data-tone=\"danger\" role=\"alert\">{refusal}</p> : null}\n <div className={styles.formActions}>\n <Button variant=\"ghost\" onClick={onClose} disabled={actions.busy}>\n Cancel\n </Button>\n <Button type=\"submit\" variant=\"primary\" busy={actions.busy}>\n Launch\n </Button>\n </div>\n </form>\n </Dialog>\n );\n}\n","/**\n * routes/verse/cloud/CloudCard.tsx — the cloud lane on Command (3.11 unit C3;\n * mounted by sections/CommandSection.tsx beside the burn-downs).\n *\n * Cloud [New cloud task] [Improve Verse] [Edit budget] [↻]\n * Credits remaining $212 of $250 · estimate\n * ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇░░░░░\n * Estimated at $3 per session — Claude doesn't expose the credit balance… Check usage on claude.ai ↗\n * 3 of 20 sessions today · 1 running · resets Sat 12:00 AM\n * (●) Self-improvement 2 of 4 today, on ashlrai/ashlr-hub …\n * ● Running Fix the flaky tracker test\n * ashlrai/ashlr-hub from master · started 5m ago\n * Open in Claude ↗\n *\n * The balance is NOT readable anywhere (types.ts header), so every dollar is\n * an estimate and the card says so beside the number, with the link to the\n * real one. It reads GET /api/verse/cloud itself and polls it every 30 s\n * while Command is visible; every write goes through Command's guarded\n * actions (confirm → token → request) and the overview is re-read after.\n *\n * States: loading, not in this build (404), empty, running, pr-open, failed,\n * and budget-refused (the launch gate closed — its plain sentence is shown,\n * and New cloud task / Improve Verse are disabled with that sentence as\n * their tooltip).\n */\nimport { useId, useRef, useState } from 'react';\nimport { CLOUD_BALANCE_URL, type CloudBudgetUpdate, type CloudOverviewResponse, type CloudTaskV1 } from '../../../../core/cloud/types.js';\nimport { Button, IconButton } from '../../../components/primitives/Button.js';\nimport { useFocusTrap } from '../../../components/primitives/focus-trap.js';\nimport { IconExternalLink, IconPlus, IconRefresh } from '../../../components/primitives/icons.js';\nimport { Meter } from '../../../components/primitives/Meter.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { Switch } from '../../../components/primitives/Switch.js';\nimport { Tooltip } from '../../../components/primitives/Tooltip.js';\nimport { useQuery, useRefetch } from '../../../data/hooks.js';\nimport { tidyProse } from '../autonomy/format.js';\nimport type { SurfaceActions } from '../command/actions.js';\nimport { Card, CardNote } from '../command/Surface.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport { CloudBudgetForm } from './CloudBudgetForm.js';\nimport { CloudLaunchDialog } from './CloudLaunchDialog.js';\nimport {\n canDismiss,\n cardTasks,\n creditsMeter,\n formatDollars,\n gateText,\n launchBlock,\n safeHref,\n selfImproveLine,\n sessionsLine,\n seatText,\n stateWord,\n STATE_TONE,\n taskDetail,\n taskMeta,\n} from './cloud-model.js';\nimport { CLOUD_POLL_MS, cloudQuery, dismissCloudTask, refreshCloudTasks, runCloudImprove, updateCloudBudget } from './cloud-queries.js';\nimport styles from './cloud.module.css';\n\ninterface CardNotice {\n tone: 'success' | 'warning' | 'danger';\n text: string;\n href?: string | null;\n linkText?: string;\n}\n\n/** An outbound link, always in a new tab and never carrying this page as referrer. */\nfunction OutLink({ href, children, label }: { href: string; children: string; label?: string }) {\n return (\n <a className={styles.link} href={href} target=\"_blank\" rel=\"noreferrer noopener\" aria-label={label}>\n {children} <IconExternalLink width={12} height={12} aria-hidden=\"true\" />\n </a>\n );\n}\n\nexport function CloudTaskRow({ task, actions, now }: { task: CloudTaskV1; actions: SurfaceActions; now: number }) {\n const session = safeHref(task.sessionUrl, 'claude.ai');\n const pr = task.pr ? safeHref(task.pr.url, 'github.com') : null;\n const detail = taskDetail(task, now);\n return (\n <li className={styles.task} data-state={task.state}>\n <span className={styles.taskChip}>\n <StatusBadge status={task.state} tone={STATE_TONE[task.state]}>{stateWord(task)}</StatusBadge>\n </span>\n <span className={styles.taskMain}>\n <p className={styles.taskTitle}>{task.title}</p>\n <span className={styles.muted}>{taskMeta(task, now)}</span>\n {detail ? <span className={styles.facts}>{detail}</span> : null}\n <span className={styles.taskLinks}>\n {session ? <OutLink href={session} label={`Open “${task.title}” in Claude`}>Open in Claude</OutLink> : null}\n {pr && task.pr ? <OutLink href={pr} label={`Pull request #${task.pr.number} on GitHub`}>{`PR #${task.pr.number}`}</OutLink> : null}\n {canDismiss(task) ? (\n <button\n type=\"button\"\n className={styles.linkButton}\n disabled={actions.busy || actions.readOnly}\n aria-label={`Dismiss “${task.title}”`}\n onClick={() =>\n actions.act(() => dismissCloudTask(task.id), `Dismiss the cloud task “${task.title}”.`, {\n confirm: {\n title: 'Dismiss this cloud task?',\n body: `Verse stops tracking “${task.title}”. Nothing on GitHub or claude.ai changes — the session and any PR stay where they are.`,\n confirmLabel: 'Dismiss',\n },\n })\n }\n >\n Dismiss\n </button>\n ) : null}\n </span>\n </span>\n </li>\n );\n}\n\n/** \"Edit budget\": the shared budget form in a popover anchored under its button. */\nfunction BudgetPopover({ overview, actions, onClose }: { overview: CloudOverviewResponse; actions: SurfaceActions; onClose: () => void }) {\n const panel = useRef<HTMLDivElement>(null);\n const titleId = useId();\n useFocusTrap({ open: true, containerRef: panel, onClose });\n const save = (update: CloudBudgetUpdate) =>\n actions.act(() => updateCloudBudget(update), 'Change the cloud budget.', { onDone: onClose });\n return (\n <div ref={panel} className={styles.popover} role=\"dialog\" aria-modal=\"false\" aria-labelledby={titleId} tabIndex={-1}>\n <h4 id={titleId} className={styles.popoverTitle}>Cloud budget</h4>\n <CloudBudgetForm\n idPrefix=\"cloud-card-budget\"\n budget={overview.budget.budget}\n busy={actions.busy}\n disabled={actions.readOnly}\n onSave={save}\n onCancel={onClose}\n />\n </div>\n );\n}\n\nfunction CloudBody({ overview, actions, now, onNotice }: { overview: CloudOverviewResponse; actions: SurfaceActions; now: number; onNotice: (n: CardNotice) => void }) {\n const view = overview.budget;\n const meter = creditsMeter(view);\n const seat = seatText(overview.seat);\n const refused = gateText(view.canLaunch, 'The cloud budget does not allow another launch right now.');\n const { shown, hidden } = cardTasks(overview.tasks, now);\n const si = view.budget.selfImprove;\n return (\n <div className={styles.body}>\n <div className={styles.meterBlock}>\n <Meter\n value={meter.value}\n max={meter.max}\n label=\"Credits remaining\"\n valueText={meter.text}\n tone={meter.tone}\n aria-label={`Estimated credits remaining: ${meter.text}, ${meter.usedText}`}\n />\n <p className={styles.estimateNote}>\n {tidyProse(view.estimateNote, now)}{' '}\n <OutLink href={CLOUD_BALANCE_URL} label=\"Check the real balance on claude.ai\">Check usage on claude.ai</OutLink>\n </p>\n {meter.warning ? <p className={styles.notice} data-tone=\"warning\" role=\"note\">{meter.warning}</p> : null}\n </div>\n <p className={styles.facts}>{sessionsLine(view, now)}</p>\n {seat ? <p className={styles.notice} data-tone=\"warning\" role=\"note\">{seat}</p> : null}\n {refused ? (\n <p className={styles.notice} data-tone=\"warning\" role=\"note\" data-testid=\"cloud-budget-refused\">\n New launches are paused: {refused}\n </p>\n ) : null}\n <div className={styles.toggleRow}>\n <Switch\n checked={si.enabled}\n label=\"Self-improvement\"\n disabled={actions.busy || actions.readOnly}\n onChange={(enabled) =>\n actions.act(() => updateCloudBudget({ selfImprove: { enabled } }), enabled ? 'Let Verse launch its own self-improvement tasks.' : 'Stop Verse launching its own self-improvement tasks.', {\n onDone: () => onNotice({ tone: 'success', text: enabled ? `Self-improvement is on — up to ${si.maxPerDay} a day.` : 'Self-improvement is off.' }),\n })\n }\n />\n <span className={`${styles.muted} ${styles.toggleText}`}>{selfImproveLine(view)}</span>\n </div>\n {shown.length === 0 ? (\n <CardNote>No cloud tasks yet. Start one with New cloud task, or let Verse improve itself.</CardNote>\n ) : (\n <ul className={styles.tasks} aria-label=\"Cloud tasks\">\n {shown.map((t) => <CloudTaskRow key={t.id} task={t} actions={actions} now={now} />)}\n </ul>\n )}\n {hidden > 0 ? <p className={styles.muted}>{hidden} more {hidden === 1 ? 'task is' : 'tasks are'} listed by ashlr cloud list.</p> : null}\n </div>\n );\n}\n\nexport function CloudCard({ actions, now = Date.now() }: { actions: SurfaceActions; now?: number }) {\n const read = useQuery(cloudQuery, { freshMs: 15_000 });\n const refetch = useRefetch(cloudQuery);\n usePollWhileVisible(refetch, CLOUD_POLL_MS);\n const [launchOpen, setLaunchOpen] = useState(false);\n const [budgetOpen, setBudgetOpen] = useState(false);\n const [notice, setNotice] = useState<CardNotice | null>(null);\n\n const overview = read.data?.value ?? null;\n const loading = !read.data && (read.status === 'loading' || read.status === 'idle');\n const block = overview ? launchBlock(overview.seat, overview.budget) : null;\n const locked = actions.busy || actions.readOnly;\n const nextUp = overview?.backlog.nextUp ? overview.backlog.items.find((i) => i.id === overview.backlog.nextUp) ?? null : null;\n const improveBlock = !overview\n ? null\n : seatText(overview.seat) ?? gateText(overview.budget.canLaunch, 'The cloud budget does not allow another launch right now.') ?? (nextUp ? null : 'The self-improvement backlog has nothing left to launch.');\n const estimate = overview ? overview.budget.budget.estimatedCostPerSessionUsd : null;\n\n const improve = () => {\n if (!overview || !nextUp) return;\n actions.act(() => runCloudImprove({ count: 1 }), 'Launch the next self-improvement task as a cloud session.', {\n confirm: {\n title: 'Improve Verse now?',\n body: `Launches “${nextUp.title}” as a cloud session on ${nextUp.repo ?? overview.budget.budget.selfImprove.repo}${estimate !== null ? `, estimated at ${formatDollars(estimate)}` : ''}. It delivers a draft PR; nothing merges on its own.`,\n confirmLabel: 'Launch',\n },\n onDone: (result) => {\n const first = result.launched[0] ?? null;\n if (first) {\n setNotice({ tone: 'success', text: `Started “${first.title}”.`, href: safeHref(first.sessionUrl, 'claude.ai'), linkText: 'Open in Claude' });\n } else {\n const why = result.skipped[0]?.reason ?? 'Nothing was launched, and the server sent no reason.';\n setNotice({ tone: 'warning', text: tidyProse(why) });\n }\n },\n });\n };\n\n const head = overview ? (\n <span className={styles.headActions}>\n <Tooltip label={block ?? 'Start a cloud session with your own task'}>\n <Button size=\"sm\" variant=\"primary\" icon={<IconPlus width={14} height={14} />} disabled={locked || block !== null} onClick={() => setLaunchOpen(true)}>\n New cloud task\n </Button>\n </Tooltip>\n <Tooltip label={improveBlock ?? (nextUp ? `Launch the next backlog item: ${nextUp.title}` : 'Launch the next backlog item')}>\n <Button size=\"sm\" disabled={locked || improveBlock !== null} onClick={improve}>\n Improve Verse\n </Button>\n </Tooltip>\n <Tooltip label=\"Credits, per-session estimate and daily caps\">\n <Button size=\"sm\" variant=\"ghost\" aria-expanded={budgetOpen} aria-haspopup=\"dialog\" onClick={() => setBudgetOpen((o) => !o)} disabled={actions.readOnly}>\n Edit budget\n </Button>\n </Tooltip>\n <Tooltip label=\"Check GitHub for task updates now\">\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n icon={<IconRefresh width={14} height={14} />}\n aria-label=\"Check GitHub for task updates now\"\n disabled={locked}\n onClick={() => actions.act(() => refreshCloudTasks(), 'Re-read the cloud tasks from GitHub.')}\n />\n </Tooltip>\n {budgetOpen ? <BudgetPopover overview={overview} actions={actions} onClose={() => setBudgetOpen(false)} /> : null}\n </span>\n ) : null;\n\n return (\n <Card title=\"Cloud\" caption=\"Claude Code cloud sessions on your Claude credits\" actions={head}>\n {loading ? (\n <p className={styles.muted} aria-busy=\"true\">Reading the cloud lane…</p>\n ) : !overview ? (\n <CardNote tone=\"unknown\">{read.data?.reason ?? read.error?.message ?? 'The cloud lane did not answer.'}</CardNote>\n ) : (\n <>\n {notice ? (\n <div className={styles.notice} data-tone={notice.tone} role=\"status\">\n <span className={styles.noticeRow}>\n <span>\n {notice.text}\n {notice.href ? <> <OutLink href={notice.href}>{notice.linkText ?? 'Open'}</OutLink></> : null}\n </span>\n <button type=\"button\" className={styles.linkButton} onClick={() => setNotice(null)}>Dismiss</button>\n </span>\n </div>\n ) : null}\n <CloudBody overview={overview} actions={actions} now={now} onNotice={setNotice} />\n <CloudLaunchDialog\n open={launchOpen}\n onClose={() => setLaunchOpen(false)}\n actions={actions}\n estimatePerSessionUsd={estimate}\n onLaunched={(task) =>\n setNotice({ tone: 'success', text: `Started “${task.title}”.`, href: safeHref(task.sessionUrl, 'claude.ai'), linkText: 'Open in Claude' })\n }\n />\n </>\n )}\n </Card>\n );\n}\n","/**\n * routes/verse/command/VerdictLine.tsx — the one sentence under the top bar\n * (17/24, weight 500): \"Autonomous · 5 building · 7 merged today · 0 reverts\n * · Claude 46% reserved for you\", then the \"Since you looked\" strip.\n *\n * The strip compares against the operator's previous visit to Command,\n * remembered per viewer in localStorage (a convenience: if storage is\n * blocked the strip simply stays hidden — nothing depends on it).\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { useSectionVisible } from '../shell/section-visibility.js';\nimport { verdictParts, type VerdictInputs } from './authority-model.js';\nimport type { SinceItem } from './command-model.js';\nimport styles from './command.module.css';\n\nexport function VerdictLine(props: VerdictInputs) {\n const parts = verdictParts(props);\n return (\n <p className={styles.verdict} data-testid=\"verdict\">\n {parts.map((p, i) => (\n <span key={p.key} className={styles.verdictPart} data-tone={p.tone}>\n {i > 0 ? <span className={styles.verdictSep} aria-hidden=\"true\"> · </span> : null}\n {p.text}\n </span>\n ))}\n </p>\n );\n}\n\nexport const LAST_LOOKED_KEY = 'ashlr.verse.command.lastLooked.v1';\n\nfunction readStored(): string | null {\n try {\n const v = window.localStorage.getItem(LAST_LOOKED_KEY);\n return v && Number.isFinite(Date.parse(v)) ? v : null;\n } catch {\n return null;\n }\n}\n\nfunction writeStored(value: string): void {\n try {\n window.localStorage.setItem(LAST_LOOKED_KEY, value);\n } catch {\n /* private window / blocked storage: the strip just stays hidden */\n }\n}\n\n/**\n * The previous visit's time. Each time Command comes into view (mount, or\n * back from another surface in the keep-alive shell), what was stored\n * becomes \"last looked\" and now is stored for next time.\n */\nexport function useLastLooked(): string | null {\n const visible = useSectionVisible();\n const [previous, setPrevious] = useState<string | null>(null);\n const wasVisible = useRef(false);\n useEffect(() => {\n if (visible && !wasVisible.current) {\n setPrevious(readStored());\n writeStored(new Date().toISOString());\n }\n wasVisible.current = visible;\n }, [visible]);\n return previous;\n}\n\nexport function SinceStrip({ lastLookedAt, items }: { lastLookedAt: string | null; items: SinceItem[] }) {\n if (!lastLookedAt) return null;\n const when = new Date(lastLookedAt);\n const sameDay = when.toDateString() === new Date().toDateString();\n const label = sameDay\n ? when.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })\n : when.toLocaleString('en-US', { weekday: 'short', hour: 'numeric', minute: '2-digit' });\n return (\n <div className={styles.since} role=\"group\" aria-label={`Since you looked at ${label}`}>\n <span className={styles.sinceLead}>Since {label}</span>\n {items.length === 0 ? (\n <span className={styles.sinceEmpty}>nothing new</span>\n ) : (\n items.map((item) => (\n <span key={item.id} className={styles.sinceChip} data-tone={item.tone}>\n {item.text}\n </span>\n ))\n )}\n </div>\n );\n}\n","/**\n * routes/verse/sections/CommandSection.tsx — ⌘1 Command, the home surface\n * (SPEC-310B §6, SPEC-310C §5; unit C7). Lazy-mounted by the shell; takes no\n * props (named export, like every section).\n *\n * It answers, top to bottom, in the order the questions arrive:\n * 1. What is autonomy allowed to do, and how do I stop it? (top bar)\n * 2. Is the company producing? (verdict line)\n * 3. What changed since I last looked? (\"Since\" strip)\n * 4. What needs me, and what is the Leader doing? (Needs you 5 | Leader 7)\n * — Needs you reads the shell's shared activity store (C1 useActivity).\n * 5. Is it working? (5 KPI tiles)\n * 6. Will it run out? (burn-down per seat, 3 each)\n * — and the cloud lane's estimated credits and tasks (3.11 CloudCard)\n * 7. What ran? (12 h swimlane)\n * At 375 px: Needs you, Leader, KPIs two per row, burn-downs in a snap\n * strip, then a 6 h swimlane — the DOM order below IS that order.\n *\n * Every source is optional (surface-data.ts): a Track B module that has not\n * landed is one card's designed \"not in this build\" state, never a blank\n * surface. Polling runs only while Command is the visible surface\n * (usePollWhileVisible), at ≥ 2 s per the performance budget.\n */\nimport { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from 'react';\nimport { Swimlane } from '../../../components/charts/Swimlane.js';\nimport type { ChartStatus } from '../../../components/charts/ChartFrame.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { useQuery, useRefetch } from '../../../data/hooks.js';\nimport { getQuerySnapshot, subscribeQuery } from '../../../data/cache.js';\nimport type { VerseBootstrap } from '../../../data/api-types.js';\nimport { VERSE_BOOTSTRAP_KEY } from '../verse-queries.js';\nimport { budgetQuery } from '../budget/budget-queries.js';\nimport { useNow } from '../autonomy/use-ticker.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport { useViewport } from '../shell/viewport.js';\nimport { ActionStatus, useSurfaceActions } from '../command/actions.js';\nimport { AutonomyBar } from '../command/AutonomyBar.js';\nimport { buildKpis, claudeReserve, mergeSeatHistory, recordReading, seatBurns, seatNames, sinceYouLooked, type SeatReading } from '../command/command-model.js';\nimport { KpiRow } from '../command/KpiRow.js';\nimport { LeaderCard } from '../command/LeaderCard.js';\nimport { NeedsYouCard } from '../command/NeedsYouCard.js';\nimport { SeatBurnDowns } from '../command/SeatBurnDowns.js';\nimport { CloudCard } from '../cloud/CloudCard.js';\nimport { Cell, Surface } from '../command/Surface.js';\nimport { SinceStrip, VerdictLine, useLastLooked } from '../command/VerdictLine.js';\nimport { useActivity } from '../shell/useActivity.js';\nimport {\n authorityQuery,\n fleetHistoryQuery,\n fleetLiveQuery,\n leaderQuery,\n learningQuery,\n seatHistoryQuery,\n} from '../command/surface-data.js';\nimport { darkSinceLabel, fleetDarkSince, fleetDarkStatus } from '../fleet/dark-since.js';\nimport { laneRows, runTone } from '../fleet/live-model.js';\nimport styles from '../command/command.module.css';\n\nconst HOUR = 3_600_000;\n\n/** Fast reads: the switch, the fleet and the inbox move while nobody clicks. */\nexport const COMMAND_FAST_POLL_MS = 10_000;\n/** Slow reads: the Leader, budgets (the collector samples every 30 s). */\nexport const COMMAND_SLOW_POLL_MS = 30_000;\n/**\n * History and learning change daily; the recorded seat history grows by a\n * row per seat window every few minutes — its newest end is the live budget\n * reading (30 s), so this slower refresh only fills in the middle.\n */\nexport const COMMAND_HISTORY_POLL_MS = 300_000;\n\n// Seat readings observed since the page opened (module scope: they survive\n// the keep-alive shell unmounting Command; see command-model recordReading).\n// Merged with the server's recorded history below, so a reload keeps the window.\nlet seatReadings: Record<string, SeatReading[]> = {};\n\nexport function CommandSection() {\n const { compact } = useViewport();\n const authority = useQuery(authorityQuery);\n const fleet = useQuery(fleetLiveQuery);\n // The shell's ONE activity poll (C1) — never a second loop from here.\n const activity = useActivity();\n const leader = useQuery(leaderQuery);\n const learning = useQuery(learningQuery, { freshMs: 60_000 });\n const history = useQuery(fleetHistoryQuery, { freshMs: 60_000 });\n const budget = useQuery(budgetQuery, { freshMs: 15_000 });\n // Fetched on mount, then with the other slow history reads — never at 30 s.\n const seatHistory = useQuery(seatHistoryQuery, { freshMs: 60_000 });\n\n const refetch = {\n authority: useRefetch(authorityQuery),\n fleet: useRefetch(fleetLiveQuery),\n leader: useRefetch(leaderQuery),\n learning: useRefetch(learningQuery),\n history: useRefetch(fleetHistoryQuery),\n budget: useRefetch(budgetQuery),\n seatHistory: useRefetch(seatHistoryQuery),\n };\n usePollWhileVisible(() => {\n refetch.authority();\n refetch.fleet();\n }, COMMAND_FAST_POLL_MS);\n usePollWhileVisible(() => {\n refetch.leader();\n refetch.budget();\n }, COMMAND_SLOW_POLL_MS);\n usePollWhileVisible(() => {\n refetch.history();\n refetch.learning();\n refetch.seatHistory();\n }, COMMAND_HISTORY_POLL_MS);\n\n // A 30 s clock is enough for the chip and the swimlane's \"now\"; the\n // countdown rings keep their own 1 s ticker.\n const now = useNow(30_000);\n const actions = useSurfaceActions();\n const lastLooked = useLastLooked();\n\n // The seat roster, for Claude's reset WORDS (the budget route carries only\n // machine reset instants, which Claude never publishes — command-model\n // bindingResetText). Read from the cache WITHOUT fetching: the console\n // loads bootstrap at startup and the chat surfaces keep it live, and a\n // bootstrap read here would cost ~384 ms of server event loop per poll\n // (useSeatsRefresh.ts). No roster → the words of a reason that holds the\n // seat at its reserve or ceiling (command-model reasonResetText), else the\n // card says \"reset time not reported\". Needs-you also names seats from it.\n const roster = useSyncExternalStore(\n useCallback((listener: () => void) => subscribeQuery(VERSE_BOOTSTRAP_KEY, listener), []),\n () => getQuerySnapshot<VerseBootstrap>(VERSE_BOOTSTRAP_KEY),\n () => getQuerySnapshot<VerseBootstrap>(VERSE_BOOTSTRAP_KEY),\n );\n const seats = roster.data?.seats ?? null;\n\n const [readings, setReadings] = useState(seatReadings);\n const view = budget.data ?? null;\n useEffect(() => {\n if (!view) return;\n seatReadings = recordReading(seatReadings, view);\n setReadings(seatReadings);\n }, [view]);\n\n const auth = authority.data?.value ?? null;\n const live = fleet.data?.value ?? null;\n const hist = history.data?.value ?? null;\n // THE dark-since instant (fleet/dark-since.ts): null unless the fleet is\n // dark. Never fleet history's date — that is \"quiet since\", not \"dark\".\n const darkSince = fleetDarkSince(live);\n\n const kpis = useMemo(\n // `budget` puts each paid seat's window usage (percent, never dollars) in\n // the metered-spend caption (review 3.10 c10).\n () => buildKpis({ fleet: live, history: hist, learning: learning.data?.value ?? null, policy: auth?.policy ?? null, budget: view }),\n [live, hist, learning.data, auth, view],\n );\n const recordedSeats = seatHistory.data?.value ?? null;\n const merged = useMemo(() => mergeSeatHistory(readings, recordedSeats), [readings, recordedSeats]);\n const burns = useMemo(() => seatBurns(view, merged.readings, seats, merged.recorded), [view, merged, seats]);\n // Needs-you names seats as the burn-downs beside it do, never by raw id.\n const names = useMemo(() => seatNames(seats, view), [seats, view]);\n const since = sinceYouLooked({ lastLookedAt: lastLooked, fleet: live, leader: leader.data?.value ?? null, activity: activity.data });\n\n const windowH = compact ? 6 : 12;\n const from = now - windowH * HOUR;\n const lanes = useMemo(() => (live ? laneRows(live.runs, from, now) : []), [live, from, now]);\n const runsStatus: ChartStatus = !fleet.data\n ? { kind: 'loading' }\n : !live\n ? { kind: 'unknown', reason: fleet.data.reason ?? 'the live fleet view did not answer.' }\n : live.state === 'dark' && lanes.length === 0\n ? fleetDarkStatus(live)\n : lanes.length === 0\n ? { kind: 'empty', message: `No runs in the last ${windowH} hours.` }\n : { kind: 'ready' };\n\n const fleetLine = live\n ? live.state === 'dark'\n ? `Fleet dark${darkSince ? ` since ${darkSinceLabel(darkSince)}` : ''}.`\n : `Fleet ${live.state}: ${live.summary.building ?? '—'} building, ${live.summary.queued ?? '—'} queued.`\n : 'Fleet status unknown.';\n\n const refreshing = [authority, fleet].some((q) => q.status === 'refreshing');\n\n return (\n <Surface\n title=\"Command\"\n actions={refreshing ? <RefreshIndicator /> : null}\n lead={\n <div className={styles.lead}>\n <AutonomyBar read={authority.data} loading={authority.status === 'loading'} budgetMode={view?.mode ?? null} actions={actions} compact={compact} now={now} />\n <ActionStatus actions={actions} />\n <VerdictLine\n authority={auth}\n building={live?.summary.building ?? null}\n mergedToday={live?.summary.mergedToday ?? null}\n revertsToday={live?.summary.revertsToday ?? null}\n reserve={claudeReserve(view)}\n darkSince={darkSince}\n />\n <SinceStrip lastLookedAt={lastLooked} items={since} />\n </div>\n }\n >\n <Cell span={5}>\n <NeedsYouCard state={activity} actions={actions} fleetLine={fleetLine} seatNames={names} />\n </Cell>\n <Cell span={7}>\n <LeaderCard read={leader.data} loading={leader.status === 'loading'} actions={actions} />\n </Cell>\n <Cell span={12}>\n <KpiRow kpis={kpis} />\n </Cell>\n <Cell span={12}>\n <SeatBurnDowns burns={burns} now={now} compact={compact} />\n </Cell>\n <Cell span={12}>\n <CloudCard actions={actions} now={now} />\n </Cell>\n <Cell span={12}>\n <Swimlane\n title={`Last ${windowH} hours`}\n description=\"Fleet lanes; bars coloured by status, outlines are queued or parked\"\n status={runsStatus}\n lanes={lanes}\n from={from}\n to={now}\n now={now}\n toneOf={runTone}\n />\n </Cell>\n {actions.dialogs}\n </Surface>\n );\n}\n"],"mappings":"w2EAsBa,EAAwD,CAAE,IAAK,EAAG,QAAS,EAAG,WAAY,CAAE,EAE5F,EAAyD,CACpE,IAAK,MACL,QAAS,UACT,WAAY,YACd,EAGa,GAAyD,CACpE,IAAK,MACL,QAAS,UACT,WAAY,MACd,EAEa,GAA0C,CAAC,MAAO,UAAW,YAAY,EAKtF,SAAgB,GAAe,EAAqE,EAAkC,CACpI,IAAM,EAAO,EAAY,EAAO,QAC1B,EAAS,EAAY,GAG3B,OAFI,IAAW,EAAa,OACxB,EAAS,EAAa,QACnB,GAAU,EAAY,EAAO,uBAAyB,QAAU,mBACzE,CAYA,SAAgB,GAAc,EAAqF,CACjH,OAAO,GAAa,IAAK,GAAU,CACjC,IAAM,EAAa,EAAY,GAAS,KAAK,IAAI,EAAY,EAAO,QAAS,EAAY,EAAO,sBAAsB,EACtH,MAAO,CACL,QACA,MAAO,EAAa,GACpB,MAAO,GAAa,GACpB,aACA,UAAW,EAAa,GAAG,EAAa,GAAO,iCAAmC,EAAa,EACjG,CACF,CAAC,CACH,CAiBA,IAAM,EAAM,MACN,GAAO,KAGb,SAAgB,GAAS,EAAoB,CAC3C,GAAI,CAAC,OAAO,SAAS,CAAE,GAAK,GAAM,EAAG,MAAO,KAC5C,GAAI,GAAM,EAAI,EAAK,MAAO,GAAG,KAAK,MAAM,EAAK,CAAG,EAAE,GAClD,GAAI,GAAM,EAAK,CACb,IAAM,EAAI,KAAK,MAAM,EAAK,CAAG,EACvB,EAAI,KAAK,OAAO,EAAK,EAAI,GAAO,EAAI,EAC1C,OAAO,EAAI,GAAG,EAAE,IAAI,EAAE,GAAK,GAAG,EAAE,EAClC,CAEA,OADI,GAAM,GAAa,GAAG,KAAK,MAAM,EAAK,EAAI,EAAE,GACzC,GAA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A,CAAC,GAAD,CAAsB,QAAY,MAAc,SAAU,CAAA,CACtD,CAAA,GACN,EAAA,EAAA,IAAA,CAAC,EAAD,CAAM,KAAM,GACV,UAAA,EAAA,EAAA,IAAA,CAAC,GAAD,CAAoB,UAAc,KAAM,CAAA,CACpC,CAAA,GACN,EAAA,EAAA,IAAA,CAAC,EAAD,CAAM,KAAM,GACV,UAAA,EAAA,EAAA,IAAA,CAAC,GAAD,CACE,MAAO,QAAQ,EAAQ,QACvB,YAAY,sEACZ,OAAQ,GACD,QACD,OACN,GAAI,EACC,MACL,OAAQ,EACT,CAAA,CACG,CAAA,EACL,EAAQ,OACF,GAEb"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,s as r}from"./index-BVxOlseC.js";import{t as i}from"./Dialog-BS9Dxi3G.js";var a=r(e(),1),o={body:`_body_15hsz_1`,error:`_error_15hsz_8`,actions:`_actions_15hsz_17`,cancel:`_cancel_15hsz_23`,confirm:`_confirm_15hsz_33`,destructive:`_destructive_15hsz_48`},s=n({ConfirmDialog:()=>l}),c=t();function l({open:e,onClose:t,title:n,body:r,confirmLabel:s,destructive:l,onConfirm:u,busy:d,error:f}){let p=(0,a.useId)(),m=(0,a.useRef)(null);return(0,c.jsxs)(i,{open:e,onClose:t,titleId:p,title:n,initialFocusRef:m,children:[(0,c.jsx)(`div`,{className:o.body,children:r}),f?(0,c.jsx)(`p`,{className:o.error,role:`alert`,children:f}):null,(0,c.jsxs)(`div`,{className:o.actions,children:[(0,c.jsx)(`button`,{type:`button`,className:o.cancel,onClick:t,disabled:d,children:`Cancel`}),(0,c.jsx)(`button`,{ref:m,type:`button`,className:l?o.destructive:o.confirm,onClick:u,disabled:d,children:d?`Working…`:s})]})]})}export{s as n,l as t};
|
|
2
|
-
//# sourceMappingURL=ConfirmDialog-DLrLKM0c.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,s as i}from"./index-BVxOlseC.js";import{t as a}from"./focus-trap-HtcoXeEq.js";var o=i(e(),1),s=i(t(),1),c={backdrop:`_backdrop_10r5p_1`,fade:`_fade_10r5p_1`,dialog:`_dialog_10r5p_13`,rise:`_rise_10r5p_1`,title:`_title_10r5p_25`,description:`_description_10r5p_36`},l=r({Dialog:()=>d}),u=n();function d({open:e,onClose:t,titleId:n,title:r,description:i,children:l,initialFocusRef:d,widthClassName:f}){let p=(0,o.useRef)(null),m=(0,o.useId)(),h=!!i;return a({open:e,containerRef:p,onClose:t,initialFocusRef:d}),e?(0,s.createPortal)((0,u.jsx)(`div`,{className:c.backdrop,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,u.jsxs)(`div`,{ref:p,className:`${c.dialog} ${f??``}`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":n,"aria-describedby":h?m:void 0,tabIndex:-1,children:[(0,u.jsx)(`h2`,{id:n,className:c.title,children:r}),h?(0,u.jsx)(`p`,{id:m,className:c.description,children:i}):null,l]})}),document.body):null}export{l as n,d as t};
|
|
2
|
-
//# sourceMappingURL=Dialog-BS9Dxi3G.js.map
|