@openscout/scout 0.2.80 → 0.2.82
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/README.md +1 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/client/assets/ActivityScreen-aewI4Ul1.js +1 -0
- package/dist/client/assets/{AddProjectForm-CtEiLQnm.js → AddProjectForm-Czb5uwou.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CszU5eaU.js → AgentAvatar-DMov24_o.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-BjG6ECjl.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-D4MbSMXp.js +1 -0
- package/dist/client/assets/{AgentDetailCard-sZuHl1de.js → AgentDetailCard-Biq8b2gv.js} +1 -1
- package/dist/client/assets/AgentFloorView-h9KDJdw0.js +1 -0
- package/dist/client/assets/AgentInfoScreen-SjhK_SBh.js +1 -0
- package/dist/client/assets/{AgentLaneCard-nB68f2CI.js → AgentLaneCard-C4DMQR-c.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-O9Yf0uR-.js → AgentLaneChrome-D1xNNf7A.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BfhpaEQ3.js → AgentLaneDetailSheet-DnAKe4e3.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-Ct3b0TQR.js → AgentLaneSummaryResize-C9loK-st.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BNOYF16R.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-DNGvZvjd.js → AgentLanesPreflight-M7iDXdP2.js} +1 -1
- package/dist/client/assets/{AgentLanesView-DqRK5-d2.js → AgentLanesView-Ct-Gz5WD.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-DI4ooSHW.js → AgentLiveActions-0iy8QZ1T.js} +1 -1
- package/dist/client/assets/{AgentSessions-BxWIPkWh.js → AgentSessions-CDfSfNiE.js} +2 -2
- package/dist/client/assets/{AgentsConsole-D6VHSCfZ.js → AgentsConsole-BVxhBqRa.js} +1 -1
- package/dist/client/assets/AgentsScreen-Bww6HgFs.js +1 -0
- package/dist/client/assets/AgentsSubnav-CiIuzxnZ.js +1 -0
- package/dist/client/assets/{AtopView-VZkk40v0.js → AtopView-h_aFoNkP.js} +1 -1
- package/dist/client/assets/BackToPicker-BXp5E2ck.js +1 -0
- package/dist/client/assets/{BriefingDetailScreen-BZU4qMwE.js → BriefingDetailScreen-C83o2YfN.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-Bfc3tqPp.js → BriefingsScreen-BTsvr5fv.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-CaFe6kdh.js → BrokerMetadataPanel-jg7odHQp.js} +1 -1
- package/dist/client/assets/BrokerScreen-DplF8d_X.js +5 -0
- package/dist/client/assets/Canvas-BePL08RR.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-Cov54p9V.js → ChatCollapsedStrip-BRljIymi.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-C1ebFt-Y.js → CodeDiffPane-86odpBSt.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-tsCly-f3.js → CodeProjectPicker-8svr_S_A.js} +1 -1
- package/dist/client/assets/{CodeScreen-D0hpZNLP.js → CodeScreen-CJ2RgB32.js} +1 -1
- package/dist/client/assets/{ContextMenu-N-Z6X0Z1.js → ContextMenu-CxkmFQcN.js} +1 -1
- package/dist/client/assets/{ConversationComposer-CiEF7dhd.js → ConversationComposer-CWohCCmn.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-IWh0JSIL.js +1 -0
- package/dist/client/assets/{ConversationHeader-BGgbITvr.js → ConversationHeader-BxTzXl8e.js} +1 -1
- package/dist/client/assets/ConversationPanels-D9UCwNkS.js +2 -0
- package/dist/client/assets/ConversationScreen-oZSitVtX.js +1 -0
- package/dist/client/assets/{ConversationStatus-COEj5loj.js → ConversationStatus-B6pAbo2w.js} +1 -1
- package/dist/client/assets/{DataTable-BoofV-_4.js → DataTable-CGw5CECG.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-OXYlMbT1.js → DispatchAftermath-DowTb7uO.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-BCG2kOmd.js → DocumentFocusViewer-DRKjNG9s.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C2SZvrHJ.js → EmbeddableSurfacesLab-CxfJXS2g.js} +1 -1
- package/dist/client/assets/{EmptyState-DypEjx0V.js → EmptyState-BUvllvA6.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CXCq-oKj.js → FileViewerPane-BM4AD_bo.js} +1 -1
- package/dist/client/assets/{FleetSearch-Dj7-CfNi.js → FleetSearch-CYeWn85V.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-DYJJ3Z2B.js +1 -0
- package/dist/client/assets/{FollowScreen-DRgYuAvp.js → FollowScreen-DG0osbUp.js} +1 -1
- package/dist/client/assets/{HarnessMark-BE-YSyci.js → HarnessMark-MztYnrGK.js} +1 -1
- package/dist/client/assets/HarnessesScreen-BWqirBjK.js +1 -0
- package/dist/client/assets/{HerdrSession-DKFCJMst.js → HerdrSession-6sFln7WX.js} +1 -1
- package/dist/client/assets/{HomeHero-CAEg8Yg5.js → HomeHero-BPBArHXa.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-C2EZsQ5i.js → KnowledgeSearchInspector-BOIhFWd2.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-BP8tD-Bh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-DrPXYZvQ.js → LaneToolHoverCard-CcEiQC6B.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-B4i1Ut4R.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-X4-DDFEo.js → LaneTraceEventFocus-Bl9L0EYb.js} +1 -1
- package/dist/client/assets/{MeshCanvas-rtCBD7s6.js → MeshCanvas-ZjIuMiRo.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CuvXOkc7.js → MeshCanvasMinimap-C-LQtiX6.js} +1 -1
- package/dist/client/assets/MeshScreen-Bs3soujg.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CeTShs-U.js → MeshTopologyView-C0LUyT3K.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-Cs9u-F_3.js → MessageComposerSuggestions-Dfc3PH2y.js} +1 -1
- package/dist/client/assets/MessagesScreen-TgSL5KMc.js +1 -0
- package/dist/client/assets/{MissionContextRail-0O-Zu1Tn.js → MissionContextRail-CjGAEGu8.js} +1 -1
- package/dist/client/assets/MissionControlView-D629w2A8.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-LnjmqBiW.js → MissionFocusOverlay-Bubrr8Gc.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-nc1Jyq3D.js → MissionLeftAgentRow-DokImu4Y.js} +1 -1
- package/dist/client/assets/{MissionLogPane-lZ9vUftY.js → MissionLogPane-Cs0LuIkn.js} +1 -1
- package/dist/client/assets/{NewAgentModal-K1cvdmZr.js → NewAgentModal-D5e0YUAo.js} +1 -1
- package/dist/client/assets/{NewChatComposer-DXDxV2Mh.js → NewChatComposer-S08F6_La.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-CnjoswTG.js → NewChatOrigin-BEz6jyqf.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CRpzYf0Y.js → ObserveEmbedScreen-CHx2sEAA.js} +2 -2
- package/dist/client/assets/ObserveTextFlow-_ApDwRCO.js +2 -0
- package/dist/client/assets/{ObservedTopologyPanel-C1AQM0Mq.js → ObservedTopologyPanel-ByW7Ar7p.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-DTmnbG-h.js +88 -0
- package/dist/client/assets/OpsAgentsView-DiFuHcJs.js +1 -0
- package/dist/client/assets/OpsScreen-CCR3U_9P.js +1 -0
- package/dist/client/assets/OpsSubnav-CZs_OL2N.js +1 -0
- package/dist/client/assets/{PlanView-DDXdC19M.js → PlanView-C54eAzig.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-BEfYOaxc.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-MODhG0P6.js → ProjectAgentProfileBar-B1VpwzGD.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-C1ImgGDu.js → ProjectAgentProfileHero-B4f_AoCr.js} +1 -1
- package/dist/client/assets/ProjectsInbox-DoPZ17FC.js +2 -0
- package/dist/client/assets/{ProjectsRail-B1zrQLZe.js → ProjectsRail-CWOkZjsY.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Dse0Q6p6.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DMnfyPLE.js +1 -0
- package/dist/client/assets/Provider-DKZWuzSR.js +1 -0
- package/dist/client/assets/{RailRow-DerXOXQS.js → RailRow-DIGd3MMM.js} +1 -1
- package/dist/client/assets/RawSessionsTable-Zkl4YDvz.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B_PMJxY_.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-C9oLCcZX.js → RepoDiffEmbedScreen-VLg4caej.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-CGEMAv2Z.js → RepoDiffPageScreen-BelnvgnP.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-CB8PSVey.js → RepoDiffViewer-VrUJw33u.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-BPg_JkYW.js +2 -0
- package/dist/client/assets/{ReposScreen-BN1lVjOj.js → ReposScreen-IINK-CFn.js} +2 -2
- package/dist/client/assets/ScoutDeckSurface-MbwGp6Ab.js +1 -0
- package/dist/client/assets/{ScoutSurface-BEnDlynn.js → ScoutSurface-x_QbcRyk.js} +1 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DAKQKB25.js +2 -0
- package/dist/client/assets/{ScoutbotFxLab-fAROyIfz.js → ScoutbotFxLab-7t9JVvZg.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-CDyFJX8m.js → ScoutbotRealtimeVoiceCall-Br4bYVAx.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Hv5AJ3Fv.js → SecondaryNav-Dj30epYF.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CDRpQc3g.js → SessionEmbedScreen-s2mJ5Fg9.js} +1 -1
- package/dist/client/assets/{SessionObserve-BmmJ8dEh.js → SessionObserve-DaUrJCMq.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-CEedIk2a.js → SessionObserveEvidence-ClUW8jpV.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DLZNFZFK.js +1 -0
- package/dist/client/assets/SessionsScreen-D-hN1n4k.js +1 -0
- package/dist/client/assets/{SettingsDrawer-DL-SVLdd.js → SettingsDrawer-BFsnww-k.js} +3 -3
- package/dist/client/assets/SettingsScreen-Bc3Xtv5V.js +1 -0
- package/dist/client/assets/{ShikiPane-B7O4if20.js → ShikiPane-Dkwyx--r.js} +1 -1
- package/dist/client/assets/{SlidePanel-B3gc5HnM.js → SlidePanel-CuTeirnk.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-BpQDpOkq.js → SpriteAvatar-DQ3PTb8L.js} +1 -1
- package/dist/client/assets/{StatusPill-B33sQinT.js → StatusPill-BJ1ierIR.js} +1 -1
- package/dist/client/assets/{TailView-DL3YZkzE.js → TailView-CufWcrvf.js} +2 -2
- package/dist/client/assets/Terminal-D_OmdFmr.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-D21ytNXW.js +1 -0
- package/dist/client/assets/TerminalRelay-rvUzI9Ek.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-DRjctOIt.js → TextDocumentSurface-Bc-kHPgG.js} +1 -1
- package/dist/client/assets/{TmuxPeek-DNC4uWky.js → TmuxPeek-DLyDkq_D.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-WLN0V-Xv.js → VoicePermissionsPanel-CD903y9K.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-D2Yl0mYZ.js → WorkDetailScreen-D51oI0dH.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-BbVfcUN-.js → WorkFilesViewer-BDMNbxE4.js} +1 -1
- package/dist/client/assets/{activity-BxwKkT8z.js → activity-BvGruxWG.js} +1 -1
- package/dist/client/assets/{addon-fit-B9O2vJoh.js → addon-fit-Cfq4Ayjd.js} +1 -1
- package/dist/client/assets/{addon-webgl-BhRZFDcn.js → addon-webgl-B8sIf9-s.js} +1 -1
- package/dist/client/assets/{agent-essentials-SrzMYEXV.js → agent-essentials-yb4wIJlX.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-DSWdGu-v.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-CPgQRenB.js → agent-lanes-model-VYQ5a68i.js} +1 -1
- package/dist/client/assets/{arc.es-NlJw-19N.js → arc.es-BBTfhvLE.js} +1 -1
- package/dist/client/assets/{arrow-left-_vS7itsV.js → arrow-left-BOht-YQu.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CcrWONpD.js → arrow-up-right-hoR8_oUz.js} +1 -1
- package/dist/client/assets/{bot-BRINYlC6.js → bot-BUK7dOPS.js} +1 -1
- package/dist/client/assets/{check-COxArFXG.js → check--esHw52j.js} +1 -1
- package/dist/client/assets/{chevron-down-DRCbnzyY.js → chevron-down-NAhBUkFd.js} +1 -1
- package/dist/client/assets/{chevron-right-CNE6QAVr.js → chevron-right-C10o7t_X.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-CAeEKaf5.js → chunk-HRAB3GC3-DF8R9rPv.js} +1 -1
- package/dist/client/assets/{clock-CyfvRmj6.js → clock-of01sAB6.js} +1 -1
- package/dist/client/assets/{code-xml--LjSM4Mv.js → code-xml-CLn3TDWF.js} +1 -1
- package/dist/client/assets/content-B-SUUhXj.js +1 -0
- package/dist/client/assets/content-BRY2vo1_.js +1 -0
- package/dist/client/assets/content-BTm0mVyD.js +1 -0
- package/dist/client/assets/content-BTqvyb5E.js +1 -0
- package/dist/client/assets/content-BjDaXmSD.js +1 -0
- package/dist/client/assets/content-BrR6deGh.js +1 -0
- package/dist/client/assets/content-C5yvBEMy.js +1 -0
- package/dist/client/assets/content-Cgj5AWqT.js +1 -0
- package/dist/client/assets/content-CkhG__-v.js +1 -0
- package/dist/client/assets/content-CudIBsiP.js +1 -0
- package/dist/client/assets/content-DBb7ppd5.js +1 -0
- package/dist/client/assets/content-DEw_kGyK.js +1 -0
- package/dist/client/assets/content-DIy0DCzK.js +1 -0
- package/dist/client/assets/content-THl9hRAo.js +1 -0
- package/dist/client/assets/content-vi9FbmV9.js +1 -0
- package/dist/client/assets/content-wcgPMGVf.js +1 -0
- package/dist/client/assets/{conversation-icons-c-hXv7hY.js → conversation-icons-ClBJi21l.js} +1 -1
- package/dist/client/assets/conversation-motion-features-zU0k3Agz.js +1 -0
- package/dist/client/assets/{copy-4LfKIdQJ.js → copy-Dty8ZYsM.js} +1 -1
- package/dist/client/assets/{createLucideIcon-ClCdc3F9.js → createLucideIcon-Bt67PWH-.js} +1 -1
- package/dist/client/assets/discover-NDAqNvKt.js +2 -0
- package/dist/client/assets/embed-entry-BVR09F6e.js +2 -0
- package/dist/client/assets/{external-link-CnaI1QFS.js → external-link-Dem738OJ.js} +1 -1
- package/dist/client/assets/{eye-BFlhMzQL.js → eye-B3lBIwJZ.js} +1 -1
- package/dist/client/assets/{file-text-DG-pufl1.js → file-text-iF0hyVyU.js} +1 -1
- package/dist/client/assets/{home-moving-signal-aNJusIzL.js → home-moving-signal-C8dTXieA.js} +1 -1
- package/dist/client/assets/{home-now-card-BQK4EFHx.js → home-now-card-BgvVcE83.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-CdtzqSIF.js → home-now-card-nano-hZl9klbP.js} +1 -1
- package/dist/client/assets/hooks-DBIezYS2.js +2 -0
- package/dist/client/assets/index-BMwKgdz_.js +1 -0
- package/dist/client/assets/index-Bu-fckyR.css +1 -0
- package/dist/client/assets/index-BxoufAPA.js +1 -0
- package/dist/client/assets/index-Cj7NnSxI.js +1 -0
- package/dist/client/assets/{index-CzVeWScw.js → index-o4FKpU7Z.js} +2 -2
- package/dist/client/assets/{inspector-panel-DgOM8nCo.js → inspector-panel-Dy2cVTCi.js} +2 -2
- package/dist/client/assets/{keyboard-nav-BJnFoFDP.js → keyboard-nav-Chf51dns.js} +1 -1
- package/dist/client/assets/{lane-roster-store-pR4ZaYQm.js → lane-roster-store-BiIVlYmG.js} +1 -1
- package/dist/client/assets/left-BC7p5QbT.js +1 -0
- package/dist/client/assets/left-BCSGqccQ.js +1 -0
- package/dist/client/assets/left-BSyj8PuJ.js +2 -0
- package/dist/client/assets/left-DDnxNUxd.js +1 -0
- package/dist/client/assets/left-DLoDKxT5.js +2 -0
- package/dist/client/assets/left-O-TBH7JB.js +1 -0
- package/dist/client/assets/left-agents-Dk9Y89lb.js +1 -0
- package/dist/client/assets/left-default-B3JBRQNJ.js +1 -0
- package/dist/client/assets/left-lanes-30Oe_3RM.js +1 -0
- package/dist/client/assets/left-mission-DEl4-7xu.js +1 -0
- package/dist/client/assets/left-plan-B4qdm4Gn.js +2 -0
- package/dist/client/assets/left-rvUOB14X.js +1 -0
- package/dist/client/assets/library-DDKSLFJ_.js +1 -0
- package/dist/client/assets/{loader-circle-Byb9kSFx.js → loader-circle-4LDsy4Ke.js} +1 -1
- package/dist/client/assets/{local-agents-DBaUbP-_.js → local-agents-DIi2EacM.js} +1 -1
- package/dist/client/assets/{mentions-fbQJ2mBI.js → mentions-CvDaviLJ.js} +1 -1
- package/dist/client/assets/{mesh-ops-Cnw3vwAu.js → mesh-ops-JZwGuAPn.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Btlyc7rW.js → mesh-view-store-Du7VqIT_.js} +1 -1
- package/dist/client/assets/{message-circle-aGOfQWm2.js → message-circle-BM3XgevU.js} +1 -1
- package/dist/client/assets/{message-markup-mGF07emJ.js → message-markup-BcY1lShv.js} +1 -1
- package/dist/client/assets/{message-square-CIXda-Y7.js → message-square-ER1_q2pe.js} +1 -1
- package/dist/client/assets/{mission-control-store-CcoNeQHG.js → mission-control-store-C6w5iVfg.js} +1 -1
- package/dist/client/assets/{observe-BNFzh-7B.js → observe-3-jn4SXb.js} +1 -1
- package/dist/client/assets/{page-status-DDvNdA8s.js → page-status-0LPfBC8S.js} +1 -1
- package/dist/client/assets/{plus-CmFQp9Uj.js → plus-C-2gTcPK.js} +1 -1
- package/dist/client/assets/profile-DW80Gn5k.js +1 -0
- package/dist/client/assets/{projects-inbox-Diddml6e.js → projects-inbox-DCeD3FfV.js} +1 -1
- package/dist/client/assets/provider-BvAxRQfE.js +1 -0
- package/dist/client/assets/{radio-PauJIekM.js → radio-v7UAMZGh.js} +1 -1
- package/dist/client/assets/{refresh-cw-4oeFn1Jn.js → refresh-cw-B5To7b6B.js} +1 -1
- package/dist/client/assets/resolve-panes-BDi9Qx4R.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-HE-5eZYa.js +1 -0
- package/dist/client/assets/right-BDf_yTv6.js +1 -0
- package/dist/client/assets/{right-BcFnuse9.js → right-BvoGOUKH.js} +1 -1
- package/dist/client/assets/right-C-bgjYg-.js +1 -0
- package/dist/client/assets/right-C3JdEfYQ.js +1 -0
- package/dist/client/assets/right-CYIs2tEe.js +1 -0
- package/dist/client/assets/right-CyRCv6Up.js +1 -0
- package/dist/client/assets/right-DBYGtoRv.js +1 -0
- package/dist/client/assets/right-o3LHMiKa.js +1 -0
- package/dist/client/assets/right-oPrcx9MX.js +1 -0
- package/dist/client/assets/right-sSvBUK-j.js +1 -0
- package/dist/client/assets/{rocket-C-AskjZH.js → rocket-BQQQv2L5.js} +1 -1
- package/dist/client/assets/router-C65cZYPn.js +1 -0
- package/dist/client/assets/{runtime-picker-BCQD7d4K.js → runtime-picker-eDEvx2Mz.js} +1 -1
- package/dist/client/assets/{scope-views-BhkbIFPY.js → scope-views-BOOmgmwx.js} +1 -1
- package/dist/client/assets/{scout-voice-S5_YZ2v8.js → scout-voice-B7kXlkcl.js} +1 -1
- package/dist/client/assets/{scroll-text-BV-BB7v-.js → scroll-text-BuneRiAD.js} +1 -1
- package/dist/client/assets/{search-C3bSJluv.js → search-7_n7CxWl.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-Bg4Tc0gT.js → secondaryNavConfig-CSFDCQAf.js} +1 -1
- package/dist/client/assets/{selection-bridge-B1dmkX3P.js → selection-bridge-SlGsgHw2.js} +1 -1
- package/dist/client/assets/{send-horizontal-CqogPmbY.js → send-horizontal-DP16OOIW.js} +1 -1
- package/dist/client/assets/{server-Brw5Y1Gh.js → server-pYOMFjrT.js} +1 -1
- package/dist/client/assets/{session-catalog-9FqXmjBw.js → session-catalog-_QfQ7fhZ.js} +1 -1
- package/dist/client/assets/{session-table-1xdSxSXq.js → session-table-CYN8e4s3.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CUiOH26y.js → sliders-horizontal-D2Z8gz6J.js} +1 -1
- package/dist/client/assets/{sparkles-BjCA3Evu.js → sparkles-Bth2iK7t.js} +1 -1
- package/dist/client/assets/{sse-QcU9bikk.js → sse-CL6gctHY.js} +1 -1
- package/dist/client/assets/{tail-events-C6K7bCWB.js → tail-events-NLIWLq27.js} +1 -1
- package/dist/client/assets/{terminal-DrTkVXIj.js → terminal-By1Lw2i2.js} +1 -1
- package/dist/client/assets/{terminal-relay-BkXjjSkq.js → terminal-relay-CjkI5aUy.js} +1 -1
- package/dist/client/assets/{terminal-sessions-C3qU8tnY.js → terminal-sessions-AmSgHklm.js} +1 -1
- package/dist/client/assets/{terminal-takeover-KvmTwABa.js → terminal-takeover-7AvNpnkC.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C5sF6WBR.js → use-conversation-list-BCzY032j.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BOMPW0nl.js → use-fleet-active-asks-CJ6-oj5k.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Co05vcTV.js → use-mesh-ops-items-D5L-CKe_.js} +1 -1
- package/dist/client/assets/use-reduced-motion-CqXpVXv-.js +1 -0
- package/dist/client/assets/use-scout-dev-flags-BohC8seq.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-FtCmY-b9.js → useAgentHoverCard-RsLUYyeh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DOr5yHbT.js +1 -0
- package/dist/client/assets/usePersistentState-D3M4m2Ou.js +1 -0
- package/dist/client/assets/{usePierreRuntime-Bo4lD7Ui.js → usePierreRuntime-B4hbNWTz.js} +1 -1
- package/dist/client/assets/{wrench-CeCdjiPF.js → wrench-M4G7WtYB.js} +1 -1
- package/dist/client/assets/{x-D4X_y1j_.js → x-ynOfVadO.js} +1 -1
- package/dist/client/assets/{xterm-D2a5wrkJ.js → xterm-DZHyijPp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +41 -26
- package/dist/node/main.mjs +19 -5
- package/dist/pairing-runtime-controller.mjs +2 -2
- package/dist/runtime/broker-daemon.mjs +2 -2
- package/dist/scout-control-plane-web.mjs +21 -7
- package/dist/scout-web-server.mjs +21 -7
- package/package.json +4 -4
- package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +0 -1
- package/dist/client/assets/AgentFloorView-DMivAYHU.js +0 -1
- package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +0 -1
- package/dist/client/assets/AgentsScreen-zR6b2bUL.js +0 -1
- package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +0 -1
- package/dist/client/assets/BackToPicker-DZg_4nHL.js +0 -1
- package/dist/client/assets/BrokerScreen-Chh8sGen.js +0 -5
- package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +0 -1
- package/dist/client/assets/ConversationPanels-vI9YuQJh.js +0 -2
- package/dist/client/assets/ConversationScreen-C-PrCRz1.js +0 -1
- package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +0 -1
- package/dist/client/assets/HarnessesScreen-L-emPcXd.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +0 -1
- package/dist/client/assets/MeshScreen-D5zzTn0o.js +0 -1
- package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +0 -1
- package/dist/client/assets/MissionControlView-D2JO9u-y.js +0 -1
- package/dist/client/assets/ObserveTextFlow-DJxQc2H6.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +0 -87
- package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +0 -1
- package/dist/client/assets/OpsScreen-BeC0lieE.js +0 -1
- package/dist/client/assets/OpsSubnav-D5Bpowtk.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +0 -1
- package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +0 -2
- package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +0 -1
- package/dist/client/assets/Provider-DSsb2gLR.js +0 -1
- package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-BCpl0QCx.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-z9R_pC_U.js +0 -2
- package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +0 -1
- package/dist/client/assets/SessionsScreen-BJEjuo2X.js +0 -1
- package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +0 -1
- package/dist/client/assets/Terminal-Dp1FSGIS.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +0 -1
- package/dist/client/assets/arrow-down-D3-IbArq.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-CiZ_ICHW.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +0 -2
- package/dist/client/assets/content-7ZeCPAEt.js +0 -1
- package/dist/client/assets/content-BHUcUCH5.js +0 -1
- package/dist/client/assets/content-BUhvLPkv.js +0 -1
- package/dist/client/assets/content-BomQ5YWo.js +0 -1
- package/dist/client/assets/content-C39ELNgC.js +0 -1
- package/dist/client/assets/content-C4RYKHut.js +0 -1
- package/dist/client/assets/content-CCiZfG4H.js +0 -1
- package/dist/client/assets/content-CDpDtVI-.js +0 -1
- package/dist/client/assets/content-CO-9CeFd.js +0 -1
- package/dist/client/assets/content-CuOLxp1x.js +0 -1
- package/dist/client/assets/content-CvtLIjXS.js +0 -1
- package/dist/client/assets/content-CzwTUb9n.js +0 -1
- package/dist/client/assets/content-DQXbo2RO.js +0 -1
- package/dist/client/assets/content-DRTQ9QQb.js +0 -1
- package/dist/client/assets/content-LCELs6zg.js +0 -1
- package/dist/client/assets/content-qsDjA4Au.js +0 -1
- package/dist/client/assets/conversation-motion-features-T8vF9zED.js +0 -1
- package/dist/client/assets/discover-7Ks00w-M.js +0 -2
- package/dist/client/assets/embed-entry-n2ThmSSX.js +0 -2
- package/dist/client/assets/gestures-CxG3Dphs.js +0 -1
- package/dist/client/assets/hooks-Dst1TH7n.js +0 -2
- package/dist/client/assets/index-9as_JTUs.css +0 -1
- package/dist/client/assets/index-CU9dtwJk.js +0 -1
- package/dist/client/assets/index-Dewd56RX.js +0 -1
- package/dist/client/assets/index-_YQXKEhb.js +0 -1
- package/dist/client/assets/left-BhzPp-_E.js +0 -1
- package/dist/client/assets/left-CN1MABD0.js +0 -2
- package/dist/client/assets/left-DDgbsio7.js +0 -1
- package/dist/client/assets/left-Dpf2R9uD.js +0 -1
- package/dist/client/assets/left-HwwbMVtl.js +0 -2
- package/dist/client/assets/left-YfH0daht.js +0 -1
- package/dist/client/assets/left-agents-CYUwAy2Z.js +0 -1
- package/dist/client/assets/left-default-vEGZALPv.js +0 -1
- package/dist/client/assets/left-lanes-bphF-vlX.js +0 -1
- package/dist/client/assets/left-mission-B54-c3hq.js +0 -1
- package/dist/client/assets/left-np5USKqG.js +0 -1
- package/dist/client/assets/left-plan-BNBuDoPQ.js +0 -2
- package/dist/client/assets/library-DbCVJG_O.js +0 -1
- package/dist/client/assets/paperclip-DfpJkR4s.js +0 -1
- package/dist/client/assets/profile-s3KRbip1.js +0 -1
- package/dist/client/assets/resolve-panes-cp6eNewO.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +0 -1
- package/dist/client/assets/right-09W2JJFg.js +0 -1
- package/dist/client/assets/right-B-MKhiJ6.js +0 -1
- package/dist/client/assets/right-B91Zl8lQ.js +0 -1
- package/dist/client/assets/right-BdtMzn35.js +0 -1
- package/dist/client/assets/right-BqmKXLtf.js +0 -1
- package/dist/client/assets/right-BzeB-Dpt.js +0 -1
- package/dist/client/assets/right-CkGOs-sq.js +0 -1
- package/dist/client/assets/right-CzGiNBzB.js +0 -1
- package/dist/client/assets/right-Dc7uqv7l.js +0 -1
- package/dist/client/assets/router-B-K15T7B.js +0 -1
- package/dist/client/assets/use-reduced-motion-Dla-G_Jz.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-BOQF3fW2.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as t}from"./index-o4FKpU7Z.js";import{a as Xt,f as fs,g as xs,b as gs,p as vs,c as ks,i as bs}from"./scout-voice-B7kXlkcl.js";import"./fx-z37u1o2z.js";const Ae=1,rt="scout:surface-push";class js{constructor(n,s,a=Ss()){this.surface=n,this.currentScope=s,this.handler=a}surface;currentScope;handler;bootstrap(){return this.request("bootstrap",{})}agents={list:n=>this.request("agents.list",{},n),observe:(n,s)=>this.request("agents.observe",{agentIds:s},n)};tail={recent:(n,s)=>this.request("tail.recent",{...s?{cursor:s}:{}},n),subscribe:(n,s)=>{const a=Qt("tail.delta",s);return this.request("tail.subscribe",{},n).catch(()=>a()),a}};codex={startSession:n=>this.request("codex.session.start",{route:n}),snapshot:n=>this.request("codex.thread.snapshot",{route:n}),connect:n=>this.request("codex.thread.connect",{route:n}),start:(n,s)=>this.request("codex.turn.start",{route:n,text:s}),steer:(n,s)=>this.request("codex.turn.steer",{route:n,text:s}),interrupt:n=>this.request("codex.turn.interrupt",{route:n})};dispatch={diagnostics:(n,s)=>this.request("dispatch.diagnostics",{...s?{cursor:s}:{}},n),ask:n=>this.request("dispatch.ask",n),review:n=>this.request("dispatch.review",n),subscribe:(n,s)=>{const a=Qt("dispatch.delta",s);return this.request("dispatch.subscribe",{},n).catch(()=>a()),a}};native={setLaneSelection:async n=>{await this.request("native.setLaneSelection",{selection:n})},openExternalURL:async n=>{await this.request("native.openExternalURL",{url:n})},getPreferences:n=>this.request("native.getPreferences",{keys:n}),setPreferences:async n=>{await this.request("native.setPreferences",n)},cancel:async n=>{await this.request("native.cancel",{requestId:n})},voice:{snapshot:()=>this.request("native.voice.snapshot",{}),toggleInput:()=>this.request("native.voice.toggleInput",{}),speak:n=>this.request("native.voice.speak",{text:n}),stopOutput:()=>this.request("native.voice.stopOutput",{})}};selectedScope(){return this.currentScope()}async request(n,s,a){const r=ys(),l={v:Ae,id:r,surface:this.surface,method:n,params:s,...a?{hostIds:a.hostIds}:{}},u=await this.handler.postMessage(l);if(u.v!==Ae||u.id!==r||u.method!==n)throw new Error("Scout native surface returned a mismatched reply");if("error"in u)throw new Error(`${u.error.code}: ${u.error.message}`);return u.result}}function Ss(){const e=window.webkit?.messageHandlers?.scoutSurface;if(!e)throw new Error("Scout native surface bridge is unavailable");return e}function ys(){return globalThis.crypto?.randomUUID?.()??`surface-${Date.now()}-${Math.random().toString(16).slice(2)}`}function Qt(e,n){const s=a=>{const r=a.detail;r?.stream!==e||!("payload"in r)||n({hostId:r.hostId,cursor:{epoch:r.epoch,sequence:r.sequence,connectionRevision:r.connectionRevision},...e==="tail.delta"?{events:r.payload.events}:{records:r.payload.records}})};return window.addEventListener(rt,s),()=>window.removeEventListener(rt,s)}function _s(){window.__scoutSurface={onPush(e){window.dispatchEvent(new CustomEvent(rt,{detail:e}))}}}const ms="/api/surfaces/deck",ln="scout.surface.preferences.v1";function ws(e,n){return window.webkit?.messageHandlers?.scoutSurface?new js(e,n):new Ns(e,n)}class Ns{constructor(n,s,a=ms){this.surface=n,this.currentScope=s,this.endpoint=a}surface;currentScope;endpoint;pending=new Map;voice=new Is;async bootstrap(){const n=await this.request("bootstrap",{});if(!this.voice.inputAvailable)return n;const s=new Set(n.capabilities);return s.add("native.voice.snapshot"),s.add("native.voice.toggleInput"),this.voice.outputAvailable&&(s.add("native.voice.speak"),s.add("native.voice.stopOutput")),{...n,capabilities:[...s],device:{platform:"web",formFactor:Cs()}}}agents={list:n=>this.request("agents.list",{},n),observe:(n,s)=>this.request("agents.observe",{agentIds:s},n)};tail={recent:(n,s)=>this.request("tail.recent",{...s?{cursor:s}:{}},n),subscribe:(n,s)=>{let a=new Set;const r=async()=>{try{const u=await this.tail.recent(n);for(const p of u.hosts){if(!p.ready)continue;const k=p.value.events.filter(y=>!a.has(y.id));a=new Set(p.value.events.map(y=>y.id)),k.length>0&&s({hostId:p.hostId,cursor:p.value.cursor,events:k})}}catch{}};r();const l=window.setInterval(()=>{r()},2e3);return()=>{window.clearInterval(l)}}};codex={startSession:n=>this.request("codex.session.start",{route:n}),snapshot:n=>this.request("codex.thread.snapshot",{route:n}),connect:n=>this.request("codex.thread.connect",{route:n}),start:(n,s)=>this.request("codex.turn.start",{route:n,text:s}),steer:(n,s)=>this.request("codex.turn.steer",{route:n,text:s}),interrupt:n=>this.request("codex.turn.interrupt",{route:n})};dispatch={diagnostics:()=>Promise.reject(new Error("Dispatch is unavailable on the Deck surface.")),ask:n=>Promise.reject(new Error("Dispatch is unavailable on the Deck surface.")),review:n=>Promise.reject(new Error("Dispatch is unavailable on the Deck surface.")),subscribe:(n,s)=>()=>{}};native={setLaneSelection:async n=>{await this.request("native.setLaneSelection",{selection:n})},openExternalURL:async n=>{const s=new URL(n);if(s.protocol!=="https:")throw new Error("Only https URLs can be opened from the Deck.");window.open(s,"_blank","noopener,noreferrer")},getPreferences:async n=>({entries:Zt().filter(a=>n.includes(a.key))}),setPreferences:async n=>{const s=new Map(Zt().map(a=>[a.key,a]));for(const a of n.entries)s.set(a.key,a);localStorage.setItem(ln,JSON.stringify([...s.values()]))},cancel:async n=>{this.pending.get(n)?.abort(),this.pending.delete(n)},voice:{snapshot:()=>Promise.resolve(this.voice.snapshot()),toggleInput:()=>this.voice.toggleInput(),speak:n=>this.voice.speak(n),stopOutput:()=>this.voice.stopOutput()}};selectedScope(){return this.currentScope()}async request(n,s,a){if(this.surface!=="deck")throw new Error("The web surface transport currently supports Scout Deck only.");const r=Ts(),l=new AbortController;this.pending.set(r,l);const u={v:Ae,id:r,surface:this.surface,method:n,params:s,...a?{hostIds:a.hostIds}:{}};try{const p=await fetch(this.endpoint,{method:"POST",credentials:"same-origin",cache:"no-store",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(u),signal:l.signal});if(!p.ok){const y=await p.json().catch(()=>null);throw new Error(y?.error||`Scout Deck web bridge returned HTTP ${p.status}.`)}const k=await p.json();if(k.v!==Ae||k.id!==r||k.method!==n)throw new Error("Scout Deck web bridge returned a mismatched reply.");if("error"in k)throw new Error(`${k.error.code}: ${k.error.message}`);return k.result}finally{this.pending.delete(r)}}}class Is{live=null;inputRun=0;state={input:{state:"idle",partialText:"",finalText:"",finalCount:0,engine:"parakeet",modelReady:!0,unavailableReason:null},output:{speaking:!1}};get inputAvailable(){return typeof fetch=="function"}get outputAvailable(){return"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window}snapshot(){return{input:{...this.state.input},output:{...this.state.output}}}async toggleInput(){if(this.state.input.state==="listening"){const n=this.live;if(this.state={...this.state,input:{...this.state.input,state:"transcribing"}},n)try{await n.stop()}catch(s){this.failInput(s,this.inputRun)}return this.snapshot()}if(this.state.input.state==="preparing"||this.state.input.state==="transcribing"){const n=this.live;return this.inputRun+=1,this.live=null,await n?.cancel().catch(()=>{}),this.state={...this.state,input:{...this.state.input,state:"idle",partialText:"",unavailableReason:null}},this.snapshot()}return this.stopOutput(),this.startInput(),this.snapshot()}async speak(n){const s=n.trim();if(!s||!this.outputAvailable)return this.snapshot();window.speechSynthesis.cancel();const a=new SpeechSynthesisUtterance(s);return a.onstart=()=>{this.state={...this.state,output:{speaking:!0}}},a.onend=a.onerror=()=>{this.state={...this.state,output:{speaking:!1}}},window.speechSynthesis.speak(a),this.state={...this.state,output:{speaking:!0}},this.snapshot()}async stopOutput(){return this.outputAvailable&&window.speechSynthesis.cancel(),this.state={...this.state,output:{speaking:!1}},this.snapshot()}async startInput(){const n=++this.inputRun;this.state={...this.state,input:{...this.state.input,state:"preparing",partialText:"",unavailableReason:null}};try{let s=await Xt({surface:"scout-deck",requestPermissions:!0});if(n!==this.inputRun)return;if(!s.ready&&s.issue?.code==="microphone_not_requested"){if(await Es(1800),n!==this.inputRun)return;s=await Xt({surface:"scout-deck"})}if(!(s.ready||s.issue?.code==="microphone_not_requested")){this.state={...this.state,input:{...this.state.input,state:"unavailable",engine:s.settings.preference==="apple"?"apple":"parakeet",modelReady:!!s.settings.modelReady,unavailableReason:fs(s.issue)}};return}const r=xs();if(await r.probe({force:!0}).catch(()=>!1),n!==this.inputRun)return;const l=await r.startLive({onState:u=>this.applyInputState(u,n),onPartial:u=>{n===this.inputRun&&(this.state={...this.state,input:{...this.state.input,partialText:u}})}},{surface:"scout-deck"});if(n!==this.inputRun){await l.cancel().catch(()=>{});return}this.live=l,this.state={...this.state,input:{...this.state.input,state:"listening",engine:s.settings.preference==="apple"?"apple":"parakeet",modelReady:!!s.settings.modelReady,unavailableReason:null}},l.result.then(u=>this.finishInput(u.text,n)).catch(u=>this.failInput(u,n))}catch(s){this.failInput(s,n)}}applyInputState(n,s){if(s!==this.inputRun)return;const a=n==="recording"?"listening":n==="processing"||n==="done"?"transcribing":n==="cancelled"?"idle":n==="error"?"unavailable":"preparing";this.state={...this.state,input:{...this.state.input,state:a}}}finishInput(n,s){if(s!==this.inputRun)return;this.live=null;const a=n.trim();this.state={...this.state,input:{...this.state.input,state:a?"idle":"unavailable",partialText:"",finalText:a||this.state.input.finalText,finalCount:a?this.state.input.finalCount+1:this.state.input.finalCount,unavailableReason:a?null:"No speech was detected. Tap to try again."}}}failInput(n,s){if(s!==this.inputRun)return;this.live=null;const a=n instanceof Error?n.message:String(n),r=n instanceof Error&&n.name==="AbortError";this.state={...this.state,input:{...this.state.input,state:r?"idle":"unavailable",partialText:"",unavailableReason:r?null:a}}}}function Zt(){try{const e=JSON.parse(localStorage.getItem(ln)??"[]");return Array.isArray(e)?e:[]}catch{return[]}}function Cs(){const e=Math.min(window.screen.width,window.screen.height);return/iPad/i.test(navigator.userAgent)?"ipad":/Mobi|iPhone|Android/i.test(navigator.userAgent)&&e<700?"phone":e<1100?"tablet":"desktop"}function Es(e){return new Promise(n=>window.setTimeout(n,e))}function Ts(){return globalThis.crypto?.randomUUID?.()??`surface-${Date.now()}-${Math.random().toString(16).slice(2)}`}function st(e,n){const s=e.find(a=>a.key===n);return s?[s,...e.filter(a=>a.key!==n)]:[...e]}async function As(e,n){const s=e.filter(l=>l.transport==="codex_app_server"),r=(await Promise.allSettled(s.map(async l=>({lane:l,snapshot:await n({hostId:l.hostId,agentId:l.id})})))).flatMap(l=>l.status==="fulfilled"?[l.value]:[]);return r.find(({snapshot:l})=>l.state==="running")?.lane.key??r.find(({snapshot:l})=>l.state==="idle")?.lane.key??null}const dn=["ops","yoke","console","brief"],ct={ops:{label:"Ops",tagline:"Agent operations · routed control"},yoke:{label:"Yoke",tagline:"Two-grip cockpit · thumb-anchored"},console:{label:"Console",tagline:"Fleet board · one command bar"},brief:{label:"Brief",tagline:"Single column · command palette"}},Rs=9e3,en="scout.deck.hostScope",ce="scout.deck.lane.v1",un="scout.deck.treatment.v2",tn="scout.deck.autoSend",nn="scout.deck.voiceOut",at="scout.deck.voiceModel",Ee="scout.deck.voiceId",sn="scout.deck.voiceSpeed",ne="gpt-4o-mini-tts",ot="alloy",Os=1,an=44,Ls=160,Ds=[{id:"air",name:"MacBook Air",state:"connected"},{id:"studio",name:"Studio",state:"connected"}],se=Date.now(),Se=[Te("air","MacBook Air","01","OpenScout","codex","gpt-5.6","active","~/dev/openscout",[["tool","Verifying the native surface bundle","bun run build:native-surfaces"],["think","Mapping Deck to Scout's Codex session","Session state stays binary-native and host-scoped."],["message","Controller contract is live.","Start, steer, and interrupt map directly to the selected thread."]]),Te("studio","Studio","02","SpeakEasy","claude","opus-5","active","~/dev/SpeakEasy",[["message","Control deck reference review","Channel bank, focused stage, and restrained signal color."],["tool","Captured iPad landscape states","Connected, partial, and offline."],["think","Keep harness semantics explicit","A future Claude adapter can earn its own control vocabulary."]]),Te("air","MacBook Air","03","Hudson","claude","sonnet-5","waiting","~/dev/hudson",[["message","Waiting for operator review","One navigation decision needs attention."],["note","Candidate build is ready","No active tool call."]]),Te("studio","Studio","04","Release","codex","gpt-5.4","idle","~/dev/openscout",[["system","Last run completed","Checks passed 18 minutes ago."]])],ae={adapter:"codex_app_server",agentId:"01",threadId:"019fa45a-scout-deck",turnId:"turn_8d17",state:"running",capabilities:{connect:!0,start:!0,steer:!0,interrupt:!0,queue:!1,approvals:!1},capabilityNotes:{queue:"A Scout-managed Codex session runs one active turn at a time; Deck does not invent a client-side queue.",approvals:"Approval prompts remain runtime-owned and are not actionable from Deck yet."},snapshot:{session:{id:"019fa45a-scout-deck",name:"Rework the Deck turn flow",adapterType:"codex",status:"active",cwd:"/Users/example/dev/openscout",model:"gpt-5.6",providerMeta:{threadId:"019fa45a-scout-deck"}},currentTurnId:"turn_8d17",turns:[{id:"turn_8d11",status:"completed",startedAt:se-214e3,endedAt:se-176e3,isUserTurn:!0,blocks:[{status:"completed",block:{id:"input_8d11",turnId:"turn_8d11",type:"text",status:"completed",index:0,text:"Make Deck operate on the selected Scout-managed Codex session directly."}}]},{id:"turn_8d15",status:"completed",startedAt:se-164e3,endedAt:se-71e3,isUserTurn:!1,blocks:[{status:"completed",block:{id:"reason_8d15",turnId:"turn_8d15",type:"reasoning",status:"completed",index:0,text:"Tracing the trusted bridge to Scout's broker-managed Codex session."}},{status:"completed",block:{id:"tool_8d15",turnId:"turn_8d15",type:"action",status:"completed",index:1,action:{kind:"command",status:"completed",command:"bun run build:native-surfaces",output:"native surfaces validated"}}},{status:"completed",block:{id:"text_8d15",turnId:"turn_8d15",type:"text",status:"completed",index:2,text:"The control path is separated from Scout messaging and keeps Codex semantics visible."}}]},{id:"turn_8d17",status:"streaming",startedAt:se-43e3,isUserTurn:!1,blocks:[{status:"streaming",block:{id:"reason_8d17",turnId:"turn_8d17",type:"reasoning",status:"streaming",index:0,text:"Refining the controller hierarchy for iPad landscape."}},{status:"streaming",block:{id:"tool_8d17",turnId:"turn_8d17",type:"action",status:"streaming",index:1,action:{kind:"command",status:"running",command:"bun test scout-surface-contract",output:"running focused contract checks…"}}}]}]}},it={input:{state:"idle",partialText:"",finalText:"",finalCount:0,engine:"parakeet",modelReady:!0,unavailableReason:null},output:{speaking:!1}},Ms={defaultModelId:ne,defaultVoiceId:ot,source:"vox",models:[{id:ne,name:"GPT-4o mini TTS",provider:"openai",available:!0},{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",provider:"elevenlabs",available:!0}],voices:[{id:"alloy",name:"Alloy",provider:"openai",modelId:ne,available:!0,isDefault:!0},{id:"coral",name:"Coral",provider:"openai",modelId:ne,available:!0,isDefault:!1},{id:"fable",name:"Fable",provider:"openai",modelId:ne,available:!0,isDefault:!1},{id:"nova",name:"Nova",provider:"openai",modelId:ne,available:!0,isDefault:!1},{id:"9BWtsMINqrJLrRacOk9x",name:"Aria",provider:"elevenlabs",modelId:"eleven_multilingual_v2",available:!0,isDefault:!0}]};function $s(e){const n=e.get("treatment");if(rn(n))return n;const s=localStorage.getItem(un);return rn(s)?s:"ops"}function rn(e){return e!=null&&dn.includes(e)}function Ps(e){const n=Number(e.get("lane"));return Number.isInteger(n)?Math.min(Math.max(n-1,0),Se.length-1):0}function Vs(){const e=new URLSearchParams(window.location.search),n=e.get("preview")==="1",s=e.get("agent")?.trim()||null,a=n&&e.get("voice")==="listening"?{...it,input:{...it.input,state:"listening",partialText:"Make voice the fastest path into this active turn."}}:it,[r,l]=d.useState(()=>window.__scoutSurfaceBootstrap??null),[u,p]=d.useState(()=>$s(e)),[k,y]=d.useState(n?Se:[]),[m,U]=d.useState("all"),[E,f]=d.useState(n?Se[Ps(e)]?.key??Se[0]?.key??null:localStorage.getItem(ce)),[c,g]=d.useState(n?"ready":"waiting"),[J,Ue]=d.useState(null),[w,R]=d.useState(n?ae:null),[H,K]=d.useState(!1),[_t,T]=d.useState(null),[he,mn]=d.useState(null),[fe,xe]=d.useState(""),[wn,O]=d.useState(null),[X,V]=d.useState(null),[mt,He]=d.useState(()=>Date.now()),[Nn,Ke]=d.useState("thread"),[S,A]=d.useState(a),[wt,In]=d.useState(n),[_e,Cn]=d.useState(()=>localStorage.getItem(nn)!=="off"),[En,Nt]=d.useState(n?Ms:null),[Q,It]=d.useState(()=>localStorage.getItem(at)||ne),[me,Fe]=d.useState(()=>localStorage.getItem(Ee)||ot),[We,Tn]=d.useState(()=>{const i=Number(localStorage.getItem(sn));return Number.isFinite(i)&&i>=.5&&i<=2?i:Os}),[Ct,Z]=d.useState("idle"),[An,Rn]=d.useState(null),[Ge,On]=d.useState(()=>localStorage.getItem(tn)!=="off"),[Ln,M]=d.useState(null),[Dn,Et]=d.useState(n&&e.get("audio")==="open"),[Mn,Tt]=d.useState(()=>Array.from({length:an},()=>0)),_=d.useRef(null),At=d.useRef(s),F=d.useRef(E),Ye=d.useRef(!1),Rt=d.useRef(!1),we=d.useRef(n?0:null),ie=d.useRef(null),I=d.useRef(null),B=d.useRef(null),Ot=d.useRef(null),re=d.useRef(!1),ze=d.useRef(null),Lt=d.useRef(async()=>{}),Je=d.useRef(S);Je.current=S,F.current=E;const ge=i=>{Ot.current=i,mn(i)};d.useEffect(()=>{if(_s(),n)return;const i=ws("deck",()=>({hostIds:window.__scoutSurfaceBootstrap?.selectedHostIds??[]}));_.current=i;let o=!1,h=null,j=!1;return i.bootstrap().then(async x=>{if(o)return;window.__scoutSurfaceBootstrap=x,l(x);const b=x.selectedHostIds;if(b.length===0){g("offline"),y([]);return}const te=new Set(x.hosts.filter(P=>P.state==="connected").map(P=>P.id)),Ce=localStorage.getItem(en),us=Ce==="all"||Ce&&te.has(Ce)?Ce:x.focusedHostId&&te.has(x.focusedHostId)?x.focusedHostId:b[0]??"all";U(us);const Gt={hostIds:b},Yt=async()=>{if(!j){j=!0;try{const[P,zt]=await Promise.all([i.agents.list(Gt),i.tail.recent(Gt)]);if(o)return;const W=Bs(x.hosts,P,zt),nt=Ot.current,ke=nt?.receipt?W.find(D=>D.hostId===nt.receipt?.hostId&&D.id===nt.receipt?.agentId):null;if(ke){const D=st(W,ke.key);y(D),f(ke.key),F.current=ke.key,Ye.current=!0,localStorage.setItem(ce,ke.key),Ke("thread"),ge(null)}else{const D=At.current;At.current=null;const Jt=(D?W.find(q=>q.id===D):null)?.key??F.current??localStorage.getItem(ce),be=Jt?W.find(q=>q.key===Jt):null;if(be){const q=st(W,be.key);y(q),f(be.key),F.current=be.key,localStorage.setItem(ce,be.key)}else y(W),f(null),F.current=null,Rt.current||(Rt.current=!0,As(W,q=>i.codex.connect(q)).then(q=>{if(o||Ye.current)return;const je=q??W[0]?.key??null;je&&(y(hs=>st(hs,je)),f(je),F.current=je,localStorage.setItem(ce,je))}))}const ps=P.hosts.filter(D=>!D.ready).length+zt.hosts.filter(D=>!D.ready).length;Ue(null),g(ps>0?"partial":"ready")}catch(P){if(o)return;Ue(P instanceof Error?P.message:String(P)),g("partial")}finally{j=!1}}};await Yt(),o||(h=setInterval(()=>{Yt()},3e3))}).catch(x=>{o||(Ue(x instanceof Error?x.message:String(x)),g("error"))}),()=>{o=!0,h&&clearInterval(h),_.current=null}},[n]);const $n=n?Ds:r?.hosts??[],$=m==="all"?k:k.filter(i=>i.hostId===m),v=$.find(i=>i.key===E)??null,Xe=v?$.indexOf(v):-1,C=v?{hostId:v.hostId,agentId:v.id}:null,L=!!(v?.transport==="codex_app_server"&&(n||r?.capabilities?.includes("codex.thread.snapshot"))),ve=n||!!r?.capabilities?.includes("native.voice.snapshot"),ee=n||r?.device?.platform==="web",Pn=ee||!!r?.capabilities?.includes("native.voice.speak");d.useEffect(()=>{if(!ee||n)return;let i=!1;return gs(Q).then(o=>{if(i)return;if(Nt(o),!o.models.find(b=>b.id===Q)?.available){const b=o.models.find(te=>te.id===o.defaultModelId&&te.available)??o.models.find(te=>te.available);if(b&&b.id!==Q){It(b.id),localStorage.setItem(at,b.id);return}}if(o.voices.find(b=>b.id===me&&b.available))return;const x=o.voices.find(b=>b.isDefault&&b.available)??o.voices.find(b=>b.available);x&&(Fe(x.id),localStorage.setItem(Ee,x.id))}).catch(o=>{i||M(o instanceof Error?o.message:String(o))}),()=>{i=!0}},[ee,n,Q]),d.useEffect(()=>{if(!v){R(null);return}if(xe(""),T(null),O(null),V(null),re.current=!1,Ke(v.transport==="codex_app_server"?"thread":"signal"),ie.current=null,n){R(cn(v));return}const i=_.current;if(!i)return;R(null);let o=!1,h=null;return(async()=>{if(await i.native.setLaneSelection({hostId:v.hostId,agentId:v.id,...v.conversationId?{conversationId:v.conversationId}:{},...v.sessionId?{sessionId:v.sessionId}:{}}),o)return;if(!L){R(null);return}const j=async(x=!1)=>{try{let b=await i.codex.snapshot({hostId:v.hostId,agentId:v.id});if(x&&b.state==="disconnected"&&(V({kind:"connecting",at:Date.now()}),b=await i.codex.connect({hostId:v.hostId,agentId:v.id})),o)return;R(b),T(null)}catch(b){if(o)return;T(b instanceof Error?b.message:String(b))}};await j(!0),o||(h=setInterval(()=>{j()},2e3))})().catch(j=>{o||T(j instanceof Error?j.message:String(j))}),()=>{o=!0,h&&clearInterval(h)}},[v?.key,L,n]),d.useEffect(()=>{if(n||!ve)return;const i=_.current;if(!i)return;let o=!1;const h=async()=>{try{const x=await i.native.voice.snapshot();o||(A(x),In(!0),M(null))}catch(x){o||M(x instanceof Error?x.message:String(x))}};h();const j=setInterval(()=>{h()},320);return()=>{o=!0,clearInterval(j)}},[n,ve]),d.useEffect(()=>{if(!wt)return;const i=S.input.finalCount;if(we.current==null){we.current=i;return}if(i<=we.current)return;we.current=i;const o=S.input.finalText.trim(),h=re.current;if(re.current=!1,!o){h&&O("Nothing was transcribed — the turn was not sent.");return}const j=Js(fe,o);xe(j),h&&Lt.current(j)},[S.input.finalCount,S.input.finalText,wt,fe]),d.useEffect(()=>{const i=Xs(w);if(i){if(ie.current==null){ie.current=i.id;return}if(ie.current!==i.id){if(!_e){ie.current=i.id;return}if(!(S.input.state==="listening"||S.input.state==="transcribing")){if(ie.current=i.id,n){A(o=>({...o,output:{speaking:!0}})),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{A(o=>({...o,output:{speaking:!1}}))},1600);return}if(ee){Ft(i.text);return}_.current?.native.voice.speak(i.text).then(A).catch(o=>M(o instanceof Error?o.message:String(o)))}}}},[w,S.input.state,_e,n,ee,Q,me,We]),d.useEffect(()=>()=>{I.current&&clearTimeout(I.current),B.current?.abort()},[]);const Vn=d.useMemo(()=>$.filter(i=>i.state==="waiting"||i.state==="blocked"||i.state==="error"),[$]),Bn=$.filter(i=>ft(i.state)).length,qn=ta(v?.events??[]),Dt=S.input.state==="listening"||S.input.state==="transcribing";d.useEffect(()=>{if(S.input.state!=="listening"){Tt(Array.from({length:an},()=>0));return}let i=Je.current.input.partialText.length,o=.45;const h=setInterval(()=>{let j;if(n)o=Math.min(1,Math.max(.08,o+(Math.random()-.48)*.42)),j=o;else{const x=Je.current.input.partialText.length;j=Math.min(1,Math.max(0,x-i)/5),i=x}Tt(x=>[...x.slice(1),j])},Ls);return()=>clearInterval(h)},[S.input.state,n]);const Mt=X&&mt-X.at<Rs?X:null,Ne=he?.sourceKey===v?.key?he:null,Qe=!!(Ne&&!Ne.error),Un=Ne?.error??null,$t=!!Ne?.receipt,N=Hs({adapterAvailable:L,startingSession:Qe,thread:w,threadError:_t,pending:Mt}),Hn=Ks(N),Kn=Gs(w),Fn=!!(ve&&!H&&(N==="ready"||N==="running")),Wn=!!(L&&w&&w.state!=="disconnected"&&!H),Gn=!!(L&&(N==="running"||N==="stopping")),Yn=!!(L&&(N==="cold"||N==="failed")),zn=!!(L&&!H),Pt=!!(he&&!he.error),Vt=L||!v?null:Qe?$t?"Codex started; Scout is locating its lane.":"Scout is starting Codex for this workspace.":Pt?`Scout is finishing the Codex launch for ${he?.sourceName??"another workspace"}.`:v.projectRoot?c!=="ready"&&c!=="partial"?"Reconnect the Scout host to start Codex.":!n&&!r?.capabilities?.includes("codex.session.start")?"This Scout host cannot start Codex from Deck.":null:"Scout does not know this lane's workspace.",Bt=!!(!L&&v&&!Vt);d.useEffect(()=>{if(!X)return;(X.kind==="sending"?w?.state==="running":X.kind==="stopping"?w?.state==="idle":w?.state==="idle"||w?.state==="running")&&V(null)},[X,w?.state]);const qt=N==="running"||N==="sending"||N==="stopping"||N==="linking"||N==="starting"||Dt;d.useEffect(()=>{if(!qt)return;const i=setInterval(()=>He(Date.now()),1e3);return He(Date.now()),()=>clearInterval(i)},[qt]);const Jn=i=>{p(i),Et(!1),localStorage.setItem(un,i)},Ze=i=>{Ye.current=!0,F.current=i.key,f(i.key),localStorage.setItem(ce,i.key)},Xn=i=>{if($.length===0)return;const h=((Xe<0?0:Xe)+i+$.length)%$.length,j=$[h];j&&Ze(j)},Qn=i=>{U(i),f(null),localStorage.setItem(en,i)},et=async()=>{n||!C||!_.current||R(await _.current.codex.snapshot(C))},Zn=async()=>{if(!(!C||H)){if(O(null),n){R(v?cn(v):null);return}K(!0);try{await et(),T(null)}catch(i){T(i instanceof Error?i.message:String(i))}finally{K(!1)}}},Ut=async()=>{if(!(!C||H)){K(!0),T(null),O(null),V({kind:"connecting",at:Date.now()});try{n?R({...ae,agentId:C.agentId,state:"idle",turnId:null}):_.current&&R(await _.current.codex.connect(C))}catch(i){V(null),T(i instanceof Error?i.message:String(i))}finally{K(!1)}}},Ht=async()=>{if(!C||!v||Pt||!Bt)return;const i={sourceKey:v.key,sourceName:v.name,receipt:null,error:null};ge(i),O(null);try{if(n){const x=Se.find(b=>b.transport==="codex_app_server");x&&Ze(x),ge(null);return}const o=_.current,h=r?.selectedHostIds;if(!o||!h?.length)throw new Error("No connected Scout host can start Codex.");const j=await o.codex.startSession(C);ge({...i,receipt:j})}catch(o){const h=o instanceof Error?o.message:String(o);ge({...i,error:h}),F.current===i.sourceKey&&O(h)}},Ie=async i=>{const o=i.trim();if(o){if(!C||!w){O("No Codex session is connected — the transcript is still in the composer.");return}if(H){O("A turn is already being sent — the transcript is still in the composer.");return}K(!0),T(null),O(null),V({kind:"sending",at:Date.now()});try{const h=w.state==="running"?"steer":"start";n?R(qs(w,o,h)):_.current&&(h==="steer"?await _.current.codex.steer(C,o):await _.current.codex.start(C,o),await new Promise(j=>setTimeout(j,180)),await et()),xe("")}catch(h){V(null),xe(o),T(h instanceof Error?h.message:String(h))}finally{K(!1)}}};Lt.current=Ie;const es=i=>{i?.preventDefault(),Ie(fe)},ts=async()=>{if(!(!C||!w||H)){K(!0),T(null),O(null),V({kind:"stopping",at:Date.now()});try{n?R(Us(w)):_.current&&(await _.current.codex.interrupt(C),await new Promise(i=>setTimeout(i,180)),await et())}catch(i){V(null),T(i instanceof Error?i.message:String(i))}finally{K(!1)}}},Kt=async()=>{if(ve){if(M(null),O(null),S.input.state!=="listening"&&S.input.state!=="transcribing"&&(B.current?.abort(),B.current=null,Z("idle")),S.input.state==="listening"?(re.current=Ge,ze.current=null):S.input.state==="transcribing"?re.current=!1:(re.current=!1,ze.current=Date.now(),He(Date.now())),n){if(I.current&&clearTimeout(I.current),S.input.state==="listening"){const i=S.input.partialText||"Make the voice loop feel immediate and obvious.";A(o=>({...o,input:{...o.input,state:"transcribing",partialText:""},output:{speaking:!1}})),I.current=setTimeout(()=>{A(o=>({...o,input:{...o.input,state:"idle",finalText:i,finalCount:o.input.finalCount+1}}))},520)}else S.input.state==="transcribing"?A(i=>({...i,input:{...i.input,state:"idle",partialText:""}})):A(i=>({...i,input:{...i.input,state:"listening",partialText:"Make the voice loop feel immediate and obvious.",unavailableReason:null},output:{speaking:!1}}));return}try{const i=await _.current?.native.voice.toggleInput();i&&A(i)}catch(i){M(i instanceof Error?i.message:String(i))}}};async function Ft(i){B.current?.abort();const o=new AbortController;B.current=o,Z("preparing"),M(null);try{const h=await vs(i,{modelId:Q,voiceId:me,speed:We,originAppId:"openscout-deck",utteranceId:`deck-${Date.now()}`,signal:o.signal});if(o.signal.aborted)return;Rn({modelId:h.modelId,voiceId:h.voiceId}),Z("speaking"),await ks(h,{signal:o.signal})}catch(h){bs(h)||M(h instanceof Error?h.message:String(h))}finally{B.current===o&&(B.current=null,Z("idle"))}}const Wt=async()=>{if(I.current&&clearTimeout(I.current),B.current?.abort(),B.current=null,Z("idle"),A(i=>({...i,output:{speaking:!1}})),!n)try{const i=await _.current?.native.voice.stopOutput();i&&A(i)}catch(i){M(i instanceof Error?i.message:String(i))}},ns=async()=>{const i=!_e;Cn(i),localStorage.setItem(nn,i?"on":"off"),i||await Wt()},ss=i=>{if(It(i),Nt(o=>n||o?.defaultModelId===i?o:null),n){const o=i==="eleven_multilingual_v2"?"9BWtsMINqrJLrRacOk9x":ot;Fe(o),localStorage.setItem(Ee,o)}localStorage.setItem(at,i)},as=i=>{Fe(i),localStorage.setItem(Ee,i)},is=i=>{const o=Math.min(2,Math.max(.5,i));Tn(o),localStorage.setItem(sn,String(o))},rs=()=>{if(n){Z("speaking"),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>Z("idle"),1400);return}if(ee){Ft("Scout voice out is ready on this Deck.");return}_.current?.native.voice.speak("Scout voice out is ready on this Deck.").then(A).catch(i=>M(i instanceof Error?i.message:String(i)))},cs=()=>{const i=!Ge;On(i),localStorage.setItem(tn,i?"on":"off")},os=i=>{i.key==="Enter"&&(i.metaKey||i.ctrlKey)&&(i.preventDefault(),Ie(fe))},tt=L?N==="cold"||N==="failed"?"connect":"talk":"start_codex",ls=()=>{if(tt==="start_codex")return void Ht();if(tt==="connect")return void Ut();Kt()},ds=Ct==="idle"?S:{...S,output:{speaking:!0}};return{preview:n,treatment:u,setTreatment:Jn,hosts:$n,hostScope:m,selectHostScope:Qn,connection:c,error:J,lanes:k,scopedLanes:$,selected:v,selectedIndex:Xe,selectLane:Ze,stepLane:Xn,attention:Vn,activeCount:Bn,laneActivity:qn,thread:w,threadBusy:H,threadError:_t,sessionBusy:Qe,sessionError:Un,sessionLaunchAccepted:$t,sessionStartUnavailableReason:Vt,notice:wn,adapterAvailable:L,voiceAvailable:ve,phase:N,phaseTone:Hn,turnStartedAt:Kn,clock:mt,livePending:Mt,listeningSince:ze.current,canTalk:Fn,canCompose:Wn,canInterrupt:Gn,canRebind:Yn,canRefresh:zn,canStartCodexSession:Bt,primaryAction:tt,onPrimary:ls,command:fe,setCommand:xe,submitTurn:Ie,onComposerSubmit:es,onComposerKeyDown:os,connectThread:Ut,startCodexSession:Ht,refreshSnapshot:Zn,interruptThread:ts,voice:ds,voiceError:Ln,voiceOutEnabled:_e,voiceOutputAvailable:Pn,cloudSpeechAvailable:ee,speechCatalog:En,speechModelId:Q,speechVoiceId:me,speechSpeed:We,speechOutputPhase:Ct,speechRoute:An,selectSpeechModel:ss,selectSpeechVoice:as,selectSpeechSpeed:is,previewSpeechVoice:rs,toggleVoiceInput:Kt,toggleVoiceOutput:ns,stopSpeaking:Wt,autoSendOnStop:Ge,toggleAutoSend:cs,inputTrace:Mn,voiceInputActive:Dt,settingsOpen:Dn,setSettingsOpen:Et,view:Nn,setView:Ke}}function Bs(e,n,s){const a=new Map(e.map(l=>[l.id,l.name])),r=new Map;for(const l of s.hosts)if(l.ready)for(const u of l.value.events){if(!u.agentId)continue;const p=`${l.hostId}:${u.agentId}`;r.set(p,[...r.get(p)??[],u])}return n.hosts.flatMap(l=>l.ready?l.value.agents.map(u=>({...u,key:`${l.hostId}:${u.id}`,hostId:l.hostId,hostName:a.get(l.hostId)??l.hostId,events:(r.get(`${l.hostId}:${u.id}`)??[]).sort((p,k)=>k.at-p.at)})):[])}function Te(e,n,s,a,r,l,u,p,k){return{key:`${e}:${s}`,hostId:e,hostName:n,id:s,name:a,handle:a.toLowerCase(),harness:r,transport:r==="codex"?"codex_app_server":"claude_stream_json",model:l,state:u,projectRoot:p,conversationId:`conversation-${s}`,sessionId:`session-${s}`,updatedAt:se-Number(s)*43e3,events:k.map(([y,m,U],E)=>({id:`${s}-${E}`,at:se-E*68e3-Number(s)*12e3,agentId:s,sessionId:`session-${s}`,kind:y,text:m,detail:U}))}}function cn(e){return e.transport!=="codex_app_server"?null:e.id==="04"?{...ae,agentId:e.id,threadId:"019fa45a-release",turnId:null,state:"idle",snapshot:ae.snapshot?{...ae.snapshot,currentTurnId:null,turns:ae.snapshot.turns.slice(0,2)}:null}:ae}function qs(e,n,s){const a=s==="steer"?e.turnId??`turn_${Date.now()}`:`turn_${Date.now()}`,r=e.snapshot;if(!r)return e;const l={id:`${s}_${Date.now()}`,turnId:a,type:s==="steer"?"reasoning":"text",status:"streaming",index:99,text:s==="steer"?`Steer received: ${n}`:n},u=s==="steer"?r.turns.map(p=>p.id===a?{...p,blocks:[...p.blocks,{status:"streaming",block:l}]}:p):[...r.turns,{id:a,status:"streaming",blocks:[{status:"streaming",block:l}],startedAt:Date.now(),isUserTurn:!0}];return{...e,state:"running",turnId:a,snapshot:{...r,currentTurnId:a,turns:u}}}function Us(e){if(!e.snapshot||!e.turnId)return{...e,state:"idle",turnId:null};const n=e.snapshot.turns.map(s=>s.id===e.turnId?{...s,status:"interrupted",endedAt:Date.now(),blocks:s.blocks.map(a=>({...a,status:"completed",block:{...a.block,status:a.block.status==="streaming"?"completed":a.block.status}}))}:s);return{...e,state:"idle",turnId:null,snapshot:{...e.snapshot,currentTurnId:null,turns:n}}}function Hs({adapterAvailable:e,startingSession:n,thread:s,threadError:a,pending:r}){return!e&&n?"starting":e?a?"failed":r?.kind==="sending"?"sending":r?.kind==="stopping"?"stopping":r?.kind==="connecting"||!s?"linking":s.state==="disconnected"?"cold":s.state==="running"?"running":"ready":"unavailable"}function Ks(e){return e==="running"||e==="sending"||e==="starting"?"live":e==="ready"?"ready":e==="cold"||e==="failed"?"attention":"quiet"}function pt(e,n){return e==="unavailable"?Y(n):e==="starting"?"Starting Codex":e==="cold"?"Session offline":e==="linking"?"Linking":e==="failed"?"Connection failed":e==="sending"?"Sending":e==="stopping"?"Stopping":e==="running"?"Turn running":"Ready"}function Fs(e,n,s,a,r,l=null){if(a)return a;if(e==="unavailable")return l??"Scout sees this lane · Codex not started";if(e==="starting")return l??"Scout is starting a Codex session for this workspace…";if(e==="failed")return s??"The host did not answer.";if(e==="cold")return"Connect restores Scout's managed Codex session.";if(e==="linking")return"Connecting to Scout's managed Codex session…";if(e==="sending")return"Waiting for Codex to accept the turn…";if(e==="stopping")return"Interrupt sent; waiting for the turn to end…";if(e==="running")return Ws(n);const u=Ys(n);return u?`Idle · last turn ended ${de(u)} ago`:"Idle · no turns yet in this session"}function Ws(e){const n=pn(e);if(!n)return"Streaming…";for(let s=n.blocks.length-1;s>=0;s-=1){const a=n.blocks[s];if(!(!a||a.status!=="streaming")){if(a.block.type==="action"){const r=a.block.action?.command??a.block.action?.toolName??a.block.action?.path;return r?`Running ${r}`:"Running an action"}if(a.block.type==="reasoning")return"Thinking";if(a.block.type==="text")return"Writing a reply"}}return"Streaming…"}function pn(e){return(e?.snapshot?.turns??[]).find(s=>s.id===e?.turnId)??null}function Gs(e){return pn(e)?.startedAt??null}function Ys(e){const n=e?.snapshot?.turns??[];for(let s=n.length-1;s>=0;s-=1){const a=n[s]?.endedAt;if(a)return a}return null}function zs(e){const{phase:n,turnStartedAt:s,livePending:a,clock:r}=e;return n==="sending"&&a?lt(r-a.at):(n==="running"||n==="stopping")&&s?lt(r-s):""}function lt(e){const n=Math.max(0,Math.floor(e/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function Js(e,n){const s=n.trim();return s?e.trim()?`${e}${/\s$/.test(e)?"":" "}${s}`:s:e}function Xs(e){const n=e?.snapshot?.turns??[];for(let s=n.length-1;s>=0;s-=1){const a=n[s];if(!(!a||a.isUserTurn||a.status!=="completed"))for(let r=a.blocks.length-1;r>=0;r-=1){const l=a.blocks[r],u=l?.block.type==="text"?Oe(l.block):"";if(l?.status==="completed"&&u)return{id:l.block.id,text:u}}}return null}function hn(e,n=9){return(e.snapshot?.turns??[]).flatMap(s=>s.blocks.map(a=>({role:s.isUserTurn?"operator":"codex",at:s.startedAt,status:a.status,block:a.block}))).filter(s=>!!Oe(s.block)).slice(-n)}function Oe(e){return e.type==="action"?e.action?.command??e.action?.toolName??e.action?.path??e.action?.agentName??"Codex action":e.text?.trim()||e.message?.trim()||""}function dt(e){return e.type!=="action"?"":e.action?.output?.trim()||(e.action?.kind?`${e.action.kind.replaceAll("_"," ")} · ${e.action.status}`:"")}function Qs(e){return e==="ready"?"Host connected":e==="partial"?"Host degraded":e==="error"?"Host unavailable":e==="offline"?"Host disconnected":"Connecting to host"}function pe(e){return e?e==="codex_app_server"?"Scout app-server":e:"transport unreported"}function Zs(e){return e?e==="codex_app_server"?"App server":e:"unreported"}function ht(e){const n=e?.snapshot?.session?.name?.trim();return n||null}function ea(e){return e==="ready"?"online":e==="partial"?"degraded":e==="error"?"error":e==="offline"?"offline":"connecting"}function le(e){return e.state==="waiting"||e.state==="blocked"||e.state==="error"?"attention":ft(e.state)?"live":"quiet"}function Y(e){return ft(e)?"Agent active":e==="waiting"||e==="blocked"?"Needs attention":e==="error"?"Agent error":e==="idle"||e==="available"?"Idle":e?e.replaceAll("_"," "):"Standing by"}function ft(e){return e==="live"||e==="working"||e==="active"||e==="running"||e==="in_flight"}function de(e){if(!e)return"—";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return`${n}s`;const s=Math.floor(n/60);return s<60?`${s}m`:`${Math.floor(s/60)}h`}function z(e){return e.length<=12?e:`${e.slice(0,5)}…${e.slice(-5)}`}function ta(e,n=28,s=5*6e4){const a=Date.now(),r=a-s,l=Array.from({length:n},()=>0);for(const u of e){if(u.at<r||u.at>a)continue;const p=Math.min(n-1,Math.floor((u.at-r)/s*n));l[p]+=u.kind==="message"||u.kind==="ask"?2:1}return l.map(u=>Math.min(6,u))}function na(e,n,s){return e==="start_codex"?n==="starting"?"starting":"start codex":e==="connect"?n==="failed"?"retry":"connect":s==="listening"?"send":s==="transcribing"?"…":s==="preparing"?"warming":s==="unavailable"?"voice off":n==="linking"?"linking":n==="sending"?"sending":n==="stopping"?"stopping":n==="running"?"steer":"talk"}function fn(e,n,s,a=null){return e==="start_codex"?n==="starting"?a??"Scout is starting a Codex session for this workspace":a??"Start a Scout-managed Codex session for this workspace":e==="connect"?"Reconnect Scout's managed Codex session":s==="listening"?"Stop dictation and send the turn":s==="transcribing"?"Transcribing dictation":n==="running"?"Speak to steer the active turn":"Speak to start a turn"}function sa(e){const{voice:n,voiceAvailable:s,phase:a,listeningSince:r,clock:l,sessionError:u}=e;if(!s)return"Native voice becomes available inside the Scout iPad app.";if(n.input.state==="listening"){const p=r?` · ${lt(l-r)}`:"";return`${n.input.partialText||"Listening — speak naturally."}${p}`}return n.input.state==="transcribing"?"Transcribing on device, then sending…":n.input.state==="preparing"?"Warming Parakeet; Apple Speech remains available as fallback.":n.input.state==="unavailable"?n.input.unavailableReason||"Microphone access is unavailable.":u||(a==="starting"?e.sessionLaunchAccepted?"Codex started; waiting for its Scout lane.":"Scout is starting Codex.":a==="unavailable"?e.canStartCodexSession?"Voice becomes available with the Codex session.":e.sessionStartUnavailableReason??"Codex launch is unavailable for this lane.":a==="cold"||a==="failed"?"Reconnect the Codex session before talking to it.":a==="running"?"Tap to talk, tap again to steer the running turn.":"Tap to talk, tap again to send.")}function xt(e){return e==="listening"?"listening":e==="transcribing"?"processing":e==="preparing"?"warming":e==="unavailable"?"blocked":"ready"}function xn(e,n){return e==="starting"?"Composer unlocks when the Codex lane appears.":e==="unavailable"?"Composer unlocks with a Codex session.":e==="cold"||e==="failed"?"Reconnect the Codex session to enable typing.":n==="listening"?"Speaking… the transcript sends when you tap send.":n==="transcribing"?"Finishing your transcript…":e==="running"?"Or type a redirect for this active turn…":"Or type what this session should do next…"}function gn(){return t.jsxs("svg",{className:"deck-glyph deck-glyph--mic",viewBox:"0 0 32 32","aria-hidden":"true",children:[t.jsx("rect",{x:"11",y:"4",width:"10",height:"16",rx:"5"}),t.jsx("path",{d:"M7.5 15.5v.8a8.5 8.5 0 0 0 17 0v-.8M16 24.8V29M11.5 29h9"})]})}function ue(){return t.jsx("svg",{className:"deck-glyph deck-glyph--mic",viewBox:"0 0 32 32","aria-hidden":"true",children:t.jsx("path",{d:"M13 19l6-6M11.5 14.5 9 17a4.6 4.6 0 0 0 6.5 6.5l2.5-2.5M20.5 17.5 23 15a4.6 4.6 0 0 0-6.5-6.5L14 11"})})}function gt(){return t.jsx("svg",{className:"deck-glyph",viewBox:"0 0 20 20","aria-hidden":"true",children:t.jsx("path",{d:"M3.5 8h3l4-3.2v10.4L6.5 12h-3zM13.3 7.2a4 4 0 0 1 0 5.6M15.6 5a7 7 0 0 1 0 10"})})}function Le(){return t.jsx("svg",{className:"deck-glyph",viewBox:"0 0 20 20","aria-hidden":"true",children:t.jsx("rect",{x:"5.5",y:"5.5",width:"9",height:"9",rx:"1.6"})})}function vn(){return t.jsxs("svg",{className:"deck-glyph",viewBox:"0 0 20 20","aria-hidden":"true",children:[t.jsx("path",{d:"M3 6h6M13 6h4M3 14h4M11 14h6"}),t.jsx("circle",{cx:"11",cy:"6",r:"2.1"}),t.jsx("circle",{cx:"9",cy:"14",r:"2.1"})]})}function ut(){return t.jsxs("svg",{className:"deck-glyph",viewBox:"0 0 20 20","aria-hidden":"true",children:[t.jsx("path",{d:"M16.5 8.2A6.6 6.6 0 0 0 4.6 6.4M3.5 11.8a6.6 6.6 0 0 0 11.9 1.8"}),t.jsx("path",{d:"M16.8 4.2v4h-4M3.2 15.8v-4h4"})]})}function Re({dir:e}){const n={up:180,down:0,left:90,right:-90}[e];return t.jsx("svg",{className:"deck-glyph",viewBox:"0 0 20 20","aria-hidden":"true",style:{transform:`rotate(${n}deg)`},children:t.jsx("path",{d:"M5 8l5 5 5-5"})})}function aa({model:e}){return t.jsx("div",{className:"deck-switch",role:"group","aria-label":"Controller treatment",children:dn.map(n=>t.jsxs("button",{type:"button",className:"deck-switch__key","data-active":e.treatment===n||void 0,onClick:()=>e.setTreatment(n),"aria-pressed":e.treatment===n,title:ct[n].tagline,children:[ct[n].label,n==="ops"?t.jsx("em",{children:"default"}):null]},n))})}function kn({model:e,size:n="md"}){const s=ht(e.thread),a=!!e.thread?.threadId;return e.adapterAvailable?t.jsxs("div",{className:"deck-binding","data-size":n,"data-bound":a||void 0,children:[t.jsx("span",{className:"deck-binding__label",children:"Scout Codex session"}),t.jsx("strong",{title:s??void 0,children:a?s??"Untitled session":"No session connected"}),t.jsxs("span",{className:"deck-binding__id",children:[e.thread?.threadId?`id ${z(e.thread.threadId)}`:"id —",e.thread?.turnId?` · turn ${z(e.thread.turnId)}`:""]})]}):t.jsxs("div",{className:"deck-binding","data-size":n,children:[t.jsx("span",{className:"deck-binding__label",children:"Selected workspace"}),t.jsx("strong",{children:e.selected?.name??"No lane selected"}),t.jsx("span",{className:"deck-binding__id",children:e.selected?.projectRoot??e.sessionStartUnavailableReason??`${pe(e.selected?.transport)} · view only`})]})}function De({model:e,compact:n=!1}){const s=e.selected;if(!s)return null;const a=zs(e);return t.jsxs("div",{className:"deck-phase","data-tone":e.phaseTone,"data-phase":e.phase,"data-compact":n||void 0,"aria-live":"polite","aria-atomic":"true",children:[t.jsxs("span",{className:"deck-phase__state",children:[t.jsx("i",{className:"deck-lamp"}),pt(e.phase,s.state)]}),t.jsx("span",{className:"deck-phase__detail",children:Fs(e.phase,e.thread,e.threadError,e.notice,s,e.sessionStartUnavailableReason)}),a?t.jsx("span",{className:"deck-phase__clock","data-live":e.phase==="running"||void 0,children:a}):null]})}function Me({model:e,size:n="lg"}){const s=e.primaryAction==="start_codex"?e.sessionBusy?"starting":"start":e.primaryAction==="connect"?"connect":e.voice.input.state,a=fn(e.primaryAction,e.phase,e.voice.input.state,e.sessionStartUnavailableReason),r=e.primaryAction==="start_codex"?!e.canStartCodexSession:e.primaryAction==="connect"?e.threadBusy:!e.canTalk;return t.jsxs("button",{type:"button",className:"deck-primary","data-size":n,"data-action":e.primaryAction,"data-state":s,onClick:e.onPrimary,disabled:r,"aria-label":a,"aria-pressed":e.primaryAction==="talk"?e.voice.input.state==="listening":void 0,"aria-busy":e.primaryAction==="start_codex"&&e.sessionBusy?!0:void 0,title:a,children:[e.primaryAction==="talk"?t.jsx(gn,{}):t.jsx(ue,{}),t.jsx("small",{children:na(e.primaryAction,e.phase,e.voice.input.state)})]})}function bn({model:e,block:n=!1}){return e.canInterrupt?t.jsxs("button",{type:"button",className:"deck-stop","data-block":n||void 0,onClick:e.interruptThread,disabled:e.threadBusy||e.phase==="stopping",children:[t.jsx(Le,{}),t.jsx("span",{children:e.phase==="stopping"?"Stopping":"Stop turn"})]}):null}function $e({model:e}){const n=e.voice.input.state==="listening";return t.jsxs("div",{className:"deck-trace-wrap","data-live":n||void 0,children:[t.jsx("span",{className:"deck-trace__label",title:"The surface contract reports no microphone level, so the Deck plots transcript cadence instead.",children:n?"Listening · cadence":"Input cadence"}),t.jsx("div",{className:"deck-trace","data-live":n||void 0,"aria-hidden":"true",children:e.inputTrace.map((s,a)=>t.jsx("i",{style:{"--level":s}},a))})]})}function ia({model:e}){return t.jsxs("div",{className:"deck-activity","aria-label":"Lane activity over the last five minutes",children:[t.jsx("small",{children:"5m"}),t.jsx("div",{"aria-hidden":"true",children:e.laneActivity.map((n,s)=>t.jsx("i",{style:{"--level":n}},s))}),t.jsx("small",{children:"now"})]})}function Pe({model:e}){return t.jsxs("p",{className:"deck-caption","data-active":e.voiceInputActive||void 0,"data-error":!!e.voiceError||void 0,"aria-live":"polite",children:[t.jsx("i",{"aria-hidden":"true"}),t.jsx("span",{children:e.voiceError??sa(e)})]})}function vt({model:e,rows:n=2}){return t.jsxs("form",{className:"deck-composer",onSubmit:e.onComposerSubmit,"aria-busy":e.threadBusy||void 0,children:[t.jsx("textarea",{value:e.command,onChange:s=>e.setCommand(s.target.value),onKeyDown:e.onComposerKeyDown,placeholder:xn(e.phase,e.voice.input.state),disabled:!e.canCompose,rows:n,"aria-label":e.phase==="running"?"Steer the active Codex turn":"Start a Codex turn"}),t.jsxs("button",{type:"submit",className:"deck-send",disabled:!e.canCompose||!e.command.trim(),children:[e.phase==="running"?"Steer":"Send",t.jsx("em",{children:"⌘↵"})]})]})}function ye(e,n){return`${e} — ${n}`}function kt({model:e,label:n=!0}){const s=e.voice.output.speaking?"Speaking":e.voiceOutEnabled?"Voice out":"Muted",a=e.voiceOutputAvailable?e.voice.output.speaking?"spoken replies are on and playing now":e.voiceOutEnabled?"spoken replies are on":"spoken replies are off":"spoken replies unavailable on this host";return t.jsxs("button",{type:"button",className:Ve("deck-chip deck-chip--voice",n),"data-active":e.voiceOutEnabled||void 0,"data-speaking":e.voice.output.speaking||void 0,onClick:e.toggleVoiceOutput,disabled:!e.voiceOutputAvailable,"aria-pressed":e.voiceOutEnabled,"aria-label":ye(s,a),title:ye(s,a),children:[t.jsx(gt,{}),n?t.jsx("span",{children:s}):null]})}function jn({model:e,label:n=!0}){const s=ye("Audio",e.settingsOpen?"dictation and playback settings, open":"dictation and playback settings");return t.jsxs("button",{type:"button",className:Ve("deck-chip",n),"data-active":e.settingsOpen||void 0,onClick:()=>e.setSettingsOpen(!e.settingsOpen),"aria-expanded":e.settingsOpen,"aria-label":s,title:s,children:[t.jsx(vn,{}),n?t.jsx("span",{children:"Audio"}):null]})}function Sn({model:e,label:n=!0}){const s=ye("Re-read",e.canRefresh?"pull the connected session snapshot from the host again":"unavailable until a session is connected");return t.jsxs("button",{type:"button",className:Ve("deck-chip",n),onClick:e.refreshSnapshot,disabled:!e.canRefresh,"aria-label":s,title:s,children:[t.jsx(ut,{}),n?t.jsx("span",{children:"Re-read"}):null]})}function yn({model:e,label:n=!0}){if(!e.canRebind)return null;const s=e.phase==="failed"?"Retry link":"Reconnect",a=ye(s,e.phase==="failed"?"the last connection failed; reconnect Scout's managed Codex session":"connect Scout's managed Codex session");return t.jsxs("button",{type:"button",className:Ve("deck-chip deck-chip--warn",n),onClick:e.connectThread,disabled:e.threadBusy,"aria-label":a,title:a,children:[t.jsx(ue,{}),n?t.jsx("span",{children:s}):null]})}function Ve(e,n){return n?e:`${e} deck-chip--icon`}function Be({model:e}){if(!e.settingsOpen)return null;const n=e.speechCatalog?.models.find(r=>r.id===e.speechModelId),s=e.speechCatalog?.voices.find(r=>r.id===e.speechVoiceId&&r.modelId===e.speechModelId),a=e.speechOutputPhase==="preparing"?"Synthesizing through Scout…":e.voice.output.speaking?"A reply is being spoken now.":"Ready for the next completed reply.";return t.jsxs("div",{className:"deck-sheet",role:"dialog","aria-label":"Audio and dictation settings",children:[t.jsxs("header",{children:[t.jsx("strong",{children:"Audio & dictation"}),t.jsx("button",{type:"button",className:"deck-chip",onClick:()=>e.setSettingsOpen(!1),children:"Close"})]}),t.jsxs("div",{className:"deck-sheet__row",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Spoken replies"}),t.jsx("small",{children:"Speak each completed Codex reply aloud."})]}),t.jsxs("button",{type:"button",className:"deck-toggle","data-on":e.voiceOutEnabled||void 0,onClick:e.toggleVoiceOutput,disabled:!e.voiceOutputAvailable,"aria-pressed":e.voiceOutEnabled,children:[t.jsx("i",{}),e.voiceOutEnabled?"On":"Off"]})]}),t.jsxs("div",{className:"deck-sheet__voice-grid","aria-label":"Scout speech provider and voice",children:[t.jsxs("label",{children:[t.jsx("span",{children:"Provider & model"}),t.jsx("select",{className:"deck-sheet__select",value:e.speechModelId,onChange:r=>e.selectSpeechModel(r.currentTarget.value),disabled:!e.cloudSpeechAvailable||!e.speechCatalog,children:e.speechCatalog?.models.filter(r=>ra(r.provider)).map(r=>t.jsxs("option",{value:r.id,disabled:!r.available,children:[on(r.provider)," · ",r.name,r.available?"":" · unavailable"]},r.id))??t.jsx("option",{children:e.speechCatalog?"No API models":"Loading Scout voices…"})})]}),t.jsxs("label",{children:[t.jsx("span",{children:"Voice"}),t.jsx("select",{className:"deck-sheet__select",value:e.speechVoiceId,onChange:r=>e.selectSpeechVoice(r.currentTarget.value),disabled:!e.cloudSpeechAvailable||!e.speechCatalog||e.speechCatalog.voices.length===0,children:e.speechCatalog?.voices.filter(r=>r.modelId===e.speechModelId&&r.available).map(r=>t.jsxs("option",{value:r.id,children:[r.name,r.language?` · ${r.language}`:""]},r.id))??t.jsx("option",{children:"Loading…"})})]})]}),t.jsxs("div",{className:"deck-sheet__pace",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Speaking pace"}),t.jsx("small",{children:"Applied by the selected Scout TTS provider."})]}),t.jsx("div",{className:"deck-segment",role:"group","aria-label":"Speaking pace",children:[[.85,"Calm"],[1,"Natural"],[1.15,"Brisk"]].map(([r,l])=>t.jsx("button",{type:"button","data-active":e.speechSpeed===r||void 0,"aria-pressed":e.speechSpeed===r,onClick:()=>e.selectSpeechSpeed(r),disabled:!e.cloudSpeechAvailable,children:l},l))})]}),t.jsxs("div",{className:"deck-sheet__row",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Stopping dictation sends"}),t.jsx("small",{children:"Off keeps the transcript in the composer for editing."})]}),t.jsxs("button",{type:"button",className:"deck-toggle","data-on":e.autoSendOnStop||void 0,onClick:e.toggleAutoSend,"aria-pressed":e.autoSendOnStop,children:[t.jsx("i",{}),e.autoSendOnStop?"On":"Off"]})]}),t.jsxs("div",{className:"deck-sheet__row",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Playback"}),t.jsx("small",{children:a})]}),t.jsxs("div",{className:"deck-sheet__playback",children:[t.jsxs("button",{type:"button",className:"deck-chip",onClick:e.previewSpeechVoice,disabled:!e.voiceOutputAvailable||e.speechOutputPhase!=="idle",children:[t.jsx(gt,{}),t.jsx("span",{children:"Hear voice"})]}),t.jsxs("button",{type:"button",className:"deck-chip deck-chip--warn",onClick:e.stopSpeaking,disabled:!e.voice.output.speaking,children:[t.jsx(Le,{}),t.jsx("span",{children:"Stop"})]})]})]}),t.jsxs("dl",{className:"deck-sheet__facts",children:[t.jsxs("div",{children:[t.jsx("dt",{children:"Voice in"}),t.jsx("dd",{children:e.voiceAvailable?e.voice.input.engine:"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Input"}),t.jsx("dd",{children:e.voiceAvailable?xt(e.voice.input.state):"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Voice out"}),t.jsx("dd",{children:n?on(n.provider):"Scout API"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Route"}),t.jsx("dd",{children:e.speechRoute?.voiceId??s?.name??e.speechVoiceId})]})]}),t.jsx("p",{className:"deck-sheet__note",children:"Scout owns both directions: Scout dictation in; OpenAI or ElevenLabs synthesis out through the paired host API."})]})}function on(e){return e.toLowerCase()==="openai"?"OpenAI":e.toLowerCase()==="elevenlabs"?"ElevenLabs":e.replace(/(^|[-_])([a-z])/g,(n,s,a)=>`${s?" ":""}${a.toUpperCase()}`)}function ra(e){const n=e.toLowerCase();return n==="openai"||n==="elevenlabs"}function ca({lane:e,index:n,model:s,onSelect:a}){const r=e.key===s.selected?.key;return t.jsxs("button",{type:"button",className:"deck-lane","data-active":r||void 0,"data-tone":r&&s.phaseTone!=="quiet"?s.phaseTone:le(e),onClick:()=>{s.selectLane(e),a?.()},"aria-pressed":r,children:[t.jsx("span",{className:"deck-lane__index",children:String(n+1).padStart(2,"0")}),t.jsxs("span",{className:"deck-lane__body",children:[t.jsx("strong",{children:e.name}),t.jsxs("small",{children:[e.hostName," · ",e.harness??"agent"," · ",Y(e.state).toLowerCase()]})]}),t.jsx("i",{className:"deck-lane__signal","aria-hidden":"true"})]})}function bt({model:e}){const{hosts:n}=e;return n.length===0?null:t.jsxs("div",{className:"deck-scope",role:"group","aria-label":"Agent lane scope",children:[n.length>1?t.jsxs("button",{type:"button",className:"deck-scope__key","data-active":e.hostScope==="all"||void 0,onClick:()=>e.selectHostScope("all"),"aria-pressed":e.hostScope==="all",children:[t.jsx("i",{"data-all":"true"}),"All hosts"]}):null,n.map(s=>t.jsxs("button",{type:"button",className:"deck-scope__key","data-state":s.state,"data-active":e.hostScope===s.id||void 0,onClick:()=>e.selectHostScope(s.id),disabled:s.state!=="connected","aria-pressed":e.hostScope===s.id,children:[t.jsx("i",{}),s.name]},s.id))]})}function _n({model:e,onPick:n}){return e.attention.length===0?t.jsx("p",{className:"deck-empty-note",children:"No lanes need intervention."}):t.jsx("div",{className:"deck-attention",children:e.attention.map(s=>t.jsxs("button",{type:"button",className:"deck-attention__row",onClick:()=>{e.selectLane(s),n?.()},children:[t.jsx("i",{"aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("strong",{children:s.name}),t.jsx("small",{children:s.events[0]?.text??"Needs review"})]})]},s.key))})}function oa({model:e,limit:n=9}){const{thread:s,adapterAvailable:a,threadBusy:r,threadError:l}=e;if(!a)return t.jsx(oe,{glyph:e.sessionBusy?"···":"CX",title:e.sessionError?"Codex did not start":e.sessionBusy?"Starting Codex":"Workspace is view-only",tone:e.sessionError?"error":void 0,children:e.sessionError??(e.sessionBusy?e.sessionLaunchAccepted?"Codex accepted the launch. Scout will switch Deck when its lane appears.":"Scout is launching a broker-managed Codex session.":e.canStartCodexSession?"This lane remains intact when Scout opens its controllable Codex session.":e.sessionStartUnavailableReason??"This workspace remains view-only.")});if(l)return t.jsxs(oe,{glyph:"!",title:"Session connection failed",tone:"error",children:[l,t.jsxs("button",{type:"button",className:"deck-chip deck-chip--warn",onClick:e.connectThread,disabled:r,children:[t.jsx(ue,{}),t.jsx("span",{children:"Retry controller"})]})]});if(!s)return t.jsx(oe,{glyph:"···",title:"Reading the Codex session",children:"Nothing is shown until the host returns a snapshot."});if(s.state==="disconnected")return t.jsxs(oe,{glyph:"CX",title:"Session is disconnected",children:["No turns are readable until Deck reconnects Scout's managed Codex session on the host.",t.jsxs("button",{type:"button",className:"deck-chip deck-chip--warn",onClick:e.connectThread,disabled:r,children:[t.jsx(ue,{}),t.jsx("span",{children:"Reconnect"})]})]});const u=hn(s,n);return u.length===0?t.jsx(oe,{glyph:"●",title:"Codex ready",tone:"connected",children:s.threadId?`Session ${z(s.threadId)} is ready. Start its first turn from the console.`:"The session is connected. Start its first turn from the console."}):t.jsx("div",{className:"deck-stream",children:u.map(p=>t.jsxs("article",{className:"deck-stream__row","data-role":p.role,"data-type":p.block.type,children:[t.jsxs("div",{className:"deck-stream__meta",children:[t.jsx("span",{children:p.role==="operator"?"YOU":p.block.type==="action"?"RUN":p.block.type==="reasoning"?"THINK":"CX"}),t.jsx("time",{children:de(p.at)})]}),t.jsxs("div",{className:"deck-stream__content",children:[t.jsx("strong",{children:Oe(p.block)}),dt(p.block)?t.jsx("p",{children:dt(p.block)}):null]}),t.jsx("span",{className:"deck-stream__status","data-live":p.status==="streaming"||void 0,children:p.status==="streaming"?"live":p.status})]},p.block.id))})}function la({lane:e}){return e.events.length===0?t.jsx(oe,{glyph:"·",title:"No recent activity",children:"Nothing has been observed on this lane recently."}):t.jsx("div",{className:"deck-stream",children:e.events.slice(0,8).map(n=>t.jsxs("article",{className:"deck-stream__row","data-kind":n.kind,children:[t.jsxs("div",{className:"deck-stream__meta",children:[t.jsx("span",{children:n.kind.toUpperCase()}),t.jsx("time",{children:de(n.at)})]}),t.jsxs("div",{className:"deck-stream__content",children:[t.jsx("strong",{children:n.text}),n.detail?t.jsx("p",{children:n.detail}):null]})]},n.id))})}function oe({glyph:e,title:n,tone:s,children:a}){return t.jsxs("div",{className:"deck-stream-empty","data-tone":s,children:[t.jsx("span",{className:"deck-stream-empty__glyph",children:e}),t.jsx("strong",{children:n}),t.jsx("p",{children:a})]})}function jt({model:e}){return t.jsxs("div",{className:"deck-tabs",role:"tablist","aria-label":"Lane view",children:[t.jsx("button",{type:"button",role:"tab","aria-selected":e.view==="thread",onClick:()=>e.setView("thread"),disabled:!e.adapterAvailable,children:"Session turns"}),t.jsx("button",{type:"button",role:"tab","aria-selected":e.view==="signal",onClick:()=>e.setView("signal"),children:"Lane signal"})]})}function St({model:e,limit:n}){return e.view==="signal"&&e.selected?t.jsx(la,{lane:e.selected}):t.jsx(oa,{model:e,limit:n})}function qe({model:e}){return t.jsxs("span",{className:"deck-connection","data-connection":e.connection,children:[t.jsx("i",{className:"deck-lamp"}),Qs(e.connection)]})}function da({model:e}){const n=e.selected;return n?t.jsxs("div",{className:"deck-identity",children:[t.jsx("h2",{children:n.name}),t.jsxs("p",{children:[t.jsx("span",{children:n.projectRoot??"Project unavailable"}),t.jsxs("em",{children:[n.hostName," · ",n.model??"default model"," · ",pe(n.transport)]})]})]}):null}function yt({model:e}){return t.jsxs("div",{className:"deck-standby",children:[t.jsx("i",{className:"deck-lamp"}),t.jsx("span",{className:"deck-kicker",children:"Deck standing by"}),t.jsx("h2",{children:e.connection==="error"?"Host unavailable":"Waiting for a connected host"}),t.jsx("p",{children:e.error??"Connect a trusted Scout host to populate live lanes and enable controls."}),t.jsx(bt,{model:e})]})}function ua({model:e}){const[n,s]=d.useState(()=>e.preview&&new URLSearchParams(window.location.search).get("palette")==="open"),[a,r]=d.useState(""),[l,u]=d.useState(0),p=d.useRef(null),k=e.selected,y=d.useMemo(()=>{const f=[{id:"start-codex",group:"Session",label:e.sessionBusy?"Starting Codex for this workspace":"Start Codex for this workspace",disabled:!e.canStartCodexSession,run:()=>{e.startCodexSession()}},{id:"talk",group:"Turn",label:e.voice.input.state==="listening"?"Stop dictation and send":"Talk to this session",hint:e.phase==="running"?"steers the running turn":"starts a turn",disabled:!e.canTalk,run:()=>{e.toggleVoiceInput()}},{id:"send",group:"Turn",label:e.phase==="running"?"Steer with composer text":"Send composer text",hint:"⌘↵",disabled:!e.canCompose||!e.command.trim(),run:()=>{e.submitTurn(e.command)}},{id:"stop",group:"Turn",label:"Interrupt the running turn",disabled:!e.canInterrupt||e.threadBusy,run:()=>{e.interruptThread()}},{id:"bind",group:"Session",label:e.phase==="failed"?"Retry the Codex connection":"Reconnect the Codex session",disabled:!e.canRebind||e.threadBusy,run:()=>{e.connectThread()}},{id:"refresh",group:"Session",label:"Re-read the session snapshot",disabled:!e.canRefresh,run:()=>{e.refreshSnapshot()}},{id:"view",group:"Session",label:e.view==="thread"?"Show lane signal":"Show session turns",run:()=>e.setView(e.view==="thread"?"signal":"thread")},{id:"voice-out",group:"Audio",label:e.voiceOutEnabled?"Mute spoken replies":"Speak replies aloud",disabled:!e.voiceOutputAvailable,run:()=>{e.toggleVoiceOutput()}},{id:"stop-speaking",group:"Audio",label:"Stop speaking now",disabled:!e.voice.output.speaking,run:()=>{e.stopSpeaking()}},{id:"auto-send",group:"Audio",label:e.autoSendOnStop?"Keep transcript in composer instead of sending":"Send when dictation stops",run:e.toggleAutoSend},{id:"audio",group:"Audio",label:"Open audio and dictation settings",run:()=>e.setSettingsOpen(!0)},{id:"ops",group:"Layout",label:"Switch to Ops (routed agent controller)",run:()=>e.setTreatment("ops")},{id:"yoke",group:"Layout",label:"Switch to Yoke (two-grip cockpit)",run:()=>e.setTreatment("yoke")},{id:"console",group:"Layout",label:"Switch to Console (fleet board)",run:()=>e.setTreatment("console")}];for(const[c,g]of e.scopedLanes.entries())f.push({id:`lane-${g.key}`,group:"Lanes",label:`${String(c+1).padStart(2,"0")} · ${g.name}`,hint:`${g.hostName} · ${Y(g.state).toLowerCase()}`,run:()=>e.selectLane(g)});for(const c of e.hosts)f.push({id:`scope-${c.id}`,group:"Lanes",label:`Scope to ${c.name}`,hint:c.state,disabled:c.state!=="connected",run:()=>e.selectHostScope(c.id)});return e.hosts.length>1&&f.push({id:"scope-all",group:"Lanes",label:"Scope to all hosts",run:()=>e.selectHostScope("all")}),f},[e]),m=d.useMemo(()=>{const f=a.trim().toLowerCase(),c=y.filter(g=>!g.disabled);return f?c.filter(g=>`${g.group} ${g.label} ${g.hint??""}`.toLowerCase().includes(f)):c},[y,a]);if(d.useEffect(()=>{u(0)},[a,n]),d.useEffect(()=>{n&&p.current?.focus()},[n]),d.useEffect(()=>{const f=c=>{if((c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="k"){c.preventDefault(),r(""),s(g=>!g);return}if(n){if(c.key==="Escape"){c.preventDefault(),s(!1);return}if(c.key==="ArrowDown"||c.key==="ArrowUp"){c.preventDefault(),u(g=>m.length===0?0:(g+(c.key==="ArrowDown"?1:-1)+m.length)%m.length);return}if(c.key==="Enter"){c.preventDefault();const g=m[l];if(!g)return;g.run(),s(!1)}}};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n,m,l]),!k)return t.jsx("div",{className:"brief brief--standby",children:t.jsx(yt,{model:e})});const U=ht(e.thread),E=!!e.thread?.threadId;return t.jsxs("div",{className:"brief",children:[t.jsxs("div",{className:"brief__column",children:[t.jsxs("header",{className:"brief__head",children:[t.jsxs("div",{className:"brief__head-top",children:[t.jsx(qe,{model:e}),t.jsxs("div",{className:"brief__head-keys",children:[t.jsx(kt,{model:e}),t.jsxs("button",{type:"button",className:"brief__jump",onClick:()=>{r(""),s(!0)},children:[t.jsxs("span",{children:[String(e.selectedIndex+1).padStart(2,"0")," / ",String(e.scopedLanes.length).padStart(2,"0")," lanes"]}),t.jsx(Re,{dir:"down"})]})]})]}),t.jsxs("span",{className:"deck-kicker brief__kicker","data-bound":E||void 0,children:[e.adapterAvailable?E?"Scout Codex session":"No session connected":e.sessionBusy?"Starting Codex":"Codex session not started"," · ",k.name," · ",k.hostName]}),t.jsx("h2",{children:E?U??"Untitled session":k.name}),t.jsxs("p",{className:"brief__meta",children:[e.thread?.threadId?`id ${z(e.thread.threadId)}`:"id —",e.thread?.turnId?` · turn ${z(e.thread.turnId)}`:""," · ",k.projectRoot??"project unavailable"," · ",k.model??"default model"," · ",pe(k.transport)]}),t.jsx(De,{model:e})]}),t.jsxs("div",{className:"brief__viewport",children:[t.jsxs("div",{className:"brief__viewport-head",children:[t.jsx(jt,{model:e}),e.canInterrupt?t.jsxs("button",{type:"button",className:"deck-stop",onClick:e.interruptThread,disabled:e.threadBusy||e.phase==="stopping",children:[t.jsx(Le,{}),t.jsx("span",{children:e.phase==="stopping"?"Stopping":"Stop turn"})]}):null]}),t.jsx("div",{className:"brief__viewport-body",children:t.jsx(St,{model:e,limit:14})})]}),t.jsxs("div",{className:"brief__dock",children:[t.jsxs("div",{className:"brief__dock-voice",children:[t.jsx(Me,{model:e,size:"lg"}),t.jsxs("div",{className:"brief__dock-trace",children:[t.jsx($e,{model:e}),t.jsx(Pe,{model:e})]}),t.jsxs("button",{type:"button",className:"brief__commands",onClick:()=>{r(""),s(!0)},"aria-haspopup":"dialog",children:["Commands",t.jsx("em",{children:"⌘K"})]})]}),t.jsx(vt,{model:e,rows:2})]})]}),n?t.jsx("div",{className:"brief__palette-scrim",onClick:()=>s(!1),children:t.jsxs("div",{className:"brief__palette",role:"dialog","aria-label":"Deck commands",onClick:f=>f.stopPropagation(),children:[t.jsx("input",{ref:p,value:a,onChange:f=>r(f.target.value),placeholder:"Run a command or jump to a lane…","aria-label":"Filter commands"}),t.jsxs("div",{className:"brief__palette-list",children:[m.length===0?t.jsx("p",{className:"deck-empty-note",children:"Nothing matches, and nothing was run."}):null,m.map((f,c)=>t.jsxs("button",{type:"button","data-active":c===l||void 0,onMouseEnter:()=>u(c),onClick:()=>{f.run(),s(!1)},children:[t.jsx("span",{className:"brief__palette-group","data-tone":f.group==="Lanes"?pa(e,f.id):void 0,children:f.group}),t.jsx("strong",{children:f.label}),f.hint?t.jsx("em",{children:f.hint}):null]},f.id))]}),t.jsx("footer",{children:"↑↓ move · ↵ run · esc close"})]})}):null,t.jsx(Be,{model:e})]})}function pa(e,n){const s=n.replace(/^lane-/,""),a=e.scopedLanes.find(r=>r.key===s);return a?le(a):void 0}function ha({model:e}){const n=e.selected;return t.jsxs("div",{className:"console",children:[t.jsxs("header",{className:"console__bar",children:[t.jsxs("div",{className:"console__bar-status",children:[t.jsx(qe,{model:e}),t.jsx(kn,{model:e,size:"md"})]}),t.jsx(De,{model:e,compact:!0}),t.jsxs("div",{className:"console__bar-controls",children:[t.jsx(bn,{model:e}),t.jsx(yn,{model:e}),t.jsx(Sn,{model:e}),t.jsx(kt,{model:e}),t.jsx(jn,{model:e}),t.jsx(Me,{model:e,size:"md"})]})]}),t.jsxs("div",{className:"console__body",children:[t.jsxs("aside",{className:"console__bank","aria-label":"Agent lanes",children:[t.jsxs("div",{className:"console__panel-head",children:[t.jsx("span",{className:"deck-kicker",children:"Lanes"}),t.jsxs("span",{className:"deck-kicker",children:[e.activeCount," live / ",e.scopedLanes.length]})]}),t.jsxs("div",{className:"console__lanes",children:[e.scopedLanes.map((s,a)=>t.jsx(ca,{lane:s,index:a,model:e},s.key)),e.scopedLanes.length===0?t.jsx("p",{className:"deck-empty-note",children:"No lanes in this scope."}):null]}),t.jsx(bt,{model:e})]}),t.jsx("section",{className:"console__stage",children:n?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"console__stage-head",children:[t.jsx(da,{model:e}),t.jsxs("div",{className:"console__meter","aria-label":"Lane activity over the last five minutes",children:[t.jsx("small",{children:"5m"}),t.jsx("div",{"aria-hidden":"true",children:e.laneActivity.map((s,a)=>t.jsx("i",{style:{"--level":s}},a))}),t.jsx("small",{children:"now"})]})]}),t.jsxs("div",{className:"console__viewport",children:[t.jsxs("div",{className:"console__panel-head",children:[t.jsx(jt,{model:e}),t.jsxs("span",{className:"deck-kicker",children:[n.hostName," / ",n.id]})]}),t.jsx("div",{className:"console__viewport-body",children:t.jsx(St,{model:e,limit:12})})]}),t.jsxs("div",{className:"console__dock",children:[t.jsx($e,{model:e}),t.jsx(Pe,{model:e}),t.jsx(vt,{model:e,rows:2})]})]}):t.jsx(yt,{model:e})}),t.jsxs("aside",{className:"console__rail","aria-label":"Session readout",children:[t.jsxs("div",{className:"console__panel-head",children:[t.jsx("span",{className:"deck-kicker",children:"Readout"}),t.jsx("span",{className:"deck-kicker",children:e.preview?"Sample":e.adapterAvailable?"Native":"—"})]}),t.jsxs("dl",{className:"console__readout",children:[t.jsxs("div",{children:[t.jsx("dt",{children:"Source"}),t.jsx("dd",{children:e.preview?"sample data":"paired host"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Bridge"}),t.jsx("dd",{children:ea(e.connection)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Session"}),t.jsx("dd",{children:e.thread?.threadId?z(e.thread.threadId):e.sessionBusy?"starting":e.adapterAvailable?"disconnected":"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Turn"}),t.jsx("dd",{children:e.thread?.turnId?z(e.thread.turnId):"none"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Voice in"}),t.jsx("dd",{children:e.voiceAvailable?xt(e.voice.input.state):"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Voice out"}),t.jsx("dd",{children:e.voiceOutputAvailable?e.voice.output.speaking?"speaking":e.voiceOutEnabled?"armed":"off":"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Queue"}),t.jsx("dd",{title:e.thread?.capabilityNotes.queue,children:e.adapterAvailable?"off":"—"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Approval"}),t.jsx("dd",{title:e.thread?.capabilityNotes.approvals,children:e.adapterAvailable?"off":"—"})]})]}),t.jsxs("div",{className:"console__panel-head",children:[t.jsx("span",{className:"deck-kicker",children:"Attention"}),t.jsx("span",{className:"deck-kicker",children:String(e.attention.length).padStart(2,"0")})]}),t.jsx(_n,{model:e}),t.jsxs("div",{className:"console__panel-head",children:[t.jsx("span",{className:"deck-kicker",children:"Fleet"}),t.jsx("span",{className:"deck-kicker",children:String(e.hosts.length).padStart(2,"0")})]}),t.jsx("div",{className:"console__fleet",children:e.hosts.map(s=>t.jsxs("div",{className:"console__fleet-row",children:[t.jsx("i",{"data-state":s.state}),t.jsxs("span",{children:[t.jsx("strong",{children:s.name}),t.jsxs("small",{children:[e.lanes.filter(a=>a.hostId===s.id).length," lanes"]})]}),t.jsx("em",{children:s.state})]},s.id))})]})]}),t.jsx(Be,{model:e})]})}function fa({model:e}){const n=e.selected,s=n?e.scopedLanes.findIndex(c=>c.key===n.key)+1:0,a=d.useMemo(()=>e.scopedLanes.flatMap((c,g)=>c.events.map(J=>({id:`${c.key}:${J.id}`,at:J.at,channel:g+1,lane:c,text:J.text,detail:J.detail??""}))).sort((c,g)=>g.at-c.at).slice(0,16),[e.scopedLanes]),r=d.useMemo(()=>n?e.view==="signal"||!e.thread?n.events.slice(0,5).reverse().map(c=>({id:c.id,label:c.kind.toUpperCase(),text:c.text,detail:c.detail??"",at:c.at,live:le(n)==="live"&&c.id===n.events[0]?.id})):hn(e.thread,5).map(c=>({id:c.block.id,label:c.role==="operator"?"YOU":c.block.type==="action"?"RUN":c.block.type==="reasoning"?"THINK":"CX",text:Oe(c.block),detail:dt(c.block),at:c.at,live:c.status==="streaming"})):[],[n,e.thread,e.view]),u=["all",...e.hosts.filter(c=>c.state==="connected").map(c=>c.id)],p=Math.max(0,u.indexOf(e.hostScope)),k=u[(p+1)%Math.max(1,u.length)]??"all",y=e.hostScope==="all"?"All hosts":e.hosts.find(c=>c.id===e.hostScope)?.name??e.hostScope;if(!n)return t.jsx("div",{className:"ops ops--standby",children:t.jsxs("div",{className:"ops__standby",children:[t.jsx(qe,{model:e}),t.jsx("strong",{children:"No agent channels are available"}),t.jsx("p",{children:e.error??"Waiting for a connected host to publish its Scout lanes."})]})});const m=ht(e.thread),U=e.connection==="ready"?"ONLINE":e.connection==="partial"?"DEGRADED":e.connection.toUpperCase(),E=e.preview?"SIMULATED":e.sessionBusy?"STARTING CODEX":e.adapterAvailable?e.thread?.threadId&&(e.connection==="ready"||e.connection==="partial")?"LIVE":e.connection==="ready"||e.connection==="partial"?"SESSION OFFLINE":"OFFLINE":e.canStartCodexSession?"READY TO START":"VIEW ONLY",f=e.preview?"8 SIMULATED CONTROLS":e.connection==="ready"||e.connection==="partial"?"8 HOST CONTROLS":"CONTROLS OFFLINE";return t.jsxs("div",{className:"ops",children:[t.jsx("section",{className:"ops__channels","aria-label":"Agent channels",children:e.scopedLanes.map((c,g)=>t.jsx(xa,{lane:c,index:g,active:c.key===n.key,model:e},c.key))}),t.jsxs("section",{className:"ops__voice","aria-label":"Routed voice control",children:[t.jsx(Me,{model:e,size:"md"}),t.jsx($e,{model:e}),t.jsxs("div",{className:"ops__voice-copy",children:[t.jsx("strong",{children:fn(e.primaryAction,e.phase,e.voice.input.state,e.sessionStartUnavailableReason).toUpperCase()}),t.jsx(Pe,{model:e})]}),t.jsxs("div",{className:"ops__routes",role:"group","aria-label":"Route dictation to agent channel",children:[t.jsx("span",{children:"ROUTE TO"}),t.jsx("div",{children:e.scopedLanes.map((c,g)=>t.jsxs("button",{type:"button","data-active":c.key===n.key||void 0,onClick:()=>e.selectLane(c),"aria-pressed":c.key===n.key,children:["CH ",g+1]},c.key))})]})]}),t.jsxs("section",{className:"ops__enclosure",children:[t.jsxs("header",{className:"ops__enclosure-head",children:[t.jsxs("span",{className:"ops__host",children:[t.jsx("i",{"data-tone":e.phaseTone}),n.hostName]}),t.jsxs("span",{className:"ops__binding",children:[e.adapterAvailable?"SCOUT APP-SERVER":pe(n.transport).toUpperCase(),t.jsx("i",{children:"·"}),m??n.projectRoot??"NO SESSION"]})]}),t.jsxs("div",{className:"ops__workspace",children:[t.jsxs("article",{className:"ops__console",children:[t.jsxs("header",{children:[t.jsx("span",{children:"agent console"}),t.jsx("strong",{"data-tone":e.phaseTone,children:pt(e.phase,n.state)})]}),t.jsxs("div",{className:"ops__agent-line",children:[t.jsx("h2",{children:n.name}),t.jsxs("span",{children:["CH ",String(s).padStart(2,"0")," · ",n.hostName.toUpperCase()]})]}),t.jsx("p",{className:"ops__task",title:m??void 0,children:m??(e.adapterAvailable?"No Codex session connected":e.sessionBusy?"Starting Codex for this workspace…":"Start Codex to control this workspace")}),t.jsx(De,{model:e,compact:!0}),t.jsx("div",{className:"ops__console-rows","data-view":e.view,children:r.length>0?r.map(c=>t.jsxs("div",{className:"ops__console-row","data-live":c.live||void 0,children:[t.jsx("i",{}),t.jsx("span",{children:c.label}),t.jsxs("p",{children:[t.jsx("strong",{children:c.text}),c.detail?t.jsx("small",{children:c.detail}):null]}),t.jsx("time",{children:de(c.at)})]},c.id)):t.jsxs("p",{className:"ops__empty",children:["No ",e.view==="thread"?"session turns":"lane signal"," reported yet."]})}),t.jsxs("form",{className:"ops__composer",onSubmit:e.onComposerSubmit,children:[t.jsx("span",{"aria-hidden":"true",children:"›"}),t.jsx("input",{value:e.command,onChange:c=>e.setCommand(c.target.value),placeholder:xn(e.phase,e.voice.input.state),disabled:!e.canCompose,"aria-label":e.phase==="running"?"Steer the active Codex turn":"Start a Codex turn"}),t.jsx("button",{type:"submit",disabled:!e.canCompose||!e.command.trim(),children:e.phase==="running"?"Steer":"Send"})]}),t.jsxs("div",{className:"ops__console-actions",children:[e.canRebind?t.jsxs("button",{type:"button",onClick:e.connectThread,disabled:e.threadBusy,children:[t.jsx(ue,{}),e.phase==="failed"?"Retry link":"Reconnect"]}):null,t.jsxs("button",{type:"button",onClick:e.refreshSnapshot,disabled:!e.canRefresh,children:[t.jsx(ut,{}),"Re-read"]}),e.canInterrupt?t.jsxs("button",{type:"button",className:"ops__danger",onClick:e.interruptThread,disabled:e.threadBusy,children:[t.jsx(Le,{}),e.phase==="stopping"?"Stopping":"Stop turn"]}):null]}),t.jsxs("footer",{children:[t.jsxs("span",{children:["MODEL ",t.jsx("strong",{children:n.model??"DEFAULT"})]}),t.jsxs("span",{children:["CONTROL ",t.jsx("strong",{children:E})]}),t.jsxs("span",{title:e.thread?.threadId??void 0,children:["SESSION ",t.jsx("strong",{children:e.thread?.threadId?z(e.thread.threadId):"—"})]})]})]}),t.jsxs("aside",{className:"ops__feed",children:[t.jsxs("header",{children:[t.jsx("span",{children:"fleet feed"}),t.jsxs("strong",{children:[e.hostScope==="all"?"ALL HOSTS":y.toUpperCase()," · ",a.length," EVENTS"]})]}),t.jsx("div",{className:"ops__feed-rows",children:a.length>0?a.map(c=>t.jsxs("button",{type:"button","data-active":c.lane.key===n.key||void 0,"data-tone":le(c.lane),onClick:()=>e.selectLane(c.lane),"aria-label":`Channel ${c.channel}, ${c.lane.name}: ${c.text}`,children:[t.jsx("time",{children:de(c.at)}),t.jsxs("span",{children:["CH ",c.channel]}),t.jsx("strong",{children:c.lane.name.toUpperCase()}),t.jsxs("p",{children:[c.text,c.detail?t.jsx("small",{children:c.detail}):null]})]},c.id)):t.jsx("p",{className:"ops__empty",children:"No fleet activity reported yet."})})]})]})]}),t.jsxs("section",{className:"ops__commands","aria-label":"Deck commands",children:[t.jsxs("header",{children:[t.jsx("span",{children:"COMMANDS"}),t.jsx("strong",{children:f})]}),t.jsxs("div",{className:"ops__command-grid",children:[t.jsx(G,{ordinal:"01",label:e.primaryAction==="start_codex"?"Start Codex":"Voice",meta:e.primaryAction==="start_codex"?e.sessionBusy?"Starting":"Workspace":xt(e.voice.input.state),icon:e.primaryAction==="start_codex"?t.jsx(ue,{}):t.jsx(gn,{}),active:e.voiceInputActive,disabled:e.primaryAction==="start_codex"?!e.canStartCodexSession:e.primaryAction==="connect"?e.threadBusy:!e.canTalk,onClick:e.onPrimary}),t.jsx(G,{ordinal:"02",label:"Session turns",meta:"Codex session",glyph:"◎",active:e.view==="thread",disabled:!e.adapterAvailable,onClick:()=>e.setView("thread")}),t.jsx(G,{ordinal:"03",label:"Lane signal",meta:"Scout tail",glyph:"≋",active:e.view==="signal",onClick:()=>e.setView("signal")}),t.jsx(G,{ordinal:"04",label:"Re-read",meta:"Session snapshot",icon:t.jsx(ut,{}),disabled:!e.canRefresh,onClick:()=>{e.refreshSnapshot()}}),t.jsx(G,{ordinal:"05",label:e.voiceOutEnabled?"Voice out":"Muted",meta:e.voice.output.speaking?"Speaking":e.voiceOutEnabled?"Armed":"Off",icon:t.jsx(gt,{}),active:e.voiceOutEnabled,disabled:!e.voiceOutputAvailable,onClick:()=>{e.toggleVoiceOutput()}}),t.jsx(G,{ordinal:"06",label:"Audio",meta:"Dictation",icon:t.jsx(vn,{}),active:e.settingsOpen,onClick:()=>e.setSettingsOpen(!e.settingsOpen)}),t.jsx(G,{ordinal:"07",label:"Host scope",meta:y,glyph:"⌾",disabled:u.length<2,onClick:()=>e.selectHostScope(k)}),t.jsx(G,{ordinal:"08",label:"Next lane",meta:`${s} / ${e.scopedLanes.length}`,icon:t.jsx(Re,{dir:"right"}),disabled:e.scopedLanes.length<2,onClick:()=>e.stepLane(1)})]})]}),t.jsxs("footer",{className:"ops__status",children:[t.jsxs("span",{className:"ops__status-online","data-connection":e.connection,children:[t.jsx("i",{}),U]}),t.jsx("span",{children:n.hostName}),t.jsxs("span",{children:["ROUTE ",t.jsxs("strong",{children:["CH ",s]})]}),e.attention.length>0?t.jsxs("span",{className:"ops__status-attn",children:["ATTN ",e.attention.length]}):null,t.jsxs("span",{children:["HOSTS ",t.jsx("strong",{children:e.hosts.length})]}),t.jsxs("span",{children:["LIVE ",t.jsx("strong",{children:e.activeCount})]}),t.jsxs("span",{children:["VIEW · ",t.jsx("strong",{children:"OPS"})]})]}),t.jsx(Be,{model:e})]})}function xa({lane:e,index:n,active:s,model:a}){const r=e.events[0],l=s&&a.phaseTone!=="quiet"?a.phaseTone:le(e);return t.jsxs("button",{type:"button",className:"ops-channel","data-active":s||void 0,"data-tone":l,onClick:()=>a.selectLane(e),"aria-pressed":s,"aria-label":`Channel ${n+1}, ${e.name}, ${Y(e.state)}`,children:[t.jsxs("span",{className:"ops-channel__head",children:[t.jsxs("small",{children:["CH ",String(n+1).padStart(2,"0")]}),t.jsx("em",{"aria-hidden":"true",children:"▰"}),t.jsx("strong",{children:e.hostName}),t.jsx("i",{}),t.jsx("small",{children:s?pt(a.phase,e.state):Y(e.state)})]}),t.jsx("span",{className:"ops-channel__rule"}),t.jsxs("span",{className:"ops-channel__identity",children:[t.jsx("strong",{children:e.name}),t.jsxs("small",{children:[e.harness??"agent"," · ",e.model??"default"]})]}),t.jsx("span",{className:"ops-channel__task",children:r?.text??e.projectRoot??"No recent activity"}),t.jsxs("span",{className:"ops-channel__signal",children:[t.jsx("i",{}),t.jsx("small",{children:r?.detail||(s?"controller selected":"tap to put on deck")}),t.jsx("time",{children:de(r?.at??e.updatedAt)})]}),t.jsxs("span",{className:"ops-channel__foot",children:[t.jsxs("strong",{children:[t.jsx("i",{}),s?"ON DECK":"TAP TO SWITCH"]}),t.jsx("small",{children:pe(e.transport).toUpperCase()})]})]})}function G({ordinal:e,label:n,meta:s,glyph:a,icon:r,active:l,disabled:u=!1,onClick:p}){return t.jsxs("button",{type:"button",className:"ops-command","data-active":l||void 0,disabled:u,onClick:p,"aria-pressed":l??void 0,title:`${n} · ${s}`,children:[t.jsx("span",{className:"ops-command__icon",children:r??a}),t.jsxs("span",{children:[t.jsx("strong",{children:n}),t.jsxs("small",{children:[e," · ",s.toUpperCase()]})]})]})}function ga({model:e}){const n=e.selected;if(!n)return t.jsx("div",{className:"yoke yoke--standby",children:t.jsx(yt,{model:e})});const s=e.scopedLanes.length,a=Math.max(1,e.selectedIndex+1);return t.jsxs("div",{className:"yoke",children:[t.jsxs("div",{className:"yoke__grip yoke__grip--left",children:[t.jsx(Me,{model:e,size:"xl"}),t.jsx($e,{model:e}),t.jsx(bn,{model:e,block:!0}),t.jsxs("div",{className:"yoke__stepper",role:"group","aria-label":"Lane navigation",children:[t.jsx("button",{type:"button",onClick:()=>e.stepLane(-1),disabled:s<2,"aria-label":"Previous lane",children:t.jsx(Re,{dir:"left"})}),t.jsxs("span",{children:[t.jsx("strong",{children:String(a).padStart(2,"0")}),t.jsxs("small",{children:["of ",String(s).padStart(2,"0")]})]}),t.jsx("button",{type:"button",onClick:()=>e.stepLane(1),disabled:s<2,"aria-label":"Next lane",children:t.jsx(Re,{dir:"right"})})]}),t.jsx("div",{className:"yoke__ladder",role:"group","aria-label":"Lane ladder",children:e.scopedLanes.map((r,l)=>t.jsxs("button",{type:"button","data-active":r.key===n.key||void 0,"data-tone":le(r),onClick:()=>e.selectLane(r),"aria-pressed":r.key===n.key,"aria-label":`${r.name} on ${r.hostName} — ${Y(r.state)}`,title:`${r.name} · ${r.hostName} · ${Y(r.state)}`,children:[t.jsx("span",{children:String(l+1).padStart(2,"0")}),t.jsx("i",{"aria-hidden":"true"})]},r.key))}),t.jsxs("div",{className:"yoke__grip-keys",children:[t.jsx(kt,{model:e}),t.jsx(jn,{model:e})]}),t.jsxs("div",{className:"yoke__grip-foot",children:[t.jsx("span",{className:"deck-kicker",children:"Lane traffic"}),t.jsx(ia,{model:e})]})]}),t.jsxs("section",{className:"yoke__stage",children:[t.jsxs("header",{className:"yoke__head",children:[t.jsx("div",{className:"yoke__head-task",children:t.jsx(kn,{model:e,size:"lg"})}),t.jsxs("div",{className:"yoke__head-lane",children:[t.jsx("h2",{children:n.name}),t.jsx("p",{children:n.projectRoot??"Project unavailable"})]})]}),t.jsx(De,{model:e}),t.jsxs("div",{className:"yoke__viewport",children:[t.jsxs("div",{className:"yoke__viewport-head",children:[t.jsx(jt,{model:e}),t.jsxs("span",{className:"deck-kicker",children:[n.hostName," / ",n.id]})]}),t.jsx("div",{className:"yoke__viewport-body",children:t.jsx(St,{model:e,limit:10})})]}),t.jsxs("div",{className:"yoke__dock",children:[t.jsx(Pe,{model:e}),t.jsx(vt,{model:e,rows:2})]})]}),t.jsxs("aside",{className:"yoke__grip yoke__grip--right","aria-label":"Session status",children:[t.jsxs("div",{className:"yoke__status",children:[t.jsx(qe,{model:e}),t.jsxs("dl",{children:[t.jsxs("div",{children:[t.jsx("dt",{children:"Lane state"}),t.jsx("dd",{children:Y(n.state)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Harness"}),t.jsx("dd",{children:n.harness??"unknown"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Model"}),t.jsx("dd",{children:n.model??"default"})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Transport"}),t.jsx("dd",{title:pe(n.transport),children:Zs(n.transport)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:"Live lanes"}),t.jsxs("dd",{children:[e.activeCount," of ",s]})]})]})]}),t.jsxs("div",{className:"yoke__grip-keys",children:[t.jsx(Sn,{model:e}),t.jsx(yn,{model:e})]}),t.jsxs("div",{className:"yoke__attention",children:[t.jsxs("span",{className:"deck-kicker",children:["Needs you · ",String(e.attention.length).padStart(2,"0")]}),t.jsx(_n,{model:e})]}),t.jsxs("div",{className:"yoke__scope",children:[t.jsx("span",{className:"deck-kicker",children:"Host scope"}),t.jsx(bt,{model:e})]})]}),t.jsx(Be,{model:e})]})}function Sa(){const e=Vs(),n=e.hosts.find(a=>a.state==="connected"),s=e.preview?{state:"preview",label:"PREVIEW",detail:"sample lanes · controls simulate locally"}:e.connection==="ready"||e.connection==="partial"?{state:e.connection==="ready"?"live":"partial",label:e.connection==="ready"?"LIVE":"DEGRADED",detail:`${n?.name??"host"} · Scout-managed Codex control`}:{state:"offline",label:"OFFLINE",detail:"no host connected"};return t.jsxs("main",{className:"scout-deck","data-connection":e.connection,"data-treatment":e.treatment,"data-preview":e.preview||void 0,children:[t.jsxs("header",{className:"scout-deck__strip",children:[t.jsxs("div",{className:"scout-deck__brand",children:[e.treatment==="ops"?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"scout-deck__ops-brand",children:[t.jsx("strong",{children:"SCOUT"}),t.jsx("i",{children:"·"}),t.jsx("small",{children:"OPS"})]}),t.jsxs("span",{className:"scout-deck__ops-mode",children:[t.jsx("i",{}),"AGENT DECK"]})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"scout-deck__mark","aria-hidden":"true",children:"S"}),t.jsxs("span",{className:"scout-deck__wordmark",children:[t.jsx("strong",{children:"Deck"}),t.jsx("small",{children:ct[e.treatment].tagline})]})]}),t.jsxs("span",{className:"scout-deck__source","data-state":s.state,title:e.preview?"Every lane, thread, and turn on screen is local sample data. No host is attached.":s.detail,children:[t.jsx("strong",{children:s.label}),t.jsx("small",{children:s.detail})]})]}),e.treatment==="ops"?t.jsxs("span",{className:"scout-deck__ops-count",children:[e.hosts.length," HOST",e.hosts.length===1?"":"S"," · ",e.scopedLanes.length," AGENT",e.scopedLanes.length===1?"":"S"]}):null,t.jsx(aa,{model:e})]}),e.treatment==="ops"?t.jsx(fa,{model:e}):e.treatment==="console"?t.jsx(ha,{model:e}):e.treatment==="brief"?t.jsx(ua,{model:e}):t.jsx(ga,{model:e})]})}export{Sa as ScoutDeckSurface,Bs as buildDeckLanes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./index-
|
|
1
|
+
import{j as r}from"./index-o4FKpU7Z.js";function o({children:e}){return r.jsx("div",{style:{background:"var(--bg)",color:"var(--ink)",minHeight:"100%",height:"100%",display:"flex",flexDirection:"column"},children:r.jsx("div",{className:"scout-surface-body",children:e})})}export{o as S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as i}from"./index-o4FKpU7Z.js";import{j as p}from"./Provider-DKZWuzSR.js";import{u as h}from"./ContextMenu-CxkmFQcN.js";import{B as f}from"./bot-BUK7dOPS.js";import{L as b}from"./loader-circle-4LDsy4Ke.js";const s="openscout:toggle-scoutbot";function g(t){if(typeof window>"u")return;const n={};window.dispatchEvent(new CustomEvent(s,{detail:n}))}function E(t){if(typeof window>"u")return()=>{};const n=o=>{const e=o.detail??{};t(e)};return window.addEventListener(s,n),()=>window.removeEventListener(s,n)}function m(t){switch(t){case"listening":return"listening";case"thinking":return"thinking";case"speaking":return"speaking";case"briefing":return"thinking";default:return""}}function k(t){return t==="thinking"||t==="briefing"}function w(t){return t!=="idle"?{kind:"activity",activity:t,label:m(t)}:{kind:"idle"}}function v(t,n,o){const e=[];return t.kind==="activity"?e.push(`Scout · ${t.label}`):e.push("Toggle Scout"),n&&e.push(n),o&&e.push(o),e.join(`
|
|
2
|
+
`)}function N(){const{state:t,actions:n}=p(),o=h(),e=w(t.activity),c=v(e,t.session.title,t.error),a=e.kind==="activity"?"s-scoutbot-chip--activity":"s-scoutbot-chip--idle",r=()=>{g()},u=l=>{const d=[{kind:"action",label:"New chat",onSelect:()=>n.startNewChat()},{kind:"action",label:t.voice.replies?"Turn voice replies off":"Turn voice replies on",onSelect:()=>n.toggleVoiceReplies()},{kind:"separator"},{kind:"action",label:"Open chat",onSelect:()=>n.focusScoutbot()}];o(l,d)};return i.jsxs("button",{type:"button",className:`s-scoutbot-chip ${a}`,onClick:r,onContextMenu:u,title:c,children:[i.jsx(f,{size:14,className:"s-scoutbot-chip-icon","aria-hidden":"true"}),e.kind==="activity"&&i.jsxs(i.Fragment,{children:[k(e.activity)?i.jsx(b,{size:10,className:"s-scoutbot-chip-spinner","aria-hidden":"true"}):i.jsx("span",{className:"s-scoutbot-chip-dot s-scoutbot-chip-dot--pulse","aria-hidden":"true"}),i.jsx("span",{className:"s-scoutbot-chip-text",children:e.label})]})]})}export{N as S,E as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as t}from"./index-
|
|
1
|
+
import{r as l,j as t}from"./index-o4FKpU7Z.js";import{D as O,d as le,V as G,p as ne,a as ae}from"./fx-z37u1o2z.js";const re=[{title:"Tone (band-pass)",sliders:[{key:"lowCutHz",label:"Low cut",min:80,max:1200,step:10,format:s=>`${s.toFixed(0)} Hz`},{key:"highCutHz",label:"High cut",min:1500,max:6e3,step:50,format:s=>`${s.toFixed(0)} Hz`},{key:"bandQ",label:"Filter Q",min:.2,max:2,step:.05,format:s=>s.toFixed(2)}]},{title:"Grit (saturation + bit-crush)",sliders:[{key:"saturationAmount",label:"Saturation",min:0,max:1,step:.01,format:s=>s.toFixed(2)},{key:"bitcrushAmount",label:"Bit-crush",min:0,max:1,step:.01,format:s=>s.toFixed(2)}]},{title:"Carrier hiss",sliders:[{key:"hissGain",label:"Hiss level",min:0,max:.25,step:.005,format:s=>s.toFixed(3)},{key:"hissCutoffHz",label:"Hiss high-pass",min:300,max:4e3,step:50,format:s=>`${s.toFixed(0)} Hz`}]},{title:"Presence (mid-band peak — comm intelligibility)",sliders:[{key:"presencePeakDb",label:"Boost",min:0,max:12,step:.5,format:s=>`${s.toFixed(1)} dB`},{key:"presenceCenterHz",label:"Center",min:600,max:3e3,step:50,format:s=>`${s.toFixed(0)} Hz`},{key:"presenceQ",label:"Q (narrowness)",min:.3,max:3,step:.1,format:s=>s.toFixed(1)}]},{title:"Squelch tail (channel-drop noise)",sliders:[{key:"squelchTailGain",label:"Tail gain",min:0,max:.3,step:.005,format:s=>s.toFixed(3)},{key:"squelchTailDurationMs",label:"Tail length",min:40,max:500,step:10,format:s=>`${s.toFixed(0)} ms`}]},{title:"Compressor",sliders:[{key:"compressorThresholdDb",label:"Threshold",min:-60,max:0,step:1,format:s=>`${s.toFixed(0)} dB`},{key:"compressorRatio",label:"Ratio",min:1,max:12,step:.5,format:s=>`${s.toFixed(1)} : 1`}]},{title:"Delivery",sliders:[{key:"playbackRate",label:"Speed (pitch-shifts)",min:.75,max:1.35,step:.01,format:s=>`${s.toFixed(2)}×`}]},{title:"Kerchunk / output",sliders:[{key:"clickGain",label:"Click gain",min:0,max:1,step:.01,format:s=>s.toFixed(2)},{key:"clickDurationMs",label:"Click length",min:20,max:200,step:5,format:s=>`${s.toFixed(0)} ms`},{key:"outputGain",label:"Output gain",min:0,max:2,step:.05,format:s=>s.toFixed(2)},{key:"wetMix",label:"Wet mix",min:0,max:1,step:.01,format:s=>s.toFixed(2)}]}],B=.12,ie=s=>Math.max(.7,Math.min(1.45,s)),ce=220,w={...O,lowCutHz:160,highCutHz:5200,bandQ:.35,saturationAmount:.035,bitcrushAmount:0,hissGain:0,hissCutoffHz:1800,presencePeakDb:1.5,presenceCenterHz:1500,presenceQ:.65,compressorThresholdDb:-15,compressorRatio:2.2,clickEnabled:!0,clickGain:.24,clickDurationMs:45,squelchTailEnabled:!0,squelchTailGain:.018,squelchTailDurationMs:95,playbackRate:1,outputGain:1,wetMix:.38},de={...w,lowCutHz:190,highCutHz:5e3,saturationAmount:.055,bitcrushAmount:.01,hissGain:.006,presencePeakDb:2.5,compressorThresholdDb:-17,compressorRatio:2.8,clickGain:.28,squelchTailGain:.024,squelchTailDurationMs:105,wetMix:.44};function ue(s){return`const SCOUTBOT_VOICE_FX: Partial<VoiceFxParams> = {
|
|
2
2
|
${Object.entries(s).map(([x,u])=>` ${x}: ${typeof u=="number"?Number(u.toFixed(3)):String(u)},`).join(`
|
|
3
3
|
`)}
|
|
4
4
|
};`}function Xe(){const[s,D]=l.useState(null),[x,u]=l.useState(null),[j,X]=l.useState({}),[a,i]=l.useState(w),[U,c]=l.useState(null),[E,C]=l.useState(null),[N,F]=l.useState(null),[p,Q]=l.useState(!1),[f,K]=l.useState(!1),b=l.useRef(null),d=l.useRef(null),m=l.useRef(a),P=l.useRef(p),A=l.useRef(f);l.useEffect(()=>{m.current=a},[a]),l.useEffect(()=>{P.current=p},[p]),l.useEffect(()=>{A.current=f},[f]),l.useEffect(()=>{let e=!1;return(async()=>{try{const o=await fetch("/api/dev/scoutbot-fx/fixtures");if(!o.ok)throw new Error(`HTTP ${o.status}`);const n=await o.json();e||D(n)}catch(o){e||u(o instanceof Error?o.message:String(o))}})(),()=>{e=!0}},[]);const H=l.useCallback(async e=>{if(j[e.slug])return j[e.slug].buffer;const o=await le(`/api/dev/scoutbot-fx/audio/${encodeURIComponent(e.file)}`);return X(n=>({...n,[e.slug]:{fixture:e,buffer:o}})),o},[j]),h=l.useCallback(()=>{d.current=null,b.current?.stop(),b.current=null,C(null)},[]),Y=l.useCallback(e=>{const o=G.find(n=>n.id===e);o&&(i(o.params),c(e))},[]),J=l.useCallback(async()=>{try{await navigator.clipboard.writeText(ue(a)),F("Copied"),window.setTimeout(()=>F(null),1600)}catch(e){F(e instanceof Error?e.message:"Copy failed")}},[a]),g=l.useCallback(async(e,o)=>{h();const n=Symbol(`${o}:${e.slug}`);d.current=n;const S=`${o}:${e.slug}`;try{const r=await H(e);for(;d.current===n;){const v=A.current?{...m.current,playbackRate:ie(m.current.playbackRate+(Math.random()*2-1)*B)}:m.current,I=o==="fx"?ne(r,{params:v}):ae(r);if(b.current=I,C(S),await I.promise,d.current!==n||!P.current)break;await new Promise(M=>{const se=setTimeout(M,ce),oe=setInterval(()=>{d.current!==n&&(clearTimeout(se),clearInterval(oe),M())},40)})}}catch(r){console.error(`[scoutbot-fx] ${o} playback failed`,r)}finally{d.current===n&&(d.current=null),b.current=null,C(r=>r===S?null:r)}},[H,h]),Z=l.useCallback(e=>g(e,"fx"),[g]),ee=l.useCallback(e=>g(e,"dry"),[g]),te=l.useMemo(()=>re.map(e=>({title:e.title,rows:e.sliders.map(o=>({spec:o,value:a[o.key]}))})),[a]),$=s?.fixtures??[];return t.jsxs("div",{style:pe,children:[t.jsxs("header",{style:ye,children:[t.jsxs("div",{children:[t.jsx("h1",{style:xe,children:"Scoutbot FX Lab"}),t.jsxs("p",{style:fe,children:["Dispatcher-radio FX prototyping. Generate fixtures with"," ",t.jsx("code",{style:L,children:"node packages/web/scripts/generate-scoutbot-fx-fixtures.mjs"}),"."]})]}),t.jsxs("div",{style:be,children:[s?.generatedAt?t.jsxs("span",{children:["Fixtures generated ",new Date(s.generatedAt).toLocaleString()]}):null,s?.note?t.jsx("span",{style:me,children:s.note}):null,x?t.jsxs("span",{style:he,children:["Could not load fixtures: ",x]}):null]})]}),t.jsxs("section",{style:ge,children:[t.jsxs("div",{style:T,children:[t.jsx("h2",{style:R,children:"Presets"}),t.jsx("div",{style:Se,children:"Click to load. Tweaking any slider clears the active preset."})]}),t.jsx("div",{style:ke,children:G.map(e=>{const o=U===e.id;return t.jsxs("button",{type:"button",style:o?je:q,onClick:n=>{Y(e.id),n.currentTarget.blur()},title:e.description,children:[t.jsxs("div",{style:o?Ce:V,children:[e.label,t.jsx("span",{style:ve,children:e.family})]}),t.jsx("div",{style:o?Fe:W,children:e.description})]},e.id)})})]}),t.jsxs("section",{style:Te,children:[t.jsxs("div",{style:T,children:[t.jsx("h2",{style:R,children:"FX chain"}),t.jsxs("div",{style:{display:"flex",gap:8},children:[t.jsxs("label",{style:k,children:[t.jsx("input",{type:"checkbox",checked:a.clickEnabled,onChange:e=>{const o=e.target.checked;c(null),i(n=>({...n,clickEnabled:o}))}}),"Kerchunk click"]}),t.jsxs("label",{style:k,children:[t.jsx("input",{type:"checkbox",checked:a.squelchTailEnabled,onChange:e=>{const o=e.target.checked;c(null),i(n=>({...n,squelchTailEnabled:o}))}}),"Squelch tail"]}),t.jsx("button",{type:"button",style:y,onClick:()=>{c("scoutbot-clean-dispatch"),i(w)},children:"Scoutbot default"}),t.jsx("button",{type:"button",style:y,onClick:()=>{c("codex-clean-dispatch"),i(de)},children:"Codex take"}),t.jsx("button",{type:"button",style:y,onClick:()=>{c(null),i(O)},children:"Raw default"}),t.jsx("button",{type:"button",style:z,onClick:()=>{J()},children:N??"Copy params"})]})]}),t.jsx("div",{style:Re,children:te.map(e=>t.jsxs("div",{style:we,children:[t.jsx("div",{style:ze,children:e.title}),t.jsx("div",{style:De,children:e.rows.map(({spec:o,value:n})=>t.jsxs("label",{style:Ee,children:[t.jsxs("div",{style:Pe,children:[t.jsx("span",{children:o.label}),t.jsx("span",{style:Ae,children:o.format(n)})]}),t.jsx("input",{type:"range",min:o.min,max:o.max,step:o.step,value:n,onChange:S=>{const r=Number(S.target.value);c(null),i(v=>({...v,[o.key]:r}))}})]},o.key))})]},e.title))})]}),t.jsxs("section",{style:He,children:[t.jsxs("div",{style:T,children:[t.jsx("h2",{style:R,children:"Fixtures"}),t.jsxs("div",{style:{display:"flex",gap:16},children:[t.jsxs("label",{style:k,children:[t.jsx("input",{type:"checkbox",checked:p,onChange:e=>Q(e.target.checked)}),"Loop playback",p?" (tweaks apply next iteration)":""]}),t.jsxs("label",{style:k,children:[t.jsx("input",{type:"checkbox",checked:f,onChange:e=>K(e.target.checked)}),"Vary speed ±",Math.round(B*100),"%"]})]})]}),s?$.length===0?t.jsxs("p",{style:_,children:["No fixtures yet. Run"," ",t.jsx("code",{style:L,children:"node packages/web/scripts/generate-scoutbot-fx-fixtures.mjs"})," ","(Vox must be running) and reload."]}):t.jsx("ul",{style:$e,children:$.map(e=>{const o=E===`dry:${e.slug}`,n=E===`fx:${e.slug}`;return t.jsxs("li",{style:Ie,children:[t.jsxs("div",{style:Me,children:[t.jsx("div",{style:Ge,children:e.slug}),t.jsx("div",{style:Be,children:e.text}),t.jsxs("div",{style:Le,children:[e.voiceId?`voice ${e.voiceId}`:null,e.voiceId&&e.bytes?" · ":null,e.bytes?`${Math.round(e.bytes/1024)} KB`:null]})]}),t.jsxs("div",{style:_e,children:[t.jsx("button",{type:"button",style:o?Oe:y,onClick:()=>o?h():ee(e),children:o?"Stop":"Play dry"}),t.jsx("button",{type:"button",style:n?qe:z,onClick:()=>n?h():Z(e),children:n?"Stop":"Play with FX"})]})]},e.slug)})}):t.jsx("p",{style:_,children:"Loading…"})]})]})}const pe={minHeight:"100vh",background:"#0b0d10",color:"#e6e8eb",padding:"32px 40px 64px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},ye={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:24,marginBottom:28},xe={fontSize:22,fontWeight:600,margin:0},fe={color:"#9aa1ab",fontSize:13,marginTop:6,marginBottom:0},be={display:"flex",flexDirection:"column",gap:4,fontSize:12,color:"#9aa1ab",alignItems:"flex-end"},me={color:"#f5b342"},he={color:"#ef6b6b"},L={fontFamily:"ui-monospace, SFMono-Regular, monospace",background:"#181b20",padding:"1px 6px",borderRadius:4,fontSize:12},ge={background:"#121519",border:"1px solid #1f242b",borderRadius:10,padding:20,marginBottom:18},Se={fontSize:11,color:"#6b727d"},ke={display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:10,marginTop:12},q={textAlign:"left",background:"#0f1216",borderWidth:1,borderStyle:"solid",borderColor:"#1f242b",borderRadius:8,padding:"12px 14px",color:"#c5cad2",cursor:"pointer",display:"flex",flexDirection:"column",gap:6,fontFamily:"inherit",outline:"none",WebkitAppearance:"none",appearance:"none",transition:"border-color 80ms ease, background 80ms ease, color 80ms ease"},je={...q,background:"#1a1f26",borderColor:"#f1f3f5",color:"#ffffff",boxShadow:"0 0 0 1px rgba(241,243,245,0.18)"},V={fontSize:13,fontWeight:600,display:"flex",alignItems:"center",gap:8},Ce={...V,color:"#ffffff"},W={fontSize:11,color:"#9aa1ab",lineHeight:1.4},Fe={...W,color:"#c5cad2"},ve={fontSize:9,fontWeight:500,letterSpacing:.6,textTransform:"uppercase",padding:"2px 6px",borderRadius:4,background:"rgba(255,255,255,0.06)",color:"#9aa1ab"},Te={background:"#121519",border:"1px solid #1f242b",borderRadius:10,padding:20,marginBottom:28},T={display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},R={fontSize:14,textTransform:"uppercase",letterSpacing:.6,color:"#9aa1ab",margin:0},Re={display:"flex",flexDirection:"column",gap:18},we={display:"flex",flexDirection:"column",gap:10},ze={fontSize:11,textTransform:"uppercase",letterSpacing:.8,color:"#6b727d",fontWeight:600},De={display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16},Ee={display:"flex",flexDirection:"column",gap:6,fontSize:12},Pe={display:"flex",justifyContent:"space-between",color:"#c5cad2"},Ae={color:"#7f8693",fontFamily:"ui-monospace, SFMono-Regular, monospace"},He={background:"#121519",border:"1px solid #1f242b",borderRadius:10,padding:20},$e={listStyle:"none",padding:0,margin:"16px 0 0",display:"flex",flexDirection:"column",gap:12},Ie={display:"flex",alignItems:"center",gap:16,background:"#0f1216",border:"1px solid #1f242b",borderRadius:8,padding:"14px 16px"},Me={flex:1,display:"flex",flexDirection:"column",gap:4},Ge={fontFamily:"ui-monospace, SFMono-Regular, monospace",color:"#9aa1ab",fontSize:12},Be={color:"#e6e8eb",fontSize:14},Le={color:"#6b727d",fontSize:11},_e={display:"flex",gap:8},y={background:"#1c2128",color:"#e6e8eb",borderWidth:1,borderStyle:"solid",borderColor:"#2a3038",padding:"6px 12px",borderRadius:6,fontSize:12,cursor:"pointer"},Oe={...y,background:"#2a3038",borderColor:"#3c4350"},z={background:"#2e6cdf",color:"#fff",borderWidth:1,borderStyle:"solid",borderColor:"#2e6cdf",padding:"6px 12px",borderRadius:6,fontSize:12,cursor:"pointer"},qe={...z,background:"#1f57bf",borderColor:"#1f57bf"},k={display:"flex",alignItems:"center",gap:6,fontSize:12,color:"#c5cad2",cursor:"pointer"},_={color:"#9aa1ab",fontSize:13,margin:"12px 0 0"};export{Xe as ScoutbotFxLab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as o}from"./index-CzVeWScw.js";import{b as D}from"./Provider-DSsb2gLR.js";import{L as h}from"./loader-circle-Byb9kSFx.js";import{R as z}from"./radio-PauJIekM.js";import{M as B,b as H}from"./DocumentFocusViewer-BCG2kOmd.js";import{C as q}from"./chevron-down-DRCbnzyY.js";import{c as u}from"./createLucideIcon-ClCdc3F9.js";import{P as I}from"./plus-CmFQp9Uj.js";import{S as K}from"./runtime-picker-BCQD7d4K.js";const U=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],F=u("history",U);const Q=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],Y=u("list-tree",Q);const G=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],J=u("play",G);const X=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Z=u("settings-2",X),x="rounded-lg bg-[color-mix(in_srgb,var(--hud-ink)_4.5%,transparent)]",$="rounded-md border border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--hud-bg)_70%,transparent)] text-[var(--scout-chrome-ink-strong)] outline-none transition-colors focus:border-lime-300/45",y="rounded-md border border-[color-mix(in_srgb,var(--hud-ink)_8%,transparent)] text-[var(--scout-chrome-ink)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)] disabled:cursor-not-allowed disabled:opacity-40",N="font-mono text-xs uppercase tracking-[0.11em] text-[var(--scout-chrome-ink-ghost)]";function ee(r){return r==="live"?{label:"Live",detail:"Listening — speak naturally",chip:"border-lime-300/35 bg-lime-300/[0.10] text-lime-100",iconWrap:"border-lime-300/40 bg-lime-300/[0.10] text-lime-200"}:r==="connecting"?{label:"Connecting",detail:"Opening secure audio…",chip:"border-amber-300/30 bg-amber-300/[0.09] text-amber-100/90",iconWrap:"border-amber-300/35 bg-amber-300/[0.09] text-amber-100"}:r==="error"?{label:"Error",detail:"Could not hold the call",chip:"border-red-400/35 bg-red-400/[0.10] text-red-100",iconWrap:"border-red-400/35 bg-red-400/[0.10] text-red-100"}:r==="ended"?{label:"Ended",detail:"Call closed — start again anytime",chip:"border-[color-mix(in_srgb,var(--hud-ink)_12%,transparent)] text-[var(--scout-chrome-ink-faint)]",iconWrap:"border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--hud-ink)_4%,transparent)] text-[var(--scout-chrome-ink-faint)]"}:{label:"Ready",detail:"Talk continuously with Scoutbot",chip:"border-transparent bg-[color-mix(in_srgb,var(--hud-ink)_6%,transparent)] text-[var(--scout-chrome-ink-faint)]",iconWrap:"border-transparent bg-[color-mix(in_srgb,var(--hud-ink)_5%,transparent)] text-[var(--scout-chrome-ink-faint)]"}}function ue({state:r,onMinimize:a,onExpand:n,layout:p="compact"}){const i=ee(r),s=p==="page";return e.jsxs("header",{className:`flex items-start ${s?"gap-3.5 px-5 py-4":"gap-2.5 px-3.5 py-3"}`,children:[e.jsx("div",{className:`${s?"size-9":"size-7"} mt-px flex shrink-0 items-center justify-center rounded-md border ${i.iconWrap}`,children:r==="connecting"?e.jsx(h,{size:s?14:12,className:"animate-spin"}):r==="live"?e.jsxs("span",{className:"relative flex size-2",children:[e.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-lime-300/35"}),e.jsx("span",{className:"relative inline-flex size-2 rounded-full bg-lime-300/90"})]}):e.jsx(z,{size:s?14:12})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("h2",{className:`truncate font-medium text-[var(--scout-chrome-ink-strong)] ${s?"text-2xl":"text-base"}`,children:"Live voice"}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx("span",{className:`rounded border px-1.5 py-px font-mono text-xs uppercase tracking-[0.1em] ${i.chip}`,children:i.label}),n&&e.jsx("button",{type:"button",onClick:n,title:s?"Return to compact live voice view":"Open full live voice view","aria-label":s?"Return to compact live voice view":"Open full live voice view",className:"flex size-6 items-center justify-center rounded-md text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:s?e.jsx(B,{size:12}):e.jsx(H,{size:12})}),a&&e.jsx("button",{type:"button",onClick:a,title:"Collapse live voice into the status bar","aria-label":"Collapse live voice into the status bar",className:"flex size-6 items-center justify-center rounded-md text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:e.jsx(q,{size:12})})]})]}),e.jsx("p",{className:`mt-0.5 leading-snug text-[var(--scout-chrome-ink-faint)] ${s?"text-base":"text-sm"}`,children:i.detail})]})]})}function pe({dictationActive:r,layout:a="compact"}){const{state:n,error:p,trace:i,chatState:s,sessionAction:v,startCall:M,endCall:L,startNewChat:E,switchChat:T,updatePreferredModel:R,clearTrace:O,openVoiceSettings:P}=D(),b=n==="connecting"||n==="live",[g,V]=o.useState("controls"),w=se(p),m=a==="page",[c,f]=o.useState(""),[k,W]=o.useState(!1),[l,C]=o.useState(!1),[S,d]=o.useState(null);o.useEffect(()=>{!l&&s?.config.model&&f(s.config.model)},[s?.config.model,l]);const _=async()=>{if(!(!c.trim()||l)){C(!0),d(null);try{const t=await R(c);f(t),d("Saved")}catch(t){d(t instanceof Error?t.message:"Could not save model.")}finally{C(!1)}}},j=n==="connecting"?{label:"Cancel connection",icon:e.jsx(h,{size:11,className:"animate-spin"}),tone:"border-amber-300/35 bg-amber-300/[0.10] text-amber-100 hover:bg-amber-300/[0.16]"}:n==="live"?{label:"End live voice",icon:e.jsx(K,{size:9,className:"fill-current"}),tone:"border-red-400/35 bg-red-400/[0.10] text-red-100 hover:bg-red-400/[0.16]"}:{label:"Start live voice",icon:e.jsx(J,{size:10,className:"fill-current"}),tone:"border-lime-300/40 bg-lime-300/[0.12] text-lime-100 hover:bg-lime-300/[0.18]"};return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsx("nav",{className:`grid shrink-0 grid-cols-2 border-b border-[var(--scout-chrome-border-soft)] ${m?"px-5":"px-3.5"}`,"aria-label":"Live voice views",children:[{id:"controls",label:"Controls",icon:e.jsx(z,{size:11})},{id:"activity",label:"Activity",icon:e.jsx(Y,{size:11})}].map(t=>e.jsxs("button",{type:"button",onClick:()=>V(t.id),"aria-current":g===t.id,className:`-mb-px flex items-center justify-center gap-1.5 border-b-2 font-mono uppercase tracking-[0.1em] transition-colors ${m?"h-11 text-sm":"h-9 text-xs"} ${g===t.id?"border-lime-300/80 text-[var(--scout-chrome-ink-strong)]":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink-strong)]"}`,children:[t.icon,t.label,t.id==="activity"&&i.length>0&&e.jsx("span",{className:"rounded-full bg-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] px-1.5 py-px font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:i.length})]},t.id))}),g==="activity"?e.jsxs("div",{className:`flex min-h-0 flex-1 flex-col ${m?"p-5":"p-3.5"}`,children:[e.jsxs("div",{className:"mb-2 flex shrink-0 items-center justify-between",children:[e.jsx("p",{className:N,children:"Session activity"}),i.length>0&&e.jsx("button",{type:"button",onClick:O,className:"font-mono text-xs uppercase tracking-[0.09em] text-[var(--scout-chrome-ink-ghost)] transition-colors hover:text-[var(--scout-chrome-ink-strong)]",children:"Clear"})]}),i.length===0?e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-lg border border-dashed border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] px-6 text-center text-sm leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Start a call to record requests, replies, navigation attempts, and delivery results."}):e.jsx("ol",{className:`min-h-0 flex-1 overflow-y-auto ${x}`,children:i.map((t,A)=>e.jsxs("li",{className:`px-2.5 py-2 ${A>0?"border-t border-[var(--scout-chrome-border-soft)]":""}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-1.5",children:[e.jsx("span",{className:`mt-px shrink-0 rounded border px-1 py-px font-mono text-xs uppercase tracking-[0.08em] ${ie(t.kind)}`,children:re(t.kind)}),e.jsx("span",{className:"min-w-0 text-sm leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.label})]}),e.jsx("time",{className:"shrink-0 font-mono text-xs text-[var(--scout-chrome-ink-ghost)]",children:te(t.at)})]}),t.detail&&e.jsx("span",{className:"mt-1 block whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:t.detail})]},t.id))})]}):e.jsxs("div",{className:`flex min-h-0 w-full flex-1 flex-col overflow-y-auto ${m?"mx-auto max-w-2xl gap-4 p-5":"gap-2.5 p-3.5"}`,children:[e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsx("p",{className:"text-base font-medium text-[var(--scout-chrome-ink-strong)]",children:"Live conversation"}),e.jsx("p",{className:"mt-0.5 text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:n==="live"?"Microphone and spoken replies are active.":n==="connecting"?"Opening the audio connection…":"Start when you are ready to speak."}),e.jsxs("button",{type:"button",disabled:r&&!b,onClick:()=>{b?L():M()},className:`mt-3 flex h-9 w-full items-center justify-center gap-2 rounded-md border font-mono text-sm uppercase tracking-[0.1em] transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${j.tone}`,children:[j.icon,j.label]}),r&&!b&&e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-amber-200/80",children:"Finish dictation before starting a live call."}),w&&e.jsx("p",{className:"mt-2 rounded-md border border-red-400/30 bg-red-400/[0.08] px-2 py-1.5 text-sm leading-relaxed text-red-100",children:w})]}),e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(F,{size:11,className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]"}),e.jsx("p",{className:N,children:"Live chat"})]}),e.jsx("p",{className:"mt-1.5 truncate text-base text-[var(--scout-chrome-ink-strong)]",title:s?.session.id,children:s?.session.title||"Loading chat…"}),e.jsx("p",{className:"mt-0.5 text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Context stays with this chat when voice stops or the panel closes."}),e.jsxs("div",{className:"mt-2.5 flex min-w-0 items-center gap-1.5",children:[s&&s.sessions.length>1&&e.jsxs("label",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"sr-only",children:"Switch live chat"}),e.jsx("select",{value:s.session.id,disabled:!!v,onChange:t=>{T(t.target.value)},className:`h-8 w-full min-w-0 px-2 font-mono text-sm disabled:cursor-wait disabled:opacity-50 ${$}`,title:"Switch live chat; an active voice connection will end",children:s.sessions.map(t=>e.jsxs("option",{value:t.id,children:[t.title||`Chat ${t.id.slice(0,8)}`," · ",t.messageCount," msg"]},t.id))})]}),e.jsxs("button",{type:"button",onClick:()=>{E()},disabled:!s||!!v,title:"Start a new chat; an active voice connection will end",className:`flex h-8 shrink-0 items-center justify-center gap-1.5 px-2.5 font-mono text-xs uppercase tracking-[0.09em] disabled:cursor-wait ${y}`,children:[v==="new"?e.jsx(h,{size:10,className:"animate-spin"}):e.jsx(I,{size:10}),"New chat"]})]})]}),e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:N,children:"Scoutbot reply model"}),e.jsx("p",{className:"mt-1 truncate font-mono text-base text-[var(--scout-chrome-ink-strong)]",children:s?.config.model||"—"})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[s?.config.provider&&e.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-ghost)]",children:s.config.provider}),e.jsx("button",{type:"button",onClick:()=>{d(null),W(t=>!t)},"aria-expanded":k,className:`flex h-7 items-center px-2 font-mono text-xs uppercase tracking-[0.09em] ${y}`,children:k?"Close":"Change"})]})]}),k&&e.jsxs("div",{className:"mt-2.5 border-t border-[var(--scout-chrome-border-soft)] pt-2.5",children:[e.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Used for typed and live Scoutbot replies."}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("input",{value:c,onChange:t=>{f(t.target.value),d(null)},onKeyDown:t=>{t.key==="Enter"&&_()},placeholder:"gpt-4.1-mini","aria-label":"Preferred Scoutbot model",className:`h-8 min-w-0 flex-1 px-2 font-mono text-sm ${$}`}),e.jsx("button",{type:"button",onClick:()=>{_()},disabled:l||!c.trim()||c.trim()===s?.config.model,className:`flex h-8 min-w-14 items-center justify-center px-2 font-mono text-xs uppercase tracking-[0.09em] ${y}`,children:l?e.jsx(h,{size:10,className:"animate-spin"}):"Apply"})]}),S&&e.jsx("p",{className:"mt-1.5 font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:S})]})]}),e.jsxs("button",{type:"button",onClick:P,className:"mt-auto flex h-8 w-full shrink-0 items-center justify-center gap-1.5 rounded-md font-mono text-xs uppercase tracking-[0.09em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:[e.jsx(Z,{size:11}),"Voice settings"]})]})]})}function te(r){return new Date(r).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function se(r){if(!r)return null;const a=r.toLowerCase();return a.includes("active response in progress")||a.includes("conversation already has an active response")?null:a.includes("realtime voice call is already active")?"Live voice is still running on this Scout host. Stop it from the footer, or wait a moment for it to finish closing.":r}function re(r){switch(r){case"navigation":return"Navigate";case"scoutbot":return"Scoutbot";case"agent":return"Agent ask";case"error":return"Error";default:return"Voice"}}function ie(r){switch(r){case"navigation":return"border-sky-300/25 bg-sky-300/[0.06] text-sky-100/80";case"scoutbot":return"border-violet-300/25 bg-violet-300/[0.06] text-violet-100/80";case"agent":return"border-amber-300/25 bg-amber-300/[0.06] text-amber-100/80";case"error":return"border-red-300/25 bg-red-300/[0.06] text-red-100/80";default:return"border-lime-300/20 bg-lime-300/[0.05] text-lime-100/70"}}export{F as H,J as P,ue as S,pe as a};
|
|
1
|
+
import{j as e,r as o}from"./index-o4FKpU7Z.js";import{b as D}from"./Provider-DKZWuzSR.js";import{L as h}from"./loader-circle-4LDsy4Ke.js";import{R as z}from"./radio-v7UAMZGh.js";import{M as B,b as H}from"./DocumentFocusViewer-DRKjNG9s.js";import{C as q}from"./chevron-down-NAhBUkFd.js";import{c as u}from"./createLucideIcon-Bt67PWH-.js";import{P as I}from"./plus-C-2gTcPK.js";import{S as K}from"./runtime-picker-eDEvx2Mz.js";const U=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],F=u("history",U);const Q=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],Y=u("list-tree",Q);const G=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],J=u("play",G);const X=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Z=u("settings-2",X),x="rounded-lg bg-[color-mix(in_srgb,var(--hud-ink)_4.5%,transparent)]",$="rounded-md border border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--hud-bg)_70%,transparent)] text-[var(--scout-chrome-ink-strong)] outline-none transition-colors focus:border-lime-300/45",y="rounded-md border border-[color-mix(in_srgb,var(--hud-ink)_8%,transparent)] text-[var(--scout-chrome-ink)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)] disabled:cursor-not-allowed disabled:opacity-40",N="font-mono text-xs uppercase tracking-[0.11em] text-[var(--scout-chrome-ink-ghost)]";function ee(r){return r==="live"?{label:"Live",detail:"Listening — speak naturally",chip:"border-lime-300/35 bg-lime-300/[0.10] text-lime-100",iconWrap:"border-lime-300/40 bg-lime-300/[0.10] text-lime-200"}:r==="connecting"?{label:"Connecting",detail:"Opening secure audio…",chip:"border-amber-300/30 bg-amber-300/[0.09] text-amber-100/90",iconWrap:"border-amber-300/35 bg-amber-300/[0.09] text-amber-100"}:r==="error"?{label:"Error",detail:"Could not hold the call",chip:"border-red-400/35 bg-red-400/[0.10] text-red-100",iconWrap:"border-red-400/35 bg-red-400/[0.10] text-red-100"}:r==="ended"?{label:"Ended",detail:"Call closed — start again anytime",chip:"border-[color-mix(in_srgb,var(--hud-ink)_12%,transparent)] text-[var(--scout-chrome-ink-faint)]",iconWrap:"border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--hud-ink)_4%,transparent)] text-[var(--scout-chrome-ink-faint)]"}:{label:"Ready",detail:"Talk continuously with Scoutbot",chip:"border-transparent bg-[color-mix(in_srgb,var(--hud-ink)_6%,transparent)] text-[var(--scout-chrome-ink-faint)]",iconWrap:"border-transparent bg-[color-mix(in_srgb,var(--hud-ink)_5%,transparent)] text-[var(--scout-chrome-ink-faint)]"}}function ue({state:r,onMinimize:a,onExpand:n,layout:p="compact"}){const i=ee(r),s=p==="page";return e.jsxs("header",{className:`flex items-start ${s?"gap-3.5 px-5 py-4":"gap-2.5 px-3.5 py-3"}`,children:[e.jsx("div",{className:`${s?"size-9":"size-7"} mt-px flex shrink-0 items-center justify-center rounded-md border ${i.iconWrap}`,children:r==="connecting"?e.jsx(h,{size:s?14:12,className:"animate-spin"}):r==="live"?e.jsxs("span",{className:"relative flex size-2",children:[e.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-lime-300/35"}),e.jsx("span",{className:"relative inline-flex size-2 rounded-full bg-lime-300/90"})]}):e.jsx(z,{size:s?14:12})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("h2",{className:`truncate font-medium text-[var(--scout-chrome-ink-strong)] ${s?"text-2xl":"text-base"}`,children:"Live voice"}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx("span",{className:`rounded border px-1.5 py-px font-mono text-xs uppercase tracking-[0.1em] ${i.chip}`,children:i.label}),n&&e.jsx("button",{type:"button",onClick:n,title:s?"Return to compact live voice view":"Open full live voice view","aria-label":s?"Return to compact live voice view":"Open full live voice view",className:"flex size-6 items-center justify-center rounded-md text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:s?e.jsx(B,{size:12}):e.jsx(H,{size:12})}),a&&e.jsx("button",{type:"button",onClick:a,title:"Collapse live voice into the status bar","aria-label":"Collapse live voice into the status bar",className:"flex size-6 items-center justify-center rounded-md text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:e.jsx(q,{size:12})})]})]}),e.jsx("p",{className:`mt-0.5 leading-snug text-[var(--scout-chrome-ink-faint)] ${s?"text-base":"text-sm"}`,children:i.detail})]})]})}function pe({dictationActive:r,layout:a="compact"}){const{state:n,error:p,trace:i,chatState:s,sessionAction:v,startCall:M,endCall:L,startNewChat:E,switchChat:T,updatePreferredModel:R,clearTrace:O,openVoiceSettings:P}=D(),b=n==="connecting"||n==="live",[g,V]=o.useState("controls"),w=se(p),m=a==="page",[c,f]=o.useState(""),[k,W]=o.useState(!1),[l,C]=o.useState(!1),[S,d]=o.useState(null);o.useEffect(()=>{!l&&s?.config.model&&f(s.config.model)},[s?.config.model,l]);const _=async()=>{if(!(!c.trim()||l)){C(!0),d(null);try{const t=await R(c);f(t),d("Saved")}catch(t){d(t instanceof Error?t.message:"Could not save model.")}finally{C(!1)}}},j=n==="connecting"?{label:"Cancel connection",icon:e.jsx(h,{size:11,className:"animate-spin"}),tone:"border-amber-300/35 bg-amber-300/[0.10] text-amber-100 hover:bg-amber-300/[0.16]"}:n==="live"?{label:"End live voice",icon:e.jsx(K,{size:9,className:"fill-current"}),tone:"border-red-400/35 bg-red-400/[0.10] text-red-100 hover:bg-red-400/[0.16]"}:{label:"Start live voice",icon:e.jsx(J,{size:10,className:"fill-current"}),tone:"border-lime-300/40 bg-lime-300/[0.12] text-lime-100 hover:bg-lime-300/[0.18]"};return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsx("nav",{className:`grid shrink-0 grid-cols-2 border-b border-[var(--scout-chrome-border-soft)] ${m?"px-5":"px-3.5"}`,"aria-label":"Live voice views",children:[{id:"controls",label:"Controls",icon:e.jsx(z,{size:11})},{id:"activity",label:"Activity",icon:e.jsx(Y,{size:11})}].map(t=>e.jsxs("button",{type:"button",onClick:()=>V(t.id),"aria-current":g===t.id,className:`-mb-px flex items-center justify-center gap-1.5 border-b-2 font-mono uppercase tracking-[0.1em] transition-colors ${m?"h-11 text-sm":"h-9 text-xs"} ${g===t.id?"border-lime-300/80 text-[var(--scout-chrome-ink-strong)]":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink-strong)]"}`,children:[t.icon,t.label,t.id==="activity"&&i.length>0&&e.jsx("span",{className:"rounded-full bg-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] px-1.5 py-px font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:i.length})]},t.id))}),g==="activity"?e.jsxs("div",{className:`flex min-h-0 flex-1 flex-col ${m?"p-5":"p-3.5"}`,children:[e.jsxs("div",{className:"mb-2 flex shrink-0 items-center justify-between",children:[e.jsx("p",{className:N,children:"Session activity"}),i.length>0&&e.jsx("button",{type:"button",onClick:O,className:"font-mono text-xs uppercase tracking-[0.09em] text-[var(--scout-chrome-ink-ghost)] transition-colors hover:text-[var(--scout-chrome-ink-strong)]",children:"Clear"})]}),i.length===0?e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-lg border border-dashed border-[color-mix(in_srgb,var(--hud-ink)_10%,transparent)] px-6 text-center text-sm leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Start a call to record requests, replies, navigation attempts, and delivery results."}):e.jsx("ol",{className:`min-h-0 flex-1 overflow-y-auto ${x}`,children:i.map((t,A)=>e.jsxs("li",{className:`px-2.5 py-2 ${A>0?"border-t border-[var(--scout-chrome-border-soft)]":""}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-1.5",children:[e.jsx("span",{className:`mt-px shrink-0 rounded border px-1 py-px font-mono text-xs uppercase tracking-[0.08em] ${ie(t.kind)}`,children:re(t.kind)}),e.jsx("span",{className:"min-w-0 text-sm leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.label})]}),e.jsx("time",{className:"shrink-0 font-mono text-xs text-[var(--scout-chrome-ink-ghost)]",children:te(t.at)})]}),t.detail&&e.jsx("span",{className:"mt-1 block whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:t.detail})]},t.id))})]}):e.jsxs("div",{className:`flex min-h-0 w-full flex-1 flex-col overflow-y-auto ${m?"mx-auto max-w-2xl gap-4 p-5":"gap-2.5 p-3.5"}`,children:[e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsx("p",{className:"text-base font-medium text-[var(--scout-chrome-ink-strong)]",children:"Live conversation"}),e.jsx("p",{className:"mt-0.5 text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:n==="live"?"Microphone and spoken replies are active.":n==="connecting"?"Opening the audio connection…":"Start when you are ready to speak."}),e.jsxs("button",{type:"button",disabled:r&&!b,onClick:()=>{b?L():M()},className:`mt-3 flex h-9 w-full items-center justify-center gap-2 rounded-md border font-mono text-sm uppercase tracking-[0.1em] transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${j.tone}`,children:[j.icon,j.label]}),r&&!b&&e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-amber-200/80",children:"Finish dictation before starting a live call."}),w&&e.jsx("p",{className:"mt-2 rounded-md border border-red-400/30 bg-red-400/[0.08] px-2 py-1.5 text-sm leading-relaxed text-red-100",children:w})]}),e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(F,{size:11,className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]"}),e.jsx("p",{className:N,children:"Live chat"})]}),e.jsx("p",{className:"mt-1.5 truncate text-base text-[var(--scout-chrome-ink-strong)]",title:s?.session.id,children:s?.session.title||"Loading chat…"}),e.jsx("p",{className:"mt-0.5 text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Context stays with this chat when voice stops or the panel closes."}),e.jsxs("div",{className:"mt-2.5 flex min-w-0 items-center gap-1.5",children:[s&&s.sessions.length>1&&e.jsxs("label",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"sr-only",children:"Switch live chat"}),e.jsx("select",{value:s.session.id,disabled:!!v,onChange:t=>{T(t.target.value)},className:`h-8 w-full min-w-0 px-2 font-mono text-sm disabled:cursor-wait disabled:opacity-50 ${$}`,title:"Switch live chat; an active voice connection will end",children:s.sessions.map(t=>e.jsxs("option",{value:t.id,children:[t.title||`Chat ${t.id.slice(0,8)}`," · ",t.messageCount," msg"]},t.id))})]}),e.jsxs("button",{type:"button",onClick:()=>{E()},disabled:!s||!!v,title:"Start a new chat; an active voice connection will end",className:`flex h-8 shrink-0 items-center justify-center gap-1.5 px-2.5 font-mono text-xs uppercase tracking-[0.09em] disabled:cursor-wait ${y}`,children:[v==="new"?e.jsx(h,{size:10,className:"animate-spin"}):e.jsx(I,{size:10}),"New chat"]})]})]}),e.jsxs("section",{className:`${x} shrink-0 p-3`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:N,children:"Scoutbot reply model"}),e.jsx("p",{className:"mt-1 truncate font-mono text-base text-[var(--scout-chrome-ink-strong)]",children:s?.config.model||"—"})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[s?.config.provider&&e.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-ghost)]",children:s.config.provider}),e.jsx("button",{type:"button",onClick:()=>{d(null),W(t=>!t)},"aria-expanded":k,className:`flex h-7 items-center px-2 font-mono text-xs uppercase tracking-[0.09em] ${y}`,children:k?"Close":"Change"})]})]}),k&&e.jsxs("div",{className:"mt-2.5 border-t border-[var(--scout-chrome-border-soft)] pt-2.5",children:[e.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Used for typed and live Scoutbot replies."}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("input",{value:c,onChange:t=>{f(t.target.value),d(null)},onKeyDown:t=>{t.key==="Enter"&&_()},placeholder:"gpt-4.1-mini","aria-label":"Preferred Scoutbot model",className:`h-8 min-w-0 flex-1 px-2 font-mono text-sm ${$}`}),e.jsx("button",{type:"button",onClick:()=>{_()},disabled:l||!c.trim()||c.trim()===s?.config.model,className:`flex h-8 min-w-14 items-center justify-center px-2 font-mono text-xs uppercase tracking-[0.09em] ${y}`,children:l?e.jsx(h,{size:10,className:"animate-spin"}):"Apply"})]}),S&&e.jsx("p",{className:"mt-1.5 font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:S})]})]}),e.jsxs("button",{type:"button",onClick:P,className:"mt-auto flex h-8 w-full shrink-0 items-center justify-center gap-1.5 rounded-md font-mono text-xs uppercase tracking-[0.09em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink-strong)]",children:[e.jsx(Z,{size:11}),"Voice settings"]})]})]})}function te(r){return new Date(r).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function se(r){if(!r)return null;const a=r.toLowerCase();return a.includes("active response in progress")||a.includes("conversation already has an active response")?null:a.includes("realtime voice call is already active")?"Live voice is still running on this Scout host. Stop it from the footer, or wait a moment for it to finish closing.":r}function re(r){switch(r){case"navigation":return"Navigate";case"scoutbot":return"Scoutbot";case"agent":return"Agent ask";case"error":return"Error";default:return"Voice"}}function ie(r){switch(r){case"navigation":return"border-sky-300/25 bg-sky-300/[0.06] text-sky-100/80";case"scoutbot":return"border-violet-300/25 bg-violet-300/[0.06] text-violet-100/80";case"agent":return"border-amber-300/25 bg-amber-300/[0.06] text-amber-100/80";case"error":return"border-red-300/25 bg-red-300/[0.06] text-red-100/80";default:return"border-lime-300/20 bg-lime-300/[0.05] text-lime-100/70"}}export{F as H,J as P,ue as S,pe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-o4FKpU7Z.js";import"./secondaryNavConfig-CSFDCQAf.js";function b({ariaLabel:r,activeRoute:l,groups:t,navigate:o,className:n=""}){return a.jsx("nav",{className:`s-secondary-nav${n?` ${n}`:""}`,"aria-label":r,children:t.map((s,i)=>a.jsxs("div",{className:"s-secondary-nav-group",children:[s.label&&a.jsx("span",{className:"s-secondary-nav-label",children:s.label}),a.jsx("div",{className:"s-secondary-nav-switch",children:s.items.map(e=>{const c=e.active(l);return a.jsx("button",{type:"button","aria-pressed":c,className:`s-secondary-nav-button${c?" s-secondary-nav-button--active":""}`,onClick:()=>o(e.route),children:e.label},e.id)})})]},s.label??i))})}export{b as S};
|
package/dist/client/assets/{SessionEmbedScreen-CDRpQc3g.js → SessionEmbedScreen-s2mJ5Fg9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as s}from"./index-
|
|
1
|
+
import{r as n,j as s}from"./index-o4FKpU7Z.js";import{a as S}from"./api-h5zurxmi.js";import{d as j,S as E}from"./SessionObserve-DaUrJCMq.js";import{u as h}from"./sse-CL6gctHY.js";import{ConversationScreen as x}from"./ConversationScreen-oZSitVtX.js";import{SessionObserveEmbedStatus as y}from"./SessionObserveEvidence-ClUW8jpV.js";const I=2500;function l({children:e}){return s.jsx("div",{className:"s-observe-embed-page",children:e})}function a({title:e,detail:r}){return s.jsx(l,{children:s.jsxs("div",{className:"s-observe-embed-empty",children:[s.jsx("div",{className:"s-observe-embed-empty-title",children:e}),r&&s.jsx("div",{className:"s-observe-embed-empty-detail",children:r})]})})}function m({lookup:e}){const r=j({source:e.observe.source,fidelity:e.observe.fidelity,live:e.observe.data.live,eventCount:e.observe.data.events.length});return s.jsxs(l,{children:[s.jsx(y,{source:e.observe.source,fidelity:e.observe.fidelity,sessionId:e.observe.sessionId??e.observe.refId,evidence:r}),s.jsx(E,{data:e.observe.data,agentId:e.observe.agentId??e.session?.agentId??void 0,sessionId:e.observe.sessionId??e.observe.refId,showRail:!1,observeSource:e.observe.source,observeFidelity:e.observe.fidelity})]})}function c(){const e=typeof window>"u"?"":new URLSearchParams(window.location.search).get("ref")?.trim()??"",[r,v]=n.useState(null),[u,d]=n.useState(!0),[b,f]=n.useState(null),i=n.useCallback(async(o=!1)=>{if(!e){d(!1);return}o||d(!0),f(null);try{const t=await S(`/api/session-ref/${encodeURIComponent(e)}`);v(t)}catch(t){o||v(null),f(t instanceof Error?t.message:String(t))}finally{d(!1)}},[e]);return n.useEffect(()=>{i();const o=window.setInterval(()=>{i(!0)},I);return()=>window.clearInterval(o)},[i]),h(()=>{i(!0)}),e?b&&!r?s.jsx(a,{title:"Session unavailable",detail:b}):u&&!r?s.jsx(a,{title:"Resolving session",detail:e}):r?r.kind==="conversation"?s.jsx(l,{children:s.jsx(x,{conversationId:r.conversationId,navigate:()=>{},embedded:!0,showBackNav:!1})}):s.jsx(m,{lookup:r}):s.jsx(a,{title:"Session not found",detail:"This session may have ended or its archive is not on this machine."}):s.jsx(a,{title:"No session reference",detail:"This embed needs a ?ref=<sessionId> query parameter."})}const R=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedObserveContent:m,SessionEmbedScreen:c,default:c},Symbol.toStringTag,{value:"Module"})),C=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedScreen:c},Symbol.toStringTag,{value:"Module"}));export{R as S,C as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,j as t}from"./index-
|
|
1
|
+
import{r as h,j as t}from"./index-o4FKpU7Z.js";import{f as ge}from"./bash-format-BRV5C6Gv.js";import{j as js,p as He,k as ks}from"./tail-display-BRcJltQa.js";import{l as ys}from"./lane-edit-display-C_Aujldz.js";import{f as Ns}from"./lane-tool-detail-0WhMf4Vj.js";import{useLaneToolHoverCard as ws}from"./LaneToolHoverCard-CcEiQC6B.js";import{e as Cs,L as Le,g as Ss,h as Ts,j as Ee,o as $s,b as Re,f as Ls,k as Es,m as je,l as Ge,a as qe}from"./lane-observe-BA3g9aVd.js";import{b as Rs}from"./lane-ask-display-B6iCAVcd.js";import{d as Ps}from"./colors-BtO5_zlx.js";import{a as ke}from"./api-h5zurxmi.js";import{r as Ue}from"./mentions-CvDaviLJ.js";import{a as Os,g as Ve,t as As,b as Is,d as Bs,n as Pe}from"./time-Dhsh_2EG.js";import{M as Ke}from"./message-markup-BcY1lShv.js";import{q as _s}from"./terminal-takeover-7AvNpnkC.js";import{k as Fs,m as Ds,n as Ms}from"./NewChatComposer-S08F6_La.js";import{u as ye,C as Je}from"./Provider-DKZWuzSR.js";import{o as Ws}from"./openContent-C6XO6kr5.js";import{O as zs}from"./ObservedTopologyPanel-ByW7Ar7p.js";import{M as Hs}from"./runtime-picker-eDEvx2Mz.js";import"./index-BMwKgdz_.js";import{ObserveReasoningDisclosure as Gs,ObserveStreamCursor as Oe}from"./ObserveTextFlow-_ApDwRCO.js";import{SessionObserveReceiptView as qs}from"./SessionObserveEvidence-ClUW8jpV.js";import{M as Us}from"./message-circle-BM3XgevU.js";import{W as Vs}from"./wrench-M4G7WtYB.js";import{E as Ks}from"./external-link-Dem738OJ.js";import{C as Ye}from"./chevron-down-NAhBUkFd.js";import{c as Js}from"./createLucideIcon-Bt67PWH-.js";const Ys=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Xs=Js("tag",Ys),Ne=new Set(["bash","shell","terminal","exec","run","command","exec_command","shell_command","local_shell","container_exec","container.exec"]);function I(e){return(e??"").trim()}function q(e){return[e.kind,I(e.tool),I(e.arg),I(e.text),I(e.detail)].join("|")}function Zs(e){if(e.kind!=="tool"||!e.tool||e.result)return!1;const s=I(e.arg).toLowerCase();return s==="started"||s.length>0&&s!=="completed"}function Qs(e){return e.kind!=="tool"||!e.tool?!1:I(e.arg).toLowerCase()==="completed"||!!e.result?.outcome}const Xe=/^permission requested · ([A-Za-z][\w-]*)$/i,Ze=/^permission ([a-z_]+) · ([A-Za-z][\w-]*)$/i;function Qe(e){return e.kind==="system"&&Xe.test(e.text.trim())}function es(e){return e.kind==="system"&&Ze.test(e.text.trim())}function Ae(e){const s=e.text.trim(),n=s.match(Xe);if(n?.[1])return n[1];const a=s.match(Ze);return a?.[2]?a[2]:null}function et(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
|
|
2
2
|
|
|
3
3
|
(${s} reasoning updates)`:n}}function st(e,s){const n=s.tool??e.tool,a=s.result?.outcome,r=e.arg&&e.arg!=="started"&&e.arg!=="completed"?e.arg:s.arg&&s.arg!=="completed"?s.arg:void 0,o=s.stream?.join(`
|
|
4
4
|
`)??"",l=r?o.trim()?`${n} · ${r} · ${o}`:a?`${n} · ${r} · ${a}`:`${n} · ${r}`:s.text.trim()||(a?`${n} completed · ${a}`:`${n} completed`);return{...s,tool:n,arg:r??"completed",text:l,stream:s.stream??e.stream,diff:s.diff??e.diff,detail:s.detail??e.detail,live:s.live??e.live}}function tt(e){if(e.kind!=="tool"||!e.tool)return!1;const s=I(e.tool).toLowerCase();if(!Ne.has(s))return!1;const n=I(e.arg);return n.length>0&&n!=="started"&&n!=="completed"}function nt(e){if(e.kind!=="tool")return!1;const s=I(e.tool).toLowerCase();return s==="res"?!!(I(e.arg)||(e.stream?.length??0)>0):Ne.has(s)?(e.stream?.length??0)>0:!1}function at(e){return(e.stream?.length??0)>0?e.stream.join(`
|
package/dist/client/assets/{SessionObserveEvidence-CEedIk2a.js → SessionObserveEvidence-ClUW8jpV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-o4FKpU7Z.js";function n(e){return e?e.length>18?`${e.slice(0,8)}...${e.slice(-6)}`:e:"no session"}function l({source:e,fidelity:r,sessionId:t,evidence:i}){return s.jsxs("div",{className:"s-observe-embed-status","data-tone":i.tone,children:[s.jsx("span",{className:"s-observe-embed-status-source",children:e}),s.jsx("span",{children:r}),s.jsx("span",{title:t??void 0,children:n(t)}),s.jsx("span",{children:i.eventCountLabel}),i.tone==="live"&&s.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function o({events:e}){return s.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[s.jsxs("div",{className:"s-observe-receipt-view-copy",children:[s.jsx("strong",{children:"No observed trace activity"}),s.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),e.length>0&&s.jsx("ul",{className:"s-observe-receipt-list",children:e.map(r=>s.jsxs("li",{className:"s-observe-receipt",children:[s.jsx("span",{children:r.text}),r.detail&&s.jsx("small",{children:r.detail})]},r.id))})]})}export{l as SessionObserveEmbedStatus,o as SessionObserveReceiptView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as e}from"./index-o4FKpU7Z.js";import{a as j}from"./api-h5zurxmi.js";import{u as g}from"./sse-CL6gctHY.js";import{u as N}from"./tail-events-NLIWLq27.js";import{B as I}from"./BackToPicker-BXp5E2ck.js";import{ConversationScreen as S}from"./ConversationScreen-oZSitVtX.js";import{S as k,a as y}from"./SessionObserve-DaUrJCMq.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-C65cZYPn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./NewChatComposer-S08F6_La.js";import"./runtime-picker-eDEvx2Mz.js";import"./scout-voice-B7kXlkcl.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-4LDsy4Ke.js";import"./createLucideIcon-Bt67PWH-.js";import"./MessageComposerSuggestions-Dfc3PH2y.js";import"./index-BMwKgdz_.js";import"./HarnessMark-MztYnrGK.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-BEz6jyqf.js";import"./keyboard-nav-Chf51dns.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-ynOfVadO.js";import"./chevron-down-NAhBUkFd.js";import"./search-7_n7CxWl.js";import"./file-text-iF0hyVyU.js";import"./ConversationComposer-CWohCCmn.js";import"./Provider-DKZWuzSR.js";import"./provider-BvAxRQfE.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CxkmFQcN.js";import"./DocumentFocusViewer-DRKjNG9s.js";import"./TextDocumentSurface-Bc-kHPgG.js";/* empty css */import"./chevron-right-C10o7t_X.js";import"./code-xml-CLn3TDWF.js";import"./arrow-left-BOht-YQu.js";import"./chunk-HRAB3GC3-DF8R9rPv.js";import"./message-markup-BcY1lShv.js";import"./mentions-CvDaviLJ.js";import"./AgentDetailCard-Biq8b2gv.js";import"./AgentLiveActions-0iy8QZ1T.js";import"./terminal-takeover-7AvNpnkC.js";import"./openContent-C6XO6kr5.js";import"./eye-B3lBIwJZ.js";import"./terminal-By1Lw2i2.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./AgentAvatar-DMov24_o.js";import"./SpriteAvatar-DQ3PTb8L.js";import"./agent-identity-BxCsXnDp.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BxTzXl8e.js";import"./ConversationFeedRows-IWh0JSIL.js";import"./ConversationPanels-D9UCwNkS.js";import"./use-reduced-motion-CqXpVXv-.js";import"./activity-BvGruxWG.js";import"./message-circle-BM3XgevU.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./ConversationStatus-B6pAbo2w.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-CcEiQC6B.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-ByW7Ar7p.js";import"./ObserveTextFlow-_ApDwRCO.js";import"./SessionObserveEvidence-ClUW8jpV.js";import"./wrench-M4G7WtYB.js";import"./external-link-Dem738OJ.js";function p(o){const s=o?.trim()??"",i=s.split(/[\\/]/).filter(Boolean).at(-1)??s;return i.endsWith(".jsonl")?i.slice(0,-6):i}function R(o){return o.startsWith("native:process:")}function x(o){const[s,i]=n.useState(null),[c,l]=n.useState(!0),[r,d]=n.useState(null),t=n.useRef(null),a=n.useCallback(async()=>{d(null);try{const m=await j(`/api/session-ref/${encodeURIComponent(o)}`);i(m)}catch(m){i(null),d(m instanceof Error?m.message:String(m))}finally{l(!1)}},[o]);n.useEffect(()=>{l(!0),a()},[a]);const u=n.useCallback(()=>{t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,a()},150)},[a]);return g(u),N(m=>{const v=p(m.sessionId),b=p(o),h=s?.kind==="observe"?p(s.observe.sessionId??s.observe.refId):"",f=s?.kind==="observe"?p(s.observe.data.metadata?.session?.externalSessionId):"";v!==b&&(!h||v!==h)&&(!f||v!==f)||u()}),n.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),{lookup:s,loading:c,error:r}}function es({sessionRef:o}){const{lookup:s,loading:i,error:c}=x(o);return s?.kind==="observe"?e.jsx(y,{data:s.observe.data,agentId:s.observe.agentId??s.session?.agentId??void 0,sessionId:s.observe.sessionId??s.observe.refId,surface:"context",observeSource:s.observe.source,observeFidelity:s.observe.fidelity}):e.jsx("aside",{className:"s-observe-rail s-observe-rail--context",children:e.jsxs("div",{children:[e.jsx("div",{className:"s-observe-rail-label",children:s?.kind==="conversation"?"Conversation":"Session context"}),e.jsx("div",{className:"s-observe-empty",children:i?"Resolving session reference":c?"Session context unavailable":"No observe context captured for this session"})]})})}function ss({sessionRef:o,navigate:s,renderBeforeContent:i,showObserveRail:c=!0,onLookup:l}){const{lookup:r,loading:d,error:t}=x(o);if(n.useEffect(()=>{r&&l?.(r)},[r,l]),r?.kind==="conversation")return e.jsxs(e.Fragment,{children:[i?.(r),e.jsx(S,{conversationId:r.conversationId,navigate:s})]});if(r?.kind==="observe")return e.jsxs(e.Fragment,{children:[i?.(r),e.jsx(k,{data:r.observe.data,agentId:r.observe.agentId??r.session?.agentId??void 0,sessionId:r.observe.sessionId??r.observe.refId,conversationId:r.session?.id??null,showRail:c,observeSource:r.observe.source,observeFidelity:r.observe.fidelity})]});if(d)return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:"Session"}),e.jsx("span",{className:"s-meta s-tabular",children:o.slice(0,8)})]}),e.jsxs("p",{className:"s-thread-overview-summary s-session-ref-loading",children:[e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),"Resolving session reference"]})]})})});const a=R(o);return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:a?"Process trace unavailable":"Session not found"}),e.jsx("span",{className:"s-meta s-tabular",children:o.slice(0,8)})]}),e.jsx("p",{className:"s-thread-overview-summary",children:a?"This is a live process handle, not a transcript session. No replayable session archive is attached yet.":"This session may have ended or the archive is not available on this machine."}),t&&e.jsx("p",{className:"s-session-ref-error-detail",children:t}),e.jsx("div",{className:"s-session-ref-nav-hint",children:e.jsx(I,{slot:"sessions",fallback:{view:"sessions"},navigate:s})})]})})})}export{es as SessionRefContextRail,ss as SessionRefScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-o4FKpU7Z.js";import{RawSessionsTable as t}from"./RawSessionsTable-Zkl4YDvz.js";/* empty css */import"./DataTable-CGw5CECG.js";/* empty css */import"./api-h5zurxmi.js";import"./time-Dhsh_2EG.js";import"./tail-events-NLIWLq27.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./Provider-DKZWuzSR.js";import"./provider-BvAxRQfE.js";import"./router-C65cZYPn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-CL6gctHY.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CxkmFQcN.js";import"./DocumentFocusViewer-DRKjNG9s.js";import"./createLucideIcon-Bt67PWH-.js";import"./TextDocumentSurface-Bc-kHPgG.js";/* empty css */import"./file-text-iF0hyVyU.js";import"./x-ynOfVadO.js";import"./chevron-right-C10o7t_X.js";import"./code-xml-CLn3TDWF.js";import"./arrow-left-BOht-YQu.js";import"./scout-voice-B7kXlkcl.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-Chf51dns.js";import"./MessageComposerSuggestions-Dfc3PH2y.js";import"./NewChatComposer-S08F6_La.js";import"./runtime-picker-eDEvx2Mz.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-4LDsy4Ke.js";import"./index-BMwKgdz_.js";import"./HarnessMark-MztYnrGK.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-BEz6jyqf.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-NAhBUkFd.js";import"./search-7_n7CxWl.js";import"./chunk-HRAB3GC3-DF8R9rPv.js";function X({navigate:o}){return r.jsx(t,{navigate:o})}export{X as SessionsScreen};
|