@openscout/scout 0.2.78 → 0.2.79
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 +19 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-DnqqRSlS.js +1 -0
- package/dist/client/assets/{AddProjectForm-DMnobKch.js → AddProjectForm-BoVtelSP.js} +1 -1
- package/dist/client/assets/{AgentAvatar-D90c1Rzk.js → AgentAvatar-CufDA4A-.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +1 -0
- package/dist/client/assets/{AgentDetailCard-BcRBRp88.js → AgentDetailCard-DxxVkgT1.js} +1 -1
- package/dist/client/assets/AgentFloorView-CycUn0Lv.js +1 -0
- package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +1 -0
- package/dist/client/assets/{AgentLaneCard-RrNnDZu8.js → AgentLaneCard-DTUvE96I.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9ZwUKrl.js → AgentLaneChrome-BfVygkgL.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BXbPls9N.js → AgentLaneDetailSheet-CWs9wKWk.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BhFmGNzT.js → AgentLaneSummaryResize-CMgzYvAA.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-eSAoDsPi.js → AgentLanesPreflight-KWfLcaNB.js} +1 -1
- package/dist/client/assets/AgentLanesView-CxfbV8Kd.js +2 -0
- package/dist/client/assets/{AgentLiveActions-DBtnD0qE.js → AgentLiveActions-CZdAInEu.js} +1 -1
- package/dist/client/assets/{AgentSessions-DyqOf4nG.js → AgentSessions-Bkr0lyry.js} +2 -2
- package/dist/client/assets/AgentsConsole-WtFVqaPJ.js +1 -0
- package/dist/client/assets/AgentsScreen-BMXvuiA2.js +1 -0
- package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +1 -0
- package/dist/client/assets/{AtopView-BCkae3e1.js → AtopView-_OKDlZ1h.js} +1 -1
- package/dist/client/assets/BackToPicker-CkUmHuuo.js +1 -0
- package/dist/client/assets/{BriefingDetailScreen-BwFyysT8.js → BriefingDetailScreen-i54EtZKW.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-BQEevztH.js → BriefingsScreen-CBrHojlQ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-7UjcuNjd.js → BrokerMetadataPanel-opTLuZU6.js} +1 -1
- package/dist/client/assets/{BrokerScreen-7ekklu88.js → BrokerScreen-CObCQvoy.js} +2 -2
- package/dist/client/assets/{ChatCollapsedStrip-CQSYSd8s.js → ChatCollapsedStrip-Dr2vmKXQ.js} +1 -1
- package/dist/client/assets/CodeDiffPane-CLOGjwul.js +1 -0
- package/dist/client/assets/{CodeProjectPicker-DqKFCpLU.js → CodeProjectPicker-DTV8hR6A.js} +1 -1
- package/dist/client/assets/CodeScreen-BXqi72NK.js +1 -0
- package/dist/client/assets/{ContextMenu-bARZqTzD.js → ContextMenu-BlBQhpax.js} +1 -1
- package/dist/client/assets/{ConversationComposer-Bla3DDvM.js → ConversationComposer-BBNPa5S9.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +1 -0
- package/dist/client/assets/ConversationHeader-DXMT-YXv.js +1 -0
- package/dist/client/assets/ConversationPanels-DHCtilQF.js +2 -0
- package/dist/client/assets/ConversationScreen-DSxIt9pq.css +1 -0
- package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +1 -0
- package/dist/client/assets/ConversationStatus-DSgdVofa.js +1 -0
- package/dist/client/assets/{DataTable-E8s_MmoA.js → DataTable-0DwuXyvW.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-Dpe88DFX.js → DispatchAftermath-BrreQifA.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-BeVwwl26.js → DocumentFocusViewer-DU_9BHsD.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-BQqFQVnI.js → EmbeddableSurfacesLab-DdaswbfI.js} +1 -1
- package/dist/client/assets/{EmptyState-4F9XDFQm.js → EmptyState-CoL-QuUO.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CLgUhSm4.js → FileViewerPane-C9Ly01Ef.js} +1 -1
- package/dist/client/assets/{FleetSearch-Dz5euQJe.js → FleetSearch-DlWTLl-v.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +1 -0
- package/dist/client/assets/{FollowScreen-DZ4qfYOY.js → FollowScreen--Q04xSSE.js} +1 -1
- package/dist/client/assets/{HarnessMark-Cbv3Ib0c.js → HarnessMark-Dm_qm1Ku.js} +1 -1
- package/dist/client/assets/HarnessesScreen-Y54viPX8.js +1 -0
- package/dist/client/assets/{HomeHero-B3uYd-pP.js → HomeHero-Cfsow7qL.js} +1 -1
- package/dist/client/assets/KnowledgeSearchInspector-DKashKoH.js +1 -0
- package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-Bla0gBdm.js → LaneToolHoverCard-BzehBmdi.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-BF9ERP5O.js → LaneTraceEventFocus-DYvHfs_3.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DFEPkpqY.js → MeshCanvas-DIjlrMPU.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-CyVFYixr.js → MeshCanvasMinimap-DEq-PkF0.js} +1 -1
- package/dist/client/assets/MeshScreen-TgDtz-1l.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CalkZghg.js → MeshTopologyView-BMHpH5BU.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-DpxN9WiB.js → MessageComposerSuggestions-zAUUcLOv.js} +1 -1
- package/dist/client/assets/MessagesScreen-BTQL0UcE.js +1 -0
- package/dist/client/assets/{MissionControlView-lUeAiSVg.js → MissionControlView-D59SPnAm.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-wlCmWDCT.js → MissionFocusOverlay-C7cPt6eU.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-CxlH3dON.js +1 -0
- package/dist/client/assets/{MissionLogPane-__MVtEl9.js → MissionLogPane-Ye3YlF9s.js} +1 -1
- package/dist/client/assets/{NewAgentModal-Bg-eWHpY.js → NewAgentModal-DprvD4EK.js} +1 -1
- package/dist/client/assets/NewChatComposer-B5FnPyzS.js +19 -0
- package/dist/client/assets/{NewChatOrigin-Bk2OyVjI.js → NewChatOrigin--pHWUb4V.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-CfvrnOiZ.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-rsFj_rVo.js → ObserveTextFlow-CBitljxi.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DyUeV98H.js → ObservedTopologyPanel-Dv6fbHzW.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +87 -0
- package/dist/client/assets/OpsAgentsView-CoBfAigH.js +1 -0
- package/dist/client/assets/OpsScreen-Bbo0W64T.js +1 -0
- package/dist/client/assets/OpsSubnav-CoN8utF8.js +1 -0
- package/dist/client/assets/{PlanView-C1CjH3PG.js → PlanView-DYtt8H37.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-CtTpj6fU.js → ProjectAgentProfileBar-B3IvVbqS.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-D5E8yvDj.js +1 -0
- package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +2 -0
- package/dist/client/assets/{ProjectsRail-BgiuV4LR.js → ProjectsRail-DEDS-M1c.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +1 -0
- package/dist/client/assets/Provider-tFc3jqZ4.js +1 -0
- package/dist/client/assets/{RailRow-BoGxAHNF.js → RailRow-BTlVAnHS.js} +1 -1
- package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-C0rumUME.js → RepoDiffEmbedScreen-CtTdlQ2A.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DMv6DioL.js → RepoDiffPageScreen-BRvaVYoC.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-Bo0gREMj.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +2 -0
- package/dist/client/assets/{ReposScreen-CB_YBWYf.js → ReposScreen-BBkJf8xT.js} +2 -2
- package/dist/client/assets/{ScoutDeckSurface-CxIYFyWx.js → ScoutDeckSurface-Bi9ov9Bm.js} +1 -1
- package/dist/client/assets/{ScoutSurface-CYz_TcWC.js → ScoutSurface-DEQg_7Io.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-L_R9atj0.js → ScoutbotBroadcastChip-DJXuyn73.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-CgiZMDMW.js → ScoutbotFxLab-BgsuLDjo.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-FMQOr1Np.js → ScoutbotRealtimeVoiceCall-Bzyl0BCS.js} +1 -1
- package/dist/client/assets/{SecondaryNav-B3-nh5dM.js → SecondaryNav-Bks0CO2h.js} +1 -1
- package/dist/client/assets/SessionEmbedScreen-b0Zgmfx5.js +1 -0
- package/dist/client/assets/SessionObserve-CLrHfAKZ.css +1 -0
- package/dist/client/assets/SessionObserve-Dlx5vDaV.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-ChBD1d4c.js +1 -0
- package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +1 -0
- package/dist/client/assets/SessionsScreen-BlknOWAd.js +1 -0
- package/dist/client/assets/{SettingsDrawer-XfdAa_nD.js → SettingsDrawer-C587L1i1.js} +3 -3
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
- package/dist/client/assets/SettingsScreen-BIlYxv_a.js +1 -0
- package/dist/client/assets/{ShikiPane-Ap1iPxYb.js → ShikiPane-I_OTW5NO.js} +1 -1
- package/dist/client/assets/{SlidePanel-COwtoJqR.js → SlidePanel-FCqT1zO3.js} +1 -1
- package/dist/client/assets/SpriteAvatar-CQs-jC-v.js +1 -0
- package/dist/client/assets/{StatusPill-DhBL__p8.js → StatusPill-CbABggnQ.js} +1 -1
- package/dist/client/assets/{TailView-DGj_5HA9.js → TailView-C_MXVSum.js} +2 -2
- package/dist/client/assets/Terminal-DwZyo8kA.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-BpAw4eQS.js → TextDocumentSurface-C-9EtYqt.js} +1 -1
- package/dist/client/assets/{TmuxPeek-m1osv33Q.js → TmuxPeek-Dz1gJ2pU.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-DsK53ar4.js → VoicePermissionsPanel-MfICy9kk.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Bx0JimPC.js → WorkDetailScreen-Cs7kdllj.js} +3 -3
- package/dist/client/assets/{WorkFilesViewer-Btl6C2Q1.js → WorkFilesViewer-CF-nhtZ4.js} +1 -1
- package/dist/client/assets/{activity-CA8qS6PI.js → activity-WhBf3FXP.js} +1 -1
- package/dist/client/assets/{addon-fit-BZ-kXjeN.js → addon-fit-q-x_HytU.js} +1 -1
- package/dist/client/assets/{addon-webgl-D9-EQVEK.js → addon-webgl-fhhvEA9h.js} +1 -1
- package/dist/client/assets/{agent-essentials-BSY1o46q.js → agent-essentials-DyJiUGpZ.js} +1 -1
- package/dist/client/assets/agent-identity-xQHedtLl.js +1 -0
- package/dist/client/assets/agent-lane-card-BkWVDYM8.css +1 -0
- package/dist/client/assets/{agent-lane-card-model-r2frk57c.js → agent-lane-card-model-BCIwPjEh.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-Djm3YJEa.js → agent-lane-detail-Cw4QVAgH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-CmHVe3dU.js → agent-lane-preview-BtnfNyFR.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-B4YTt4OF.js → agent-lanes-model-Bl6xfviL.js} +1 -1
- package/dist/client/assets/{arc.es-CQBb-dVu.js → arc.es-DPJ0xRV6.js} +1 -1
- package/dist/client/assets/{arrow-down-BPLe0am9.js → arrow-down-DsD-dYj-.js} +1 -1
- package/dist/client/assets/{arrow-left-DEZzHiPS.js → arrow-left-WjQIN9J6.js} +1 -1
- package/dist/client/assets/{arrow-up-right-ClxBnsi7.js → arrow-up-right-CtTDrZJr.js} +1 -1
- package/dist/client/assets/{bot-eu8pBNvI.js → bot-B_Uzf4_O.js} +1 -1
- package/dist/client/assets/{check-DjgFiBxb.js → check-BbgHJX8u.js} +1 -1
- package/dist/client/assets/{chevron-down-BGk5qoEw.js → chevron-down-BFai6ZfE.js} +1 -1
- package/dist/client/assets/{chevron-right-XiIHsk4m.js → chevron-right-CyUa1zXx.js} +1 -1
- package/dist/client/assets/chunk-HRAB3GC3-CvwpNg-G.js +1 -0
- package/dist/client/assets/{chunk-T65CQEWV-CrzwSeEt.js → chunk-T65CQEWV-DI4NKdNq.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-Bet8khjg.js → chunk-YOZR3KYS-BW85tiCr.js} +3 -3
- package/dist/client/assets/clock-DviOalxA.js +1 -0
- package/dist/client/assets/{code-xml-B6jOCM4V.js → code-xml-05TD3uOC.js} +1 -1
- package/dist/client/assets/content-2u_eV3fX.js +1 -0
- package/dist/client/assets/content-5irOghrY.js +1 -0
- package/dist/client/assets/content-8Z_0CwtD.js +1 -0
- package/dist/client/assets/content-B38YRDBu.js +1 -0
- package/dist/client/assets/content-BE3uK0LB.js +1 -0
- package/dist/client/assets/{content-C2EwTb2y.js → content-BtIxSqVY.js} +1 -1
- package/dist/client/assets/content-CFsPAihU.js +1 -0
- package/dist/client/assets/content-CKj5g5tu.js +1 -0
- package/dist/client/assets/{content-D5kJmfgl.js → content-CLDWXf9Z.js} +1 -1
- package/dist/client/assets/content-CRr73E0r.js +1 -0
- package/dist/client/assets/content-CVR75_Uj.js +1 -0
- package/dist/client/assets/content-Czdp7_JQ.js +1 -0
- package/dist/client/assets/content-D0_EJ6nP.js +1 -0
- package/dist/client/assets/content-DNmxpNhD.js +1 -0
- package/dist/client/assets/content-XpbI9uxd.js +1 -0
- package/dist/client/assets/content-cyxWdgKQ.js +1 -0
- package/dist/client/assets/{context-budget-CbB4BDcO.js → context-budget-DX_fwUs3.js} +1 -1
- package/dist/client/assets/{conversation-icons-IIG5ha6D.js → conversation-icons-DohQL6GI.js} +1 -1
- package/dist/client/assets/conversation-model-C4yb6_FA.js +1 -0
- package/dist/client/assets/conversation-motion-features-CifSdJtm.js +1 -0
- package/dist/client/assets/{copy-CQGYbxdu.js → copy-CwCAivnc.js} +1 -1
- package/dist/client/assets/{createLucideIcon-OpA4Amw5.js → createLucideIcon-DlxlBfLC.js} +1 -1
- package/dist/client/assets/discover-DoiAJo4Z.js +2 -0
- package/dist/client/assets/embed-entry-D1Or9S4d.js +2 -0
- package/dist/client/assets/{external-link-CXBytO9o.js → external-link-CnjcXf32.js} +1 -1
- package/dist/client/assets/{eye-0PvebX_a.js → eye-So8tNNK6.js} +1 -1
- package/dist/client/assets/{file-text-BODxCjcz.js → file-text-i3xTDUjJ.js} +1 -1
- package/dist/client/assets/{gestures-CcwOTu8C.js → gestures-CgvAMd6F.js} +1 -1
- package/dist/client/assets/{home-moving-signal-CK147hxn.js → home-moving-signal-BdkERL6B.js} +1 -1
- package/dist/client/assets/home-now-card-lLkv6nQs.js +1 -0
- package/dist/client/assets/{home-now-card-nano-BcjnOU9H.js → home-now-card-nano-CkLHUQ4J.js} +1 -1
- package/dist/client/assets/hooks-BPLDD9yu.js +2 -0
- package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +1 -0
- package/dist/client/assets/index-DGoLx89y.js +1 -0
- package/dist/client/assets/index-DITWsjFb.css +1 -0
- package/dist/client/assets/index-m6dFtY5f.js +1 -0
- package/dist/client/assets/index-pY8-Mz7y.js +1 -0
- package/dist/client/assets/{index-DMiGbrBt.js → index-sUomXsrf.js} +6 -6
- package/dist/client/assets/{inspector-panel-DPoCWxKs.js → inspector-panel-DhXd-YbT.js} +2 -2
- package/dist/client/assets/{keyboard-nav-2kv_tGUS.js → keyboard-nav-BhZZ5HEq.js} +1 -1
- package/dist/client/assets/knowledge-search-D_bLoYtC.css +1 -0
- package/dist/client/assets/{lane-observe-D0rfKDnU.js → lane-observe-DrhKkQ3A.js} +1 -1
- package/dist/client/assets/{lane-roster-store-D8x1jac2.js → lane-roster-store-NE15Oe6M.js} +1 -1
- package/dist/client/assets/left-B6eawimv.js +1 -0
- package/dist/client/assets/left-BL2uBHe0.js +2 -0
- package/dist/client/assets/left-BNJguPDG.js +1 -0
- package/dist/client/assets/left-BvCtvN0f.js +1 -0
- package/dist/client/assets/left-CfBb6bxM.js +1 -0
- package/dist/client/assets/left-DTrlBF0h.js +2 -0
- package/dist/client/assets/left-agents-DsOHgDCY.js +1 -0
- package/dist/client/assets/left-d4hlBBxY.js +1 -0
- package/dist/client/assets/left-default-BRCwoCJr.js +1 -0
- package/dist/client/assets/left-lanes-DNtoRzoV.js +1 -0
- package/dist/client/assets/left-mission-DsTu2X5Y.js +1 -0
- package/dist/client/assets/left-plan-CtySjsXC.js +2 -0
- package/dist/client/assets/library-CLpgWNJO.js +1 -0
- package/dist/client/assets/{loader-circle-CbHjZsz1.js → loader-circle-lWOOKezu.js} +1 -1
- package/dist/client/assets/{local-agents--00gLMqr.js → local-agents-C7fDHLVC.js} +1 -1
- package/dist/client/assets/{mentions-jSuTGeet.js → mentions-CY_wPZc5.js} +1 -1
- package/dist/client/assets/mesh-ops-B1kDjizF.css +1 -0
- package/dist/client/assets/mesh-ops-Kn8pCtyJ.js +1 -0
- package/dist/client/assets/{mesh-view-store-CWidRbTE.js → mesh-view-store-D14ihwkF.js} +1 -1
- package/dist/client/assets/{message-circle-CG-96zts.js → message-circle-C5UZ6fO7.js} +1 -1
- package/dist/client/assets/{message-markup-3J9pi3nx.js → message-markup-C8Nx04sP.js} +1 -1
- package/dist/client/assets/{message-square-DSaGpjFU.js → message-square-BD-4UUdc.js} +1 -1
- package/dist/client/assets/{mission-control-store-BlnEhiCq.js → mission-control-store-xQHVQdm8.js} +1 -1
- package/dist/client/assets/{model-CpAxGuis.js → model-IGCUEsMy.js} +1 -1
- package/dist/client/assets/{observe-CuLGD9Zp.js → observe-uJfIlIUV.js} +1 -1
- package/dist/client/assets/{page-status-DpkedE1F.js → page-status-BymFEFai.js} +1 -1
- package/dist/client/assets/paperclip-DL9BXPp2.js +1 -0
- package/dist/client/assets/{plus--b1raV_O.js → plus-C9lTjsgd.js} +1 -1
- package/dist/client/assets/profile-BqY5tesX.js +1 -0
- package/dist/client/assets/{projects-inbox-CHyUFQ6w.js → projects-inbox-DfVmGFFk.js} +1 -1
- package/dist/client/assets/{radio-Bz8ZePxj.js → radio-DedMyP8J.js} +1 -1
- package/dist/client/assets/{refresh-cw-BBmAnCB7.js → refresh-cw-D8PFyhUa.js} +1 -1
- package/dist/client/assets/repo-diff-DyYmQMSA.css +1 -0
- package/dist/client/assets/resolve-panes-1xeZMuaw.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +1 -0
- package/dist/client/assets/right-1x7HzabC.js +1 -0
- package/dist/client/assets/{right-DjRXbnRP.js → right-C1sIsSHR.js} +1 -1
- package/dist/client/assets/right-CFzPUzlF.js +1 -0
- package/dist/client/assets/right-CRKyeJDk.js +1 -0
- package/dist/client/assets/right-CagzkLWg.js +1 -0
- package/dist/client/assets/right-CsV149pN.js +1 -0
- package/dist/client/assets/right-DITNyG2s.js +1 -0
- package/dist/client/assets/right-E3nNcLE3.js +1 -0
- package/dist/client/assets/right-eUQvSjd7.js +1 -0
- package/dist/client/assets/right-ozp4nM44.js +1 -0
- package/dist/client/assets/{rocket-BSNS_rLs.js → rocket-CriBwkHM.js} +1 -1
- package/dist/client/assets/router-Dja9_ygK.js +1 -0
- package/dist/client/assets/{runtime-picker-Bcl5iIX5.js → runtime-picker-DOZpZOlt.js} +1 -1
- package/dist/client/assets/{scope-views-U-ucT9m0.js → scope-views-BF_RvGKU.js} +1 -1
- package/dist/client/assets/{scout-voice-CU5c0LGi.js → scout-voice-BZ4KqADJ.js} +1 -1
- package/dist/client/assets/{scroll-text-D6Pdnar7.js → scroll-text-BIYf6g6N.js} +1 -1
- package/dist/client/assets/{search-CWfZtOt2.js → search-DCT_EvPr.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-Drb7wPG4.js +1 -0
- package/dist/client/assets/{selection-bridge-16pk1qyG.js → selection-bridge-CJOTyYQs.js} +1 -1
- package/dist/client/assets/{send-horizontal-Bg5-QggH.js → send-horizontal-DDwOgEs3.js} +1 -1
- package/dist/client/assets/{server-CPp4ZJhZ.js → server-CHZCp3cF.js} +1 -1
- package/dist/client/assets/{session-catalog-BmoyVTJ_.js → session-catalog-XhGxCtP-.js} +1 -1
- package/dist/client/assets/{session-table-DZcrKoIH.js → session-table-sAVe44a4.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-1oW76Xc9.js → sliders-horizontal-B9Nj-Y4J.js} +1 -1
- package/dist/client/assets/sparkles-up7pVlX-.js +1 -0
- package/dist/client/assets/{sse-CjIkKo46.js → sse-CVoGDiKW.js} +1 -1
- package/dist/client/assets/{tail-events-D19uAGe3.js → tail-events-CTipUIli.js} +1 -1
- package/dist/client/assets/{terminal-B9AOZQKR.js → terminal-DXQISjZn.js} +1 -1
- package/dist/client/assets/{terminal-relay-CWbJ1RCW.js → terminal-relay-B5Sma7fK.js} +1 -1
- package/dist/client/assets/{terminal-takeover-B8UeD9OX.js → terminal-takeover-X97KCSJk.js} +1 -1
- package/dist/client/assets/{time-DltNTpLl.js → time-Dhsh_2EG.js} +1 -1
- package/dist/client/assets/{use-conversation-list-Byab41G6.js → use-conversation-list-B1T6J_qE.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BIbQx5AS.js → use-fleet-active-asks-DLofGhhK.js} +1 -1
- package/dist/client/assets/use-mesh-ops-items-ByGZk8rU.js +1 -0
- package/dist/client/assets/{use-reduced-motion-RRBkmVkk.js → use-reduced-motion-Cvk-HRKg.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-BHvg3G2c.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-DMrbBif0.js → useAgentHoverCard-D5e8Qg1z.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +1 -0
- package/dist/client/assets/usePierreRuntime-DIVunfX0.js +50 -0
- package/dist/client/assets/{wrench-Bkc_0lKF.js → wrench-pEVd8JnN.js} +1 -1
- package/dist/client/assets/{x-D3GElQbe.js → x-0XjXwGqq.js} +1 -1
- package/dist/client/assets/{xterm-BKR8oAkR.js → xterm-CRLlV1Xp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/0007_lean_venus.sql +26 -0
- package/dist/drizzle/0008_luxuriant_ted_forrester.sql +1 -0
- package/dist/drizzle/meta/0007_snapshot.json +5767 -0
- package/dist/drizzle/meta/0008_snapshot.json +5774 -0
- package/dist/drizzle/meta/_journal.json +14 -0
- package/dist/main.mjs +27836 -4437
- package/dist/node/main.mjs +31770 -12098
- package/dist/pairing-runtime-controller.mjs +37653 -16847
- package/dist/runtime/base-daemon.mjs +109 -18
- package/dist/runtime/broker-daemon.mjs +22018 -2739
- package/dist/runtime/broker-process-manager.mjs +122 -12
- package/dist/runtime/mesh-discover.mjs +90 -13
- package/dist/scout-control-plane-web.mjs +22453 -3299
- package/dist/scout-web-server.mjs +22453 -3299
- package/dist/statusline.mjs +2 -0
- package/package.json +3 -1
- package/dist/client/assets/ActivityScreen-Cu_1V4bq.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BqfOz90D.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CUpUrY57.js +0 -1
- package/dist/client/assets/AgentFloorView-8LoAEBwS.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DZs2_ibL.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-W3qs022h.js +0 -1
- package/dist/client/assets/AgentLanesView-B9vuEEmZ.js +0 -2
- package/dist/client/assets/AgentsConsole-BgiYP2wR.js +0 -1
- package/dist/client/assets/AgentsScreen-DBi8x4MB.js +0 -1
- package/dist/client/assets/AgentsSubnav-DIEO4NPx.js +0 -1
- package/dist/client/assets/BackToPicker-BRvfostO.js +0 -1
- package/dist/client/assets/CodeDiffPane-DDPt6KPh.js +0 -1
- package/dist/client/assets/CodeScreen-BxCrpRHd.js +0 -1
- package/dist/client/assets/ConversationFeedRows-B_gPxcqA.js +0 -1
- package/dist/client/assets/ConversationHeader-DE3FC0m-.js +0 -1
- package/dist/client/assets/ConversationPanels-DLek4H6A.js +0 -2
- package/dist/client/assets/ConversationScreen-BDRhx-RU.js +0 -1
- package/dist/client/assets/ConversationScreen-C9yMAMYF.css +0 -1
- package/dist/client/assets/ConversationStatus-BwVLiiO4.js +0 -1
- package/dist/client/assets/FlightObserveScreen-6RpZYwVz.js +0 -1
- package/dist/client/assets/HarnessesScreen-CznAImej.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-Dgdkfvvz.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DJDGGaqC.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-D1CspRbl.js +0 -1
- package/dist/client/assets/MeshScreen-DFgevn8N.js +0 -1
- package/dist/client/assets/MessagesScreen-C8YKW10Y.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-BpZWntfl.js +0 -1
- package/dist/client/assets/NewChatComposer-Cs6OsxK6.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-y2EpuqRZ.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-C_URc8sV.js +0 -87
- package/dist/client/assets/OpsAgentsView-UN7iOscs.js +0 -1
- package/dist/client/assets/OpsScreen-Buf3LKjb.js +0 -1
- package/dist/client/assets/OpsSubnav-DsuXzHah.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-DJusrAV-.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-BFwNJo_N.js +0 -1
- package/dist/client/assets/ProjectsInbox-GhVMxOhw.js +0 -2
- package/dist/client/assets/ProjectsScreen-eNUBy4YU.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-CoBgnHmr.js +0 -1
- package/dist/client/assets/Provider-C7UKGHQy.js +0 -1
- package/dist/client/assets/RawSessionsTable-DL8y_eEy.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-ffS-39zy.js +0 -1
- package/dist/client/assets/RepoDiffViewer-D_exm6xK.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-BPgF92Bg.js +0 -2
- package/dist/client/assets/SessionEmbedScreen-BVC7yvWF.js +0 -1
- package/dist/client/assets/SessionObserve-BpggNO_M.css +0 -1
- package/dist/client/assets/SessionObserve-yfXFafp8.js +0 -12
- package/dist/client/assets/SessionRefScreen-DRgJu7Jo.js +0 -1
- package/dist/client/assets/SessionsScreen-D6XUsZfA.js +0 -1
- package/dist/client/assets/SettingsDrawer-CmJt72ww.css +0 -1
- package/dist/client/assets/SettingsScreen-Cy8z-EuR.js +0 -1
- package/dist/client/assets/SpriteAvatar-DyaGuhik.js +0 -1
- package/dist/client/assets/Terminal-CqvGbjXU.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DuZZFFzW.js +0 -1
- package/dist/client/assets/agent-lane-card-Dm7YWoew.css +0 -1
- package/dist/client/assets/content-BDt9VBPk.js +0 -1
- package/dist/client/assets/content-BIXf4cKR.js +0 -1
- package/dist/client/assets/content-BLm0NBJM.js +0 -1
- package/dist/client/assets/content-C5UbLsDF.js +0 -1
- package/dist/client/assets/content-CR3vdrYY.js +0 -1
- package/dist/client/assets/content-CSPVmo2s.js +0 -1
- package/dist/client/assets/content-C_FGqx1X.js +0 -1
- package/dist/client/assets/content-CvlVUOG8.js +0 -1
- package/dist/client/assets/content-DTpQsomG.js +0 -1
- package/dist/client/assets/content-DikVsqLf.js +0 -1
- package/dist/client/assets/content-DlUe5Ono.js +0 -1
- package/dist/client/assets/content-GIBv_55n.js +0 -1
- package/dist/client/assets/content-Q2oclDzi.js +0 -1
- package/dist/client/assets/conversation-model-B47vYmWN.js +0 -1
- package/dist/client/assets/conversation-motion-features-BdAONVls.js +0 -1
- package/dist/client/assets/discover-C1YwpBDE.js +0 -2
- package/dist/client/assets/embed-entry-BAcGL3g9.js +0 -2
- package/dist/client/assets/home-now-card-BgvNWuea.js +0 -1
- package/dist/client/assets/hooks-B6y_O2FB.js +0 -2
- package/dist/client/assets/inbox-thread-redesign-Bz4FjWzr.css +0 -1
- package/dist/client/assets/index-BcuhqXLe.js +0 -1
- package/dist/client/assets/index-CJXzfjo9.js +0 -1
- package/dist/client/assets/index-DQPvraRS.js +0 -1
- package/dist/client/assets/index-DxGoC5l5.css +0 -1
- package/dist/client/assets/knowledge-search-CVxQwxPn.js +0 -1
- package/dist/client/assets/knowledge-search-DjrQdiiW.css +0 -1
- package/dist/client/assets/left-C--GiIh8.js +0 -2
- package/dist/client/assets/left-Cj7Rt89X.js +0 -1
- package/dist/client/assets/left-CpNEtFEg.js +0 -1
- package/dist/client/assets/left-CzXAuK_t.js +0 -2
- package/dist/client/assets/left-agents-Bo9sO1by.js +0 -1
- package/dist/client/assets/left-bN4PCAXa.js +0 -1
- package/dist/client/assets/left-default-DV9GdvYi.js +0 -1
- package/dist/client/assets/left-jYYGAOYD.js +0 -1
- package/dist/client/assets/left-lanes-D0l_Co7V.js +0 -1
- package/dist/client/assets/left-mission-Ci7zREkQ.js +0 -1
- package/dist/client/assets/left-plan-D4U1uflW.js +0 -2
- package/dist/client/assets/library-D-RxGiCw.js +0 -1
- package/dist/client/assets/profile-CVRziEDA.js +0 -1
- package/dist/client/assets/repo-diff-C9Qs-bEn.css +0 -1
- package/dist/client/assets/resolve-panes-r9B3mpW7.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-DcG8xGaB.js +0 -1
- package/dist/client/assets/right-BHeiIaty.js +0 -1
- package/dist/client/assets/right-BkgKo9VT.js +0 -1
- package/dist/client/assets/right-BpEU5jWE.js +0 -1
- package/dist/client/assets/right-CRZXoy-X.js +0 -1
- package/dist/client/assets/right-ChF_pbPy.js +0 -1
- package/dist/client/assets/right-DMoUT3KN.js +0 -1
- package/dist/client/assets/right-T4Ue6EqM.js +0 -1
- package/dist/client/assets/right-wzrLXKur.js +0 -1
- package/dist/client/assets/router-Bq5dwf78.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DqUIp0Es.js +0 -1
- package/dist/client/assets/sparkles-ClfRJQ6w.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-DMl1WNm7.js +0 -1
- package/dist/client/assets/usePierreRuntime-wC-yMtBb.js +0 -50
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./createLucideIcon-
|
|
1
|
+
import{c as o}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],c=o("arrow-down",e);export{c as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./createLucideIcon-
|
|
1
|
+
import{c as o}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./createLucideIcon-
|
|
1
|
+
import{c as o}from"./createLucideIcon-DlxlBfLC.js";const t=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],a=o("arrow-up-right",t);export{a as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./createLucideIcon-
|
|
1
|
+
import{c as t}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],a=t("bot",e);export{a as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./createLucideIcon-
|
|
1
|
+
import{c as o}from"./createLucideIcon-DlxlBfLC.js";const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],e=o("chevron-down",n);export{e as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./createLucideIcon-
|
|
1
|
+
import{c as o}from"./createLucideIcon-DlxlBfLC.js";const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e=o("chevron-right",t);export{e as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as S}from"./index-sUomXsrf.js";var O="hudson.theme",M="system",R="hudson",p=s.createContext(null);function T(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function L(){if(typeof window>"u")return{};try{const e=new URLSearchParams(window.location.search),t=e.get("theme"),n=e.get("template");return{theme:t==="light"||t==="dark"||t==="system"?t:void 0,template:n&&/^[a-z][a-z0-9-]{1,64}$/.test(n)?n:void 0}}catch{return{}}}function j(){const e=L();return!!(e.theme||e.template)}function l(e,t,n){if(typeof window>"u")return{theme:t,template:n};const r=L();try{const c=JSON.parse(window.localStorage.getItem(e)||"{}");return{theme:r.theme??c.theme??t,template:r.template??c.template??n}}catch{return{theme:r.theme??t,template:r.template??n}}}var H=()=>()=>{},U=()=>!0,b=()=>!1;function C(){return s.useSyncExternalStore(H,U,b)}function P(e){return e==="system"?typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark":e}function _(e){return e==="system"?"dark":e}function F(e,t,n){const r=n??document.documentElement;r.dataset.hudsonTheme=e,r.dataset.hudsonTemplate=t}function I(e,t,n){if(!j())try{const r=JSON.parse(window.localStorage.getItem(e)||"{}"),c=T(r)?{...r,theme:t,template:n}:{theme:t,template:n};window.localStorage.setItem(e,JSON.stringify(c))}catch{}}function D({children:e,defaultTheme:t=M,defaultTemplate:n=R,storageKey:r=O,rootElement:c}){const o=s.useContext(p),[d,m]=s.useState(t),[u,h]=s.useState(n),[v,g]=s.useState(()=>_(t)),[w,k]=s.useState(!1),x=C();s.useEffect(()=>{if(o)return;let a=!1;return queueMicrotask(()=>{if(a)return;const i=l(r,t,n);m(i.theme??t),h(i.template??n),k(!0)}),()=>{a=!0}},[n,t,o,r]),s.useEffect(()=>{if(o)return;const a=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{g(P(d))};return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[o,d]),s.useEffect(()=>{o||!w||F(v,u,c)},[w,o,v,c,u]),s.useEffect(()=>{o||!w||I(r,d,u)},[w,o,r,u,d]),s.useEffect(()=>{if(o)return;const a=f=>{if(f.key!==r)return;const E=l(r,t,n);m(E.theme??t),h(E.template??n)},i=f=>{if(f.detail?.key!==r)return;const y=l(r,t,n);m(y.theme??t),h(y.template??n)};return window.addEventListener("storage",a),window.addEventListener("hudson:saved",i),()=>{window.removeEventListener("storage",a),window.removeEventListener("hudson:saved",i)}},[n,t,o,r]);const A=s.useMemo(()=>({theme:d,resolvedTheme:x?v:void 0,template:u,setTheme:m,setTemplate:h}),[x,v,u,d]);return o?S.jsx(S.Fragment,{children:e}):S.jsx(p.Provider,{value:A,children:e})}function J(){return s.useContext(p)}export{D as T,J as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,j as s}from"./index-
|
|
1
|
+
import{r as e,j as s}from"./index-sUomXsrf.js";import{P as Q}from"./plus-C9lTjsgd.js";import{c as O}from"./createLucideIcon-DlxlBfLC.js";const ee=[["path",{d:"M5 12h14",key:"1ays0h"}]],te=O("minus",ee);var ne=({panOffset:u,scale:o,onPan:p,onPanStart:h,onPanEnd:a,isPanLocked:l=!1,onClick:m,showGuides:f=!1,onGuidesChange:y,gridOpacity:v=1})=>{const[d,k]=e.useState(f),[j,N]=e.useState(!1),c=e.useRef(!1),x=e.useRef({x:0,y:0}),n=e.useRef({active:!1,startX:0,startY:0}),z=e.useRef(null),M=e.useRef(null),S=e.useRef(null),A=4,H=e.useRef({x:0,y:0}),$=e.useRef(0),C=e.useRef(!1);e.useEffect(()=>{k(f)},[f]);const X=e.useCallback(t=>{const i=t;return i?i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable:!1},[]),Y=e.useCallback(t=>{const i=t;return i?!!i.closest('button, [role="button"], a, input, textarea, select, [data-interactive="true"]'):!1},[]),b=e.useCallback(t=>{c.current=t,N(t)},[]);e.useEffect(()=>{const t=r=>{if($.current=r.buttons,n.current.active&&(r.buttons&1)!==1&&(n.current.active=!1),c.current&&(r.buttons&1)!==1){b(!1),n.current.active=!1,a?.(),document.body.style.cursor="";return}if(l&&c.current){b(!1),n.current.active=!1,a?.(),document.body.style.cursor="";return}const g=z.current?.getBoundingClientRect(),w=g?r.clientX-g.left:r.clientX,_=g?r.clientY-g.top:r.clientY;if(H.current={x:w,y:_},M.current&&(M.current.style.left=`${w}px`),S.current&&(S.current.style.top=`${_}px`),n.current.active&&!c.current){const q=r.clientX-n.current.startX,J=r.clientY-n.current.startY;Math.hypot(q,J)>=A&&(n.current.active=!1,b(!0),C.current=!0,h?.(),x.current={x:r.clientX,y:r.clientY},document.body.style.cursor="grabbing")}c.current&&(p({x:(r.clientX-x.current.x)/o,y:(r.clientY-x.current.y)/o}),x.current={x:r.clientX,y:r.clientY})},i=r=>{$.current=r.buttons,n.current.active=!1,c.current&&(b(!1),a?.(),document.body.style.cursor="")},K=r=>{(r.metaKey||r.ctrlKey)&&r.key==="\\"&&(r.preventDefault(),k(g=>{const w=!g;return y?.(w),w}))},R=()=>{n.current.active=!1,i(new MouseEvent("mouseup"))};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",i),window.addEventListener("keydown",K),window.addEventListener("blur",R),document.addEventListener("visibilitychange",R),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",i),window.removeEventListener("keydown",K),window.removeEventListener("blur",R),document.removeEventListener("visibilitychange",R)}},[p,a,h,o,X,Y,l,b,y]),e.useEffect(()=>{!l||!c.current||(b(!1),a?.(),document.body.style.cursor="")},[l,a,b]);const P=t=>{C.current=!1,!(l||t.button!==0)&&(X(t.target)||Y(t.target)||($.current=t.buttons,n.current={active:!0,startX:t.clientX,startY:t.clientY},t.preventDefault()))},U=t=>{!C.current&&m&&m(t),C.current=!1},[I,Z]=e.useState({w:0,h:0});e.useEffect(()=>{const t=()=>Z({w:window.innerWidth,h:window.innerHeight});return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const L=Math.max(.4,Math.min(2,o)),E=100*L,D=20*L,F="var(--hud-canvas-dot-minor)",W="var(--hud-canvas-dot-major)",T="color-mix(in srgb, oklch(var(--accent)) 18%, transparent)",V=(I.w/2+u.x*o)%E,B=(I.h/2+u.y*o)%E;return s.jsxs("div",{ref:z,className:`absolute inset-0 z-0 overflow-hidden bg-background ${j?"cursor-grabbing":"cursor-grab"}`,onMouseDown:P,onClick:U,children:[s.jsx("div",{className:"absolute pointer-events-none",style:{inset:"-100px",opacity:.8*v,transition:"opacity 1s ease",backgroundImage:`radial-gradient(circle, ${F} 1px, transparent 1px)`,backgroundSize:`${D}px ${D}px`,backgroundPosition:`${V+100}px ${B+100}px`}}),s.jsx("div",{className:"absolute pointer-events-none",style:{inset:"-100px",opacity:.45*v,transition:"opacity 1s ease",backgroundImage:`radial-gradient(circle, ${W} 1.5px, transparent 1.5px)`,backgroundSize:`${E}px ${E}px`,backgroundPosition:`${V+100}px ${B+100}px`}}),d&&s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:M,className:"absolute top-0 bottom-0 w-px pointer-events-none",style:{left:0,backgroundColor:T}}),s.jsx("div",{ref:S,className:"absolute left-0 right-0 h-px pointer-events-none",style:{top:0,backgroundColor:T}})]})]})},ce=ne,G={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},re=({scale:u,onZoom:o,min:p=.2,max:h=3,step:a=.1})=>{const[l,m]=e.useState(!1),[f,y]=e.useState(""),v=e.useRef(null),d=e.useCallback(n=>Math.min(h,Math.max(p,n)),[p,h]),k=e.useCallback(()=>{o(d(u+a))},[u,a,o,d]),j=e.useCallback(()=>{o(d(u-a))},[u,a,o,d]),N=e.useCallback(()=>{y(Math.round(u*100).toString()),m(!0)},[u]),c=e.useCallback(()=>{m(!1);const n=parseInt(f,10);!isNaN(n)&&n>0&&o(d(n/100))},[f,o,d]),x=e.useCallback(n=>{n.key==="Enter"?c():n.key==="Escape"&&m(!1)},[c]);return e.useEffect(()=>{l&&v.current&&(v.current.focus(),v.current.select())},[l]),s.jsxs("div",{className:"pointer-events-auto flex flex-col items-center bg-card/95 border rounded-none shadow-[var(--hud-shadow-panel)] overflow-hidden",style:G,children:[s.jsx("button",{onClick:k,className:"w-9 h-8 flex items-center justify-center hover:bg-accent/10 text-muted-foreground hover:text-foreground transition-colors",title:"Zoom in",children:s.jsx(Q,{size:14})}),s.jsx("div",{className:"w-full border-t border-b",style:G,children:l?s.jsx("input",{ref:v,type:"text",value:f,onChange:n=>y(n.target.value.replace(/[^0-9]/g,"")),onBlur:c,onKeyDown:x,className:"w-9 py-1.5 text-center text-[11px] font-mono text-foreground bg-background/60 outline-none tabular-nums"}):s.jsxs("button",{onClick:N,className:"w-9 py-1.5 text-center text-[11px] font-mono text-foreground hover:bg-accent/10 transition-colors cursor-text tabular-nums",title:"Click to set zoom",children:[Math.round(u*100),"%"]})}),s.jsx("button",{onClick:j,className:"w-9 h-8 flex items-center justify-center hover:bg-accent/10 text-muted-foreground hover:text-foreground transition-colors",title:"Zoom out",children:s.jsx(te,{size:14})})]})},ie=re;export{ce as C,ie as Z};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xterm-
|
|
2
|
-
import{r as o,j as n,_ as Xe}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xterm-CRLlV1Xp.js","assets/index-sUomXsrf.js","assets/index-DITWsjFb.css","assets/addon-fit-q-x_HytU.js","assets/addon-webgl-fhhvEA9h.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as o,j as n,_ as Xe}from"./index-sUomXsrf.js";import{u as Pt}from"./chunk-HRAB3GC3-CvwpNg-G.js";import{c as Ct}from"./createLucideIcon-DlxlBfLC.js";import{A as Ft}from"./arrow-down-DsD-dYj-.js";const Ht=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Wt=Ct("arrow-up-down",Ht);const Vt=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ut=Ct("arrow-up",Vt);var xt=["terminal:ack"];function Tn(e={}){const{url:t="ws://localhost:3600",healthUrl:r,token:s,systemPrompt:a,cwd:i,workspaceFiles:u,autoConnect:k=!1,sessionKey:ae,orphanTTL:se,backend:G,controlMode:N="owner",tmuxSession:P,zellijSession:we,zellijSocketDir:ke,agent:Z,provider:ie,model:J,flowControl:je}=e,S=ae?`hudson.relay.${ae}`:null,$e=()=>{if(!S)return null;try{const d=localStorage.getItem(S);if(!d)return null;if(d.startsWith("{")){const p=JSON.parse(d);return typeof p.id!="string"?null:{id:p.id,reconnectToken:typeof p.reconnectToken=="string"?p.reconnectToken:null}}return{id:d,reconnectToken:null}}catch{return null}},g=o.useCallback((d,p=null)=>{if(S)try{d?localStorage.setItem(S,JSON.stringify({id:d,reconnectToken:p})):localStorage.removeItem(S)}catch{}},[S]),[ge,I]=o.useState("disconnected"),[Oe,ee]=o.useState(null),[Ne,w]=o.useState(null),[Ce,X]=o.useState(null),[A,Re]=o.useState(i||"~"),_=o.useRef(null),O=o.useRef(null),ce=o.useRef({cols:80,rows:24}),B=o.useRef(!1),Y=o.useRef([]),D=o.useRef(0),oe=o.useRef(0),he=o.useRef(0),F=o.useRef(A);F.current=A;const le=o.useRef(!1),be=o.useRef(null);le.current||(le.current=!0,be.current=$e());const v=o.useRef(be.current?.id??null),z=o.useRef(be.current?.reconnectToken??null),j=o.useRef(null),te=o.useRef(null),re=o.useRef(null),ne=o.useRef(new Set),$=je?.maxBufferedBytes??512*1024,T=o.useCallback(d=>{const p=_.current;p&&p.readyState===WebSocket.OPEN&&p.send(JSON.stringify(d))},[]),Ee=o.useCallback((d,p)=>{typeof d=="number"&&p===he.current&&T({type:"terminal:ack",seq:d})},[T]),R=o.useCallback(()=>{he.current+=1,Y.current=[],D.current=0},[]),q=o.useCallback((d,p=null)=>{const Q=he.current;if(!d){Ee(p,Q);return}let H=!1;const pe=()=>{H||(H=!0,Ee(p,Q))};if(j.current)try{j.current(d,pe)}catch{pe()}else for(Y.current.push({data:d,seq:p,ack:pe}),D.current+=d.length;D.current>$&&Y.current.length>0;){const W=Y.current.shift();if(!W)break;D.current-=W.data.length,W.ack()}if(ne.current.size>0)for(const W of ne.current)try{W(d)}catch{}},[Ee,$]),U=o.useCallback((d,p)=>{typeof d!="number"||typeof p!="number"||d<=0||p<=0||(re.current={cols:d,rows:p},te.current?.(d,p))},[]),ue=o.useCallback(()=>{const d=_.current;d&&(d.close(),_.current=null)},[]),l=o.useCallback(()=>{oe.current+=1,O.current&&(clearTimeout(O.current),O.current=null),ue(),B.current=!1,I("disconnected")},[ue]),x=o.useCallback(()=>{const d=F.current;return{type:"session:init",cols:ce.current.cols,rows:ce.current.rows,clientCapabilities:[...xt],...a?{systemPrompt:a}:{},...d?{cwd:d}:{},...u?{workspaceFiles:u}:{},...se?{orphanTTL:se}:{},...G?{backend:G}:{},...N!=="owner"?{controlMode:N}:{},...P?{tmuxSession:P}:{},...we?{zellijSession:we}:{},...ke?{zellijSocketDir:ke}:{},...Z?{agent:Z}:{},...ie?{provider:ie}:{},...J?{model:J}:{}}},[Z,G,N,J,se,ie,a,P,u,we,ke]),b=o.useCallback(()=>{B.current||(B.current=!0,v.current?T({type:"session:reconnect",sessionId:v.current,...z.current?{reconnectToken:z.current}:{},cols:ce.current.cols,rows:ce.current.rows,clientCapabilities:[...xt],...N!=="owner"?{controlMode:N}:{}}):T(x()))},[T,x,N]),y=o.useCallback(async()=>{const d=oe.current+1;oe.current=d,ue(),he.current+=1,B.current=!1,I("connecting"),w(null),X(null);const p=r||`${t.replace(/^ws(s?):\/\//,"http$1://")}/health`;try{const W=await fetch(p,{signal:AbortSignal.timeout(2e3)});if(!W.ok)throw new Error(`Relay health check failed: ${W.status}`)}catch{if(oe.current!==d)return;I("error"),w("Relay service is not running");return}if(oe.current!==d)return;ue();const Q=s?`${t}${t.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`:t,H=new WebSocket(Q);_.current=H;const pe=()=>oe.current===d&&_.current===H;H.onopen=()=>{if(!pe()){H.close();return}b()},H.onmessage=W=>{if(pe())try{const C=JSON.parse(W.data);switch(C.type){case"session:ready":U(C.cols,C.rows),v.current=C.sessionId,z.current=typeof C.reconnectToken=="string"?C.reconnectToken:null,g(C.sessionId,z.current),ee(C.sessionId),I("connected"),w(null),X(null);break;case"terminal:dimensions":U(C.cols,C.rows);break;case"session:expired":{v.current=null,z.current=null,g(null),B.current=!1,R(),q("\x1B[2J\x1B[H",null),T(x()),B.current=!0;break}case"session:error":I("error"),w(C.error||"Session failed to start");break;case"terminal:data":q(C.data||"",typeof C.seq=="number"?C.seq:null);break;case"session:exit":v.current=null,z.current=null,g(null),R(),ee(null),X(C.exitCode??null),C.exitCode!==0?(I("error"),w(C.reason||`Process exited with code ${C.exitCode}`)):I("disconnected");break;case"session:detached":v.current=null,z.current=null,g(null),ee(null);break}}catch{}},H.onclose=()=>{pe()&&(_.current=null,B.current=!1,I(W=>W==="error"?W:"disconnected"))},H.onerror=()=>{pe()&&(I("error"),w("Could not connect to relay"))}},[t,r,s,b,ue,T,q,x,g,R]),de=o.useCallback(d=>{N!=="observe"&&T({type:"terminal:input",data:d})},[N,T]),Ae=o.useCallback(d=>{N!=="observe"&&T({type:"terminal:input",data:d+"\r"})},[N,T]),fe=o.useCallback((d,p)=>{ce.current={cols:d,rows:p},B.current&&T({type:"terminal:resize",cols:d,rows:p})},[T]),M=o.useCallback(d=>{if(j.current=d,!d||Y.current.length===0)return;const p=Y.current;Y.current=[],D.current=0;for(const Q of p)try{d(Q.data,Q.ack)}catch{Q.ack()}},[]),L=o.useCallback(d=>{te.current=d;const p=re.current;d&&p&&d(p.cols,p.rows)},[]),Se=o.useCallback(d=>(ne.current.add(d),()=>{ne.current.delete(d)}),[]);o.useEffect(()=>(k&&y(),()=>{l()}),[]);const me=o.useCallback(()=>{l(),v.current=null,z.current=null,ee(null),g(null),R(),w(null),X(null),O.current=setTimeout(()=>{O.current=null,y()},200)},[l,y,g,R]);return{status:ge,sessionId:Oe,error:Ne,exitCode:Ce,cwd:A,controlMode:N,setCwd:Re,onData:M,onDimensions:L,subscribeData:Se,sendInput:de,sendLine:Ae,resize:fe,connect:y,disconnect:l,restart:me}}var Kt={titleBarInset:0,dragRegionProps:{},onInteractiveMouseDown:void 0,isSSR:!0,apiBaseUrl:"",serviceApiUrl:""},Gt=o.createContext(Kt);function Jt(){return o.useContext(Gt)}var gt="hudson:terminal:voice-transcript",ht="hudson:terminal:voice-submit",In='[data-hudson-terminal-drawer-content="true"]',Xt=o.createContext(void 0),Yt={background:"#091112",foreground:"#d7e5e2",cursor:"#35d7d0",cursorAccent:"#091112",selectionBackground:"#173739",selectionForeground:"#f3fbf9",black:"#091112",red:"#ff6b6b",green:"#35d07f",yellow:"#f5c451",blue:"#62b4ff",magenta:"#ff7ab6",cyan:"#32d5ca",white:"#d7e5e2",brightBlack:"#667777",brightRed:"#ff8f8f",brightGreen:"#5ee79f",brightYellow:"#ffd36e",brightBlue:"#8dccff",brightMagenta:"#ff9fca",brightCyan:"#67eee3",brightWhite:"#ffffff"},qt={background:"#f7faf9",foreground:"#111a19",cursor:"#006f6a",cursorAccent:"#f7faf9",selectionBackground:"#c0e7e2",selectionForeground:"#0d1716",black:"#111a19",red:"#9f1f18",green:"#006c46",yellow:"#704600",blue:"#075985",magenta:"#9d174d",cyan:"#006f6a",white:"#dbe5e2",brightBlack:"#52635f",brightRed:"#c2271f",brightGreen:"#007f55",brightYellow:"#865b00",brightBlue:"#0369a1",brightMagenta:"#be185d",brightCyan:"#007f89",brightWhite:"#ffffff"},Qt=`
|
|
3
3
|
.xterm { cursor: text; position: relative; user-select: none; -ms-user-select: none; -webkit-user-select: none; }
|
|
4
4
|
.xterm.focus, .xterm:focus { outline: none; }
|
|
5
5
|
.xterm .xterm-helpers { position: absolute; top: 0; z-index: 5; }
|
|
@@ -43,5 +43,5 @@ import{r as o,j as n,_ as Xe}from"./index-DMiGbrBt.js";import{n as Pt}from"./Pro
|
|
|
43
43
|
.xterm .xterm-scrollable-element > .shadow { position: absolute; display: none; }
|
|
44
44
|
.xterm .xterm-scrollable-element > .shadow.top { display: block; top: 0; left: 3px; height: 3px; width: 100%; }
|
|
45
45
|
.xterm .xterm-scrollable-element > .shadow.left { display: block; top: 3px; left: 0; height: 100%; width: 3px; }
|
|
46
|
-
`;function Zt(){if(typeof document>"u"||document.querySelector("[data-xterm-css]"))return;const e=document.createElement("style");e.setAttribute("data-xterm-css",""),e.textContent=Qt,document.head.appendChild(e)}function Ye(e,t){if(typeof e!="object"||e===null)return;const r=e,s=r[t];if(s)return s;const a=r.default;if(!(typeof a!="object"||a===null))return a[t]}function bt(e,t){if(!e||t&&!e.closest(t))return!1;const r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return!1;const s=window.getComputedStyle(e);return s.display!=="none"&&s.visibility!=="hidden"}var er="\x1B[13;2u",yt="\r";function tr(e){return new Promise((t,r)=>{const s=new FileReader;s.onload=()=>{const a=s.result;t(a.split(",")[1])},s.onerror=r,s.readAsDataURL(e)})}function rr({relay:e,fontSize:t=12,fontFamily:r="'JetBrains Mono', 'Hack Nerd Font', monospace",scrollback:s=5e3,renderer:a="auto",readOnly:i=!1,ariaLabel:u="Terminal",className:k,style:ae,colorScheme:se="auto",configItems:G,onOpenSettings:N,onStartService:P,quiet:we=!1,voiceVisibilityScope:ke,imageUploadUrl:Z,onReady:ie,onDispose:J,onResize:je,onRendererChange:S},$e){const{status:g,error:ge,exitCode:I,cwd:Oe,setCwd:ee,sendInput:Ne,resize:w,onData:Ce,onDimensions:X,connect:A,disconnect:Re,controlMode:_="owner"}=e,O=i||_==="observe",ce=o.useContext(Xt),B=ke===!1?void 0:ke??ce,[Y,D]=o.useState(!1),{apiBaseUrl:oe}=Jt(),he=Pt(),F=se==="auto"?he?.resolvedTheme==="light"?"light":"dark":se,le=F==="light"?qt:Yt,be=F==="light"?4.5:3,v=o.useRef(null),z=o.useRef(null),j=o.useRef(null),te=o.useRef(null),re=o.useRef(null),ne=o.useRef(!1),[$,T]=o.useState(!1),[Ee,R]=o.useState(!1),q=o.useRef(0),U=o.useRef(O),ue=o.useRef(null),l=o.useRef(null),x=o.useRef(null),b=o.useRef(null),y=o.useRef(ie),de=o.useRef(J),Ae=o.useRef(je),fe=o.useRef(S);o.useEffect(()=>{U.current=O,O&&(re.current=null,ne.current=!1,q.current=0,R(!1))},[O]),o.useEffect(()=>{y.current=ie},[ie]),o.useEffect(()=>{de.current=J},[J]),o.useEffect(()=>{Ae.current=je},[je]),o.useEffect(()=>{fe.current=S},[S]),o.useEffect(()=>{const c=v.current;if(!c)return;const f=m=>{m.key===" "&&!m.metaKey&&!m.ctrlKey&&!m.altKey&&m.stopPropagation()};return c.addEventListener("keydown",f),()=>c.removeEventListener("keydown",f)},[]);const M=Z===void 0?`${oe}/api/relay/upload`:Z,L=o.useCallback(c=>{U.current||Ne(c)},[Ne]),Se=o.useCallback((c,f)=>{if(!Number.isFinite(c)||!Number.isFinite(f)||c<=0||f<=0)return;const m=ue.current;m&&m.cols===c&&m.rows===f||(ue.current={cols:c,rows:f},w(c,f),Ae.current?.(c,f))},[w]),me=o.useCallback(()=>{const c=te.current,f=j.current;if(!c||!f)return null;try{const m=c.proposeDimensions();return m?((_!=="observe"||!l.current)&&c.fit(),Se(m.cols,m.rows),l.current??{cols:f.cols,rows:f.rows}):null}catch{return null}},[_,Se]),d=o.useCallback(()=>{x.current===null&&(x.current=window.requestAnimationFrame(()=>{x.current=null,me()}))},[me]);o.useImperativeHandle($e,()=>({focus:()=>{j.current?.focus()},fit:me,clear:()=>{j.current?.clear()},getDimensions:()=>{const c=j.current;return c?{cols:c.cols,rows:c.rows}:null},getTerminal:()=>j.current}),[me]);const p=o.useCallback(c=>{const f=c.transcript.replace(/\s+/g," ").trim();f&&L(c.submit?`${f}${yt}`:f)},[L]),Q=o.useCallback(()=>{L(yt)},[L]);o.useEffect(()=>{const c=f=>{if(U.current||!bt(v.current,B))return;const m=f.detail;if(!(!m||typeof m.transcript!="string")){if(g==="connected"){p(m);return}re.current=m,g!=="connecting"&&A()}};return window.addEventListener(gt,c),()=>window.removeEventListener(gt,c)},[A,p,g,B]),o.useEffect(()=>{if(g!=="connected"||!re.current)return;const c=re.current;re.current=null,p(c)},[p,g]),o.useEffect(()=>{const c=()=>{if(!U.current&&bt(v.current,B)){if(g==="connected"){Q();return}ne.current=!0,g!=="connecting"&&A()}};return window.addEventListener(ht,c),()=>window.removeEventListener(ht,c)},[A,Q,g,B]),o.useEffect(()=>{g!=="connected"||!ne.current||(ne.current=!1,Q())},[Q,g]);const H=o.useCallback(async c=>{if(!M)return null;try{const f=await tr(c),m=await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.name,data:f})}),{path:K}=await m.json();return K||null}catch(f){return console.error("File upload failed:",f),null}},[M]);o.useEffect(()=>{const c=v.current;if(!c)return;const f=async m=>{if(!m.clipboardData||!M)return;const K=Array.from(m.clipboardData.items).filter(ye=>ye.type.startsWith("image/"));if(K.length!==0&&(m.preventDefault(),m.stopPropagation(),!U.current))for(const ye of K){const Be=ye.getAsFile();if(!Be)continue;const ze=await H(Be);ze&&L(ze)}};return c.addEventListener("paste",f),()=>c.removeEventListener("paste",f)},[L,H,M]);const pe=o.useCallback(c=>{if(c.preventDefault(),U.current||!M){c.dataTransfer.dropEffect="none";return}c.dataTransfer.dropEffect="copy"},[M]),W=o.useCallback(c=>{if(c.preventDefault(),U.current||!M){q.current=0,R(!1);return}q.current++,c.dataTransfer.types.includes("Files")&&R(!0)},[M]),C=o.useCallback(c=>{if(c.preventDefault(),U.current){q.current=0,R(!1);return}q.current--,q.current===0&&R(!1)},[]),Lt=o.useCallback(async c=>{if(c.preventDefault(),q.current=0,R(!1),U.current||!M)return;const f=Array.from(c.dataTransfer.files).filter(m=>m.type.startsWith("image/"));if(f.length!==0)for(const m of f){const K=await H(m);K&&L(K)}},[L,H,M]);o.useEffect(()=>{let c=!1,f=null;T(!1);async function m(){const[K,ye,Be]=await Promise.all([Xe(()=>import("./xterm-BKR8oAkR.js").then(E=>E.x),__vite__mapDeps([0,1,2])),Xe(()=>import("./addon-fit-BZ-kXjeN.js").then(E=>E.a),__vite__mapDeps([3,1,2])),Xe(()=>import("./addon-webgl-D9-EQVEK.js").then(E=>E.a),__vite__mapDeps([4,1,2])).catch(()=>null)]),ze=Ye(K,"Terminal"),dt=Ye(ye,"FitAddon"),ft=Be?Ye(Be,"WebglAddon"):void 0;if(!ze||!dt){console.error("[TerminalRelay] @xterm/xterm or @xterm/addon-fit missing constructors",{xtermMod:K,fitMod:ye});return}if(Zt(),c||!z.current)return;f=new ze({fontSize:t,fontFamily:r,theme:le,minimumContrastRatio:be,cursorBlink:!0,cursorStyle:"bar",allowTransparency:!0,scrollback:s,convertEol:!1,allowProposedApi:!0});const mt=new dt;f.loadAddon(mt),f.open(z.current),j.current=f,te.current=mt;let pt="dom";if(a!=="dom"&&ft)try{const E=new ft;E.onContextLoss(()=>{E.dispose(),fe.current?.("dom")}),f.loadAddon(E),pt="webgl"}catch{}fe.current?.(pt),me(),f.attachCustomKeyEventHandler(E=>E.type==="keydown"&&E.key==="Enter"&&E.shiftKey&&!E.ctrlKey&&!E.altKey&&!E.metaKey?(E.preventDefault(),E.stopPropagation(),L(er),!1):!0),f.onData(E=>{L(E)}),T(!0),y.current?.(f)}return m(),()=>{c=!0,T(!1),x.current!==null&&(window.cancelAnimationFrame(x.current),x.current=null),f&&(f.dispose(),j.current=null,te.current=null),de.current?.()}},[me,a,s,L]),o.useEffect(()=>{const c=j.current;c&&(c.options.fontSize=t,c.options.fontFamily=r,me())},[me,t,r]),o.useEffect(()=>{const c=j.current;c&&(c.options.theme=le,c.options.minimumContrastRatio=be)},[be,le]),o.useEffect(()=>{if(!(!$||!X))return X((c,f)=>{l.current={cols:c,rows:f};const m=j.current;m&&(m.cols!==c||m.rows!==f)&&m.resize(c,f)}),()=>X(null)},[$,X]),o.useEffect(()=>{if($)return Ce((c,f)=>{let m=!1;const K=()=>{m||(m=!0,f())},ye=j.current;if(!ye){K();return}try{ye.write(c,K)}catch{K()}}),()=>{Ce(null)}},[$,Ce]),o.useEffect(()=>{const c=z.current;if(!c||!$)return;const f=new ResizeObserver(()=>{d()});return f.observe(c),()=>{f.disconnect(),x.current!==null&&(window.cancelAnimationFrame(x.current),x.current=null)}},[$,d]),o.useEffect(()=>{g==="connected"&&j.current&&j.current.focus()},[g]);const Ot=o.useCallback(()=>{g==="connected"&&j.current&&j.current.focus()},[g]),Bt=g==="error"&&ge==="Relay service is not running",zt=o.useCallback(async()=>{if(P){D(!0);try{await P()&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,A()},500))}finally{D(!1)}}},[P,A]);o.useEffect(()=>()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]);let _e=null;return Bt?_e=n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-xs text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 border border-amber-500/20 flex items-center justify-center",children:n.jsx("span",{className:"text-amber-400 text-[14px]",children:"!"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[12px] text-foreground font-medium mb-1",children:"Relay service not running"}),n.jsx("div",{className:"text-[11px] text-muted-foreground/80 leading-relaxed",children:P?"Start the relay service to open a terminal session.":"Start the relay service from the Workspace Manager."})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[P&&n.jsx("button",{type:"button",onClick:zt,disabled:Y,className:"text-[11px] px-4 py-1.5 rounded-full border border-accent/30 text-accent hover:bg-accent/10 transition-colors font-medium disabled:opacity-50",children:Y?"Starting":"Start Service"}),n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Retry"}),N&&n.jsx("button",{type:"button",onClick:N,className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Settings"})]})]}):g==="error"&&ge?_e=n.jsxs("div",{className:"flex flex-col items-center gap-3 max-w-md text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-red-500/10 flex items-center justify-center",children:n.jsx("span",{className:"text-red-400 text-sm",children:"!"})}),n.jsx("span",{className:"text-red-400 text-[12px] font-medium",children:"Session failed"}),n.jsx("code",{className:"text-[11px] text-muted-foreground bg-muted/80 px-3 py-2 rounded-md whitespace-pre-wrap leading-relaxed max-h-32 overflow-y-auto w-full text-left",children:ge}),I!==null&&I!==0&&n.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Exit code ",I]}),n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-3 py-1 rounded-full border border-cyan-500/30 text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:"Retry"})]}):g==="disconnected"&&!we?_e=n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-xs text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-muted border border-border flex items-center justify-center",children:n.jsx("span",{className:"text-muted-foreground/80 text-[14px]",children:"▷"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[12px] text-foreground font-medium mb-1",children:"Terminal relay disconnected"}),n.jsx("div",{className:"text-[11px] text-muted-foreground/80 leading-relaxed",children:"Set working directory and connect."})]}),n.jsxs("form",{className:"w-full",onSubmit:c=>{c.preventDefault(),A()},children:[n.jsx("label",{className:"text-[10px] font-mono text-muted-foreground/80 uppercase tracking-wider mb-1 block text-left",children:"Working Directory"}),n.jsx("input",{type:"text",value:Oe,onChange:c=>ee(c.target.value),placeholder:"~/dev/my-project",className:"w-full bg-muted/80 border border-border/50 rounded px-3 py-1.5 text-[11px] font-mono text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-accent/40 transition-colors",spellCheck:!1,autoComplete:"off"})]}),G&&G.length>0&&n.jsx("div",{className:"w-full grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-[10px] font-mono bg-muted/60 border border-border/40 rounded-md px-3 py-2",children:G.map(c=>n.jsxs("div",{className:"contents",children:[n.jsx("span",{className:"text-muted-foreground/80",children:c.label}),n.jsx("span",{className:"text-muted-foreground truncate text-left",children:c.value})]},c.label))}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-4 py-1.5 rounded-full border border-cyan-500/30 text-cyan-400 hover:bg-cyan-500/10 transition-colors font-medium",children:"Connect"}),N&&n.jsx("button",{type:"button",onClick:N,className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Settings"})]})]}):g==="connecting"&&!we&&(_e=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[n.jsx("div",{className:"w-6 h-6 border-2 border-muted-foreground/30 border-t-cyan-500 rounded-full animate-spin"}),n.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Connecting to relay"}),n.jsx("button",{type:"button",onClick:()=>{Re()},className:"text-[10px] px-3 py-1 rounded-full border border-border text-muted-foreground/80 hover:text-foreground hover:bg-muted transition-colors",children:"Cancel"})]})),n.jsxs("div",{ref:v,className:k?`relative flex flex-col h-full overflow-hidden ${k}`:"relative flex flex-col h-full overflow-hidden",style:ae,role:"application","aria-label":O?`${u} (read only)`:u,"data-readonly":O?"true":void 0,onClick:Ot,onDragOver:pe,onDragEnter:W,onDragLeave:C,onDrop:Lt,children:[_e&&n.jsx("div",{className:"flex items-center justify-center h-full font-mono text-[12px] absolute inset-0 z-10 bg-background/95",children:_e}),Ee&&n.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-cyan-500/10 border-2 border-dashed border-cyan-500/50 rounded pointer-events-none",children:n.jsx("span",{className:"text-cyan-400 font-mono text-sm",children:"Drop image to get path"})}),n.jsx("div",{ref:z,className:"flex-1 min-h-0 min-w-0 overflow-hidden",style:{visibility:_e?"hidden":"visible",backgroundColor:le.background,"--hud-terminal-bg":le.background,"--hud-terminal-fg":le.foreground}})]})}var nr=o.forwardRef(rr);nr.displayName="TerminalRelay";function Ve(e){if(typeof window>"u")return null;try{return e==="local"?window.localStorage:window.sessionStorage}catch{return null}}function sr(e,t){const r=Ve(e);if(!r)return null;try{return r.getItem(t)}catch{return null}}function or(e,t,r){const s=Ve(e);if(!s)return!1;try{return s.setItem(t,r),!0}catch{return!1}}function ar(e,t){const r=Ve(e);if(!r)return!1;try{return r.removeItem(t),!0}catch{return!1}}function ir(e){const t=Ve(e);if(!t)return[];try{const r=[],s=t.length;for(let a=0;a<s;a++){const i=t.key(a);typeof i=="string"&&r.push(i)}return r}catch{return[]}}var Et={getItem(e){return sr("local",e)},setItem(e,t){return or("local",e,t)},removeItem(e){return ar("local",e)},keys(){return ir("local")},isAvailable(){return Ve("local")!==null}};function cr(e="h",t=12){const r=globalThis.crypto;if(r&&typeof r.randomUUID=="function"){const a=r.randomUUID().replace(/-/g,"").slice(0,t);return e?`${e}_${a}`:a}if(r&&typeof r.getRandomValues=="function"){const a=new Uint8Array(Math.ceil(t/2));r.getRandomValues(a);const i=Array.from(a,u=>u.toString(16).padStart(2,"0")).join("").slice(0,t);return e?`${e}_${i}`:i}const s=Math.random().toString(36).slice(2,2+t);return e?`${e}_${s}`:s}var lr=200,ur=()=>Date.now(),dr=()=>cr("h",12),fr=e=>e instanceof Error?{name:e.name,message:e.message}:{message:String(e)},mr=()=>{const e=globalThis;return e.H_OBSERVABILITY===!0||e.H_DEBUG===!0},pr=class{constructor(){this.sinks=new Map}get size(){return this.sinks.size}add(e,t={}){const r=t.kinds?new Set(t.kinds):null;return this.sinks.set(e,{kinds:r}),()=>{this.sinks.delete(e)}}emit(e){for(const[t,r]of this.sinks)if(!(r.kinds&&!r.kinds.has(e.kind)))try{t(e)}catch{}}},xr=class{constructor(e){this.owner=e}log(e,t,r={}){const s={id:this.owner.createId(),kind:"log",timestamp:this.owner.now(),level:e,message:t,category:r.category,data:r.data};return this.owner.emit(s),s}debug(e,t){return this.log("debug",e,t)}info(e,t){return this.log("info",e,t)}warn(e,t){return this.log("warn",e,t)}error(e,t){return this.log("error",e,t)}},gr=class{constructor(e){this.owner=e}counter(e,t=1,r={}){return this.record("counter",e,t,r)}gauge(e,t,r={}){return this.record("gauge",e,t,r)}timing(e,t,r={}){return this.record("timing",e,t,{...r,unit:r.unit??"ms"})}record(e,t,r,s){const a={id:this.owner.createId(),kind:"metric",timestamp:this.owner.now(),metricType:e,name:t,value:r,category:s.category,unit:s.unit,tags:s.tags,data:s.data};return this.owner.emit(a),a}},hr=class{constructor(e,t){this.owner=e,this.event=t,this.ended=!1,this.owner.emit({...t})}end(e){if(this.ended)return this.event;const t=this.owner.now();return this.ended=!0,this.event.endTime=t,this.event.durationMs=Math.max(0,t-this.event.startTime),this.event.status="ok",e&&(this.event.data={...this.event.data,...e}),this.owner.emit({...this.event}),this.event}error(e,t){if(this.ended)return this.event;const r=this.owner.now();return this.ended=!0,this.event.endTime=r,this.event.durationMs=Math.max(0,r-this.event.startTime),this.event.status="error",this.event.error=fr(e),t&&(this.event.data={...this.event.data,...t}),this.owner.emit({...this.event}),this.event}},br=class{constructor(e){this.owner=e}start(e,t={}){const r=this.owner.createId(),s=this.owner.now(),a={id:r,kind:"span",timestamp:s,name:e,traceId:t.traceId??r,parentId:t.parentId,startTime:s,status:"active",category:t.category,data:t.data};return new hr(this.owner,a)}},yr=class St{constructor(t={}){this.logger=new xr(this),this.metrics=new gr(this),this.trace=new br(this),this.sinks=new pr,this.buffer=[],this.enabled=t.enabled??!0,this.maxBufferSize=Math.max(0,t.maxBufferSize??lr),this.nowFn=t.now??ur,this.createIdFn=t.createId??dr}static global(t={}){return new St({...t,enabled:t.enabled??mr()})}get isEnabled(){return this.enabled}setEnabled(t){this.enabled=t}subscribe(t,r={}){const s=this.sinks.add(t,r);if(r.replay)for(const a of this.buffer)r.kinds&&!r.kinds.includes(a.kind)||t(a);return s}flush(){const t=this.buffer.slice();return this.buffer.length=0,t}snapshot(){return this.buffer.slice()}emit(t){return this.enabled&&(this.remember(t),this.sinks.size>0&&this.sinks.emit(t)),t}now(){return this.nowFn()}createId(){return this.createIdFn()}remember(t){this.maxBufferSize!==0&&(this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.splice(0,this.buffer.length-this.maxBufferSize))}},Ue=yr.global(),vr=100,wr=class{constructor(e={}){this.entries=[],this.listeners=new Set,this.maxEntries=Math.max(0,e.maxEntries??vr)}snapshot(){return this.entries}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}add(e){return this.maxEntries===0||(this.entries=[e,...this.entries].slice(0,this.maxEntries),this.notify()),e}update(e,t){let r=!1;this.entries=this.entries.map(s=>s.id!==e?s:(r=!0,t(s))),r&&this.notify()}clear(){this.entries.length!==0&&(this.entries=[],this.notify())}notify(){for(const e of this.listeners)try{e()}catch{}}};new wr;var Tt="hudsonTrace",kr=new Set(["cat","find","fd","grep","head","ls","pwd","rg","sed","tail","wc","which"]),jr=new Set(["branch","diff","ls-files","log","rev-parse","show","status"]),It=new Set(["","agent.task"]);function Nr(e,t){const r=e.filter(Me),s=Sr(r);if(t==="raw")return{events:r,hiddenDetailEvents:0,collapsedEvents:0,relatedEventsByTrace:s};const a=Er(r),i=[];let u=0;for(const k of a.values())(t==="details"||Ir(k))&&(u+=k.length,i.push(Tr(k)));return{events:i,hiddenDetailEvents:Math.max(0,r.length-u),collapsedEvents:Math.max(0,u-i.length),relatedEventsByTrace:s}}function Me(e){const t=V(e);return e.category==="agent-action"||t.triggeredBy==="agent"||t.source==="workspace-ai"}function V(e){return e.data&&typeof e.data=="object"&&!Array.isArray(e.data)?e.data:{}}function h(e,t){const r=e[t];return typeof r=="string"&&r.trim()?r:null}function Le(e){return e.kind==="span"?e.traceId:h(V(e),"traceId")}function at(e){return h(V(e),"parentTraceId")}function Je(e){const t=V(e).metadata;if(!ct(t))return null;const r=t.command;return Array.isArray(r)&&r.every(s=>typeof s=="string")?r:typeof r=="string"&&r.trim()?r.trim().split(/\s+/):null}function rt(e){if(!e||e.length===0)return!1;const t=_t(e[0]);if(kr.has(t))return!0;if(t==="git"){const r=e.find((s,a)=>a>0&&!s.startsWith("-"));return r?jr.has(r):!1}return!1}function it(e){const t=V(e),r=h(t,"appId")??h(t,"targetAppId");if(r)return r;const s=h(t,"action")??h(t,"playbook")??h(t,"commandId"),a=s&&!It.has(s)?Ar(s):null;if(a)return a;const i=Je(e);for(const u of i??[]){const k=At(u);if(k)return k}return null}function Cr(e){const t=V(e)[Tt];if(!ct(t))return null;const r=h(t,"traceId"),s=Pe(t,"eventCount"),a=Pe(t,"startedAt"),i=Pe(t,"endedAt"),u=Pe(t,"durationMs"),k=Pe(t,"hiddenDetailEvents")??0;return!r||s===void 0||a===void 0||i===void 0||u===void 0?null:{traceId:r,eventCount:s,startedAt:a,endedAt:i,durationMs:u,hiddenDetailEvents:k}}function Rt(e){if(!e||e.length===0)return null;const t=_t(e[0]),r=e.map(_r).find(Boolean);return rt(e)?r?`Read ${r} with ${t}`:`Read with ${t}`:t==="bun"&&e[1]==="run"&&e[2]?`Run bun ${e[2]}`:e.slice(0,4).join(" ")}function vt(e){return!e||e==="agent.task"?"Agent task":e.replace(/^hudson\./,"").replace(/[._:-]+/g," ").replace(/\s+/g," ").trim().split(" ").map((r,s)=>s===0?Dr(r):r).join(" ")}function Er(e){const t=new Map;for(const r of e){const s=Le(r)??r.id,a=t.get(s);a?a.push(r):t.set(s,[r])}return t}function Sr(e){const t=new Map,r=(s,a)=>{if(!s)return;const i=t.get(s);i?i.some(u=>u.id===a.id)||i.push(a):t.set(s,[a])};for(const s of e)r(Le(s)??s.id,s),r(at(s),s),r(s.kind==="span"?s.parentId??null:null,s);for(const s of t.values())s.sort((a,i)=>a.timestamp-i.timestamp);return t}function Tr(e){const t=[...e].sort((u,k)=>u.timestamp-k.timestamp),r=Qe(t,u=>qe(u)===3)??Qe(t,u=>qe(u)===2)??Qe(t,u=>qe(u)===1)??t[t.length-1],s=Le(r)??r.id,a=t[0]?.timestamp??r.timestamp,i=t[t.length-1]?.timestamp??r.timestamp;return{...r,data:{...V(r),[Tt]:{traceId:s,eventCount:t.length,startedAt:a,endedAt:i,durationMs:Math.max(0,i-a),hiddenDetailEvents:Math.max(0,t.length-1)}}}}function Ir(e){return e.every(t=>at(t))?!1:e.some(t=>{if(t.kind==="span")return!0;const r=V(t),s=h(r,"action")??h(r,"playbook")??"",a=!It.has(s),i=Je(t);return a||h(r,"commandId")||it(t)&&!i||Rr(r)&&!rt(i)?!0:!!(i&&!rt(i))})}function Rr(e){const t=e.args;return ct(t)&&typeof t.prompt=="string"&&t.prompt.trim().length>0}function qe(e){if(e.kind==="span")return e.status==="error"?3:e.status==="ok"?2:e.status==="active"?1:0;const t=h(V(e),"status")??(e.kind==="log"?e.level:void 0);return t==="failed"||t==="error"?3:t==="completed"||t==="ok"?2:t==="started"||t==="active"?1:0}function Qe(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]}function Ar(e){if(!e)return null;const[t]=e.split(/[.:_-]/);return t||null}function At(e){const t=e.match(/(?:^|\/)app\/apps\/([^/\s]+)/);return t?t[1]:null}function _r(e){const t=At(e);return t||null}function _t(e){return e.split("/").pop()??e}function ct(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Pe(e,t){const r=e[t];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function Dr(e){return e&&`${e[0].toUpperCase()}${e.slice(1)}`}var $r=o.createContext(null);function Mr(){return o.useContext($r)}function Lr(e){const t=Mr();return!t||e.startsWith("inst:")||e.startsWith("hudson.ws.")?e:`inst:${t.instanceId}:${e}`}function Or(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.__v=="number"&&"value"in e}function Br(e,t){const r=Et.getItem(e);if(!r)return;let s;try{s=JSON.parse(r)}catch{return}const a=t?.version;if(a===void 0)return s;const[i,u]=Or(s)?[s.value,s.__v]:[s,0];if(u===a)return i;if(t?.migrate)try{return t.migrate(i,u)}catch{return}}function zr(e,t,r){let s;try{s=JSON.stringify(r===void 0?t:{__v:r,value:t})}catch{return}if(typeof s=="string"&&Et.setItem(e,s))try{window.dispatchEvent(new CustomEvent("hudson:saved",{detail:{key:e}}))}catch{}}var Pr=()=>()=>{},Fr=()=>!0,Hr=()=>!1;function Wr(){return o.useSyncExternalStore(Pr,Fr,Hr)}function Vr(e,t,r={}){const s=Wr(),a=Lr(e),i=r.enabled??!0,{version:u}=r,[k,ae]=o.useState(t),se=o.useRef(!1);if(s&&i&&!se.current){se.current=!0;const G=Br(a,r);G!==void 0&&ae(G)}return o.useEffect(()=>{!s||!i||zr(a,k,u)},[a,k,s,i,u]),[k,ae]}var Ur=["debug","info","warn","error"],Kr=["log","metric","span"],Gr="hudson:open-app",Ze=340,Ge=440,wt=900,Jr=420,Xr="hudson.hud-logger.inspector-width",Yr=1,kt={key:"time",direction:"desc"},jt="grid-cols-[62px_64px_76px_58px_72px_112px_128px_minmax(260px,1fr)_92px]";function qr(e){return typeof e!="number"||e===380?Ge:e}function Dt(e=Ue,t={}){const r=t.maxEvents??200,[s,a]=o.useState(()=>e.snapshot().slice(-r).reverse());return o.useEffect(()=>{const i=()=>{a(e.snapshot().slice(-r).reverse())},u=e.subscribe(i);return i(),u},[r,e]),s}function $t(e){const t=new Map;for(const r of e){if(r.kind!=="span")continue;(!t.get(r.id)||r.status!=="active")&&t.set(r.id,r.status)}return{total:e.length,errors:e.filter(r=>r.kind==="log"&&r.level==="error").length,warnings:e.filter(r=>r.kind==="log"&&r.level==="warn").length,agentActions:e.filter(Me).length,activeSpans:Array.from(t.values()).filter(r=>r==="active").length,lastEvent:e[0]??null}}function Qr(e=Ue,t={}){const r=Dt(e,t);return o.useMemo(()=>$t(r),[r])}function Rn({observability:e=Ue,maxEvents:t=200,label:r="Logs",className:s="",showCounts:a=!1}){const i=Qr(e,{maxEvents:t}),u=i.errors>0?"red":i.warnings>0||i.activeSpans>0?"amber":"emerald";return n.jsxs("span",{className:`inline-flex min-w-0 items-center gap-2 font-mono text-[9px] font-light uppercase tracking-[0.18em] ${vn(u)} ${s}`,title:`${i.total} events, ${i.errors} errors, ${i.activeSpans} active spans`,children:[n.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${wn(u)}`}),n.jsx("span",{children:r}),a&&i.errors>0?n.jsxs("span",{className:"tabular-nums font-semibold",children:[i.errors," err"]}):a&&i.warnings>0?n.jsxs("span",{className:"tabular-nums",children:[i.warnings," warn"]}):null]})}function An({observability:e=Ue,events:t,replayEvents:r,maxEvents:s=200,title:a="HudLogger",className:i="",emptyMessage:u="No events match the current filters.",showHeader:k=!0,showInspector:ae=!0,initialTail:se=!0,initialScope:G="all"}){const N=Dt(e,{maxEvents:s}),P=o.useMemo(()=>t?t.slice(0,s):!r||r.length===0?N:yn(r,N,s),[t,r,N,s]),[we,ke]=o.useState(null),[Z,ie]=o.useState("all"),[J,je]=o.useState("all"),[S,$e]=o.useState(G),[g,ge]=o.useState(G==="agent-actions"?"actions":"raw"),[I,Oe]=o.useState(""),[ee,Ne]=o.useState(se),[w,Ce]=o.useState(kt),[X,A]=o.useState(null),[Re,_]=Vr(Xr,Ge,{version:Yr,migrate:qr}),O=o.useRef(null),ce=o.useRef(null),[B,Y]=o.useState(!1),D=o.useMemo(()=>Nr(P,S==="agent-actions"?g:"raw"),[g,P,S]),oe=S==="agent-actions"?D.events:P,he=o.useMemo(()=>oe.filter(l=>{if(J!=="all"&&l.kind!==J||Z!=="all"&&(l.kind!=="log"||l.level!==Z))return!1;if(!I.trim())return!0;const x=Le(l)??l.id,b=D.relatedEventsByTrace.get(x)??[];return dn(l,b).includes(I.trim().toLowerCase())}),[D.relatedEventsByTrace,J,Z,I,oe]),F=o.useMemo(()=>gn(he,w),[he,w]),be=ee&&w.key==="time"&&w.direction==="desc"?F[0]?Te(F[0]):null:we,v=F.find(l=>Te(l)===be)??F[0]??null,z=v?Le(v)??v.id:null,j=z?D.relatedEventsByTrace.get(z)??[]:[],te=o.useMemo(()=>$t(P),[P]),re=o.useCallback(async(l,x)=>{await bn(l)&&(A(x),window.setTimeout(()=>{A(y=>y===x?null:y)},1200))},[]),ne=o.useCallback(l=>{Ne(!1),ke(Te(l))},[]),$=o.useCallback(l=>{Ne(!1),Ce(x=>x.key!==l?{key:l,direction:xn(l)}:{key:l,direction:x.direction==="asc"?"desc":"asc"})},[]),T=o.useCallback(()=>{ee||Ce(kt),Ne(l=>!l)},[ee]),Ee=o.useCallback(l=>{const x=nt(l);!x||typeof window>"u"||window.dispatchEvent(new CustomEvent(Gr,{detail:{appId:x,workspaceId:on(l),source:"hud-logger"}}))},[]),R=o.useCallback((l,x)=>{const b=Math.min(wt,Math.max(Ze,x-Jr));return Math.max(Ze,Math.min(b,l))},[]),q=o.useCallback(l=>{if(l.button!==0)return;const x=O.current,b=ce.current;if(!x||!b)return;l.preventDefault();const y=l.clientX,de=b.getBoundingClientRect().width;Y(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ae=M=>{const L=x.getBoundingClientRect().width,Se=R(de+(y-M.clientX),L);b.style.setProperty("--inspector-width",`${Se}px`)},fe=M=>{const L=x.getBoundingClientRect().width,Se=R(de+(y-M.clientX),L);_(Se),Y(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",Ae),window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)};window.addEventListener("pointermove",Ae),window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},[R,_]),U=o.useCallback(()=>{_(Ge)},[_]);o.useEffect(()=>{if(typeof window>"u")return;const l=O.current;if(!l)return;const x=new ResizeObserver(()=>{const b=l.getBoundingClientRect().width;_(y=>{const de=R(y,b);return de===y?y:de})});return x.observe(l),()=>x.disconnect()},[R,_]);const ue=o.useMemo(()=>({"--inspector-width":`${Re}px`}),[Re]);return n.jsxs("section",{ref:O,className:`flex min-h-[520px] flex-col overflow-hidden rounded-md border border-border bg-background text-foreground lg:flex-row ${i}`,children:[n.jsxs("main",{className:"flex min-h-0 min-w-0 flex-col border-b border-border/70 lg:flex-1 lg:border-b-0",children:[k&&n.jsxs("div",{className:"shrink-0 border-b border-border/70 bg-card/80 px-3 py-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(en,{ariaLabel:"copy filtered table",copied:X==="table",disabled:F.length===0,label:"copy all",onClick:()=>{re(mn(F),"table")}}),n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground",children:[n.jsx("span",{children:a}),n.jsxs("span",{className:"text-accent",children:[F.length," shown"]}),n.jsxs("span",{children:[te.total," buffered"]}),n.jsxs("span",{children:[te.agentActions," agent"]}),n.jsxs("span",{children:[te.errors," errors"]}),te.activeSpans>0&&n.jsxs("span",{className:"text-warning",children:[te.activeSpans," active"]}),S==="agent-actions"&&g!=="raw"&&D.hiddenDetailEvents>0&&n.jsxs("span",{children:[D.hiddenDetailEvents," detail hidden"]}),S==="agent-actions"&&D.collapsedEvents>0&&n.jsxs("span",{children:[D.collapsedEvents," collapsed"]})]})]}),n.jsxs("label",{className:"mt-2 flex min-w-0 items-center gap-2 rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 font-mono text-[13px] font-normal text-accent transition-colors focus-within:border-accent/40 focus-within:bg-muted/30",children:[n.jsx("span",{className:"shrink-0 text-success",children:"$"}),n.jsx("input",{value:I,onChange:l=>Oe(l.target.value),placeholder:"grep message, category, payload",className:"min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground"})]}),n.jsxs("details",{className:"mt-2 text-left",children:[n.jsx("summary",{className:"cursor-pointer font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground hover:text-foreground",children:"filters / controls"}),n.jsxs("div",{className:"mt-3 grid gap-3 border-t border-border/60 pt-3 md:grid-cols-[1fr_1fr_1fr_1fr_auto]",children:[n.jsxs(Ke,{label:"Scope",children:[n.jsx(ve,{active:S==="all",onClick:()=>$e("all"),children:"all"}),n.jsx(ve,{active:S==="agent-actions",onClick:()=>$e("agent-actions"),children:"agent actions"})]}),S==="agent-actions"?n.jsxs(Ke,{label:"Rows",children:[n.jsx(ve,{active:g==="actions",onClick:()=>ge("actions"),children:"actions"}),n.jsx(ve,{active:g==="details",onClick:()=>ge("details"),children:"details"}),n.jsx(ve,{active:g==="raw",onClick:()=>ge("raw"),children:"raw"})]}):n.jsx("div",{}),n.jsxs(Ke,{label:"Kind",children:[n.jsx(ve,{active:J==="all",onClick:()=>je("all"),children:"all"}),Kr.map(l=>n.jsx(ve,{active:J===l,onClick:()=>je(l),children:l},l))]}),n.jsxs(Ke,{label:"Level",children:[n.jsx(ve,{active:Z==="all",onClick:()=>ie("all"),children:"all"}),Ur.map(l=>n.jsx(ve,{active:Z===l,onClick:()=>ie(l),children:l},l))]}),n.jsx("div",{className:"flex flex-wrap items-end gap-2",children:n.jsxs("button",{type:"button",onClick:T,className:`rounded-md border px-2.5 py-1.5 font-mono text-[11px] font-normal uppercase tracking-[0.12em] transition-colors ${ee?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:["tail ",ee?"on":"off"]})})]})]})]}),n.jsx("div",{className:"max-h-[650px] overflow-auto lg:max-h-none lg:flex-1 lg:min-h-0",children:n.jsxs("div",{className:"min-w-[980px] font-mono text-[11px] font-normal",children:[n.jsxs("div",{className:`sticky top-0 z-10 grid min-h-8 ${jt} items-center border-b border-border/70 bg-card px-3 py-1.5 font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:[n.jsx("span",{className:"sticky left-0 bg-card pr-2",children:"Copy"}),n.jsx("span",{children:"Open"}),n.jsx(De,{column:"time",label:"Time",sort:w,onSort:$}),n.jsx(De,{column:"kind",label:"Kind",sort:w,onSort:$}),n.jsx(De,{column:"level",label:"Level",sort:w,onSort:$}),n.jsx(De,{column:"category",label:"Category",sort:w,onSort:$}),n.jsx(De,{column:"target",label:"Target",sort:w,onSort:$}),n.jsx(De,{column:"message",label:"Message",sort:w,onSort:$}),n.jsx(De,{column:"id",label:"Id",sort:w,onSort:$})]}),F.map(l=>{const x=nt(l),b=Te(l);return n.jsxs("div",{role:"button",tabIndex:0,onClick:()=>ne(l),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),ne(l))},className:`grid min-h-[34px] w-full ${jt} items-center border-b border-l-2 px-3 py-2 text-left transition-colors ${v&&Te(v)===b?"border-b-border/40 border-l-accent bg-accent/[0.08]":"border-b-border/40 border-l-transparent hover:bg-muted/30"}`,children:[n.jsx("button",{type:"button","aria-label":`copy row ${st(l.id)}`,onClick:y=>{y.stopPropagation(),re(ot(l).join(" "),`row:${b}`)},className:`sticky left-0 z-[1] justify-self-start rounded border border-border/70 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent ${v&&Te(v)===b?"bg-accent/[0.08]":"bg-background"}`,children:X===`row:${b}`?"copied":"copy"}),x?n.jsx("button",{type:"button","aria-label":`open ${He(l)}`,onClick:y=>{y.stopPropagation(),Ee(l)},className:"justify-self-start rounded border border-border/70 bg-muted/20 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent",children:"open"}):n.jsx("span",{className:"text-muted-foreground/45",children:"-"}),n.jsx("span",{className:"tabular-nums text-muted-foreground",children:ut(l)}),n.jsx("span",{className:"uppercase tracking-[0.13em] text-muted-foreground",children:l.kind}),n.jsx("span",{className:`uppercase tracking-[0.13em] ${lt(l)}`,children:xe(l)}),n.jsx("span",{className:"truncate uppercase tracking-[0.13em] text-muted-foreground",children:l.category??"-"}),n.jsx("span",{className:"truncate font-sans text-[12px] font-normal normal-case tracking-normal text-muted-foreground",children:He(l)}),n.jsx("span",{className:"truncate font-sans text-[13px] font-normal normal-case tracking-normal text-foreground",children:Ie(l)}),n.jsx("span",{className:"truncate text-muted-foreground",children:st(l.id)})]},b)}),F.length===0&&n.jsx("div",{className:"border-b border-border/40 px-3 py-5 font-sans text-[13px] text-muted-foreground",children:u})]})})]}),ae&&n.jsxs(n.Fragment,{children:[n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize payload inspector","aria-valuenow":Re,"aria-valuemin":Ze,"aria-valuemax":wt,title:"Drag to resize · Double-click to reset",onPointerDown:q,onDoubleClick:U,className:`group hidden shrink-0 cursor-col-resize items-stretch justify-center transition-colors lg:flex lg:w-[5px] ${B?"bg-accent/15":"hover:bg-accent/10"}`,children:n.jsx("div",{className:`w-px transition-colors ${B?"bg-accent/80":"bg-border group-hover:bg-accent/60"}`})}),n.jsx("aside",{ref:ce,style:ue,className:"flex w-full shrink-0 flex-col bg-background lg:w-[var(--inspector-width)]",children:n.jsx(Zr,{copied:v?X===`inspector:${Te(v)}`:!1,event:v,relatedEvents:j,onCopyRow:l=>{re(ot(l).join(" "),`inspector:${Te(l)}`)},onOpenTarget:Ee})})]})]})}function Zr({copied:e,event:t,relatedEvents:r,onCopyRow:s,onOpenTarget:a}){const i=t?nt(t):null;return n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border/70 bg-card/40 px-3 py-2.5 lg:px-4",children:[n.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.15em] text-foreground/80",children:"Payload inspector"}),t?n.jsxs("div",{className:"flex items-center gap-2",children:[i?n.jsx("button",{type:"button",onClick:()=>a(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:"open app"}):null,n.jsx("button",{type:"button",onClick:()=>s(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:e?"copied":"copy row"}),n.jsx("div",{className:`font-mono text-[11px] uppercase tracking-[0.12em] ${lt(t)}`,children:xe(t)})]}):null]}),n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3 lg:px-4 lg:py-4",children:t?n.jsxs("div",{className:"grid gap-3",children:[n.jsxs("div",{className:"overflow-hidden rounded-md border border-accent/25 bg-accent/[0.07]",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-accent/15 px-3 py-2",children:[n.jsx(tn,{event:t}),n.jsx("span",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:t.kind})]}),n.jsxs("div",{className:"px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.13em] text-accent",children:"selected event"}),n.jsx("div",{className:"mt-1 break-words text-[14px] font-normal leading-5 text-foreground",children:Ie(t)})]})]}),an(t).map(u=>n.jsx(rn,{section:u},u.title)),n.jsx(nn,{events:r,selectedId:t.id}),n.jsx(et,{label:"payload.data",value:t.data??{}}),t.kind==="metric"&&t.tags?n.jsx(et,{label:"metric.tags",value:t.tags}):null,t.kind==="span"&&t.error?n.jsx(et,{label:"span.error",value:t.error}):null]}):n.jsx("div",{className:"rounded-md border border-border/60 bg-muted/20 p-4 text-[13px] leading-6 text-muted-foreground",children:"No event selected."})})]})}function Ke({label:e,children:t}){return n.jsxs("div",{children:[n.jsx("div",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground",children:e}),n.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t})]})}function ve({active:e,onClick:t,children:r}){return n.jsx("button",{type:"button",onClick:t,className:`rounded-md border px-2 py-1 font-mono text-[11px] uppercase tracking-[0.1em] transition-colors ${e?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:r})}function De({column:e,label:t,sort:r,onSort:s}){const a=r.key===e,i=a?r.direction==="asc"?Ut:Ft:Wt,u=r.direction==="asc"?"ascending":"descending";return n.jsxs("button",{type:"button","aria-label":`Sort by ${t}${a?`, currently ${u}`:""}`,"aria-pressed":a,onClick:()=>s(e),className:`flex min-w-0 items-center gap-1.5 text-left uppercase tracking-[0.14em] transition ${a?"text-accent":"text-muted-foreground hover:text-foreground"}`,children:[n.jsx("span",{className:"min-w-0 truncate",children:t}),n.jsx(i,{size:10,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0"})]})}function en({ariaLabel:e,copied:t,disabled:r=!1,label:s,onClick:a}){return n.jsx("button",{type:"button","aria-label":e,disabled:r,onClick:a,className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent disabled:cursor-not-allowed disabled:opacity-40",children:t?"copied":s})}function tn({event:e}){const t=xe(e),r=Fe(e),s=r==="red"?"border-destructive/30 bg-destructive/10 text-destructive":r==="amber"?"border-warning/30 bg-warning/10 text-warning":r==="emerald"?"border-success/30 bg-success/10 text-success":"border-accent/30 bg-accent/10 text-accent";return n.jsx("span",{className:`rounded-full border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.11em] ${s}`,children:t})}function rn({section:e}){return n.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e.title}),n.jsx("div",{className:"divide-y divide-border/40",children:e.rows.map(t=>n.jsx(sn,{row:t},`${e.title}-${t.label}`))})]})}function nn({events:e,selectedId:t}){return e.length<=1?null:n.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 bg-muted/30 px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:"Trace lines"}),n.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.length})]}),n.jsx("div",{className:"divide-y divide-border/40",children:e.map(r=>{const s=Rt(Je(r));return n.jsxs("div",{className:`grid grid-cols-[74px_82px_minmax(0,1fr)] gap-2 px-3 py-1.5 ${r.id===t?"bg-accent/10":""}`,children:[n.jsx("span",{className:"font-mono text-[10px] tabular-nums text-muted-foreground",children:ut(r)}),n.jsx("span",{className:`font-mono text-[10px] uppercase tracking-[0.11em] ${lt(r)}`,children:xe(r)}),n.jsx("span",{className:"min-w-0 truncate text-[12px] text-foreground/80",children:s??Ie(r)})]},`${r.id}-${r.timestamp}`)})})]})}function sn({row:e}){return n.jsxs("div",{className:"grid grid-cols-[96px_minmax(0,1fr)] items-start gap-3 px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.label}),n.jsx("div",{className:`min-w-0 break-words text-[12px] leading-5 ${e.mono?"font-mono tabular-nums":"font-sans"} ${cn(e.tone)}`,children:e.value})]})}function et({label:e,value:t}){return n.jsxs("div",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e}),n.jsx("pre",{className:"max-h-[360px] overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[12px] font-light leading-5 text-foreground/80 lg:max-h-none lg:overflow-x-auto",children:JSON.stringify(t,null,2)})]})}function nt(e){return it(e)}function on(e){const t=V(e);return h(t,"workspaceId")??h(t,"targetWorkspaceId")}function He(e){const t=V(e),r=it(e);return h(t,"appName")??h(t,"appId")??r??h(t,"workspaceName")??h(t,"workspaceId")??h(t,"serviceId")??h(t,"target")??"-"}function an(e){const t=[{title:"Identity",rows:[{label:"id",value:e.id,mono:!0},{label:"kind",value:e.kind,tone:"cyan",mono:!0},{label:"category",value:e.category??"none",mono:!0}]},{title:"Signal",rows:[{label:ln(e),value:xe(e),tone:Fe(e),mono:!0},{label:"timestamp",value:tt(e.timestamp),mono:!0}]}];if(Me(e)){const r=V(e),s=Le(e),a=at(e);t.push({title:"Agent Action",rows:[{label:"source",value:h(r,"source")??"agent",mono:!0},{label:"status",value:h(r,"status")??xe(e),tone:Fe(e),mono:!0},{label:"action",value:h(r,"action")??Ie(e),mono:!0},{label:"target",value:He(e),mono:!0},{label:"workspace",value:h(r,"workspaceName")??h(r,"workspaceId")??"unknown",mono:!0},...s?[{label:"trace",value:s,mono:!0}]:[],...a?[{label:"parent",value:a,mono:!0}]:[]]});const i=fn(e),u=Cr(e);(i||u)&&t.push({title:"Request",rows:[...i?[{label:"prompt",value:i}]:[],...u?[{label:"lines",value:String(u.eventCount),mono:!0},{label:"duration",value:`${u.durationMs}ms`,mono:!0}]:[]]})}return e.kind==="log"&&t.push({title:"Log",rows:[{label:"message",value:e.message},{label:"level",value:e.level,tone:Fe(e),mono:!0}]}),e.kind==="metric"&&t.push({title:"Metric",rows:[{label:"name",value:e.name},{label:"type",value:e.metricType,tone:"emerald",mono:!0},{label:"value",value:un(e),tone:"emerald",mono:!0},{label:"unit",value:e.unit??"none",mono:!0}]}),e.kind==="span"&&t.push({title:"Trace",rows:[{label:"name",value:e.name},{label:"trace id",value:e.traceId,mono:!0},{label:"parent id",value:e.parentId??"none",mono:!0},{label:"status",value:e.status,tone:Fe(e),mono:!0},{label:"duration",value:e.durationMs===void 0?"active":`${e.durationMs}ms`,mono:!0},{label:"started",value:tt(e.startTime),mono:!0},{label:"ended",value:e.endTime===void 0?"pending":tt(e.endTime),mono:!0}]}),t}function Ie(e){if(e.kind==="log"){if(Me(e)){const t=V(e),r=Rt(Je(e));if(r){const u=h(t,"status");return u?`${r} ${u}`:r}const s=h(t,"action")??h(t,"commandId")??e.message,a=h(t,"status"),i=vt(s);return a?`${i} ${a}`:i}return e.message}return Me(e)?vt(e.name):e.name}function xe(e){return e.kind==="log"?Me(e)?h(V(e),"status")??e.level:e.level:e.kind==="metric"?e.metricType:e.status}function lt(e){const t=xe(e);return t==="error"||t==="failed"?"text-destructive":t==="warn"||t==="active"||t==="started"?"text-warning":e.kind==="metric"||t==="ok"||t==="completed"?"text-success":"text-accent"}function Fe(e){const t=xe(e);return t==="error"||t==="failed"?"red":t==="warn"||t==="active"||t==="started"?"amber":e.kind==="metric"||t==="ok"||t==="completed"?"emerald":"cyan"}function cn(e="neutral"){return e==="red"?"text-destructive":e==="amber"?"text-warning":e==="emerald"?"text-success":e==="cyan"?"text-accent":"text-foreground"}function ln(e){return e.kind==="log"?"level":e.kind==="metric"?"type":"status"}function un(e){return`${e.value}${e.unit?` ${e.unit}`:""}`}function tt(e){const t=new Date(e);return`${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}.${String(t.getMilliseconds()).padStart(3,"0")}`}function st(e){return e.length>10?e.slice(-10):e}function Te(e){return e.kind==="span"?`${e.kind}:${e.id}:${e.status}:${e.endTime??"active"}`:`${e.kind}:${e.id}:${e.timestamp}`}function ut(e){return new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ot(e){return[ut(e),e.kind,xe(e),e.category??"",He(e),Ie(e),e.id,JSON.stringify(e.data??{})].map(pn)}function dn(e,t){return[Ie(e),e.category??"",JSON.stringify(e.data??{}),...t.map(s=>`${Ie(s)} ${JSON.stringify(s.data??{})}`)].join(" ").toLowerCase()}function fn(e){const r=V(e).args,s=r&&typeof r=="object"&&!Array.isArray(r)?r.prompt:void 0;return typeof s!="string"||!s.trim()?null:s.replace(/\s+/g," ").trim().slice(0,360)}function mn(e){return[["time","kind","signal","category","target","message","id","payload"].join(" "),...e.map(t=>ot(t).join(" "))].join(`
|
|
46
|
+
`;function Zt(){if(typeof document>"u"||document.querySelector("[data-xterm-css]"))return;const e=document.createElement("style");e.setAttribute("data-xterm-css",""),e.textContent=Qt,document.head.appendChild(e)}function Ye(e,t){if(typeof e!="object"||e===null)return;const r=e,s=r[t];if(s)return s;const a=r.default;if(!(typeof a!="object"||a===null))return a[t]}function bt(e,t){if(!e||t&&!e.closest(t))return!1;const r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return!1;const s=window.getComputedStyle(e);return s.display!=="none"&&s.visibility!=="hidden"}var er="\x1B[13;2u",yt="\r";function tr(e){return new Promise((t,r)=>{const s=new FileReader;s.onload=()=>{const a=s.result;t(a.split(",")[1])},s.onerror=r,s.readAsDataURL(e)})}function rr({relay:e,fontSize:t=12,fontFamily:r="'JetBrains Mono', 'Hack Nerd Font', monospace",scrollback:s=5e3,renderer:a="auto",readOnly:i=!1,ariaLabel:u="Terminal",className:k,style:ae,colorScheme:se="auto",configItems:G,onOpenSettings:N,onStartService:P,quiet:we=!1,voiceVisibilityScope:ke,imageUploadUrl:Z,onReady:ie,onDispose:J,onResize:je,onRendererChange:S},$e){const{status:g,error:ge,exitCode:I,cwd:Oe,setCwd:ee,sendInput:Ne,resize:w,onData:Ce,onDimensions:X,connect:A,disconnect:Re,controlMode:_="owner"}=e,O=i||_==="observe",ce=o.useContext(Xt),B=ke===!1?void 0:ke??ce,[Y,D]=o.useState(!1),{apiBaseUrl:oe}=Jt(),he=Pt(),F=se==="auto"?he?.resolvedTheme==="light"?"light":"dark":se,le=F==="light"?qt:Yt,be=F==="light"?4.5:3,v=o.useRef(null),z=o.useRef(null),j=o.useRef(null),te=o.useRef(null),re=o.useRef(null),ne=o.useRef(!1),[$,T]=o.useState(!1),[Ee,R]=o.useState(!1),q=o.useRef(0),U=o.useRef(O),ue=o.useRef(null),l=o.useRef(null),x=o.useRef(null),b=o.useRef(null),y=o.useRef(ie),de=o.useRef(J),Ae=o.useRef(je),fe=o.useRef(S);o.useEffect(()=>{U.current=O,O&&(re.current=null,ne.current=!1,q.current=0,R(!1))},[O]),o.useEffect(()=>{y.current=ie},[ie]),o.useEffect(()=>{de.current=J},[J]),o.useEffect(()=>{Ae.current=je},[je]),o.useEffect(()=>{fe.current=S},[S]),o.useEffect(()=>{const c=v.current;if(!c)return;const f=m=>{m.key===" "&&!m.metaKey&&!m.ctrlKey&&!m.altKey&&m.stopPropagation()};return c.addEventListener("keydown",f),()=>c.removeEventListener("keydown",f)},[]);const M=Z===void 0?`${oe}/api/relay/upload`:Z,L=o.useCallback(c=>{U.current||Ne(c)},[Ne]),Se=o.useCallback((c,f)=>{if(!Number.isFinite(c)||!Number.isFinite(f)||c<=0||f<=0)return;const m=ue.current;m&&m.cols===c&&m.rows===f||(ue.current={cols:c,rows:f},w(c,f),Ae.current?.(c,f))},[w]),me=o.useCallback(()=>{const c=te.current,f=j.current;if(!c||!f)return null;try{const m=c.proposeDimensions();return m?((_!=="observe"||!l.current)&&c.fit(),Se(m.cols,m.rows),l.current??{cols:f.cols,rows:f.rows}):null}catch{return null}},[_,Se]),d=o.useCallback(()=>{x.current===null&&(x.current=window.requestAnimationFrame(()=>{x.current=null,me()}))},[me]);o.useImperativeHandle($e,()=>({focus:()=>{j.current?.focus()},fit:me,clear:()=>{j.current?.clear()},getDimensions:()=>{const c=j.current;return c?{cols:c.cols,rows:c.rows}:null},getTerminal:()=>j.current}),[me]);const p=o.useCallback(c=>{const f=c.transcript.replace(/\s+/g," ").trim();f&&L(c.submit?`${f}${yt}`:f)},[L]),Q=o.useCallback(()=>{L(yt)},[L]);o.useEffect(()=>{const c=f=>{if(U.current||!bt(v.current,B))return;const m=f.detail;if(!(!m||typeof m.transcript!="string")){if(g==="connected"){p(m);return}re.current=m,g!=="connecting"&&A()}};return window.addEventListener(gt,c),()=>window.removeEventListener(gt,c)},[A,p,g,B]),o.useEffect(()=>{if(g!=="connected"||!re.current)return;const c=re.current;re.current=null,p(c)},[p,g]),o.useEffect(()=>{const c=()=>{if(!U.current&&bt(v.current,B)){if(g==="connected"){Q();return}ne.current=!0,g!=="connecting"&&A()}};return window.addEventListener(ht,c),()=>window.removeEventListener(ht,c)},[A,Q,g,B]),o.useEffect(()=>{g!=="connected"||!ne.current||(ne.current=!1,Q())},[Q,g]);const H=o.useCallback(async c=>{if(!M)return null;try{const f=await tr(c),m=await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.name,data:f})}),{path:K}=await m.json();return K||null}catch(f){return console.error("File upload failed:",f),null}},[M]);o.useEffect(()=>{const c=v.current;if(!c)return;const f=async m=>{if(!m.clipboardData||!M)return;const K=Array.from(m.clipboardData.items).filter(ye=>ye.type.startsWith("image/"));if(K.length!==0&&(m.preventDefault(),m.stopPropagation(),!U.current))for(const ye of K){const Be=ye.getAsFile();if(!Be)continue;const ze=await H(Be);ze&&L(ze)}};return c.addEventListener("paste",f),()=>c.removeEventListener("paste",f)},[L,H,M]);const pe=o.useCallback(c=>{if(c.preventDefault(),U.current||!M){c.dataTransfer.dropEffect="none";return}c.dataTransfer.dropEffect="copy"},[M]),W=o.useCallback(c=>{if(c.preventDefault(),U.current||!M){q.current=0,R(!1);return}q.current++,c.dataTransfer.types.includes("Files")&&R(!0)},[M]),C=o.useCallback(c=>{if(c.preventDefault(),U.current){q.current=0,R(!1);return}q.current--,q.current===0&&R(!1)},[]),Lt=o.useCallback(async c=>{if(c.preventDefault(),q.current=0,R(!1),U.current||!M)return;const f=Array.from(c.dataTransfer.files).filter(m=>m.type.startsWith("image/"));if(f.length!==0)for(const m of f){const K=await H(m);K&&L(K)}},[L,H,M]);o.useEffect(()=>{let c=!1,f=null;T(!1);async function m(){const[K,ye,Be]=await Promise.all([Xe(()=>import("./xterm-CRLlV1Xp.js").then(E=>E.x),__vite__mapDeps([0,1,2])),Xe(()=>import("./addon-fit-q-x_HytU.js").then(E=>E.a),__vite__mapDeps([3,1,2])),Xe(()=>import("./addon-webgl-fhhvEA9h.js").then(E=>E.a),__vite__mapDeps([4,1,2])).catch(()=>null)]),ze=Ye(K,"Terminal"),dt=Ye(ye,"FitAddon"),ft=Be?Ye(Be,"WebglAddon"):void 0;if(!ze||!dt){console.error("[TerminalRelay] @xterm/xterm or @xterm/addon-fit missing constructors",{xtermMod:K,fitMod:ye});return}if(Zt(),c||!z.current)return;f=new ze({fontSize:t,fontFamily:r,theme:le,minimumContrastRatio:be,cursorBlink:!0,cursorStyle:"bar",allowTransparency:!0,scrollback:s,convertEol:!1,allowProposedApi:!0});const mt=new dt;f.loadAddon(mt),f.open(z.current),j.current=f,te.current=mt;let pt="dom";if(a!=="dom"&&ft)try{const E=new ft;E.onContextLoss(()=>{E.dispose(),fe.current?.("dom")}),f.loadAddon(E),pt="webgl"}catch{}fe.current?.(pt),me(),f.attachCustomKeyEventHandler(E=>E.type==="keydown"&&E.key==="Enter"&&E.shiftKey&&!E.ctrlKey&&!E.altKey&&!E.metaKey?(E.preventDefault(),E.stopPropagation(),L(er),!1):!0),f.onData(E=>{L(E)}),T(!0),y.current?.(f)}return m(),()=>{c=!0,T(!1),x.current!==null&&(window.cancelAnimationFrame(x.current),x.current=null),f&&(f.dispose(),j.current=null,te.current=null),de.current?.()}},[me,a,s,L]),o.useEffect(()=>{const c=j.current;c&&(c.options.fontSize=t,c.options.fontFamily=r,me())},[me,t,r]),o.useEffect(()=>{const c=j.current;c&&(c.options.theme=le,c.options.minimumContrastRatio=be)},[be,le]),o.useEffect(()=>{if(!(!$||!X))return X((c,f)=>{l.current={cols:c,rows:f};const m=j.current;m&&(m.cols!==c||m.rows!==f)&&m.resize(c,f)}),()=>X(null)},[$,X]),o.useEffect(()=>{if($)return Ce((c,f)=>{let m=!1;const K=()=>{m||(m=!0,f())},ye=j.current;if(!ye){K();return}try{ye.write(c,K)}catch{K()}}),()=>{Ce(null)}},[$,Ce]),o.useEffect(()=>{const c=z.current;if(!c||!$)return;const f=new ResizeObserver(()=>{d()});return f.observe(c),()=>{f.disconnect(),x.current!==null&&(window.cancelAnimationFrame(x.current),x.current=null)}},[$,d]),o.useEffect(()=>{g==="connected"&&j.current&&j.current.focus()},[g]);const Ot=o.useCallback(()=>{g==="connected"&&j.current&&j.current.focus()},[g]),Bt=g==="error"&&ge==="Relay service is not running",zt=o.useCallback(async()=>{if(P){D(!0);try{await P()&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,A()},500))}finally{D(!1)}}},[P,A]);o.useEffect(()=>()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]);let _e=null;return Bt?_e=n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-xs text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 border border-amber-500/20 flex items-center justify-center",children:n.jsx("span",{className:"text-amber-400 text-[14px]",children:"!"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[12px] text-foreground font-medium mb-1",children:"Relay service not running"}),n.jsx("div",{className:"text-[11px] text-muted-foreground/80 leading-relaxed",children:P?"Start the relay service to open a terminal session.":"Start the relay service from the Workspace Manager."})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[P&&n.jsx("button",{type:"button",onClick:zt,disabled:Y,className:"text-[11px] px-4 py-1.5 rounded-full border border-accent/30 text-accent hover:bg-accent/10 transition-colors font-medium disabled:opacity-50",children:Y?"Starting":"Start Service"}),n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Retry"}),N&&n.jsx("button",{type:"button",onClick:N,className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Settings"})]})]}):g==="error"&&ge?_e=n.jsxs("div",{className:"flex flex-col items-center gap-3 max-w-md text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-red-500/10 flex items-center justify-center",children:n.jsx("span",{className:"text-red-400 text-sm",children:"!"})}),n.jsx("span",{className:"text-red-400 text-[12px] font-medium",children:"Session failed"}),n.jsx("code",{className:"text-[11px] text-muted-foreground bg-muted/80 px-3 py-2 rounded-md whitespace-pre-wrap leading-relaxed max-h-32 overflow-y-auto w-full text-left",children:ge}),I!==null&&I!==0&&n.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Exit code ",I]}),n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-3 py-1 rounded-full border border-cyan-500/30 text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:"Retry"})]}):g==="disconnected"&&!we?_e=n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-xs text-center px-4",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-muted border border-border flex items-center justify-center",children:n.jsx("span",{className:"text-muted-foreground/80 text-[14px]",children:"▷"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[12px] text-foreground font-medium mb-1",children:"Terminal relay disconnected"}),n.jsx("div",{className:"text-[11px] text-muted-foreground/80 leading-relaxed",children:"Set working directory and connect."})]}),n.jsxs("form",{className:"w-full",onSubmit:c=>{c.preventDefault(),A()},children:[n.jsx("label",{className:"text-[10px] font-mono text-muted-foreground/80 uppercase tracking-wider mb-1 block text-left",children:"Working Directory"}),n.jsx("input",{type:"text",value:Oe,onChange:c=>ee(c.target.value),placeholder:"~/dev/my-project",className:"w-full bg-muted/80 border border-border/50 rounded px-3 py-1.5 text-[11px] font-mono text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-accent/40 transition-colors",spellCheck:!1,autoComplete:"off"})]}),G&&G.length>0&&n.jsx("div",{className:"w-full grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-[10px] font-mono bg-muted/60 border border-border/40 rounded-md px-3 py-2",children:G.map(c=>n.jsxs("div",{className:"contents",children:[n.jsx("span",{className:"text-muted-foreground/80",children:c.label}),n.jsx("span",{className:"text-muted-foreground truncate text-left",children:c.value})]},c.label))}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>A(),className:"text-[11px] px-4 py-1.5 rounded-full border border-cyan-500/30 text-cyan-400 hover:bg-cyan-500/10 transition-colors font-medium",children:"Connect"}),N&&n.jsx("button",{type:"button",onClick:N,className:"text-[11px] px-3 py-1.5 rounded-full border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Settings"})]})]}):g==="connecting"&&!we&&(_e=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[n.jsx("div",{className:"w-6 h-6 border-2 border-muted-foreground/30 border-t-cyan-500 rounded-full animate-spin"}),n.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Connecting to relay"}),n.jsx("button",{type:"button",onClick:()=>{Re()},className:"text-[10px] px-3 py-1 rounded-full border border-border text-muted-foreground/80 hover:text-foreground hover:bg-muted transition-colors",children:"Cancel"})]})),n.jsxs("div",{ref:v,className:k?`relative flex flex-col h-full overflow-hidden ${k}`:"relative flex flex-col h-full overflow-hidden",style:ae,role:"application","aria-label":O?`${u} (read only)`:u,"data-readonly":O?"true":void 0,onClick:Ot,onDragOver:pe,onDragEnter:W,onDragLeave:C,onDrop:Lt,children:[_e&&n.jsx("div",{className:"flex items-center justify-center h-full font-mono text-[12px] absolute inset-0 z-10 bg-background/95",children:_e}),Ee&&n.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-cyan-500/10 border-2 border-dashed border-cyan-500/50 rounded pointer-events-none",children:n.jsx("span",{className:"text-cyan-400 font-mono text-sm",children:"Drop image to get path"})}),n.jsx("div",{ref:z,className:"flex-1 min-h-0 min-w-0 overflow-hidden",style:{visibility:_e?"hidden":"visible",backgroundColor:le.background,"--hud-terminal-bg":le.background,"--hud-terminal-fg":le.foreground}})]})}var nr=o.forwardRef(rr);nr.displayName="TerminalRelay";function Ve(e){if(typeof window>"u")return null;try{return e==="local"?window.localStorage:window.sessionStorage}catch{return null}}function sr(e,t){const r=Ve(e);if(!r)return null;try{return r.getItem(t)}catch{return null}}function or(e,t,r){const s=Ve(e);if(!s)return!1;try{return s.setItem(t,r),!0}catch{return!1}}function ar(e,t){const r=Ve(e);if(!r)return!1;try{return r.removeItem(t),!0}catch{return!1}}function ir(e){const t=Ve(e);if(!t)return[];try{const r=[],s=t.length;for(let a=0;a<s;a++){const i=t.key(a);typeof i=="string"&&r.push(i)}return r}catch{return[]}}var Et={getItem(e){return sr("local",e)},setItem(e,t){return or("local",e,t)},removeItem(e){return ar("local",e)},keys(){return ir("local")},isAvailable(){return Ve("local")!==null}};function cr(e="h",t=12){const r=globalThis.crypto;if(r&&typeof r.randomUUID=="function"){const a=r.randomUUID().replace(/-/g,"").slice(0,t);return e?`${e}_${a}`:a}if(r&&typeof r.getRandomValues=="function"){const a=new Uint8Array(Math.ceil(t/2));r.getRandomValues(a);const i=Array.from(a,u=>u.toString(16).padStart(2,"0")).join("").slice(0,t);return e?`${e}_${i}`:i}const s=Math.random().toString(36).slice(2,2+t);return e?`${e}_${s}`:s}var lr=200,ur=()=>Date.now(),dr=()=>cr("h",12),fr=e=>e instanceof Error?{name:e.name,message:e.message}:{message:String(e)},mr=()=>{const e=globalThis;return e.H_OBSERVABILITY===!0||e.H_DEBUG===!0},pr=class{constructor(){this.sinks=new Map}get size(){return this.sinks.size}add(e,t={}){const r=t.kinds?new Set(t.kinds):null;return this.sinks.set(e,{kinds:r}),()=>{this.sinks.delete(e)}}emit(e){for(const[t,r]of this.sinks)if(!(r.kinds&&!r.kinds.has(e.kind)))try{t(e)}catch{}}},xr=class{constructor(e){this.owner=e}log(e,t,r={}){const s={id:this.owner.createId(),kind:"log",timestamp:this.owner.now(),level:e,message:t,category:r.category,data:r.data};return this.owner.emit(s),s}debug(e,t){return this.log("debug",e,t)}info(e,t){return this.log("info",e,t)}warn(e,t){return this.log("warn",e,t)}error(e,t){return this.log("error",e,t)}},gr=class{constructor(e){this.owner=e}counter(e,t=1,r={}){return this.record("counter",e,t,r)}gauge(e,t,r={}){return this.record("gauge",e,t,r)}timing(e,t,r={}){return this.record("timing",e,t,{...r,unit:r.unit??"ms"})}record(e,t,r,s){const a={id:this.owner.createId(),kind:"metric",timestamp:this.owner.now(),metricType:e,name:t,value:r,category:s.category,unit:s.unit,tags:s.tags,data:s.data};return this.owner.emit(a),a}},hr=class{constructor(e,t){this.owner=e,this.event=t,this.ended=!1,this.owner.emit({...t})}end(e){if(this.ended)return this.event;const t=this.owner.now();return this.ended=!0,this.event.endTime=t,this.event.durationMs=Math.max(0,t-this.event.startTime),this.event.status="ok",e&&(this.event.data={...this.event.data,...e}),this.owner.emit({...this.event}),this.event}error(e,t){if(this.ended)return this.event;const r=this.owner.now();return this.ended=!0,this.event.endTime=r,this.event.durationMs=Math.max(0,r-this.event.startTime),this.event.status="error",this.event.error=fr(e),t&&(this.event.data={...this.event.data,...t}),this.owner.emit({...this.event}),this.event}},br=class{constructor(e){this.owner=e}start(e,t={}){const r=this.owner.createId(),s=this.owner.now(),a={id:r,kind:"span",timestamp:s,name:e,traceId:t.traceId??r,parentId:t.parentId,startTime:s,status:"active",category:t.category,data:t.data};return new hr(this.owner,a)}},yr=class St{constructor(t={}){this.logger=new xr(this),this.metrics=new gr(this),this.trace=new br(this),this.sinks=new pr,this.buffer=[],this.enabled=t.enabled??!0,this.maxBufferSize=Math.max(0,t.maxBufferSize??lr),this.nowFn=t.now??ur,this.createIdFn=t.createId??dr}static global(t={}){return new St({...t,enabled:t.enabled??mr()})}get isEnabled(){return this.enabled}setEnabled(t){this.enabled=t}subscribe(t,r={}){const s=this.sinks.add(t,r);if(r.replay)for(const a of this.buffer)r.kinds&&!r.kinds.includes(a.kind)||t(a);return s}flush(){const t=this.buffer.slice();return this.buffer.length=0,t}snapshot(){return this.buffer.slice()}emit(t){return this.enabled&&(this.remember(t),this.sinks.size>0&&this.sinks.emit(t)),t}now(){return this.nowFn()}createId(){return this.createIdFn()}remember(t){this.maxBufferSize!==0&&(this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.splice(0,this.buffer.length-this.maxBufferSize))}},Ue=yr.global(),vr=100,wr=class{constructor(e={}){this.entries=[],this.listeners=new Set,this.maxEntries=Math.max(0,e.maxEntries??vr)}snapshot(){return this.entries}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}add(e){return this.maxEntries===0||(this.entries=[e,...this.entries].slice(0,this.maxEntries),this.notify()),e}update(e,t){let r=!1;this.entries=this.entries.map(s=>s.id!==e?s:(r=!0,t(s))),r&&this.notify()}clear(){this.entries.length!==0&&(this.entries=[],this.notify())}notify(){for(const e of this.listeners)try{e()}catch{}}};new wr;var Tt="hudsonTrace",kr=new Set(["cat","find","fd","grep","head","ls","pwd","rg","sed","tail","wc","which"]),jr=new Set(["branch","diff","ls-files","log","rev-parse","show","status"]),It=new Set(["","agent.task"]);function Nr(e,t){const r=e.filter(Me),s=Sr(r);if(t==="raw")return{events:r,hiddenDetailEvents:0,collapsedEvents:0,relatedEventsByTrace:s};const a=Er(r),i=[];let u=0;for(const k of a.values())(t==="details"||Ir(k))&&(u+=k.length,i.push(Tr(k)));return{events:i,hiddenDetailEvents:Math.max(0,r.length-u),collapsedEvents:Math.max(0,u-i.length),relatedEventsByTrace:s}}function Me(e){const t=V(e);return e.category==="agent-action"||t.triggeredBy==="agent"||t.source==="workspace-ai"}function V(e){return e.data&&typeof e.data=="object"&&!Array.isArray(e.data)?e.data:{}}function h(e,t){const r=e[t];return typeof r=="string"&&r.trim()?r:null}function Le(e){return e.kind==="span"?e.traceId:h(V(e),"traceId")}function at(e){return h(V(e),"parentTraceId")}function Je(e){const t=V(e).metadata;if(!ct(t))return null;const r=t.command;return Array.isArray(r)&&r.every(s=>typeof s=="string")?r:typeof r=="string"&&r.trim()?r.trim().split(/\s+/):null}function rt(e){if(!e||e.length===0)return!1;const t=_t(e[0]);if(kr.has(t))return!0;if(t==="git"){const r=e.find((s,a)=>a>0&&!s.startsWith("-"));return r?jr.has(r):!1}return!1}function it(e){const t=V(e),r=h(t,"appId")??h(t,"targetAppId");if(r)return r;const s=h(t,"action")??h(t,"playbook")??h(t,"commandId"),a=s&&!It.has(s)?Ar(s):null;if(a)return a;const i=Je(e);for(const u of i??[]){const k=At(u);if(k)return k}return null}function Cr(e){const t=V(e)[Tt];if(!ct(t))return null;const r=h(t,"traceId"),s=Pe(t,"eventCount"),a=Pe(t,"startedAt"),i=Pe(t,"endedAt"),u=Pe(t,"durationMs"),k=Pe(t,"hiddenDetailEvents")??0;return!r||s===void 0||a===void 0||i===void 0||u===void 0?null:{traceId:r,eventCount:s,startedAt:a,endedAt:i,durationMs:u,hiddenDetailEvents:k}}function Rt(e){if(!e||e.length===0)return null;const t=_t(e[0]),r=e.map(_r).find(Boolean);return rt(e)?r?`Read ${r} with ${t}`:`Read with ${t}`:t==="bun"&&e[1]==="run"&&e[2]?`Run bun ${e[2]}`:e.slice(0,4).join(" ")}function vt(e){return!e||e==="agent.task"?"Agent task":e.replace(/^hudson\./,"").replace(/[._:-]+/g," ").replace(/\s+/g," ").trim().split(" ").map((r,s)=>s===0?Dr(r):r).join(" ")}function Er(e){const t=new Map;for(const r of e){const s=Le(r)??r.id,a=t.get(s);a?a.push(r):t.set(s,[r])}return t}function Sr(e){const t=new Map,r=(s,a)=>{if(!s)return;const i=t.get(s);i?i.some(u=>u.id===a.id)||i.push(a):t.set(s,[a])};for(const s of e)r(Le(s)??s.id,s),r(at(s),s),r(s.kind==="span"?s.parentId??null:null,s);for(const s of t.values())s.sort((a,i)=>a.timestamp-i.timestamp);return t}function Tr(e){const t=[...e].sort((u,k)=>u.timestamp-k.timestamp),r=Qe(t,u=>qe(u)===3)??Qe(t,u=>qe(u)===2)??Qe(t,u=>qe(u)===1)??t[t.length-1],s=Le(r)??r.id,a=t[0]?.timestamp??r.timestamp,i=t[t.length-1]?.timestamp??r.timestamp;return{...r,data:{...V(r),[Tt]:{traceId:s,eventCount:t.length,startedAt:a,endedAt:i,durationMs:Math.max(0,i-a),hiddenDetailEvents:Math.max(0,t.length-1)}}}}function Ir(e){return e.every(t=>at(t))?!1:e.some(t=>{if(t.kind==="span")return!0;const r=V(t),s=h(r,"action")??h(r,"playbook")??"",a=!It.has(s),i=Je(t);return a||h(r,"commandId")||it(t)&&!i||Rr(r)&&!rt(i)?!0:!!(i&&!rt(i))})}function Rr(e){const t=e.args;return ct(t)&&typeof t.prompt=="string"&&t.prompt.trim().length>0}function qe(e){if(e.kind==="span")return e.status==="error"?3:e.status==="ok"?2:e.status==="active"?1:0;const t=h(V(e),"status")??(e.kind==="log"?e.level:void 0);return t==="failed"||t==="error"?3:t==="completed"||t==="ok"?2:t==="started"||t==="active"?1:0}function Qe(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]}function Ar(e){if(!e)return null;const[t]=e.split(/[.:_-]/);return t||null}function At(e){const t=e.match(/(?:^|\/)app\/apps\/([^/\s]+)/);return t?t[1]:null}function _r(e){const t=At(e);return t||null}function _t(e){return e.split("/").pop()??e}function ct(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Pe(e,t){const r=e[t];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function Dr(e){return e&&`${e[0].toUpperCase()}${e.slice(1)}`}var $r=o.createContext(null);function Mr(){return o.useContext($r)}function Lr(e){const t=Mr();return!t||e.startsWith("inst:")||e.startsWith("hudson.ws.")?e:`inst:${t.instanceId}:${e}`}function Or(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.__v=="number"&&"value"in e}function Br(e,t){const r=Et.getItem(e);if(!r)return;let s;try{s=JSON.parse(r)}catch{return}const a=t?.version;if(a===void 0)return s;const[i,u]=Or(s)?[s.value,s.__v]:[s,0];if(u===a)return i;if(t?.migrate)try{return t.migrate(i,u)}catch{return}}function zr(e,t,r){let s;try{s=JSON.stringify(r===void 0?t:{__v:r,value:t})}catch{return}if(typeof s=="string"&&Et.setItem(e,s))try{window.dispatchEvent(new CustomEvent("hudson:saved",{detail:{key:e}}))}catch{}}var Pr=()=>()=>{},Fr=()=>!0,Hr=()=>!1;function Wr(){return o.useSyncExternalStore(Pr,Fr,Hr)}function Vr(e,t,r={}){const s=Wr(),a=Lr(e),i=r.enabled??!0,{version:u}=r,[k,ae]=o.useState(t),se=o.useRef(!1);if(s&&i&&!se.current){se.current=!0;const G=Br(a,r);G!==void 0&&ae(G)}return o.useEffect(()=>{!s||!i||zr(a,k,u)},[a,k,s,i,u]),[k,ae]}var Ur=["debug","info","warn","error"],Kr=["log","metric","span"],Gr="hudson:open-app",Ze=340,Ge=440,wt=900,Jr=420,Xr="hudson.hud-logger.inspector-width",Yr=1,kt={key:"time",direction:"desc"},jt="grid-cols-[62px_64px_76px_58px_72px_112px_128px_minmax(260px,1fr)_92px]";function qr(e){return typeof e!="number"||e===380?Ge:e}function Dt(e=Ue,t={}){const r=t.maxEvents??200,[s,a]=o.useState(()=>e.snapshot().slice(-r).reverse());return o.useEffect(()=>{const i=()=>{a(e.snapshot().slice(-r).reverse())},u=e.subscribe(i);return i(),u},[r,e]),s}function $t(e){const t=new Map;for(const r of e){if(r.kind!=="span")continue;(!t.get(r.id)||r.status!=="active")&&t.set(r.id,r.status)}return{total:e.length,errors:e.filter(r=>r.kind==="log"&&r.level==="error").length,warnings:e.filter(r=>r.kind==="log"&&r.level==="warn").length,agentActions:e.filter(Me).length,activeSpans:Array.from(t.values()).filter(r=>r==="active").length,lastEvent:e[0]??null}}function Qr(e=Ue,t={}){const r=Dt(e,t);return o.useMemo(()=>$t(r),[r])}function Rn({observability:e=Ue,maxEvents:t=200,label:r="Logs",className:s="",showCounts:a=!1}){const i=Qr(e,{maxEvents:t}),u=i.errors>0?"red":i.warnings>0||i.activeSpans>0?"amber":"emerald";return n.jsxs("span",{className:`inline-flex min-w-0 items-center gap-2 font-mono text-[9px] font-light uppercase tracking-[0.18em] ${vn(u)} ${s}`,title:`${i.total} events, ${i.errors} errors, ${i.activeSpans} active spans`,children:[n.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${wn(u)}`}),n.jsx("span",{children:r}),a&&i.errors>0?n.jsxs("span",{className:"tabular-nums font-semibold",children:[i.errors," err"]}):a&&i.warnings>0?n.jsxs("span",{className:"tabular-nums",children:[i.warnings," warn"]}):null]})}function An({observability:e=Ue,events:t,replayEvents:r,maxEvents:s=200,title:a="HudLogger",className:i="",emptyMessage:u="No events match the current filters.",showHeader:k=!0,showInspector:ae=!0,initialTail:se=!0,initialScope:G="all"}){const N=Dt(e,{maxEvents:s}),P=o.useMemo(()=>t?t.slice(0,s):!r||r.length===0?N:yn(r,N,s),[t,r,N,s]),[we,ke]=o.useState(null),[Z,ie]=o.useState("all"),[J,je]=o.useState("all"),[S,$e]=o.useState(G),[g,ge]=o.useState(G==="agent-actions"?"actions":"raw"),[I,Oe]=o.useState(""),[ee,Ne]=o.useState(se),[w,Ce]=o.useState(kt),[X,A]=o.useState(null),[Re,_]=Vr(Xr,Ge,{version:Yr,migrate:qr}),O=o.useRef(null),ce=o.useRef(null),[B,Y]=o.useState(!1),D=o.useMemo(()=>Nr(P,S==="agent-actions"?g:"raw"),[g,P,S]),oe=S==="agent-actions"?D.events:P,he=o.useMemo(()=>oe.filter(l=>{if(J!=="all"&&l.kind!==J||Z!=="all"&&(l.kind!=="log"||l.level!==Z))return!1;if(!I.trim())return!0;const x=Le(l)??l.id,b=D.relatedEventsByTrace.get(x)??[];return dn(l,b).includes(I.trim().toLowerCase())}),[D.relatedEventsByTrace,J,Z,I,oe]),F=o.useMemo(()=>gn(he,w),[he,w]),be=ee&&w.key==="time"&&w.direction==="desc"?F[0]?Te(F[0]):null:we,v=F.find(l=>Te(l)===be)??F[0]??null,z=v?Le(v)??v.id:null,j=z?D.relatedEventsByTrace.get(z)??[]:[],te=o.useMemo(()=>$t(P),[P]),re=o.useCallback(async(l,x)=>{await bn(l)&&(A(x),window.setTimeout(()=>{A(y=>y===x?null:y)},1200))},[]),ne=o.useCallback(l=>{Ne(!1),ke(Te(l))},[]),$=o.useCallback(l=>{Ne(!1),Ce(x=>x.key!==l?{key:l,direction:xn(l)}:{key:l,direction:x.direction==="asc"?"desc":"asc"})},[]),T=o.useCallback(()=>{ee||Ce(kt),Ne(l=>!l)},[ee]),Ee=o.useCallback(l=>{const x=nt(l);!x||typeof window>"u"||window.dispatchEvent(new CustomEvent(Gr,{detail:{appId:x,workspaceId:on(l),source:"hud-logger"}}))},[]),R=o.useCallback((l,x)=>{const b=Math.min(wt,Math.max(Ze,x-Jr));return Math.max(Ze,Math.min(b,l))},[]),q=o.useCallback(l=>{if(l.button!==0)return;const x=O.current,b=ce.current;if(!x||!b)return;l.preventDefault();const y=l.clientX,de=b.getBoundingClientRect().width;Y(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ae=M=>{const L=x.getBoundingClientRect().width,Se=R(de+(y-M.clientX),L);b.style.setProperty("--inspector-width",`${Se}px`)},fe=M=>{const L=x.getBoundingClientRect().width,Se=R(de+(y-M.clientX),L);_(Se),Y(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",Ae),window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)};window.addEventListener("pointermove",Ae),window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},[R,_]),U=o.useCallback(()=>{_(Ge)},[_]);o.useEffect(()=>{if(typeof window>"u")return;const l=O.current;if(!l)return;const x=new ResizeObserver(()=>{const b=l.getBoundingClientRect().width;_(y=>{const de=R(y,b);return de===y?y:de})});return x.observe(l),()=>x.disconnect()},[R,_]);const ue=o.useMemo(()=>({"--inspector-width":`${Re}px`}),[Re]);return n.jsxs("section",{ref:O,className:`flex min-h-[520px] flex-col overflow-hidden rounded-md border border-border bg-background text-foreground lg:flex-row ${i}`,children:[n.jsxs("main",{className:"flex min-h-0 min-w-0 flex-col border-b border-border/70 lg:flex-1 lg:border-b-0",children:[k&&n.jsxs("div",{className:"shrink-0 border-b border-border/70 bg-card/80 px-3 py-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(en,{ariaLabel:"copy filtered table",copied:X==="table",disabled:F.length===0,label:"copy all",onClick:()=>{re(mn(F),"table")}}),n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground",children:[n.jsx("span",{children:a}),n.jsxs("span",{className:"text-accent",children:[F.length," shown"]}),n.jsxs("span",{children:[te.total," buffered"]}),n.jsxs("span",{children:[te.agentActions," agent"]}),n.jsxs("span",{children:[te.errors," errors"]}),te.activeSpans>0&&n.jsxs("span",{className:"text-warning",children:[te.activeSpans," active"]}),S==="agent-actions"&&g!=="raw"&&D.hiddenDetailEvents>0&&n.jsxs("span",{children:[D.hiddenDetailEvents," detail hidden"]}),S==="agent-actions"&&D.collapsedEvents>0&&n.jsxs("span",{children:[D.collapsedEvents," collapsed"]})]})]}),n.jsxs("label",{className:"mt-2 flex min-w-0 items-center gap-2 rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 font-mono text-[13px] font-normal text-accent transition-colors focus-within:border-accent/40 focus-within:bg-muted/30",children:[n.jsx("span",{className:"shrink-0 text-success",children:"$"}),n.jsx("input",{value:I,onChange:l=>Oe(l.target.value),placeholder:"grep message, category, payload",className:"min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground"})]}),n.jsxs("details",{className:"mt-2 text-left",children:[n.jsx("summary",{className:"cursor-pointer font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground hover:text-foreground",children:"filters / controls"}),n.jsxs("div",{className:"mt-3 grid gap-3 border-t border-border/60 pt-3 md:grid-cols-[1fr_1fr_1fr_1fr_auto]",children:[n.jsxs(Ke,{label:"Scope",children:[n.jsx(ve,{active:S==="all",onClick:()=>$e("all"),children:"all"}),n.jsx(ve,{active:S==="agent-actions",onClick:()=>$e("agent-actions"),children:"agent actions"})]}),S==="agent-actions"?n.jsxs(Ke,{label:"Rows",children:[n.jsx(ve,{active:g==="actions",onClick:()=>ge("actions"),children:"actions"}),n.jsx(ve,{active:g==="details",onClick:()=>ge("details"),children:"details"}),n.jsx(ve,{active:g==="raw",onClick:()=>ge("raw"),children:"raw"})]}):n.jsx("div",{}),n.jsxs(Ke,{label:"Kind",children:[n.jsx(ve,{active:J==="all",onClick:()=>je("all"),children:"all"}),Kr.map(l=>n.jsx(ve,{active:J===l,onClick:()=>je(l),children:l},l))]}),n.jsxs(Ke,{label:"Level",children:[n.jsx(ve,{active:Z==="all",onClick:()=>ie("all"),children:"all"}),Ur.map(l=>n.jsx(ve,{active:Z===l,onClick:()=>ie(l),children:l},l))]}),n.jsx("div",{className:"flex flex-wrap items-end gap-2",children:n.jsxs("button",{type:"button",onClick:T,className:`rounded-md border px-2.5 py-1.5 font-mono text-[11px] font-normal uppercase tracking-[0.12em] transition-colors ${ee?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:["tail ",ee?"on":"off"]})})]})]})]}),n.jsx("div",{className:"max-h-[650px] overflow-auto lg:max-h-none lg:flex-1 lg:min-h-0",children:n.jsxs("div",{className:"min-w-[980px] font-mono text-[11px] font-normal",children:[n.jsxs("div",{className:`sticky top-0 z-10 grid min-h-8 ${jt} items-center border-b border-border/70 bg-card px-3 py-1.5 font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:[n.jsx("span",{className:"sticky left-0 bg-card pr-2",children:"Copy"}),n.jsx("span",{children:"Open"}),n.jsx(De,{column:"time",label:"Time",sort:w,onSort:$}),n.jsx(De,{column:"kind",label:"Kind",sort:w,onSort:$}),n.jsx(De,{column:"level",label:"Level",sort:w,onSort:$}),n.jsx(De,{column:"category",label:"Category",sort:w,onSort:$}),n.jsx(De,{column:"target",label:"Target",sort:w,onSort:$}),n.jsx(De,{column:"message",label:"Message",sort:w,onSort:$}),n.jsx(De,{column:"id",label:"Id",sort:w,onSort:$})]}),F.map(l=>{const x=nt(l),b=Te(l);return n.jsxs("div",{role:"button",tabIndex:0,onClick:()=>ne(l),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),ne(l))},className:`grid min-h-[34px] w-full ${jt} items-center border-b border-l-2 px-3 py-2 text-left transition-colors ${v&&Te(v)===b?"border-b-border/40 border-l-accent bg-accent/[0.08]":"border-b-border/40 border-l-transparent hover:bg-muted/30"}`,children:[n.jsx("button",{type:"button","aria-label":`copy row ${st(l.id)}`,onClick:y=>{y.stopPropagation(),re(ot(l).join(" "),`row:${b}`)},className:`sticky left-0 z-[1] justify-self-start rounded border border-border/70 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent ${v&&Te(v)===b?"bg-accent/[0.08]":"bg-background"}`,children:X===`row:${b}`?"copied":"copy"}),x?n.jsx("button",{type:"button","aria-label":`open ${He(l)}`,onClick:y=>{y.stopPropagation(),Ee(l)},className:"justify-self-start rounded border border-border/70 bg-muted/20 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent",children:"open"}):n.jsx("span",{className:"text-muted-foreground/45",children:"-"}),n.jsx("span",{className:"tabular-nums text-muted-foreground",children:ut(l)}),n.jsx("span",{className:"uppercase tracking-[0.13em] text-muted-foreground",children:l.kind}),n.jsx("span",{className:`uppercase tracking-[0.13em] ${lt(l)}`,children:xe(l)}),n.jsx("span",{className:"truncate uppercase tracking-[0.13em] text-muted-foreground",children:l.category??"-"}),n.jsx("span",{className:"truncate font-sans text-[12px] font-normal normal-case tracking-normal text-muted-foreground",children:He(l)}),n.jsx("span",{className:"truncate font-sans text-[13px] font-normal normal-case tracking-normal text-foreground",children:Ie(l)}),n.jsx("span",{className:"truncate text-muted-foreground",children:st(l.id)})]},b)}),F.length===0&&n.jsx("div",{className:"border-b border-border/40 px-3 py-5 font-sans text-[13px] text-muted-foreground",children:u})]})})]}),ae&&n.jsxs(n.Fragment,{children:[n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize payload inspector","aria-valuenow":Re,"aria-valuemin":Ze,"aria-valuemax":wt,title:"Drag to resize · Double-click to reset",onPointerDown:q,onDoubleClick:U,className:`group hidden shrink-0 cursor-col-resize items-stretch justify-center transition-colors lg:flex lg:w-[5px] ${B?"bg-accent/15":"hover:bg-accent/10"}`,children:n.jsx("div",{className:`w-px transition-colors ${B?"bg-accent/80":"bg-border group-hover:bg-accent/60"}`})}),n.jsx("aside",{ref:ce,style:ue,className:"flex w-full shrink-0 flex-col bg-background lg:w-[var(--inspector-width)]",children:n.jsx(Zr,{copied:v?X===`inspector:${Te(v)}`:!1,event:v,relatedEvents:j,onCopyRow:l=>{re(ot(l).join(" "),`inspector:${Te(l)}`)},onOpenTarget:Ee})})]})]})}function Zr({copied:e,event:t,relatedEvents:r,onCopyRow:s,onOpenTarget:a}){const i=t?nt(t):null;return n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border/70 bg-card/40 px-3 py-2.5 lg:px-4",children:[n.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.15em] text-foreground/80",children:"Payload inspector"}),t?n.jsxs("div",{className:"flex items-center gap-2",children:[i?n.jsx("button",{type:"button",onClick:()=>a(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:"open app"}):null,n.jsx("button",{type:"button",onClick:()=>s(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:e?"copied":"copy row"}),n.jsx("div",{className:`font-mono text-[11px] uppercase tracking-[0.12em] ${lt(t)}`,children:xe(t)})]}):null]}),n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3 lg:px-4 lg:py-4",children:t?n.jsxs("div",{className:"grid gap-3",children:[n.jsxs("div",{className:"overflow-hidden rounded-md border border-accent/25 bg-accent/[0.07]",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-accent/15 px-3 py-2",children:[n.jsx(tn,{event:t}),n.jsx("span",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:t.kind})]}),n.jsxs("div",{className:"px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.13em] text-accent",children:"selected event"}),n.jsx("div",{className:"mt-1 break-words text-[14px] font-normal leading-5 text-foreground",children:Ie(t)})]})]}),an(t).map(u=>n.jsx(rn,{section:u},u.title)),n.jsx(nn,{events:r,selectedId:t.id}),n.jsx(et,{label:"payload.data",value:t.data??{}}),t.kind==="metric"&&t.tags?n.jsx(et,{label:"metric.tags",value:t.tags}):null,t.kind==="span"&&t.error?n.jsx(et,{label:"span.error",value:t.error}):null]}):n.jsx("div",{className:"rounded-md border border-border/60 bg-muted/20 p-4 text-[13px] leading-6 text-muted-foreground",children:"No event selected."})})]})}function Ke({label:e,children:t}){return n.jsxs("div",{children:[n.jsx("div",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground",children:e}),n.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t})]})}function ve({active:e,onClick:t,children:r}){return n.jsx("button",{type:"button",onClick:t,className:`rounded-md border px-2 py-1 font-mono text-[11px] uppercase tracking-[0.1em] transition-colors ${e?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:r})}function De({column:e,label:t,sort:r,onSort:s}){const a=r.key===e,i=a?r.direction==="asc"?Ut:Ft:Wt,u=r.direction==="asc"?"ascending":"descending";return n.jsxs("button",{type:"button","aria-label":`Sort by ${t}${a?`, currently ${u}`:""}`,"aria-pressed":a,onClick:()=>s(e),className:`flex min-w-0 items-center gap-1.5 text-left uppercase tracking-[0.14em] transition ${a?"text-accent":"text-muted-foreground hover:text-foreground"}`,children:[n.jsx("span",{className:"min-w-0 truncate",children:t}),n.jsx(i,{size:10,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0"})]})}function en({ariaLabel:e,copied:t,disabled:r=!1,label:s,onClick:a}){return n.jsx("button",{type:"button","aria-label":e,disabled:r,onClick:a,className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent disabled:cursor-not-allowed disabled:opacity-40",children:t?"copied":s})}function tn({event:e}){const t=xe(e),r=Fe(e),s=r==="red"?"border-destructive/30 bg-destructive/10 text-destructive":r==="amber"?"border-warning/30 bg-warning/10 text-warning":r==="emerald"?"border-success/30 bg-success/10 text-success":"border-accent/30 bg-accent/10 text-accent";return n.jsx("span",{className:`rounded-full border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.11em] ${s}`,children:t})}function rn({section:e}){return n.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e.title}),n.jsx("div",{className:"divide-y divide-border/40",children:e.rows.map(t=>n.jsx(sn,{row:t},`${e.title}-${t.label}`))})]})}function nn({events:e,selectedId:t}){return e.length<=1?null:n.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 bg-muted/30 px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:"Trace lines"}),n.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.length})]}),n.jsx("div",{className:"divide-y divide-border/40",children:e.map(r=>{const s=Rt(Je(r));return n.jsxs("div",{className:`grid grid-cols-[74px_82px_minmax(0,1fr)] gap-2 px-3 py-1.5 ${r.id===t?"bg-accent/10":""}`,children:[n.jsx("span",{className:"font-mono text-[10px] tabular-nums text-muted-foreground",children:ut(r)}),n.jsx("span",{className:`font-mono text-[10px] uppercase tracking-[0.11em] ${lt(r)}`,children:xe(r)}),n.jsx("span",{className:"min-w-0 truncate text-[12px] text-foreground/80",children:s??Ie(r)})]},`${r.id}-${r.timestamp}`)})})]})}function sn({row:e}){return n.jsxs("div",{className:"grid grid-cols-[96px_minmax(0,1fr)] items-start gap-3 px-3 py-2",children:[n.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.label}),n.jsx("div",{className:`min-w-0 break-words text-[12px] leading-5 ${e.mono?"font-mono tabular-nums":"font-sans"} ${cn(e.tone)}`,children:e.value})]})}function et({label:e,value:t}){return n.jsxs("div",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[n.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e}),n.jsx("pre",{className:"max-h-[360px] overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[12px] font-light leading-5 text-foreground/80 lg:max-h-none lg:overflow-x-auto",children:JSON.stringify(t,null,2)})]})}function nt(e){return it(e)}function on(e){const t=V(e);return h(t,"workspaceId")??h(t,"targetWorkspaceId")}function He(e){const t=V(e),r=it(e);return h(t,"appName")??h(t,"appId")??r??h(t,"workspaceName")??h(t,"workspaceId")??h(t,"serviceId")??h(t,"target")??"-"}function an(e){const t=[{title:"Identity",rows:[{label:"id",value:e.id,mono:!0},{label:"kind",value:e.kind,tone:"cyan",mono:!0},{label:"category",value:e.category??"none",mono:!0}]},{title:"Signal",rows:[{label:ln(e),value:xe(e),tone:Fe(e),mono:!0},{label:"timestamp",value:tt(e.timestamp),mono:!0}]}];if(Me(e)){const r=V(e),s=Le(e),a=at(e);t.push({title:"Agent Action",rows:[{label:"source",value:h(r,"source")??"agent",mono:!0},{label:"status",value:h(r,"status")??xe(e),tone:Fe(e),mono:!0},{label:"action",value:h(r,"action")??Ie(e),mono:!0},{label:"target",value:He(e),mono:!0},{label:"workspace",value:h(r,"workspaceName")??h(r,"workspaceId")??"unknown",mono:!0},...s?[{label:"trace",value:s,mono:!0}]:[],...a?[{label:"parent",value:a,mono:!0}]:[]]});const i=fn(e),u=Cr(e);(i||u)&&t.push({title:"Request",rows:[...i?[{label:"prompt",value:i}]:[],...u?[{label:"lines",value:String(u.eventCount),mono:!0},{label:"duration",value:`${u.durationMs}ms`,mono:!0}]:[]]})}return e.kind==="log"&&t.push({title:"Log",rows:[{label:"message",value:e.message},{label:"level",value:e.level,tone:Fe(e),mono:!0}]}),e.kind==="metric"&&t.push({title:"Metric",rows:[{label:"name",value:e.name},{label:"type",value:e.metricType,tone:"emerald",mono:!0},{label:"value",value:un(e),tone:"emerald",mono:!0},{label:"unit",value:e.unit??"none",mono:!0}]}),e.kind==="span"&&t.push({title:"Trace",rows:[{label:"name",value:e.name},{label:"trace id",value:e.traceId,mono:!0},{label:"parent id",value:e.parentId??"none",mono:!0},{label:"status",value:e.status,tone:Fe(e),mono:!0},{label:"duration",value:e.durationMs===void 0?"active":`${e.durationMs}ms`,mono:!0},{label:"started",value:tt(e.startTime),mono:!0},{label:"ended",value:e.endTime===void 0?"pending":tt(e.endTime),mono:!0}]}),t}function Ie(e){if(e.kind==="log"){if(Me(e)){const t=V(e),r=Rt(Je(e));if(r){const u=h(t,"status");return u?`${r} ${u}`:r}const s=h(t,"action")??h(t,"commandId")??e.message,a=h(t,"status"),i=vt(s);return a?`${i} ${a}`:i}return e.message}return Me(e)?vt(e.name):e.name}function xe(e){return e.kind==="log"?Me(e)?h(V(e),"status")??e.level:e.level:e.kind==="metric"?e.metricType:e.status}function lt(e){const t=xe(e);return t==="error"||t==="failed"?"text-destructive":t==="warn"||t==="active"||t==="started"?"text-warning":e.kind==="metric"||t==="ok"||t==="completed"?"text-success":"text-accent"}function Fe(e){const t=xe(e);return t==="error"||t==="failed"?"red":t==="warn"||t==="active"||t==="started"?"amber":e.kind==="metric"||t==="ok"||t==="completed"?"emerald":"cyan"}function cn(e="neutral"){return e==="red"?"text-destructive":e==="amber"?"text-warning":e==="emerald"?"text-success":e==="cyan"?"text-accent":"text-foreground"}function ln(e){return e.kind==="log"?"level":e.kind==="metric"?"type":"status"}function un(e){return`${e.value}${e.unit?` ${e.unit}`:""}`}function tt(e){const t=new Date(e);return`${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}.${String(t.getMilliseconds()).padStart(3,"0")}`}function st(e){return e.length>10?e.slice(-10):e}function Te(e){return e.kind==="span"?`${e.kind}:${e.id}:${e.status}:${e.endTime??"active"}`:`${e.kind}:${e.id}:${e.timestamp}`}function ut(e){return new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ot(e){return[ut(e),e.kind,xe(e),e.category??"",He(e),Ie(e),e.id,JSON.stringify(e.data??{})].map(pn)}function dn(e,t){return[Ie(e),e.category??"",JSON.stringify(e.data??{}),...t.map(s=>`${Ie(s)} ${JSON.stringify(s.data??{})}`)].join(" ").toLowerCase()}function fn(e){const r=V(e).args,s=r&&typeof r=="object"&&!Array.isArray(r)?r.prompt:void 0;return typeof s!="string"||!s.trim()?null:s.replace(/\s+/g," ").trim().slice(0,360)}function mn(e){return[["time","kind","signal","category","target","message","id","payload"].join(" "),...e.map(t=>ot(t).join(" "))].join(`
|
|
47
47
|
`)}function pn(e){return e.replace(/\s+/g," ").trim()}function xn(e){return e==="time"?"desc":"asc"}function gn(e,t){const r=t.direction==="asc"?1:-1;return e.map((s,a)=>({event:s,index:a})).sort((s,a)=>{const i=hn(Nt(s.event,t.key),Nt(a.event,t.key));return i===0?s.index-a.index:i*r}).map(({event:s})=>s)}function Nt(e,t){switch(t){case"time":return e.timestamp;case"kind":return e.kind;case"level":return xe(e);case"category":return e.category??"";case"target":return He(e);case"message":return Ie(e);case"id":return st(e.id)}}function hn(e,t){return typeof e=="number"&&typeof t=="number"?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}async function bn(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}finally{document.body.removeChild(t)}}function yn(e,t,r){const s=new Set,a=[];for(const i of t)s.has(i.id)||(s.add(i.id),a.push(i));for(let i=e.length-1;i>=0;i--){const u=e[i];s.has(u.id)||(s.add(u.id),a.push(u))}return a.sort((i,u)=>u.timestamp-i.timestamp),a.slice(0,r)}function vn(e){return e==="red"?"text-destructive":e==="amber"?"text-warning":"text-success"}function wn(e){return e==="red"?"bg-destructive":e==="amber"?"bg-warning":"bg-success"}function Mt(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function kn(e,t){const r=e.toLowerCase();return r.includes("secret")||r.includes("token")||r.includes("password")||r.includes("apikey")||r.includes("api_key")||t[0]==="set_environment_variable"&&r==="value"}function We(e,t=[]){if(Array.isArray(e))return e.map(s=>We(s,t));if(!Mt(e))return e;const r={};for(const[s,a]of Object.entries(e))r[s]=kn(s,t)?"[redacted]":We(a,[...t,s]);return r}function jn(e){if(e)return e instanceof Error?{name:e.name,message:e.message}:Mt(e)?We(e):{message:String(e)}}function _n(e,t=Ue){const r=e.status??"started",s=r==="failed"?"error":"info";return t.logger[s]("hudson.agent.action",{category:"agent-action",data:{triggeredBy:"agent",source:e.source??"external",origin:e.origin,actor:e.actor,status:r,toolset:e.toolset,chatId:e.chatId,action:e.action,commandId:e.commandId,appId:e.appId,appName:e.appName,workspaceId:e.workspaceId,workspaceName:e.workspaceName,traceId:e.traceId,parentTraceId:e.parentTraceId,args:e.args?We(e.args,[e.action??""]):void 0,metadata:e.metadata?We(e.metadata):void 0,error:jn(e.error)}})}export{In as H,nr as T,Vr as a,Jt as b,cr as c,Xt as d,Ue as e,An as f,Rn as g,_n as l,Tn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-DlxlBfLC.js";const o=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],r=c("clock",o);export{r as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DlxlBfLC.js";const o=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],m=e("code-xml",o);export{m as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-sUomXsrf.js";import{RepoDiffPageScreen as p}from"./RepoDiffPageScreen-BRvaVYoC.js";import{ReposScreen as t}from"./ReposScreen-BBkJf8xT.js";import"./RepoDiffViewerLazy-C8UPk4oo.js";/* empty css */import"./EmptyState-CoL-QuUO.js";import"./ContextMenu-BlBQhpax.js";import"./api-BkjHJfgJ.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./keyboard-nav-BhZZ5HEq.js";/* empty css */import"./ui-LM8pS8qE.js";import"./selection-bridge-CJOTyYQs.js";import"./SlidePanel-FCqT1zO3.js";import"./cache-Dr0why2k.js";import"./Provider-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./refresh-cw-D8PFyhUa.js";import"./sliders-horizontal-B9Nj-Y4J.js";function ti({route:i,navigate:o}){return i.view==="repo-diff"?r.jsx(p,{path:i.path,layers:i.layers,files:i.files,sessionId:i.sessionId,agentId:i.agentId,include:i.include,navigate:o}):i.view==="repos"?r.jsx(t,{navigate:o,focusRoot:i.root??null}):null}export{ti as ReposContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as c}from"./index-sUomXsrf.js";import{b as os,c as F,s as as}from"./router-Dja9_ygK.js";import{t as B}from"./time-Dhsh_2EG.js";import{H as ns}from"./agent-identity-xQHedtLl.js";import{i as ls}from"./use-scout-dev-flags-BHvg3G2c.js";import{u as is,r as rs,a as E,b as cs,f as _,c as y,i as D,t as C,M as P,d as A,e as ds,g as ms,h as hs,s as U}from"./mesh-ops-Kn8pCtyJ.js";import{u as us}from"./use-mesh-ops-items-ByGZk8rU.js";/* empty css */import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";const ps=[{id:"family",label:"family"},{id:"host",label:"host"}],bs=[{key:"lastLook",label:"last-look divider"},{key:"routeStrip",label:"route strip"},{key:"compact",label:"compact rows"},{key:"relays",label:"relay sessions"},{key:"simulateHosts",label:"simulate hosts"}],$=[{nodeId:"sim:studio-tower",label:"studio-tower"},{nodeId:"sim:gpu-box",label:"gpu-box"},{nodeId:"sim:cloud-eu-1",label:"cloud-eu-1"}];function xs(t){let i=0;for(let u=0;u<t.length;u++)i=i*31+t.charCodeAt(u)|0;return Math.abs(i)%($.length+1)}function Ns(t,i,u){return i==="family"?_(t):i==="host"?t.hostLabel??"unattributed":A[C(t,u)]}function fs(t){const i=ns[t.trim().toLowerCase()];return i===void 0?"var(--dim)":`oklch(0.65 0.14 ${i})`}function vs({item:t,selected:i,fresh:u,showHost:f,onSelect:x}){const m=t.attention,b=t.kind==="session"&&t.session?.live===!0,n=m==="interrupt"?"blocked":t.kind==="session"?b?"working":"ended":t.state,p=m==="interrupt"?"danger":m==="badge"||t.state==="review"?"warning":b||t.state==="working"?"accent":"faint",H=m==="interrupt"?" dot--danger dot--pulse":m==="badge"?" dot--warning":b?" dot--working dot--pulse":"",k=m==="silent"&&!b;return e.jsxs("button",{type:"button",className:`mesh-ops-row${i?" mesh-ops-row--selected":""}`,"data-kind":t.kind,"data-fresh":u||void 0,onClick:x,children:[e.jsx("span",{className:`dot${H}`,"data-quiet":k||void 0,"data-hollow":k||void 0,"aria-hidden":!0}),e.jsxs("span",{className:"mesh-ops-row-main",children:[e.jsx("span",{className:"mesh-ops-row-title",children:t.title}),e.jsxs("span",{className:"mesh-ops-row-sub",children:[t.kind," · ",_(t)]})]}),e.jsxs("span",{className:"mesh-ops-row-owner",children:[t.session&&e.jsx("span",{className:"mesh-ops-row-harness",style:{background:fs(t.session.harness)},title:t.session.harness,"aria-hidden":!0}),t.ownerName&&e.jsxs("span",{children:["@",t.ownerName]})]}),e.jsx("span",{className:"mesh-ops-row-route",children:f?t.hostLabel??"—":""}),e.jsxs("span",{className:"mesh-ops-row-state",children:[e.jsx("span",{className:"mesh-ops-row-state-word","data-tone":p,children:m==="badge"&&t.state!=="review"?"flagged":n}),e.jsx("span",{className:"mesh-ops-row-age",children:B(y(t))})]})]})}function ks({hosts:t,newCounts:i,unattributedCount:u,activeHostId:f,unattributedActive:x,onSelect:m,onSelectUnattributed:b}){return e.jsxs("div",{className:"mesh-ops-hosts",role:"group","aria-label":"Hosts",children:[e.jsx("span",{className:"mesh-ops-groupby-label",children:"hosts"}),e.jsx("button",{type:"button",className:`mesh-ops-host${f===null&&!x?" mesh-ops-host--active":""}`,onClick:()=>m(null),title:"Show items across all hosts",children:"all"}),t.map(n=>{const p=i.get(n.nodeId)??0;return e.jsxs("button",{type:"button",className:`mesh-ops-host${f===n.nodeId?" mesh-ops-host--active":""}`,onClick:()=>m(f===n.nodeId?null:n.nodeId),title:n.hostName??n.label,children:[e.jsx("span",{className:`dot${p>0?" dot--warning":n.liveSessionCount>0?" dot--working":""}`,"data-quiet":p===0&&n.liveSessionCount===0?!0:void 0,"aria-hidden":!0}),e.jsx("span",{className:"mesh-ops-host-name",children:n.label}),p>0&&e.jsxs("span",{className:"mesh-ops-host-new",children:[p," new"]}),e.jsxs("span",{className:"mesh-ops-host-meta",children:[n.liveSessionCount>0?`${n.liveSessionCount} live · `:"",n.sessionCount]}),n.lastActivityAt!==null&&e.jsx("span",{className:"mesh-ops-host-age",children:B(n.lastActivityAt)})]},n.nodeId)}),u>0&&e.jsxs("button",{type:"button",className:`mesh-ops-host${x?" mesh-ops-host--active":""}`,onClick:b,title:"Items with no venue host",children:[e.jsx("span",{className:"mesh-ops-host-name",children:"unattributed"}),e.jsx("span",{className:"mesh-ops-host-meta",children:u})]})]})}function js({route:t,navigate:i}){const u=os(t),{loading:f,error:x}=us(u),{items:m,hosts:b,selectedItemId:n,groupBy:p,attnFilter:H,unattributedOnly:k,lab:l}=is(),[G]=c.useState(()=>ls()),[M]=c.useState(()=>rs()),[j,q]=c.useState(()=>Date.now()),[K,z]=c.useState({}),[S,T]=c.useState(null);c.useEffect(()=>{t.itemId&&t.itemId!==n?E(t.itemId):!t.itemId&&n!==null&&E(null)},[t.itemId]),c.useEffect(()=>{const s=window.setInterval(()=>q(Date.now()),3e4);return()=>window.clearInterval(s)},[]),c.useEffect(()=>()=>cs(),[]);const N=c.useMemo(()=>{const s=l.relays?m:m.filter(o=>o.kind!=="session"||o.session?.relay!==!0),d=l.simulateHosts?s.map(o=>{const a=xs(_(o));if(a===0)return o;const h=$[a-1];return{...o,hostNodeId:h.nodeId,hostLabel:h.label}}):s;return k?d.filter(o=>o.hostNodeId===null):d},[m,k,l.relays,l.simulateHosts]),V=l.simulateHosts?S:u,O=c.useMemo(()=>l.simulateHosts&&S?N.filter(s=>s.hostNodeId===S):N,[l.simulateHosts,S,N]),W=c.useMemo(()=>{if(!l.simulateHosts)return b;const s=$.map(d=>{const o=N.filter(a=>a.hostNodeId===d.nodeId);return{nodeId:d.nodeId,label:d.label,hostName:null,brokerUrl:null,tailnetName:null,lastSeenAt:null,registeredAt:null,sessionCount:o.filter(a=>a.kind==="session").length,liveSessionCount:o.filter(a=>a.kind==="session"&&a.session?.live).length,lastActivityAt:o.length>0?Math.max(...o.map(y)):null}});return[...b,...s]},[l.simulateHosts,b,N]),Y=c.useMemo(()=>N.filter(s=>s.hostNodeId===null).length,[N]),J=c.useMemo(()=>{const s=new Map;if(!l.lastLook)return s;for(const d of N)!D(d,M)||!d.hostNodeId||s.set(d.hostNodeId,(s.get(d.hostNodeId)??0)+1);return s},[N,l.lastLook,M]),Q=c.useMemo(()=>{const s={active:0,moving:0,done:0,archive:0};for(const d of O)s[C(d,j)]+=1;return s},[O,j]),v=H??"active",g=c.useMemo(()=>O.filter(s=>C(s,j)===v),[O,v,j]),X=c.useMemo(()=>new Set(g.map(s=>s.hostLabel).filter(Boolean)).size>1,[g]),w=c.useMemo(()=>l.lastLook?s=>D(s,M):()=>!1,[l.lastLook,M]),Z=c.useMemo(()=>{const s=new Map;for(const o of g){const a=Ns(o,p,j),h=s.get(a);h?h.push(o):s.set(a,[o])}return(p==="attention"?P.map(o=>A[o]).filter(o=>s.has(o)):[...s.entries()].sort((o,a)=>{const h=r=>r.some(w)?0:r.some(I=>C(I,j)==="moving")?1:2,L=h(o[1])-h(a[1]);return L!==0?L:Math.max(...a[1].map(y))-Math.max(...o[1].map(y))}).map(([o])=>o)).map(o=>({key:o,items:(s.get(o)??[]).sort((a,h)=>y(h)-y(a))}))},[g,p,w,j]),ss=s=>{E(s.id),i({...t,itemId:s.id})},R=s=>{if(l.simulateHosts){T(s);return}U(!1),i(s?as(t,s):F(t))},es=()=>{if(k){R(null);return}l.simulateHosts&&T(null),i(F(t)),U(!0)};return e.jsxs("div",{className:`mesh-ops-list${l.compact?" mesh-ops-list--compact":""}${l.lastLook?" mesh-ops-list--lastlook":""}`,children:[e.jsxs("div",{className:"mesh-ops-summary",children:[e.jsx("div",{className:"mesh-ops-tabs",role:"tablist","aria-label":"Triage tabs",children:P.map(s=>e.jsxs("button",{type:"button",role:"tab","aria-selected":v===s,className:`mesh-ops-tab${v===s?" mesh-ops-tab--active":""}`,onClick:()=>ds(v===s?null:s),children:[e.jsx("span",{className:`dot${s==="active"||s==="moving"?" dot--working":""}`,"data-quiet":s==="done"||s==="archive"?!0:void 0,"aria-hidden":!0}),A[s],e.jsx("span",{className:"mesh-ops-tab-count",children:Q[s]})]},s))}),e.jsx("span",{className:"mesh-ops-summary-spacer"}),e.jsxs("span",{className:"mesh-ops-groupby",role:"group","aria-label":"Group items by",children:[e.jsx("span",{className:"mesh-ops-groupby-label",children:"group"}),ps.map(s=>e.jsx("button",{type:"button",className:`mesh-ops-groupby-option${p===s.id?" mesh-ops-groupby-option--active":""}`,"aria-pressed":p===s.id,onClick:()=>ms(s.id),children:s.label},s.id))]})]}),e.jsx(ks,{hosts:W,newCounts:J,unattributedCount:Y,activeHostId:V,unattributedActive:k,onSelect:R,onSelectUnattributed:es}),x&&e.jsx("div",{className:"ctx-panel-empty","data-tone":"error",children:x}),!x&&f&&m.length===0&&e.jsx("div",{className:"ctx-panel-empty",children:"Loading mesh ops…"}),!x&&!f&&g.length===0&&e.jsxs("div",{className:"ctx-panel-empty",children:["Nothing in ",A[v],"."]}),Z.map(s=>{const d=v==="done"||v==="archive",o=d?s.items.filter(r=>r.kind!=="session"||r.session?.live===!0):[...s.items],a=d?s.items.filter(r=>r.kind==="session"&&r.session?.live!==!0):[],h=K[s.key]===!0;h&&o.push(...a);const L=l.lastLook?o.findIndex((r,I)=>!w(r)&&o.slice(0,I).some(ts=>w(ts))):-1;return e.jsxs("div",{className:"mesh-ops-group",children:[e.jsxs("div",{className:"mesh-ops-group-head",children:[e.jsx("span",{className:`dot${s.items.some(w)?" dot--warning":""}`,"data-quiet":!s.items.some(w)||void 0,"aria-hidden":!0}),e.jsx("span",{className:"label-sm mesh-ops-group-name",children:s.key}),e.jsx("span",{className:"mesh-ops-group-spacer"}),a.length>0&&e.jsx("button",{type:"button",className:"mesh-ops-group-more",onClick:()=>z(r=>({...r,[s.key]:!h})),children:h?`hide ${a.length} ended`:`+${a.length} ended`}),e.jsx("span",{className:"mesh-ops-group-count",children:s.items.length})]}),o.map((r,I)=>e.jsxs("div",{children:[I===L&&e.jsxs("div",{className:"mesh-ops-lastlook",role:"separator",children:[e.jsx("span",{className:"mesh-ops-lastlook-rule"}),e.jsx("span",{className:"mesh-ops-lastlook-label",children:"last look — above changed since you scanned"}),e.jsx("span",{className:"mesh-ops-lastlook-rule"})]}),e.jsx(vs,{item:r,selected:r.id===n,fresh:w(r),showHost:X,onSelect:()=>ss(r)})]},r.id))]},s.key)}),G&&e.jsxs("div",{className:"mesh-ops-lab",children:[e.jsx("span",{className:"label-xs",children:"lab"}),bs.map(s=>e.jsx("button",{type:"button",className:"mesh-ops-lab-toggle","data-on":l[s.key]||void 0,"aria-pressed":l[s.key],onClick:()=>hs(s.key),children:s.label},s.key))]})]})}function $s({route:t,navigate:i}){return t.view!=="mesh-ops"?null:e.jsx(js,{route:t,navigate:i})}export{$s as MeshOpsContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-sUomXsrf.js";import{SessionRefScreen as t}from"./SessionRefScreen-D7TfPYPN.js";import{SessionsScreen as m}from"./SessionsScreen-BlknOWAd.js";import{FlightObserveScreen as p}from"./FlightObserveScreen-C-9S0nA5.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./tail-events-CTipUIli.js";import"./BackToPicker-CkUmHuuo.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./ConversationScreen-Dz2d_Z_F.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./createLucideIcon-DlxlBfLC.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./keyboard-nav-BhZZ5HEq.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-0XjXwGqq.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./file-text-i3xTDUjJ.js";import"./ConversationComposer-BBNPa5S9.js";import"./Provider-tFc3jqZ4.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./openContent-C6XO6kr5.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./SessionObserve-Dlx5vDaV.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";/* empty css */import"./RawSessionsTable-BsGVgZB3.js";/* empty css */import"./DataTable-0DwuXyvW.js";/* empty css *//* empty css */function Ni({route:i,navigate:r}){return i.view!=="sessions"?null:i.flightId?o.jsx(p,{route:{...i,flightId:i.flightId},navigate:r}):i.sessionId?o.jsx(t,{sessionRef:i.sessionId,navigate:r}):o.jsx(m,{navigate:r})}export{Ni as SessionsContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./index-sUomXsrf.js";import{KnowledgeSearchScreen as o}from"./KnowledgeSearchScreen-DsdDz8wY.js";/* empty css */import"./api-h5zurxmi.js";import"./time-Dhsh_2EG.js";import"./Provider-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./sparkles-up7pVlX-.js";import"./clock-DviOalxA.js";function V({route:r,navigate:t}){return r.view!=="search"?null:i.jsx(o,{navigate:t,mode:r.mode,hitId:r.hitId,routeFilters:r.filters})}export{V as SearchContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-sUomXsrf.js";import{ActivityScreen as o}from"./ActivityScreen-DnqqRSlS.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./colors-BtO5_zlx.js";import"./Provider-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./openContent-C6XO6kr5.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./EmptyState-CoL-QuUO.js";/* empty css */function tt({route:t,navigate:i}){return t.view!=="activity"?null:r.jsx(o,{navigate:i})}export{tt as ActivityContent};
|