wednesdayai 0.6.1-dev.47 → 0.6.1-dev.50
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/dist/{acp-cli-DwgE-JaK.js → acp-cli-COVr7c9K.js} +12 -12
- package/dist/{agent-DOJWHSTp.js → agent-BgBSmNaI.js} +11 -11
- package/dist/{agent-BzS-Bw92.js → agent-XU4Yrfkg.js} +19 -19
- package/dist/{agent-turn-enqueue-DNz67IZC.js → agent-turn-enqueue-C65boHpU.js} +6 -6
- package/dist/{agent-turn-execute-CVq_M1H9.js → agent-turn-execute-CijEn5uU.js} +81 -81
- package/dist/{agent-turn-recovery-adapter-CVhr928E.js → agent-turn-recovery-adapter-xa1CJlHy.js} +4 -4
- package/dist/{agent-turn-runner-MK7RWfZB.js → agent-turn-runner-ns-G6-qQ.js} +4 -4
- package/dist/{agent-turn-runner-BnpbHkgj.js → agent-turn-runner-zXi4ADUq.js} +6 -6
- package/dist/{agents-iPiwcs70.js → agents-DdxbZ1yR.js} +15 -15
- package/dist/{agents.config-Dh-NFmf1.js → agents.config-Du-EvARZ.js} +2 -2
- package/dist/{audit-D4zYMRNh.js → audit-0XGsgYln.js} +21 -21
- package/dist/{auth-BLSoSze_.js → auth-a3TKKlev.js} +4 -4
- package/dist/{auth-choice-2S2Bu397.js → auth-choice-6lPmGWX_.js} +13 -13
- package/dist/{auth-choice-CAlWQnS0.js → auth-choice-BlU5Jwiy.js} +16 -16
- package/dist/{auth-choice.apply-helpers-DXEH3kKc.js → auth-choice.apply-helpers-BT5h7Kd2.js} +1 -1
- package/dist/{auth-token-RZVdRVFL.js → auth-token-BJlagO1q.js} +2 -2
- package/dist/{banner-DPhzJGvu.js → banner-DTi0GYhj.js} +4 -4
- package/dist/{bonjour-discovery-BP2NnLb7.js → bonjour-discovery-BaPEhz6-.js} +3 -3
- package/dist/{browser-cli-DqPOdkfi.js → browser-cli-cJbbNuC-.js} +20 -20
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +32 -32
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +31 -31
- package/dist/bundled/session-memory/handler.js +32 -32
- package/dist/{call-DzGlAM6A.js → call-DC_l0C6c.js} +5 -5
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{catalog-feed-DAWwBcpU.js → catalog-feed-BPQiz-j4.js} +2 -2
- package/dist/{channel-account-context-DHCvTbB_.js → channel-account-context-BR30O-XA.js} +2 -2
- package/dist/{channel-options-C-m0chcy.js → channel-options-pWJ9tPoi.js} +3 -3
- package/dist/{channel-selection-o_GXmd3S.js → channel-selection-SzzxWFqF.js} +1 -1
- package/dist/{channels-cli-DDV8DQJF.js → channels-cli-DCPDMwOi.js} +102 -102
- package/dist/{channels-status-issues-CDGOGIDW.js → channels-status-issues-D7YJcPZY.js} +1 -1
- package/dist/{chrome-BblDtIhl.js → chrome-DaxSYq9x.js} +6 -6
- package/dist/{chrome-C1IRBXCq.js → chrome-cV7G42a8.js} +32 -32
- package/dist/{clack-prompter-X5gjXw2v.js → clack-prompter-CSTfawN7.js} +5 -5
- package/dist/clawbot-cli-N0qA9LCg.js +32 -0
- package/dist/cli-BS1xXWfW.js +147 -0
- package/dist/{client-RYxRFbaf.js → client-CXlXbWxa.js} +4 -4
- package/dist/{client-profiles-DJoOHmYb.js → client-profiles-BPSW-Pej.js} +2 -2
- package/dist/{clipboard-DqxGZScZ.js → clipboard-C0KqeNJz.js} +1 -1
- package/dist/{command-queue-CZNc1Y5b.js → command-queue-CypbHAAc.js} +1 -1
- package/dist/{command-queue-CgNl6dbc.js → command-queue-DCuGQ6oE.js} +1 -1
- package/dist/{command-registry-nGIVkV6u.js → command-registry-Dn80fYRF.js} +13 -13
- package/dist/{command-secret-targets-BwUg9MG7.js → command-secret-targets-DJebWnC0.js} +4 -4
- package/dist/{commands-P3aAWSG_.js → commands-C4yR5Eki.js} +1 -1
- package/dist/{commands-registry-jq_YarKY.js → commands-registry-DagIzqO7.js} +4 -4
- package/dist/{completion-cli-CdEHcp3V.js → completion-cli-CFOXdHq-.js} +5 -5
- package/dist/{config-cli-BDy6tJDD.js → config-cli-DtQjTEf3.js} +14 -14
- package/dist/{config-guard-I6AtTyZv.js → config-guard-J_hz16uv.js} +4 -4
- package/dist/{config-validation-otVjLKQn.js → config-validation-Db_ZJIqZ.js} +4 -4
- package/dist/{configure-u-u8aXM_.js → configure-DbO7EHyB.js} +22 -22
- package/dist/{console-CdR5lE0A.js → console-eDkX4znK.js} +1 -1
- package/dist/control-ui-v2/assets/{AgentsView-BtvwUvjT.js → AgentsView-K8DEVXxj.js} +1 -1
- package/dist/control-ui-v2/assets/{AutomationsView-Bm551KRf.js → AutomationsView-DO0ssbS6.js} +1 -1
- package/dist/control-ui-v2/assets/Badge-me4YM1lq.js +1 -0
- package/dist/control-ui-v2/assets/{Button-D5rMawzJ.js → Button-ralPMMNs.js} +1 -1
- package/dist/control-ui-v2/assets/{ChannelsView-Bmcrzyc8.js → ChannelsView-8vJB0hXL.js} +1 -1
- package/dist/control-ui-v2/assets/{ConfigForm-tS4Ekkuj.js → ConfigForm-IOs1Exic.js} +1 -1
- package/dist/control-ui-v2/assets/{ConfirmDialog-B-AAbwH-.js → ConfirmDialog-9ode6FP3.js} +1 -1
- package/dist/control-ui-v2/assets/{DataTable-BqqaNmU8.js → DataTable-BbRrWxor.js} +1 -1
- package/dist/control-ui-v2/assets/{DebugView-w3AcoKSJ.js → DebugView-hDoK-Miv.js} +1 -1
- package/dist/control-ui-v2/assets/{Dialog-Che1C2PS.js → Dialog-oJKnAIqZ.js} +1 -1
- package/dist/control-ui-v2/assets/{DreamsView-CRVOkZ0y.js → DreamsView-QBWBlJnW.js} +1 -1
- package/dist/control-ui-v2/assets/{EntityLink-D6UsLKQR.js → EntityLink-CMtTP9Dk.js} +1 -1
- package/dist/control-ui-v2/assets/{FilterPills-CA2lRy0A.js → FilterPills-C_zBIqFP.js} +1 -1
- package/dist/control-ui-v2/assets/{InstancesView-D1s_2Z-j.js → InstancesView-BlXUEHAU.js} +1 -1
- package/dist/control-ui-v2/assets/{LearningView-BOxsGx8P.js → LearningView-De4YeA4M.js} +1 -1
- package/dist/control-ui-v2/assets/{LogsView-DU03hzlQ.js → LogsView-CbllorCk.js} +1 -1
- package/dist/control-ui-v2/assets/{NodesView-DH8y_KeJ.js → NodesView-DD4GYH-6.js} +1 -1
- package/dist/control-ui-v2/assets/{OverviewView-DHPrvXcn.js → OverviewView-7YdkWdG1.js} +1 -1
- package/dist/control-ui-v2/assets/{Panel-DM0JsHgz.js → Panel-CqcbBXzJ.js} +1 -1
- package/dist/control-ui-v2/assets/{PluginMount-DfCGGLsN.js → PluginMount-CIP5T99f.js} +1 -1
- package/dist/control-ui-v2/assets/{PluginPageView-7zgkiz9P.js → PluginPageView-D-WSAQoY.js} +1 -1
- package/dist/control-ui-v2/assets/{PluginPanels-BfBbsH_Z.js → PluginPanels-AFbR8qyk.js} +1 -1
- package/dist/control-ui-v2/assets/{RecoveryView-CrGTo_hu.js → RecoveryView-wCA7Nq9J.js} +1 -1
- package/dist/control-ui-v2/assets/{RunsView-Dp6Mtciq.js → RunsView-DucoEAaM.js} +1 -1
- package/dist/control-ui-v2/assets/{SessionsView-DbjlMwqU.js → SessionsView-0DgZ_-MW.js} +1 -1
- package/dist/control-ui-v2/assets/{SettingsView-Ci22dw48.js → SettingsView-CfTJTK06.js} +1 -1
- package/dist/control-ui-v2/assets/{SkillsView-7BGQcoCn.js → SkillsView-C_sMCqlY.js} +1 -1
- package/dist/control-ui-v2/assets/{Stat-DQyb-fKe.js → Stat-BRQhQ01w.js} +1 -1
- package/dist/control-ui-v2/assets/{StatusDot-CRJsKnJw.js → StatusDot-CjtPcYD9.js} +1 -1
- package/dist/control-ui-v2/assets/{StorageView-5BqFOHli.js → StorageView-B3vVHqxH.js} +1 -1
- package/dist/control-ui-v2/assets/{UpdatedAgo-D_q8xIeZ.js → UpdatedAgo-CJqGVu6_.js} +1 -1
- package/dist/control-ui-v2/assets/{UsageView-Bm9sF-Wt.js → UsageView-BUZtG2MG.js} +1 -1
- package/dist/control-ui-v2/assets/{config-store-zXNM_umy.js → config-store-DiHUH-77.js} +1 -1
- package/dist/control-ui-v2/assets/{format-DpM2rlEo.js → format-BPrfsCHW.js} +1 -1
- package/dist/control-ui-v2/assets/{gateway-features-C0JaT4JI.js → gateway-features-SDBnjY95.js} +1 -1
- package/dist/control-ui-v2/assets/{index-CGoFdGyu.js → index-ChHyE-y3.js} +1 -1
- package/dist/control-ui-v2/assets/{links-Bcw24zqI.js → links-vgPLVF05.js} +2 -2
- package/dist/control-ui-v2/assets/{run-rows-DVijLB79.js → run-rows-1MUje5J6.js} +1 -1
- package/dist/control-ui-v2/assets/{runs-store-Cxbnn8K8.js → runs-store-BZTDbQro.js} +1 -1
- package/dist/control-ui-v2/assets/{use-gateway-query-xtY3vmte.js → use-gateway-query-7iLwemQz.js} +1 -1
- package/dist/control-ui-v2/index.html +7 -7
- package/dist/{controller-ClPKFt9H.js → controller-Bibu9RBu.js} +1 -1
- package/dist/{credentials-D8xf4kQ3.js → credentials-BzwRYS__.js} +1 -1
- package/dist/{cron-cli-BcTM_Nir.js → cron-cli-C3uwnjAJ.js} +16 -16
- package/dist/{daemon-cli-mpcai9ZB.js → daemon-cli-DhSeyb4s.js} +18 -18
- package/dist/{daemon-install-Mm9lvcvD.js → daemon-install-DCXozUs7.js} +11 -11
- package/dist/{daemon-install-helpers-D74OoyoM.js → daemon-install-helpers-CU4mnKsx.js} +2 -2
- package/dist/{delete-agent-sessions-Drf95Usu.js → delete-agent-sessions-BNaCeFyf.js} +1 -1
- package/dist/{deliver-Di5lG5OI.js → deliver-DTy7SNq9.js} +11 -11
- package/dist/{deliver-BukUfhSv.js → deliver-XZwPv99X.js} +28 -28
- package/dist/{devices-cli-DfnrI4Q4.js → devices-cli-BZzq7Fou.js} +14 -14
- package/dist/{diagnostic-B4mnFYUK.js → diagnostic-5TT45xHw.js} +4 -4
- package/dist/{diagnostic-C8nY3mdC.js → diagnostic-CeSjaots.js} +3 -3
- package/dist/{diagnostics-BzqDQMJ0.js → diagnostics-aJloMvRL.js} +1 -1
- package/dist/{directory-cli-tEju7zyL.js → directory-cli-BdfsQsAd.js} +12 -12
- package/dist/{dm-policy-shared-DuFgR_0W.js → dm-policy-shared-BZGS_0kS.js} +5 -5
- package/dist/{dns-cli-1Fm79fkk.js → dns-cli-BXbIk9ti.js} +11 -11
- package/dist/{docs-cli-PbTOsDX0.js → docs-cli-DpSAY3cX.js} +12 -12
- package/dist/{doctor-4PvP20jU.js → doctor-8FDQmndb.js} +1 -1
- package/dist/{doctor-completion-D_hqUq1a.js → doctor-completion-D3c2yROu.js} +3 -3
- package/dist/{doctor-config-flow-Cn3VGUWv.js → doctor-config-flow-DsjAW_i3.js} +12 -12
- package/dist/{enable-CoZmUN1F.js → enable-BD-5STUq.js} +2 -2
- package/dist/entry.js +2 -2
- package/dist/{errors-C-0CPtkE.js → errors-BaBvv30m.js} +1 -1
- package/dist/{exec-CP66JVDC.js → exec-DiLAfuLr.js} +3 -3
- package/dist/{exec-approvals-DEidE9cu.js → exec-approvals-BwBMqZpq.js} +2 -2
- package/dist/{exec-approvals-allowlist-D3VLWMn3.js → exec-approvals-allowlist-DeajDmQz.js} +1 -1
- package/dist/{exec-approvals-cli-CD0A7x-1.js → exec-approvals-cli-D0vutwdC.js} +23 -23
- package/dist/{exec-safe-bin-runtime-policy-DgsZVxiX.js → exec-safe-bin-runtime-policy-GyiNcLWt.js} +2 -2
- package/dist/{extension-relay-auth-C4DY3BoO.js → extension-relay-auth-Vn4eJEcQ.js} +3 -3
- package/dist/{fences-D0-yWVSH.js → fences-CISax-La.js} +16 -16
- package/dist/{fetch-guard-DVeFm4CZ.js → fetch-guard-Bnzd4qWS.js} +2 -2
- package/dist/{fetch-guard-Bx35q9u4.js → fetch-guard-CDkEddFV.js} +2 -2
- package/dist/{frontmatter-QVz_zD_W.js → frontmatter-BtfJx9Sg.js} +3 -3
- package/dist/{frontmatter-BUaSX8Fz.js → frontmatter-Bzvwr1W7.js} +3 -3
- package/dist/{fs-safe-DA9gVh9s.js → fs-safe-D8HkhuMZ.js} +3 -3
- package/dist/{fs-safe-BV3IWmYM.js → fs-safe-jXfn3Elb.js} +26 -26
- package/dist/{gateway-cli-BGDf_UXv.js → gateway-cli-lPADWps2.js} +152 -152
- package/dist/{gateway-rpc-DpYzInuu.js → gateway-rpc-DQG3hBI5.js} +3 -3
- package/dist/{globals-BVh-VW1y.js → globals-BOYJmqPO.js} +4 -4
- package/dist/{gmail-setup-utils-BUD74IWH.js → gmail-setup-utils-Db0ZWkas.js} +3 -3
- package/dist/{health-DoUNuepo.js → health-CqBDDLKJ.js} +12 -12
- package/dist/{health-format-D_7YEfOK.js → health-format-B3wM0UeC.js} +1 -1
- package/dist/{heartbeat-tick-BRGg7O46.js → heartbeat-tick-DWTPRSj2.js} +1 -1
- package/dist/{help-format-B9fBC7YQ.js → help-format-3m9GNcQp.js} +1 -1
- package/dist/{helpers-BMCu08tD.js → helpers-ByEDcAjf.js} +1 -1
- package/dist/{hooks-cli-D6KMUi8J.js → hooks-cli-CuvmA2a8.js} +90 -90
- package/dist/{hooks-status-DsJcrJdW.js → hooks-status-D42ilCFd.js} +3 -3
- package/dist/{identity-cli-hw9RP7bb.js → identity-cli-eGQmm7Uf.js} +20 -20
- package/dist/{identity-links-DGrSQOyI.js → identity-links-CMiIcgvn.js} +4 -4
- package/dist/{image-ops-oycM9vAs.js → image-ops-BT8bD5QW.js} +2 -2
- package/dist/{inspect-y-Rf7C9M.js → inspect-DHJbh1BK.js} +1 -1
- package/dist/{install-package-dir-cFGJwdjt.js → install-package-dir-atID3P53.js} +4 -4
- package/dist/{install-safe-path-BKMVgfRM.js → install-safe-path-5pN67hCN.js} +3 -3
- package/dist/{installs-BpMec9Cz.js → installs-C8HDE8ek.js} +10 -10
- package/dist/{ipv4-_5izhCOd.js → ipv4-D-LmFWW3.js} +2 -2
- package/dist/{issue-format-BcCT1LCp.js → issue-format-3AjTJZ-g.js} +1 -1
- package/dist/{jobs-BADjbSd0.js → jobs-BGleUcI-.js} +3 -3
- package/dist/{legacy-names-DpNvKeY4.js → legacy-names-BncMDG8I.js} +26 -26
- package/dist/{legacy-names-D-gFhJkB.js → legacy-names-m85yQK-H.js} +4 -4
- package/dist/{lifecycle-core-BDcQzbfM.js → lifecycle-core-lEWBgzfk.js} +8 -8
- package/dist/{links-CNDAkRQK.js → links-C3uVLgry.js} +1 -1
- package/dist/llm-slug-generator.js +31 -31
- package/dist/{log-tail-P2iIBET-.js → log-tail-BVn--aNY.js} +1 -1
- package/dist/{logging-BrtVmOug.js → logging-CasLPWvm.js} +1 -1
- package/dist/{logs-cli-DNJpQfm5.js → logs-cli-C8g9JGRK.js} +15 -15
- package/dist/{manager-qTIsRkIR.js → manager-COuC5aCY.js} +16 -16
- package/dist/{manager-ANr3eRjC.js → manager-DO4sftxl.js} +6 -6
- package/dist/{manager-Byt2W-zl.js → manager-zauhsMSz.js} +7 -7
- package/dist/{memory-cli-C-kkAcSv.js → memory-cli-C6ChdKAF.js} +15 -15
- package/dist/{model-C0zdj1IG.js → model-CY6irdbq.js} +2 -2
- package/dist/{model-catalog-D2OnT5G5.js → model-catalog-PS0jzDnI.js} +4 -4
- package/dist/{model-picker-DqmubfPT.js → model-picker-CTFCXSBm.js} +4 -4
- package/dist/{model-selection-BFwMLFJs.js → model-selection-LDnLrnn_.js} +78 -78
- package/dist/{models-CpRbKJuJ.js → models-C3BadlQJ.js} +20 -20
- package/dist/{models-cli-DZkw5Jdo.js → models-cli-nmVozi2V.js} +92 -92
- package/dist/{models-config-C3Tq7XpJ.js → models-config-QyFOywkg.js} +2 -2
- package/dist/{net-CsWibfvZ.js → net-D11xIRO3.js} +2 -2
- package/dist/{net-ZNMDyvE6.js → net-DqV0ZX0o.js} +1 -1
- package/dist/{node-cli-Cnez-SsZ.js → node-cli-S-iiWwOu.js} +37 -37
- package/dist/{node-command-policy-07YXEli2.js → node-command-policy-CgAWdzL5.js} +1 -1
- package/dist/{node-service-CAIBDHUL.js → node-service-DZ8fTOrl.js} +1 -1
- package/dist/{nodes-cli-tf4VB1mc.js → nodes-cli-BsGZc9ap.js} +22 -22
- package/dist/{nodes-screen-BeGrUDun.js → nodes-screen-CE5ExO2h.js} +4 -4
- package/dist/{note-DU3J-cLi.js → note-3jvXiQ6d.js} +2 -2
- package/dist/{npm-pack-install-LDEh8ibx.js → npm-pack-install-hlogNf3I.js} +2 -2
- package/dist/{npm-resolution-hwnRhJMY.js → npm-resolution-HrhqxZv1.js} +5 -5
- package/dist/{nudge-DO_XorIH.js → nudge-E00XAyaB.js} +9 -9
- package/dist/{nudge-BwlwOlHp.js → nudge-dYyHjBXU.js} +32 -32
- package/dist/{oauth-tls-preflight-Dml1qLXe.js → oauth-tls-preflight-JLBGc5N0.js} +1 -1
- package/dist/{onboard-Ca24xZMF.js → onboard-DlZ1BOYr.js} +11 -11
- package/dist/{onboard-channels-D9_949pz.js → onboard-channels-CgNpTkpG.js} +16 -16
- package/dist/{onboard-custom-B-Mkie4R.js → onboard-custom-DCm_Y_rq.js} +4 -4
- package/dist/{onboard-helpers-ByWR3CzW.js → onboard-helpers-DM-4vR0k.js} +8 -8
- package/dist/{onboard-hooks-BeOBPHVT.js → onboard-hooks-8Pr9LF3E.js} +8 -8
- package/dist/{onboard-remote-Bcj3rkca.js → onboard-remote-DmGboWPK.js} +5 -5
- package/dist/{onboard-skills-naWc0YmQ.js → onboard-skills-CWqQ6_nv.js} +4 -4
- package/dist/{onboarding-BGv0OTQ7.js → onboarding-DP9CpRIE.js} +18 -18
- package/dist/{onboarding.finalize-DXb_92Cl.js → onboarding.finalize-BopskbFm.js} +98 -98
- package/dist/{onboarding.gateway-config-CWPurA78.js → onboarding.gateway-config-F79AgW-W.js} +21 -21
- package/dist/{onboarding.secret-input-CWSgVFz4.js → onboarding.secret-input-Dg2d19bw.js} +1 -1
- package/dist/{openai-model-default-DqvDB0tE.js → openai-model-default-DZdYjkgw.js} +2 -2
- package/dist/{operator-commands-DucDPVYt.js → operator-commands-73Jy7Whh.js} +6 -6
- package/dist/{outbound-attachment-9K5W_qRv.js → outbound-attachment-BJKAbId_.js} +8 -8
- package/dist/{outbound-attachment-TmKpX3fK.js → outbound-attachment-BWJTBdLV.js} +9 -9
- package/dist/{outbound-send-deps-CZSYC14H.js → outbound-send-deps-DhCughCA.js} +4 -4
- package/dist/{pairing-cli-Cu9D7InY.js → pairing-cli-B_Py5VFV.js} +19 -19
- package/dist/{pairing-labels-ByiR4xag.js → pairing-labels-g02uyuXJ.js} +1 -1
- package/dist/{pairing-store-BwhC2WSm.js → pairing-store-C6blSyqu.js} +3 -3
- package/dist/{path-alias-guards-1poj6WAF.js → path-alias-guards-BQTkQXB8.js} +1 -1
- package/dist/{path-safety-DVOKipvs.js → path-safety-DiKe4sLz.js} +1 -1
- package/dist/{pi-embedded-CSaAlmuo.js → pi-embedded-BIha9wV3.js} +227 -227
- package/dist/{pi-embedded-helpers-D-rwFjbw.js → pi-embedded-helpers-D9jcApuf.js} +5 -5
- package/dist/{pi-embedded-recovery-adapter-gFm3nWut.js → pi-embedded-recovery-adapter-BwHVGYu3.js} +37 -37
- package/dist/{pi-model-discovery-BO1rPzPp.js → pi-model-discovery-Wg17i5yr.js} +7 -7
- package/dist/{pi-model-discovery-B7YaarSR.js → pi-model-discovery-qfeaBTmR.js} +1 -1
- package/dist/{pid-alive-Dp9yiDJm.js → pid-alive-CVi1kpc0.js} +1 -1
- package/dist/{plugin-auto-enable-vtMrJ3Bo.js → plugin-auto-enable-BndBdzvN.js} +4 -4
- package/dist/{plugin-owned-work-recovery-adapter-khLJn2o6.js → plugin-owned-work-recovery-adapter-CU0jgkGU.js} +9 -9
- package/dist/{plugin-registry-Bdf1V0v4.js → plugin-registry-j-zdK9Aj.js} +4 -4
- package/dist/plugin-sdk/{agent-Dpwqmur5.js → agent-BGApB_hH.js} +33 -33
- package/dist/plugin-sdk/{agent-turn-execute-B4f6kU8t.js → agent-turn-execute-CovKPB71.js} +47 -47
- package/dist/plugin-sdk/{agent-turn-runner-8-elIcKG.js → agent-turn-runner-x5EwBtiy.js} +6 -6
- package/dist/plugin-sdk/{chrome-DmrLIg1A.js → chrome-CWrDqDvu.js} +6 -6
- package/dist/plugin-sdk/{command-queue-DbyHTkqC.js → command-queue-BjQhBzl0.js} +1 -1
- package/dist/plugin-sdk/{deliver-DRb5wg9T.js → deliver-Bufpy1Nj.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-BaEfjzoG.js → diagnostic-DWsfRRMb.js} +3 -3
- package/dist/plugin-sdk/{errors-Di-1W5oL.js → errors-CU4XzshA.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-D593bO1R.js → fetch-guard-Bkz_LvY1.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-B9qlEOPl.js → fs-safe-mU6OF_le.js} +2 -2
- package/dist/plugin-sdk/{image-ops-ByQhA5AW.js → image-ops-BN9LfKcr.js} +2 -2
- package/dist/plugin-sdk/{manager-BlVhEJyV.js → manager-CHVkW_mo.js} +5 -5
- package/dist/plugin-sdk/{model-auth-BYzo7BMW.js → model-auth-A8ol0IK6.js} +6 -6
- package/dist/plugin-sdk/{models-config-Df7qxXDT.js → models-config-DwWNe4wJ.js} +2 -2
- package/dist/plugin-sdk/{nudge-8hrtI-uQ.js → nudge-DKWORgbV.js} +6 -6
- package/dist/plugin-sdk/{openai-compatible-video-CC8O8EEM.js → openai-compatible-video-zjvEDFQp.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-D5Du9kSm.js → outbound-attachment-DDNTRL0U.js} +7 -7
- package/dist/plugin-sdk/{pi-embedded-helpers-DDrF73tt.js → pi-embedded-helpers-Pj_rV8qf.js} +13 -13
- package/dist/plugin-sdk/{pi-embedded-utils-DLlaty3W.js → pi-embedded-utils-D6jztEWf.js} +3 -3
- package/dist/plugin-sdk/{pi-model-discovery-Cgvb050_.js → pi-model-discovery-D_iAcUa4.js} +1 -1
- package/dist/plugin-sdk/provider-media-understanding.js +16 -16
- package/dist/plugin-sdk/{pw-ai-BEcGp8XY.js → pw-ai-BwgzJYjo.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-DXpe_ju8.js → qmd-manager-DAFEkAMD.js} +6 -6
- package/dist/plugin-sdk/{qmd-scope-DVIoXpLl.js → qmd-scope-DJLcA3NX.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-D0qReab0.js → query-expansion-CkRCFmXy.js} +2 -2
- package/dist/plugin-sdk/{recorder-S1aQdgl5.js → recorder-Brvd3BNt.js} +2 -2
- package/dist/plugin-sdk/{redact-CcJnxu3z.js → redact-B42Dpjen.js} +1 -1
- package/dist/plugin-sdk/{reply-directives-CEvR8_X7.js → reply-directives-twMFpY3R.js} +2 -2
- package/dist/plugin-sdk/{runs-D6b6GEuq.js → runs-w3MS_VZ4.js} +7 -7
- package/dist/plugin-sdk/{send-_X4VJ-16.js → send-7QsCXN2z.js} +5 -5
- package/dist/plugin-sdk/{send-DC_wB-oy.js → send-7cDA7nYq.js} +4 -4
- package/dist/plugin-sdk/{sessions-V6UyW1ee.js → sessions-BkkGJf0L.js} +3 -3
- package/dist/plugin-sdk/{ssrf-BD-w1_r0.js → ssrf-Bul6kRmN.js} +1 -1
- package/dist/{subsystem-D1n05zOF.js → plugin-sdk/subsystem-ChbeeOSk.js} +5 -5
- package/dist/plugin-sdk/{tool-loop-detection-JyupU8MW.js → tool-loop-detection-CJDaraAN.js} +1 -1
- package/dist/plugin-sdk/{user-run-recording-BHAgBh4G.js → user-run-recording-BK8sYUEb.js} +2 -2
- package/dist/plugin-sdk/{ws-Cd1gQ37X.js → ws-zY8UZwJ_.js} +1 -1
- package/dist/{plugins-Do2VO-bb.js → plugins-50bsyRF5.js} +12 -12
- package/dist/{plugins-cli-ClCHi--i.js → plugins-cli-B7i09-Yu.js} +94 -94
- package/dist/{ports-wpTsMPMQ.js → ports-Cx-3VoKB.js} +1 -1
- package/dist/{ports-CkB6zd6B.js → ports-qsGNGnWb.js} +2 -2
- package/dist/{program-BNEbV10c.js → program-DVVCdH_Q.js} +91 -91
- package/dist/{progress-DRmPtDtg.js → progress-DLl5RtiT.js} +2 -2
- package/dist/{prompt-select-styled-CNJtUcHo.js → prompt-select-styled-kC6tnFRy.js} +39 -39
- package/dist/{prompt-style-DpZu7Rv0.js → prompt-style-C-jp54Ww.js} +1 -1
- package/dist/{provider-auth-helpers-BmlLx1lK.js → provider-auth-helpers-CoSW0VEc.js} +5 -5
- package/dist/{proxy-env-D2TojSO4.js → proxy-env-B8ko7FIe.js} +1 -1
- package/dist/{proxy-env-ieess7Mx.js → proxy-env-Cbti8B-h.js} +1 -1
- package/dist/{push-apns-B35KAhUm.js → push-apns-ouI2t6wj.js} +7 -7
- package/dist/{pw-ai-BP_oDyML.js → pw-ai-BHdnQCVz.js} +11 -11
- package/dist/{pw-ai-DBQU70P9.js → pw-ai-CXYAo13E.js} +15 -15
- package/dist/{qmd-manager-CHnF92RD.js → qmd-manager-BbwLXjLX.js} +9 -9
- package/dist/{qmd-manager-Cc8Yjnkj.js → qmd-manager-D53dwf0o.js} +11 -11
- package/dist/{qmd-scope-Bf9ewzqs.js → qmd-scope-BGPSkaGT.js} +1 -1
- package/dist/{qmd-scope-CS0DtNYO.js → qmd-scope-ZqGqqT7I.js} +1 -1
- package/dist/{qr-cli-BR65O0r3.js → qr-cli-C03g-Jln.js} +10 -10
- package/dist/{query-expansion-Bv4KqsqP.js → query-expansion-CfOEMDQH.js} +1 -1
- package/dist/{query-expansion-CRbSQ6uw.js → query-expansion-D6kYMMSG.js} +13 -13
- package/dist/{reconcile-bundled-DkR2LG6R.js → reconcile-bundled-BHSH7QIf.js} +3 -3
- package/dist/{recorder-Ln2SDZKW.js → recorder-B4tsZmjb.js} +2 -2
- package/dist/{recorder-DII7nv4x.js → recorder-CPMScZJa.js} +2 -2
- package/dist/{recovery-adapter-CyyO_Ekl.js → recovery-adapter-BJRNT8FV.js} +9 -9
- package/dist/{recovery-adapter-DOleMTp_.js → recovery-adapter-CZoZy-m9.js} +2 -2
- package/dist/{recovery-adapter-But7eE6o.js → recovery-adapter-CxLHOdbs.js} +3 -3
- package/dist/{recovery-prompt-BPdq27Tq.js → recovery-prompt-DjQfAUy6.js} +1 -1
- package/dist/{redact-CS0CgCEL.js → redact-DkgvOdb-.js} +1 -1
- package/dist/{redact-snapshot-CZVXlnxH.js → redact-snapshot-B0Hmde1v.js} +5 -5
- package/dist/{register.agent-BcT7F79Y.js → register.agent-CH14a6J3.js} +109 -109
- package/dist/register.configure-BXpFEa7d.js +152 -0
- package/dist/{register.maintenance-rxIW-tKO.js → register.maintenance-2jJXwpET.js} +111 -111
- package/dist/{register.message-BLuymT-f.js → register.message-o6R49haY.js} +86 -86
- package/dist/{register.onboard-PGgg72Sx.js → register.onboard-CYG4aJ_S.js} +26 -26
- package/dist/{register.setup-Fnakw3cB.js → register.setup-B9Mx2Csz.js} +28 -28
- package/dist/{register.status-health-sessions--aE04YLN.js → register.status-health-sessions-BdYJh1dD.js} +105 -105
- package/dist/{register.subclis-gCMZ4Bku.js → register.subclis-B8qYBt57.js} +34 -34
- package/dist/{reply-directives-DGXfbm15.js → reply-directives-C3TQE9y0.js} +49 -49
- package/dist/{reply-directives-Bzeg3um3.js → reply-directives-DL_tpnAW.js} +2 -2
- package/dist/{reset-B2CTuAPC.js → reset-CoOQ6-8Y.js} +1 -1
- package/dist/{rpc-C-oFxe45.js → rpc-gJ5XJBJ1.js} +3 -3
- package/dist/{run-main-B4g_4pz1.js → run-main-CtkFW7nv.js} +104 -104
- package/dist/{runs-KGTnMvSd.js → runs-CNSar-WP.js} +8 -8
- package/dist/{runs-HDGXsBua.js → runs-DLcRidXE.js} +6 -6
- package/dist/{runtime-CM06Vsh4.js → runtime-DQiHcfpT.js} +4 -4
- package/dist/{runtime-config-collectors-owiepuTT.js → runtime-config-collectors-CokvgXBK.js} +1 -1
- package/dist/{runtime-guard-BAkI3Ri4.js → runtime-guard-D4N1U69H.js} +1 -1
- package/dist/{sandbox-I0OArJYc.js → sandbox-CqhMEP_P.js} +15 -15
- package/dist/{sandbox-cli-Byd1iHHL.js → sandbox-cli-CJWXKmae.js} +35 -35
- package/dist/{secrets-cli-cvWxtbRr.js → secrets-cli-DEllaqgI.js} +17 -17
- package/dist/{security-cli-Dlr0WB3R.js → security-cli-CsBRazBA.js} +42 -42
- package/dist/{send-Bkdo82oz.js → send-41XrPhaV.js} +4 -4
- package/dist/{send-DVTBurfS.js → send-B3iJ8ToE.js} +5 -5
- package/dist/{send-CmECiyUu.js → send-Ch-mNnij.js} +4 -4
- package/dist/{send-C-k3_j2u.js → send-RssGHDsu.js} +4 -4
- package/dist/{server-CtKA1Cp0.js → server-BuyEF_-i.js} +23 -23
- package/dist/{server-context-Ca5AiDBb.js → server-context-Cm7u69Q7.js} +9 -9
- package/dist/{server-lifecycle-DTtM3Lhl.js → server-lifecycle-BG-u8nMU.js} +3 -3
- package/dist/{server-middleware-DDvaga1l.js → server-middleware-BizsA-re.js} +2 -2
- package/dist/{server-node-events-s5GkBDRY.js → server-node-events-C-Sm1NJJ.js} +87 -87
- package/dist/{service-BnFOyfze.js → service-Ox4QjIIv.js} +1 -1
- package/dist/{session-consumer-agents-FpCrtynZ.js → session-consumer-agents-Bjo2Pybw.js} +1 -1
- package/dist/{session-consumer-claim-sweep-Ccri2PgZ.js → session-consumer-claim-sweep-DcyQR1lf.js} +10 -10
- package/dist/{session-key-D38Dat68.js → session-key-DOpjqY4f.js} +1 -1
- package/dist/{session-storage-owner-B8-IRBP7.js → session-storage-owner-DSJotdF9.js} +8 -8
- package/dist/{session-storage-CAf99J7I.js → session-storage-sH-8KuPm.js} +7 -7
- package/dist/{session-store-targets-9oN46FBf.js → session-store-targets-BtKZ6O9-.js} +3 -3
- package/dist/{session-utils-CPdS25Fh.js → session-utils-acVEcYBx.js} +9 -9
- package/dist/{sessions-DjSoGXsL.js → sessions-B3-eoZNa.js} +6 -6
- package/dist/{sessions-CH1h_nhO.js → sessions-BoUKHlfq.js} +5 -5
- package/dist/{sessions-DoqXSqab.js → sessions-CkJwIbnD.js} +17 -17
- package/dist/{sessions-DyhCT0pp.js → sessions-WyhyMdoW.js} +5 -5
- package/dist/{sessions-claims-status-BzDkLrz5.js → sessions-claims-status-yyKjvPdI.js} +12 -12
- package/dist/{sessions-maintenance-core-Cnhlr59R.js → sessions-maintenance-core-DJHvi0-G.js} +5 -5
- package/dist/{setup-helpers-DtszvYvl.js → setup-helpers-BQv9HNqM.js} +1 -1
- package/dist/{shared-DneLSdUs.js → shared-BhyLuWyq.js} +4 -4
- package/dist/{shared-CgJjqVc_.js → shared-WARMxoiR.js} +2 -2
- package/dist/{skill-scanner-C2qUvy1A.js → skill-scanner-Dl8opLZe.js} +1 -1
- package/dist/{skills-CKjNigud.js → skills-BAtMgBiD.js} +4 -4
- package/dist/{skills-cli-DrWE30sF.js → skills-cli-BriosLsG.js} +19 -19
- package/dist/{skills-install-DYOyXyhf.js → skills-install-dlhAdjwE.js} +11 -11
- package/dist/{skills-status-CUqccvmE.js → skills-status-2pBbVUCf.js} +4 -4
- package/dist/{status-DJX7Nh9n.js → status-DWY8cs3q.js} +45 -45
- package/dist/{status.update-BjTs0tMA.js → status.update-C37l-lB3.js} +1 -1
- package/dist/{storage-config-MiCWhQ75.js → storage-config-CsGADkaH.js} +4 -4
- package/dist/{subsystem-BQlVwUGh.js → subsystem-C7-3a5Zr.js} +2 -2
- package/dist/{plugin-sdk/subsystem-BdiA7Q_t.js → subsystem-WQ4uaYQN.js} +74 -74
- package/dist/{supervisor-Tib9c0Rw.js → supervisor-CmU501hP.js} +2 -2
- package/dist/{system-cli-CE9TlrCx.js → system-cli-C5GELIKy.js} +14 -14
- package/dist/{system-run-command-CAIpFmMh.js → system-run-command-DU36hElD.js} +2 -2
- package/dist/{systemd-2lEi1s2h.js → systemd-BjNzb_4K.js} +2 -2
- package/dist/{systemd-hints-DQKdqw9A.js → systemd-hints-Ccpg4IDq.js} +3 -3
- package/dist/{systemd-linger-DUCPAGl8.js → systemd-linger-Om0p6z20.js} +2 -2
- package/dist/{table-BgEYg0Fr.js → table-aewm6YXw.js} +2 -2
- package/dist/{tailnet-Cf-zH8LX.js → tailnet-DFd-E-hz.js} +1 -1
- package/dist/{tailscale-CPYYbNsJ.js → tailscale-DAOiwlpJ.js} +2 -2
- package/dist/{task-pipeline-boot-MRo6ngzY.js → task-pipeline-boot-BYsUt1aD.js} +85 -85
- package/dist/{tasks-DlanUcxq.js → tasks-BH9BLMW5.js} +5 -5
- package/dist/{tasks-CEiohszX.js → tasks-zUDZ9WDS.js} +12 -12
- package/dist/{tool-display-BW2pVtBe.js → tool-display-gmmRfkw3.js} +1 -1
- package/dist/{tool-loop-detection-CEOjW4Zj.js → tool-loop-detection-CUWKSyGf.js} +2 -2
- package/dist/{tool-loop-detection-C0wLAXu8.js → tool-loop-detection-D_3ML-aV.js} +3 -3
- package/dist/{trash-DNn54Qs6.js → trash-ByCJFFqw.js} +3 -3
- package/dist/{tui-Df1UoEuB.js → tui-D3L5epd6.js} +9 -9
- package/dist/{tui-cli-Y-2Y0TeW.js → tui-cli-B9yGq3iI.js} +37 -37
- package/dist/{update-CmNsRKyB.js → update-BOw7sc5p.js} +3 -3
- package/dist/{update-cli-DSKMdoM3.js → update-cli-DMbakbAW.js} +120 -120
- package/dist/{update-runner-BiHwGWqV.js → update-runner-xWEkzp2Q.js} +5 -5
- package/dist/{user-run-recording-BijpJcES.js → user-run-recording-BxTnAUuI.js} +2 -2
- package/dist/{user-run-recording-DkuT1rGt.js → user-run-recording-CYg9LLHh.js} +2 -2
- package/dist/{validation-cli-exRDYYEc.js → validation-cli-CHqmdg5w.js} +84 -84
- package/dist/{web-cli-BX1XaHNZ.js → web-cli-DuQt0_V0.js} +3 -3
- package/dist/web-client/assets/{index-Cpg6_3Hi.js → index-CbKkwaEi.js} +1 -1
- package/dist/web-client/index.html +1 -1
- package/dist/{webhooks-cli-CkpR8Fzk.js → webhooks-cli-BmIhFbc4.js} +13 -13
- package/dist/{widearea-dns-DFhroEuN.js → widearea-dns-Dg8lFYi7.js} +1 -1
- package/dist/{with-timeout-DNQj_Xiv.js → with-timeout-maI6Hxh1.js} +6 -6
- package/dist/{workspace-Cl3X-aax.js → workspace-Bv2hEGNJ.js} +6 -6
- package/dist/{workspace-BmXTOUee.js → workspace-CNoka32n.js} +4 -4
- package/extensions/a2a/package.json +1 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/identity-oidc/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/kokoro/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/ui-surfaces/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/clawbot-cli-sRVUxd_s.js +0 -32
- package/dist/cli-ax3_7oZf.js +0 -147
- package/dist/control-ui-v2/assets/Badge-sUgH4suZ.js +0 -1
- package/dist/github-copilot-token-Bm6yG6tw.js +0 -106
- package/dist/paths-BIDPYPVC.js +0 -233
- package/dist/register.configure-C_6WuEbz.js +0 -152
- /package/dist/{config-1om7Pwz0.js → config-CM9p9U7m.js} +0 -0
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { $ as setConfigValueAtPath, $i as withFileLock$1, $r as stringEnum, $t as addRegisteredPluginApi, A as resolveApiKeyForProvider, Ai as isSafeExecutableValue, An as loadSessionStoreFromDisk, Ar as normalizeSessionDeliveryFields, At as BUNDLED_ENABLED_BY_DEFAULT, B as resolveProfilesUnavailableReason, Bi as getShellPathFromLoginShell, Bn as SESSION_RUN_STORE_FILE_NAME, Br as GATEWAY_CLIENT_IDS, Bt as CHAT_CHANNEL_ORDER, C as buildAssistantMessage, Ca as resolveAgentSkillsFilter, Ci as isShellWrapperExecutable, Cn as updateSessionStoreEntry, Cr as resolveAccountEntry, D as getApiKeyForModel, Da as resolveRunModelFallbacksOverride, Di as SAFE_BIN_PROFILES, Dn as prepareConfiguredSessionStorageRuntimeActivation, Dr as deliveryContextKey, Dt as loadPluginManifestRegistry, E as buildUsageWithNoCost, Ei as splitShellArgs, En as commitPreparedConfiguredSessionStorageRuntimeActivation, Er as deliveryContextFromSession, Et as validateJsonSchemaValue, F as resolveAuthProfileOrder, Fi as parseDotPath, Fn as parseSessionIndexRecordKey, Fr as isMarkdownCapableMessageChannel, Ft as resolveMemorySlotDecision, G as writeConfigFile, Gi as getRuntimeConfigSnapshot, Gr as readTaskWorkStates, Gt as normalizeChatChannelId, H as loadConfig, Hi as isTruthyEnvValue, Hn as resolveSessionFilePath, Hr as GATEWAY_CLIENT_NAMES, Ht as listChatChannels, I as getSoonestCooldownExpiry, Ii as secretRefKey, Ir as listDeliverableMessageChannels, It as discoverOpenClawPlugins, J as resetConfigOverrides, Ji as listProfilesForProvider, Jn as resolveSessionLockMaxHoldFromTimeout, Jt as getActivePluginRegistry, K as createConfigIO, Ki as applyMergePatch, Kn as resolveStorePath, Kt as resolveChannelConfigId, L as isProfileInCooldown, Li as runTasksWithConcurrency, Lr as normalizeMessageChannel, Lt as isPathInside, M as resolveModelAuthMode, Ma as resolveAgentModelPrimaryValue, Mi as describeUnknownError$1, Mn as parseDurationMs, Mr as isDeliverableMessageChannel, Mt as isBundledChannelEnabledByChannelConfig, N as resolveModelProviderConfig, Na as toAgentModelListLike, Ni as isNonEmptyString, Nn as getConfiguredSessionStorageRuntime, Nt as normalizePluginsConfig, O as getCustomProviderApiKey, Oa as resolveSessionAgentId, Oi as normalizeSafeBinProfileFixtures, On as refreshConfiguredSessionBindingEntry, Or as mergeDeliveryContext, Ot as DOCS_SITE_URL, Pi as isRecord$1, Pr as isInternalMessageChannel, Pt as resolveEffectiveEnableState, Q as parseConfigPath, Qi as resolveOpenClawAgentDir, Qn as resolveFreshSessionTotalTokens, Qr as optionalStringEnum, Qt as setActivePluginRegistry, R as markAuthProfileFailure, Ri as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Rr as resolveGatewayMessageChannel, Rt as safeStatSync, S as createOllamaStreamFn, Si as isDispatchWrapperExecutable, Sn as updateSessionStore, Sr as resolveChannelGroupToolsPolicy, T as buildStreamErrorAssistantMessage, Ta as resolveDefaultAgentId, Ti as unwrapKnownShellMultiplexerInvocation, Tn as closeReplacedConfiguredSessionStorageRuntime, Tr as normalizeChatType, Tt as listBindings, U as readConfigFileSnapshot, Ui as resolveOwnerDisplaySetting, Un as resolveSessionFilePathOptions, Ut as normalizeAnyChannelId, V as resolveApiKeyForProfile, Vi as resolveShellEnvFallbackTimeoutMs, Vr as GATEWAY_CLIENT_MODES, Vt as getChatChannelMeta, W as readConfigFileSnapshotForWrite, Wi as advanceRuntimeConfigSnapshot, Wn as resolveSessionTranscriptPath, Wr as CtxProjectionCorruptionError, Wt as normalizeChannelId$2, X as unsetConfigOverride, Xi as ensureAuthProfileStore, Xn as DEFAULT_RESET_TRIGGERS, Xr as channelTargetSchema, Y as setConfigOverride, Yi as markAuthProfileGood, Yt as getActivePluginRegistryKey, Z as getConfigValueAtPath, Zi as resolveAuthStorePathForDisplay, Zn as mergeSessionEntry, Zr as channelTargetsSchema, Zt as requireActivePluginRegistry, _i as DEFAULT_SAFE_BINS, _n as getConversationReadQuery, _r as formatCliCommand, a as isCliProvider, aa as coerceSecretRef, ai as listBufferedPluginTaskPasses, an as executePluginCommand, ar as getChannelDock, at as resolveIMessageAttachmentRoots, b as retryAsync, ba as resolveAgentDir, bi as resolveCommandResolutionFromArgv, bn as recordSessionMetaFromInbound, br as resolveChannelGroupPolicy, c as normalizeProviderId, ca as resolveSecretInputRef, ci as getTrustedSafeBinDirs, cn as registerPluginCommand, cr as getChannelPlugin, ct as parseNonNegativeByteSize, d as resolveDefaultModelForAgent, da as DEFAULT_MODEL, di as normalizeTrustedSafeBinDirs, dn as getSpeechProvider, dr as listEnabledSignalAccounts, ea as isPidAlive, ei as applyTargetToParams, en as clearRegisteredPluginApis, er as deriveSessionMetaPatch, et as unsetConfigValueAtPath, f as resolveModelRefFromString, fa as DEFAULT_PROVIDER, fi as validateSafeBinArgv, fn as isBuiltinTtsProvider, fr as resolveSignalAccount, ga as isInternalAgentSessionKey, gi as splitCommandChain, gn as createConversationReadQuery, gr as resolveWhatsAppAccount, h as resolveThinkingDefault, ha as isAgentUserFacing, hi as isWindowsPlatform, hn as StorageReadAccessError, hr as hasAnyWhatsAppAuth, i as findNormalizedProviderValue, ia as normalizeSecretInput, ii as discardBufferedPluginTaskPasses, in as clearPluginCommands, ir as normalizeStringEntries, it as mergeInboundPathRoots, j as resolveEnvApiKey, ja as resolveAgentModelFallbackValues, ji as resolveSecretRefValues, jn as readSessionUpdatedAt, jr as INTERNAL_MESSAGE_CHANNEL, jt as applyTestPluginDefaults, k as requireApiKey, ka as resolveSessionAgentIds, ki as resolveSafeBinProfiles, kn as loadSessionStore, kr as normalizeDeliveryContext, kt as docsSiteUrl, l as parseModelRef, la as splitTrailingAuthProfile, li as isTrustedSafeBinPath, ln as BUILTIN_TTS_PROVIDER_IDS, lr as listChannelPlugins, m as resolveSubagentSpawnModelSelection, ma as hasConfiguredModelFallbacks, mi as buildEnforcedShellCommand, mn as normalizeProviderId$1, mr as normalizeWhatsAppTarget, n as buildConfiguredAllowlistKeys, na as resolveAuthProfileDisplayLabel, ni as actionRequiresTarget, nn as normalizePluginHttpPath, nr as resolveParentSessionGroupId, nt as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, o as modelKey, oa as hasConfiguredSecretInput, oi as replaceBufferedPluginTaskPasses, on as listPluginCommands, or as listChannelDocks, ot as resolveIMessageRemoteAttachmentRoots, p as resolveReasoningDefault, pa as acceptsInheritedIdentity, pi as analyzeShellCommand, pn as replaceSpeechProviders, pr as isWhatsAppGroupJid, q as getConfigOverrides, qi as dedupeProfileIds, qn as acquireSessionWriteLock, qt as getActiveGatewayPluginRegistry, r as buildModelAliasIndex, rn as buildPluginHealthReport, rr as normalizeAtHashSlug, rt as isInboundPathAllowed, s as normalizeModelRef$1, sa as normalizeResolvedSecretInputString, si as RecoveryAdmissionError, sn as matchPluginCommand, sr as normalizeSignalMessagingTarget, st as normalizeScpRemoteHost, t as buildAllowedModelSet, ta as readProcessElapsedSeconds, ti as actionHasTarget, tn as createPluginRegistry, tr as resolveGroupSessionKey, tt as validateConfigObjectWithPlugins, u as resolveConfiguredModelRef, ua as DEFAULT_CONTEXT_TOKENS, ui as listWritableExplicitTrustedSafeBinDirs, un as getRegisteredSpeechProviders, ur as normalizeChannelId$1, ut as resolveExecPolicyPreset, va as listAgentIds, vi as matchAllowlist, vr as resolveCliName, w as buildAssistantMessageWithZeroUsage, wa as resolveAgentWorkspaceDir, wi as unwrapKnownDispatchWrapperInvocation, wn as closeConfiguredSessionStorageRuntime, wr as resolveConversationLabel, wt as buildChannelAccountBindings, x as OLLAMA_NATIVE_BASE_URL, xi as extractShellWrapperInlineCommand, xn as updateLastRoute, xr as resolveChannelGroupRequireMention, ya as resolveAgentConfig, yi as resolveAllowlistCandidatePath, yn as requireSessionStorageRuntime, yr as resolveIMessageAccount, z as markAuthProfileUsed, zi as VERSION, zn as SAFE_SESSION_ID_RE, zr as resolveMessageChannel } from "./model-selection-
|
|
3
|
-
import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, o as resolveGatewayPort, r as resolveConfigPath, s as resolveOAuthDir, u as expandHomePrefix } from "./paths-
|
|
4
|
-
import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, U as isSymlinkOpenError, V as isNotFoundPathError, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, ct as safeParseJson, dt as sleep$2, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$2, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-
|
|
2
|
+
import { $ as setConfigValueAtPath, $i as withFileLock$1, $r as stringEnum, $t as addRegisteredPluginApi, A as resolveApiKeyForProvider, Ai as isSafeExecutableValue, An as loadSessionStoreFromDisk, Ar as normalizeSessionDeliveryFields, At as BUNDLED_ENABLED_BY_DEFAULT, B as resolveProfilesUnavailableReason, Bi as getShellPathFromLoginShell, Bn as SESSION_RUN_STORE_FILE_NAME, Br as GATEWAY_CLIENT_IDS, Bt as CHAT_CHANNEL_ORDER, C as buildAssistantMessage, Ca as resolveAgentSkillsFilter, Ci as isShellWrapperExecutable, Cn as updateSessionStoreEntry, Cr as resolveAccountEntry, D as getApiKeyForModel, Da as resolveRunModelFallbacksOverride, Di as SAFE_BIN_PROFILES, Dn as prepareConfiguredSessionStorageRuntimeActivation, Dr as deliveryContextKey, Dt as loadPluginManifestRegistry, E as buildUsageWithNoCost, Ei as splitShellArgs, En as commitPreparedConfiguredSessionStorageRuntimeActivation, Er as deliveryContextFromSession, Et as validateJsonSchemaValue, F as resolveAuthProfileOrder, Fi as parseDotPath, Fn as parseSessionIndexRecordKey, Fr as isMarkdownCapableMessageChannel, Ft as resolveMemorySlotDecision, G as writeConfigFile, Gi as getRuntimeConfigSnapshot, Gr as readTaskWorkStates, Gt as normalizeChatChannelId, H as loadConfig, Hi as isTruthyEnvValue, Hn as resolveSessionFilePath, Hr as GATEWAY_CLIENT_NAMES, Ht as listChatChannels, I as getSoonestCooldownExpiry, Ii as secretRefKey, Ir as listDeliverableMessageChannels, It as discoverOpenClawPlugins, J as resetConfigOverrides, Ji as listProfilesForProvider, Jn as resolveSessionLockMaxHoldFromTimeout, Jt as getActivePluginRegistry, K as createConfigIO, Ki as applyMergePatch, Kn as resolveStorePath, Kt as resolveChannelConfigId, L as isProfileInCooldown, Li as runTasksWithConcurrency, Lr as normalizeMessageChannel, Lt as isPathInside, M as resolveModelAuthMode, Ma as resolveAgentModelPrimaryValue, Mi as describeUnknownError$1, Mn as parseDurationMs, Mr as isDeliverableMessageChannel, Mt as isBundledChannelEnabledByChannelConfig, N as resolveModelProviderConfig, Na as toAgentModelListLike, Ni as isNonEmptyString, Nn as getConfiguredSessionStorageRuntime, Nt as normalizePluginsConfig, O as getCustomProviderApiKey, Oa as resolveSessionAgentId, Oi as normalizeSafeBinProfileFixtures, On as refreshConfiguredSessionBindingEntry, Or as mergeDeliveryContext, Ot as DOCS_SITE_URL, Pi as isRecord$1, Pr as isInternalMessageChannel, Pt as resolveEffectiveEnableState, Q as parseConfigPath, Qi as resolveOpenClawAgentDir, Qn as resolveFreshSessionTotalTokens, Qr as optionalStringEnum, Qt as setActivePluginRegistry, R as markAuthProfileFailure, Ri as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Rr as resolveGatewayMessageChannel, Rt as safeStatSync, S as createOllamaStreamFn, Si as isDispatchWrapperExecutable, Sn as updateSessionStore, Sr as resolveChannelGroupToolsPolicy, T as buildStreamErrorAssistantMessage, Ta as resolveDefaultAgentId, Ti as unwrapKnownShellMultiplexerInvocation, Tn as closeReplacedConfiguredSessionStorageRuntime, Tr as normalizeChatType, Tt as listBindings, U as readConfigFileSnapshot, Ui as resolveOwnerDisplaySetting, Un as resolveSessionFilePathOptions, Ut as normalizeAnyChannelId, V as resolveApiKeyForProfile, Vi as resolveShellEnvFallbackTimeoutMs, Vr as GATEWAY_CLIENT_MODES, Vt as getChatChannelMeta, W as readConfigFileSnapshotForWrite, Wi as advanceRuntimeConfigSnapshot, Wn as resolveSessionTranscriptPath, Wr as CtxProjectionCorruptionError, Wt as normalizeChannelId$2, X as unsetConfigOverride, Xi as ensureAuthProfileStore, Xn as DEFAULT_RESET_TRIGGERS, Xr as channelTargetSchema, Y as setConfigOverride, Yi as markAuthProfileGood, Yt as getActivePluginRegistryKey, Z as getConfigValueAtPath, Zi as resolveAuthStorePathForDisplay, Zn as mergeSessionEntry, Zr as channelTargetsSchema, Zt as requireActivePluginRegistry, _i as DEFAULT_SAFE_BINS, _n as getConversationReadQuery, _r as formatCliCommand, a as isCliProvider, aa as coerceSecretRef, ai as listBufferedPluginTaskPasses, an as executePluginCommand, ar as getChannelDock, at as resolveIMessageAttachmentRoots, b as retryAsync, ba as resolveAgentDir, bi as resolveCommandResolutionFromArgv, bn as recordSessionMetaFromInbound, br as resolveChannelGroupPolicy, c as normalizeProviderId, ca as resolveSecretInputRef, ci as getTrustedSafeBinDirs, cn as registerPluginCommand, cr as getChannelPlugin, ct as parseNonNegativeByteSize, d as resolveDefaultModelForAgent, da as DEFAULT_MODEL, di as normalizeTrustedSafeBinDirs, dn as getSpeechProvider, dr as listEnabledSignalAccounts, ea as isPidAlive, ei as applyTargetToParams, en as clearRegisteredPluginApis, er as deriveSessionMetaPatch, et as unsetConfigValueAtPath, f as resolveModelRefFromString, fa as DEFAULT_PROVIDER, fi as validateSafeBinArgv, fn as isBuiltinTtsProvider, fr as resolveSignalAccount, ga as isInternalAgentSessionKey, gi as splitCommandChain, gn as createConversationReadQuery, gr as resolveWhatsAppAccount, h as resolveThinkingDefault, ha as isAgentUserFacing, hi as isWindowsPlatform, hn as StorageReadAccessError, hr as hasAnyWhatsAppAuth, i as findNormalizedProviderValue, ia as normalizeSecretInput, ii as discardBufferedPluginTaskPasses, in as clearPluginCommands, ir as normalizeStringEntries, it as mergeInboundPathRoots, j as resolveEnvApiKey, ja as resolveAgentModelFallbackValues, ji as resolveSecretRefValues, jn as readSessionUpdatedAt, jr as INTERNAL_MESSAGE_CHANNEL, jt as applyTestPluginDefaults, k as requireApiKey, ka as resolveSessionAgentIds, ki as resolveSafeBinProfiles, kn as loadSessionStore, kr as normalizeDeliveryContext, kt as docsSiteUrl, l as parseModelRef, la as splitTrailingAuthProfile, li as isTrustedSafeBinPath, ln as BUILTIN_TTS_PROVIDER_IDS, lr as listChannelPlugins, m as resolveSubagentSpawnModelSelection, ma as hasConfiguredModelFallbacks, mi as buildEnforcedShellCommand, mn as normalizeProviderId$1, mr as normalizeWhatsAppTarget, n as buildConfiguredAllowlistKeys, na as resolveAuthProfileDisplayLabel, ni as actionRequiresTarget, nn as normalizePluginHttpPath, nr as resolveParentSessionGroupId, nt as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, o as modelKey, oa as hasConfiguredSecretInput, oi as replaceBufferedPluginTaskPasses, on as listPluginCommands, or as listChannelDocks, ot as resolveIMessageRemoteAttachmentRoots, p as resolveReasoningDefault, pa as acceptsInheritedIdentity, pi as analyzeShellCommand, pn as replaceSpeechProviders, pr as isWhatsAppGroupJid, q as getConfigOverrides, qi as dedupeProfileIds, qn as acquireSessionWriteLock, qt as getActiveGatewayPluginRegistry, r as buildModelAliasIndex, rn as buildPluginHealthReport, rr as normalizeAtHashSlug, rt as isInboundPathAllowed, s as normalizeModelRef$1, sa as normalizeResolvedSecretInputString, si as RecoveryAdmissionError, sn as matchPluginCommand, sr as normalizeSignalMessagingTarget, st as normalizeScpRemoteHost, t as buildAllowedModelSet, ta as readProcessElapsedSeconds, ti as actionHasTarget, tn as createPluginRegistry, tr as resolveGroupSessionKey, tt as validateConfigObjectWithPlugins, u as resolveConfiguredModelRef, ua as DEFAULT_CONTEXT_TOKENS, ui as listWritableExplicitTrustedSafeBinDirs, un as getRegisteredSpeechProviders, ur as normalizeChannelId$1, ut as resolveExecPolicyPreset, va as listAgentIds, vi as matchAllowlist, vr as resolveCliName, w as buildAssistantMessageWithZeroUsage, wa as resolveAgentWorkspaceDir, wi as unwrapKnownDispatchWrapperInvocation, wn as closeConfiguredSessionStorageRuntime, wr as resolveConversationLabel, wt as buildChannelAccountBindings, x as OLLAMA_NATIVE_BASE_URL, xi as extractShellWrapperInlineCommand, xn as updateLastRoute, xr as resolveChannelGroupRequireMention, ya as resolveAgentConfig, yi as resolveAllowlistCandidatePath, yn as requireSessionStorageRuntime, yr as resolveIMessageAccount, z as markAuthProfileUsed, zi as VERSION, zn as SAFE_SESSION_ID_RE, zr as resolveMessageChannel } from "./model-selection-LDnLrnn_.js";
|
|
3
|
+
import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, o as resolveGatewayPort, r as resolveConfigPath, s as resolveOAuthDir, u as expandHomePrefix } from "./paths-B_gs59ga.js";
|
|
4
|
+
import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, U as isSymlinkOpenError, V as isNotFoundPathError, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, ct as safeParseJson, dt as sleep$2, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$2, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-WQ4uaYQN.js";
|
|
5
5
|
import { n as resolveProcessScopedMap, t as isPlainObject } from "./plain-object-Doc_YkH1.js";
|
|
6
|
-
import { $ as normalizeAccountId$1, A as DEFAULT_AGENT_ID, B as isKnownAgentMainSessionKey, C as runCommandWithTimeout, D as logError, E as logDebug, F as buildAgentPeerSessionKey, G as resolveAgentIdFromSessionKey, H as normalizeAgentId, I as classifySessionKeyShape, J as resolveThreadSessionKeys, K as resolveCanonicalIdentity, M as DEVICE_SENDER_PREFIX, O as logInfo, P as buildAgentMainSessionKey, Q as DEFAULT_ACCOUNT_ID, T as spawnWithFallback, U as normalizeMainKey, V as isValidAgentId, W as normalizeToken$1, X as sessionKeyAgentMatches, Y as sanitizeAgentId, Z as toAgentStoreSessionKey, _ as filterBootstrapFilesForSession, at as isAcpSessionKey, ct as isSubagentSessionKey, d as DEFAULT_HEARTBEAT_FILENAME, dt as stripAgentSessionKeyPrefix, et as normalizeOptionalAccountId, g as ensureAgentWorkspace, it as getSubagentDepth, j as DEFAULT_MAIN_KEY, k as logWarn, l as DEFAULT_AGENT_WORKSPACE_DIR, lt as parseAgentSessionKey, n as createInternalHookEvent, o as triggerInternalHook, ot as isCronSessionKey, q as resolveConfiguredCanonicalIdentity, rt as WAKE_GATE_SESSION_KEY_SEGMENT, s as parseBooleanValue$1, t as readManifestNamespace, u as DEFAULT_BOOTSTRAP_FILENAME, ut as resolveThreadParentSessionKey, w as runExec, x as resolveOpenClawPackageRoot, y as loadWorkspaceBootstrapFiles } from "./legacy-names-
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-
|
|
8
|
-
import { $ as resolveSandboxRuntimeStatus, A as classifyFailoverReason, At as listCoreToolIds, B as isFailoverAssistantError, Bt as isSilentReplyText, C as resolveImageSanitizationLimits, Ct as collectExplicitAllowlist, D as downgradeOpenAIReasoningBlocks, Dt as expandToolGroups, E as downgradeOpenAIFunctionCallReasoningPairs, Et as stripPluginOnlyAllowlist, F as isAuthAssistantError, Ft as resolveBootstrapTotalMaxChars, G as isTransientHttpError, H as isLikelyContextOverflowError, I as isBillingAssistantError, It as sanitizeGoogleTurnOrdering, J as sanitizeUserFacingText, K as parseImageDimensionError, L as isCloudCodeAssistFormatError, Lt as HEARTBEAT_TOKEN, M as formatBillingErrorMessage, Mt as matchesAnyGlobPattern, N as formatRawAssistantErrorForUi, Nt as buildBootstrapContextFiles, O as isGoogleModelApi, Ot as normalizeToolName, P as getApiErrorPayloadFingerprint, Pt as resolveBootstrapMaxChars, Q as resolveSandboxContext, R as isCompactionFailureError, Rt as SILENT_REPLY_TOKEN, S as sanitizeToolResultImages, St as buildPluginToolGroups, T as estimateBase64DecodedBytes, Tt as mergeAlsoAllowPolicy, U as isRateLimitAssistantError, V as isFailoverErrorMessage, Vt as stripSilentToken, W as isRawApiErrorPayload, X as isTimeoutErrorMessage, Y as isAuthPermanentErrorMessage, Z as ensureSandboxWorkspaceForSession, _t as applySkillEnvOverridesFromSnapshot, a as validateGeminiTurns, at as buildWorkspaceSkillCommandSpecs, b as sanitizeSessionMessagesImages, bt as resolveSandboxConfigForAgent, c as formatXHighModelHint, ct as resolveManagedSkillsDir, d as normalizeReasoningLevel, dt as resolvePluginSkillDirs, et as createBrowserRouteContext, f as normalizeThinkLevel, ft as assertMediaNotDataUrl, g as supportsXHighThinking, gt as applySkillEnvOverrides, h as resolveResponseUsageMode, ht as resolveSandboxedMediaSource, i as validateAnthropicTurns, it as getBridgeAuthForPort, j as formatAssistantErrorText, jt as compileGlobPatterns, k as BILLING_ERROR_USER_MESSAGE, kt as resolveToolProfilePolicy, l as listThinkingLevels, lt as resolveSkillsPromptForRun, m as normalizeVerboseLevel, mt as resolveSandboxInputPath, n as splitMediaFromOutput, nt as resolveBrowserConfig, o as pickFallbackThinkingLevel, ot as buildWorkspaceSkillSnapshot, p as normalizeUsageDisplay, pt as assertSandboxPath, q as parseImageSizeError, r as extractTextFromChatContent, rt as resolveProfile, s as formatThinkingLevels, st as loadWorkspaceSkillEntries, t as parseReplyDirectives, tt as registerBrowserRoutes, u as normalizeElevatedLevel, ut as skillsSnapshotSourceDiffers, v as isMessagingToolDuplicateNormalized, vt as ensureBrowserControlAuth, w as canonicalizeBase64, wt as expandPolicyWithPluginGroups, x as sanitizeImageBlocks, xt as applyOwnerOnlyToolPolicy, y as normalizeTextForComparison, yt as resolveBrowserControlAuth, z as isContextOverflowError, zt as isSilentReplyPrefixText } from "./reply-directives-
|
|
6
|
+
import { $ as normalizeAccountId$1, A as DEFAULT_AGENT_ID, B as isKnownAgentMainSessionKey, C as runCommandWithTimeout, D as logError, E as logDebug, F as buildAgentPeerSessionKey, G as resolveAgentIdFromSessionKey, H as normalizeAgentId, I as classifySessionKeyShape, J as resolveThreadSessionKeys, K as resolveCanonicalIdentity, M as DEVICE_SENDER_PREFIX, O as logInfo, P as buildAgentMainSessionKey, Q as DEFAULT_ACCOUNT_ID, T as spawnWithFallback, U as normalizeMainKey, V as isValidAgentId, W as normalizeToken$1, X as sessionKeyAgentMatches, Y as sanitizeAgentId, Z as toAgentStoreSessionKey, _ as filterBootstrapFilesForSession, at as isAcpSessionKey, ct as isSubagentSessionKey, d as DEFAULT_HEARTBEAT_FILENAME, dt as stripAgentSessionKeyPrefix, et as normalizeOptionalAccountId, g as ensureAgentWorkspace, it as getSubagentDepth, j as DEFAULT_MAIN_KEY, k as logWarn, l as DEFAULT_AGENT_WORKSPACE_DIR, lt as parseAgentSessionKey, n as createInternalHookEvent, o as triggerInternalHook, ot as isCronSessionKey, q as resolveConfiguredCanonicalIdentity, rt as WAKE_GATE_SESSION_KEY_SEGMENT, s as parseBooleanValue$1, t as readManifestNamespace, u as DEFAULT_BOOTSTRAP_FILENAME, ut as resolveThreadParentSessionKey, w as runExec, x as resolveOpenClawPackageRoot, y as loadWorkspaceBootstrapFiles } from "./legacy-names-BncMDG8I.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-C-29TbW-.js";
|
|
8
|
+
import { $ as resolveSandboxRuntimeStatus, A as classifyFailoverReason, At as listCoreToolIds, B as isFailoverAssistantError, Bt as isSilentReplyText, C as resolveImageSanitizationLimits, Ct as collectExplicitAllowlist, D as downgradeOpenAIReasoningBlocks, Dt as expandToolGroups, E as downgradeOpenAIFunctionCallReasoningPairs, Et as stripPluginOnlyAllowlist, F as isAuthAssistantError, Ft as resolveBootstrapTotalMaxChars, G as isTransientHttpError, H as isLikelyContextOverflowError, I as isBillingAssistantError, It as sanitizeGoogleTurnOrdering, J as sanitizeUserFacingText, K as parseImageDimensionError, L as isCloudCodeAssistFormatError, Lt as HEARTBEAT_TOKEN, M as formatBillingErrorMessage, Mt as matchesAnyGlobPattern, N as formatRawAssistantErrorForUi, Nt as buildBootstrapContextFiles, O as isGoogleModelApi, Ot as normalizeToolName, P as getApiErrorPayloadFingerprint, Pt as resolveBootstrapMaxChars, Q as resolveSandboxContext, R as isCompactionFailureError, Rt as SILENT_REPLY_TOKEN, S as sanitizeToolResultImages, St as buildPluginToolGroups, T as estimateBase64DecodedBytes, Tt as mergeAlsoAllowPolicy, U as isRateLimitAssistantError, V as isFailoverErrorMessage, Vt as stripSilentToken, W as isRawApiErrorPayload, X as isTimeoutErrorMessage, Y as isAuthPermanentErrorMessage, Z as ensureSandboxWorkspaceForSession, _t as applySkillEnvOverridesFromSnapshot, a as validateGeminiTurns, at as buildWorkspaceSkillCommandSpecs, b as sanitizeSessionMessagesImages, bt as resolveSandboxConfigForAgent, c as formatXHighModelHint, ct as resolveManagedSkillsDir, d as normalizeReasoningLevel, dt as resolvePluginSkillDirs, et as createBrowserRouteContext, f as normalizeThinkLevel, ft as assertMediaNotDataUrl, g as supportsXHighThinking, gt as applySkillEnvOverrides, h as resolveResponseUsageMode, ht as resolveSandboxedMediaSource, i as validateAnthropicTurns, it as getBridgeAuthForPort, j as formatAssistantErrorText, jt as compileGlobPatterns, k as BILLING_ERROR_USER_MESSAGE, kt as resolveToolProfilePolicy, l as listThinkingLevels, lt as resolveSkillsPromptForRun, m as normalizeVerboseLevel, mt as resolveSandboxInputPath, n as splitMediaFromOutput, nt as resolveBrowserConfig, o as pickFallbackThinkingLevel, ot as buildWorkspaceSkillSnapshot, p as normalizeUsageDisplay, pt as assertSandboxPath, q as parseImageSizeError, r as extractTextFromChatContent, rt as resolveProfile, s as formatThinkingLevels, st as loadWorkspaceSkillEntries, t as parseReplyDirectives, tt as registerBrowserRoutes, u as normalizeElevatedLevel, ut as skillsSnapshotSourceDiffers, v as isMessagingToolDuplicateNormalized, vt as ensureBrowserControlAuth, w as canonicalizeBase64, wt as expandPolicyWithPluginGroups, x as sanitizeImageBlocks, xt as applyOwnerOnlyToolPolicy, y as normalizeTextForComparison, yt as resolveBrowserControlAuth, z as isContextOverflowError, zt as isSilentReplyPrefixText } from "./reply-directives-C3TQE9y0.js";
|
|
9
9
|
import { n as isDiagnosticsEnabled, t as emitDiagnosticEvent } from "./diagnostic-events-RfJYFlJM.js";
|
|
10
|
-
import { $ as buildInboundMetaSystemPrompt, A as evaluateSessionFreshness, At as openRawToolResultStash, B as isSessionArchiveArtifactName, Bt as getGlobalHookRunner, C as normalizeHttpWebhookUrl, Ct as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, D as SESSION_RUN_CONTEXT_MAX_NAMES, Dt as getToolResultText$1, E as parseAbsoluteTimeMs, Et as estimateMessageCharsCached, F as canonicalizeMainSessionAlias, Ft as canonicalToolCallIdBase, Gt as createCurrentUserPromptEnvelope, Ht as initializeGlobalHookRunner, I as resolveAgentMainSessionKey, It as sanitizeToolCallIdsForCloudCodeAssist, J as runSerializedBySession, Jt as buildPluginRuntimeIdentity, K as trimToUndefined, Kt as mergePromptContributions, M as resolveSessionResetPolicy, Mt as sanitizeToolCallInputs, N as resolveSessionResetType, Nt as sanitizeToolUseResultPairing, Ot as isToolResultMessage, P as resolveThreadFlag, Pt as stripToolResultDetails, Q as sha256, R as resolveMainSessionKey, Rt as hasInterSessionUserProvenance, S as inferLegacyName, St as CHARS_PER_TOKEN_ESTIMATE$2, T as resolveDefaultCronStaggerMs, Tt as estimateContextChars$1, U as writeJsonAtomic, Ut as hasHookForPlugin, V as createAsyncLock, Vt as getGlobalPluginRegistry, W as resolveGatewayCredentialsFromConfig, Wt as promptBuildResultToContribution, X as extractLegacyTranscriptEntryFields, Xt as resolveProviderPromptCacheKey, Y as drainPendingPrimaryWrites, Yt as buildPluginTurnIdentity, Z as sanitizeJsonb, Zt as resolveProviderRuntimeIdentity, _ as derivePromptTokens, _t as sessionLikelyHasOversizedToolResults, a as resolveMirroredTranscriptText, at as messageTime, b as makeZeroUsageSnapshot, bt as truncateTextHeadTail, c as createSessionStorageRuntimeFromConfig, ct as formatZonedTimestamp, d as buildEqualityProjection, dt as DB_SESSION_HYDRATION_LIMIT, et as collectInboundUserContext, ft as eventOrder, g as sanitizeAppendEntry, gt as HARD_MAX_TOOL_RESULT_CHARS, h as CREATE_CTX_STORAGE_OWNER_SQL, ht as capToolResultContent, i as appendAssistantMessageToSessionTranscript, it as isRepresentableEpochMs, j as resolveChannelResetConfig, jt as repairToolUseResultPairing, k as resolveSessionKey, kt as guardSessionManager, l as resolveSessionStorageConfig, lt as resolveTimezone, m as deriveLegacyActorIdentity, mt as HIDDEN_HEARTBEAT_CUSTOM_TYPE, n as parseSessionThreadInfo, nt as attachMessageIngress, o as parseInlineDirectives$1, ot as stripMessageCarriers, pt as pickLeaf, q as openDbSessionManager, qt as toJsonValue$1, r as resolveAndPersistSessionFile, rt as getMessageIngress, s as attachPgPoolErrorListeners, st as formatMessageStamp, t as extractDeliveryInfo, tt as renderInboundUserContext, u as validateCtxStorage, ut as resolveSenderLabel, v as deriveSessionTotalTokens, vt as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, w as normalizeCronStaggerMs, wt as createMessageCharEstimateCache, x as normalizeUsage, xt as truncateToolResultToChars, y as hasNonzeroUsage, yt as TOOL_RESULT_TEXT_WEIGHT, z as isPrimarySessionTranscriptFileName, zt as normalizeInputProvenance } from "./sessions-
|
|
10
|
+
import { $ as buildInboundMetaSystemPrompt, A as evaluateSessionFreshness, At as openRawToolResultStash, B as isSessionArchiveArtifactName, Bt as getGlobalHookRunner, C as normalizeHttpWebhookUrl, Ct as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, D as SESSION_RUN_CONTEXT_MAX_NAMES, Dt as getToolResultText$1, E as parseAbsoluteTimeMs, Et as estimateMessageCharsCached, F as canonicalizeMainSessionAlias, Ft as canonicalToolCallIdBase, Gt as createCurrentUserPromptEnvelope, Ht as initializeGlobalHookRunner, I as resolveAgentMainSessionKey, It as sanitizeToolCallIdsForCloudCodeAssist, J as runSerializedBySession, Jt as buildPluginRuntimeIdentity, K as trimToUndefined, Kt as mergePromptContributions, M as resolveSessionResetPolicy, Mt as sanitizeToolCallInputs, N as resolveSessionResetType, Nt as sanitizeToolUseResultPairing, Ot as isToolResultMessage, P as resolveThreadFlag, Pt as stripToolResultDetails, Q as sha256, R as resolveMainSessionKey, Rt as hasInterSessionUserProvenance, S as inferLegacyName, St as CHARS_PER_TOKEN_ESTIMATE$2, T as resolveDefaultCronStaggerMs, Tt as estimateContextChars$1, U as writeJsonAtomic, Ut as hasHookForPlugin, V as createAsyncLock, Vt as getGlobalPluginRegistry, W as resolveGatewayCredentialsFromConfig, Wt as promptBuildResultToContribution, X as extractLegacyTranscriptEntryFields, Xt as resolveProviderPromptCacheKey, Y as drainPendingPrimaryWrites, Yt as buildPluginTurnIdentity, Z as sanitizeJsonb, Zt as resolveProviderRuntimeIdentity, _ as derivePromptTokens, _t as sessionLikelyHasOversizedToolResults, a as resolveMirroredTranscriptText, at as messageTime, b as makeZeroUsageSnapshot, bt as truncateTextHeadTail, c as createSessionStorageRuntimeFromConfig, ct as formatZonedTimestamp, d as buildEqualityProjection, dt as DB_SESSION_HYDRATION_LIMIT, et as collectInboundUserContext, ft as eventOrder, g as sanitizeAppendEntry, gt as HARD_MAX_TOOL_RESULT_CHARS, h as CREATE_CTX_STORAGE_OWNER_SQL, ht as capToolResultContent, i as appendAssistantMessageToSessionTranscript, it as isRepresentableEpochMs, j as resolveChannelResetConfig, jt as repairToolUseResultPairing, k as resolveSessionKey, kt as guardSessionManager, l as resolveSessionStorageConfig, lt as resolveTimezone, m as deriveLegacyActorIdentity, mt as HIDDEN_HEARTBEAT_CUSTOM_TYPE, n as parseSessionThreadInfo, nt as attachMessageIngress, o as parseInlineDirectives$1, ot as stripMessageCarriers, pt as pickLeaf, q as openDbSessionManager, qt as toJsonValue$1, r as resolveAndPersistSessionFile, rt as getMessageIngress, s as attachPgPoolErrorListeners, st as formatMessageStamp, t as extractDeliveryInfo, tt as renderInboundUserContext, u as validateCtxStorage, ut as resolveSenderLabel, v as deriveSessionTotalTokens, vt as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, w as normalizeCronStaggerMs, wt as createMessageCharEstimateCache, x as normalizeUsage, xt as truncateToolResultToChars, y as hasNonzeroUsage, yt as TOOL_RESULT_TEXT_WEIGHT, z as isPrimarySessionTranscriptFileName, zt as normalizeInputProvenance } from "./sessions-WyhyMdoW.js";
|
|
11
11
|
import { n as onSessionTranscriptUpdate } from "./transcript-events-k21fdARq.js";
|
|
12
12
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CSsVRTTy.js";
|
|
13
|
-
import { _ as recordSystemPromptHashComparison, b as recordCommandPoll, d as logRunCompleted, f as logRunStarted, g as logToolExecutionStarted, h as logToolExecutionCompleted, l as logModelCallError, m as logToolExecutionBlocked, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, v as refreshRunProgress, x as resetCommandPollCount, y as boundDiagnosticContent } from "./diagnostic-
|
|
13
|
+
import { _ as recordSystemPromptHashComparison, b as recordCommandPoll, d as logRunCompleted, f as logRunStarted, g as logToolExecutionStarted, h as logToolExecutionCompleted, l as logModelCallError, m as logToolExecutionBlocked, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, v as refreshRunProgress, x as resetCommandPollCount, y as boundDiagnosticContent } from "./diagnostic-CeSjaots.js";
|
|
14
14
|
import { o as redactChannelCorrelation, r as getDiagnosticSessionState } from "./diagnostic-session-state-Di8oqY0E.js";
|
|
15
15
|
import { t as redactIdentifier } from "./redact-identifier-bNChjxxW.js";
|
|
16
|
-
import { t as redactSensitiveText } from "./redact-
|
|
16
|
+
import { t as redactSensitiveText } from "./redact-DkgvOdb-.js";
|
|
17
17
|
import { t as CommandLane } from "./lanes-D1Q3LLIs.js";
|
|
18
|
-
import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-
|
|
19
|
-
import { S as MAX_IMAGE_BYTES, _ as getFileExtension, b as kindFromMime, d as MEDIA_MAX_BYTES, g as extensionForMime, h as detectMime, m as saveMediaBuffer, n as isSafeFenceBreak, p as getMediaDir, r as parseFenceSpans, s as getImageMetadata, t as findFenceSpanAt, u as resizeToJpeg, v as imageMimeFromFormat, w as mediaKindFromMime, x as normalizeMimeType$1, y as isAudioFileName } from "./fences-
|
|
20
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
21
|
-
import { i as rawDataToString, n as isLoopbackHost } from "./net-
|
|
22
|
-
import { A as transcriptEntriesToMessages, B as resolveReplyToMode, C as extractToolCallNames, D as sleepWithAbort, E as computeBackoff, F as filterMessagingToolMediaDuplicates, G as resolveOutboundSessionId, H as normalizeChannelTargetInput, I as isRenderablePayload, J as resolveTeamRoster, K as ensureOpenClawModelsJson, L as shouldSuppressMessagingToolReplies, M as applyReplyTagsToPayload, N as applyReplyThreading, P as filterMessagingToolDuplicates, R as shouldSuppressReasoningPayload, S as countToolResults, T as resolveContextTokensForModel, U as normalizeTargetForProvider, V as buildTargetResolverSignature, W as buildOutboundSessionContext, _ as loadCombinedSessionStoreForGateway, b as throwIfAborted$1, c as createMessageSentEmitter, d as toInternalMessageReceivedContext, f as toInternalMessageTranscribedContext, g as stampReplyActivity, h as fireAndForgetHook, j as stripLeadingInboundMetadata, k as readFullTranscriptEntriesFromBackend, l as deriveInboundMessageHookContext, m as toPluginMessageReceivedEvent, o as normalizeReplyPayloadsForDelivery, p as toPluginMessageContext, q as resolveLedTeam, s as applyMessageSendingHook, t as deliverOutboundPayloads, u as toInternalMessagePreprocessedContext, v as capArrayByJsonBytes, w as lookupContextTokens, x as loadChannelOutboundAdapter, y as jsonUtf8Bytes, z as createReplyToModeFilterForChannel } from "./deliver-
|
|
23
|
-
import { B as DEFAULT_AI_SNAPSHOT_MAX_CHARS, C as ensureChromeExtensionRelayServer, M as DEFAULT_UPLOAD_DIR, N as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-
|
|
24
|
-
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, l as PATH_ALIAS_POLICIES, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-
|
|
25
|
-
import { i as hasErrnoCode, o as readErrorName, r as formatErrorMessage } from "./errors-
|
|
26
|
-
import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-
|
|
18
|
+
import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-DCuGQ6oE.js";
|
|
19
|
+
import { S as MAX_IMAGE_BYTES, _ as getFileExtension, b as kindFromMime, d as MEDIA_MAX_BYTES, g as extensionForMime, h as detectMime, m as saveMediaBuffer, n as isSafeFenceBreak, p as getMediaDir, r as parseFenceSpans, s as getImageMetadata, t as findFenceSpanAt, u as resizeToJpeg, v as imageMimeFromFormat, w as mediaKindFromMime, x as normalizeMimeType$1, y as isAudioFileName } from "./fences-CISax-La.js";
|
|
20
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Wg17i5yr.js";
|
|
21
|
+
import { i as rawDataToString, n as isLoopbackHost } from "./net-DqV0ZX0o.js";
|
|
22
|
+
import { A as transcriptEntriesToMessages, B as resolveReplyToMode, C as extractToolCallNames, D as sleepWithAbort, E as computeBackoff, F as filterMessagingToolMediaDuplicates, G as resolveOutboundSessionId, H as normalizeChannelTargetInput, I as isRenderablePayload, J as resolveTeamRoster, K as ensureOpenClawModelsJson, L as shouldSuppressMessagingToolReplies, M as applyReplyTagsToPayload, N as applyReplyThreading, P as filterMessagingToolDuplicates, R as shouldSuppressReasoningPayload, S as countToolResults, T as resolveContextTokensForModel, U as normalizeTargetForProvider, V as buildTargetResolverSignature, W as buildOutboundSessionContext, _ as loadCombinedSessionStoreForGateway, b as throwIfAborted$1, c as createMessageSentEmitter, d as toInternalMessageReceivedContext, f as toInternalMessageTranscribedContext, g as stampReplyActivity, h as fireAndForgetHook, j as stripLeadingInboundMetadata, k as readFullTranscriptEntriesFromBackend, l as deriveInboundMessageHookContext, m as toPluginMessageReceivedEvent, o as normalizeReplyPayloadsForDelivery, p as toPluginMessageContext, q as resolveLedTeam, s as applyMessageSendingHook, t as deliverOutboundPayloads, u as toInternalMessagePreprocessedContext, v as capArrayByJsonBytes, w as lookupContextTokens, x as loadChannelOutboundAdapter, y as jsonUtf8Bytes, z as createReplyToModeFilterForChannel } from "./deliver-XZwPv99X.js";
|
|
23
|
+
import { B as DEFAULT_AI_SNAPSHOT_MAX_CHARS, C as ensureChromeExtensionRelayServer, M as DEFAULT_UPLOAD_DIR, N as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-cV7G42a8.js";
|
|
24
|
+
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, l as PATH_ALIAS_POLICIES, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-jXfn3Elb.js";
|
|
25
|
+
import { i as hasErrnoCode, o as readErrorName, r as formatErrorMessage } from "./errors-BaBvv30m.js";
|
|
26
|
+
import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-Cbti8B-h.js";
|
|
27
27
|
import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-CIKAlvUL.js";
|
|
28
|
-
import { A as issueDeviceBootstrapToken, C as callGatewayLeastPrivilege, D as gatewayErrorShapeOf, E as gatewayErrorReason, O as validateSecretsResolveResult, S as callGateway, T as resolveLeastPrivilegeOperatorScopesForMethod, _ as resolveSessionReference, a as buildAgentToAgentReplyContext, b as clearActiveCoordinationDepth, c as resolvePingPongTurns, d as createSessionVisibilityGuard, f as resolveEffectiveSessionToolsVisibility, g as resolveMainSessionAlias, h as resolveInternalSessionKey, i as buildAgentToAgentMessageContext, k as SESSION_LABEL_MAX_LENGTH, l as AuthorizationError, m as resolveDisplaySessionKey, n as requestAuthorizedNudge, o as isAnnounceSkip, p as resolveSandboxedSessionToolContext, r as buildAgentToAgentAnnounceContext, s as isReplySkip, u as createAgentToAgentPolicy, v as resolveVisibleSessionReference, w as randomIdempotencyKey, x as setActiveCoordinationDepth, y as shouldResolveSessionIdInput } from "./nudge-
|
|
29
|
-
import { A as formatToolSummary, C as extractAssistantThinking, D as stripDowngradedToolCallText, E as isAssistantMessage, M as stripReasoningTagsFromText, O as stripMinimaxToolCallXml, S as extractAssistantText$1, T as inferToolMetaFromArgs, _ as createInlineCodeState, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as buildCodeSpanIndex, h as emitEmbeddedAgentEvent, i as endInFlightEmbeddedAttempt, j as resolveToolDisplay, k as stripThinkingTagsFromText, l as setActiveEmbeddedRun, m as endModelCall, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, w as formatReasoningMessage, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-
|
|
30
|
-
import { C as getDefaultMediaLocalRoots, S as getAgentScopedMediaLocalRoots, _ as resolveChunkNewlinePacking, a as resolveMarkdownTableMode, b as fetchRemoteMedia, c as loadWebMediaRaw, d as chunkMarkdownText, f as chunkMarkdownTextWithMode, g as resolveChunkMode, h as resolveChunkDelivery, l as chunkByNewline, m as chunkTextWithMode, o as getDefaultLocalRoots, p as chunkText, s as loadWebMedia, v as resolveTextChunkLimit, x as readResponseWithLimit, y as MediaFetchError } from "./outbound-attachment-
|
|
31
|
-
import { a as bindAbortRelay, i as resolveProxyFetchFromEnv, n as withStrictGuardedFetchMode, o as fetchWithTimeout, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
32
|
-
import { i as executeWithApiKeyRotation, n as resolveMemorySearchConfig, r as collectProviderApiKeysForExecution } from "./manager-
|
|
33
|
-
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-
|
|
34
|
-
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-
|
|
35
|
-
import { c as enqueueAgentTurn, d as peekDelayedAgentTurn, f as setDelayedReleaseHold, i as AGENT_TURN_TOPIC, l as isClaimableAgentTurnWorkId, m as KeyedAsyncQueue, p as WORKSPACE_LANE_DENIED_REASON, r as tryGetAgentTurnRuntime, s as clearDelayedReleaseHold, u as mergeDelayedAgentTurn } from "./agent-turn-runner-
|
|
36
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal, u as resolveFetch } from "./send-
|
|
37
|
-
import { a as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, c as normalizeIMessageHandle, i as createIMessageRpcClient, l as parseIMessageTarget, o as formatIMessageChatTarget, r as convertMarkdownTables, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-
|
|
38
|
-
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-
|
|
39
|
-
import { t as isQmdScopeAllowed } from "./qmd-scope-
|
|
28
|
+
import { A as issueDeviceBootstrapToken, C as callGatewayLeastPrivilege, D as gatewayErrorShapeOf, E as gatewayErrorReason, O as validateSecretsResolveResult, S as callGateway, T as resolveLeastPrivilegeOperatorScopesForMethod, _ as resolveSessionReference, a as buildAgentToAgentReplyContext, b as clearActiveCoordinationDepth, c as resolvePingPongTurns, d as createSessionVisibilityGuard, f as resolveEffectiveSessionToolsVisibility, g as resolveMainSessionAlias, h as resolveInternalSessionKey, i as buildAgentToAgentMessageContext, k as SESSION_LABEL_MAX_LENGTH, l as AuthorizationError, m as resolveDisplaySessionKey, n as requestAuthorizedNudge, o as isAnnounceSkip, p as resolveSandboxedSessionToolContext, r as buildAgentToAgentAnnounceContext, s as isReplySkip, u as createAgentToAgentPolicy, v as resolveVisibleSessionReference, w as randomIdempotencyKey, x as setActiveCoordinationDepth, y as shouldResolveSessionIdInput } from "./nudge-dYyHjBXU.js";
|
|
29
|
+
import { A as formatToolSummary, C as extractAssistantThinking, D as stripDowngradedToolCallText, E as isAssistantMessage, M as stripReasoningTagsFromText, O as stripMinimaxToolCallXml, S as extractAssistantText$1, T as inferToolMetaFromArgs, _ as createInlineCodeState, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as buildCodeSpanIndex, h as emitEmbeddedAgentEvent, i as endInFlightEmbeddedAttempt, j as resolveToolDisplay, k as stripThinkingTagsFromText, l as setActiveEmbeddedRun, m as endModelCall, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, w as formatReasoningMessage, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-CNSar-WP.js";
|
|
30
|
+
import { C as getDefaultMediaLocalRoots, S as getAgentScopedMediaLocalRoots, _ as resolveChunkNewlinePacking, a as resolveMarkdownTableMode, b as fetchRemoteMedia, c as loadWebMediaRaw, d as chunkMarkdownText, f as chunkMarkdownTextWithMode, g as resolveChunkMode, h as resolveChunkDelivery, l as chunkByNewline, m as chunkTextWithMode, o as getDefaultLocalRoots, p as chunkText, s as loadWebMedia, v as resolveTextChunkLimit, x as readResponseWithLimit, y as MediaFetchError } from "./outbound-attachment-BWJTBdLV.js";
|
|
31
|
+
import { a as bindAbortRelay, i as resolveProxyFetchFromEnv, n as withStrictGuardedFetchMode, o as fetchWithTimeout, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-CDkEddFV.js";
|
|
32
|
+
import { i as executeWithApiKeyRotation, n as resolveMemorySearchConfig, r as collectProviderApiKeysForExecution } from "./manager-COuC5aCY.js";
|
|
33
|
+
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-CYg9LLHh.js";
|
|
34
|
+
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-CPMScZJa.js";
|
|
35
|
+
import { c as enqueueAgentTurn, d as peekDelayedAgentTurn, f as setDelayedReleaseHold, i as AGENT_TURN_TOPIC, l as isClaimableAgentTurnWorkId, m as KeyedAsyncQueue, p as WORKSPACE_LANE_DENIED_REASON, r as tryGetAgentTurnRuntime, s as clearDelayedReleaseHold, u as mergeDelayedAgentTurn } from "./agent-turn-runner-zXi4ADUq.js";
|
|
36
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal, u as resolveFetch } from "./send-B3iJ8ToE.js";
|
|
37
|
+
import { a as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, c as normalizeIMessageHandle, i as createIMessageRpcClient, l as parseIMessageTarget, o as formatIMessageChatTarget, r as convertMarkdownTables, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-RssGHDsu.js";
|
|
38
|
+
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-D6kYMMSG.js";
|
|
39
|
+
import { t as isQmdScopeAllowed } from "./qmd-scope-BGPSkaGT.js";
|
|
40
40
|
import { createRequire } from "node:module";
|
|
41
41
|
import * as path$1 from "node:path";
|
|
42
42
|
import path, { basename, isAbsolute, join } from "node:path";
|
|
43
|
-
import
|
|
43
|
+
import syncFs, { constants, createWriteStream, existsSync, mkdirSync, mkdtempSync, promises, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
44
44
|
import os, { homedir } from "node:os";
|
|
45
45
|
import json5 from "json5";
|
|
46
|
-
import * as fs$
|
|
47
|
-
import fs
|
|
46
|
+
import * as fs$1 from "node:fs/promises";
|
|
47
|
+
import fs, { open } from "node:fs/promises";
|
|
48
48
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
49
49
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
50
50
|
import process$1 from "node:process";
|
|
@@ -55,7 +55,7 @@ import { z } from "zod";
|
|
|
55
55
|
import { complete, completeSimple, createAssistantMessageEventStream, streamSimple } from "@earendil-works/pi-ai";
|
|
56
56
|
import { DefaultResourceLoader, SessionManager, SettingsManager, convertToLlm, createAgentSession, createCodingTools, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, serializeConversation } from "@earendil-works/pi-coding-agent";
|
|
57
57
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
58
|
-
import WebSocket
|
|
58
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
59
59
|
import MarkdownIt from "markdown-it";
|
|
60
60
|
import net from "node:net";
|
|
61
61
|
import { Worker } from "node:worker_threads";
|
|
@@ -1267,7 +1267,7 @@ var EdgeTTS = class {
|
|
|
1267
1267
|
this.timeout = timeout;
|
|
1268
1268
|
}
|
|
1269
1269
|
async connectWebSocket() {
|
|
1270
|
-
const wsConnect = new WebSocket(buildWssUrl(randomBytes(16).toString("hex")), {
|
|
1270
|
+
const wsConnect = new WebSocket$1(buildWssUrl(randomBytes(16).toString("hex")), {
|
|
1271
1271
|
headers: headersWithMuid(WSS_HEADERS),
|
|
1272
1272
|
perMessageDeflate: true,
|
|
1273
1273
|
handshakeTimeout: this.timeout,
|
|
@@ -3298,7 +3298,7 @@ function setPromptSourceCacheEntry(key, entry) {
|
|
|
3298
3298
|
}
|
|
3299
3299
|
function readOpenFileUtf8(fd) {
|
|
3300
3300
|
return new Promise((resolve, reject) => {
|
|
3301
|
-
|
|
3301
|
+
syncFs.readFile(fd, "utf-8", (error, data) => {
|
|
3302
3302
|
if (error) {
|
|
3303
3303
|
reject(error);
|
|
3304
3304
|
return;
|
|
@@ -3309,7 +3309,7 @@ function readOpenFileUtf8(fd) {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
function closeOpenFile(fd) {
|
|
3311
3311
|
return new Promise((resolve, reject) => {
|
|
3312
|
-
|
|
3312
|
+
syncFs.close(fd, (error) => {
|
|
3313
3313
|
if (error) {
|
|
3314
3314
|
reject(error);
|
|
3315
3315
|
return;
|
|
@@ -3718,7 +3718,7 @@ function resolveWorkspaceLane(params) {
|
|
|
3718
3718
|
}
|
|
3719
3719
|
async function pathExists(targetPath) {
|
|
3720
3720
|
try {
|
|
3721
|
-
await fs
|
|
3721
|
+
await fs.access(targetPath);
|
|
3722
3722
|
return true;
|
|
3723
3723
|
} catch {
|
|
3724
3724
|
return false;
|
|
@@ -3726,7 +3726,7 @@ async function pathExists(targetPath) {
|
|
|
3726
3726
|
}
|
|
3727
3727
|
async function getExistingPathState(targetPath) {
|
|
3728
3728
|
try {
|
|
3729
|
-
const stats = await fs
|
|
3729
|
+
const stats = await fs.lstat(targetPath);
|
|
3730
3730
|
if (stats.isSymbolicLink()) return "other";
|
|
3731
3731
|
return stats.isDirectory() ? "directory" : "other";
|
|
3732
3732
|
} catch {
|
|
@@ -3735,7 +3735,7 @@ async function getExistingPathState(targetPath) {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
async function pathLexicallyExists(targetPath) {
|
|
3737
3737
|
try {
|
|
3738
|
-
await fs
|
|
3738
|
+
await fs.lstat(targetPath);
|
|
3739
3739
|
return true;
|
|
3740
3740
|
} catch {
|
|
3741
3741
|
return false;
|
|
@@ -3756,9 +3756,9 @@ async function copyIfMissing(params) {
|
|
|
3756
3756
|
if (!opened.ok) return opened.reason === "path" ? "missing-source" : "invalid";
|
|
3757
3757
|
let content;
|
|
3758
3758
|
try {
|
|
3759
|
-
content =
|
|
3759
|
+
content = syncFs.readFileSync(opened.fd);
|
|
3760
3760
|
} finally {
|
|
3761
|
-
|
|
3761
|
+
syncFs.closeSync(opened.fd);
|
|
3762
3762
|
}
|
|
3763
3763
|
await writeFileWithinRoot({
|
|
3764
3764
|
rootDir: params.targetRoot,
|
|
@@ -3800,9 +3800,9 @@ async function resolveWorkspaceLaneForTurn(params) {
|
|
|
3800
3800
|
const existed = pathState === "directory";
|
|
3801
3801
|
if (!existed) {
|
|
3802
3802
|
const parentDir = path.dirname(resolution.effectiveWorkspaceDir);
|
|
3803
|
-
await fs
|
|
3803
|
+
await fs.mkdir(parentDir, { recursive: true });
|
|
3804
3804
|
const tempDir = path.join(parentDir, `.${path.basename(resolution.effectiveWorkspaceDir)}.creating-${randomUUID()}`);
|
|
3805
|
-
await fs
|
|
3805
|
+
await fs.mkdir(tempDir);
|
|
3806
3806
|
try {
|
|
3807
3807
|
for (const file of config?.copiedOnCreate ?? DEFAULT_COPIED_ON_CREATE_FILES) {
|
|
3808
3808
|
const decision = await copyIfMissing({
|
|
@@ -3818,7 +3818,7 @@ async function resolveWorkspaceLaneForTurn(params) {
|
|
|
3818
3818
|
decision
|
|
3819
3819
|
});
|
|
3820
3820
|
}
|
|
3821
|
-
if (!await fs
|
|
3821
|
+
if (!await fs.rename(tempDir, resolution.effectiveWorkspaceDir).then(() => true, (err) => {
|
|
3822
3822
|
if (err.code === "EEXIST" || err.code === "ENOTEMPTY") return false;
|
|
3823
3823
|
throw err;
|
|
3824
3824
|
})) return {
|
|
@@ -3826,7 +3826,7 @@ async function resolveWorkspaceLaneForTurn(params) {
|
|
|
3826
3826
|
created: false
|
|
3827
3827
|
};
|
|
3828
3828
|
} finally {
|
|
3829
|
-
await fs
|
|
3829
|
+
await fs.rm(tempDir, {
|
|
3830
3830
|
recursive: true,
|
|
3831
3831
|
force: true
|
|
3832
3832
|
});
|
|
@@ -4101,7 +4101,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4101
4101
|
const workspaceDir = params.workspaceDir?.trim();
|
|
4102
4102
|
if (workspaceDir) {
|
|
4103
4103
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
4104
|
-
if (
|
|
4104
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
4105
4105
|
}
|
|
4106
4106
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
4107
4107
|
cwd: params.cwd,
|
|
@@ -4110,7 +4110,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4110
4110
|
});
|
|
4111
4111
|
if (packageRoot) {
|
|
4112
4112
|
const packageDocs = path.join(packageRoot, "docs");
|
|
4113
|
-
if (
|
|
4113
|
+
if (syncFs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
|
|
4114
4114
|
}
|
|
4115
4115
|
return DOCS_SITE_URL;
|
|
4116
4116
|
}
|
|
@@ -4970,7 +4970,7 @@ async function linkIdentity(params) {
|
|
|
4970
4970
|
const log$70 = createSubsystemLogger("model-catalog");
|
|
4971
4971
|
const modelCatalogPromiseState = resolveProcessScopedMap(Symbol.for("openclaw.agents.model-catalog.modelCatalogPromise"));
|
|
4972
4972
|
const hasLoggedModelCatalogErrorState = resolveProcessScopedMap(Symbol.for("openclaw.agents.model-catalog.hasLoggedModelCatalogError"));
|
|
4973
|
-
const defaultImportPiSdk = () => import("./pi-model-discovery-
|
|
4973
|
+
const defaultImportPiSdk = () => import("./pi-model-discovery-Wg17i5yr.js").then((n) => n.r);
|
|
4974
4974
|
let importPiSdk = defaultImportPiSdk;
|
|
4975
4975
|
function getModelCatalogPromise() {
|
|
4976
4976
|
return modelCatalogPromiseState.get("value") ?? null;
|
|
@@ -5449,7 +5449,7 @@ var MediaAttachmentCache = class {
|
|
|
5449
5449
|
const size = await this.ensureLocalStat(entry);
|
|
5450
5450
|
if (entry.resolvedPath) {
|
|
5451
5451
|
if (size !== void 0 && size > params.maxBytes) throw new MediaUnderstandingSkipError("maxBytes", `Attachment ${params.attachmentIndex + 1} exceeds maxBytes ${params.maxBytes}`);
|
|
5452
|
-
const buffer = await fs
|
|
5452
|
+
const buffer = await fs.readFile(entry.resolvedPath);
|
|
5453
5453
|
entry.buffer = buffer;
|
|
5454
5454
|
entry.bufferMime = entry.bufferMime ?? entry.attachment.mime ?? await detectMime({
|
|
5455
5455
|
buffer,
|
|
@@ -5518,10 +5518,10 @@ var MediaAttachmentCache = class {
|
|
|
5518
5518
|
prefix: "openclaw-media",
|
|
5519
5519
|
extension: path.extname(bufferResult.fileName || "") || ""
|
|
5520
5520
|
});
|
|
5521
|
-
await fs
|
|
5521
|
+
await fs.writeFile(tmpPath, bufferResult.buffer);
|
|
5522
5522
|
entry.tempPath = tmpPath;
|
|
5523
5523
|
entry.tempCleanup = async () => {
|
|
5524
|
-
await fs
|
|
5524
|
+
await fs.unlink(tmpPath).catch(() => {});
|
|
5525
5525
|
};
|
|
5526
5526
|
return {
|
|
5527
5527
|
path: tmpPath,
|
|
@@ -5569,13 +5569,13 @@ var MediaAttachmentCache = class {
|
|
|
5569
5569
|
if (entry.statSize !== void 0) return entry.statSize;
|
|
5570
5570
|
try {
|
|
5571
5571
|
const currentPath = entry.resolvedPath;
|
|
5572
|
-
const stat = await fs
|
|
5572
|
+
const stat = await fs.stat(currentPath);
|
|
5573
5573
|
if (!stat.isFile()) {
|
|
5574
5574
|
entry.resolvedPath = void 0;
|
|
5575
5575
|
entry.localPathSecurityRejected = true;
|
|
5576
5576
|
return;
|
|
5577
5577
|
}
|
|
5578
|
-
const canonicalPath = await fs
|
|
5578
|
+
const canonicalPath = await fs.realpath(currentPath);
|
|
5579
5579
|
if (!isInboundPathAllowed({
|
|
5580
5580
|
filePath: canonicalPath,
|
|
5581
5581
|
roots: await this.getCanonicalLocalPathRoots()
|
|
@@ -5599,7 +5599,7 @@ var MediaAttachmentCache = class {
|
|
|
5599
5599
|
if (this.canonicalLocalPathRoots) return await this.canonicalLocalPathRoots;
|
|
5600
5600
|
this.canonicalLocalPathRoots = (async () => mergeInboundPathRoots(this.localPathRoots, await Promise.all(this.localPathRoots.map(async (root) => {
|
|
5601
5601
|
if (root.includes("*")) return root;
|
|
5602
|
-
return await fs
|
|
5602
|
+
return await fs.realpath(root).catch(() => root);
|
|
5603
5603
|
}))))();
|
|
5604
5604
|
return await this.canonicalLocalPathRoots;
|
|
5605
5605
|
}
|
|
@@ -6003,7 +6003,7 @@ function describeAutoSelectionExhausted(capability, providerRegistry, cfg) {
|
|
|
6003
6003
|
async function fileExists(filePath) {
|
|
6004
6004
|
if (!filePath) return false;
|
|
6005
6005
|
try {
|
|
6006
|
-
await fs
|
|
6006
|
+
await fs.stat(filePath);
|
|
6007
6007
|
return true;
|
|
6008
6008
|
} catch {
|
|
6009
6009
|
return false;
|
|
@@ -6053,9 +6053,9 @@ function candidateBinaryNames(name) {
|
|
|
6053
6053
|
}
|
|
6054
6054
|
async function isExecutable(filePath) {
|
|
6055
6055
|
try {
|
|
6056
|
-
if (!(await fs
|
|
6056
|
+
if (!(await fs.stat(filePath)).isFile()) return false;
|
|
6057
6057
|
if (process.platform === "win32") return true;
|
|
6058
|
-
await fs
|
|
6058
|
+
await fs.access(filePath, constants.X_OK);
|
|
6059
6059
|
return true;
|
|
6060
6060
|
} catch {
|
|
6061
6061
|
return false;
|
|
@@ -6542,7 +6542,7 @@ async function resolveCliOutput(params) {
|
|
|
6542
6542
|
const commandId = commandBase(params.command);
|
|
6543
6543
|
const fileOutput = commandId === "whisper-cli" ? resolveWhisperCppOutputPath(params.args) : commandId === "whisper" ? resolveWhisperOutputPath(params.args, params.mediaPath) : commandId === "parakeet-mlx" ? resolveParakeetOutputPath(params.args, params.mediaPath) : null;
|
|
6544
6544
|
if (fileOutput && await fileExists(fileOutput)) try {
|
|
6545
|
-
const content = await fs
|
|
6545
|
+
const content = await fs.readFile(fileOutput, "utf8");
|
|
6546
6546
|
if (content.trim()) return content.trim();
|
|
6547
6547
|
} catch {}
|
|
6548
6548
|
if (commandId === "gemini") {
|
|
@@ -6887,10 +6887,10 @@ async function runCliEntry$1(params) {
|
|
|
6887
6887
|
timeoutMs
|
|
6888
6888
|
});
|
|
6889
6889
|
if (capability === "audio") assertMinAudioSize({
|
|
6890
|
-
size: (await fs
|
|
6890
|
+
size: (await fs.stat(pathResult.path)).size,
|
|
6891
6891
|
attachmentIndex: params.attachmentIndex
|
|
6892
6892
|
});
|
|
6893
|
-
const outputDir = await fs
|
|
6893
|
+
const outputDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "openclaw-media-cli-"));
|
|
6894
6894
|
const mediaPath = pathResult.path;
|
|
6895
6895
|
const outputBase = path.join(outputDir, path.parse(mediaPath).name);
|
|
6896
6896
|
const templCtx = {
|
|
@@ -6924,7 +6924,7 @@ async function runCliEntry$1(params) {
|
|
|
6924
6924
|
model: command
|
|
6925
6925
|
};
|
|
6926
6926
|
} finally {
|
|
6927
|
-
await fs
|
|
6927
|
+
await fs.rm(outputDir, {
|
|
6928
6928
|
recursive: true,
|
|
6929
6929
|
force: true
|
|
6930
6930
|
}).catch(() => {});
|
|
@@ -9921,7 +9921,7 @@ async function resolveAgentSessionDirs(stateDir) {
|
|
|
9921
9921
|
const agentsDir = path.join(stateDir, "agents");
|
|
9922
9922
|
let entries = [];
|
|
9923
9923
|
try {
|
|
9924
|
-
entries = await fs
|
|
9924
|
+
entries = await fs.readdir(agentsDir, { withFileTypes: true });
|
|
9925
9925
|
} catch (err) {
|
|
9926
9926
|
if (err.code === "ENOENT") return [];
|
|
9927
9927
|
throw err;
|
|
@@ -13404,7 +13404,7 @@ async function routeReply(params) {
|
|
|
13404
13404
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
13405
13405
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
13406
13406
|
try {
|
|
13407
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
13407
|
+
const { deliverOutboundPayloads } = await import("./deliver-XZwPv99X.js").then((n) => n.n);
|
|
13408
13408
|
const outboundSession = buildOutboundSessionContext({
|
|
13409
13409
|
cfg,
|
|
13410
13410
|
agentId: resolvedAgentId,
|
|
@@ -15452,7 +15452,7 @@ async function sendTranscriptEcho(params) {
|
|
|
15452
15452
|
}
|
|
15453
15453
|
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
|
15454
15454
|
try {
|
|
15455
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
15455
|
+
const { deliverOutboundPayloads } = await import("./deliver-XZwPv99X.js").then((n) => n.n);
|
|
15456
15456
|
await deliverOutboundPayloads({
|
|
15457
15457
|
cfg,
|
|
15458
15458
|
channel: normalizedChannel,
|
|
@@ -18154,7 +18154,7 @@ function getPairingAdapter(channelId) {
|
|
|
18154
18154
|
//#region src/plugin-sdk/json-store.ts
|
|
18155
18155
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
18156
18156
|
try {
|
|
18157
|
-
const parsed = safeParseJson(await
|
|
18157
|
+
const parsed = safeParseJson(await syncFs.promises.readFile(filePath, "utf-8"));
|
|
18158
18158
|
if (parsed == null) return {
|
|
18159
18159
|
value: fallback,
|
|
18160
18160
|
exists: true
|
|
@@ -18241,7 +18241,7 @@ async function readPairingRequests(filePath) {
|
|
|
18241
18241
|
}
|
|
18242
18242
|
async function ensureJsonFile(filePath, fallback) {
|
|
18243
18243
|
try {
|
|
18244
|
-
await
|
|
18244
|
+
await syncFs.promises.access(filePath);
|
|
18245
18245
|
} catch {
|
|
18246
18246
|
await writeJsonFile(filePath, fallback);
|
|
18247
18247
|
}
|
|
@@ -18397,7 +18397,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
|
|
|
18397
18397
|
async function readAllowFromStateForPathWithExists(channel, filePath) {
|
|
18398
18398
|
let stat = null;
|
|
18399
18399
|
try {
|
|
18400
|
-
stat = await
|
|
18400
|
+
stat = await syncFs.promises.stat(filePath);
|
|
18401
18401
|
} catch (err) {
|
|
18402
18402
|
if (err.code !== "ENOENT") throw err;
|
|
18403
18403
|
}
|
|
@@ -18440,7 +18440,7 @@ async function writeAllowFromState(filePath, allowFrom) {
|
|
|
18440
18440
|
});
|
|
18441
18441
|
let stat = null;
|
|
18442
18442
|
try {
|
|
18443
|
-
stat = await
|
|
18443
|
+
stat = await syncFs.promises.stat(filePath);
|
|
18444
18444
|
} catch {}
|
|
18445
18445
|
setAllowFromReadCache(filePath, {
|
|
18446
18446
|
exists: true,
|
|
@@ -19607,7 +19607,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19607
19607
|
}
|
|
19608
19608
|
function ensureDir$1(filePath) {
|
|
19609
19609
|
const dir = path.dirname(filePath);
|
|
19610
|
-
|
|
19610
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
19611
19611
|
}
|
|
19612
19612
|
function coerceAllowlistEntries(allowlist) {
|
|
19613
19613
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19677,11 +19677,11 @@ function generateToken() {
|
|
|
19677
19677
|
function loadExecApprovals() {
|
|
19678
19678
|
const filePath = resolveExecApprovalsPath();
|
|
19679
19679
|
try {
|
|
19680
|
-
if (!
|
|
19680
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
19681
19681
|
version: 1,
|
|
19682
19682
|
agents: {}
|
|
19683
19683
|
});
|
|
19684
|
-
const raw =
|
|
19684
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
19685
19685
|
const parsed = JSON.parse(raw);
|
|
19686
19686
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19687
19687
|
version: 1,
|
|
@@ -19698,9 +19698,9 @@ function loadExecApprovals() {
|
|
|
19698
19698
|
function saveExecApprovals(file) {
|
|
19699
19699
|
const filePath = resolveExecApprovalsPath();
|
|
19700
19700
|
ensureDir$1(filePath);
|
|
19701
|
-
|
|
19701
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19702
19702
|
try {
|
|
19703
|
-
|
|
19703
|
+
syncFs.chmodSync(filePath, 384);
|
|
19704
19704
|
} catch {}
|
|
19705
19705
|
}
|
|
19706
19706
|
function ensureExecApprovals() {
|
|
@@ -20164,18 +20164,18 @@ function applyPathPrepend(env, prepend, options) {
|
|
|
20164
20164
|
function resolvePowerShellPath() {
|
|
20165
20165
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
20166
20166
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
20167
|
-
if (
|
|
20167
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
20168
20168
|
const programW6432 = process.env.ProgramW6432;
|
|
20169
20169
|
if (programW6432 && programW6432 !== programFiles) {
|
|
20170
20170
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
20171
|
-
if (
|
|
20171
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
20172
20172
|
}
|
|
20173
20173
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
20174
20174
|
if (pwshInPath) return pwshInPath;
|
|
20175
20175
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
20176
20176
|
if (systemRoot) {
|
|
20177
20177
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
20178
|
-
if (
|
|
20178
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
20179
20179
|
}
|
|
20180
20180
|
return "powershell.exe";
|
|
20181
20181
|
}
|
|
@@ -20213,7 +20213,7 @@ function resolveShellFromPath(name) {
|
|
|
20213
20213
|
for (const entry of entries) {
|
|
20214
20214
|
const candidate = path.join(entry, name);
|
|
20215
20215
|
try {
|
|
20216
|
-
|
|
20216
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
20217
20217
|
return candidate;
|
|
20218
20218
|
} catch {}
|
|
20219
20219
|
}
|
|
@@ -21151,7 +21151,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
21151
21151
|
cwd: process.cwd(),
|
|
21152
21152
|
root: params.sandbox.workspaceDir
|
|
21153
21153
|
});
|
|
21154
|
-
if (!(await fs
|
|
21154
|
+
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
21155
21155
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
21156
21156
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
21157
21157
|
return {
|
|
@@ -21736,7 +21736,7 @@ async function imageResult(params) {
|
|
|
21736
21736
|
}, params.label, params.imageSanitization);
|
|
21737
21737
|
}
|
|
21738
21738
|
async function imageResultFromFile(params) {
|
|
21739
|
-
const buf = await fs
|
|
21739
|
+
const buf = await fs.readFile(params.path);
|
|
21740
21740
|
const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
|
|
21741
21741
|
return await imageResult({
|
|
21742
21742
|
label: params.label,
|
|
@@ -22671,13 +22671,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
22671
22671
|
cwd: params.workdir,
|
|
22672
22672
|
root: params.workdir
|
|
22673
22673
|
});
|
|
22674
|
-
stat = await fs
|
|
22674
|
+
stat = await fs.stat(absPath);
|
|
22675
22675
|
} catch {
|
|
22676
22676
|
return;
|
|
22677
22677
|
}
|
|
22678
22678
|
if (!stat.isFile()) return;
|
|
22679
22679
|
if (stat.size > 512 * 1024) return;
|
|
22680
|
-
const content = await fs
|
|
22680
|
+
const content = await fs.readFile(absPath, "utf-8");
|
|
22681
22681
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
22682
22682
|
if (first) {
|
|
22683
22683
|
const idx = first.index;
|
|
@@ -24127,7 +24127,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
24127
24127
|
function hasGitMarker(repoRoot) {
|
|
24128
24128
|
const gitPath = path.join(repoRoot, ".git");
|
|
24129
24129
|
try {
|
|
24130
|
-
const stat =
|
|
24130
|
+
const stat = syncFs.statSync(gitPath);
|
|
24131
24131
|
return stat.isDirectory() || stat.isFile();
|
|
24132
24132
|
} catch {
|
|
24133
24133
|
return false;
|
|
@@ -24139,10 +24139,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
24139
24139
|
function resolveGitDirFromMarker(repoRoot) {
|
|
24140
24140
|
const gitPath = path.join(repoRoot, ".git");
|
|
24141
24141
|
try {
|
|
24142
|
-
const stat =
|
|
24142
|
+
const stat = syncFs.statSync(gitPath);
|
|
24143
24143
|
if (stat.isDirectory()) return gitPath;
|
|
24144
24144
|
if (!stat.isFile()) return null;
|
|
24145
|
-
const match =
|
|
24145
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
24146
24146
|
if (!match?.[1]) return null;
|
|
24147
24147
|
return path.resolve(repoRoot, match[1].trim());
|
|
24148
24148
|
} catch {
|
|
@@ -24209,7 +24209,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
24209
24209
|
cachedCommit = null;
|
|
24210
24210
|
return cachedCommit;
|
|
24211
24211
|
}
|
|
24212
|
-
const head =
|
|
24212
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
24213
24213
|
if (!head) {
|
|
24214
24214
|
cachedCommit = null;
|
|
24215
24215
|
return cachedCommit;
|
|
@@ -24217,7 +24217,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
24217
24217
|
if (head.startsWith("ref:")) {
|
|
24218
24218
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
24219
24219
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
24220
|
-
cachedCommit = formatCommit(
|
|
24220
|
+
cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
|
|
24221
24221
|
return cachedCommit;
|
|
24222
24222
|
}
|
|
24223
24223
|
cachedCommit = formatCommit(head);
|
|
@@ -28059,13 +28059,13 @@ function listSkillCommandsForAgents(params) {
|
|
|
28059
28059
|
const workspaceFilters = /* @__PURE__ */ new Map();
|
|
28060
28060
|
for (const agentId of agentIds) {
|
|
28061
28061
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
|
|
28062
|
-
if (!
|
|
28062
|
+
if (!syncFs.existsSync(workspaceDir)) {
|
|
28063
28063
|
logVerbose(`Skipping agent "${agentId}": workspace does not exist: ${workspaceDir}`);
|
|
28064
28064
|
continue;
|
|
28065
28065
|
}
|
|
28066
28066
|
let canonicalDir;
|
|
28067
28067
|
try {
|
|
28068
|
-
canonicalDir =
|
|
28068
|
+
canonicalDir = syncFs.realpathSync(workspaceDir);
|
|
28069
28069
|
} catch {
|
|
28070
28070
|
logVerbose(`Skipping agent "${agentId}": cannot resolve workspace: ${workspaceDir}`);
|
|
28071
28071
|
continue;
|
|
@@ -29255,7 +29255,7 @@ function resolveRepoRoot(params) {
|
|
|
29255
29255
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
29256
29256
|
if (configured) try {
|
|
29257
29257
|
const resolved = path.resolve(configured);
|
|
29258
|
-
if (
|
|
29258
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
29259
29259
|
} catch {}
|
|
29260
29260
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
29261
29261
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -29774,7 +29774,7 @@ async function readForwardAndSort(query, sessionId) {
|
|
|
29774
29774
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
29775
29775
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
29776
29776
|
function loadTemplate(fileName) {
|
|
29777
|
-
return
|
|
29777
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
29778
29778
|
}
|
|
29779
29779
|
function generateHtml(sessionData) {
|
|
29780
29780
|
const template = loadTemplate("template.html");
|
|
@@ -29877,8 +29877,8 @@ async function buildExportSessionReply(params) {
|
|
|
29877
29877
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
29878
29878
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
29879
29879
|
const outputDir = path.dirname(outputPath);
|
|
29880
|
-
if (!
|
|
29881
|
-
|
|
29880
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
29881
|
+
syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
29882
29882
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
29883
29883
|
return { text: [
|
|
29884
29884
|
"✅ Session exported!",
|
|
@@ -30053,8 +30053,8 @@ function resolveZaiApiKey() {
|
|
|
30053
30053
|
}
|
|
30054
30054
|
try {
|
|
30055
30055
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
30056
|
-
if (!
|
|
30057
|
-
const data = JSON.parse(
|
|
30056
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
30057
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
30058
30058
|
return data["z-ai"]?.access || data.zai?.access;
|
|
30059
30059
|
} catch {
|
|
30060
30060
|
return;
|
|
@@ -33480,7 +33480,7 @@ function normalizeSessionKey(value) {
|
|
|
33480
33480
|
}
|
|
33481
33481
|
function readSessionStore(storePath) {
|
|
33482
33482
|
try {
|
|
33483
|
-
const raw =
|
|
33483
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
33484
33484
|
const parsed = json5.parse(raw);
|
|
33485
33485
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
33486
33486
|
} catch {}
|
|
@@ -35193,7 +35193,7 @@ async function createModelSelectionState(params) {
|
|
|
35193
35193
|
}
|
|
35194
35194
|
}
|
|
35195
35195
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
35196
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
35196
|
+
const { ensureAuthProfileStore } = await import("./model-selection-LDnLrnn_.js").then((n) => n.P);
|
|
35197
35197
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
35198
35198
|
const providerKey = normalizeProviderId(provider);
|
|
35199
35199
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -38791,7 +38791,7 @@ function asBoolean(value) {
|
|
|
38791
38791
|
}
|
|
38792
38792
|
function resolveTempPathParts(opts) {
|
|
38793
38793
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
38794
|
-
if (!opts.tmpDir)
|
|
38794
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
38795
38795
|
recursive: true,
|
|
38796
38796
|
mode: 448
|
|
38797
38797
|
});
|
|
@@ -38877,7 +38877,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
38877
38877
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
38878
38878
|
const body = res.body;
|
|
38879
38879
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
38880
|
-
const fileHandle = await fs$
|
|
38880
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
38881
38881
|
let thrown;
|
|
38882
38882
|
try {
|
|
38883
38883
|
const reader = body.getReader();
|
|
@@ -38895,7 +38895,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
38895
38895
|
await fileHandle.close();
|
|
38896
38896
|
}
|
|
38897
38897
|
if (thrown) {
|
|
38898
|
-
await fs$
|
|
38898
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
38899
38899
|
throw thrown;
|
|
38900
38900
|
}
|
|
38901
38901
|
} finally {
|
|
@@ -38908,7 +38908,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
38908
38908
|
}
|
|
38909
38909
|
async function writeBase64ToFile(filePath, base64) {
|
|
38910
38910
|
const buf = Buffer.from(base64, "base64");
|
|
38911
|
-
await fs$
|
|
38911
|
+
await fs$1.writeFile(filePath, buf);
|
|
38912
38912
|
return {
|
|
38913
38913
|
path: filePath,
|
|
38914
38914
|
bytes: buf.length
|
|
@@ -38993,7 +38993,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
38993
38993
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
38994
38994
|
throw new Error("jsonlPath outside allowed roots");
|
|
38995
38995
|
}
|
|
38996
|
-
const canonical = await fs
|
|
38996
|
+
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
38997
38997
|
if (!isInboundPathAllowed({
|
|
38998
38998
|
filePath: canonical,
|
|
38999
38999
|
roots
|
|
@@ -39001,7 +39001,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
39001
39001
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
39002
39002
|
throw new Error("jsonlPath outside allowed roots");
|
|
39003
39003
|
}
|
|
39004
|
-
return await fs
|
|
39004
|
+
return await fs.readFile(canonical, "utf8");
|
|
39005
39005
|
}
|
|
39006
39006
|
const CanvasToolSchema = Type.Object({
|
|
39007
39007
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -39856,12 +39856,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
39856
39856
|
}
|
|
39857
39857
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
39858
39858
|
const filePath = resolveRestartSentinelPath(env);
|
|
39859
|
-
await fs
|
|
39859
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
39860
39860
|
const data = {
|
|
39861
39861
|
version: 1,
|
|
39862
39862
|
payload
|
|
39863
39863
|
};
|
|
39864
|
-
await fs
|
|
39864
|
+
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
39865
39865
|
return filePath;
|
|
39866
39866
|
}
|
|
39867
39867
|
|
|
@@ -42224,9 +42224,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
42224
42224
|
const entries = [];
|
|
42225
42225
|
for (const rawPath of paths) {
|
|
42226
42226
|
const resolved = resolveUserPath(rawPath);
|
|
42227
|
-
if (!
|
|
42227
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
42228
42228
|
try {
|
|
42229
|
-
const payload = JSON.parse(
|
|
42229
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
42230
42230
|
entries.push(...parseCatalogEntries(payload));
|
|
42231
42231
|
} catch {}
|
|
42232
42232
|
}
|
|
@@ -51453,18 +51453,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
51453
51453
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
51454
51454
|
}
|
|
51455
51455
|
async function writeCliImages(images) {
|
|
51456
|
-
const tempDir = await fs
|
|
51456
|
+
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
|
|
51457
51457
|
const paths = [];
|
|
51458
51458
|
for (let i = 0; i < images.length; i += 1) {
|
|
51459
51459
|
const image = images[i];
|
|
51460
51460
|
const ext = resolveImageExtension(image.mimeType);
|
|
51461
51461
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
51462
51462
|
const buffer = Buffer.from(image.data, "base64");
|
|
51463
|
-
await fs
|
|
51463
|
+
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
51464
51464
|
paths.push(filePath);
|
|
51465
51465
|
}
|
|
51466
51466
|
const cleanup = async () => {
|
|
51467
|
-
await fs
|
|
51467
|
+
await fs.rm(tempDir, {
|
|
51468
51468
|
recursive: true,
|
|
51469
51469
|
force: true
|
|
51470
51470
|
});
|
|
@@ -53426,7 +53426,7 @@ function resolveCronStorePath(storePath) {
|
|
|
53426
53426
|
}
|
|
53427
53427
|
async function loadCronStore(storePath) {
|
|
53428
53428
|
try {
|
|
53429
|
-
const raw = await
|
|
53429
|
+
const raw = await syncFs.promises.readFile(storePath, "utf-8");
|
|
53430
53430
|
let parsed;
|
|
53431
53431
|
try {
|
|
53432
53432
|
parsed = json5.parse(raw);
|
|
@@ -54006,9 +54006,9 @@ async function readPostCompactionContext(workspaceDir) {
|
|
|
54006
54006
|
if (!opened.ok) return null;
|
|
54007
54007
|
const sections = extractSections((() => {
|
|
54008
54008
|
try {
|
|
54009
|
-
return
|
|
54009
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
54010
54010
|
} finally {
|
|
54011
|
-
|
|
54011
|
+
syncFs.closeSync(opened.fd);
|
|
54012
54012
|
}
|
|
54013
54013
|
})(), ["Session Startup", "Red Lines"]);
|
|
54014
54014
|
if (sections.length === 0) return null;
|
|
@@ -55057,7 +55057,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
55057
55057
|
return;
|
|
55058
55058
|
}
|
|
55059
55059
|
try {
|
|
55060
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
55060
|
+
const { deliverOutboundPayloads } = await import("./deliver-XZwPv99X.js").then((n) => n.n);
|
|
55061
55061
|
const outboundSession = buildOutboundSessionContext({
|
|
55062
55062
|
cfg: params.cfg,
|
|
55063
55063
|
sessionKey: params.sessionKey
|
|
@@ -56006,7 +56006,7 @@ async function stageSandboxMedia(params) {
|
|
|
56006
56006
|
const remoteMediaCacheDir = ctx.MediaRemoteHost ? path.join(workspaceDir, ".openclaw", "media", "remote-cache", sessionKey) : null;
|
|
56007
56007
|
const effectiveWorkspaceDir = sandbox?.workspaceDir ?? remoteMediaCacheDir;
|
|
56008
56008
|
if (!effectiveWorkspaceDir) return;
|
|
56009
|
-
await fs
|
|
56009
|
+
await fs.mkdir(effectiveWorkspaceDir, { recursive: true });
|
|
56010
56010
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
56011
56011
|
cfg,
|
|
56012
56012
|
accountId: ctx.AccountId
|
|
@@ -56065,8 +56065,8 @@ async function stageLocalFileIntoRoot(params) {
|
|
|
56065
56065
|
}
|
|
56066
56066
|
async function stageRemoteFileIntoRoot(params) {
|
|
56067
56067
|
const tmpRoot = resolvePreferredOpenClawTmpDir();
|
|
56068
|
-
await fs
|
|
56069
|
-
const tmpDir = await fs
|
|
56068
|
+
await fs.mkdir(tmpRoot, { recursive: true });
|
|
56069
|
+
const tmpDir = await fs.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
|
|
56070
56070
|
const tmpPath = path.join(tmpDir, "download");
|
|
56071
56071
|
try {
|
|
56072
56072
|
await scpFile(params.remoteHost, params.remotePath, tmpPath);
|
|
@@ -56077,7 +56077,7 @@ async function stageRemoteFileIntoRoot(params) {
|
|
|
56077
56077
|
maxBytes: params.maxBytes
|
|
56078
56078
|
});
|
|
56079
56079
|
} finally {
|
|
56080
|
-
await fs
|
|
56080
|
+
await fs.rm(tmpDir, {
|
|
56081
56081
|
recursive: true,
|
|
56082
56082
|
force: true
|
|
56083
56083
|
}).catch(() => {});
|
|
@@ -57095,7 +57095,7 @@ async function resolveHeartbeatPreflight(params) {
|
|
|
57095
57095
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
|
|
57096
57096
|
const heartbeatFilePath = path.join(workspaceDir, DEFAULT_HEARTBEAT_FILENAME);
|
|
57097
57097
|
try {
|
|
57098
|
-
if (isHeartbeatContentEffectivelyEmpty(await fs
|
|
57098
|
+
if (isHeartbeatContentEffectivelyEmpty(await fs.readFile(heartbeatFilePath, "utf-8"))) return {
|
|
57099
57099
|
...basePreflight,
|
|
57100
57100
|
skipReason: "empty-heartbeat-file"
|
|
57101
57101
|
};
|
|
@@ -57371,7 +57371,7 @@ async function runModelGate(spec, ctx) {
|
|
|
57371
57371
|
const isolatedSessionId = randomNonce;
|
|
57372
57372
|
const isolatedRunId = randomNonce;
|
|
57373
57373
|
const tmpBaseDir = resolvePreferredOpenClawTmpDir();
|
|
57374
|
-
tmpDir = await fs
|
|
57374
|
+
tmpDir = await fs.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
|
|
57375
57375
|
const workspaceDir = tmpDir;
|
|
57376
57376
|
const prompt = spec.prompt ?? DEFAULT_MODEL_PROMPT;
|
|
57377
57377
|
const timeoutMs = spec.timeoutMs ?? DEFAULT_MODEL_TIMEOUT_MS;
|
|
@@ -57429,7 +57429,7 @@ async function runModelGate(spec, ctx) {
|
|
|
57429
57429
|
log$35.warn("model gate error", { error: err instanceof Error ? err.message : String(err) });
|
|
57430
57430
|
return { wake: false };
|
|
57431
57431
|
} finally {
|
|
57432
|
-
if (tmpDir) await fs
|
|
57432
|
+
if (tmpDir) await fs.rm(tmpDir, {
|
|
57433
57433
|
recursive: true,
|
|
57434
57434
|
force: true
|
|
57435
57435
|
}).catch(() => void 0);
|
|
@@ -63750,7 +63750,7 @@ async function detectBinary(name) {
|
|
|
63750
63750
|
if (!isSafeExecutableValue(name)) return false;
|
|
63751
63751
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
63752
63752
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
63753
|
-
await fs
|
|
63753
|
+
await fs.access(resolved);
|
|
63754
63754
|
return true;
|
|
63755
63755
|
} catch {
|
|
63756
63756
|
return false;
|
|
@@ -64426,7 +64426,7 @@ function normalizeAllowList$1(list) {
|
|
|
64426
64426
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
64427
64427
|
try {
|
|
64428
64428
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
64429
|
-
const content = await fs
|
|
64429
|
+
const content = await fs.readFile(expanded, "utf8");
|
|
64430
64430
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
64431
64431
|
if (userHostMatch) return userHostMatch[1];
|
|
64432
64432
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -64794,7 +64794,7 @@ function getChannelActivity(params) {
|
|
|
64794
64794
|
function readFileIfExists(filePath) {
|
|
64795
64795
|
if (!filePath) return;
|
|
64796
64796
|
try {
|
|
64797
|
-
return
|
|
64797
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
64798
64798
|
} catch {
|
|
64799
64799
|
return;
|
|
64800
64800
|
}
|
|
@@ -65457,7 +65457,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
65457
65457
|
prefix: "line-media",
|
|
65458
65458
|
extension: getExtensionForContentType(contentType)
|
|
65459
65459
|
});
|
|
65460
|
-
await
|
|
65460
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
65461
65461
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
65462
65462
|
return {
|
|
65463
65463
|
path: filePath,
|
|
@@ -68332,7 +68332,7 @@ function createRuntimeChannel() {
|
|
|
68332
68332
|
reply: {
|
|
68333
68333
|
dispatchReplyWithBufferedBlockDispatcher,
|
|
68334
68334
|
dispatchInboundMessage,
|
|
68335
|
-
agentCommandFromIngress: async (...args) => (await import("./agent-
|
|
68335
|
+
agentCommandFromIngress: async (...args) => (await import("./agent-BgBSmNaI.js").then((n) => n.n)).agentCommandFromIngress(...args),
|
|
68336
68336
|
dispatchReplyWithDispatcher,
|
|
68337
68337
|
createReplyDispatcherWithTyping,
|
|
68338
68338
|
resolveEffectiveMessagesConfig,
|
|
@@ -68761,7 +68761,7 @@ async function getMemorySearchManager(params) {
|
|
|
68761
68761
|
if (cached) return { manager: cached };
|
|
68762
68762
|
}
|
|
68763
68763
|
try {
|
|
68764
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
68764
|
+
const { QmdMemoryManager } = await import("./qmd-manager-BbwLXjLX.js");
|
|
68765
68765
|
const primary = await QmdMemoryManager.create({
|
|
68766
68766
|
cfg: params.cfg,
|
|
68767
68767
|
agentId: params.agentId,
|
|
@@ -68773,7 +68773,7 @@ async function getMemorySearchManager(params) {
|
|
|
68773
68773
|
const wrapper = new FallbackMemoryManager({
|
|
68774
68774
|
primary,
|
|
68775
68775
|
fallbackFactory: async () => {
|
|
68776
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
68776
|
+
const { MemoryIndexManager } = await import("./manager-COuC5aCY.js").then((n) => n.t);
|
|
68777
68777
|
return await MemoryIndexManager.get(params);
|
|
68778
68778
|
}
|
|
68779
68779
|
}, () => {
|
|
@@ -68788,7 +68788,7 @@ async function getMemorySearchManager(params) {
|
|
|
68788
68788
|
}
|
|
68789
68789
|
}
|
|
68790
68790
|
try {
|
|
68791
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
68791
|
+
const { MemoryIndexManager } = await import("./manager-COuC5aCY.js").then((n) => n.t);
|
|
68792
68792
|
return { manager: await MemoryIndexManager.get(params) };
|
|
68793
68793
|
} catch (err) {
|
|
68794
68794
|
return {
|
|
@@ -69138,7 +69138,7 @@ const LEGACY_ARCHIVE_DEFAULT_RETENTION_MS = 720 * 60 * 60 * 1e3;
|
|
|
69138
69138
|
const log$25 = createSubsystemLogger("config/sessions/legacy-import/archive");
|
|
69139
69139
|
/** SHA-256 over the file's bytes; null when the file is gone (ENOENT). Other errors propagate. */
|
|
69140
69140
|
async function sourceIdentity(filePath) {
|
|
69141
|
-
const handle = await fs
|
|
69141
|
+
const handle = await fs.open(filePath, "r").catch((error) => {
|
|
69142
69142
|
if (error.code === "ENOENT") return null;
|
|
69143
69143
|
throw error;
|
|
69144
69144
|
});
|
|
@@ -69191,9 +69191,9 @@ function fallbackArchiveDest(source, archiveRoot) {
|
|
|
69191
69191
|
async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
69192
69192
|
const tmp = `${dest}.tmp-${randomUUID()}`;
|
|
69193
69193
|
try {
|
|
69194
|
-
const handle = await fs
|
|
69194
|
+
const handle = await fs.open(tmp, "wx", 384);
|
|
69195
69195
|
try {
|
|
69196
|
-
const sourceHandle = await fs
|
|
69196
|
+
const sourceHandle = await fs.open(sourcePath, "r");
|
|
69197
69197
|
try {
|
|
69198
69198
|
const chunk = Buffer.allocUnsafe(256 * 1024);
|
|
69199
69199
|
let size = 0;
|
|
@@ -69210,18 +69210,18 @@ async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
|
69210
69210
|
} finally {
|
|
69211
69211
|
await handle.close();
|
|
69212
69212
|
}
|
|
69213
|
-
await fs
|
|
69213
|
+
await fs.chmod(tmp, 384);
|
|
69214
69214
|
const copied = await identityOf(tmp);
|
|
69215
69215
|
if (!copied || copied.fingerprint !== expected.fingerprint) throw new Error(`legacy archive cross-device copy diverged from the imported bytes: ${dest}`);
|
|
69216
69216
|
try {
|
|
69217
|
-
await fs
|
|
69217
|
+
await fs.link(tmp, dest);
|
|
69218
69218
|
} catch (error) {
|
|
69219
69219
|
if (error.code !== "EEXIST") throw error;
|
|
69220
69220
|
const existing = await identityOf(dest);
|
|
69221
69221
|
if (!existing || existing.fingerprint !== expected.fingerprint) throw new Error(`legacy archive destination exists with different content: ${dest}`, { cause: error });
|
|
69222
69222
|
}
|
|
69223
69223
|
} finally {
|
|
69224
|
-
await fs
|
|
69224
|
+
await fs.rm(tmp, { force: true });
|
|
69225
69225
|
}
|
|
69226
69226
|
}
|
|
69227
69227
|
/**
|
|
@@ -69237,7 +69237,7 @@ async function planLegacyArchiveDest(source, archiveRoot, expected) {
|
|
|
69237
69237
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
69238
69238
|
const { dir, dest } = archivePathsFor(source, resolvedRoot);
|
|
69239
69239
|
try {
|
|
69240
|
-
await fs
|
|
69240
|
+
await fs.mkdir(dir, {
|
|
69241
69241
|
recursive: true,
|
|
69242
69242
|
mode: 448
|
|
69243
69243
|
});
|
|
@@ -69277,7 +69277,7 @@ async function archiveLegacySource(source, archiveRoot, expected) {
|
|
|
69277
69277
|
*/
|
|
69278
69278
|
async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
69279
69279
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
69280
|
-
await fs
|
|
69280
|
+
await fs.mkdir(path.dirname(dest), {
|
|
69281
69281
|
recursive: true,
|
|
69282
69282
|
mode: 448
|
|
69283
69283
|
});
|
|
@@ -69287,14 +69287,14 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
69287
69287
|
const expectedIdentity = expected ?? sourceIdentityValue;
|
|
69288
69288
|
if (sourceIdentityValue.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy source changed after import; failing closed: ${source.path}`);
|
|
69289
69289
|
const destInodeVerified = async (destPath) => {
|
|
69290
|
-
const [sourceStat, destStat] = await Promise.all([fs
|
|
69290
|
+
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath).catch(() => void 0)]);
|
|
69291
69291
|
return destStat !== void 0 && destStat.dev === sourceStat.dev && destStat.ino === sourceStat.ino;
|
|
69292
69292
|
};
|
|
69293
69293
|
const moveInto = async (destPath) => {
|
|
69294
69294
|
let moved = false;
|
|
69295
69295
|
let independentArchive = false;
|
|
69296
69296
|
try {
|
|
69297
|
-
await fs
|
|
69297
|
+
await fs.link(source.path, destPath);
|
|
69298
69298
|
moved = true;
|
|
69299
69299
|
} catch (error) {
|
|
69300
69300
|
const code = error.code;
|
|
@@ -69302,7 +69302,7 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
69302
69302
|
const existing = await identityOf(destPath);
|
|
69303
69303
|
if (existing && existing.fingerprint === expectedIdentity.fingerprint) {
|
|
69304
69304
|
moved = true;
|
|
69305
|
-
const [sourceStat, destStat] = await Promise.all([fs
|
|
69305
|
+
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath)]);
|
|
69306
69306
|
independentArchive = sourceStat.dev !== destStat.dev || sourceStat.ino !== destStat.ino;
|
|
69307
69307
|
} else return {
|
|
69308
69308
|
moved: false,
|
|
@@ -69323,13 +69323,13 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
69323
69323
|
};
|
|
69324
69324
|
const outcome = await moveInto(dest);
|
|
69325
69325
|
if (outcome.divergent) throw new Error(`legacy archive destination exists with different content: ${dest}`);
|
|
69326
|
-
await fs
|
|
69326
|
+
await fs.chmod(dest, 384);
|
|
69327
69327
|
if (!await destInodeVerified(dest)) {
|
|
69328
69328
|
const archived = await identityOf(dest);
|
|
69329
69329
|
if (!archived || archived.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy archive verification failed: ${dest}`);
|
|
69330
69330
|
}
|
|
69331
69331
|
if (outcome.moved) if (outcome.independentArchive) await unlinkSourceIfUnchanged(source.path, expectedIdentity);
|
|
69332
|
-
else await fs
|
|
69332
|
+
else await fs.unlink(source.path);
|
|
69333
69333
|
return dest;
|
|
69334
69334
|
}
|
|
69335
69335
|
/**
|
|
@@ -69343,12 +69343,12 @@ async function unlinkSourceIfUnchanged(sourcePath, expected) {
|
|
|
69343
69343
|
const current = await sourceIdentity(sourcePath);
|
|
69344
69344
|
if (!current) return;
|
|
69345
69345
|
if (current.fingerprint !== expected.fingerprint) throw new Error(`legacy source changed before removal; failing closed: ${sourcePath}`);
|
|
69346
|
-
await fs
|
|
69346
|
+
await fs.unlink(sourcePath);
|
|
69347
69347
|
}
|
|
69348
69348
|
async function chmodDirs(dir, stopAt) {
|
|
69349
69349
|
let current = dir;
|
|
69350
69350
|
while (current.startsWith(stopAt) && current !== stopAt) {
|
|
69351
|
-
await fs
|
|
69351
|
+
await fs.chmod(current, 448).catch(() => void 0);
|
|
69352
69352
|
const parent = path.dirname(current);
|
|
69353
69353
|
if (parent === current) return;
|
|
69354
69354
|
current = parent;
|
|
@@ -69377,11 +69377,11 @@ async function purgeExpiredLegacyArchives(runtime, opts) {
|
|
|
69377
69377
|
log$25.warn("skipping legacy archive outside the archive root", { sourcePath: receipt.sourcePath });
|
|
69378
69378
|
continue;
|
|
69379
69379
|
}
|
|
69380
|
-
if (!await fs
|
|
69380
|
+
if (!await fs.stat(archivePath).then(() => true).catch((error) => {
|
|
69381
69381
|
if (error.code === "ENOENT") return false;
|
|
69382
69382
|
throw error;
|
|
69383
69383
|
})) continue;
|
|
69384
|
-
await fs
|
|
69384
|
+
await fs.rm(archivePath, { force: true });
|
|
69385
69385
|
purged += 1;
|
|
69386
69386
|
await pruneEmptyArchiveDirs(path.dirname(archivePath), archiveRoot);
|
|
69387
69387
|
}
|
|
@@ -69392,12 +69392,12 @@ async function pruneEmptyArchiveDirs(dir, stopAt) {
|
|
|
69392
69392
|
while (current.startsWith(stopAt + path.sep)) {
|
|
69393
69393
|
let entries;
|
|
69394
69394
|
try {
|
|
69395
|
-
entries = await fs
|
|
69395
|
+
entries = await fs.readdir(current);
|
|
69396
69396
|
} catch {
|
|
69397
69397
|
return;
|
|
69398
69398
|
}
|
|
69399
69399
|
if (entries.length > 0) return;
|
|
69400
|
-
await fs
|
|
69400
|
+
await fs.rmdir(current).catch(() => void 0);
|
|
69401
69401
|
current = path.dirname(current);
|
|
69402
69402
|
}
|
|
69403
69403
|
}
|
|
@@ -69680,7 +69680,7 @@ function byPath(a, b) {
|
|
|
69680
69680
|
}
|
|
69681
69681
|
function readDirents(dirPath) {
|
|
69682
69682
|
try {
|
|
69683
|
-
return
|
|
69683
|
+
return syncFs.readdirSync(dirPath, { withFileTypes: true });
|
|
69684
69684
|
} catch {
|
|
69685
69685
|
return [];
|
|
69686
69686
|
}
|
|
@@ -69693,7 +69693,7 @@ function isUnderQuarantine(rootDir, candidatePath) {
|
|
|
69693
69693
|
}
|
|
69694
69694
|
function statSource(filePath) {
|
|
69695
69695
|
try {
|
|
69696
|
-
const stats =
|
|
69696
|
+
const stats = syncFs.statSync(filePath);
|
|
69697
69697
|
if (!stats.isFile()) return;
|
|
69698
69698
|
return {
|
|
69699
69699
|
mtimeMs: stats.mtimeMs,
|
|
@@ -69884,12 +69884,12 @@ async function censusLegacySources(cfg, env) {
|
|
|
69884
69884
|
for (const agentDir of readDirents(agentsRoot).filter((entry) => entry.isDirectory()).toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
69885
69885
|
const agentId = normalizeAgentId(agentDir.name);
|
|
69886
69886
|
const sessionsDir = path.join(agentsRoot, agentDir.name, LEGACY_SESSIONS_DIR_NAME);
|
|
69887
|
-
if (
|
|
69887
|
+
if (syncFs.existsSync(sessionsDir)) censusAgentDir(sessionsDir, agentId);
|
|
69888
69888
|
}
|
|
69889
69889
|
const legacyRoot = path.join(stateDir, LEGACY_SESSIONS_DIR_NAME);
|
|
69890
|
-
if (
|
|
69890
|
+
if (syncFs.existsSync(legacyRoot)) censusAgentDir(legacyRoot, defaultAgent);
|
|
69891
69891
|
const recoveryDir = path.join(stateDir, RECOVERY_DIR_NAME);
|
|
69892
|
-
if (
|
|
69892
|
+
if (syncFs.existsSync(recoveryDir)) censusRecoveryTree(sources, recoveryDir);
|
|
69893
69893
|
return sources.values();
|
|
69894
69894
|
}
|
|
69895
69895
|
/**
|
|
@@ -69973,7 +69973,7 @@ async function admitDurableKeyMappings(registry, listKeys, opts) {
|
|
|
69973
69973
|
await opts?.clearMappingSourcePath?.(mapping.agentId, mapping.sessionId).catch(() => void 0);
|
|
69974
69974
|
continue;
|
|
69975
69975
|
}
|
|
69976
|
-
const stats = await fs
|
|
69976
|
+
const stats = await fs.stat(mapping.sourcePath).catch(() => void 0);
|
|
69977
69977
|
if (!stats?.isFile()) continue;
|
|
69978
69978
|
registry.admit({
|
|
69979
69979
|
path: mapping.sourcePath,
|
|
@@ -70173,7 +70173,7 @@ function createLegacySourceRegistry() {
|
|
|
70173
70173
|
if (!isSettledReceipt(receipt, source.sizeBytes)) trackPendingPath(key, source);
|
|
70174
70174
|
return;
|
|
70175
70175
|
}
|
|
70176
|
-
const stats = await fs
|
|
70176
|
+
const stats = await fs.stat(key).catch(() => void 0);
|
|
70177
70177
|
if (!stats?.isFile() && receipt.status !== "imported") return;
|
|
70178
70178
|
admit({
|
|
70179
70179
|
path: key,
|
|
@@ -70413,12 +70413,12 @@ function canonicalSqliteIdentityPathSync(sqlitePath) {
|
|
|
70413
70413
|
for (let hops = 0; hops < MAX_SYMLINK_HOPS; hops += 1) {
|
|
70414
70414
|
let stats;
|
|
70415
70415
|
try {
|
|
70416
|
-
stats =
|
|
70416
|
+
stats = syncFs.lstatSync(current);
|
|
70417
70417
|
} catch {
|
|
70418
70418
|
return canonicalPathSync(current);
|
|
70419
70419
|
}
|
|
70420
70420
|
if (!stats.isSymbolicLink()) return canonicalPathSync(current);
|
|
70421
|
-
current = path.resolve(canonicalPathSync(path.dirname(current)),
|
|
70421
|
+
current = path.resolve(canonicalPathSync(path.dirname(current)), syncFs.readlinkSync(current));
|
|
70422
70422
|
}
|
|
70423
70423
|
return canonicalPathSync(sqlitePath);
|
|
70424
70424
|
}
|
|
@@ -70432,12 +70432,12 @@ function sleep$1(ms) {
|
|
|
70432
70432
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
70433
70433
|
}
|
|
70434
70434
|
function acquireKernelOwnerLock(lock) {
|
|
70435
|
-
|
|
70435
|
+
syncFs.mkdirSync(path.dirname(lock.lockPath), {
|
|
70436
70436
|
recursive: true,
|
|
70437
70437
|
mode: 448
|
|
70438
70438
|
});
|
|
70439
70439
|
try {
|
|
70440
|
-
|
|
70440
|
+
syncFs.closeSync(syncFs.openSync(lock.lockPath, "wx", 384));
|
|
70441
70441
|
} catch (err) {
|
|
70442
70442
|
if (err.code !== "EEXIST") throw err;
|
|
70443
70443
|
}
|
|
@@ -70471,7 +70471,7 @@ function closeSqliteQuietly(db) {
|
|
|
70471
70471
|
function releaseKernelOwnerLock(lock, db, info) {
|
|
70472
70472
|
try {
|
|
70473
70473
|
const current = readHolderSidecar(lock.sidecarPath);
|
|
70474
|
-
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt)
|
|
70474
|
+
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt) syncFs.rmSync(lock.sidecarPath, { force: true });
|
|
70475
70475
|
} finally {
|
|
70476
70476
|
closeSqliteQuietly(db);
|
|
70477
70477
|
}
|
|
@@ -70479,17 +70479,17 @@ function releaseKernelOwnerLock(lock, db, info) {
|
|
|
70479
70479
|
function writeHolderSidecar(sidecarPath, info) {
|
|
70480
70480
|
const temp = `${sidecarPath}.${process.pid}.tmp`;
|
|
70481
70481
|
try {
|
|
70482
|
-
const fd =
|
|
70482
|
+
const fd = syncFs.openSync(temp, "w", 384);
|
|
70483
70483
|
try {
|
|
70484
|
-
|
|
70485
|
-
|
|
70484
|
+
syncFs.writeFileSync(fd, `${JSON.stringify(info)}\n`);
|
|
70485
|
+
syncFs.fsyncSync(fd);
|
|
70486
70486
|
} finally {
|
|
70487
|
-
|
|
70487
|
+
syncFs.closeSync(fd);
|
|
70488
70488
|
}
|
|
70489
|
-
|
|
70489
|
+
syncFs.renameSync(temp, sidecarPath);
|
|
70490
70490
|
} catch (err) {
|
|
70491
70491
|
try {
|
|
70492
|
-
|
|
70492
|
+
syncFs.rmSync(temp, { force: true });
|
|
70493
70493
|
} catch {}
|
|
70494
70494
|
throw err;
|
|
70495
70495
|
}
|
|
@@ -70514,7 +70514,7 @@ function parseHolderSidecar(raw) {
|
|
|
70514
70514
|
function readHolderSidecar(sidecarPath) {
|
|
70515
70515
|
let raw;
|
|
70516
70516
|
try {
|
|
70517
|
-
raw =
|
|
70517
|
+
raw = syncFs.readFileSync(sidecarPath, "utf8");
|
|
70518
70518
|
} catch {
|
|
70519
70519
|
return;
|
|
70520
70520
|
}
|
|
@@ -70525,7 +70525,7 @@ async function readHolderSidecarBriefly(sidecarPath, timeoutMs = 1e3) {
|
|
|
70525
70525
|
for (;;) {
|
|
70526
70526
|
let raw;
|
|
70527
70527
|
try {
|
|
70528
|
-
raw =
|
|
70528
|
+
raw = syncFs.readFileSync(sidecarPath, "utf8");
|
|
70529
70529
|
} catch {
|
|
70530
70530
|
raw = void 0;
|
|
70531
70531
|
}
|
|
@@ -70689,7 +70689,7 @@ async function claimExclusivePartial(destPath) {
|
|
|
70689
70689
|
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
70690
70690
|
const candidate = `${destPath}.${process.pid}.${randomBytes(8).toString("hex")}.partial`;
|
|
70691
70691
|
try {
|
|
70692
|
-
await (await fs
|
|
70692
|
+
await (await fs.open(candidate, "wx", 384)).close();
|
|
70693
70693
|
return candidate;
|
|
70694
70694
|
} catch (err) {
|
|
70695
70695
|
if (err.code !== "EEXIST") throw err;
|
|
@@ -70708,7 +70708,7 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
70708
70708
|
const dbPath = path.resolve(params.dbPath);
|
|
70709
70709
|
const destPath = path.resolve(params.destPath);
|
|
70710
70710
|
for (const guarded of protectedLivePaths(dbPath)) if (sameFile$1(destPath, guarded)) throw new Error("backup destination must not be the live database or its owner lock, holder sidecar, or journal files");
|
|
70711
|
-
await fs
|
|
70711
|
+
await fs.mkdir(path.dirname(destPath), {
|
|
70712
70712
|
recursive: true,
|
|
70713
70713
|
mode: 448
|
|
70714
70714
|
});
|
|
@@ -70720,14 +70720,14 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
70720
70720
|
gated: sqliteBackupTestHooks.holdWorkerAtGate === true,
|
|
70721
70721
|
writableSource: false
|
|
70722
70722
|
});
|
|
70723
|
-
await fs
|
|
70723
|
+
await fs.rename(partialPath, destPath);
|
|
70724
70724
|
} catch (err) {
|
|
70725
|
-
await fs
|
|
70725
|
+
await fs.rm(partialPath, { force: true }).catch(() => {});
|
|
70726
70726
|
throw err;
|
|
70727
70727
|
}
|
|
70728
70728
|
return {
|
|
70729
70729
|
path: destPath,
|
|
70730
|
-
bytes: (await fs
|
|
70730
|
+
bytes: (await fs.stat(destPath)).size
|
|
70731
70731
|
};
|
|
70732
70732
|
}
|
|
70733
70733
|
|
|
@@ -70749,7 +70749,7 @@ const INCARNATION_SELECT_SQL = "SELECT id FROM ctx_legacy_import_incarnation LIM
|
|
|
70749
70749
|
async function readDbIncarnationId(dbPath) {
|
|
70750
70750
|
let db;
|
|
70751
70751
|
try {
|
|
70752
|
-
await fs
|
|
70752
|
+
await fs.stat(dbPath);
|
|
70753
70753
|
db = new DatabaseSync(dbPath);
|
|
70754
70754
|
const row = db.prepare(INCARNATION_SELECT_SQL).get();
|
|
70755
70755
|
return typeof row?.id === "string" ? row.id : void 0;
|
|
@@ -70801,7 +70801,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
70801
70801
|
const marked = await readSnapshotMarker(backupsDir, canonicalDbPath);
|
|
70802
70802
|
if (marked) return marked;
|
|
70803
70803
|
if ((await params.listReceipts()).length > 0) return;
|
|
70804
|
-
await fs
|
|
70804
|
+
await fs.mkdir(backupsDir, {
|
|
70805
70805
|
recursive: true,
|
|
70806
70806
|
mode: 448
|
|
70807
70807
|
});
|
|
@@ -70812,7 +70812,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
70812
70812
|
dbPath,
|
|
70813
70813
|
destPath
|
|
70814
70814
|
});
|
|
70815
|
-
if (dbId !== void 0) await fs
|
|
70815
|
+
if (dbId !== void 0) await fs.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
|
|
70816
70816
|
path: backup.path,
|
|
70817
70817
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
70818
70818
|
canonicalDbPath,
|
|
@@ -70830,17 +70830,17 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
70830
70830
|
*/
|
|
70831
70831
|
async function cleanupPartialLegacyBackups(stateDir) {
|
|
70832
70832
|
const backupsDir = path.join(stateDir, "backups");
|
|
70833
|
-
const names = await fs
|
|
70833
|
+
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
70834
70834
|
for (const name of names) {
|
|
70835
70835
|
if (!name.endsWith(".partial")) continue;
|
|
70836
|
-
await fs
|
|
70836
|
+
await fs.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
|
|
70837
70837
|
}
|
|
70838
70838
|
}
|
|
70839
70839
|
async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
70840
70840
|
const currentIncarnationId = await readDbIncarnationId(canonicalDbPath);
|
|
70841
70841
|
const keyed = await readMarkerFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), canonicalDbPath, currentIncarnationId);
|
|
70842
70842
|
if (keyed !== void 0) return keyed;
|
|
70843
|
-
const names = await fs
|
|
70843
|
+
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
70844
70844
|
for (const name of names) {
|
|
70845
70845
|
if (!name.startsWith(SNAPSHOT_MARKER_PREFIX) || !name.endsWith(".json")) continue;
|
|
70846
70846
|
const found = await readMarkerFile(path.join(backupsDir, name), canonicalDbPath, currentIncarnationId);
|
|
@@ -70849,7 +70849,7 @@ async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
|
70849
70849
|
return readMarkerFile(path.join(backupsDir, SNAPSHOT_MARKER_FILE), canonicalDbPath, currentIncarnationId);
|
|
70850
70850
|
}
|
|
70851
70851
|
async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId) {
|
|
70852
|
-
const raw = await fs
|
|
70852
|
+
const raw = await fs.readFile(markerFile, "utf8").catch(() => void 0);
|
|
70853
70853
|
if (!raw) return;
|
|
70854
70854
|
try {
|
|
70855
70855
|
const parsed = JSON.parse(raw);
|
|
@@ -70861,7 +70861,7 @@ async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId)
|
|
|
70861
70861
|
if (currentIncarnationId !== void 0 && currentIncarnationId === markerId) return markerPath;
|
|
70862
70862
|
return;
|
|
70863
70863
|
}
|
|
70864
|
-
const [markerStat, dbStat] = await Promise.all([fs
|
|
70864
|
+
const [markerStat, dbStat] = await Promise.all([fs.stat(markerDbPath).catch(() => void 0), fs.stat(canonicalDbPath).catch(() => void 0)]);
|
|
70865
70865
|
if (markerStat !== void 0 && dbStat !== void 0 ? markerStat.dev === dbStat.dev && markerStat.ino === dbStat.ino : markerDbPath === canonicalDbPath) return markerPath;
|
|
70866
70866
|
}
|
|
70867
70867
|
} catch {}
|
|
@@ -71127,7 +71127,7 @@ const log$17 = createSubsystemLogger("config/sessions/legacy-import/index-import
|
|
|
71127
71127
|
async function readLegacyIndexStore(storePath) {
|
|
71128
71128
|
let raw;
|
|
71129
71129
|
try {
|
|
71130
|
-
raw = await fs
|
|
71130
|
+
raw = await fs.readFile(storePath, "utf8");
|
|
71131
71131
|
} catch (error) {
|
|
71132
71132
|
throw new Error(`legacy index source unreadable: ${storePath}`, { cause: error });
|
|
71133
71133
|
}
|
|
@@ -71366,7 +71366,7 @@ async function importLegacyIndex(runtime, source, opts = {}) {
|
|
|
71366
71366
|
actorExplicit: entry.actor !== void 0
|
|
71367
71367
|
}), opts.signal);
|
|
71368
71368
|
if (transcriptPath && opts.discoveredTranscripts && path.resolve(transcriptPath) !== path.resolve(source.path)) try {
|
|
71369
|
-
const stats = await fs
|
|
71369
|
+
const stats = await fs.stat(transcriptPath);
|
|
71370
71370
|
if (stats.isFile()) opts.discoveredTranscripts.push({
|
|
71371
71371
|
path: transcriptPath,
|
|
71372
71372
|
kind: "transcript",
|
|
@@ -71482,7 +71482,7 @@ async function loadSessionKeyOverrides(stateDir) {
|
|
|
71482
71482
|
const filePath = path.join(stateDir, "recovery", SESSION_KEY_OVERRIDES_FILENAME);
|
|
71483
71483
|
let raw;
|
|
71484
71484
|
try {
|
|
71485
|
-
raw = await fs
|
|
71485
|
+
raw = await fs.readFile(filePath, "utf8");
|
|
71486
71486
|
} catch (error) {
|
|
71487
71487
|
if (error.code !== "ENOENT") log$15.warn("session key overrides unreadable; ignoring", { error });
|
|
71488
71488
|
return /* @__PURE__ */ new Map();
|
|
@@ -72959,14 +72959,14 @@ function isGatewayArgv(args) {
|
|
|
72959
72959
|
}
|
|
72960
72960
|
function readLinuxCmdline(pid) {
|
|
72961
72961
|
try {
|
|
72962
|
-
return parseProcCmdline(
|
|
72962
|
+
return parseProcCmdline(syncFs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
|
|
72963
72963
|
} catch {
|
|
72964
72964
|
return null;
|
|
72965
72965
|
}
|
|
72966
72966
|
}
|
|
72967
72967
|
function readLinuxStartTime(pid) {
|
|
72968
72968
|
try {
|
|
72969
|
-
const raw =
|
|
72969
|
+
const raw = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
|
|
72970
72970
|
const closeParen = raw.lastIndexOf(")");
|
|
72971
72971
|
if (closeParen < 0) return null;
|
|
72972
72972
|
const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
|
|
@@ -73020,7 +73020,7 @@ async function resolveGatewayOwnerStatus(pid, payload, platform, port) {
|
|
|
73020
73020
|
}
|
|
73021
73021
|
async function readLockPayload(lockPath) {
|
|
73022
73022
|
try {
|
|
73023
|
-
const raw = await fs
|
|
73023
|
+
const raw = await fs.readFile(lockPath, "utf8");
|
|
73024
73024
|
const parsed = JSON.parse(raw);
|
|
73025
73025
|
if (typeof parsed.pid !== "number") return null;
|
|
73026
73026
|
if (typeof parsed.createdAt !== "string") return null;
|
|
@@ -75953,7 +75953,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
75953
75953
|
}
|
|
75954
75954
|
async function checkReadableFile(pathname) {
|
|
75955
75955
|
try {
|
|
75956
|
-
await fs
|
|
75956
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
75957
75957
|
return { exists: true };
|
|
75958
75958
|
} catch (err) {
|
|
75959
75959
|
const code = err.code;
|
|
@@ -75988,7 +75988,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
75988
75988
|
if (alt.issue) issues.push(alt.issue);
|
|
75989
75989
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
75990
75990
|
for (const extraPath of resolvedExtraPaths) try {
|
|
75991
|
-
if ((await fs
|
|
75991
|
+
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
75992
75992
|
const extraCheck = await checkReadableFile(extraPath);
|
|
75993
75993
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
75994
75994
|
} catch (err) {
|
|
@@ -75998,7 +75998,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
75998
75998
|
}
|
|
75999
75999
|
let dirReadable = null;
|
|
76000
76000
|
try {
|
|
76001
|
-
await fs
|
|
76001
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
76002
76002
|
dirReadable = true;
|
|
76003
76003
|
} catch (err) {
|
|
76004
76004
|
const code = err.code;
|
|
@@ -76046,7 +76046,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
76046
76046
|
if (!dbPath) return null;
|
|
76047
76047
|
let stat;
|
|
76048
76048
|
try {
|
|
76049
|
-
stat = await fs
|
|
76049
|
+
stat = await fs.stat(dbPath);
|
|
76050
76050
|
} catch (err) {
|
|
76051
76051
|
const code = err.code;
|
|
76052
76052
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -76566,7 +76566,7 @@ function createPluginRuntime(options = {}) {
|
|
|
76566
76566
|
workStates: readTaskWorkStates
|
|
76567
76567
|
},
|
|
76568
76568
|
resolveLearningWorkspaceDir: (agentId) => resolveLearningWorkspaceDir(loadConfig(), agentId),
|
|
76569
|
-
sessions: { startUserRun: async (params) => (await import("./user-run-recording-
|
|
76569
|
+
sessions: { startUserRun: async (params) => (await import("./user-run-recording-CYg9LLHh.js").then((n) => n.n)).startUserSessionRun(params) }
|
|
76570
76570
|
};
|
|
76571
76571
|
Object.defineProperty(runtime, "analysis", {
|
|
76572
76572
|
enumerable: true,
|
|
@@ -76590,7 +76590,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
76590
76590
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
76591
76591
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
76592
76592
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
76593
|
-
for (const candidate of orderedCandidates) if (
|
|
76593
|
+
for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
|
|
76594
76594
|
const parent = path.dirname(cursor);
|
|
76595
76595
|
if (parent === cursor) break;
|
|
76596
76596
|
cursor = parent;
|
|
@@ -77147,7 +77147,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
77147
77147
|
continue;
|
|
77148
77148
|
}
|
|
77149
77149
|
const safeSource = opened.path;
|
|
77150
|
-
|
|
77150
|
+
syncFs.closeSync(opened.fd);
|
|
77151
77151
|
let mod = null;
|
|
77152
77152
|
try {
|
|
77153
77153
|
mod = getJiti()(safeSource);
|
|
@@ -77315,7 +77315,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
77315
77315
|
}
|
|
77316
77316
|
function safeRealpathOrResolve(value) {
|
|
77317
77317
|
try {
|
|
77318
|
-
return
|
|
77318
|
+
return syncFs.realpathSync(value);
|
|
77319
77319
|
} catch {
|
|
77320
77320
|
return path.resolve(value);
|
|
77321
77321
|
}
|
|
@@ -77473,7 +77473,7 @@ function resolvePluginWebSearchProviders(params) {
|
|
|
77473
77473
|
//#endregion
|
|
77474
77474
|
//#region src/agents/apply-patch-update.ts
|
|
77475
77475
|
async function defaultReadFile(filePath) {
|
|
77476
|
-
return fs
|
|
77476
|
+
return fs.readFile(filePath, "utf8");
|
|
77477
77477
|
}
|
|
77478
77478
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
77479
77479
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -77794,7 +77794,7 @@ function resolvePatchFileOps(options) {
|
|
|
77794
77794
|
const workspaceOnly = options.workspaceOnly !== false;
|
|
77795
77795
|
return {
|
|
77796
77796
|
readFile: async (filePath) => {
|
|
77797
|
-
if (!workspaceOnly) return await fs
|
|
77797
|
+
if (!workspaceOnly) return await fs.readFile(filePath, "utf8");
|
|
77798
77798
|
const opened = await openBoundaryFile({
|
|
77799
77799
|
absolutePath: filePath,
|
|
77800
77800
|
rootPath: options.cwd,
|
|
@@ -77802,14 +77802,14 @@ function resolvePatchFileOps(options) {
|
|
|
77802
77802
|
});
|
|
77803
77803
|
assertBoundaryRead(opened, filePath);
|
|
77804
77804
|
try {
|
|
77805
|
-
return
|
|
77805
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
77806
77806
|
} finally {
|
|
77807
|
-
|
|
77807
|
+
syncFs.closeSync(opened.fd);
|
|
77808
77808
|
}
|
|
77809
77809
|
},
|
|
77810
77810
|
writeFile: async (filePath, content) => {
|
|
77811
77811
|
if (!workspaceOnly) {
|
|
77812
|
-
await fs
|
|
77812
|
+
await fs.writeFile(filePath, content, "utf8");
|
|
77813
77813
|
return;
|
|
77814
77814
|
}
|
|
77815
77815
|
const relative = toRelativeSandboxPath(options.cwd, filePath);
|
|
@@ -77820,8 +77820,8 @@ function resolvePatchFileOps(options) {
|
|
|
77820
77820
|
encoding: "utf8"
|
|
77821
77821
|
});
|
|
77822
77822
|
},
|
|
77823
|
-
remove: (filePath) => fs
|
|
77824
|
-
mkdirp: (dir) => fs
|
|
77823
|
+
remove: (filePath) => fs.rm(filePath),
|
|
77824
|
+
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
77825
77825
|
};
|
|
77826
77826
|
}
|
|
77827
77827
|
async function ensureDir(filePath, ops) {
|
|
@@ -78100,7 +78100,7 @@ async function recordLoopOutcome(args) {
|
|
|
78100
78100
|
if (!args.ctx?.sessionKey) return;
|
|
78101
78101
|
try {
|
|
78102
78102
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Di8oqY0E.js").then((n) => n.n);
|
|
78103
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
78103
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-CUWKSyGf.js");
|
|
78104
78104
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
78105
78105
|
sessionKey: args.ctx.sessionKey,
|
|
78106
78106
|
sessionId: args.ctx?.agentId
|
|
@@ -78127,8 +78127,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
78127
78127
|
const params = args.params;
|
|
78128
78128
|
if (args.ctx?.sessionKey) {
|
|
78129
78129
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Di8oqY0E.js").then((n) => n.n);
|
|
78130
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
78131
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
78130
|
+
const { logToolLoopAction } = await import("./diagnostic-CeSjaots.js").then((n) => n.n);
|
|
78131
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-CUWKSyGf.js");
|
|
78132
78132
|
const sessionState = getDiagnosticSessionState({
|
|
78133
78133
|
sessionKey: args.ctx.sessionKey,
|
|
78134
78134
|
sessionId: args.ctx?.agentId
|
|
@@ -78470,10 +78470,10 @@ function createWorkspaceDeleteTool(params) {
|
|
|
78470
78470
|
containWithinHostRoot: root
|
|
78471
78471
|
}).catch(async (error) => {
|
|
78472
78472
|
if (String(error).includes("No such file or directory")) throw Object.assign(/* @__PURE__ */ new Error(`Sandbox FS error (ENOENT): ${display}`), { code: "ENOENT" });
|
|
78473
|
-
if (await fs
|
|
78473
|
+
if (await fs.lstat(contained.resolved).then((stats) => stats.isDirectory() ? stats : null, () => null)) throw Object.assign(/* @__PURE__ */ new Error(`Sandbox FS error (EISDIR): ${display}`), { code: "EISDIR" });
|
|
78474
78474
|
throw error;
|
|
78475
78475
|
});
|
|
78476
|
-
else await fs
|
|
78476
|
+
else await fs.unlink(contained.resolved);
|
|
78477
78477
|
return {
|
|
78478
78478
|
content: [{
|
|
78479
78479
|
type: "text",
|
|
@@ -78868,14 +78868,14 @@ function createSandboxEditOperations(params) {
|
|
|
78868
78868
|
}
|
|
78869
78869
|
async function writeHostFile(absolutePath, content) {
|
|
78870
78870
|
const resolved = path.resolve(absolutePath);
|
|
78871
|
-
await fs
|
|
78872
|
-
await fs
|
|
78871
|
+
await fs.mkdir(path.dirname(resolved), { recursive: true });
|
|
78872
|
+
await fs.writeFile(resolved, content, "utf-8");
|
|
78873
78873
|
}
|
|
78874
78874
|
function createHostWriteOperations(root, options) {
|
|
78875
78875
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
78876
78876
|
mkdir: async (dir) => {
|
|
78877
78877
|
const resolved = path.resolve(dir);
|
|
78878
|
-
await fs
|
|
78878
|
+
await fs.mkdir(resolved, { recursive: true });
|
|
78879
78879
|
},
|
|
78880
78880
|
writeFile: writeHostFile
|
|
78881
78881
|
};
|
|
@@ -78888,7 +78888,7 @@ function createHostWriteOperations(root, options) {
|
|
|
78888
78888
|
cwd: root,
|
|
78889
78889
|
root
|
|
78890
78890
|
});
|
|
78891
|
-
await fs
|
|
78891
|
+
await fs.mkdir(resolved, { recursive: true });
|
|
78892
78892
|
},
|
|
78893
78893
|
writeFile: async (absolutePath, content) => {
|
|
78894
78894
|
await writeFileWithinRoot({
|
|
@@ -78904,12 +78904,12 @@ function createHostEditOperations(root, options) {
|
|
|
78904
78904
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
78905
78905
|
readFile: async (absolutePath) => {
|
|
78906
78906
|
const resolved = path.resolve(absolutePath);
|
|
78907
|
-
return await fs
|
|
78907
|
+
return await fs.readFile(resolved);
|
|
78908
78908
|
},
|
|
78909
78909
|
writeFile: writeHostFile,
|
|
78910
78910
|
access: async (absolutePath) => {
|
|
78911
78911
|
const resolved = path.resolve(absolutePath);
|
|
78912
|
-
await fs
|
|
78912
|
+
await fs.access(resolved);
|
|
78913
78913
|
}
|
|
78914
78914
|
};
|
|
78915
78915
|
return {
|
|
@@ -80088,9 +80088,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
80088
80088
|
if (!opened.ok) return "";
|
|
80089
80089
|
const sections = extractSections((() => {
|
|
80090
80090
|
try {
|
|
80091
|
-
return
|
|
80091
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
80092
80092
|
} finally {
|
|
80093
|
-
|
|
80093
|
+
syncFs.closeSync(opened.fd);
|
|
80094
80094
|
}
|
|
80095
80095
|
})(), ["Session Startup", "Red Lines"]);
|
|
80096
80096
|
if (sections.length === 0) return "";
|
|
@@ -81723,14 +81723,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
81723
81723
|
if (!apiKeyInfo.apiKey) {
|
|
81724
81724
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
81725
81725
|
} else if (model.provider === "github-copilot") {
|
|
81726
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
81726
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-C-29TbW-.js").then((n) => n.n);
|
|
81727
81727
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
81728
81728
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
81729
81729
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
81730
81730
|
} catch (err) {
|
|
81731
81731
|
return fail(describeUnknownError(err));
|
|
81732
81732
|
}
|
|
81733
|
-
await fs
|
|
81733
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
81734
81734
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
81735
81735
|
const sandbox = await resolveSandboxContext({
|
|
81736
81736
|
config: params.config,
|
|
@@ -81739,7 +81739,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
81739
81739
|
workspaceLane: params.workspaceLane
|
|
81740
81740
|
});
|
|
81741
81741
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
81742
|
-
await fs
|
|
81742
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
81743
81743
|
let restoreSkillEnv;
|
|
81744
81744
|
const releaseWorkspaceCwd = acquireWorkspaceCwd(effectiveWorkspace);
|
|
81745
81745
|
try {
|
|
@@ -82975,7 +82975,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
82975
82975
|
* Throws if the connection is not open.
|
|
82976
82976
|
*/
|
|
82977
82977
|
send(event) {
|
|
82978
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
82978
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
82979
82979
|
this.ws.send(JSON.stringify(event));
|
|
82980
82980
|
}
|
|
82981
82981
|
/**
|
|
@@ -82992,7 +82992,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
82992
82992
|
* Returns true if the WebSocket is currently open and ready to send.
|
|
82993
82993
|
*/
|
|
82994
82994
|
isConnected() {
|
|
82995
|
-
return this.ws !== null && this.ws.readyState === WebSocket
|
|
82995
|
+
return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
|
|
82996
82996
|
}
|
|
82997
82997
|
/**
|
|
82998
82998
|
* Permanently closes the WebSocket connection and disables auto-reconnect.
|
|
@@ -83002,7 +83002,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
83002
83002
|
this._cancelRetryTimer();
|
|
83003
83003
|
if (this.ws) {
|
|
83004
83004
|
this.ws.removeAllListeners();
|
|
83005
|
-
if (this.ws.readyState === WebSocket
|
|
83005
|
+
if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
83006
83006
|
this.ws = null;
|
|
83007
83007
|
}
|
|
83008
83008
|
}
|
|
@@ -83012,7 +83012,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
83012
83012
|
reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
|
|
83013
83013
|
return;
|
|
83014
83014
|
}
|
|
83015
|
-
const socket = new WebSocket
|
|
83015
|
+
const socket = new WebSocket(this.wsUrl, { headers: {
|
|
83016
83016
|
Authorization: `Bearer ${this.apiKey}`,
|
|
83017
83017
|
"OpenAI-Beta": "responses-websocket=v1"
|
|
83018
83018
|
} });
|
|
@@ -89266,7 +89266,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
89266
89266
|
let embeddedAttemptBegun = false;
|
|
89267
89267
|
const runAbortController = new AbortController();
|
|
89268
89268
|
log$51.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
89269
|
-
await fs
|
|
89269
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
89270
89270
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
89271
89271
|
const toolSessionKey = params.toolSessionKey?.trim() || sandboxSessionKey;
|
|
89272
89272
|
const sandbox = params.skipSandbox ? null : await resolveSandboxContext({
|
|
@@ -89276,7 +89276,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
89276
89276
|
workspaceLane: params.workspaceLane
|
|
89277
89277
|
});
|
|
89278
89278
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
89279
|
-
await fs
|
|
89279
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
89280
89280
|
let restoreSkillEnv;
|
|
89281
89281
|
const releaseWorkspaceCwd = params.skipCwdChange ? void 0 : acquireWorkspaceCwd(effectiveWorkspace);
|
|
89282
89282
|
const rawToolResultStash = openRawToolResultStash(params.sessionId);
|
|
@@ -90171,7 +90171,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
90171
90171
|
await copilotTokenState.refreshInFlight;
|
|
90172
90172
|
return;
|
|
90173
90173
|
}
|
|
90174
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
90174
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-C-29TbW-.js").then((n) => n.n);
|
|
90175
90175
|
copilotTokenState.refreshInFlight = (async () => {
|
|
90176
90176
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
90177
90177
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -90263,7 +90263,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
90263
90263
|
return;
|
|
90264
90264
|
}
|
|
90265
90265
|
if (model.provider === "github-copilot") {
|
|
90266
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
90266
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-C-29TbW-.js").then((n) => n.n);
|
|
90267
90267
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
90268
90268
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
90269
90269
|
if (copilotTokenState) {
|
|
@@ -90387,7 +90387,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
90387
90387
|
const copilotAuthRetry = authRetryPending;
|
|
90388
90388
|
authRetryPending = false;
|
|
90389
90389
|
attemptedThinking.add(thinkLevel);
|
|
90390
|
-
await fs
|
|
90390
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
90391
90391
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
90392
90392
|
const attempt = await runEmbeddedAttempt({
|
|
90393
90393
|
sessionId: params.sessionId,
|