wednesdayai 0.4.12-dev.703 → 0.4.12-dev.705
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -37
- package/dist/{agent-scope-F7drwIgy.js → agent-scope-BGnYrze_.js} +3 -3
- package/dist/{agent-turn-runner-nWCLOjLp.js → agent-turn-runner-BpzPb_LQ.js} +5 -5
- package/dist/{agent-turn-runner-B-7YUyze.js → agent-turn-runner-CLScSQoW.js} +3 -3
- package/dist/{api-key-rotation-BP2NSDlP.js → api-key-rotation-C04Xj5nW.js} +2 -2
- package/dist/{audio-preflight-BqDFj2Ws.js → audio-preflight-BXfuOHLv.js} +27 -27
- package/dist/{audio-preflight-BXVADGV1.js → audio-preflight-D9KtmJay.js} +5 -5
- package/dist/{audio-transcription-runner-SSnrYiq8.js → audio-transcription-runner-BA6t6iSO.js} +11 -11
- package/dist/{audio-transcription-runner-rzX-3s-8.js → audio-transcription-runner-CdwSTFuT.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +58 -58
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +58 -58
- package/dist/bundled/session-memory/handler.js +58 -58
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-IR8qx5kt.js → channel-activity-BVqxcijC.js} +3 -3
- package/dist/{chrome-BWMtx0mE.js → chrome-CGClRujb.js} +25 -25
- package/dist/{chrome-Dc923fsB.js → chrome-CTyhKrVS.js} +6 -6
- package/dist/{chunk-CuqMDQNC.js → chunk-odx78Acg.js} +3 -3
- package/dist/{command-queue-9A3kOAZN.js → command-queue-DKPv7dYN.js} +1 -1
- package/dist/{command-queue-Dbv34rZN.js → command-queue-o1awgKih.js} +1 -1
- package/dist/{commands-registry-gy0GLwWR.js → commands-registry-BEs7FrhT.js} +2 -2
- package/dist/{deliver-Co_a29nB.js → deliver-Bs58Ncxn.js} +1 -1
- package/dist/{deliver-C4Z63vgB.js → deliver-DrmyBByg.js} +24 -24
- package/dist/{diagnostic-Cfb2ONnX.js → diagnostic-Ba0VUozS.js} +1 -1
- package/dist/{diagnostic-BHAlpG8z.js → diagnostic-DmBrpD9P.js} +5 -5
- package/dist/extensionAPI.js +12 -12
- package/dist/{fetch-JP3BwRE3.js → fetch-DvY0ue_6.js} +8 -8
- package/dist/{fetch-guard-C4lEpM_9.js → fetch-guard-ri_5BFBs.js} +3 -3
- package/dist/{frontmatter-CNGr4YHw.js → frontmatter-Cw33lRgS.js} +3 -3
- package/dist/{fs-safe-BJgtqC5p.js → fs-safe-BNnzOM9C.js} +4 -4
- package/dist/{github-copilot-token-zGOMIGSh.js → github-copilot-token-WSjo05vB.js} +7 -7
- package/dist/{image-ops-B--THHJC.js → image-ops-pgAg_j4y.js} +1 -1
- package/dist/{ir-tsZDlE0-.js → ir-BHU3uh9A.js} +5 -5
- package/dist/{legacy-names-CBlBMsC7.js → legacy-names-DFLXH7MA.js} +1 -1
- package/dist/llm-slug-generator.js +58 -58
- package/dist/{logger-D7ojOVG0.js → logger-CkGiQRm7.js} +1 -1
- package/dist/{manager-nGC13TuB.js → manager-BUV9VkNZ.js} +12 -12
- package/dist/{markdown-tables-D9T2Ko0c.js → markdown-tables-D6t-eoFa.js} +2 -2
- package/dist/{model-selection-DZMms8JA.js → model-selection-DhXu1Q4_.js} +82 -82
- package/dist/{outbound-attachment-6FKwUHkE.js → outbound-attachment-C6U86gij.js} +2 -2
- package/dist/{outbound-message-hooks-CN_2VR3u.js → outbound-message-hooks-ClZq2IiI.js} +3 -3
- package/dist/{path-alias-guards-Bpl7jW13.js → path-alias-guards-y8gxUSMu.js} +1 -1
- package/dist/{paths-C6TxBCvO.js → paths-Cvc9EM8Y.js} +5 -5
- package/dist/{pi-embedded-CQloEk2m.js → pi-embedded-Cklnkha9.js} +167 -167
- package/dist/{pi-embedded-tUqWFr9c.js → pi-embedded-DHw7Di5R.js} +28 -28
- package/dist/{pi-embedded-helpers-BvZj1LkK.js → pi-embedded-helpers-4qLKF7Ti.js} +3 -3
- package/dist/{pi-embedded-helpers-BEYLnz1t.js → pi-embedded-helpers-DYlkCsNL.js} +24 -24
- package/dist/{pi-embedded-utils-BgW57VPl.js → pi-embedded-utils-CHJI4-m4.js} +1 -1
- package/dist/{pi-embedded-utils-Cff_00Q1.js → pi-embedded-utils-DGuyV3oI.js} +3 -3
- package/dist/{pi-model-discovery-DWGauIf8.js → pi-model-discovery-C3dMscCT.js} +7 -7
- package/dist/plugin-sdk/{agent-scope-oQ89afhJ.js → agent-scope-DuxkVlZ-.js} +2 -2
- package/dist/plugin-sdk/agent-turn-execute-BDRcxLgW.js +61 -0
- package/dist/plugin-sdk/{agent-turn-runner-CDH2OClz.js → agent-turn-runner-BJWQz-gA.js} +6 -6
- package/dist/plugin-sdk/agent-turn-runner-CzRmfMqm.js +11 -0
- package/dist/plugin-sdk/{api-key-rotation-DBFUeaE4.js → api-key-rotation-BYZhrCU3.js} +2 -2
- package/dist/plugin-sdk/{artifacts-CsH5S6T7.js → artifacts-BR0G7jgh.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-DT1RNzj0.js → audio-preflight-BOlD50bz.js} +2 -2
- package/dist/plugin-sdk/audio-preflight-CTGR5Hsd.js +28 -0
- package/dist/plugin-sdk/{audio-transcription-runner-CNdDOHDD.js → audio-transcription-runner-DEwdraKH.js} +10 -10
- package/dist/plugin-sdk/{auth-profiles-C5n3KjJR.js → auth-profiles-B80FVM6n.js} +5 -5
- package/dist/plugin-sdk/{channel-activity-CQ4sk3hC.js → channel-activity-CPP4IJ8j.js} +3 -3
- package/dist/plugin-sdk/{chrome-DgUMKrr1.js → chrome-Dio0wrAv.js} +4 -4
- package/dist/plugin-sdk/{chunk-BIyxDSyO.js → chunk-BjBBoHSQ.js} +6 -6
- package/dist/plugin-sdk/{chunk-CeoUVs5K.js → chunk-CXNOkk_w.js} +3 -3
- package/dist/plugin-sdk/{command-detection-QNHptKSJ.js → command-detection-C2mTIN0M.js} +85 -85
- package/dist/plugin-sdk/{command-queue-DNiG-3U6.js → command-queue-DRNi0Iq1.js} +8 -8
- package/dist/plugin-sdk/{command-queue-Df7MhgUx.js → command-queue-oI3bsfFo.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-CA1olmQZ.js → commands-registry-B5LWTAu3.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-osjh0Rhk.js → commands-registry-CjulKOu8.js} +6 -6
- package/dist/plugin-sdk/{config-DOY8NkH8.js → config-CFfrK92W.js} +7 -7
- package/dist/plugin-sdk/deliver-Dk3XJhoF.js +32 -0
- package/dist/plugin-sdk/{deliver-Jovxpus7.js → deliver-NV7I9o8B.js} +11 -11
- package/dist/plugin-sdk/{diagnostic-DHcuLQ06.js → diagnostic-5AC0iM1n.js} +7 -7
- package/dist/plugin-sdk/{diagnostic-BwHttr8I.js → diagnostic-CLEhveRO.js} +5 -5
- package/dist/plugin-sdk/{fetch-guard-D39-ff0z.js → fetch-guard-BzugbfpZ.js} +3 -3
- package/dist/plugin-sdk/{fs-safe-DwFzR-43.js → fs-safe-BbukgmJs.js} +3 -3
- package/dist/plugin-sdk/{hook-runner-global-7dXl1XmR.js → hook-runner-global-B14CF25I.js} +2 -2
- package/dist/plugin-sdk/{image-ops-BRc6SYbt.js → image-ops-Deabe2XL.js} +1 -1
- package/dist/plugin-sdk/index.js +54 -54
- package/dist/plugin-sdk/{ir-C76Butsn.js → ir-DvNnbzRJ.js} +5 -5
- package/dist/plugin-sdk/{local-roots-Bj6ufCy4.js → local-roots-K7o6fRdl.js} +7 -7
- package/dist/plugin-sdk/{logger-k-GQ-YhX.js → logger-qbelrLm7.js} +1 -1
- package/dist/plugin-sdk/{manager-D_xKED_P.js → manager-CtpBjZ6_.js} +8 -8
- package/dist/plugin-sdk/manager-nDSdkr_r.js +16 -0
- package/dist/plugin-sdk/markdown-tables-4LuMGoDL.js +10 -0
- package/dist/plugin-sdk/{markdown-tables-nC8ncMEv.js → markdown-tables-DK-jmrsM.js} +2 -2
- package/dist/plugin-sdk/{outbound-attachment-DYb2ouJr.js → outbound-attachment-765m3HRN.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-DuUj5pOa.js → path-alias-guards-DXgdWlVV.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-DxreQHBo.js → pi-embedded-helpers-BHyLigAA.js} +11 -11
- package/dist/plugin-sdk/{pi-embedded-utils-CuF2a8B_.js → pi-embedded-utils-Bm-VMQvJ.js} +3 -3
- package/dist/plugin-sdk/{pi-model-discovery-vyiJ0WCg.js → pi-model-discovery-BHxWerwc.js} +6 -6
- package/dist/plugin-sdk/{pi-model-discovery-lbme_6ZY.js → pi-model-discovery-CtIzq4SZ.js} +1 -1
- package/dist/plugin-sdk/provider-dispatcher-W1pkLKIg.js +61 -0
- package/dist/plugin-sdk/provider-image-BXeNvw5h.js +22 -0
- package/dist/plugin-sdk/{provider-image-DmOszP1h.js → provider-image-DdGFXNcm.js} +5 -5
- package/dist/plugin-sdk/proxy-Bem5Ja8O.js +7 -0
- package/dist/plugin-sdk/{proxy-fetch-DR97MzBf.js → proxy-fetch-tDXPwHrY.js} +1 -1
- package/dist/plugin-sdk/{proxy-sWIy8aWT.js → proxy-vuhge5P0.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-Co1cAo_x.js → pw-ai-CVqwMy3L.js} +10 -10
- package/dist/plugin-sdk/{qmd-manager-BUZkDo-2.js → qmd-manager-CbKMbQqy.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-Dd_SnHAV.js → query-expansion-Czn3UuZE.js} +3 -3
- package/dist/plugin-sdk/{recorder-fSGqEPiN.js → recorder-B8eUr4qo.js} +4 -4
- package/dist/plugin-sdk/{redact-BqJzVqZS.js → redact-BN7L2dg6.js} +1 -1
- package/dist/plugin-sdk/replies-BOUte8J3.js +25 -0
- package/dist/plugin-sdk/{replies-D1R5YpXH.js → replies-Dq8vnfCv.js} +4 -4
- package/dist/plugin-sdk/{reply-directives-C2CFDtpy.js → reply-directives-D-GVQbm2.js} +2 -2
- package/dist/plugin-sdk/{reply-prefix-Vmv16GEM.js → reply-prefix-BnhAAeIw.js} +1 -1
- package/dist/plugin-sdk/reply-prefix-CyT5pXEH.js +7 -0
- package/dist/plugin-sdk/{resolve-route-Bm-xctoN.js → resolve-route-B-_3aGVu.js} +6 -6
- package/dist/plugin-sdk/{resolve-route-Cpk4y9HZ.js → resolve-route-DzFbdLUE.js} +4 -4
- package/dist/plugin-sdk/runs-BgcfLuqD.js +25 -0
- package/dist/plugin-sdk/{runs-B08Pf58t.js → runs-GYfRm1wm.js} +7 -7
- package/dist/plugin-sdk/{send-9tt88Cos.js → send-B5n5UHEj.js} +19 -19
- package/dist/plugin-sdk/send-CRsXDc8m.js +24 -0
- package/dist/plugin-sdk/{send-BQ2_sGJc.js → send-CilSx61t.js} +13 -13
- package/dist/plugin-sdk/{send-DGLXr2LH.js → send-D9b2K_jS.js} +8 -8
- package/dist/plugin-sdk/send-DGIuROFn.js +23 -0
- package/dist/plugin-sdk/send-DWgKIysx.js +27 -0
- package/dist/plugin-sdk/{send-BLYC96aw.js → send-Dp2tRhNb.js} +6 -6
- package/dist/plugin-sdk/send-RwdG7mzi.js +25 -0
- package/dist/plugin-sdk/{send-DK8kuk3o.js → send-Y056GDch.js} +6 -6
- package/dist/plugin-sdk/{send-CFqkd3U6.js → send-xTho5Weh.js} +7 -7
- package/dist/plugin-sdk/{session-meta-Bgk5sfbA.js → session-meta-D7wvEO0P.js} +2 -2
- package/dist/plugin-sdk/session-meta-J9PgeT7E.js +10 -0
- package/dist/plugin-sdk/{skill-commands-BYl06bB2.js → skill-commands-C6GZcZCO.js} +5 -5
- package/dist/plugin-sdk/skill-commands-DBvWVUnQ.js +14 -0
- package/dist/plugin-sdk/{skills-Cxhgf7RS.js → skills-CjJsBgbl.js} +6 -6
- package/dist/plugin-sdk/{ssrf-C6tFUn-U.js → ssrf-DR9xWewb.js} +2 -2
- package/dist/plugin-sdk/{store-yyHwOn7K.js → store-Bt0zQRQl.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-79qX0iO4.js +61 -0
- package/dist/plugin-sdk/{subsystem-D7nM2AoW.js → subsystem-B8AkdtCZ.js} +4 -4
- package/dist/plugin-sdk/{tables-CAn8Uiv7.js → tables-DHN3rZ24.js} +1 -1
- package/dist/plugin-sdk/{tokens-cnVX9Q87.js → tokens-D7bndIFM.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-fff6kmkP.js → tool-loop-detection-VTqBeC_h.js} +1 -1
- package/dist/plugin-sdk/user-run-recording-B_LG8df9.js +11 -0
- package/dist/plugin-sdk/{user-run-recording-BgXqB78i.js → user-run-recording-CQENQmgV.js} +2 -2
- package/dist/{provider-image-tTArxp_m.js → provider-image-BfLbSFcG.js} +5 -5
- package/dist/{provider-image-Cn_5jslf.js → provider-image-CtDp01Fm.js} +1 -1
- package/dist/{proxy-B2bQVN0b.js → proxy-CJMip70P.js} +1 -1
- package/dist/{proxy-env-b209l87p.js → proxy-env-BBllD0qI.js} +2 -2
- package/dist/{proxy-fetch-CNzfDJKL.js → proxy-fetch-C4a8MwFs.js} +1 -1
- package/dist/{pw-ai-Dt4AEbVC.js → pw-ai-5UgHGA7x.js} +14 -14
- package/dist/{pw-ai-CZUfhsmk.js → pw-ai-Dmtqq3b6.js} +1 -1
- package/dist/{qmd-manager-Bk4YLrFZ.js → qmd-manager-yHQXCPr6.js} +10 -10
- package/dist/{query-expansion-DKwGIeDe.js → query-expansion-DJVKyeDw.js} +5 -5
- package/dist/{recorder-BWzqo70i.js → recorder-BESd9rZt.js} +4 -4
- package/dist/{redact-BFxpQajB.js → redact-D8fpDrdk.js} +1 -1
- package/dist/{replies-BKYeJ-lN.js → replies-LVVUM-gg.js} +4 -4
- package/dist/{reply-directives-MtuQmZ3x.js → reply-directives-CZPJmH1t.js} +2 -2
- package/dist/{reply-prefix-BivNEMUT.js → reply-prefix-r6A18fKP.js} +1 -1
- package/dist/{resolve-route-BxKedPkn.js → resolve-route-Cnxsmfj5.js} +5 -5
- package/dist/{run-with-concurrency-DNTVyFZm.js → run-with-concurrency-VoSJL2UI.js} +4 -4
- package/dist/{runs-B5jL-JGA.js → runs-BKXuFolN.js} +3 -3
- package/dist/{runs-Bfd3xo6Q.js → runs-Dgl9DXVG.js} +8 -8
- package/dist/{send-Bo-flx6B.js → send-BWsYS2bT.js} +1 -1
- package/dist/{send-DEMG5oDJ.js → send-C0_Cahgz.js} +8 -8
- package/dist/{send-is_ecMF8.js → send-C6j-WuJq.js} +25 -25
- package/dist/{send-DWgzW_VE.js → send-CyDzxMSP.js} +6 -6
- package/dist/{send-7ZbQnb3_.js → send-D8garnHE.js} +7 -7
- package/dist/{send-BxB9kMh0.js → send-DTHoJI7v.js} +6 -6
- package/dist/{session-meta-Bq4VCJl1.js → session-meta-Du0u83SI.js} +2 -2
- package/dist/{skill-commands-BeW5zYf3.js → skill-commands-DycP7LkE.js} +9 -9
- package/dist/{skills-CoDdFrlM.js → skills-C-1FVOPz.js} +21 -21
- package/dist/{store-BMD4fV1_.js → store-q3G7wCsG.js} +2 -2
- package/dist/{subsystem-CtVr6mhM.js → subsystem-iTNW5QQR.js} +60 -60
- package/dist/{tables-77QYYFpZ.js → tables-Epd9B-UQ.js} +1 -1
- package/dist/{tokens-Cu6l17bG.js → tokens-iu44eB15.js} +1 -1
- package/dist/{tool-loop-detection-CyJWzj_y.js → tool-loop-detection-B_CTZm9s.js} +2 -2
- package/dist/{user-run-recording-_9PhRwgi.js → user-run-recording-DU3V9-R7.js} +2 -2
- package/dist/{workspace-DNApJm8a.js → workspace-TtYCbjn0.js} +9 -9
- 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/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/learning-core/index.ts +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/learning-core/src/learning-schema.test.ts +1 -1
- package/extensions/learning-core/src/types.ts +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/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/plugin-sdk/agent-turn-execute-MCfUSNAn.js +0 -61
- package/dist/plugin-sdk/agent-turn-runner-CxTKSm01.js +0 -11
- package/dist/plugin-sdk/audio-preflight-CvfZay92.js +0 -28
- package/dist/plugin-sdk/deliver-Cvf-McDg.js +0 -32
- package/dist/plugin-sdk/manager-BxgZBJqX.js +0 -16
- package/dist/plugin-sdk/markdown-tables-BfxWyPNL.js +0 -10
- package/dist/plugin-sdk/provider-dispatcher-CmuWLups.js +0 -61
- package/dist/plugin-sdk/provider-image-QXB69xur.js +0 -22
- package/dist/plugin-sdk/proxy-D8NLdDcu.js +0 -7
- package/dist/plugin-sdk/replies-CFdGwJzf.js +0 -25
- package/dist/plugin-sdk/reply-prefix-BNDj6UL_.js +0 -7
- package/dist/plugin-sdk/runs-DYKrmhVM.js +0 -25
- package/dist/plugin-sdk/send-CnAE3Jo0.js +0 -24
- package/dist/plugin-sdk/send-D0F57nZU.js +0 -23
- package/dist/plugin-sdk/send-DiZVGsNc.js +0 -27
- package/dist/plugin-sdk/send-Q46WVgnx.js +0 -25
- package/dist/plugin-sdk/session-meta-GZHIw3Fv.js +0 -10
- package/dist/plugin-sdk/skill-commands-CQmHbw9e.js +0 -14
- package/dist/plugin-sdk/subagent-registry-C5F7F59N.js +0 -61
- package/dist/plugin-sdk/user-run-recording-ZaA2WM4L.js +0 -11
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-
|
|
3
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-
|
|
4
|
-
import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$1, J as MissingEnvVarError, M as isPathInside$2, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, w as createFileLogWriter } from "./subsystem-
|
|
2
|
+
import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-BGnYrze_.js";
|
|
3
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-Cvc9EM8Y.js";
|
|
4
|
+
import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$1, J as MissingEnvVarError, M as isPathInside$2, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, w as createFileLogWriter } from "./subsystem-iTNW5QQR.js";
|
|
5
5
|
import { t as isPlainObject$2 } from "./plain-object-CLm2c5Nu.js";
|
|
6
|
-
import { E as normalizeMainKey, F as normalizeAccountId$1, H as parseAgentSessionKey, I as normalizeOptionalAccountId, P as DEFAULT_ACCOUNT_ID, T as normalizeAgentId, _ as runExec, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID } from "./workspace-
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-
|
|
8
|
-
import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-
|
|
9
|
-
import { a as parseSessionArchiveTimestamp, c as resolveSessionFilePath, d as resolveSessionTranscriptPathInDir, i as isSessionArchiveArtifactName, n as formatSessionArchiveTimestamp, p as resolveStorePath, r as isPrimarySessionTranscriptFileName, s as resolveDefaultSessionStorePath, t as runTasksWithConcurrency, u as resolveSessionTranscriptPath } from "./run-with-concurrency-
|
|
6
|
+
import { E as normalizeMainKey, F as normalizeAccountId$1, H as parseAgentSessionKey, I as normalizeOptionalAccountId, P as DEFAULT_ACCOUNT_ID, T as normalizeAgentId, _ as runExec, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID } from "./workspace-TtYCbjn0.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-WSjo05vB.js";
|
|
8
|
+
import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-DFLXH7MA.js";
|
|
9
|
+
import { a as parseSessionArchiveTimestamp, c as resolveSessionFilePath, d as resolveSessionTranscriptPathInDir, i as isSessionArchiveArtifactName, n as formatSessionArchiveTimestamp, p as resolveStorePath, r as isPrimarySessionTranscriptFileName, s as resolveDefaultSessionStorePath, t as runTasksWithConcurrency, u as resolveSessionTranscriptPath } from "./run-with-concurrency-VoSJL2UI.js";
|
|
10
10
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-BnH5Yy9T.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
12
12
|
import fs, { appendFile, chmod, mkdir, open, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
13
13
|
import os, { userInfo } from "node:os";
|
|
14
14
|
import path, { join } from "node:path";
|
|
15
|
-
import
|
|
15
|
+
import fs$1 from "node:fs";
|
|
16
16
|
import JSON5 from "json5";
|
|
17
17
|
import util, { isDeepStrictEqual } from "node:util";
|
|
18
18
|
import { execFileSync, spawn } from "node:child_process";
|
|
@@ -280,7 +280,7 @@ function isValidPid(pid) {
|
|
|
280
280
|
function isZombieProcess(pid) {
|
|
281
281
|
if (process.platform !== "linux") return false;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return fs$1.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
284
284
|
} catch {
|
|
285
285
|
return false;
|
|
286
286
|
}
|
|
@@ -307,7 +307,7 @@ function getProcessStartTime(pid) {
|
|
|
307
307
|
if (process.platform !== "linux") return null;
|
|
308
308
|
if (!isValidPid(pid)) return null;
|
|
309
309
|
try {
|
|
310
|
-
const stat =
|
|
310
|
+
const stat = fs$1.readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
311
311
|
const commEndIndex = stat.lastIndexOf(")");
|
|
312
312
|
if (commEndIndex < 0) return null;
|
|
313
313
|
const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
|
|
@@ -630,7 +630,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
630
630
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
631
631
|
}
|
|
632
632
|
function ensureAuthStoreFile(pathname) {
|
|
633
|
-
if (
|
|
633
|
+
if (fs$1.existsSync(pathname)) return;
|
|
634
634
|
saveJsonFile(pathname, {
|
|
635
635
|
version: AUTH_STORE_VERSION,
|
|
636
636
|
profiles: {}
|
|
@@ -893,7 +893,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
893
893
|
if (shouldWrite && legacy !== null) {
|
|
894
894
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
895
895
|
try {
|
|
896
|
-
|
|
896
|
+
fs$1.unlinkSync(legacyPath);
|
|
897
897
|
} catch (err) {
|
|
898
898
|
if (err?.code !== "ENOENT") log$23.warn("failed to delete legacy auth.json after migration", {
|
|
899
899
|
err,
|
|
@@ -1081,7 +1081,7 @@ function loadDotEnv(opts) {
|
|
|
1081
1081
|
const quiet = opts?.quiet ?? true;
|
|
1082
1082
|
dotenv.config({ quiet });
|
|
1083
1083
|
const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
|
|
1084
|
-
if (!
|
|
1084
|
+
if (!fs$1.existsSync(globalEnvPath)) return;
|
|
1085
1085
|
dotenv.config({
|
|
1086
1086
|
quiet,
|
|
1087
1087
|
path: globalEnvPath,
|
|
@@ -1119,7 +1119,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
1119
1119
|
function readEtcShells() {
|
|
1120
1120
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
1121
1121
|
try {
|
|
1122
|
-
const entries =
|
|
1122
|
+
const entries = fs$1.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
1123
1123
|
cachedEtcShells = new Set(entries);
|
|
1124
1124
|
} catch {
|
|
1125
1125
|
cachedEtcShells = null;
|
|
@@ -1624,7 +1624,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
1624
1624
|
};
|
|
1625
1625
|
}
|
|
1626
1626
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
1627
|
-
const fsImpl = deps.fs ??
|
|
1627
|
+
const fsImpl = deps.fs ?? fs$1;
|
|
1628
1628
|
const osImpl = deps.os ?? os;
|
|
1629
1629
|
const pathImpl = deps.path ?? path;
|
|
1630
1630
|
const home = osImpl.homedir();
|
|
@@ -3656,7 +3656,7 @@ function normalizeMatchTarget(value) {
|
|
|
3656
3656
|
}
|
|
3657
3657
|
function tryRealpath(value) {
|
|
3658
3658
|
try {
|
|
3659
|
-
return
|
|
3659
|
+
return fs$1.realpathSync(value);
|
|
3660
3660
|
} catch {
|
|
3661
3661
|
return null;
|
|
3662
3662
|
}
|
|
@@ -4209,8 +4209,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
|
|
|
4209
4209
|
}
|
|
4210
4210
|
function isExecutableFile(filePath) {
|
|
4211
4211
|
try {
|
|
4212
|
-
if (!
|
|
4213
|
-
if (process.platform !== "win32")
|
|
4212
|
+
if (!fs$1.statSync(filePath).isFile()) return false;
|
|
4213
|
+
if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
|
|
4214
4214
|
return true;
|
|
4215
4215
|
} catch {
|
|
4216
4216
|
return false;
|
|
@@ -4249,7 +4249,7 @@ const DEFAULT_SAFE_BINS = [
|
|
|
4249
4249
|
function tryResolveRealpath(filePath) {
|
|
4250
4250
|
if (!filePath) return;
|
|
4251
4251
|
try {
|
|
4252
|
-
return
|
|
4252
|
+
return fs$1.realpathSync(filePath);
|
|
4253
4253
|
} catch {
|
|
4254
4254
|
return;
|
|
4255
4255
|
}
|
|
@@ -5124,7 +5124,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
5124
5124
|
for (const dir of resolved) {
|
|
5125
5125
|
let stat;
|
|
5126
5126
|
try {
|
|
5127
|
-
stat =
|
|
5127
|
+
stat = fs$1.statSync(dir);
|
|
5128
5128
|
} catch {
|
|
5129
5129
|
continue;
|
|
5130
5130
|
}
|
|
@@ -5767,7 +5767,7 @@ function releaseAllLocksSync() {
|
|
|
5767
5767
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
5768
5768
|
} catch {}
|
|
5769
5769
|
try {
|
|
5770
|
-
|
|
5770
|
+
fs$1.rmSync(held.lockPath, { force: true });
|
|
5771
5771
|
} catch {}
|
|
5772
5772
|
HELD_LOCKS.delete(sessionFile);
|
|
5773
5773
|
}
|
|
@@ -6597,7 +6597,7 @@ const credsSaveQueues = resolveProcessScopedMap(Symbol.for("openclaw.webCredsSav
|
|
|
6597
6597
|
function canonicalWebAuthDir(authDir) {
|
|
6598
6598
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
6599
6599
|
try {
|
|
6600
|
-
return
|
|
6600
|
+
return fs$1.realpathSync.native(resolvedAuthDir);
|
|
6601
6601
|
} catch (err) {
|
|
6602
6602
|
if (err.code === "ENOENT") return resolvedAuthDir;
|
|
6603
6603
|
throw err;
|
|
@@ -6612,7 +6612,7 @@ function isWebAuthBeingCleared(authDir) {
|
|
|
6612
6612
|
}
|
|
6613
6613
|
function statFileSync(filePath) {
|
|
6614
6614
|
try {
|
|
6615
|
-
return
|
|
6615
|
+
return fs$1.statSync(filePath);
|
|
6616
6616
|
} catch {
|
|
6617
6617
|
return null;
|
|
6618
6618
|
}
|
|
@@ -6624,7 +6624,7 @@ function hasWebCredsSync(authDir) {
|
|
|
6624
6624
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
6625
6625
|
maybeRestoreCredsFromBackup(resolvedAuthDir);
|
|
6626
6626
|
try {
|
|
6627
|
-
const stats =
|
|
6627
|
+
const stats = fs$1.statSync(resolveWebCredsPath(resolvedAuthDir));
|
|
6628
6628
|
return stats.isFile() && stats.size > 1;
|
|
6629
6629
|
} catch {
|
|
6630
6630
|
return false;
|
|
@@ -6632,10 +6632,10 @@ function hasWebCredsSync(authDir) {
|
|
|
6632
6632
|
}
|
|
6633
6633
|
function readCredsJsonRaw(filePath) {
|
|
6634
6634
|
try {
|
|
6635
|
-
if (!
|
|
6636
|
-
const stats =
|
|
6635
|
+
if (!fs$1.existsSync(filePath)) return null;
|
|
6636
|
+
const stats = fs$1.statSync(filePath);
|
|
6637
6637
|
if (!stats.isFile() || stats.size <= 1) return null;
|
|
6638
|
-
return
|
|
6638
|
+
return fs$1.readFileSync(filePath, "utf-8");
|
|
6639
6639
|
} catch {
|
|
6640
6640
|
return null;
|
|
6641
6641
|
}
|
|
@@ -6660,12 +6660,12 @@ function maybeRestoreCredsFromBackup(authDir) {
|
|
|
6660
6660
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
6661
6661
|
const backupStats = statFileSync(backupPath);
|
|
6662
6662
|
if (!backupStats?.isFile() || !backupRaw || !isParseableJson(backupRaw)) return;
|
|
6663
|
-
|
|
6663
|
+
fs$1.copyFileSync(backupPath, credsPath);
|
|
6664
6664
|
try {
|
|
6665
|
-
|
|
6665
|
+
fs$1.chmodSync(credsPath, 384);
|
|
6666
6666
|
} catch {}
|
|
6667
6667
|
try {
|
|
6668
|
-
|
|
6668
|
+
fs$1.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
|
|
6669
6669
|
} catch {}
|
|
6670
6670
|
logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
|
|
6671
6671
|
} catch {}
|
|
@@ -6685,7 +6685,7 @@ function listWhatsAppAuthDirs(cfg) {
|
|
|
6685
6685
|
accountId
|
|
6686
6686
|
}).authDir);
|
|
6687
6687
|
try {
|
|
6688
|
-
const entries =
|
|
6688
|
+
const entries = fs$1.readdirSync(whatsappDir, { withFileTypes: true });
|
|
6689
6689
|
for (const entry of entries) {
|
|
6690
6690
|
if (!entry.isDirectory()) continue;
|
|
6691
6691
|
authDirs.add(path.join(whatsappDir, entry.name));
|
|
@@ -6707,7 +6707,7 @@ function resolveLegacyAuthDir() {
|
|
|
6707
6707
|
}
|
|
6708
6708
|
function legacyAuthExists(authDir) {
|
|
6709
6709
|
try {
|
|
6710
|
-
return
|
|
6710
|
+
return fs$1.existsSync(path.join(authDir, "creds.json"));
|
|
6711
6711
|
} catch {
|
|
6712
6712
|
return false;
|
|
6713
6713
|
}
|
|
@@ -7071,7 +7071,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7071
7071
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
7072
7072
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
7073
7073
|
if (accountTokenFile) {
|
|
7074
|
-
if (!
|
|
7074
|
+
if (!fs$1.existsSync(accountTokenFile)) {
|
|
7075
7075
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
7076
7076
|
return {
|
|
7077
7077
|
token: "",
|
|
@@ -7079,7 +7079,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7079
7079
|
};
|
|
7080
7080
|
}
|
|
7081
7081
|
try {
|
|
7082
|
-
const token =
|
|
7082
|
+
const token = fs$1.readFileSync(accountTokenFile, "utf-8").trim();
|
|
7083
7083
|
if (token) return {
|
|
7084
7084
|
token,
|
|
7085
7085
|
source: "tokenFile"
|
|
@@ -7107,7 +7107,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7107
7107
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
7108
7108
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
7109
7109
|
if (tokenFile) {
|
|
7110
|
-
if (!
|
|
7110
|
+
if (!fs$1.existsSync(tokenFile)) {
|
|
7111
7111
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
7112
7112
|
return {
|
|
7113
7113
|
token: "",
|
|
@@ -7115,7 +7115,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7115
7115
|
};
|
|
7116
7116
|
}
|
|
7117
7117
|
try {
|
|
7118
|
-
const token =
|
|
7118
|
+
const token = fs$1.readFileSync(tokenFile, "utf-8").trim();
|
|
7119
7119
|
if (token) return {
|
|
7120
7120
|
token,
|
|
7121
7121
|
source: "tokenFile"
|
|
@@ -10598,9 +10598,9 @@ function buildSessionHeader(sessionId) {
|
|
|
10598
10598
|
})}\n`;
|
|
10599
10599
|
}
|
|
10600
10600
|
async function ensureSessionHeader(params) {
|
|
10601
|
-
if (
|
|
10602
|
-
await
|
|
10603
|
-
await
|
|
10601
|
+
if (fs$1.existsSync(params.sessionFile)) return;
|
|
10602
|
+
await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
10603
|
+
await fs$1.promises.writeFile(params.sessionFile, buildSessionHeader(params.sessionId), {
|
|
10604
10604
|
encoding: "utf-8",
|
|
10605
10605
|
mode: 384
|
|
10606
10606
|
});
|
|
@@ -11189,7 +11189,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
11189
11189
|
}
|
|
11190
11190
|
async function getSessionFileSize(storePath) {
|
|
11191
11191
|
try {
|
|
11192
|
-
return (await
|
|
11192
|
+
return (await fs$1.promises.stat(storePath)).size;
|
|
11193
11193
|
} catch {
|
|
11194
11194
|
return null;
|
|
11195
11195
|
}
|
|
@@ -11217,7 +11217,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
11217
11217
|
}
|
|
11218
11218
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
11219
11219
|
try {
|
|
11220
|
-
await
|
|
11220
|
+
await fs$1.promises.rename(storePath, backupPath);
|
|
11221
11221
|
log$9.info("rotated session store file", {
|
|
11222
11222
|
backupPath: path.basename(backupPath),
|
|
11223
11223
|
sizeBytes: fileSize
|
|
@@ -11228,11 +11228,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
11228
11228
|
try {
|
|
11229
11229
|
const dir = path.dirname(storePath);
|
|
11230
11230
|
const baseName = path.basename(storePath);
|
|
11231
|
-
const backups = (await
|
|
11231
|
+
const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
11232
11232
|
const maxBackups = 3;
|
|
11233
11233
|
if (backups.length > maxBackups) {
|
|
11234
11234
|
const toDelete = backups.slice(maxBackups);
|
|
11235
|
-
for (const old of toDelete) await
|
|
11235
|
+
for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
11236
11236
|
log$9.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
11237
11237
|
}
|
|
11238
11238
|
} catch {}
|
|
@@ -11248,7 +11248,7 @@ const NOOP_LOGGER = {
|
|
|
11248
11248
|
function canonicalizePathForComparison$1(filePath) {
|
|
11249
11249
|
const resolved = path.resolve(filePath);
|
|
11250
11250
|
try {
|
|
11251
|
-
return
|
|
11251
|
+
return fs$1.realpathSync(resolved);
|
|
11252
11252
|
} catch {
|
|
11253
11253
|
return resolved;
|
|
11254
11254
|
}
|
|
@@ -11306,12 +11306,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
11306
11306
|
return referenced;
|
|
11307
11307
|
}
|
|
11308
11308
|
async function readSessionsDirFiles(sessionsDir) {
|
|
11309
|
-
const dirEntries = await
|
|
11309
|
+
const dirEntries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
11310
11310
|
const files = [];
|
|
11311
11311
|
for (const dirent of dirEntries) {
|
|
11312
11312
|
if (!dirent.isFile()) continue;
|
|
11313
11313
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
11314
|
-
const stat = await
|
|
11314
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
11315
11315
|
if (!stat?.isFile()) continue;
|
|
11316
11316
|
files.push({
|
|
11317
11317
|
path: filePath,
|
|
@@ -11343,9 +11343,9 @@ function isProtectedFromBudgetRemoval(filePath, replayedFloorMs, nowMs) {
|
|
|
11343
11343
|
}
|
|
11344
11344
|
async function removeFileIfExists(filePath) {
|
|
11345
11345
|
if (isPreservationArmed() || !isJsonlSessionBackend()) return 0;
|
|
11346
|
-
const stat = await
|
|
11346
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
11347
11347
|
if (!stat?.isFile()) return 0;
|
|
11348
|
-
await
|
|
11348
|
+
await fs$1.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
11349
11349
|
return stat.size;
|
|
11350
11350
|
}
|
|
11351
11351
|
async function removeFileForBudget(params) {
|
|
@@ -11753,19 +11753,19 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
11753
11753
|
function canonicalizePathForComparison(filePath) {
|
|
11754
11754
|
const resolved = path.resolve(filePath);
|
|
11755
11755
|
try {
|
|
11756
|
-
return
|
|
11756
|
+
return fs$1.realpathSync(resolved);
|
|
11757
11757
|
} catch {
|
|
11758
11758
|
return resolved;
|
|
11759
11759
|
}
|
|
11760
11760
|
}
|
|
11761
11761
|
function archiveFileOnDisk(filePath, reasonOrOpts) {
|
|
11762
11762
|
if (typeof reasonOrOpts !== "string") {
|
|
11763
|
-
|
|
11764
|
-
|
|
11763
|
+
fs$1.linkSync(filePath, reasonOrOpts.destinationPath);
|
|
11764
|
+
fs$1.unlinkSync(filePath);
|
|
11765
11765
|
return reasonOrOpts.destinationPath;
|
|
11766
11766
|
}
|
|
11767
11767
|
const archived = `${filePath}.${reasonOrOpts}.${formatSessionArchiveTimestamp()}`;
|
|
11768
|
-
|
|
11768
|
+
fs$1.renameSync(filePath, archived);
|
|
11769
11769
|
return archived;
|
|
11770
11770
|
}
|
|
11771
11771
|
/**
|
|
@@ -11781,7 +11781,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
11781
11781
|
const relative = path.relative(storeDir, candidatePath);
|
|
11782
11782
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
11783
11783
|
}
|
|
11784
|
-
if (!
|
|
11784
|
+
if (!fs$1.existsSync(candidatePath)) continue;
|
|
11785
11785
|
try {
|
|
11786
11786
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
11787
11787
|
} catch (err) {
|
|
@@ -11804,15 +11804,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
11804
11804
|
let removed = 0;
|
|
11805
11805
|
let scanned = 0;
|
|
11806
11806
|
for (const dir of directories) {
|
|
11807
|
-
const entries = await
|
|
11807
|
+
const entries = await fs$1.promises.readdir(dir).catch(() => []);
|
|
11808
11808
|
for (const entry of entries) {
|
|
11809
11809
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
11810
11810
|
if (timestamp == null) continue;
|
|
11811
11811
|
scanned += 1;
|
|
11812
11812
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
11813
11813
|
const fullPath = path.join(dir, entry);
|
|
11814
|
-
if (!(await
|
|
11815
|
-
await
|
|
11814
|
+
if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
11815
|
+
await fs$1.promises.rm(fullPath).catch(() => void 0);
|
|
11816
11816
|
removed += 1;
|
|
11817
11817
|
}
|
|
11818
11818
|
}
|
|
@@ -11941,7 +11941,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
11941
11941
|
}
|
|
11942
11942
|
function getFileStatSnapshot(filePath) {
|
|
11943
11943
|
try {
|
|
11944
|
-
const stats =
|
|
11944
|
+
const stats = fs$1.statSync(filePath);
|
|
11945
11945
|
return {
|
|
11946
11946
|
mtimeMs: stats.mtimeMs,
|
|
11947
11947
|
sizeBytes: stats.size
|
|
@@ -12116,7 +12116,7 @@ function persistHighWaterMarkToRedis(client, keyPrefix, sessionId, highWaterMark
|
|
|
12116
12116
|
});
|
|
12117
12117
|
}
|
|
12118
12118
|
async function findLastMatchingUserLineIndex(sessionFile, promptText, fromLineIndex) {
|
|
12119
|
-
const fileStream =
|
|
12119
|
+
const fileStream = fs$1.createReadStream(sessionFile, { encoding: "utf-8" });
|
|
12120
12120
|
const lines = readline.createInterface({
|
|
12121
12121
|
input: fileStream,
|
|
12122
12122
|
crlfDelay: Infinity
|
|
@@ -12143,7 +12143,7 @@ async function findLastMatchingUserLineIndex(sessionFile, promptText, fromLineIn
|
|
|
12143
12143
|
}
|
|
12144
12144
|
async function syncConfiguredSessionTranscriptToRuntimeUnlocked(params, active, transcriptStateKey, pendingAppends = []) {
|
|
12145
12145
|
if (!active.runtime) return;
|
|
12146
|
-
if (!
|
|
12146
|
+
if (!fs$1.existsSync(params.sessionFile)) {
|
|
12147
12147
|
setConfiguredTranscriptHighWaterMark(active, transcriptStateKey, 0);
|
|
12148
12148
|
return;
|
|
12149
12149
|
}
|
|
@@ -12163,7 +12163,7 @@ async function syncConfiguredSessionTranscriptToRuntimeUnlocked(params, active,
|
|
|
12163
12163
|
const currentTurnLineIndex = params.currentUserTurn != null ? await findLastMatchingUserLineIndex(params.sessionFile, params.currentUserTurn.promptText, highWaterMark) : void 0;
|
|
12164
12164
|
let lineIndex = 0;
|
|
12165
12165
|
let syncedLineIndex = highWaterMark;
|
|
12166
|
-
const fileStream =
|
|
12166
|
+
const fileStream = fs$1.createReadStream(params.sessionFile, { encoding: "utf-8" });
|
|
12167
12167
|
const lines = readline.createInterface({
|
|
12168
12168
|
input: fileStream,
|
|
12169
12169
|
crlfDelay: Infinity
|
|
@@ -12358,7 +12358,7 @@ function loadSessionStoreFromDisk(storePath, opts = {}) {
|
|
|
12358
12358
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
12359
12359
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
12360
12360
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
12361
|
-
const raw =
|
|
12361
|
+
const raw = fs$1.readFileSync(storePath, "utf-8");
|
|
12362
12362
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
12363
12363
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
12364
12364
|
continue;
|
|
@@ -12536,7 +12536,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
12536
12536
|
mode: "primary",
|
|
12537
12537
|
storePath
|
|
12538
12538
|
});
|
|
12539
|
-
await
|
|
12539
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
12540
12540
|
const json = JSON.stringify(store, null, 2);
|
|
12541
12541
|
const writePrimaryAfterJsonl = async () => {
|
|
12542
12542
|
if (configuredPrimary) await configuredSessionStoragePrimaryWrite(configuredPrimary, store);
|
|
@@ -14081,13 +14081,13 @@ function resolveBundledPluginsDir() {
|
|
|
14081
14081
|
try {
|
|
14082
14082
|
const execDir = path.dirname(process.execPath);
|
|
14083
14083
|
const sibling = path.join(execDir, "extensions");
|
|
14084
|
-
if (
|
|
14084
|
+
if (fs$1.existsSync(sibling)) return sibling;
|
|
14085
14085
|
} catch {}
|
|
14086
14086
|
try {
|
|
14087
14087
|
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
14088
14088
|
for (let i = 0; i < 6; i += 1) {
|
|
14089
14089
|
const candidate = path.join(cursor, "extensions");
|
|
14090
|
-
if (
|
|
14090
|
+
if (fs$1.existsSync(candidate) && fs$1.existsSync(path.join(cursor, "package.json"))) return candidate;
|
|
14091
14091
|
const parent = path.dirname(cursor);
|
|
14092
14092
|
if (parent === cursor) break;
|
|
14093
14093
|
cursor = parent;
|
|
@@ -14156,7 +14156,7 @@ function parseSessionConsumers(raw) {
|
|
|
14156
14156
|
function resolvePluginManifestPath(rootDir) {
|
|
14157
14157
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
14158
14158
|
const candidate = path.join(rootDir, filename);
|
|
14159
|
-
if (
|
|
14159
|
+
if (fs$1.existsSync(candidate)) return candidate;
|
|
14160
14160
|
}
|
|
14161
14161
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
14162
14162
|
}
|
|
@@ -14182,7 +14182,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
14182
14182
|
}
|
|
14183
14183
|
let raw;
|
|
14184
14184
|
try {
|
|
14185
|
-
raw = JSON.parse(
|
|
14185
|
+
raw = JSON.parse(fs$1.readFileSync(opened.fd, "utf-8"));
|
|
14186
14186
|
} catch (err) {
|
|
14187
14187
|
return {
|
|
14188
14188
|
ok: false,
|
|
@@ -14190,7 +14190,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
14190
14190
|
manifestPath
|
|
14191
14191
|
};
|
|
14192
14192
|
} finally {
|
|
14193
|
-
|
|
14193
|
+
fs$1.closeSync(opened.fd);
|
|
14194
14194
|
}
|
|
14195
14195
|
return {
|
|
14196
14196
|
...loadPluginManifestFromObject(raw, rejectHardlinks),
|
|
@@ -14358,7 +14358,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
14358
14358
|
const cached = cache?.get(targetPath);
|
|
14359
14359
|
if (cached) return cached;
|
|
14360
14360
|
try {
|
|
14361
|
-
const resolved =
|
|
14361
|
+
const resolved = fs$1.realpathSync(targetPath);
|
|
14362
14362
|
cache?.set(targetPath, resolved);
|
|
14363
14363
|
return resolved;
|
|
14364
14364
|
} catch {
|
|
@@ -14367,7 +14367,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
14367
14367
|
}
|
|
14368
14368
|
function safeStatSync(targetPath) {
|
|
14369
14369
|
try {
|
|
14370
|
-
return
|
|
14370
|
+
return fs$1.statSync(targetPath);
|
|
14371
14371
|
} catch {
|
|
14372
14372
|
return null;
|
|
14373
14373
|
}
|
|
@@ -14499,12 +14499,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
|
|
|
14499
14499
|
});
|
|
14500
14500
|
if (!opened.ok) return null;
|
|
14501
14501
|
try {
|
|
14502
|
-
const raw =
|
|
14502
|
+
const raw = fs$1.readFileSync(opened.fd, "utf-8");
|
|
14503
14503
|
return JSON.parse(raw);
|
|
14504
14504
|
} catch {
|
|
14505
14505
|
return null;
|
|
14506
14506
|
} finally {
|
|
14507
|
-
|
|
14507
|
+
fs$1.closeSync(opened.fd);
|
|
14508
14508
|
}
|
|
14509
14509
|
}
|
|
14510
14510
|
function deriveIdHint(params) {
|
|
@@ -14572,14 +14572,14 @@ function resolvePackageEntrySource(params) {
|
|
|
14572
14572
|
return null;
|
|
14573
14573
|
}
|
|
14574
14574
|
const safeSource = opened.path;
|
|
14575
|
-
|
|
14575
|
+
fs$1.closeSync(opened.fd);
|
|
14576
14576
|
return safeSource;
|
|
14577
14577
|
}
|
|
14578
14578
|
function discoverInDirectory(params) {
|
|
14579
|
-
if (!
|
|
14579
|
+
if (!fs$1.existsSync(params.dir)) return;
|
|
14580
14580
|
let entries = [];
|
|
14581
14581
|
try {
|
|
14582
|
-
entries =
|
|
14582
|
+
entries = fs$1.readdirSync(params.dir, { withFileTypes: true });
|
|
14583
14583
|
} catch (err) {
|
|
14584
14584
|
params.diagnostics.push({
|
|
14585
14585
|
level: "warn",
|
|
@@ -14642,7 +14642,7 @@ function discoverInDirectory(params) {
|
|
|
14642
14642
|
}
|
|
14643
14643
|
continue;
|
|
14644
14644
|
}
|
|
14645
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
14645
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs$1.existsSync(candidate));
|
|
14646
14646
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
14647
14647
|
candidates: params.candidates,
|
|
14648
14648
|
diagnostics: params.diagnostics,
|
|
@@ -14660,7 +14660,7 @@ function discoverInDirectory(params) {
|
|
|
14660
14660
|
}
|
|
14661
14661
|
function discoverFromPath(params) {
|
|
14662
14662
|
const resolved = resolveUserPath(params.rawPath);
|
|
14663
|
-
if (!
|
|
14663
|
+
if (!fs$1.existsSync(resolved)) {
|
|
14664
14664
|
params.diagnostics.push({
|
|
14665
14665
|
level: "error",
|
|
14666
14666
|
code: "PLUGIN_LOAD_ERROR",
|
|
@@ -14669,7 +14669,7 @@ function discoverFromPath(params) {
|
|
|
14669
14669
|
});
|
|
14670
14670
|
return;
|
|
14671
14671
|
}
|
|
14672
|
-
const stat =
|
|
14672
|
+
const stat = fs$1.statSync(resolved);
|
|
14673
14673
|
if (stat.isFile()) {
|
|
14674
14674
|
if (!isExtensionFile(resolved)) {
|
|
14675
14675
|
params.diagnostics.push({
|
|
@@ -14729,7 +14729,7 @@ function discoverFromPath(params) {
|
|
|
14729
14729
|
}
|
|
14730
14730
|
return;
|
|
14731
14731
|
}
|
|
14732
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
14732
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs$1.existsSync(candidate));
|
|
14733
14733
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
14734
14734
|
addCandidate({
|
|
14735
14735
|
candidates: params.candidates,
|
|
@@ -15100,7 +15100,7 @@ function buildCacheKey$1(params) {
|
|
|
15100
15100
|
}
|
|
15101
15101
|
function safeStatMtimeMs(filePath) {
|
|
15102
15102
|
try {
|
|
15103
|
-
return
|
|
15103
|
+
return fs$1.statSync(filePath).mtimeMs;
|
|
15104
15104
|
} catch {
|
|
15105
15105
|
return null;
|
|
15106
15106
|
}
|
|
@@ -20334,7 +20334,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
|
|
|
20334
20334
|
};
|
|
20335
20335
|
const buildManifestSchemaCacheKey = (manifestPath) => {
|
|
20336
20336
|
try {
|
|
20337
|
-
const mtimeMs =
|
|
20337
|
+
const mtimeMs = fs$1.statSync(manifestPath).mtimeMs;
|
|
20338
20338
|
return mtimeMs ? `${manifestPath}:${mtimeMs}` : manifestPath;
|
|
20339
20339
|
} catch {
|
|
20340
20340
|
return manifestPath;
|
|
@@ -20359,7 +20359,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
|
|
|
20359
20359
|
manifestRoot = record.sourcePath;
|
|
20360
20360
|
} else if (sources.size === 0) {
|
|
20361
20361
|
const bundledDir = resolveBundledPluginsDir();
|
|
20362
|
-
if (bundledDir &&
|
|
20362
|
+
if (bundledDir && fs$1.existsSync(bundledDir)) {
|
|
20363
20363
|
const realSourcePath = safeRealpathSync(resolveUserPath(record.sourcePath), bundledInstallRealpathCache);
|
|
20364
20364
|
const realBundledDir = safeRealpathSync(bundledDir, bundledInstallRealpathCache) ?? bundledDir;
|
|
20365
20365
|
if (!realSourcePath || !isPathWithinRoot(realBundledDir, realSourcePath)) {
|
|
@@ -21094,7 +21094,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
21094
21094
|
}
|
|
21095
21095
|
function normalizeDeps(overrides = {}) {
|
|
21096
21096
|
return {
|
|
21097
|
-
fs: overrides.fs ??
|
|
21097
|
+
fs: overrides.fs ?? fs$1,
|
|
21098
21098
|
json5: overrides.json5 ?? JSON5,
|
|
21099
21099
|
env: overrides.env ?? process.env,
|
|
21100
21100
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as saveMediaBuffer } from "./store-
|
|
2
|
-
import { a as loadWebMedia } from "./ir-
|
|
1
|
+
import { i as saveMediaBuffer } from "./store-q3G7wCsG.js";
|
|
2
|
+
import { a as loadWebMedia } from "./ir-BHU3uh9A.js";
|
|
3
3
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-DzQsLh91.js";
|
|
4
4
|
|
|
5
5
|
//#region src/media/outbound-attachment.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { dr as mergePromptContributions, pn as getConversationReadQuery, yr as emitDiagnosticEvent } from "./model-selection-
|
|
3
|
-
import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-
|
|
1
|
+
import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-iTNW5QQR.js";
|
|
2
|
+
import { dr as mergePromptContributions, pn as getConversationReadQuery, yr as emitDiagnosticEvent } from "./model-selection-DhXu1Q4_.js";
|
|
3
|
+
import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-DFLXH7MA.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/message-identity.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, V as isNotFoundPathError } from "./subsystem-
|
|
1
|
+
import { L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, V as isNotFoundPathError } from "./subsystem-iTNW5QQR.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/home-dir.ts
|
|
6
6
|
function normalize(value) {
|
|
@@ -94,10 +94,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
94
94
|
const newDir = newStateDir(effectiveHomedir);
|
|
95
95
|
if (env.OPENCLAW_TEST_FAST === "1") return newDir;
|
|
96
96
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
97
|
-
if (
|
|
97
|
+
if (fs.existsSync(newDir)) return newDir;
|
|
98
98
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
99
99
|
try {
|
|
100
|
-
return
|
|
100
|
+
return fs.existsSync(dir);
|
|
101
101
|
} catch {
|
|
102
102
|
return false;
|
|
103
103
|
}
|
|
@@ -137,7 +137,7 @@ function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)
|
|
|
137
137
|
if (env.OPENCLAW_TEST_FAST === "1") return resolveCanonicalConfigPath(env, resolveStateDir(env, homedir));
|
|
138
138
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
139
139
|
try {
|
|
140
|
-
return
|
|
140
|
+
return fs.existsSync(candidate);
|
|
141
141
|
} catch {
|
|
142
142
|
return false;
|
|
143
143
|
}
|
|
@@ -155,7 +155,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
|
|
|
155
155
|
const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
|
|
156
156
|
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
157
157
|
try {
|
|
158
|
-
return
|
|
158
|
+
return fs.existsSync(candidate);
|
|
159
159
|
} catch {
|
|
160
160
|
return false;
|
|
161
161
|
}
|