@openscout/scout 0.2.86 → 0.2.90
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 +10 -5
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/client/assets/ActivityScreen-BUeb4ERK.js +1 -0
- package/dist/client/assets/{AddProjectForm-BNRpRPod.js → AddProjectForm-DtTfn4Zk.js} +1 -1
- package/dist/client/assets/AgentAvatar-CneOa70z.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-CkZ7EjZh.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-0Y3kqMtv.js +1 -0
- package/dist/client/assets/{AgentDetailCard-FelCxQrT.js → AgentDetailCard-Dtc02KUO.js} +1 -1
- package/dist/client/assets/AgentFloorView-B5raPB_U.js +1 -0
- package/dist/client/assets/AgentInfoScreen-DFG4ElZD.js +1 -0
- package/dist/client/assets/{AgentLaneCard-CRDG74C1.js → AgentLaneCard-BRAkw8YJ.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CWFqUdch.js → AgentLaneChrome-T8QE5742.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-C8RYotnv.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-yTM4GQAJ.js → AgentLaneSummaryResize-FyYweLo_.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-DJeDRTAN.js → AgentLanesPreflight-Cil3dNwu.js} +1 -1
- package/dist/client/assets/AgentLanesView-DPfO8MOo.js +2 -0
- package/dist/client/assets/{AgentLiveActions-Bn3zeZBN.js → AgentLiveActions-DwScaVRF.js} +1 -1
- package/dist/client/assets/AgentSessions-DKoWA0Lm.js +6 -0
- package/dist/client/assets/AgentsConsole-DoBIWGoq.js +1 -0
- package/dist/client/assets/AgentsScreen-JuUiSuwY.js +1 -0
- package/dist/client/assets/AgentsSubnav-BV0WAgzf.js +1 -0
- package/dist/client/assets/{AtopView-DymBCiXv.js → AtopView-ycxMrRwp.js} +1 -1
- package/dist/client/assets/BackToPicker-D6WgIDb-.js +1 -0
- package/dist/client/assets/BriefingDetailScreen-Zw-taW1s.js +6 -0
- package/dist/client/assets/{BriefingsScreen-CLvSOJjy.js → BriefingsScreen-BerYOoWS.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-DFAH-NO6.js → BrokerMetadataPanel-Cu93j-Ga.js} +1 -1
- package/dist/client/assets/BrokerScreen-CeN90URH.js +5 -0
- package/dist/client/assets/ChatCollapsedStrip-DdKyMSEM.js +1 -0
- package/dist/client/assets/{CodeDiffPane-C9HT1dCT.js → CodeDiffPane-BjCOBLze.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-5Y3GvXkM.js → CodeProjectPicker-NSGdCaK0.js} +1 -1
- package/dist/client/assets/{CodeScreen-DpN9kQvm.js → CodeScreen-CA9Sq6Dx.js} +1 -1
- package/dist/client/assets/ContextMenu-DnFcmfMR.js +1 -0
- package/dist/client/assets/ConversationComposer-CjRXFkvY.js +1 -0
- package/dist/client/assets/ConversationFeedRows-CgRTIpAv.js +1 -0
- package/dist/client/assets/ConversationHeader-CRmdtuL7.js +1 -0
- package/dist/client/assets/ConversationPanels-DCkcLIHk.js +2 -0
- package/dist/client/assets/ConversationScreen-Br0QQ3xo.js +1 -0
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
- package/dist/client/assets/ConversationStatus-BJ1CMbAv.js +1 -0
- package/dist/client/assets/{DataTable-oJP339bX.js → DataTable-Dzqiaha4.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CH02HAVw.js → DispatchAftermath-B0WMg_z3.js} +1 -1
- package/dist/client/assets/DocumentFocusViewer-CZVVIAD5.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-84b9I3fy.js → EmbeddableSurfacesLab-C3a7hJWO.js} +1 -1
- package/dist/client/assets/{EmptyState-BnDda92b.js → EmptyState-CYNJZMrZ.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Dg7_88pv.js → FileViewerPane-Fwt8_KmD.js} +1 -1
- package/dist/client/assets/FleetSearch-Dsi_l2KW.js +1 -0
- package/dist/client/assets/FleetSearch-EXOe8ulE.css +1 -0
- package/dist/client/assets/FlightObserveScreen-g_tiGmvz.js +1 -0
- package/dist/client/assets/{FollowScreen-DcFBqr6l.js → FollowScreen-Bb_rcrzi.js} +1 -1
- package/dist/client/assets/{HarnessMark-DGZ6o6Ct.js → HarnessMark-DrE57dUq.js} +1 -1
- package/dist/client/assets/HarnessesScreen-CAsCJ_tG.js +1 -0
- package/dist/client/assets/{HerdrSession-DV2hD6Yh.js → HerdrSession-1eVu9Owj.js} +1 -1
- package/dist/client/assets/HomeHero-DEl-WBsT.css +1 -0
- package/dist/client/assets/HomeHero-W445QrG1.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DNQjeWZO.js → KnowledgeSearchInspector-CbPVg3fr.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-C1lN1xJk.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-197xYmRp.js → LaneToolHoverCard-BkBcDYm-.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-CzTd44rf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-C9cmqxnK.js → LaneTraceEventFocus-BmMmPTyJ.js} +1 -1
- package/dist/client/assets/{MeshCanvas-C3_2p9B6.js → MeshCanvas-DwkjsiJ5.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-ZTjYWXTZ.js → MeshCanvasMinimap-vmCpU1sD.js} +1 -1
- package/dist/client/assets/MeshScreen-CkMepUpT.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CBjHbAZw.js → MeshTopologyView-BD2xLE2C.js} +2 -2
- package/dist/client/assets/MessageComposerSuggestions-qbalTne_.js +1 -0
- package/dist/client/assets/MessagesScreen-C8UynyLC.js +1 -0
- package/dist/client/assets/{MissionContextRail-DXkrbcnZ.js → MissionContextRail-D5MEP2f4.js} +1 -1
- package/dist/client/assets/MissionControlView-K_I7eftL.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-CWKLdUKG.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-ByGrNAcs.js +1 -0
- package/dist/client/assets/MissionLogPane-ZwHJ137T.js +1 -0
- package/dist/client/assets/{NewAgentModal-C18Ajovd.js → NewAgentModal-Do9aVvan.js} +1 -1
- package/dist/client/assets/NewChatComposer-DKlNX1UA.js +19 -0
- package/dist/client/assets/{NewChatOrigin-DpHS2Wmt.js → NewChatOrigin-DXPvX-hh.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-Dghsq2on.js +2 -0
- package/dist/client/assets/ObserveTextFlow-DWNlmTVm.js +2 -0
- package/dist/client/assets/ObservedTopologyPanel-BlmGoxCE.js +2 -0
- package/dist/client/assets/OpenScoutAppShell-DDqQi-oe.js +87 -0
- package/dist/client/assets/OpsAgentsView-Bn_fGBdo.js +1 -0
- package/dist/client/assets/OpsScreen-DHnT-Q9R.js +1 -0
- package/dist/client/assets/OpsSubnav-CJRD7MjM.js +1 -0
- package/dist/client/assets/PlanView-B6gKo543.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-Be1VOkI4.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-IDEpKZvI.js → ProjectAgentProfileBar-C5QWwZCn.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-DC7Dd8VL.js +1 -0
- package/dist/client/assets/ProjectsInbox-DCLrDmj1.js +2 -0
- package/dist/client/assets/ProjectsRail-C4hiXYSb.js +1 -0
- package/dist/client/assets/ProjectsScreen-jruZRjgD.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DYmL2dCY.js +1 -0
- package/dist/client/assets/Provider-p-xuaAoE.js +1 -0
- package/dist/client/assets/RailRow-Cf9LOiEj.css +1 -0
- package/dist/client/assets/RailRow-bRkkXIpR.js +1 -0
- package/dist/client/assets/RawSessionsTable-B7WKmXrk.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-BzP3BQq9.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-C97Euf4s.js → RepoDiffEmbedScreen-xjzjcJ_c.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DUKLzkrW.js → RepoDiffPageScreen-DRzIY-dk.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-CNDp01KM.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-b6vjYxez.js +2 -0
- package/dist/client/assets/{ReposScreen-BR1LqTf1.js → ReposScreen-CpaLC_NU.js} +6 -6
- package/dist/client/assets/ScoutDeckSurface-DkpZ-0DH.js +1 -0
- package/dist/client/assets/{ScoutSurface-BMKW7hSu.js → ScoutSurface-BENBUt5-.js} +1 -1
- package/dist/client/assets/ScoutbotBroadcastChip-CGZyxS5H.js +2 -0
- package/dist/client/assets/{agent-autocomplete-C7xwIcwd.css → ScoutbotBroadcastChip-CxtYZWPZ.css} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-0O2iDRrF.js → ScoutbotFxLab-Bk2ZsfPp.js} +1 -1
- package/dist/client/assets/ScoutbotRealtimeVoiceCall-n63LdBZs.js +1 -0
- package/dist/client/assets/{SecondaryNav-cYTw2p39.js → SecondaryNav-B4IsujYh.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-mNjT0R6j.js → SessionEmbedScreen-CPfH-jqN.js} +1 -1
- package/dist/client/assets/{SessionObserve-zAlFbwFn.js → SessionObserve-B-SkP3tu.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BVawzqoE.js → SessionObserveEvidence-CF5jnH3-.js} +1 -1
- package/dist/client/assets/SessionRefScreen-C-4jjmVG.js +1 -0
- package/dist/client/assets/SessionsScreen-HAjFvmIq.js +1 -0
- package/dist/client/assets/SettingsDrawer-DATxwZrn.js +3 -0
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
- package/dist/client/assets/SettingsScreen-Bu53X7J_.js +1 -0
- package/dist/client/assets/{ShikiPane-DyEJdcvb.js → ShikiPane-DH8yYDks.js} +1 -1
- package/dist/client/assets/{SlidePanel-Dg8_styW.js → SlidePanel-RFXJpfUa.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-DMrSssNZ.js → SpriteAvatar-CEYdCzem.js} +1 -1
- package/dist/client/assets/{StatusPill-NFFnphtx.js → StatusPill-9uy70ttd.js} +1 -1
- package/dist/client/assets/{TailView-BfObcZu3.js → TailView-6bIrgdxN.js} +2 -2
- package/dist/client/assets/Terminal-BI6km7H4.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-D4JOWwtm.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-C7fGlzY8.js → TextDocumentSurface-BcP9vvji.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BSeKIjnX.js → TmuxPeek-IaWqCgyJ.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-BkIGTzgw.js → VoicePermissionsPanel-C80iZxgy.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Cwe-KWK4.js → WorkDetailScreen-CweZ6fEd.js} +3 -3
- package/dist/client/assets/WorkFilesViewer-Dy_-06iI.js +1 -0
- package/dist/client/assets/{activity-D4W2XZY2.js → activity-DS0u0Itf.js} +1 -1
- package/dist/client/assets/{addon-fit-Celjj2yn.js → addon-fit-CN888B3D.js} +1 -1
- package/dist/client/assets/{addon-webgl-Cu4tJ21-.js → addon-webgl-CoAnanQS.js} +1 -1
- package/dist/client/assets/{agent-essentials-CngjUhQj.js → agent-essentials-CuK4G_zS.js} +1 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
- package/dist/client/assets/{agent-lane-card-model-CSugZCdy.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-D5EIlX7_.js → agent-lane-detail-BNNm6FNu.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-C33Dwpn7.js} +1 -1
- package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-BDNktFBZ.css} +1 -1
- package/dist/client/assets/{agent-lanes-model-BKOs_32K.js → agent-lanes-model-VYQ5a68i.js} +2 -2
- package/dist/client/assets/{api-BHHEUSS3.js → api-BkjHJfgJ.js} +1 -1
- package/dist/client/assets/api-h5zurxmi.js +1 -0
- package/dist/client/assets/{arc.es-DNT50Y-_.js → arc.es-BET9ev6q.js} +1 -1
- package/dist/client/assets/arrow-down-DxxPnPwh.js +1 -0
- package/dist/client/assets/{arrow-left-i-h6JAgs.js → arrow-left-CXDkJuCg.js} +1 -1
- package/dist/client/assets/{arrow-up-right-RBC6k8nn.js → arrow-up-right-Bj8RjSqW.js} +1 -1
- package/dist/client/assets/{bot-r2IuAuJd.js → bot-BSGSicKC.js} +1 -1
- package/dist/client/assets/broker-display-pp33bLsu.js +2 -0
- package/dist/client/assets/{cache-BO2Bd_LV.js → cache-Dr0why2k.js} +1 -1
- package/dist/client/assets/{check-Bfs7hMb1.js → check-BfA0T8UD.js} +1 -1
- package/dist/client/assets/{chevron-down-Da5tV19_.js → chevron-down-BVg09D6U.js} +1 -1
- package/dist/client/assets/{chevron-right-BMqtBds_.js → chevron-right-CaEwYkxE.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-BUVYXXAp.js → chunk-HRAB3GC3-HhKwnZCi.js} +1 -1
- package/dist/client/assets/chunk-JTPDIGGW-DX2eTIQ_.js +46 -0
- package/dist/client/assets/chunk-T65CQEWV-D-bOfuCH.js +1 -0
- package/dist/client/assets/chunk-YOZR3KYS-oS9dlQCI.js +2 -0
- package/dist/client/assets/{clock-DaKLp6Xd.js → clock-C3TUL7D7.js} +1 -1
- package/dist/client/assets/{code-xml-ByQsfOI_.js → code-xml-Dbvjk9Kw.js} +1 -1
- package/dist/client/assets/collapsed-strip-Dz-of2SM.css +1 -0
- package/dist/client/assets/content-BQuEedeL.js +1 -0
- package/dist/client/assets/content-BUae-L_N.js +1 -0
- package/dist/client/assets/content-BfG98J1k.js +1 -0
- package/dist/client/assets/content-BkVTfkAC.js +1 -0
- package/dist/client/assets/content-BsNMos_d.js +1 -0
- package/dist/client/assets/content-C2TZOKSE.js +1 -0
- package/dist/client/assets/content-CCn98eSk.js +1 -0
- package/dist/client/assets/content-CJuH5cDP.js +1 -0
- package/dist/client/assets/content-CYnPp9yo.js +1 -0
- package/dist/client/assets/content-CcrUhm4P.js +1 -0
- package/dist/client/assets/content-CiOMtgQc.js +1 -0
- package/dist/client/assets/content-CxuVONeQ.js +1 -0
- package/dist/client/assets/content-Dmq9n1_L.js +1 -0
- package/dist/client/assets/content-DskHP2NI.js +1 -0
- package/dist/client/assets/content-DvvzL2HK.js +1 -0
- package/dist/client/assets/content-snCAUbwv.js +1 -0
- package/dist/client/assets/{conversation-icons-C4amK8Sa.js → conversation-icons-DmC_Ak3z.js} +1 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
- package/dist/client/assets/conversation-motion-features-DPiGTO21.js +1 -0
- package/dist/client/assets/{copy-De4s38o2.js → copy-C79v_7D-.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DLlxGjKt.js → createLucideIcon-DCq_3fQn.js} +1 -1
- package/dist/client/assets/ctx-panel-B4s49N9e.css +1 -0
- package/dist/client/assets/discover-IEnbrH8_.js +2 -0
- package/dist/client/assets/embed-entry-XUPb-AzL.js +2 -0
- package/dist/client/assets/{external-link-BGHC_naA.js → external-link-Dd8xaveL.js} +1 -1
- package/dist/client/assets/{eye-BeCSqJn1.js → eye-DkU59kfl.js} +1 -1
- package/dist/client/assets/{file-text-BVhkMWyC.js → file-text-BITQqGtF.js} +1 -1
- package/dist/client/assets/gestures-B5rLNRpi.js +1 -0
- package/dist/client/assets/home-moving-signal-Bs635mVw.js +1 -0
- package/dist/client/assets/home-moving-signal-CAa0V91u.css +1 -0
- package/dist/client/assets/home-now-card-VxlLjg1A.js +1 -0
- package/dist/client/assets/{home-now-card-nano-Djhy6ax0.js → home-now-card-nano-C06GMiwD.js} +1 -1
- package/dist/client/assets/hooks-BWiLxTw1.js +2 -0
- package/dist/client/assets/index-9as_JTUs.css +1 -0
- package/dist/client/assets/index-BTj2MguM.js +1 -0
- package/dist/client/assets/index-BZovGpDk.js +10 -0
- package/dist/client/assets/index-CvF09yvf.css +1 -0
- package/dist/client/assets/index-DiiEQwdc.js +1 -0
- package/dist/client/assets/index-vbaJ8sin.js +1 -0
- package/dist/client/assets/inspector-panel-C96HcyK5.js +2 -0
- package/dist/client/assets/{keyboard-nav-7iEtvu9P.js → keyboard-nav-CHo_xmjw.js} +1 -1
- package/dist/client/assets/{lane-observe-vfyACHi0.js → lane-observe-BA3g9aVd.js} +1 -1
- package/dist/client/assets/{lane-roster-store-pHT3TAVs.js → lane-roster-store-B6ybJlHJ.js} +1 -1
- package/dist/client/assets/left-Bk3XnxPD.css +1 -0
- package/dist/client/assets/left-BuJ0wJW1.js +2 -0
- package/dist/client/assets/left-C6Zj3cR4.js +1 -0
- package/dist/client/assets/left-CCoobxPS.css +1 -0
- package/dist/client/assets/left-COMAiMfB.js +2 -0
- package/dist/client/assets/left-Ce4WKYPK.js +1 -0
- package/dist/client/assets/left-DMJkmJOF.js +1 -0
- package/dist/client/assets/left-DrCbY6ja.js +1 -0
- package/dist/client/assets/left-agents-BuSyVNGE.js +1 -0
- package/dist/client/assets/left-default-DRHywOKX.js +1 -0
- package/dist/client/assets/left-l92tw5Kc.js +1 -0
- package/dist/client/assets/left-lanes-4-aUyyrV.js +1 -0
- package/dist/client/assets/left-mission-e849d_Td.js +1 -0
- package/dist/client/assets/left-plan-MchYwAB_.js +2 -0
- package/dist/client/assets/library-DygjpA6u.js +1 -0
- package/dist/client/assets/{loader-circle-DoT8gpw6.js → loader-circle-B-l2Wj3-.js} +1 -1
- package/dist/client/assets/{local-agents-BMadXuP1.js → local-agents-Wof5knTJ.js} +1 -1
- package/dist/client/assets/{mentions-Cd6XticV.js → mentions-BjXfeF7t.js} +1 -1
- package/dist/client/assets/{mesh-ops-C0zCLTR8.js → mesh-ops-C1gq8zKf.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Cpqil_2D.js → mesh-view-store-B56D3f77.js} +1 -1
- package/dist/client/assets/{message-circle-44KSmbvQ.js → message-circle-BwVx5X0q.js} +1 -1
- package/dist/client/assets/{message-markup-DAnnGpWr.js → message-markup-DlVX-iuc.js} +1 -1
- package/dist/client/assets/{message-square-DlY4EneU.js → message-square-BnkG6tae.js} +1 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
- package/dist/client/assets/{mission-control-store-DtjtRs9Z.js → mission-control-store-CMgIVjLJ.js} +1 -1
- package/dist/client/assets/model-Co0zkMIc.js +1 -0
- package/dist/client/assets/{observe-DL5_8-Zj.js → observe-DVHAcIrv.js} +1 -1
- package/dist/client/assets/{operator-attention-BqoWAlhp.js → operator-attention-BwSPeheT.js} +1 -1
- package/dist/client/assets/{page-status-CW8co39E.js → page-status-Bg2hd27j.js} +1 -1
- package/dist/client/assets/paperclip-DblaLD_N.js +1 -0
- package/dist/client/assets/plan-view-D56fneVF.css +1 -0
- package/dist/client/assets/{plus-64n9qucr.js → plus-BAI0t5g9.js} +1 -1
- package/dist/client/assets/profile-3Q4sUtvJ.js +1 -0
- package/dist/client/assets/projects-inbox-Da2hYEn6.js +1 -0
- package/dist/client/assets/{radio-BjpQTKT0.js → radio-BGtkyCG9.js} +1 -1
- package/dist/client/assets/{refresh-cw-IgN2fZLM.js → refresh-cw-DtF8xPqX.js} +1 -1
- package/dist/client/assets/resolve-panes-D4tlKNCT.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-B27lj3Ci.js +1 -0
- package/dist/client/assets/right-B8qg3JdB.js +1 -0
- package/dist/client/assets/{right-B96CBzrV.js → right-BU_W1kSH.js} +1 -1
- package/dist/client/assets/right-BlR7h0US.js +1 -0
- package/dist/client/assets/right-BwgwTGGd.js +1 -0
- package/dist/client/assets/right-ByptvkVX.js +1 -0
- package/dist/client/assets/right-CUP-NIDG.js +1 -0
- package/dist/client/assets/right-Ch_jrNe2.js +1 -0
- package/dist/client/assets/right-Dd2DscRz.js +1 -0
- package/dist/client/assets/right-DmVHd8Xj.js +1 -0
- package/dist/client/assets/{right-DqiVyo8v.js → right-c4PAdFYZ.js} +1 -1
- package/dist/client/assets/{rocket-DnmN_YOD.js → rocket-BWh18pt_.js} +1 -1
- package/dist/client/assets/router-63XV_E7f.js +1 -0
- package/dist/client/assets/{text-BR9Bap0E.js → runtime-picker-BXKJbLot.js} +1 -1
- package/dist/client/assets/runtime-picker-vhm0gtLs.css +1 -0
- package/dist/client/assets/{scope-views-Z8aoAmtU.js → scope-views-Dm2_-NPi.js} +1 -1
- package/dist/client/assets/scout-voice-D8Q5sZOL.js +1 -0
- package/dist/client/assets/{scoutbot-D4vuKzOL.js → scoutbot-BTIErYHo.js} +2 -2
- package/dist/client/assets/{scroll-text-DRidbcse.js → scroll-text-DZb3mmYo.js} +1 -1
- package/dist/client/assets/{search-BbgsEMXa.js → search-1QMVOxF3.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-c0cz3MkJ.js +1 -0
- package/dist/client/assets/{selection-bridge-CpzFGx3-.js → selection-bridge-O9C4kGfF.js} +1 -1
- package/dist/client/assets/{send-horizontal-BXo2uz3Z.js → send-horizontal-DbyEkGql.js} +1 -1
- package/dist/client/assets/{server-Dt3tpiBj.js → server-Bncn9S7r.js} +1 -1
- package/dist/client/assets/{session-catalog-CUQ8LUJY.js → session-catalog-DC6BlBBC.js} +1 -1
- package/dist/client/assets/{session-table-B4JOKevn.js → session-table-BUPq9Viy.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-7V8B3xsf.js → sliders-horizontal-CMe8Bay1.js} +1 -1
- package/dist/client/assets/{sparkles-ytTwpCbZ.js → sparkles-_7cTZsIH.js} +1 -1
- package/dist/client/assets/{sse-CSozY6mp.js → sse-Bb0EOcU9.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
- package/dist/client/assets/{tail-display-DcliDVkW.js → tail-display-BRcJltQa.js} +1 -1
- package/dist/client/assets/{tail-events-CrN-Rmxj.js → tail-events-C12pfUax.js} +1 -1
- package/dist/client/assets/{terminal-relay-pSm7_An6.js → terminal-relay-BgfVJXIL.js} +1 -1
- package/dist/client/assets/{terminal-sessions-D4dHTRkt.js → terminal-sessions-AmSgHklm.js} +1 -1
- package/dist/client/assets/{terminal-takeover-CtA3wcXh.js → terminal-takeover--05EYhJm.js} +1 -1
- package/dist/client/assets/{terminal-BiNIXhna.js → terminal-xGf_F3y7.js} +1 -1
- package/dist/client/assets/text-DsBWV_4k.js +1 -0
- package/dist/client/assets/{use-conversation-list-C0bEXFeH.js → use-conversation-list-DWX02INv.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CK4aw-3G.js → use-fleet-active-asks-Cnwa4hTK.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-QixBijmT.js → use-mesh-ops-items-BRFm37oY.js} +1 -1
- package/dist/client/assets/use-reduced-motion-C8cWvIZ3.js +1 -0
- package/dist/client/assets/use-scout-dev-flags-FkMreOOb.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-6N8b7qsU.js → useAgentHoverCard-DvPZSJK3.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +1 -0
- package/dist/client/assets/{usePierreRuntime-Bq6mXrgd.js → usePierreRuntime-C8WJ0X3F.js} +1 -1
- package/dist/client/assets/{wrench-CQvdf7KT.js → wrench-_tHBGTop.js} +1 -1
- package/dist/client/assets/{x-BJyPzFnn.js → x-CrGUKNRv.js} +1 -1
- package/dist/client/assets/{xterm-D6dE_wMr.js → xterm-Ks-VlLTq.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +38 -169
- package/dist/node/main.mjs +240 -272
- package/dist/pairing-runtime-controller.mjs +476 -394
- package/dist/runtime/base-daemon.mjs +121 -49
- package/dist/runtime/broker-daemon.mjs +60 -171
- package/dist/runtime/broker-process-manager.mjs +0 -6
- package/dist/runtime/mesh-discover.mjs +0 -6
- package/dist/scout-control-plane-web.mjs +477 -672
- package/dist/scout-web-server.mjs +477 -672
- package/package.json +7 -6
- package/dist/client/assets/ActivityScreen-C7AwUogt.js +0 -1
- package/dist/client/assets/AgentAvatar-B1xvQ7ej.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BoBQpyz5.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-rw3vh8Lm.js +0 -1
- package/dist/client/assets/AgentFloorView-Crdw8Uo5.js +0 -1
- package/dist/client/assets/AgentInfoScreen-Cge7HHbV.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-DCIIg3Zp.js +0 -4
- package/dist/client/assets/AgentLanesEmbedScreen-BJLwXSNp.js +0 -1
- package/dist/client/assets/AgentLanesView-CbY9qD0z.js +0 -2
- package/dist/client/assets/AgentSessions-czl5zT7A.js +0 -6
- package/dist/client/assets/AgentsConsole-CoT2crwq.js +0 -1
- package/dist/client/assets/AgentsScreen-BcPM-z1T.js +0 -1
- package/dist/client/assets/AgentsSubnav-3_vpn2bT.js +0 -1
- package/dist/client/assets/AstronautSuit-BADl7m8x.js +0 -1
- package/dist/client/assets/BackToPicker-CqYhOaLB.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-DDfZ8ci1.js +0 -1
- package/dist/client/assets/BrokerScreen-Bkvu92jk.js +0 -5
- package/dist/client/assets/Canvas-KyTsDJlB.js +0 -1
- package/dist/client/assets/ChatCollapsedStrip-Bjjqa30K.js +0 -1
- package/dist/client/assets/ConversationComposer-Ce7Byw48.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DygDfQn_.js +0 -1
- package/dist/client/assets/ConversationHeader-C3sg0ULI.js +0 -1
- package/dist/client/assets/ConversationPanels-Dg4Y2GgX.js +0 -6
- package/dist/client/assets/ConversationScreen-BP5tdz2k.css +0 -1
- package/dist/client/assets/ConversationScreen-CjWWmuuh.js +0 -1
- package/dist/client/assets/ConversationStatus-BhVIYQza.js +0 -1
- package/dist/client/assets/CrewWorkspaces-B6YIyw1z.css +0 -1
- package/dist/client/assets/CrewWorkspaces-CDU-wy1Y.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-DmtFisY9.js +0 -1
- package/dist/client/assets/FlightObserveScreen-DL3Xhl0h.js +0 -1
- package/dist/client/assets/HarnessesScreen-DTDL-XaA.js +0 -1
- package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
- package/dist/client/assets/HomeHero-CENwVZ45.js +0 -1
- package/dist/client/assets/HostAdvisorView-PgiZUkd_.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Bj80IgR0.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-BztwvOv9.js +0 -1
- package/dist/client/assets/MeshScreen-lJKaOyGB.js +0 -1
- package/dist/client/assets/MessagesScreen-D6MVLvdg.js +0 -1
- package/dist/client/assets/MissionControlView-BCH-Zsp4.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-DbAliOSF.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-Bx6Pg8_O.js +0 -1
- package/dist/client/assets/MissionLogPane-D06c29Y8.js +0 -1
- package/dist/client/assets/NewChatComposer-Bgqes0UQ.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-Cmhwai4X.js +0 -2
- package/dist/client/assets/ObserveTextFlow-C1f5oize.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-D85P6RAk.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-IDI4fuUE.js +0 -88
- package/dist/client/assets/OpsAgentsView-yt0JavoB.js +0 -1
- package/dist/client/assets/OpsScreen-C3yNQqJE.js +0 -1
- package/dist/client/assets/OpsSubnav-BijKI3yG.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-DnIeC16r.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-Bh_aISs-.js +0 -1
- package/dist/client/assets/ProjectsInbox-B8Srlklk.js +0 -2
- package/dist/client/assets/ProjectsRail-DqAbdvCf.js +0 -1
- package/dist/client/assets/ProjectsScreen-DKHQ2iEv.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-DpkjYLL2.js +0 -1
- package/dist/client/assets/Provider-Ve8yXaWR.js +0 -1
- package/dist/client/assets/RailRow-B0sRaJc6.css +0 -1
- package/dist/client/assets/RailRow-C4GNGR80.js +0 -1
- package/dist/client/assets/RawSessionsTable-Co3vzwsf.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-DMd1CBAf.js +0 -9
- package/dist/client/assets/RepoDiffViewer-CovKjSgb.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-zIiEmh-e.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-BGsVicc2.js +0 -1
- package/dist/client/assets/SessionRefScreen-BmKhf29o.js +0 -1
- package/dist/client/assets/SessionsScreen-CsSqjIY2.js +0 -1
- package/dist/client/assets/SettingsDrawer-Dsj-On_x.css +0 -1
- package/dist/client/assets/SettingsDrawer-DwYQTGi8.js +0 -3
- package/dist/client/assets/SettingsScreen-Btaku7YM.js +0 -1
- package/dist/client/assets/Terminal-Dr-M9U4u.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-BmyZkonh.js +0 -1
- package/dist/client/assets/TerminalRelay-lJ2KdMCW.js +0 -46
- package/dist/client/assets/WorkFilesViewer-BBtKRBPv.js +0 -1
- package/dist/client/assets/agent-autocomplete-Dv-_9dAw.js +0 -2
- package/dist/client/assets/agent-identity-DzHGhLdJ.js +0 -1
- package/dist/client/assets/agent-specialization-CNrsRbKA.js +0 -1
- package/dist/client/assets/api-DEHEgJ9m.js +0 -1
- package/dist/client/assets/archive-DH49QqFG.js +0 -1
- package/dist/client/assets/arrow-right-B0Yi01Zr.js +0 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
- package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
- package/dist/client/assets/compass-BepM5iWH.js +0 -1
- package/dist/client/assets/content-5hnDC9WE.js +0 -1
- package/dist/client/assets/content-BRFZ-a6m.js +0 -1
- package/dist/client/assets/content-BYykncDo.js +0 -1
- package/dist/client/assets/content-Be6yyWbJ.js +0 -1
- package/dist/client/assets/content-Bgl_X3ao.js +0 -1
- package/dist/client/assets/content-BopJW1Zx.js +0 -1
- package/dist/client/assets/content-Bv2sfg0w.js +0 -1
- package/dist/client/assets/content-CMBiIZTg.js +0 -1
- package/dist/client/assets/content-CPVqvf5o.js +0 -1
- package/dist/client/assets/content-CbwyFqdI.js +0 -1
- package/dist/client/assets/content-ClQjAWYi.js +0 -1
- package/dist/client/assets/content-Cv2tSAbv.js +0 -1
- package/dist/client/assets/content-DFFe3-Ot.js +0 -1
- package/dist/client/assets/content-DY5hwBmm.js +0 -1
- package/dist/client/assets/content-_IXoxGno.js +0 -1
- package/dist/client/assets/content-j_tewJdE.js +0 -1
- package/dist/client/assets/conversation-model-CigSPlKA.js +0 -1
- package/dist/client/assets/conversation-motion-features-_95aZx_1.js +0 -1
- package/dist/client/assets/cpu-Bc268H9Q.js +0 -1
- package/dist/client/assets/credentials-qwds23lv.js +0 -1
- package/dist/client/assets/ctx-panel-D_HJ3nhb.css +0 -1
- package/dist/client/assets/discover-DOlk1hG7.js +0 -2
- package/dist/client/assets/embed-entry-BqDJfa87.js +0 -2
- package/dist/client/assets/file-code-corner-CX53Cd9y.js +0 -1
- package/dist/client/assets/gauge-CPcEPmNt.js +0 -1
- package/dist/client/assets/gestures-BXIGYk_p.js +0 -1
- package/dist/client/assets/git-branch-q8Ayc8py.js +0 -1
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
- package/dist/client/assets/home-moving-signal-Dm2Z2x0p.js +0 -1
- package/dist/client/assets/home-now-card-xU5LGP7q.js +0 -1
- package/dist/client/assets/hooks-CdKx1CxP.js +0 -2
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
- package/dist/client/assets/index-Bli6bTLU.js +0 -10
- package/dist/client/assets/index-D7UEHxaY.js +0 -1
- package/dist/client/assets/index-DFdlQs_c.js +0 -1
- package/dist/client/assets/index-DhfOMK0D.js +0 -1
- package/dist/client/assets/index-DzlEgstl.css +0 -1
- package/dist/client/assets/index-wLwc74Pu.css +0 -1
- package/dist/client/assets/inspector-panel-B8pigRsg.js +0 -2
- package/dist/client/assets/layers-BiZA-Clc.js +0 -1
- package/dist/client/assets/layout-grid-DMpv9CZM.js +0 -1
- package/dist/client/assets/left-BayK4ocL.js +0 -1
- package/dist/client/assets/left-BhZhSrS2.js +0 -1
- package/dist/client/assets/left-BhgU6NOA.js +0 -1
- package/dist/client/assets/left-CY_FGnN7.js +0 -1
- package/dist/client/assets/left-Cq8mjamr.js +0 -1
- package/dist/client/assets/left-DH44V4I_.css +0 -1
- package/dist/client/assets/left-Dnqla0b5.js +0 -2
- package/dist/client/assets/left-Dy403II2.js +0 -2
- package/dist/client/assets/left-R2OOE7VG.css +0 -1
- package/dist/client/assets/left-advisor-oOAtJ9YE.js +0 -1
- package/dist/client/assets/left-agents-TIKe8vW8.js +0 -1
- package/dist/client/assets/left-default-owH0Lwxo.js +0 -1
- package/dist/client/assets/left-lanes-BE_co2lP.js +0 -1
- package/dist/client/assets/left-mission-C_nWUtfA.js +0 -1
- package/dist/client/assets/library-BSVrjn_m.js +0 -1
- package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
- package/dist/client/assets/persistent-state-DYjP8lqN.js +0 -1
- package/dist/client/assets/profile-BkmuseW7.js +0 -1
- package/dist/client/assets/projects-inbox-C0umZMSY.js +0 -1
- package/dist/client/assets/provider-CX9EWecp.js +0 -1
- package/dist/client/assets/proxy-C35W-YHZ.js +0 -1
- package/dist/client/assets/resolve-panes-CCqRkQdM.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-JkxY8qsV.js +0 -1
- package/dist/client/assets/right-B3PQUHd5.js +0 -1
- package/dist/client/assets/right-BPirlFC8.js +0 -1
- package/dist/client/assets/right-BUP2Ro_M.js +0 -1
- package/dist/client/assets/right-BVWYPIFX.js +0 -1
- package/dist/client/assets/right-BoAJxwA3.js +0 -1
- package/dist/client/assets/right-C2aOC2li.js +0 -1
- package/dist/client/assets/right-CtPJjgOV.js +0 -1
- package/dist/client/assets/right-SfSu0zHC.js +0 -1
- package/dist/client/assets/router-B0YclXYg.js +0 -1
- package/dist/client/assets/scout-voice-DvG_3stJ.js +0 -1
- package/dist/client/assets/scoutbot-markdown-BJJyaPu2.js +0 -6
- package/dist/client/assets/secondaryNavConfig-DyC_P9Wx.js +0 -1
- package/dist/client/assets/settings-BzWCF3NF.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +0 -1
- package/dist/client/assets/text-rLpBg4_z.css +0 -1
- package/dist/client/assets/use-reduced-motion-BLn59zLn.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-JKb1EhFh.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-D-hVKzM9.js +0 -1
- package/dist/client/assets/usePersistentState-DOEahRlt.js +0 -1
- package/dist/client/assets/zap-rw7uwZht.js +0 -1
- /package/dist/client/assets/{DocumentFocusViewer-BSC_JwVE.css → document-focus-viewer-BSC_JwVE.css} +0 -0
|
@@ -123,236 +123,28 @@ function ensureOpenScoutCleanSlateSync() {
|
|
|
123
123
|
var OPENSCOUT_RPC_CUTOVER_MARKER = "rpc-runtime-cutover-v1";
|
|
124
124
|
var init_support_paths = () => {};
|
|
125
125
|
|
|
126
|
-
// ../runtime/src/
|
|
127
|
-
import {
|
|
128
|
-
createHash,
|
|
129
|
-
createPrivateKey,
|
|
130
|
-
createPublicKey,
|
|
131
|
-
generateKeyPairSync,
|
|
132
|
-
randomBytes,
|
|
133
|
-
sign,
|
|
134
|
-
verify
|
|
135
|
-
} from "crypto";
|
|
126
|
+
// ../runtime/src/local-config.ts
|
|
136
127
|
import {
|
|
137
|
-
chmodSync,
|
|
138
128
|
existsSync as existsSync2,
|
|
139
129
|
mkdirSync as mkdirSync2,
|
|
140
130
|
readFileSync,
|
|
141
131
|
renameSync,
|
|
142
|
-
rmSync as rmSync2,
|
|
143
132
|
writeFileSync as writeFileSync2
|
|
144
133
|
} from "fs";
|
|
145
|
-
import { dirname, join as join2 } from "path";
|
|
146
|
-
function stripBonjourCollisionSuffix(value) {
|
|
147
|
-
if (!value || typeof value !== "string")
|
|
148
|
-
return "";
|
|
149
|
-
let trimmed = value.trim();
|
|
150
|
-
const isDotLocal = /\.local\.?$/i.test(trimmed);
|
|
151
|
-
if (isDotLocal) {
|
|
152
|
-
trimmed = trimmed.replace(/\.local\.?$/i, "");
|
|
153
|
-
}
|
|
154
|
-
const isHyphenLocalOpenscout = /-local-openscout$/i.test(trimmed);
|
|
155
|
-
const isHyphenLocal = !isHyphenLocalOpenscout && /-local$/i.test(trimmed);
|
|
156
|
-
if (isHyphenLocalOpenscout) {
|
|
157
|
-
trimmed = trimmed.replace(/-local-openscout$/i, "");
|
|
158
|
-
} else if (isHyphenLocal) {
|
|
159
|
-
trimmed = trimmed.replace(/-local$/i, "");
|
|
160
|
-
}
|
|
161
|
-
if (!isDotLocal && !isHyphenLocalOpenscout && !isHyphenLocal) {
|
|
162
|
-
return trimmed;
|
|
163
|
-
}
|
|
164
|
-
trimmed = trimmed.replace(/(?<=[a-zA-Z].*?)(?:-\d+)+$/, "");
|
|
165
|
-
if (isDotLocal)
|
|
166
|
-
return `${trimmed}.local`;
|
|
167
|
-
if (isHyphenLocalOpenscout)
|
|
168
|
-
return `${trimmed}-local-openscout`;
|
|
169
|
-
if (isHyphenLocal)
|
|
170
|
-
return `${trimmed}-local`;
|
|
171
|
-
return trimmed;
|
|
172
|
-
}
|
|
173
|
-
function nodeIdentityPath(supportDirectory) {
|
|
174
|
-
const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
|
|
175
|
-
return join2(dir, NODE_IDENTITY_FILE);
|
|
176
|
-
}
|
|
177
|
-
function loadOrCreateNodeIdentity(supportDirectory) {
|
|
178
|
-
const path = nodeIdentityPath(supportDirectory);
|
|
179
|
-
if (existsSync2(path)) {
|
|
180
|
-
return readAndValidateNodeIdentity(path);
|
|
181
|
-
}
|
|
182
|
-
return createNodeIdentity(supportDirectory);
|
|
183
|
-
}
|
|
184
|
-
function readStableNodeQualifier(supportDirectory) {
|
|
185
|
-
const path = nodeIdentityPath(supportDirectory);
|
|
186
|
-
const cached = stableNodeQualifierCache.get(path);
|
|
187
|
-
if (cached) {
|
|
188
|
-
return cached;
|
|
189
|
-
}
|
|
190
|
-
if (!existsSync2(path)) {
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path).nodeQualifier);
|
|
194
|
-
if (nodeQualifier) {
|
|
195
|
-
stableNodeQualifierCache.set(path, nodeQualifier);
|
|
196
|
-
}
|
|
197
|
-
return nodeQualifier || null;
|
|
198
|
-
}
|
|
199
|
-
function readAndValidateNodeIdentity(path) {
|
|
200
|
-
let parsed;
|
|
201
|
-
try {
|
|
202
|
-
parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
203
|
-
} catch {
|
|
204
|
-
throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
|
|
205
|
-
}
|
|
206
|
-
if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
|
|
207
|
-
throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
|
|
208
|
-
}
|
|
209
|
-
if (parsed.nodeQualifier !== undefined && normalizePersistedNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
|
|
210
|
-
throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
|
|
211
|
-
}
|
|
212
|
-
try {
|
|
213
|
-
const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
|
|
214
|
-
if (derived !== parsed.publicKey) {
|
|
215
|
-
throw new Error("mismatch");
|
|
216
|
-
}
|
|
217
|
-
} catch {
|
|
218
|
-
throw new Error(`Node identity at ${path} has mismatched or invalid keys; remove it to generate a fresh one.`);
|
|
219
|
-
}
|
|
220
|
-
return parsed;
|
|
221
|
-
}
|
|
222
|
-
function normalizePersistedNodeQualifier(value) {
|
|
223
|
-
return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
224
|
-
}
|
|
225
|
-
function normalizeNodeQualifier(value) {
|
|
226
|
-
return stripBonjourCollisionSuffix(normalizePersistedNodeQualifier(value));
|
|
227
|
-
}
|
|
228
|
-
function createNodeIdentity(supportDirectory) {
|
|
229
|
-
if (!supportDirectory) {
|
|
230
|
-
assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
|
|
231
|
-
}
|
|
232
|
-
const path = nodeIdentityPath(supportDirectory);
|
|
233
|
-
const { publicKey, privateKey } = generateKeyPairSync("ed25519");
|
|
234
|
-
const identity = {
|
|
235
|
-
version: 1,
|
|
236
|
-
publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
|
|
237
|
-
privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
|
|
238
|
-
createdAt: Date.now()
|
|
239
|
-
};
|
|
240
|
-
mkdirSync2(dirname(path), { recursive: true });
|
|
241
|
-
try {
|
|
242
|
-
writeFileSync2(path, `${JSON.stringify(identity, null, 2)}
|
|
243
|
-
`, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
244
|
-
} catch (error) {
|
|
245
|
-
if (error.code === "EEXIST") {
|
|
246
|
-
return readAndValidateNodeIdentity(path);
|
|
247
|
-
}
|
|
248
|
-
throw error;
|
|
249
|
-
}
|
|
250
|
-
try {
|
|
251
|
-
chmodSync(path, 384);
|
|
252
|
-
} catch {}
|
|
253
|
-
return identity;
|
|
254
|
-
}
|
|
255
|
-
function nodeKeyId(publicKeyBase64) {
|
|
256
|
-
return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
|
|
257
|
-
}
|
|
258
|
-
function nodeFingerprint(publicKeyBase64) {
|
|
259
|
-
const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
|
|
260
|
-
const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
|
|
261
|
-
return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
|
|
262
|
-
}
|
|
263
|
-
function signNodePayload(identity, payload) {
|
|
264
|
-
const key = importPrivateKey(identity.privateKey);
|
|
265
|
-
return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
|
|
266
|
-
}
|
|
267
|
-
function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
|
|
268
|
-
try {
|
|
269
|
-
const key = importPublicKey(publicKeyBase64);
|
|
270
|
-
return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
|
|
271
|
-
} catch {
|
|
272
|
-
return false;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
function canonicalJson(value) {
|
|
276
|
-
if (value === null || typeof value !== "object") {
|
|
277
|
-
return JSON.stringify(value);
|
|
278
|
-
}
|
|
279
|
-
if (Array.isArray(value)) {
|
|
280
|
-
return `[${value.map(canonicalJson).join(",")}]`;
|
|
281
|
-
}
|
|
282
|
-
const record = value;
|
|
283
|
-
const keys = Object.keys(record).sort();
|
|
284
|
-
return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key])}`).join(",")}}`;
|
|
285
|
-
}
|
|
286
|
-
function verifySignedNodeCard(card, now = Date.now()) {
|
|
287
|
-
if (nodeKeyId(card.publicKey) !== card.keyId) {
|
|
288
|
-
return false;
|
|
289
|
-
}
|
|
290
|
-
if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
|
|
291
|
-
return false;
|
|
292
|
-
}
|
|
293
|
-
if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
|
-
if (card.tls !== undefined) {
|
|
297
|
-
if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
const { signature, ...unsigned } = card;
|
|
302
|
-
return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
|
|
303
|
-
}
|
|
304
|
-
function base32Encode(input) {
|
|
305
|
-
let bits = 0;
|
|
306
|
-
let value = 0;
|
|
307
|
-
let output = "";
|
|
308
|
-
for (const byte of input) {
|
|
309
|
-
value = value << 8 | byte;
|
|
310
|
-
bits += 8;
|
|
311
|
-
while (bits >= 5) {
|
|
312
|
-
output += BASE32_ALPHABET[value >>> bits - 5 & 31];
|
|
313
|
-
bits -= 5;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
if (bits > 0) {
|
|
317
|
-
output += BASE32_ALPHABET[value << 5 - bits & 31];
|
|
318
|
-
}
|
|
319
|
-
return output;
|
|
320
|
-
}
|
|
321
|
-
function importPrivateKey(privateKeyBase64) {
|
|
322
|
-
return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
|
|
323
|
-
}
|
|
324
|
-
function importPublicKey(publicKeyBase64) {
|
|
325
|
-
return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
|
|
326
|
-
}
|
|
327
|
-
var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
|
|
328
|
-
var init_node_identity = __esm(() => {
|
|
329
|
-
init_support_paths();
|
|
330
|
-
NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
|
|
331
|
-
stableNodeQualifierCache = new Map;
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
// ../runtime/src/local-config.ts
|
|
335
|
-
import {
|
|
336
|
-
existsSync as existsSync3,
|
|
337
|
-
mkdirSync as mkdirSync3,
|
|
338
|
-
readFileSync as readFileSync2,
|
|
339
|
-
renameSync as renameSync2,
|
|
340
|
-
writeFileSync as writeFileSync3
|
|
341
|
-
} from "fs";
|
|
342
134
|
import { homedir as homedir2, hostname as osHostname } from "os";
|
|
343
|
-
import { dirname
|
|
135
|
+
import { dirname, join as join2 } from "path";
|
|
344
136
|
function localConfigHome() {
|
|
345
|
-
return process.env.OPENSCOUT_HOME ??
|
|
137
|
+
return process.env.OPENSCOUT_HOME ?? join2(homedir2(), ".openscout");
|
|
346
138
|
}
|
|
347
139
|
function localConfigPath() {
|
|
348
|
-
return
|
|
140
|
+
return join2(localConfigHome(), "config.json");
|
|
349
141
|
}
|
|
350
142
|
function loadLocalConfig() {
|
|
351
143
|
const configPath = localConfigPath();
|
|
352
|
-
if (!
|
|
144
|
+
if (!existsSync2(configPath))
|
|
353
145
|
return { version: LOCAL_CONFIG_VERSION };
|
|
354
146
|
try {
|
|
355
|
-
return validateLocalConfig(JSON.parse(
|
|
147
|
+
return validateLocalConfig(JSON.parse(readFileSync(configPath, "utf8")));
|
|
356
148
|
} catch {
|
|
357
149
|
return { version: LOCAL_CONFIG_VERSION };
|
|
358
150
|
}
|
|
@@ -436,7 +228,6 @@ function resolveHost() {
|
|
|
436
228
|
var LOCAL_CONFIG_VERSION = 1, DEFAULT_SCOUT_WEB_PORTAL_HOST = "scout.local", DEFAULT_SCOUT_WEB_DEV_HOST, OPENSCOUT_PORTS, DEFAULT_LOCAL_CONFIG;
|
|
437
229
|
var init_local_config = __esm(() => {
|
|
438
230
|
init_support_paths();
|
|
439
|
-
init_node_identity();
|
|
440
231
|
DEFAULT_SCOUT_WEB_DEV_HOST = `dev.${DEFAULT_SCOUT_WEB_PORTAL_HOST}`;
|
|
441
232
|
OPENSCOUT_PORTS = {
|
|
442
233
|
broker: 43110,
|
|
@@ -461,7 +252,7 @@ var init_local_config = __esm(() => {
|
|
|
461
252
|
});
|
|
462
253
|
|
|
463
254
|
// ../runtime/src/open-scout-network.ts
|
|
464
|
-
import { readFileSync as
|
|
255
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
465
256
|
function defaultOpenScoutNetworkSettings() {
|
|
466
257
|
return {
|
|
467
258
|
discoveryEnabled: false,
|
|
@@ -482,7 +273,7 @@ function normalizeOpenScoutNetworkSettings(input) {
|
|
|
482
273
|
}
|
|
483
274
|
function readOpenScoutNetworkSettingsSync() {
|
|
484
275
|
try {
|
|
485
|
-
const raw =
|
|
276
|
+
const raw = readFileSync2(resolveOpenScoutSupportPaths().settingsPath, "utf8");
|
|
486
277
|
const parsed = JSON.parse(raw);
|
|
487
278
|
const network = isRecord(parsed) && isRecord(parsed.network) ? parsed.network : {};
|
|
488
279
|
return normalizeOpenScoutNetworkSettings(isRecord(network.openScoutNetwork) ? network.openScoutNetwork : {});
|
|
@@ -525,7 +316,7 @@ var init_open_scout_network = __esm(() => {
|
|
|
525
316
|
// ../agent-sessions/src/codex-executable.ts
|
|
526
317
|
import { execFileSync } from "child_process";
|
|
527
318
|
import { accessSync, constants } from "fs";
|
|
528
|
-
import { delimiter, join as
|
|
319
|
+
import { delimiter, join as join3 } from "path";
|
|
529
320
|
function isExecutable(filePath) {
|
|
530
321
|
if (!filePath)
|
|
531
322
|
return false;
|
|
@@ -569,11 +360,11 @@ function codexAppBundleCandidates(env) {
|
|
|
569
360
|
const appNames = ["Codex.app", "ChatGPT.app"];
|
|
570
361
|
const candidates = appNames.flatMap((appName) => [
|
|
571
362
|
{
|
|
572
|
-
path:
|
|
363
|
+
path: join3("/Applications", appName, "Contents", "Resources", "codex"),
|
|
573
364
|
source: "codex_app_bundle"
|
|
574
365
|
},
|
|
575
366
|
{
|
|
576
|
-
path:
|
|
367
|
+
path: join3(env.HOME ?? "", "Applications", appName, "Contents", "Resources", "codex"),
|
|
577
368
|
source: "codex_app_bundle"
|
|
578
369
|
}
|
|
579
370
|
]);
|
|
@@ -581,7 +372,7 @@ function codexAppBundleCandidates(env) {
|
|
|
581
372
|
}
|
|
582
373
|
function pathCandidates(env) {
|
|
583
374
|
return (env.PATH ?? "").split(delimiter).filter(Boolean).map((directory) => ({
|
|
584
|
-
path:
|
|
375
|
+
path: join3(directory, "codex"),
|
|
585
376
|
source: "path"
|
|
586
377
|
}));
|
|
587
378
|
}
|
|
@@ -592,7 +383,7 @@ function commonCandidates(env) {
|
|
|
592
383
|
"/opt/homebrew/bin",
|
|
593
384
|
"/usr/local/bin"
|
|
594
385
|
].filter(Boolean).map((directory) => ({
|
|
595
|
-
path:
|
|
386
|
+
path: join3(directory, "codex"),
|
|
596
387
|
source: "common"
|
|
597
388
|
}));
|
|
598
389
|
}
|
|
@@ -876,10 +667,10 @@ var init_auth = __esm(() => {
|
|
|
876
667
|
|
|
877
668
|
// ../runtime/src/harness-catalog.ts
|
|
878
669
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
879
|
-
import { existsSync as
|
|
670
|
+
import { existsSync as existsSync4, statSync } from "fs";
|
|
880
671
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
881
672
|
import { homedir as homedir4 } from "os";
|
|
882
|
-
import { dirname as
|
|
673
|
+
import { dirname as dirname2, join as join4 } from "path";
|
|
883
674
|
function readinessFromAuthModel(harness) {
|
|
884
675
|
const model = harnessAuthModel(harness);
|
|
885
676
|
if (!model)
|
|
@@ -912,7 +703,7 @@ function expandHomePath(value) {
|
|
|
912
703
|
if (value === "~")
|
|
913
704
|
return home;
|
|
914
705
|
if (value.startsWith("~/"))
|
|
915
|
-
return
|
|
706
|
+
return join4(home, value.slice(2));
|
|
916
707
|
return value;
|
|
917
708
|
}
|
|
918
709
|
function defaultWhichBinary(binary, platform) {
|
|
@@ -946,7 +737,7 @@ function defaultRunCommand(command, platform) {
|
|
|
946
737
|
}
|
|
947
738
|
function defaultRequirementExists(requirement) {
|
|
948
739
|
const expanded = expandHomePath(requirement.path);
|
|
949
|
-
if (!
|
|
740
|
+
if (!existsSync4(expanded))
|
|
950
741
|
return false;
|
|
951
742
|
if (requirement.fileType === "any" || !requirement.fileType)
|
|
952
743
|
return true;
|
|
@@ -1175,7 +966,7 @@ async function readHarnessCatalogOverrides(overridePath = resolveOpenScoutSuppor
|
|
|
1175
966
|
}
|
|
1176
967
|
}
|
|
1177
968
|
async function writeHarnessCatalogOverrides(overrides, overridePath = resolveOpenScoutSupportPaths().harnessCatalogPath) {
|
|
1178
|
-
await mkdir(
|
|
969
|
+
await mkdir(dirname2(overridePath), { recursive: true });
|
|
1179
970
|
const payload = {
|
|
1180
971
|
version: HARNESS_CATALOG_VERSION,
|
|
1181
972
|
entries: overrides,
|
|
@@ -1185,7 +976,7 @@ async function writeHarnessCatalogOverrides(overrides, overridePath = resolveOpe
|
|
|
1185
976
|
`, "utf8");
|
|
1186
977
|
}
|
|
1187
978
|
async function ensureHarnessCatalogOverrideFile(overridePath = resolveOpenScoutSupportPaths().harnessCatalogPath) {
|
|
1188
|
-
if (
|
|
979
|
+
if (existsSync4(overridePath))
|
|
1189
980
|
return;
|
|
1190
981
|
await writeHarnessCatalogOverrides({}, overridePath);
|
|
1191
982
|
}
|
|
@@ -4940,7 +4731,7 @@ var init_model_window_registry = __esm(() => {
|
|
|
4940
4731
|
});
|
|
4941
4732
|
|
|
4942
4733
|
// ../agent-sessions/src/history.ts
|
|
4943
|
-
import { basename, dirname as
|
|
4734
|
+
import { basename, dirname as dirname3 } from "path";
|
|
4944
4735
|
function decodeClaudeProjectsSlug(name) {
|
|
4945
4736
|
if (!name || !name.startsWith("-")) {
|
|
4946
4737
|
return null;
|
|
@@ -4952,7 +4743,7 @@ function decodeClaudeProjectsSlug(name) {
|
|
|
4952
4743
|
return `/${tail.replace(/-/g, "/")}`;
|
|
4953
4744
|
}
|
|
4954
4745
|
function inferClaudeHistoryCwd(path2) {
|
|
4955
|
-
const parent = basename(
|
|
4746
|
+
const parent = basename(dirname3(path2));
|
|
4956
4747
|
return decodeClaudeProjectsSlug(parent);
|
|
4957
4748
|
}
|
|
4958
4749
|
function deriveHistoryName(path2) {
|
|
@@ -4960,7 +4751,7 @@ function deriveHistoryName(path2) {
|
|
|
4960
4751
|
if (claudeCwd) {
|
|
4961
4752
|
return basename(claudeCwd) || claudeCwd;
|
|
4962
4753
|
}
|
|
4963
|
-
const parent = basename(
|
|
4754
|
+
const parent = basename(dirname3(path2));
|
|
4964
4755
|
return parent || basename(path2) || "History Session";
|
|
4965
4756
|
}
|
|
4966
4757
|
function normalizeTimestamp(value) {
|
|
@@ -6862,9 +6653,9 @@ function createLiveNormalizerContext(sessionId) {
|
|
|
6862
6653
|
}
|
|
6863
6654
|
|
|
6864
6655
|
// ../agent-sessions/src/adapters/claude-code/team-topology.ts
|
|
6865
|
-
import { existsSync as
|
|
6656
|
+
import { existsSync as existsSync5, readdirSync, readFileSync as readFileSync4, statSync as statSync2 } from "fs";
|
|
6866
6657
|
import { homedir as homedir5 } from "os";
|
|
6867
|
-
import { basename as basename2, dirname as
|
|
6658
|
+
import { basename as basename2, dirname as dirname4, join as join5, relative } from "path";
|
|
6868
6659
|
function isObject(value) {
|
|
6869
6660
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6870
6661
|
}
|
|
@@ -6887,7 +6678,7 @@ function sourceRefId(kind, value) {
|
|
|
6887
6678
|
}
|
|
6888
6679
|
function readJsonObject(path2) {
|
|
6889
6680
|
try {
|
|
6890
|
-
const parsed = JSON.parse(
|
|
6681
|
+
const parsed = JSON.parse(readFileSync4(path2, "utf8"));
|
|
6891
6682
|
return isObject(parsed) ? parsed : null;
|
|
6892
6683
|
} catch {
|
|
6893
6684
|
return null;
|
|
@@ -6908,17 +6699,17 @@ function statIsFile(path2) {
|
|
|
6908
6699
|
}
|
|
6909
6700
|
}
|
|
6910
6701
|
function readTeamConfigs(homeDir) {
|
|
6911
|
-
const teamsRoot =
|
|
6912
|
-
if (!
|
|
6702
|
+
const teamsRoot = join5(homeDir, ".claude", "teams");
|
|
6703
|
+
if (!existsSync5(teamsRoot) || !statIsDirectory(teamsRoot)) {
|
|
6913
6704
|
return [];
|
|
6914
6705
|
}
|
|
6915
6706
|
const teams = [];
|
|
6916
6707
|
for (const entry of readdirSync(teamsRoot)) {
|
|
6917
|
-
const teamDir =
|
|
6708
|
+
const teamDir = join5(teamsRoot, entry);
|
|
6918
6709
|
if (!statIsDirectory(teamDir)) {
|
|
6919
6710
|
continue;
|
|
6920
6711
|
}
|
|
6921
|
-
const configPath =
|
|
6712
|
+
const configPath = join5(teamDir, "config.json");
|
|
6922
6713
|
const config = readJsonObject(configPath);
|
|
6923
6714
|
if (!config) {
|
|
6924
6715
|
continue;
|
|
@@ -7056,8 +6847,8 @@ function membersFromConfig(team, groupId, configRefId) {
|
|
|
7056
6847
|
return { agents, relationships, agentByExternal };
|
|
7057
6848
|
}
|
|
7058
6849
|
function readTaskFiles(tasksRoot, teamName) {
|
|
7059
|
-
const teamTasksRoot =
|
|
7060
|
-
if (!
|
|
6850
|
+
const teamTasksRoot = join5(tasksRoot, teamName);
|
|
6851
|
+
if (!existsSync5(teamTasksRoot) || !statIsDirectory(teamTasksRoot)) {
|
|
7061
6852
|
return [];
|
|
7062
6853
|
}
|
|
7063
6854
|
const result = [];
|
|
@@ -7067,7 +6858,7 @@ function readTaskFiles(tasksRoot, teamName) {
|
|
|
7067
6858
|
if (!current)
|
|
7068
6859
|
continue;
|
|
7069
6860
|
for (const entry of readdirSync(current)) {
|
|
7070
|
-
const path2 =
|
|
6861
|
+
const path2 = join5(current, entry);
|
|
7071
6862
|
if (statIsDirectory(path2)) {
|
|
7072
6863
|
stack.push(path2);
|
|
7073
6864
|
} else if (statIsFile(path2)) {
|
|
@@ -7098,14 +6889,14 @@ function firstMarkdownTitle(raw) {
|
|
|
7098
6889
|
function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
|
|
7099
6890
|
let raw;
|
|
7100
6891
|
try {
|
|
7101
|
-
raw =
|
|
6892
|
+
raw = readFileSync4(taskPath, "utf8");
|
|
7102
6893
|
} catch {
|
|
7103
6894
|
return null;
|
|
7104
6895
|
}
|
|
7105
|
-
const relativePath = relative(
|
|
6896
|
+
const relativePath = relative(join5(tasksRoot, teamName), taskPath);
|
|
7106
6897
|
const fallbackId = relativePath.replace(/\.[^.]+$/u, "");
|
|
7107
6898
|
const fallbackTitle = firstMarkdownTitle(raw) ?? basename2(fallbackId);
|
|
7108
|
-
const inferredState = inferTaskStateFromPath(
|
|
6899
|
+
const inferredState = inferTaskStateFromPath(dirname4(relativePath));
|
|
7109
6900
|
let parsed = null;
|
|
7110
6901
|
try {
|
|
7111
6902
|
const json = JSON.parse(raw);
|
|
@@ -7136,7 +6927,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
|
|
|
7136
6927
|
};
|
|
7137
6928
|
}
|
|
7138
6929
|
function tasksFromFiles(homeDir, teamName, agentByExternal) {
|
|
7139
|
-
const tasksRoot =
|
|
6930
|
+
const tasksRoot = join5(homeDir, ".claude", "tasks");
|
|
7140
6931
|
const taskFiles = readTaskFiles(tasksRoot, teamName);
|
|
7141
6932
|
const sourceRefs = [];
|
|
7142
6933
|
const parsedTasks = [];
|
|
@@ -8350,9 +8141,9 @@ function flushLine(line, onLine) {
|
|
|
8350
8141
|
}
|
|
8351
8142
|
|
|
8352
8143
|
// ../agent-sessions/src/adapters/claude-code/adapter.ts
|
|
8353
|
-
import { existsSync as
|
|
8144
|
+
import { existsSync as existsSync6, readdirSync as readdirSync2, statSync as statSync3 } from "fs";
|
|
8354
8145
|
import { homedir as homedir6 } from "os";
|
|
8355
|
-
import { delimiter as delimiter2, join as
|
|
8146
|
+
import { delimiter as delimiter2, join as join6 } from "path";
|
|
8356
8147
|
function asRecord2(value) {
|
|
8357
8148
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
8358
8149
|
}
|
|
@@ -8365,8 +8156,8 @@ function resolveClaudeResumeContext(config) {
|
|
|
8365
8156
|
if (!resumeId) {
|
|
8366
8157
|
return null;
|
|
8367
8158
|
}
|
|
8368
|
-
const projectsRoot =
|
|
8369
|
-
if (!
|
|
8159
|
+
const projectsRoot = join6(homedir6(), ".claude", "projects");
|
|
8160
|
+
if (!existsSync6(projectsRoot)) {
|
|
8370
8161
|
return null;
|
|
8371
8162
|
}
|
|
8372
8163
|
let projectSlugs;
|
|
@@ -8376,8 +8167,8 @@ function resolveClaudeResumeContext(config) {
|
|
|
8376
8167
|
return null;
|
|
8377
8168
|
}
|
|
8378
8169
|
for (const slug of projectSlugs) {
|
|
8379
|
-
const sessionPath =
|
|
8380
|
-
if (!
|
|
8170
|
+
const sessionPath = join6(projectsRoot, slug, `${resumeId}.jsonl`);
|
|
8171
|
+
if (!existsSync6(sessionPath)) {
|
|
8381
8172
|
continue;
|
|
8382
8173
|
}
|
|
8383
8174
|
const cwd = decodeClaudeProjectsSlug2(slug);
|
|
@@ -8417,7 +8208,7 @@ function resolveExecutableFromPath(command, env) {
|
|
|
8417
8208
|
for (const directory of pathValue.split(delimiter2)) {
|
|
8418
8209
|
if (!directory)
|
|
8419
8210
|
continue;
|
|
8420
|
-
const candidate =
|
|
8211
|
+
const candidate = join6(directory, command);
|
|
8421
8212
|
try {
|
|
8422
8213
|
if (statSync3(candidate).isFile()) {
|
|
8423
8214
|
return candidate;
|
|
@@ -8724,9 +8515,9 @@ var init_claude_code = __esm(() => {
|
|
|
8724
8515
|
});
|
|
8725
8516
|
|
|
8726
8517
|
// ../agent-sessions/src/codex-launch-config.ts
|
|
8727
|
-
import { accessSync as accessSync2, constants as constants2, existsSync as
|
|
8518
|
+
import { accessSync as accessSync2, constants as constants2, existsSync as existsSync7 } from "fs";
|
|
8728
8519
|
import { homedir as homedir7 } from "os";
|
|
8729
|
-
import { basename as basename3, delimiter as delimiter3, dirname as
|
|
8520
|
+
import { basename as basename3, delimiter as delimiter3, dirname as dirname5, join as join7, resolve } from "path";
|
|
8730
8521
|
import { fileURLToPath } from "url";
|
|
8731
8522
|
function isExecutable2(filePath) {
|
|
8732
8523
|
if (!filePath) {
|
|
@@ -8747,7 +8538,7 @@ function ancestorChain(start) {
|
|
|
8747
8538
|
let current = resolve(start);
|
|
8748
8539
|
while (true) {
|
|
8749
8540
|
chain.push(current);
|
|
8750
|
-
const parent =
|
|
8541
|
+
const parent = dirname5(current);
|
|
8751
8542
|
if (parent === current) {
|
|
8752
8543
|
return chain;
|
|
8753
8544
|
}
|
|
@@ -8757,14 +8548,14 @@ function ancestorChain(start) {
|
|
|
8757
8548
|
function resolveExecutableFromSearchPath(names, env) {
|
|
8758
8549
|
const pathEntries = (env.PATH ?? "").split(delimiter3).filter(Boolean);
|
|
8759
8550
|
const commonDirectories = [
|
|
8760
|
-
|
|
8761
|
-
|
|
8551
|
+
join7(homedir7(), ".local", "bin"),
|
|
8552
|
+
join7(homedir7(), ".bun", "bin"),
|
|
8762
8553
|
"/opt/homebrew/bin",
|
|
8763
8554
|
"/usr/local/bin"
|
|
8764
8555
|
];
|
|
8765
8556
|
for (const directory of [...pathEntries, ...commonDirectories]) {
|
|
8766
8557
|
for (const name of names) {
|
|
8767
|
-
const candidate =
|
|
8558
|
+
const candidate = join7(directory, name);
|
|
8768
8559
|
if (isExecutable2(candidate)) {
|
|
8769
8560
|
return candidate;
|
|
8770
8561
|
}
|
|
@@ -8803,12 +8594,12 @@ function resolveScoutExecutable(env) {
|
|
|
8803
8594
|
return resolveExecutableFromSearchPath(["scout"], env);
|
|
8804
8595
|
}
|
|
8805
8596
|
function resolveRepoScoutScript(currentDirectory) {
|
|
8806
|
-
const moduleDirectory =
|
|
8597
|
+
const moduleDirectory = dirname5(fileURLToPath(import.meta.url));
|
|
8807
8598
|
const starts = uniquePaths([currentDirectory, moduleDirectory]);
|
|
8808
8599
|
for (const start of starts) {
|
|
8809
8600
|
for (const candidate of ancestorChain(start)) {
|
|
8810
|
-
const scriptPath =
|
|
8811
|
-
if (
|
|
8601
|
+
const scriptPath = join7(candidate, "apps", "desktop", "bin", "scout.ts");
|
|
8602
|
+
if (existsSync7(scriptPath)) {
|
|
8812
8603
|
return scriptPath;
|
|
8813
8604
|
}
|
|
8814
8605
|
}
|
|
@@ -8898,7 +8689,7 @@ var init_secret_redaction = __esm(() => {
|
|
|
8898
8689
|
// ../agent-sessions/src/local/transports/codex-app-server.ts
|
|
8899
8690
|
import { spawn } from "child_process";
|
|
8900
8691
|
import { appendFile, mkdir as mkdir2, readFile as readFile2, rm, stat, writeFile as writeFile2 } from "fs/promises";
|
|
8901
|
-
import { join as
|
|
8692
|
+
import { join as join8 } from "path";
|
|
8902
8693
|
function codexAppServerExitMessage(input) {
|
|
8903
8694
|
if (input.exitKind === "proactive_shutdown") {
|
|
8904
8695
|
return `Codex app-server session for ${input.agentName} was stopped by OpenScout` + (input.reason ? `: ${input.reason}` : "") + ".";
|
|
@@ -9213,7 +9004,7 @@ function parseCodexMaybeJson(value) {
|
|
|
9213
9004
|
}
|
|
9214
9005
|
}
|
|
9215
9006
|
async function readCodexSessionCatalog(runtimeDirectory) {
|
|
9216
|
-
const raw = await readOptionalFile(
|
|
9007
|
+
const raw = await readOptionalFile(join8(runtimeDirectory, SESSION_CATALOG_FILENAME));
|
|
9217
9008
|
if (!raw) {
|
|
9218
9009
|
return { activeSessionId: null, sessions: [] };
|
|
9219
9010
|
}
|
|
@@ -9228,7 +9019,7 @@ async function readCodexSessionCatalog(runtimeDirectory) {
|
|
|
9228
9019
|
}
|
|
9229
9020
|
async function writeCodexSessionCatalog(runtimeDirectory, catalog) {
|
|
9230
9021
|
await mkdir2(runtimeDirectory, { recursive: true });
|
|
9231
|
-
await writeFile2(
|
|
9022
|
+
await writeFile2(join8(runtimeDirectory, SESSION_CATALOG_FILENAME), JSON.stringify(catalog, null, 2) + `
|
|
9232
9023
|
`);
|
|
9233
9024
|
}
|
|
9234
9025
|
async function recordCodexSessionCatalog(runtimeDirectory, threadId, input) {
|
|
@@ -9297,10 +9088,10 @@ class CodexAppServerTransport {
|
|
|
9297
9088
|
errorListeners = new Set;
|
|
9298
9089
|
constructor(options) {
|
|
9299
9090
|
this.options = options;
|
|
9300
|
-
this.threadIdPath =
|
|
9301
|
-
this.statePath =
|
|
9302
|
-
this.stdoutLogPath =
|
|
9303
|
-
this.stderrLogPath =
|
|
9091
|
+
this.threadIdPath = join8(options.runtimeDirectory, "codex-thread-id.txt");
|
|
9092
|
+
this.statePath = join8(options.runtimeDirectory, "state.json");
|
|
9093
|
+
this.stdoutLogPath = join8(options.logsDirectory, "stdout.log");
|
|
9094
|
+
this.stderrLogPath = join8(options.logsDirectory, "stderr.log");
|
|
9304
9095
|
this.lastConfigSignature = this.configSignature(options);
|
|
9305
9096
|
}
|
|
9306
9097
|
get currentThreadId() {
|
|
@@ -9457,7 +9248,7 @@ class CodexAppServerTransport {
|
|
|
9457
9248
|
async startSession() {
|
|
9458
9249
|
await mkdir2(this.options.runtimeDirectory, { recursive: true });
|
|
9459
9250
|
await mkdir2(this.options.logsDirectory, { recursive: true });
|
|
9460
|
-
await writeFile2(
|
|
9251
|
+
await writeFile2(join8(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
|
|
9461
9252
|
this.proactiveShutdown = null;
|
|
9462
9253
|
try {
|
|
9463
9254
|
await assertCodexWorkingDirectory(this.options.cwd, this.options.agentName);
|
|
@@ -10202,9 +9993,9 @@ async function shutdownCodexAppServerLocalAgent(options, shutdownOptions = {}) {
|
|
|
10202
9993
|
const session = codexAppServerClients.get(key);
|
|
10203
9994
|
if (!session) {
|
|
10204
9995
|
if (shutdownOptions.resetThread) {
|
|
10205
|
-
const threadId = await readOptionalFile(
|
|
9996
|
+
const threadId = await readOptionalFile(join8(options.runtimeDirectory, "codex-thread-id.txt"));
|
|
10206
9997
|
await closeCodexSessionCatalog(options.runtimeDirectory, threadId);
|
|
10207
|
-
await rm(
|
|
9998
|
+
await rm(join8(options.runtimeDirectory, "codex-thread-id.txt"), { force: true });
|
|
10208
9999
|
}
|
|
10209
10000
|
return;
|
|
10210
10001
|
}
|
|
@@ -11079,9 +10870,9 @@ var init_normalizer3 = __esm(() => {
|
|
|
11079
10870
|
});
|
|
11080
10871
|
|
|
11081
10872
|
// ../agent-sessions/src/adapters/codex/topology.ts
|
|
11082
|
-
import { existsSync as
|
|
10873
|
+
import { existsSync as existsSync8, readdirSync as readdirSync3, readFileSync as readFileSync5, statSync as statSync4 } from "fs";
|
|
11083
10874
|
import { homedir as homedir8 } from "os";
|
|
11084
|
-
import { basename as basename4, join as
|
|
10875
|
+
import { basename as basename4, join as join9 } from "path";
|
|
11085
10876
|
function isObject2(value) {
|
|
11086
10877
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
11087
10878
|
}
|
|
@@ -11198,7 +10989,7 @@ function parseTomlKeyValues(raw) {
|
|
|
11198
10989
|
}
|
|
11199
10990
|
function readTomlKeyValues(path2) {
|
|
11200
10991
|
try {
|
|
11201
|
-
return parseTomlKeyValues(
|
|
10992
|
+
return parseTomlKeyValues(readFileSync5(path2, "utf8"));
|
|
11202
10993
|
} catch {
|
|
11203
10994
|
return null;
|
|
11204
10995
|
}
|
|
@@ -11212,8 +11003,8 @@ function firstString2(record2, keys) {
|
|
|
11212
11003
|
return;
|
|
11213
11004
|
}
|
|
11214
11005
|
function readAgentDefinitions(root, scope) {
|
|
11215
|
-
const agentsDir =
|
|
11216
|
-
if (!
|
|
11006
|
+
const agentsDir = join9(root, ".codex", "agents");
|
|
11007
|
+
if (!existsSync8(agentsDir) || !statIsDirectory2(agentsDir)) {
|
|
11217
11008
|
return { agents: [], sourceRefs: [] };
|
|
11218
11009
|
}
|
|
11219
11010
|
const agents = [];
|
|
@@ -11221,7 +11012,7 @@ function readAgentDefinitions(root, scope) {
|
|
|
11221
11012
|
for (const entry of readdirSync3(agentsDir).sort()) {
|
|
11222
11013
|
if (!entry.endsWith(".toml"))
|
|
11223
11014
|
continue;
|
|
11224
|
-
const path2 =
|
|
11015
|
+
const path2 = join9(agentsDir, entry);
|
|
11225
11016
|
if (!statIsFile2(path2))
|
|
11226
11017
|
continue;
|
|
11227
11018
|
const parsed = readTomlKeyValues(path2);
|
|
@@ -11260,8 +11051,8 @@ function readAgentDefinitions(root, scope) {
|
|
|
11260
11051
|
function readProjectAgentsConfig(cwd) {
|
|
11261
11052
|
if (!cwd)
|
|
11262
11053
|
return {};
|
|
11263
|
-
const configPath =
|
|
11264
|
-
if (!
|
|
11054
|
+
const configPath = join9(cwd, ".codex", "config.toml");
|
|
11055
|
+
if (!existsSync8(configPath) || !statIsFile2(configPath)) {
|
|
11265
11056
|
return {};
|
|
11266
11057
|
}
|
|
11267
11058
|
const parsed = readTomlKeyValues(configPath);
|
|
@@ -11524,7 +11315,7 @@ var init_topology = () => {};
|
|
|
11524
11315
|
|
|
11525
11316
|
// ../agent-sessions/src/adapters/codex/adapter.ts
|
|
11526
11317
|
import { homedir as homedir9 } from "os";
|
|
11527
|
-
import { join as
|
|
11318
|
+
import { join as join10 } from "path";
|
|
11528
11319
|
function errorMessage2(error) {
|
|
11529
11320
|
if (error instanceof Error) {
|
|
11530
11321
|
return error.message;
|
|
@@ -11551,7 +11342,7 @@ var init_adapter2 = __esm(() => {
|
|
|
11551
11342
|
sequence = 0;
|
|
11552
11343
|
constructor(config) {
|
|
11553
11344
|
super(config);
|
|
11554
|
-
const runtimeRoot =
|
|
11345
|
+
const runtimeRoot = join10(homedir9(), ".scout/pairing", "codex", this.session.id);
|
|
11555
11346
|
this.observedTopology = new CodexObservedTopologyTracker({
|
|
11556
11347
|
cwd: config.cwd ?? process.cwd(),
|
|
11557
11348
|
homeDir: config.env?.HOME,
|
|
@@ -11563,8 +11354,8 @@ var init_adapter2 = __esm(() => {
|
|
|
11563
11354
|
model: this.session.model,
|
|
11564
11355
|
providerMeta: {
|
|
11565
11356
|
...this.session.providerMeta ?? {},
|
|
11566
|
-
stdoutLogFile:
|
|
11567
|
-
stderrLogFile:
|
|
11357
|
+
stdoutLogFile: join10(runtimeRoot, "logs/stdout.log"),
|
|
11358
|
+
stderrLogFile: join10(runtimeRoot, "logs/stderr.log")
|
|
11568
11359
|
}
|
|
11569
11360
|
});
|
|
11570
11361
|
}
|
|
@@ -11623,7 +11414,7 @@ var init_adapter2 = __esm(() => {
|
|
|
11623
11414
|
this.setStatus("closed");
|
|
11624
11415
|
}
|
|
11625
11416
|
get codexOptions() {
|
|
11626
|
-
const runtimeRoot =
|
|
11417
|
+
const runtimeRoot = join10(homedir9(), ".scout/pairing", "codex", this.session.id);
|
|
11627
11418
|
const configuredThreadId = this.config.options?.["threadId"];
|
|
11628
11419
|
const requireExistingThread = this.config.options?.["requireExistingThread"];
|
|
11629
11420
|
const rawLaunchArgs = this.config.options?.["launchArgs"];
|
|
@@ -11635,8 +11426,8 @@ var init_adapter2 = __esm(() => {
|
|
|
11635
11426
|
sessionId: this.session.id,
|
|
11636
11427
|
cwd: this.config.cwd ?? process.cwd(),
|
|
11637
11428
|
systemPrompt: this.systemPrompt,
|
|
11638
|
-
runtimeDirectory:
|
|
11639
|
-
logsDirectory:
|
|
11429
|
+
runtimeDirectory: join10(runtimeRoot, "runtime"),
|
|
11430
|
+
logsDirectory: join10(runtimeRoot, "logs"),
|
|
11640
11431
|
env: this.config.env,
|
|
11641
11432
|
launchArgs,
|
|
11642
11433
|
threadId: typeof configuredThreadId === "string" && configuredThreadId.trim().length > 0 ? configuredThreadId.trim() : undefined,
|
|
@@ -11655,10 +11446,10 @@ var init_adapter2 = __esm(() => {
|
|
|
11655
11446
|
return typeof raw === "string" && raw.trim().length > 0 ? raw : "You are a helpful agent working through Pairing.";
|
|
11656
11447
|
}
|
|
11657
11448
|
get stdoutLogPath() {
|
|
11658
|
-
return this.transport?.stdoutLogFile ??
|
|
11449
|
+
return this.transport?.stdoutLogFile ?? join10(this.codexOptions.logsDirectory, "stdout.log");
|
|
11659
11450
|
}
|
|
11660
11451
|
get stderrLogPath() {
|
|
11661
|
-
return this.transport?.stderrLogFile ??
|
|
11452
|
+
return this.transport?.stderrLogFile ?? join10(this.codexOptions.logsDirectory, "stderr.log");
|
|
11662
11453
|
}
|
|
11663
11454
|
enqueue(task) {
|
|
11664
11455
|
const next = this.serialized.then(task, task);
|
|
@@ -11826,9 +11617,9 @@ var init_codex = __esm(() => {
|
|
|
11826
11617
|
|
|
11827
11618
|
// ../agent-sessions/src/adapters/acp/adapter.ts
|
|
11828
11619
|
import { spawn as spawn2 } from "child_process";
|
|
11829
|
-
import { existsSync as
|
|
11620
|
+
import { existsSync as existsSync9 } from "fs";
|
|
11830
11621
|
import { mkdir as mkdir3, readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
|
|
11831
|
-
import { dirname as
|
|
11622
|
+
import { dirname as dirname6, isAbsolute, relative as relative2, resolve as resolve2 } from "path";
|
|
11832
11623
|
import { pathToFileURL } from "url";
|
|
11833
11624
|
function isRecord3(value) {
|
|
11834
11625
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -12207,7 +11998,7 @@ var init_adapter3 = __esm(() => {
|
|
|
12207
11998
|
return;
|
|
12208
11999
|
}
|
|
12209
12000
|
const options = this.acpOptions;
|
|
12210
|
-
if (!
|
|
12001
|
+
if (!existsSync9(options.cwd)) {
|
|
12211
12002
|
const failure = new Error(`ACP agent working directory does not exist: ${options.cwd}` + ` (harness command: ${options.command})`);
|
|
12212
12003
|
this.failSession(failure);
|
|
12213
12004
|
throw failure;
|
|
@@ -12867,7 +12658,7 @@ ${plan}`,
|
|
|
12867
12658
|
return;
|
|
12868
12659
|
}
|
|
12869
12660
|
const filePath = this.resolveAllowedPath(requestedPath);
|
|
12870
|
-
await mkdir3(
|
|
12661
|
+
await mkdir3(dirname6(filePath), { recursive: true });
|
|
12871
12662
|
await writeFile3(filePath, params.content, "utf8");
|
|
12872
12663
|
this.writeResult(message.id, {});
|
|
12873
12664
|
}
|
|
@@ -13067,16 +12858,16 @@ var init_acp = __esm(() => {
|
|
|
13067
12858
|
});
|
|
13068
12859
|
|
|
13069
12860
|
// ../agent-sessions/src/adapters/grok-acp/adapter.ts
|
|
13070
|
-
import { existsSync as
|
|
12861
|
+
import { existsSync as existsSync10 } from "fs";
|
|
13071
12862
|
import { homedir as homedir10 } from "os";
|
|
13072
|
-
import { join as
|
|
12863
|
+
import { join as join11 } from "path";
|
|
13073
12864
|
function defaultGrokCommand(env) {
|
|
13074
12865
|
const override = firstNonEmptyString(env?.GROK_CLI_BIN, process.env.GROK_CLI_BIN);
|
|
13075
12866
|
if (override) {
|
|
13076
12867
|
return override;
|
|
13077
12868
|
}
|
|
13078
|
-
const installed =
|
|
13079
|
-
return
|
|
12869
|
+
const installed = join11(homedir10(), ".grok", "bin", "grok");
|
|
12870
|
+
return existsSync10(installed) ? installed : "grok";
|
|
13080
12871
|
}
|
|
13081
12872
|
function isRecord4(value) {
|
|
13082
12873
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -13151,9 +12942,9 @@ var init_grok_acp = __esm(() => {
|
|
|
13151
12942
|
});
|
|
13152
12943
|
|
|
13153
12944
|
// ../agent-sessions/src/adapters/kimi-acp/adapter.ts
|
|
13154
|
-
import { existsSync as
|
|
12945
|
+
import { existsSync as existsSync11 } from "fs";
|
|
13155
12946
|
import { homedir as homedir11 } from "os";
|
|
13156
|
-
import { join as
|
|
12947
|
+
import { join as join12 } from "path";
|
|
13157
12948
|
function isRecord5(value) {
|
|
13158
12949
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
13159
12950
|
}
|
|
@@ -13182,10 +12973,10 @@ function defaultKimiCommand(env) {
|
|
|
13182
12973
|
return override;
|
|
13183
12974
|
}
|
|
13184
12975
|
const installedCandidates = [
|
|
13185
|
-
|
|
13186
|
-
|
|
12976
|
+
join12(homedir11(), ".kimi-code", "bin", "kimi"),
|
|
12977
|
+
join12(homedir11(), ".local", "bin", "kimi")
|
|
13187
12978
|
];
|
|
13188
|
-
return installedCandidates.find((candidate) =>
|
|
12979
|
+
return installedCandidates.find((candidate) => existsSync11(candidate)) ?? "kimi";
|
|
13189
12980
|
}
|
|
13190
12981
|
var DEFAULT_KIMI_ARGS, DEFAULT_KIMI_STARTUP_TIMEOUT_MS = 60000, KIMI_ACP_ADAPTER_TYPE = "kimi-acp", createAdapter5 = (config) => {
|
|
13191
12982
|
const rawOptions = isRecord5(config.options) ? config.options : {};
|
|
@@ -15356,7 +15147,7 @@ var init_service = () => {};
|
|
|
15356
15147
|
import { readFile as readFile4 } from "fs/promises";
|
|
15357
15148
|
import { spawn as spawn3 } from "child_process";
|
|
15358
15149
|
import { homedir as homedir12 } from "os";
|
|
15359
|
-
import { join as
|
|
15150
|
+
import { join as join13 } from "path";
|
|
15360
15151
|
async function discover(options = {}) {
|
|
15361
15152
|
return (await discoverLocal(options))?.endpoint;
|
|
15362
15153
|
}
|
|
@@ -15468,7 +15259,7 @@ async function stop(options = {}) {
|
|
|
15468
15259
|
await kill(existing, options);
|
|
15469
15260
|
}
|
|
15470
15261
|
function fallback() {
|
|
15471
|
-
return
|
|
15262
|
+
return join13(process.env["XDG_STATE_HOME"] ?? join13(homedir12(), ".local", "state"), "opencode", "service.json");
|
|
15472
15263
|
}
|
|
15473
15264
|
function headers(endpoint) {
|
|
15474
15265
|
if (endpoint.auth === undefined)
|
|
@@ -16317,9 +16108,9 @@ var init_normalizer4 = __esm(() => {
|
|
|
16317
16108
|
});
|
|
16318
16109
|
|
|
16319
16110
|
// ../agent-sessions/src/adapters/opencode-v2/adapter.ts
|
|
16320
|
-
import { existsSync as
|
|
16111
|
+
import { existsSync as existsSync12 } from "fs";
|
|
16321
16112
|
import { homedir as homedir13 } from "os";
|
|
16322
|
-
import { basename as basename5, isAbsolute as isAbsolute2, join as
|
|
16113
|
+
import { basename as basename5, isAbsolute as isAbsolute2, join as join14, resolve as resolve3 } from "path";
|
|
16323
16114
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
16324
16115
|
function deferred() {
|
|
16325
16116
|
let resolvePromise;
|
|
@@ -16353,10 +16144,10 @@ function defaultOpenCodeV2Binary(env) {
|
|
|
16353
16144
|
const candidates = [
|
|
16354
16145
|
"/opt/homebrew/bin/opencode2",
|
|
16355
16146
|
"/usr/local/bin/opencode2",
|
|
16356
|
-
|
|
16357
|
-
|
|
16147
|
+
join14(home, ".opencode", "bin", "opencode2"),
|
|
16148
|
+
join14(home, ".local", "bin", "opencode2")
|
|
16358
16149
|
];
|
|
16359
|
-
return candidates.find((candidate) =>
|
|
16150
|
+
return candidates.find((candidate) => existsSync12(candidate)) ?? "opencode2";
|
|
16360
16151
|
}
|
|
16361
16152
|
function modelRef(value, variantValue) {
|
|
16362
16153
|
const raw = stringValue8(value);
|
|
@@ -17386,9 +17177,9 @@ var init_opencode_v2 = __esm(() => {
|
|
|
17386
17177
|
|
|
17387
17178
|
// ../agent-sessions/src/adapters/opencode-acp/adapter.ts
|
|
17388
17179
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
17389
|
-
import { existsSync as
|
|
17180
|
+
import { existsSync as existsSync13 } from "fs";
|
|
17390
17181
|
import { homedir as homedir14 } from "os";
|
|
17391
|
-
import { join as
|
|
17182
|
+
import { join as join15 } from "path";
|
|
17392
17183
|
function isRecord8(value) {
|
|
17393
17184
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
17394
17185
|
}
|
|
@@ -17419,10 +17210,10 @@ function defaultOpenCodeCommand(env) {
|
|
|
17419
17210
|
const installedCandidates = [
|
|
17420
17211
|
"/opt/homebrew/bin/opencode",
|
|
17421
17212
|
"/usr/local/bin/opencode",
|
|
17422
|
-
|
|
17423
|
-
|
|
17213
|
+
join15(homedir14(), ".opencode", "bin", "opencode"),
|
|
17214
|
+
join15(homedir14(), ".local", "bin", "opencode")
|
|
17424
17215
|
];
|
|
17425
|
-
return installedCandidates.find((candidate) =>
|
|
17216
|
+
return installedCandidates.find((candidate) => existsSync13(candidate)) ?? "opencode";
|
|
17426
17217
|
}
|
|
17427
17218
|
function configContentEnv(rawOptions, env) {
|
|
17428
17219
|
const model = stringValue9(rawOptions.model);
|
|
@@ -17439,7 +17230,7 @@ function configContentEnv(rawOptions, env) {
|
|
|
17439
17230
|
return { [OPENCODE_CONFIG_CONTENT_ENV]: JSON.stringify(overlay) };
|
|
17440
17231
|
}
|
|
17441
17232
|
function keychainSecret(name, commandOverride) {
|
|
17442
|
-
const candidates = commandOverride ? [commandOverride] : ["secret",
|
|
17233
|
+
const candidates = commandOverride ? [commandOverride] : ["secret", join15(homedir14(), ".local", "bin", "secret")];
|
|
17443
17234
|
for (const command of candidates) {
|
|
17444
17235
|
try {
|
|
17445
17236
|
const result = spawnSync2(command, ["get", name], { encoding: "utf8", timeout: 5000 });
|
|
@@ -18505,6 +18296,184 @@ var init_src2 = __esm(() => {
|
|
|
18505
18296
|
init_cost();
|
|
18506
18297
|
});
|
|
18507
18298
|
|
|
18299
|
+
// ../runtime/src/node-identity.ts
|
|
18300
|
+
import {
|
|
18301
|
+
createHash,
|
|
18302
|
+
createPrivateKey,
|
|
18303
|
+
createPublicKey,
|
|
18304
|
+
generateKeyPairSync,
|
|
18305
|
+
randomBytes,
|
|
18306
|
+
sign,
|
|
18307
|
+
verify
|
|
18308
|
+
} from "crypto";
|
|
18309
|
+
import {
|
|
18310
|
+
chmodSync,
|
|
18311
|
+
existsSync as existsSync14,
|
|
18312
|
+
mkdirSync as mkdirSync4,
|
|
18313
|
+
readFileSync as readFileSync6,
|
|
18314
|
+
renameSync as renameSync2,
|
|
18315
|
+
rmSync as rmSync2,
|
|
18316
|
+
writeFileSync as writeFileSync4
|
|
18317
|
+
} from "fs";
|
|
18318
|
+
import { dirname as dirname7, join as join16 } from "path";
|
|
18319
|
+
function nodeIdentityPath(supportDirectory) {
|
|
18320
|
+
const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
|
|
18321
|
+
return join16(dir, NODE_IDENTITY_FILE);
|
|
18322
|
+
}
|
|
18323
|
+
function loadOrCreateNodeIdentity(supportDirectory) {
|
|
18324
|
+
const path2 = nodeIdentityPath(supportDirectory);
|
|
18325
|
+
if (existsSync14(path2)) {
|
|
18326
|
+
return readAndValidateNodeIdentity(path2);
|
|
18327
|
+
}
|
|
18328
|
+
return createNodeIdentity(supportDirectory);
|
|
18329
|
+
}
|
|
18330
|
+
function readStableNodeQualifier(supportDirectory) {
|
|
18331
|
+
const path2 = nodeIdentityPath(supportDirectory);
|
|
18332
|
+
const cached = stableNodeQualifierCache.get(path2);
|
|
18333
|
+
if (cached) {
|
|
18334
|
+
return cached;
|
|
18335
|
+
}
|
|
18336
|
+
if (!existsSync14(path2)) {
|
|
18337
|
+
return null;
|
|
18338
|
+
}
|
|
18339
|
+
const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path2).nodeQualifier);
|
|
18340
|
+
if (nodeQualifier) {
|
|
18341
|
+
stableNodeQualifierCache.set(path2, nodeQualifier);
|
|
18342
|
+
}
|
|
18343
|
+
return nodeQualifier || null;
|
|
18344
|
+
}
|
|
18345
|
+
function readAndValidateNodeIdentity(path2) {
|
|
18346
|
+
let parsed;
|
|
18347
|
+
try {
|
|
18348
|
+
parsed = JSON.parse(readFileSync6(path2, "utf8"));
|
|
18349
|
+
} catch {
|
|
18350
|
+
throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
|
|
18351
|
+
}
|
|
18352
|
+
if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
|
|
18353
|
+
throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
|
|
18354
|
+
}
|
|
18355
|
+
if (parsed.nodeQualifier !== undefined && normalizeNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
|
|
18356
|
+
throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
|
|
18357
|
+
}
|
|
18358
|
+
try {
|
|
18359
|
+
const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
|
|
18360
|
+
if (derived !== parsed.publicKey) {
|
|
18361
|
+
throw new Error("mismatch");
|
|
18362
|
+
}
|
|
18363
|
+
} catch {
|
|
18364
|
+
throw new Error(`Node identity at ${path2} has mismatched or invalid keys; remove it to generate a fresh one.`);
|
|
18365
|
+
}
|
|
18366
|
+
return parsed;
|
|
18367
|
+
}
|
|
18368
|
+
function normalizeNodeQualifier(value) {
|
|
18369
|
+
return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
18370
|
+
}
|
|
18371
|
+
function createNodeIdentity(supportDirectory) {
|
|
18372
|
+
if (!supportDirectory) {
|
|
18373
|
+
assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
|
|
18374
|
+
}
|
|
18375
|
+
const path2 = nodeIdentityPath(supportDirectory);
|
|
18376
|
+
const { publicKey, privateKey } = generateKeyPairSync("ed25519");
|
|
18377
|
+
const identity = {
|
|
18378
|
+
version: 1,
|
|
18379
|
+
publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
|
|
18380
|
+
privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
|
|
18381
|
+
createdAt: Date.now()
|
|
18382
|
+
};
|
|
18383
|
+
mkdirSync4(dirname7(path2), { recursive: true });
|
|
18384
|
+
try {
|
|
18385
|
+
writeFileSync4(path2, `${JSON.stringify(identity, null, 2)}
|
|
18386
|
+
`, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
18387
|
+
} catch (error) {
|
|
18388
|
+
if (error.code === "EEXIST") {
|
|
18389
|
+
return readAndValidateNodeIdentity(path2);
|
|
18390
|
+
}
|
|
18391
|
+
throw error;
|
|
18392
|
+
}
|
|
18393
|
+
try {
|
|
18394
|
+
chmodSync(path2, 384);
|
|
18395
|
+
} catch {}
|
|
18396
|
+
return identity;
|
|
18397
|
+
}
|
|
18398
|
+
function nodeKeyId(publicKeyBase64) {
|
|
18399
|
+
return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
|
|
18400
|
+
}
|
|
18401
|
+
function nodeFingerprint(publicKeyBase64) {
|
|
18402
|
+
const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
|
|
18403
|
+
const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
|
|
18404
|
+
return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
|
|
18405
|
+
}
|
|
18406
|
+
function signNodePayload(identity, payload) {
|
|
18407
|
+
const key = importPrivateKey(identity.privateKey);
|
|
18408
|
+
return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
|
|
18409
|
+
}
|
|
18410
|
+
function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
|
|
18411
|
+
try {
|
|
18412
|
+
const key = importPublicKey(publicKeyBase64);
|
|
18413
|
+
return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
|
|
18414
|
+
} catch {
|
|
18415
|
+
return false;
|
|
18416
|
+
}
|
|
18417
|
+
}
|
|
18418
|
+
function canonicalJson(value) {
|
|
18419
|
+
if (value === null || typeof value !== "object") {
|
|
18420
|
+
return JSON.stringify(value);
|
|
18421
|
+
}
|
|
18422
|
+
if (Array.isArray(value)) {
|
|
18423
|
+
return `[${value.map(canonicalJson).join(",")}]`;
|
|
18424
|
+
}
|
|
18425
|
+
const record2 = value;
|
|
18426
|
+
const keys = Object.keys(record2).sort();
|
|
18427
|
+
return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record2[key])}`).join(",")}}`;
|
|
18428
|
+
}
|
|
18429
|
+
function verifySignedNodeCard(card, now = Date.now()) {
|
|
18430
|
+
if (nodeKeyId(card.publicKey) !== card.keyId) {
|
|
18431
|
+
return false;
|
|
18432
|
+
}
|
|
18433
|
+
if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
|
|
18434
|
+
return false;
|
|
18435
|
+
}
|
|
18436
|
+
if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
|
|
18437
|
+
return false;
|
|
18438
|
+
}
|
|
18439
|
+
if (card.tls !== undefined) {
|
|
18440
|
+
if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
|
|
18441
|
+
return false;
|
|
18442
|
+
}
|
|
18443
|
+
}
|
|
18444
|
+
const { signature, ...unsigned } = card;
|
|
18445
|
+
return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
|
|
18446
|
+
}
|
|
18447
|
+
function base32Encode(input) {
|
|
18448
|
+
let bits = 0;
|
|
18449
|
+
let value = 0;
|
|
18450
|
+
let output = "";
|
|
18451
|
+
for (const byte of input) {
|
|
18452
|
+
value = value << 8 | byte;
|
|
18453
|
+
bits += 8;
|
|
18454
|
+
while (bits >= 5) {
|
|
18455
|
+
output += BASE32_ALPHABET[value >>> bits - 5 & 31];
|
|
18456
|
+
bits -= 5;
|
|
18457
|
+
}
|
|
18458
|
+
}
|
|
18459
|
+
if (bits > 0) {
|
|
18460
|
+
output += BASE32_ALPHABET[value << 5 - bits & 31];
|
|
18461
|
+
}
|
|
18462
|
+
return output;
|
|
18463
|
+
}
|
|
18464
|
+
function importPrivateKey(privateKeyBase64) {
|
|
18465
|
+
return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
|
|
18466
|
+
}
|
|
18467
|
+
function importPublicKey(publicKeyBase64) {
|
|
18468
|
+
return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
|
|
18469
|
+
}
|
|
18470
|
+
var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
|
|
18471
|
+
var init_node_identity = __esm(() => {
|
|
18472
|
+
init_support_paths();
|
|
18473
|
+
NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
|
|
18474
|
+
stableNodeQualifierCache = new Map;
|
|
18475
|
+
});
|
|
18476
|
+
|
|
18508
18477
|
// ../../node_modules/.bun/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
18509
18478
|
var require_Reflect = __commonJS(() => {
|
|
18510
18479
|
/*! *****************************************************************************
|
|
@@ -33121,7 +33090,7 @@ var init_local_agents = __esm(() => {
|
|
|
33121
33090
|
// ../web/server/core/pairing/runtime/config.ts
|
|
33122
33091
|
init_local_config();
|
|
33123
33092
|
init_open_scout_network();
|
|
33124
|
-
import { existsSync as
|
|
33093
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
33125
33094
|
import { homedir as homedir3 } from "os";
|
|
33126
33095
|
import path from "path";
|
|
33127
33096
|
var PAIRING_QR_TTL_MS = 5 * 60 * 1000;
|
|
@@ -33139,11 +33108,11 @@ function pairingPaths() {
|
|
|
33139
33108
|
}
|
|
33140
33109
|
function loadPairingConfig() {
|
|
33141
33110
|
const { configPath } = pairingPaths();
|
|
33142
|
-
if (!
|
|
33111
|
+
if (!existsSync3(configPath)) {
|
|
33143
33112
|
return {};
|
|
33144
33113
|
}
|
|
33145
33114
|
try {
|
|
33146
|
-
const payload = JSON.parse(
|
|
33115
|
+
const payload = JSON.parse(readFileSync3(configPath, "utf8"));
|
|
33147
33116
|
return typeof payload === "object" && payload ? payload : {};
|
|
33148
33117
|
} catch {
|
|
33149
33118
|
return {};
|
|
@@ -34507,7 +34476,7 @@ function sql(strings, ...params) {
|
|
|
34507
34476
|
return new SQL([new StringChunk(str)]);
|
|
34508
34477
|
}
|
|
34509
34478
|
sql2.raw = raw;
|
|
34510
|
-
function
|
|
34479
|
+
function join5(chunks, separator) {
|
|
34511
34480
|
const result = [];
|
|
34512
34481
|
for (const [i, chunk] of chunks.entries()) {
|
|
34513
34482
|
if (i > 0 && separator !== undefined) {
|
|
@@ -34517,7 +34486,7 @@ function sql(strings, ...params) {
|
|
|
34517
34486
|
}
|
|
34518
34487
|
return new SQL(result);
|
|
34519
34488
|
}
|
|
34520
|
-
sql2.join =
|
|
34489
|
+
sql2.join = join5;
|
|
34521
34490
|
function identifier(value) {
|
|
34522
34491
|
return new Name(value);
|
|
34523
34492
|
}
|
|
@@ -37459,12 +37428,10 @@ class InMemoryControlRuntime {
|
|
|
37459
37428
|
}
|
|
37460
37429
|
}
|
|
37461
37430
|
// ../runtime/src/sqlite-store.ts
|
|
37462
|
-
init_node_identity();
|
|
37463
37431
|
init_sqlite_adapter();
|
|
37464
37432
|
|
|
37465
37433
|
// ../runtime/src/control-plane-migrations.ts
|
|
37466
37434
|
init_support_paths();
|
|
37467
|
-
init_node_identity();
|
|
37468
37435
|
|
|
37469
37436
|
// ../runtime/src/budget-observations.ts
|
|
37470
37437
|
var QUOTA_HISTORY_BUCKET_MS = 60 * 60 * 1000;
|
|
@@ -57346,7 +57313,7 @@ function writeJsonAtomically(filePath, value) {
|
|
|
57346
57313
|
|
|
57347
57314
|
// ../web/server/core/pairing/runtime/runtime.ts
|
|
57348
57315
|
init_src2();
|
|
57349
|
-
import { homedir as
|
|
57316
|
+
import { homedir as homedir41 } from "os";
|
|
57350
57317
|
|
|
57351
57318
|
// ../web/server/core/pairing/runtime/bridge/bridge.ts
|
|
57352
57319
|
init_src2();
|
|
@@ -58604,9 +58571,9 @@ function formatTimestamp(value) {
|
|
|
58604
58571
|
// ../web/server/core/pairing/runtime/bridge/server.ts
|
|
58605
58572
|
init_system_probes();
|
|
58606
58573
|
init_src2();
|
|
58607
|
-
import { readdirSync as readdirSync6, readFileSync as
|
|
58608
|
-
import { basename as basename13, isAbsolute as isAbsolute7, join as
|
|
58609
|
-
import { homedir as
|
|
58574
|
+
import { readdirSync as readdirSync6, readFileSync as readFileSync25, realpathSync as realpathSync5, statSync as statSync12 } from "fs";
|
|
58575
|
+
import { basename as basename13, isAbsolute as isAbsolute7, join as join47, relative as relative6, resolve as resolve18 } from "path";
|
|
58576
|
+
import { homedir as homedir38 } from "os";
|
|
58610
58577
|
|
|
58611
58578
|
// ../web/server/core/mobile/service.ts
|
|
58612
58579
|
init_src();
|
|
@@ -62984,17 +62951,122 @@ function describeError(cause) {
|
|
|
62984
62951
|
}
|
|
62985
62952
|
|
|
62986
62953
|
// ../web/server/pairing.ts
|
|
62954
|
+
import {
|
|
62955
|
+
existsSync as existsSync37,
|
|
62956
|
+
mkdirSync as mkdirSync18,
|
|
62957
|
+
readFileSync as readFileSync23,
|
|
62958
|
+
statSync as statSync10,
|
|
62959
|
+
unlinkSync as unlinkSync3,
|
|
62960
|
+
writeFileSync as writeFileSync14
|
|
62961
|
+
} from "fs";
|
|
62962
|
+
import { homedir as homedir35 } from "os";
|
|
62963
|
+
import { dirname as dirname23, join as join44, resolve as resolve15 } from "path";
|
|
62964
|
+
init_setup();
|
|
62965
|
+
|
|
62966
|
+
// ../runtime/src/pairing-supervisor.ts
|
|
62967
|
+
import { execFileSync as execFileSync6 } from "child_process";
|
|
62968
|
+
import { randomUUID as randomUUID6 } from "crypto";
|
|
62987
62969
|
import {
|
|
62988
62970
|
existsSync as existsSync36,
|
|
62989
62971
|
mkdirSync as mkdirSync17,
|
|
62990
62972
|
readFileSync as readFileSync22,
|
|
62991
|
-
|
|
62992
|
-
|
|
62973
|
+
renameSync as renameSync6,
|
|
62974
|
+
rmSync as rmSync4,
|
|
62993
62975
|
writeFileSync as writeFileSync13
|
|
62994
62976
|
} from "fs";
|
|
62995
62977
|
import { homedir as homedir34 } from "os";
|
|
62996
|
-
import { dirname as dirname22, join as join43
|
|
62997
|
-
|
|
62978
|
+
import { dirname as dirname22, join as join43 } from "path";
|
|
62979
|
+
var SCOUT_PAIRING_SUPERVISOR_INTENT_FILE = "supervisor.json";
|
|
62980
|
+
var SCOUT_PAIRING_RUNTIME_PID_FILE = "runtime.pid";
|
|
62981
|
+
var SCOUT_PAIRING_RUNTIME_OWNER_FILE = "runtime-owner.json";
|
|
62982
|
+
var SCOUT_PAIRING_SUPERVISOR_PID_FILE = "supervisor.pid";
|
|
62983
|
+
var SCOUT_PAIRING_RUNTIME_PROCESS_MARKER = "pairing-runtime-controller";
|
|
62984
|
+
function resolveScoutPairingSupervisorPaths(env = process.env) {
|
|
62985
|
+
const configuredRoot = env.OPENSCOUT_PAIRING_HOME?.trim() || env.SCOUT_PAIRING_HOME?.trim();
|
|
62986
|
+
const rootDir = configuredRoot || join43(homedir34(), ".scout", "pairing");
|
|
62987
|
+
return {
|
|
62988
|
+
rootDir,
|
|
62989
|
+
intentPath: join43(rootDir, SCOUT_PAIRING_SUPERVISOR_INTENT_FILE),
|
|
62990
|
+
runtimePidPath: join43(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE),
|
|
62991
|
+
runtimeOwnerPath: join43(rootDir, SCOUT_PAIRING_RUNTIME_OWNER_FILE),
|
|
62992
|
+
supervisorPidPath: join43(rootDir, SCOUT_PAIRING_SUPERVISOR_PID_FILE)
|
|
62993
|
+
};
|
|
62994
|
+
}
|
|
62995
|
+
function inspectScoutPairingProcess(pid) {
|
|
62996
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
62997
|
+
return null;
|
|
62998
|
+
try {
|
|
62999
|
+
const output = execFileSync6("ps", ["-p", String(pid), "-o", "lstart=", "-o", "command="], {
|
|
63000
|
+
encoding: "utf8",
|
|
63001
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
63002
|
+
}).trim();
|
|
63003
|
+
const startedAt = output.slice(0, 24).trim().replace(/\s+/g, " ");
|
|
63004
|
+
const command = output.slice(24).trim();
|
|
63005
|
+
return startedAt && command ? { pid, startedAt, command } : null;
|
|
63006
|
+
} catch {
|
|
63007
|
+
return null;
|
|
63008
|
+
}
|
|
63009
|
+
}
|
|
63010
|
+
function readScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath) {
|
|
63011
|
+
if (!existsSync36(ownerPath))
|
|
63012
|
+
return null;
|
|
63013
|
+
try {
|
|
63014
|
+
const value = JSON.parse(readFileSync22(ownerPath, "utf8"));
|
|
63015
|
+
return value.version === 1 && Number.isInteger(value.pid) && (value.pid ?? 0) > 0 && typeof value.token === "string" && value.token.length >= 16 && typeof value.startedAt === "string" && value.startedAt.length > 0 && typeof value.command === "string" && value.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER) && typeof value.claimedAt === "number" && Number.isFinite(value.claimedAt) ? value : null;
|
|
63016
|
+
} catch {
|
|
63017
|
+
return null;
|
|
63018
|
+
}
|
|
63019
|
+
}
|
|
63020
|
+
function isScoutPairingRuntimeOwnerLive(owner, options = {}) {
|
|
63021
|
+
if (!owner || options.expectedToken && owner.token !== options.expectedToken)
|
|
63022
|
+
return false;
|
|
63023
|
+
const current = (options.inspect ?? inspectScoutPairingProcess)(owner.pid);
|
|
63024
|
+
return current !== null && current.startedAt === owner.startedAt && current.command === owner.command && current.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER);
|
|
63025
|
+
}
|
|
63026
|
+
function readLiveScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath, options = {}) {
|
|
63027
|
+
const owner = readScoutPairingRuntimeOwner(ownerPath);
|
|
63028
|
+
return isScoutPairingRuntimeOwnerLive(owner, options) ? owner : null;
|
|
63029
|
+
}
|
|
63030
|
+
function claimScoutPairingRuntimeOwnership(options = {}) {
|
|
63031
|
+
const pid = options.pid ?? process.pid;
|
|
63032
|
+
const ownerPath = options.ownerPath ?? resolveScoutPairingSupervisorPaths().runtimeOwnerPath;
|
|
63033
|
+
const inspect = options.inspect ?? inspectScoutPairingProcess;
|
|
63034
|
+
const existing = readLiveScoutPairingRuntimeOwner(ownerPath, { inspect });
|
|
63035
|
+
if (existing && existing.pid !== pid) {
|
|
63036
|
+
throw new Error(`Scout pairing runtime is already owned by pid ${existing.pid}.`);
|
|
63037
|
+
}
|
|
63038
|
+
const identity = inspect(pid);
|
|
63039
|
+
if (!identity || !identity.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER)) {
|
|
63040
|
+
throw new Error(`Cannot prove Scout pairing runtime ownership for pid ${pid}.`);
|
|
63041
|
+
}
|
|
63042
|
+
const owner = {
|
|
63043
|
+
version: 1,
|
|
63044
|
+
...identity,
|
|
63045
|
+
token: options.token?.trim() || randomUUID6(),
|
|
63046
|
+
claimedAt: options.now ?? Date.now()
|
|
63047
|
+
};
|
|
63048
|
+
mkdirSync17(dirname22(ownerPath), { recursive: true });
|
|
63049
|
+
writeFileAtomically(ownerPath, `${JSON.stringify(owner, null, 2)}
|
|
63050
|
+
`);
|
|
63051
|
+
return owner;
|
|
63052
|
+
}
|
|
63053
|
+
function releaseScoutPairingRuntimeOwnership(owner, ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath) {
|
|
63054
|
+
const current = readScoutPairingRuntimeOwner(ownerPath);
|
|
63055
|
+
if (!current || current.pid !== owner.pid || current.token !== owner.token)
|
|
63056
|
+
return;
|
|
63057
|
+
rmSync4(ownerPath, { force: true });
|
|
63058
|
+
}
|
|
63059
|
+
function writeFileAtomically(path2, contents) {
|
|
63060
|
+
const temporaryPath = `${path2}.${process.pid}.${Date.now()}.tmp`;
|
|
63061
|
+
try {
|
|
63062
|
+
writeFileSync13(temporaryPath, contents);
|
|
63063
|
+
renameSync6(temporaryPath, path2);
|
|
63064
|
+
} finally {
|
|
63065
|
+
rmSync4(temporaryPath, { force: true });
|
|
63066
|
+
}
|
|
63067
|
+
}
|
|
63068
|
+
|
|
63069
|
+
// ../web/server/pairing.ts
|
|
62998
63070
|
init_local_config();
|
|
62999
63071
|
init_tool_resolution();
|
|
63000
63072
|
var SCOUT_PAIRING_HOME_DIRECTORY = ".scout/pairing";
|
|
@@ -63003,25 +63075,25 @@ var SCOUT_PAIRING_IDENTITY_FILE = "identity.json";
|
|
|
63003
63075
|
var SCOUT_PAIRING_TRUSTED_PEERS_FILE = "trusted-peers.json";
|
|
63004
63076
|
var SCOUT_PAIRING_LOG_FILE = "bridge.log";
|
|
63005
63077
|
var SCOUT_PAIRING_RUNTIME_STATE_FILE = "runtime.json";
|
|
63006
|
-
var
|
|
63078
|
+
var SCOUT_PAIRING_RUNTIME_PID_FILE2 = "runtime.pid";
|
|
63007
63079
|
var SCOUT_PAIRING_DEFAULT_PORT = 7888;
|
|
63008
63080
|
var SCOUT_PAIRING_RUNTIME_VERSION = 1;
|
|
63009
63081
|
var SCOUT_PAIRING_BRIDGE_CONNECT_TIMEOUT_MS = 1500;
|
|
63010
63082
|
var SCOUT_PAIRING_BRIDGE_REQUEST_TIMEOUT_MS = 2500;
|
|
63011
63083
|
function resolveScoutPairingHomeDirectory() {
|
|
63012
63084
|
const configured = process.env.OPENSCOUT_PAIRING_HOME?.trim() || process.env.SCOUT_PAIRING_HOME?.trim();
|
|
63013
|
-
return configured ||
|
|
63085
|
+
return configured || join44(homedir35(), SCOUT_PAIRING_HOME_DIRECTORY);
|
|
63014
63086
|
}
|
|
63015
63087
|
function resolveScoutPairingPaths() {
|
|
63016
63088
|
const rootDir = resolveScoutPairingHomeDirectory();
|
|
63017
63089
|
return {
|
|
63018
63090
|
rootDir,
|
|
63019
|
-
configPath:
|
|
63020
|
-
identityPath:
|
|
63021
|
-
trustedPeersPath:
|
|
63022
|
-
logPath:
|
|
63023
|
-
runtimeStatePath:
|
|
63024
|
-
runtimePidPath:
|
|
63091
|
+
configPath: join44(rootDir, SCOUT_PAIRING_CONFIG_FILE),
|
|
63092
|
+
identityPath: join44(rootDir, SCOUT_PAIRING_IDENTITY_FILE),
|
|
63093
|
+
trustedPeersPath: join44(rootDir, SCOUT_PAIRING_TRUSTED_PEERS_FILE),
|
|
63094
|
+
logPath: join44(rootDir, SCOUT_PAIRING_LOG_FILE),
|
|
63095
|
+
runtimeStatePath: join44(rootDir, SCOUT_PAIRING_RUNTIME_STATE_FILE),
|
|
63096
|
+
runtimePidPath: join44(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE2)
|
|
63025
63097
|
};
|
|
63026
63098
|
}
|
|
63027
63099
|
function createScoutPairingBridgeUrl(port) {
|
|
@@ -63162,11 +63234,11 @@ async function loadScoutPairingSessionSnapshots(port) {
|
|
|
63162
63234
|
}
|
|
63163
63235
|
function loadScoutPairingConfig() {
|
|
63164
63236
|
const { configPath } = resolveScoutPairingPaths();
|
|
63165
|
-
if (!
|
|
63237
|
+
if (!existsSync37(configPath)) {
|
|
63166
63238
|
return {};
|
|
63167
63239
|
}
|
|
63168
63240
|
try {
|
|
63169
|
-
const payload = JSON.parse(
|
|
63241
|
+
const payload = JSON.parse(readFileSync23(configPath, "utf8"));
|
|
63170
63242
|
return typeof payload === "object" && payload ? payload : {};
|
|
63171
63243
|
} catch {
|
|
63172
63244
|
return {};
|
|
@@ -63187,11 +63259,11 @@ function resolveScoutPairingConfig() {
|
|
|
63187
63259
|
}
|
|
63188
63260
|
function readScoutPairingRuntimeSnapshot() {
|
|
63189
63261
|
const { runtimeStatePath } = resolveScoutPairingPaths();
|
|
63190
|
-
if (!
|
|
63262
|
+
if (!existsSync37(runtimeStatePath)) {
|
|
63191
63263
|
return null;
|
|
63192
63264
|
}
|
|
63193
63265
|
try {
|
|
63194
|
-
const parsed = JSON.parse(
|
|
63266
|
+
const parsed = JSON.parse(readFileSync23(runtimeStatePath, "utf8"));
|
|
63195
63267
|
return parsed?.version === SCOUT_PAIRING_RUNTIME_VERSION ? parsed : null;
|
|
63196
63268
|
} catch {
|
|
63197
63269
|
return null;
|
|
@@ -63199,18 +63271,18 @@ function readScoutPairingRuntimeSnapshot() {
|
|
|
63199
63271
|
}
|
|
63200
63272
|
function readScoutPairingRuntimePid() {
|
|
63201
63273
|
const { runtimePidPath } = resolveScoutPairingPaths();
|
|
63202
|
-
if (!
|
|
63274
|
+
if (!existsSync37(runtimePidPath)) {
|
|
63203
63275
|
return null;
|
|
63204
63276
|
}
|
|
63205
63277
|
try {
|
|
63206
|
-
const raw =
|
|
63278
|
+
const raw = readFileSync23(runtimePidPath, "utf8").trim();
|
|
63207
63279
|
const pid = Number(raw);
|
|
63208
63280
|
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
63209
63281
|
} catch {
|
|
63210
63282
|
return null;
|
|
63211
63283
|
}
|
|
63212
63284
|
}
|
|
63213
|
-
function
|
|
63285
|
+
function isScoutPairingProcessRunning(pid) {
|
|
63214
63286
|
if (!pid || !Number.isInteger(pid) || pid <= 0) {
|
|
63215
63287
|
return false;
|
|
63216
63288
|
}
|
|
@@ -63223,11 +63295,11 @@ function isScoutPairingProcessRunning2(pid) {
|
|
|
63223
63295
|
}
|
|
63224
63296
|
function isScoutPairingRuntimeRunning() {
|
|
63225
63297
|
const pid = readScoutPairingRuntimePid();
|
|
63226
|
-
if (
|
|
63298
|
+
if (isScoutPairingProcessRunning(pid)) {
|
|
63227
63299
|
return true;
|
|
63228
63300
|
}
|
|
63229
63301
|
const snapshot = readScoutPairingRuntimeSnapshot();
|
|
63230
|
-
return Boolean(snapshot &&
|
|
63302
|
+
return Boolean(snapshot && isScoutPairingProcessRunning(snapshot.childPid ?? snapshot.pid));
|
|
63231
63303
|
}
|
|
63232
63304
|
var pairingMutationChain = Promise.resolve();
|
|
63233
63305
|
async function getScoutWebPairingSessionSnapshots() {
|
|
@@ -63240,8 +63312,8 @@ async function getScoutWebPairingSessionSnapshots() {
|
|
|
63240
63312
|
|
|
63241
63313
|
// ../web/server/core/agent-endpoints.ts
|
|
63242
63314
|
init_src();
|
|
63243
|
-
import { homedir as
|
|
63244
|
-
import { join as
|
|
63315
|
+
import { homedir as homedir36 } from "os";
|
|
63316
|
+
import { join as join45, resolve as resolve16 } from "path";
|
|
63245
63317
|
function endpointMetadataRecord(endpoint) {
|
|
63246
63318
|
return endpoint?.metadata && typeof endpoint.metadata === "object" && !Array.isArray(endpoint.metadata) ? endpoint.metadata : {};
|
|
63247
63319
|
}
|
|
@@ -63275,10 +63347,10 @@ function endpointSessionAliases(endpoint) {
|
|
|
63275
63347
|
}
|
|
63276
63348
|
function expandHomePath5(value) {
|
|
63277
63349
|
if (value === "~") {
|
|
63278
|
-
return
|
|
63350
|
+
return homedir36();
|
|
63279
63351
|
}
|
|
63280
63352
|
if (value.startsWith("~/")) {
|
|
63281
|
-
return
|
|
63353
|
+
return join45(homedir36(), value.slice(2));
|
|
63282
63354
|
}
|
|
63283
63355
|
return value;
|
|
63284
63356
|
}
|
|
@@ -64585,16 +64657,16 @@ import { createHash as createHash9 } from "crypto";
|
|
|
64585
64657
|
import {
|
|
64586
64658
|
chmodSync as chmodSync2,
|
|
64587
64659
|
closeSync,
|
|
64588
|
-
existsSync as
|
|
64589
|
-
mkdirSync as
|
|
64660
|
+
existsSync as existsSync38,
|
|
64661
|
+
mkdirSync as mkdirSync19,
|
|
64590
64662
|
openSync,
|
|
64591
|
-
readFileSync as
|
|
64592
|
-
renameSync as
|
|
64663
|
+
readFileSync as readFileSync24,
|
|
64664
|
+
renameSync as renameSync7,
|
|
64593
64665
|
unlinkSync as unlinkSync4,
|
|
64594
|
-
writeFileSync as
|
|
64666
|
+
writeFileSync as writeFileSync15
|
|
64595
64667
|
} from "fs";
|
|
64596
|
-
import { homedir as
|
|
64597
|
-
import { join as
|
|
64668
|
+
import { homedir as homedir37, hostname as hostname3, userInfo as userInfo2 } from "os";
|
|
64669
|
+
import { join as join46 } from "path";
|
|
64598
64670
|
|
|
64599
64671
|
// ../web/server/core/pairing/runtime/bridge/ssh-terminal-access.ts
|
|
64600
64672
|
import { createHash as createHash7 } from "crypto";
|
|
@@ -64821,8 +64893,8 @@ function authorizedMobileTerminalSessionName(requestedSessionName, provisionedSe
|
|
|
64821
64893
|
|
|
64822
64894
|
// ../web/server/core/pairing/runtime/bridge/mobile-terminal-provision.ts
|
|
64823
64895
|
async function readMobileTerminalStatus(requestedSessionName, deviceId) {
|
|
64824
|
-
const authorizedKeysPath =
|
|
64825
|
-
const authorizedKeys =
|
|
64896
|
+
const authorizedKeysPath = join46(homedir37(), ".ssh", "authorized_keys");
|
|
64897
|
+
const authorizedKeys = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
|
|
64826
64898
|
const provisionedSessionName = findSshTerminalSessionForDevice(authorizedKeys, deviceId);
|
|
64827
64899
|
const sessionName = authorizedMobileTerminalSessionName(requestedSessionName, provisionedSessionName);
|
|
64828
64900
|
const base = {
|
|
@@ -64894,17 +64966,17 @@ async function readMobileTerminalStatus(requestedSessionName, deviceId) {
|
|
|
64894
64966
|
async function provisionMobileTerminalAccess(sshPublicKey, deviceId, deviceClass = undefined) {
|
|
64895
64967
|
const id = deviceId?.trim() || "scout-ios-device";
|
|
64896
64968
|
const sessionName = provisionedMobileTerminalSessionName(sshPublicKey, deviceClass);
|
|
64897
|
-
const sshDir =
|
|
64898
|
-
const authorizedKeysPath =
|
|
64969
|
+
const sshDir = join46(homedir37(), ".ssh");
|
|
64970
|
+
const authorizedKeysPath = join46(sshDir, "authorized_keys");
|
|
64899
64971
|
const hostKeyFingerprint = readRequiredHostKeyFingerprint();
|
|
64900
64972
|
const result = withAuthorizedKeysLock(sshDir, () => {
|
|
64901
|
-
if (!
|
|
64902
|
-
|
|
64973
|
+
if (!existsSync38(sshDir)) {
|
|
64974
|
+
mkdirSync19(sshDir, { recursive: true, mode: 448 });
|
|
64903
64975
|
}
|
|
64904
64976
|
try {
|
|
64905
64977
|
chmodSync2(sshDir, 448);
|
|
64906
64978
|
} catch {}
|
|
64907
|
-
const existing =
|
|
64979
|
+
const existing = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
|
|
64908
64980
|
const result2 = provisionSshTerminalAccess({
|
|
64909
64981
|
authorizedKeys: existing,
|
|
64910
64982
|
deviceId: id,
|
|
@@ -64952,7 +65024,7 @@ function resolveReachableHost() {
|
|
|
64952
65024
|
}
|
|
64953
65025
|
function readRequiredHostKeyFingerprint() {
|
|
64954
65026
|
try {
|
|
64955
|
-
const pub =
|
|
65027
|
+
const pub = readFileSync24("/etc/ssh/ssh_host_ed25519_key.pub", "utf8");
|
|
64956
65028
|
const keyData = pub.trim().split(/\s+/)[1];
|
|
64957
65029
|
if (!keyData)
|
|
64958
65030
|
throw new Error("missing key data");
|
|
@@ -64966,8 +65038,8 @@ function readRequiredHostKeyFingerprint() {
|
|
|
64966
65038
|
function writeAuthorizedKeysAtomically(path2, contents) {
|
|
64967
65039
|
const tmpPath = `${path2}.scout-${process.pid}-${Date.now()}.tmp`;
|
|
64968
65040
|
try {
|
|
64969
|
-
|
|
64970
|
-
|
|
65041
|
+
writeFileSync15(tmpPath, contents, { mode: 384, flag: "wx" });
|
|
65042
|
+
renameSync7(tmpPath, path2);
|
|
64971
65043
|
} catch (error) {
|
|
64972
65044
|
try {
|
|
64973
65045
|
unlinkSync4(tmpPath);
|
|
@@ -64976,10 +65048,10 @@ function writeAuthorizedKeysAtomically(path2, contents) {
|
|
|
64976
65048
|
}
|
|
64977
65049
|
}
|
|
64978
65050
|
function withAuthorizedKeysLock(sshDir, action) {
|
|
64979
|
-
if (!
|
|
64980
|
-
|
|
65051
|
+
if (!existsSync38(sshDir)) {
|
|
65052
|
+
mkdirSync19(sshDir, { recursive: true, mode: 448 });
|
|
64981
65053
|
}
|
|
64982
|
-
const lockPath =
|
|
65054
|
+
const lockPath = join46(sshDir, ".scout-authorized-keys.lock");
|
|
64983
65055
|
const deadline = Date.now() + 5000;
|
|
64984
65056
|
let fd = null;
|
|
64985
65057
|
while (fd === null) {
|
|
@@ -65572,7 +65644,7 @@ async function handleRPCInner(bridge, req, rpcContext = {}) {
|
|
|
65572
65644
|
const config = resolveConfig();
|
|
65573
65645
|
const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
|
|
65574
65646
|
const matches = await readSessionSearch({
|
|
65575
|
-
home:
|
|
65647
|
+
home: homedir38(),
|
|
65576
65648
|
workspaceRoot,
|
|
65577
65649
|
maxAgeDays: maxAge,
|
|
65578
65650
|
limit,
|
|
@@ -65587,7 +65659,7 @@ async function handleRPCInner(bridge, req, rpcContext = {}) {
|
|
|
65587
65659
|
return { id: req.id, error: { code: -32000, message: "Only .jsonl files can be read" } };
|
|
65588
65660
|
}
|
|
65589
65661
|
try {
|
|
65590
|
-
const content =
|
|
65662
|
+
const content = readFileSync25(p.path, "utf-8");
|
|
65591
65663
|
const lines = content.split(`
|
|
65592
65664
|
`).filter((l) => l.trim().length > 0);
|
|
65593
65665
|
const trimmed = lines.length > 500 ? lines.slice(-500) : lines;
|
|
@@ -65708,13 +65780,13 @@ function resolveMobileCurrentDirectory() {
|
|
|
65708
65780
|
}
|
|
65709
65781
|
}
|
|
65710
65782
|
function resolveWorkspaceRoot(root) {
|
|
65711
|
-
const expandedRoot = root.replace(/^~/,
|
|
65783
|
+
const expandedRoot = root.replace(/^~/, homedir38());
|
|
65712
65784
|
return realpathSync5(expandedRoot);
|
|
65713
65785
|
}
|
|
65714
65786
|
function resolveWorkspacePath(root, requestedPath) {
|
|
65715
65787
|
const normalizedRoot = resolveWorkspaceRoot(root);
|
|
65716
|
-
const expandedPath = requestedPath?.replace(/^~/,
|
|
65717
|
-
const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath :
|
|
65788
|
+
const expandedPath = requestedPath?.replace(/^~/, homedir38());
|
|
65789
|
+
const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath : join47(normalizedRoot, expandedPath) : normalizedRoot;
|
|
65718
65790
|
const resolvedCandidate = realpathSync5(candidate);
|
|
65719
65791
|
const rel = relative6(normalizedRoot, resolvedCandidate);
|
|
65720
65792
|
if (rel === "" || !rel.startsWith("..") && !isAbsolute7(rel)) {
|
|
@@ -65744,7 +65816,7 @@ function listDirectories(dirPath) {
|
|
|
65744
65816
|
continue;
|
|
65745
65817
|
if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
|
|
65746
65818
|
continue;
|
|
65747
|
-
const fullPath =
|
|
65819
|
+
const fullPath = join47(dirPath, name2);
|
|
65748
65820
|
try {
|
|
65749
65821
|
const stat6 = statSync12(fullPath);
|
|
65750
65822
|
if (!stat6.isDirectory())
|
|
@@ -65770,7 +65842,7 @@ async function discoverSessionFiles(maxAgeDays, limit) {
|
|
|
65770
65842
|
const config = resolveConfig();
|
|
65771
65843
|
const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
|
|
65772
65844
|
const sessions4 = await readSessionFileScan({
|
|
65773
|
-
home:
|
|
65845
|
+
home: homedir38(),
|
|
65774
65846
|
workspaceRoot,
|
|
65775
65847
|
maxAgeDays,
|
|
65776
65848
|
limit
|
|
@@ -77578,7 +77650,7 @@ function finalize(ctx, schema2) {
|
|
|
77578
77650
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
77579
77651
|
} else if (ctx.target === "draft-04") {
|
|
77580
77652
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
77581
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
77653
|
+
} else if (ctx.target === "openapi-3.0") {} else {}
|
|
77582
77654
|
if (ctx.external?.uri) {
|
|
77583
77655
|
const id = ctx.external.registry.get(schema2)?.id;
|
|
77584
77656
|
if (!id)
|
|
@@ -77826,7 +77898,7 @@ var literalProcessor = (schema2, ctx, json2, _params) => {
|
|
|
77826
77898
|
if (val === undefined) {
|
|
77827
77899
|
if (ctx.unrepresentable === "throw") {
|
|
77828
77900
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
77829
|
-
}
|
|
77901
|
+
} else {}
|
|
77830
77902
|
} else if (typeof val === "bigint") {
|
|
77831
77903
|
if (ctx.unrepresentable === "throw") {
|
|
77832
77904
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -80176,9 +80248,9 @@ init_src2();
|
|
|
80176
80248
|
init_system_probes();
|
|
80177
80249
|
init_local_config();
|
|
80178
80250
|
init_local_agents();
|
|
80179
|
-
import { readFileSync as
|
|
80180
|
-
import { basename as basename14, isAbsolute as isAbsolute8, join as
|
|
80181
|
-
import { homedir as
|
|
80251
|
+
import { readFileSync as readFileSync26, readdirSync as readdirSync7, realpathSync as realpathSync6, statSync as statSync13 } from "fs";
|
|
80252
|
+
import { basename as basename14, isAbsolute as isAbsolute8, join as join48, relative as relative7, resolve as resolve19 } from "path";
|
|
80253
|
+
import { homedir as homedir39 } from "os";
|
|
80182
80254
|
var t = initTRPC.context().create();
|
|
80183
80255
|
var logged = t.middleware(async ({ path: path2, type, next }) => {
|
|
80184
80256
|
const start = Date.now();
|
|
@@ -80344,13 +80416,13 @@ function resolveMobileCurrentDirectory2() {
|
|
|
80344
80416
|
}
|
|
80345
80417
|
}
|
|
80346
80418
|
function resolveWorkspaceRoot2(root) {
|
|
80347
|
-
const expandedRoot = root.replace(/^~/,
|
|
80419
|
+
const expandedRoot = root.replace(/^~/, homedir39());
|
|
80348
80420
|
return realpathSync6(expandedRoot);
|
|
80349
80421
|
}
|
|
80350
80422
|
function resolveWorkspacePath2(root, requestedPath) {
|
|
80351
80423
|
const normalizedRoot = resolveWorkspaceRoot2(root);
|
|
80352
|
-
const expandedPath = requestedPath?.replace(/^~/,
|
|
80353
|
-
const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath :
|
|
80424
|
+
const expandedPath = requestedPath?.replace(/^~/, homedir39());
|
|
80425
|
+
const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath : join48(normalizedRoot, expandedPath) : normalizedRoot;
|
|
80354
80426
|
const resolvedCandidate = realpathSync6(candidate);
|
|
80355
80427
|
const rel = relative7(normalizedRoot, resolvedCandidate);
|
|
80356
80428
|
if (rel === "" || !rel.startsWith("..") && !isAbsolute8(rel)) {
|
|
@@ -80380,7 +80452,7 @@ function listDirectories2(dirPath) {
|
|
|
80380
80452
|
continue;
|
|
80381
80453
|
if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
|
|
80382
80454
|
continue;
|
|
80383
|
-
const fullPath =
|
|
80455
|
+
const fullPath = join48(dirPath, name2);
|
|
80384
80456
|
try {
|
|
80385
80457
|
const stat6 = statSync13(fullPath);
|
|
80386
80458
|
if (!stat6.isDirectory())
|
|
@@ -80413,7 +80485,7 @@ async function discoverSessionFiles2(maxAgeDays, limit) {
|
|
|
80413
80485
|
const config2 = resolveConfig();
|
|
80414
80486
|
const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
|
|
80415
80487
|
const sessions4 = await readSessionFileScan({
|
|
80416
|
-
home:
|
|
80488
|
+
home: homedir39(),
|
|
80417
80489
|
workspaceRoot,
|
|
80418
80490
|
maxAgeDays,
|
|
80419
80491
|
limit
|
|
@@ -81102,7 +81174,7 @@ var historyRouter = t.router({
|
|
|
81102
81174
|
const config2 = resolveConfig();
|
|
81103
81175
|
const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
|
|
81104
81176
|
const matches = await readSessionSearch({
|
|
81105
|
-
home:
|
|
81177
|
+
home: homedir39(),
|
|
81106
81178
|
workspaceRoot,
|
|
81107
81179
|
maxAgeDays: maxAge,
|
|
81108
81180
|
limit,
|
|
@@ -81119,7 +81191,7 @@ var historyRouter = t.router({
|
|
|
81119
81191
|
});
|
|
81120
81192
|
}
|
|
81121
81193
|
try {
|
|
81122
|
-
const content =
|
|
81194
|
+
const content = readFileSync26(input.path, "utf-8");
|
|
81123
81195
|
const lines = content.split(`
|
|
81124
81196
|
`).filter((l) => l.trim().length > 0);
|
|
81125
81197
|
const trimmed = lines.length > 500 ? lines.slice(-500) : lines;
|
|
@@ -81152,7 +81224,7 @@ var historyRouter = t.router({
|
|
|
81152
81224
|
}
|
|
81153
81225
|
try {
|
|
81154
81226
|
const fileStat = statSync13(input.path);
|
|
81155
|
-
const content =
|
|
81227
|
+
const content = readFileSync26(input.path, "utf-8");
|
|
81156
81228
|
const replay = createHistorySessionSnapshot({
|
|
81157
81229
|
path: input.path,
|
|
81158
81230
|
content,
|
|
@@ -83516,14 +83588,14 @@ function observableToAsyncIterable(observable$1, signal2) {
|
|
|
83516
83588
|
}
|
|
83517
83589
|
// ../web/server/core/pairing/runtime/bridge/server-trpc.ts
|
|
83518
83590
|
import { realpathSync as realpathSync7 } from "fs";
|
|
83519
|
-
import { homedir as
|
|
83591
|
+
import { homedir as homedir40 } from "os";
|
|
83520
83592
|
function resolveCurrentDirectory() {
|
|
83521
83593
|
try {
|
|
83522
83594
|
const config2 = resolveConfig();
|
|
83523
83595
|
const configuredRoot = config2.workspace?.root;
|
|
83524
83596
|
if (!configuredRoot)
|
|
83525
83597
|
return process.cwd();
|
|
83526
|
-
const expanded = configuredRoot.replace(/^~/,
|
|
83598
|
+
const expanded = configuredRoot.replace(/^~/, homedir40());
|
|
83527
83599
|
return realpathSync7(expanded);
|
|
83528
83600
|
} catch {
|
|
83529
83601
|
return process.cwd();
|
|
@@ -84178,7 +84250,7 @@ async function autoStartConfiguredSessions(bridge, sessions4) {
|
|
|
84178
84250
|
try {
|
|
84179
84251
|
const session = await bridge.createSession(entry.adapter, {
|
|
84180
84252
|
name: entry.name,
|
|
84181
|
-
cwd: entry.cwd?.replace(/^~/,
|
|
84253
|
+
cwd: entry.cwd?.replace(/^~/, homedir41()),
|
|
84182
84254
|
options: entry.options
|
|
84183
84255
|
});
|
|
84184
84256
|
console.log(`[bridge] session started: ${session.name} (${entry.adapter})`);
|
|
@@ -84197,10 +84269,19 @@ var BONJOUR_SERVICE_TYPE = "_oscout-pair._tcp";
|
|
|
84197
84269
|
async function runPairingRuntimeController() {
|
|
84198
84270
|
clearStalePairingRuntimeFiles();
|
|
84199
84271
|
const existingPid = readPairingRuntimePid();
|
|
84200
|
-
|
|
84272
|
+
let existingOwner = readLiveScoutPairingRuntimeOwner();
|
|
84273
|
+
if (!existingOwner && existingPid && existingPid !== process.pid) {
|
|
84274
|
+
try {
|
|
84275
|
+
existingOwner = claimScoutPairingRuntimeOwnership({ pid: existingPid });
|
|
84276
|
+
} catch {
|
|
84277
|
+
existingOwner = null;
|
|
84278
|
+
}
|
|
84279
|
+
}
|
|
84280
|
+
if (existingPid && existingPid !== process.pid && existingOwner?.pid === existingPid) {
|
|
84201
84281
|
console.error(`Scout pairing runtime controller is already running (pid ${existingPid}).`);
|
|
84202
84282
|
process.exit(1);
|
|
84203
84283
|
}
|
|
84284
|
+
const runtimeOwner = claimScoutPairingRuntimeOwnership();
|
|
84204
84285
|
writePairingRuntimePid(process.pid);
|
|
84205
84286
|
const state = {
|
|
84206
84287
|
current: writePairingRuntimeSnapshot(createPairingRuntimeSnapshot({ pid: process.pid }, {
|
|
@@ -84240,6 +84321,7 @@ async function runPairingRuntimeController() {
|
|
|
84240
84321
|
childPid: null
|
|
84241
84322
|
});
|
|
84242
84323
|
clearPairingRuntimePid();
|
|
84324
|
+
releaseScoutPairingRuntimeOwnership(runtimeOwner);
|
|
84243
84325
|
process.exit(0);
|
|
84244
84326
|
};
|
|
84245
84327
|
process.on("SIGINT", () => void shutdown());
|