wednesdayai 0.4.12-dev.721 → 0.4.12-dev.722
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/{agent-scope-cbxkoURo.js → agent-scope-DxKPMu8w.js} +3 -3
- package/dist/{agent-turn-runner-CXf6g-6f.js → agent-turn-runner-LlrD6k2x.js} +5 -5
- package/dist/{api-key-rotation-BMnyfyGD.js → api-key-rotation-Br7_jaAV.js} +2 -2
- package/dist/{artifacts-DUhYSSmK.js → artifacts-QHme-vnS.js} +4 -4
- package/dist/{audio-preflight-ifCgpG3c.js → audio-preflight-B_5sTSyb.js} +27 -27
- package/dist/{audio-transcription-runner-ipSQoPp8.js → audio-transcription-runner-XFfvRPXl.js} +11 -11
- 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-BJHm_pDV.js → channel-activity-DNq7LYjU.js} +3 -3
- package/dist/{chrome-DTJprCGv.js → chrome-FHxGdLnd.js} +15 -15
- package/dist/{chunk-eNEsWhab.js → chunk-BhntPUH_.js} +3 -3
- package/dist/{command-queue-smA8JaO_.js → command-queue-CkNuNlmY.js} +1 -1
- package/dist/{commands-registry-DdQg21ct.js → commands-registry-DC0fovy_.js} +2 -2
- package/dist/config.js +9 -9
- package/dist/daemon-cli.js +7 -7
- package/dist/{deliver-CVWbwPkb.js → deliver-CXqNQ8yi.js} +24 -24
- package/dist/{diagnostic-DI-K8155.js → diagnostic-Bbg-zObh.js} +5 -5
- package/dist/{fetch-BzXaK9px.js → fetch-BoHKSk-O.js} +8 -8
- package/dist/{fetch-guard-0mkjBgri.js → fetch-guard-TJjLK0FV.js} +3 -3
- package/dist/{frontmatter-PMByWrfP.js → frontmatter-saAwiKEb.js} +5 -5
- package/dist/{fs-safe-DwICJjkN.js → fs-safe-LRpYbPaA.js} +4 -4
- package/dist/{github-copilot-token-WSjo05vB.js → github-copilot-token-zGOMIGSh.js} +7 -7
- package/dist/{image-ops-O8pHxo7i.js → image-ops-D_fm2PuR.js} +1 -1
- package/dist/{ir-fzpdYPWw.js → ir-C4MMLUJr.js} +5 -5
- package/dist/{legacy-names-CLlrMq8r.js → legacy-names-vLJrYADD.js} +1 -1
- package/dist/llm-slug-generator.js +58 -58
- package/dist/{logger-DNehzD_s.js → logger-a0-zAY5a.js} +1 -1
- package/dist/{manager-DH-MILAU.js → manager-DdA_cy40.js} +12 -12
- package/dist/{markdown-tables-UWspJNAH.js → markdown-tables-Dd7jV1JF.js} +2 -2
- package/dist/{model-selection-9qbqwsOT.js → model-selection-CdZITU0t.js} +86 -86
- package/dist/{outbound-attachment-DVKqk30B.js → outbound-attachment-CqtMGpsJ.js} +2 -2
- package/dist/{outbound-message-hooks-S_VhlJs3.js → outbound-message-hooks-RBQbGzGm.js} +4 -4
- package/dist/{path-alias-guards-Cd5yHmTq.js → path-alias-guards-Zj-NwKjV.js} +1 -1
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{pi-embedded-maiK_yr9.js → pi-embedded-COs_yO7U.js} +169 -169
- package/dist/{pi-embedded-helpers-5JApWu7A.js → pi-embedded-helpers-BYLOFsUc.js} +24 -24
- package/dist/{pi-embedded-utils-kHMmP2Xh.js → pi-embedded-utils-DOtaZ7KV.js} +3 -3
- package/dist/{pi-model-discovery-CsC6yTDG.js → pi-model-discovery-B9KKtGuw.js} +7 -7
- package/dist/plugin-sdk/{agent-scope-BQYVQxfQ.js → agent-scope-DU8uJiiv.js} +2 -2
- package/dist/plugin-sdk/agent-turn-execute-DoRgVKVO.js +61 -0
- package/dist/plugin-sdk/{agent-turn-runner-CqIBwx4o.js → agent-turn-runner-pU0RGvg6.js} +6 -6
- package/dist/plugin-sdk/{api-key-rotation-BW3rq9Tg.js → api-key-rotation-Oe0hkmVQ.js} +2 -2
- package/dist/plugin-sdk/{artifacts-C8xK4Y3e.js → artifacts-Dk-7TtTn.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-BVO3xBbT.js → audio-preflight-8hRbl8Io.js} +22 -22
- package/dist/plugin-sdk/{audio-transcription-runner-DXiOiQMw.js → audio-transcription-runner-CUsZFiEA.js} +11 -11
- package/dist/plugin-sdk/{auth-profiles-CIKTWees.js → auth-profiles-OgKl-vr-.js} +5 -5
- package/dist/plugin-sdk/{channel-activity-Ck83U_es.js → channel-activity-OIauZrkN.js} +3 -3
- package/dist/plugin-sdk/{chrome-DDIL8pIX.js → chrome-VZ0Zuu2w.js} +12 -12
- package/dist/plugin-sdk/{chunk-D6yDhUpF.js → chunk-BWz-lIzS.js} +4 -4
- package/dist/plugin-sdk/{command-queue-Cveon04f.js → command-queue-CbgNIrv6.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-DuwlD_aI.js → commands-registry-XW2hmbAE.js} +3 -3
- package/dist/plugin-sdk/{deliver-BD3gpFAY.js → deliver-B7W4NNsR.js} +11 -11
- package/dist/plugin-sdk/deliver-CJP9TznW.js +32 -0
- package/dist/plugin-sdk/{diagnostic-BhLorIrS.js → diagnostic-BRUM6uNI.js} +7 -7
- package/dist/plugin-sdk/{diagnostic-session-state-BjuWxrAM.js → diagnostic-session-state-BsHrQ7U3.js} +1 -1
- package/dist/plugin-sdk/{fetch-D1jXg-ju.js → fetch-C1vgNaXJ.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-DnwfMurj.js → fetch-guard-B2Wnl9Vi.js} +4 -4
- package/dist/plugin-sdk/{fetch-DFZXuu3W.js → fetch-hEreHolP.js} +7 -7
- package/dist/plugin-sdk/{fetch-timeout-D7XVWfxj.js → fetch-timeout-A1m6BOhm.js} +1 -1
- package/dist/plugin-sdk/{fs-safe-BQ5cHy9G.js → fs-safe-ClebEeLz.js} +3 -3
- package/dist/plugin-sdk/{image-ops-0TjWNKUx.js → image-ops-Bm03YsK2.js} +1 -1
- package/dist/plugin-sdk/{inbound-context-Bfr5DkdO.js → inbound-context-Cmgtf5my.js} +1 -1
- package/dist/plugin-sdk/{ir-CbL0sVL2.js → ir-1CthVxHv.js} +5 -5
- package/dist/plugin-sdk/{logger-D5s3kiib.js → logger-BkzoyfHW.js} +1 -1
- package/dist/plugin-sdk/{manager-CHBt3PC-.js → manager-C4CJpRd9.js} +8 -8
- package/dist/plugin-sdk/manager-CPcI0Fhz.js +16 -0
- package/dist/plugin-sdk/{markdown-tables-CBGsimjo.js → markdown-tables-DZM4NfLU.js} +3 -3
- package/dist/plugin-sdk/{outbound-attachment-C5x2htXW.js → outbound-attachment-GMgXpDQm.js} +2 -2
- package/dist/plugin-sdk/{outbound-message-hooks-2YmJP9k-.js → outbound-message-hooks-BUHUdpjM.js} +3 -3
- package/dist/plugin-sdk/{path-alias-guards-BIPHhakQ.js → path-alias-guards-Dft7g-_v.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-D74AHWBs.js → pi-embedded-helpers-B-OOYT64.js} +11 -11
- package/dist/plugin-sdk/{pi-embedded-utils-DQaOun1y.js → pi-embedded-utils-BoSGTbYO.js} +3 -3
- package/dist/plugin-sdk/{pi-model-discovery-C37z3zkx.js → pi-model-discovery-DF6l-F8s.js} +2 -2
- package/dist/plugin-sdk/provider-dispatcher-CNLIHg-v.js +61 -0
- package/dist/plugin-sdk/provider-image-L_SRDPHU.js +22 -0
- package/dist/plugin-sdk/{provider-image-Cy9HRMER.js → provider-image-zNa1Cccq.js} +5 -5
- package/dist/plugin-sdk/{proxy-CjNR_U3u.js → proxy-CXI1ycJj.js} +2 -2
- package/dist/plugin-sdk/{proxy-env-ubutfW07.js → proxy-env-B3rQCyUO.js} +2 -2
- package/dist/plugin-sdk/{proxy-fetch-Cv4b428x.js → proxy-fetch-CNBkczcW.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-DlM8D_uP.js → pw-ai-JJrE-B1e.js} +10 -10
- package/dist/plugin-sdk/{qmd-manager-Bv5B9pi9.js → qmd-manager-CkQhKIXI.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-CWwH9pqd.js → query-expansion-DjZsVofz.js} +3 -3
- package/dist/plugin-sdk/{recorder-C3qdhG-p.js → recorder-BU_faNrp.js} +4 -4
- package/dist/{redact-BOHmCPP_.js → plugin-sdk/redact-CdcLrd0n.js} +1 -1
- package/dist/plugin-sdk/{registry-BXmLBUZj.js → registry-tm0HFWKN.js} +7 -7
- package/dist/plugin-sdk/replies-BFjGWAPs.js +25 -0
- package/dist/plugin-sdk/{replies-CjeAGcJx.js → replies-CS2GXrd-.js} +4 -4
- package/dist/plugin-sdk/{reply-directives-OuX5Mba_.js → reply-directives-hfOVgXpA.js} +2 -2
- package/dist/plugin-sdk/{reply-prefix-C83iSHUo.js → reply-prefix-BKQgC6Vj.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-BLBv69wV.js → resolve-route-tqQv32nr.js} +5 -5
- package/dist/plugin-sdk/runs-CPA1-H-2.js +25 -0
- package/dist/plugin-sdk/{runs-B4G4Txj3.js → runs-H2FY7UEk.js} +8 -8
- package/dist/plugin-sdk/{send-BwoWjRrJ.js → send-BMhuEEtY.js} +9 -9
- package/dist/plugin-sdk/{send-BUAw8fe4.js → send-BjR1QHnz.js} +7 -7
- package/dist/plugin-sdk/{send-B2Kip2qd.js → send-CEtGyK32.js} +8 -8
- package/dist/plugin-sdk/{send-Tg5PT6ci.js → send-CF3PEjRy.js} +14 -14
- package/dist/plugin-sdk/send-CRtSAH8I.js +25 -0
- package/dist/plugin-sdk/send-CzxwgKvR.js +27 -0
- package/dist/plugin-sdk/{send-D_2cxLLi.js → send-DUJMd2d7.js} +20 -20
- package/dist/plugin-sdk/{send-CfSEKKlU.js → send-DdPdUcD0.js} +6 -6
- package/dist/plugin-sdk/send-DuCB2xbl.js +23 -0
- package/dist/plugin-sdk/send-DyYaWr3E.js +24 -0
- package/dist/plugin-sdk/{session-meta-D3W538Wj.js → session-meta-oR-S9C5J.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-ByVQek_m.js → skill-commands-Bh43SlDc.js} +6 -6
- package/dist/plugin-sdk/{skills-BGgry_YW.js → skills-CatBv8W4.js} +6 -6
- package/dist/plugin-sdk/{store-C6ZLKWUS.js → store-6JKvp2Zu.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-CAdT47aY.js +61 -0
- package/dist/plugin-sdk/{subsystem-0F3fEqJW.js → subsystem-CchgWuXK.js} +4 -4
- package/dist/plugin-sdk/{tables-BCSRuiq_.js → tables-BPCP4CpE.js} +1 -1
- package/dist/plugin-sdk/testing.js +55 -55
- package/dist/plugin-sdk/{tokens-O0pGqOuf.js → tokens-Cioh8xR5.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-BG8uP1aD.js → tool-loop-detection-BN0lIxLx.js} +1 -1
- package/dist/plugin-sdk/{tools-Sk-IqHBP.js → tools-3raTfdu5.js} +102 -102
- package/dist/plugin-sdk/{user-run-recording-iS-qLIN9.js → user-run-recording-DlpzQk0X.js} +3 -3
- package/dist/{provider-image-Cb4z6zUu.js → provider-image-BllyLBJM.js} +5 -5
- package/dist/{proxy-env-i0jn5uxB.js → proxy-env-CzGKpJY_.js} +2 -2
- package/dist/{proxy-C9sq6M-h.js → proxy-fWL7CKDP.js} +1 -1
- package/dist/{proxy-fetch-CK5AQAYw.js → proxy-fetch-DCI0KuH6.js} +1 -1
- package/dist/{pw-ai-DziGw6Jy.js → pw-ai-CXSJw34w.js} +14 -14
- package/dist/{qmd-manager-p036XU01.js → qmd-manager-BwZ0V5fL.js} +10 -10
- package/dist/{query-expansion-30x7RlZY.js → query-expansion-31VWpPCz.js} +5 -5
- package/dist/{recorder-C_ViZLf1.js → recorder-DNRxe9C8.js} +4 -4
- package/dist/{plugin-sdk/redact-BEcZiZI1.js → redact-DZne_lu8.js} +1 -1
- package/dist/{replies-BsctLhfp.js → replies-NkETqb6B.js} +4 -4
- package/dist/{reply-directives-D9wYtPPy.js → reply-directives-DGITtNUL.js} +2 -2
- package/dist/{reply-prefix-C7WlN3qm.js → reply-prefix-DVkNDBNe.js} +1 -1
- package/dist/{resolve-route-BV8k5qjX.js → resolve-route-jDAjkfZE.js} +5 -5
- package/dist/{runs-ucQd8Fc-.js → runs-DGWNXyKA.js} +8 -8
- package/dist/{send-Tx-ew59_.js → send-CNLmncRW.js} +6 -6
- package/dist/{send-TscXeVY8.js → send-DEFcgo-1.js} +27 -27
- package/dist/{send-BGps2i_C.js → send-Do1AlhD5.js} +8 -8
- package/dist/{send-BiDcVZSc.js → send-Dq8ChBfS.js} +6 -6
- package/dist/{send-Ba3pDq6E.js → send-ENMm5qbW.js} +7 -7
- package/dist/{session-meta-DH__PMKt.js → session-meta-DuK_BrWT.js} +2 -2
- package/dist/{skill-commands-CRZajtK_.js → skill-commands-BhMQp_i8.js} +9 -9
- package/dist/{skills-DOc6uEd1.js → skills-ckuLxkyg.js} +21 -21
- package/dist/{store-xxN6qyAh.js → store-gQ6FSjVk.js} +2 -2
- package/dist/{subsystem-BCjklMkJ.js → subsystem-CPYnUTN4.js} +64 -64
- package/dist/{tables-o3ZpyPWV.js → tables-DEyD0zuy.js} +1 -1
- package/dist/{tokens-9Mla_HDp.js → tokens-9BPY4SaX.js} +1 -1
- package/dist/{tool-loop-detection-8uvf8mSd.js → tool-loop-detection-C1fqyXXD.js} +2 -2
- package/dist/{user-run-recording-CAk1Ketk.js → user-run-recording-B0XAAUwL.js} +2 -2
- package/dist/{workspace-Dbn4gFdH.js → workspace-B707AGIc.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/elevenlabs/src/streaming-speech-provider-faults.test.ts +2 -2
- package/extensions/elevenlabs/src/streaming-speech-provider.test.ts +19 -5
- package/extensions/elevenlabs/src/streaming-speech-provider.ts +3 -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/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/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-BRJa_EBt.js +0 -61
- package/dist/plugin-sdk/deliver-DZoYhDxC.js +0 -32
- package/dist/plugin-sdk/manager-Bqpqu2GS.js +0 -16
- package/dist/plugin-sdk/provider-dispatcher-NB8R-FyS.js +0 -61
- package/dist/plugin-sdk/provider-image-g3vmjlkZ.js +0 -22
- package/dist/plugin-sdk/replies-0gHRQjbA.js +0 -25
- package/dist/plugin-sdk/runs-Dzlj-BO5.js +0 -25
- package/dist/plugin-sdk/send-COofA0BG.js +0 -23
- package/dist/plugin-sdk/send-DHNKlQPv.js +0 -27
- package/dist/plugin-sdk/send-NUHfC-G_.js +0 -25
- package/dist/plugin-sdk/send-Tm5-7bLz.js +0 -24
- package/dist/plugin-sdk/subagent-registry-B5xaoVWq.js +0 -61
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-
|
|
3
|
-
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } 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, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, dt as sleep$1, et as ensureDir$3, 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$1, 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 toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-DxKPMu8w.js";
|
|
3
|
+
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } from "./paths-C6TxBCvO.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, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, dt as sleep$1, et as ensureDir$3, 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$1, 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-CPYnUTN4.js";
|
|
5
5
|
import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
|
|
6
|
-
import { A as resolveCanonicalIdentity, B as deriveSessionChatType, C as classifySessionKeyShape, D as normalizeAgentId, E as isValidAgentId, F as toAgentStoreSessionKey, G as parseAgentSessionKey, H as isAcpSessionKey, I as DEFAULT_ACCOUNT_ID, K as resolveThreadParentSessionKey, L as normalizeAccountId$3, M as resolveLinkedPeerIdForChannel, N as resolveThreadSessionKeys, O as normalizeMainKey, P as sanitizeAgentId, R as normalizeOptionalAccountId, T as isKnownAgentMainSessionKey, U as isCronSessionKey, V as getSubagentDepth, W as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as resolveConfiguredCanonicalIdentity, k as resolveAgentIdFromSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID, z as WAKE_GATE_SESSION_KEY_SEGMENT } from "./workspace-
|
|
7
|
-
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-
|
|
8
|
-
import { $i as getConfigValueAtPath, $n as TASK_RUN_MODES, $r as resolveSlackBotToken, $t as normalizePluginHttpPath, A as requireApiKey, Aa as resolveSlackStreamingMode, Ai as normalizeAtHashSlug, An as parseInlineDirectives$1, Ar as resolveFreshSessionTotalTokens, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Ba as VERSION, Bi as stringEnum, Bn as extractDeliveryInfo, Br as getChannelDock, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSafeBinProfileFixtures, Ci as listDeliverableMessageChannels, Cn as normalizeDeliveryContext, Cr as evaluateSessionFreshness, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as mapStreamingModeToSlackLegacyDraftStreamMode, Di as GATEWAY_CLIENT_IDS, Dn as capArrayByJsonBytes, Dr as resolveThreadFlag, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as isSafeExecutableValue, Ei as resolveMessageChannel, En as archiveSessionTranscripts, Er as resolveSessionResetType, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fa as isRecord$2, Fi as resolveSessionLockMaxHoldFromTimeout, Fn as jsonUtf8Bytes, Fr as resolveMainSessionKey, Ft as safeStatSync, Ga as dedupeProfileIds, Gi as discardBufferedPluginTaskPasses, Gn as withPreservationWriterPermit, Gr as listTelegramAccountIds, Gt as getActivePluginRegistry, Ha as resolveShellEnvFallbackTimeoutMs, Hi as actionHasTarget, Hn as appendAssistantMessageToSessionTranscript, Hr as normalizeSignalMessagingTarget, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ia as parseDotPath, Ii as readTaskWorkStates, In as createAsyncLock, Ir as deriveSessionMetaPatch, J as TELEGRAM_COMMAND_NAME_PATTERN, Ja as ensureAuthProfileStore, Ji as RecoveryAdmissionError, Jn as drainPendingPrimaryWrites, Jr as buildChannelAccountBindings, Jt as requireActivePluginRegistry, K as writeConfigFile, Ka as listProfilesForProvider, Ki as listBufferedPluginTaskPasses, Kn as isJsonlSessionBackend, Kr as resolveTelegramAccount, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, La as secretRefKey, Li as channelTargetSchema, Ln as readJsonFile, Lr as getChannelPlugin, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Ma as resolveSecretRefValues, Mi as normalizeStringEntries, Mn as applyInputProvenanceToUserMessage, Mr as canonicalizeMainSessionAlias, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Na as describeUnknownError$1, Ni as normalizeStringEntriesLower, Nn as hasInterSessionUserProvenance, Nr as resolveAgentMainSessionKey, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as resolveDiscordPreviewStreamMode, Oi as GATEWAY_CLIENT_MODES, On as countToolResults, Or as DEFAULT_RESET_TRIGGERS, Ot as applyTestPluginDefaults, Pa as isNonEmptyString, Pi as acquireSessionWriteLock, Pn as normalizeInputProvenance, Pr as resolveExplicitAgentSessionKey, Pt as isPathInside, Q as isInboundPathAllowed, Qa as resolveAuthProfileDisplayLabel, Qi as unsetConfigOverride, Qn as onSessionTranscriptUpdate, Qr as resolveSlackAppToken, Qt as createPluginRegistry, R as markAuthProfileFailure, Ra as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Ri as channelTargetsSchema, Rn as writeJsonAtomic, Rr as listChannelPlugins, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Sa as SAFE_BIN_PROFILES, Si as isMarkdownCapableMessageChannel, Sn as mergeDeliveryContext, Sr as resolveSessionKey, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as applyMergePatch, Ti as resolveGatewayMessageChannel, Tn as normalizeAccountId$4, Tr as resolveSessionResetPolicy, Tt as validateJsonSchemaValue, U as loadConfig, Ua as isTruthyEnvValue, Ui as actionRequiresTarget, Ur as createTelegramActionGate, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Va as getShellPathFromLoginShell, Vi as applyTargetToParams, Vn as parseSessionThreadInfo, Vr as listChannelDocks, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wa as resolveOwnerDisplaySetting, Wn as resolveAndPersistSessionFile, Wr as listEnabledTelegramAccounts, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xa as resolveOpenClawAgentDir, Xi as resetConfigOverrides, Xn as hydrateSessionManagerFromDb, Xr as resolveSlackAccount, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Ya as resolveAuthStorePathForDisplay, Yi as getConfigOverrides, Yn as DB_SESSION_HYDRATION_LIMIT, Yt as setActivePluginRegistry, Za as withFileLock, Zi as setConfigOverride, Zn as emitSessionTranscriptUpdate, Zr as resolveSlackReplyToMode, Zt as clearRegisteredPluginApis, _a as isDispatchWrapperExecutable, _i as resolveGroupSessionKey, _n as updateSessionStoreEntry, _r as hasNonzeroUsage, a as isCliProvider, aa as listWritableExplicitTrustedSafeBinDirs, ai as resolveWhatsAppAccount, an as matchPluginCommand, ao as splitTrailingAuthProfile, ar as mergePromptContributions, at as resolveExecPolicyPreset, ba as unwrapKnownShellMultiplexerInvocation, bi as isGatewayMessageChannel, bn as deliveryContextFromSession, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as analyzeShellCommand, ci as resolveIMessageAccount, cn as getActivePreservationLease, co as DEFAULT_PROVIDER, cr as buildInboundUserContextPrefix, d as resolveDefaultModelForAgent, da as splitCommandChain, di as resolveDiscordAccount, dn as loadSessionStore, dr as resolveTimezone, ea as parseConfigPath, ei as listEnabledSignalAccounts, en as buildPluginHealthReport, eo as normalizeSecretInput, er as TASK_RUN_STATUSES, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as DEFAULT_SAFE_BINS, fi as normalizeDiscordToken, fn as readSessionUpdatedAt, fr as resolveSenderLabel, ga as extractShellWrapperInlineCommand, gi as resolveAccountEntry, gn as updateSessionStore, gr as deriveSessionTotalTokens, h as resolveThinkingDefault, ha as resolveCommandResolutionFromArgv, hi as resolveChannelGroupToolsPolicy, hn as updateLastRoute, hr as derivePromptTokens, i as findNormalizedProviderValue, ia as isTrustedSafeBinPath, ii as hasAnyWhatsAppAuth, in as listPluginCommands, io as resolveSecretInputRef, ir as createCurrentUserPromptEnvelope, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ji as normalizeHyphenSlug, jn as INPUT_PROVENANCE_KIND_VALUES, jr as setSessionRuntimeModel, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as resolveSlackNativeStreaming, ki as GATEWAY_CLIENT_NAMES, kn as extractToolCallNames, kr as mergeSessionEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as buildEnforcedShellCommand, li as createDiscordActionGate, ln as getConfiguredSessionStorageRuntime, lr as formatUtcTimestamp, m as resolveSubagentSpawnModelSelection, ma as resolveAllowlistCandidatePath, mi as resolveChannelGroupRequireMention, mn as syncConfiguredSessionTranscriptToRuntime, mr as isDiagnosticsEnabled, n as buildConfiguredAllowlistKeys, na as unsetConfigValueAtPath, ni as isWhatsAppGroupJid, nn as executePluginCommand, no as hasConfiguredSecretInput, nr as sanitizeJsonb, nt as normalizeScpRemoteHost, o as modelKey, oa as normalizeTrustedSafeBinDirs, oi as formatCliCommand, on as registerPluginCommand, oo as DEFAULT_CONTEXT_TOKENS, or as toJsonValue$1, p as resolveReasoningDefault, pa as matchAllowlist, pi as resolveChannelGroupPolicy, pn as recordSessionMetaFromInbound, pr as emitDiagnosticEvent, q as validateConfigObjectWithPlugins, qa as markAuthProfileGood, qi as replaceBufferedPluginTaskPasses, qn as createPrimaryWriteInterceptor, qr as resolveTelegramToken, r as buildModelAliasIndex, ra as getTrustedSafeBinDirs, ri as normalizeWhatsAppTarget, rn as getPluginCommandSpecs, ro as normalizeResolvedSecretInputString, rr as sha256, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as validateSafeBinArgv, si as resolveCliName, so as DEFAULT_MODEL, sr as buildInboundMetaSystemPrompt, t as buildAllowedModelSet, ta as setConfigValueAtPath, ti as resolveSignalAccount, tn as clearPluginCommands, to as coerceSecretRef, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as isWindowsPlatform, ui as listEnabledDiscordAccounts, un as isPreservationArmed, ur as formatZonedTimestamp, va as isShellWrapperExecutable, vi as INTERNAL_MESSAGE_CHANNEL, vn as isCacheEnabled, vr as makeZeroUsageSnapshot, w as buildAssistantMessage, wa as resolveSafeBinProfiles, wi as normalizeMessageChannel, wn as normalizeSessionDeliveryFields, wr as resolveChannelResetConfig, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as splitShellArgs, xi as isInternalMessageChannel, xn as deliveryContextKey, xr as SESSION_RUN_STATUSES, xt as isAvatarDataUrl, ya as unwrapKnownDispatchWrapperInvocation, yi as isDeliverableMessageChannel, yn as resolveCacheTtlMs$1, yr as normalizeUsage, z as markAuthProfileUsed, za as resolveAgentMaxConcurrent, zi as optionalStringEnum, zn as parseDurationMs, zr as normalizeChannelId$1, zt as listChatChannels } from "./model-selection-
|
|
9
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-
|
|
10
|
-
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-
|
|
11
|
-
import { c as resolveSessionFilePathOptions, d as resolveSessionTranscriptsDirForAgent, f as resolveStorePath, l as resolveSessionTranscriptPath, n as isPrimarySessionTranscriptFileName, o as resolveDefaultSessionStorePath, p as runTasksWithConcurrency, s as resolveSessionFilePath } from "./artifacts-
|
|
6
|
+
import { A as resolveCanonicalIdentity, B as deriveSessionChatType, C as classifySessionKeyShape, D as normalizeAgentId, E as isValidAgentId, F as toAgentStoreSessionKey, G as parseAgentSessionKey, H as isAcpSessionKey, I as DEFAULT_ACCOUNT_ID, K as resolveThreadParentSessionKey, L as normalizeAccountId$3, M as resolveLinkedPeerIdForChannel, N as resolveThreadSessionKeys, O as normalizeMainKey, P as sanitizeAgentId, R as normalizeOptionalAccountId, T as isKnownAgentMainSessionKey, U as isCronSessionKey, V as getSubagentDepth, W as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as resolveConfiguredCanonicalIdentity, k as resolveAgentIdFromSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID, z as WAKE_GATE_SESSION_KEY_SEGMENT } from "./workspace-B707AGIc.js";
|
|
7
|
+
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-a0-zAY5a.js";
|
|
8
|
+
import { $i as getConfigValueAtPath, $n as TASK_RUN_MODES, $r as resolveSlackBotToken, $t as normalizePluginHttpPath, A as requireApiKey, Aa as resolveSlackStreamingMode, Ai as normalizeAtHashSlug, An as parseInlineDirectives$1, Ar as resolveFreshSessionTotalTokens, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Ba as VERSION, Bi as stringEnum, Bn as extractDeliveryInfo, Br as getChannelDock, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSafeBinProfileFixtures, Ci as listDeliverableMessageChannels, Cn as normalizeDeliveryContext, Cr as evaluateSessionFreshness, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as mapStreamingModeToSlackLegacyDraftStreamMode, Di as GATEWAY_CLIENT_IDS, Dn as capArrayByJsonBytes, Dr as resolveThreadFlag, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as isSafeExecutableValue, Ei as resolveMessageChannel, En as archiveSessionTranscripts, Er as resolveSessionResetType, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fa as isRecord$2, Fi as resolveSessionLockMaxHoldFromTimeout, Fn as jsonUtf8Bytes, Fr as resolveMainSessionKey, Ft as safeStatSync, Ga as dedupeProfileIds, Gi as discardBufferedPluginTaskPasses, Gn as withPreservationWriterPermit, Gr as listTelegramAccountIds, Gt as getActivePluginRegistry, Ha as resolveShellEnvFallbackTimeoutMs, Hi as actionHasTarget, Hn as appendAssistantMessageToSessionTranscript, Hr as normalizeSignalMessagingTarget, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ia as parseDotPath, Ii as readTaskWorkStates, In as createAsyncLock, Ir as deriveSessionMetaPatch, J as TELEGRAM_COMMAND_NAME_PATTERN, Ja as ensureAuthProfileStore, Ji as RecoveryAdmissionError, Jn as drainPendingPrimaryWrites, Jr as buildChannelAccountBindings, Jt as requireActivePluginRegistry, K as writeConfigFile, Ka as listProfilesForProvider, Ki as listBufferedPluginTaskPasses, Kn as isJsonlSessionBackend, Kr as resolveTelegramAccount, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, La as secretRefKey, Li as channelTargetSchema, Ln as readJsonFile, Lr as getChannelPlugin, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Ma as resolveSecretRefValues, Mi as normalizeStringEntries, Mn as applyInputProvenanceToUserMessage, Mr as canonicalizeMainSessionAlias, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Na as describeUnknownError$1, Ni as normalizeStringEntriesLower, Nn as hasInterSessionUserProvenance, Nr as resolveAgentMainSessionKey, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as resolveDiscordPreviewStreamMode, Oi as GATEWAY_CLIENT_MODES, On as countToolResults, Or as DEFAULT_RESET_TRIGGERS, Ot as applyTestPluginDefaults, Pa as isNonEmptyString, Pi as acquireSessionWriteLock, Pn as normalizeInputProvenance, Pr as resolveExplicitAgentSessionKey, Pt as isPathInside, Q as isInboundPathAllowed, Qa as resolveAuthProfileDisplayLabel, Qi as unsetConfigOverride, Qn as onSessionTranscriptUpdate, Qr as resolveSlackAppToken, Qt as createPluginRegistry, R as markAuthProfileFailure, Ra as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Ri as channelTargetsSchema, Rn as writeJsonAtomic, Rr as listChannelPlugins, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Sa as SAFE_BIN_PROFILES, Si as isMarkdownCapableMessageChannel, Sn as mergeDeliveryContext, Sr as resolveSessionKey, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as applyMergePatch, Ti as resolveGatewayMessageChannel, Tn as normalizeAccountId$4, Tr as resolveSessionResetPolicy, Tt as validateJsonSchemaValue, U as loadConfig, Ua as isTruthyEnvValue, Ui as actionRequiresTarget, Ur as createTelegramActionGate, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Va as getShellPathFromLoginShell, Vi as applyTargetToParams, Vn as parseSessionThreadInfo, Vr as listChannelDocks, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wa as resolveOwnerDisplaySetting, Wn as resolveAndPersistSessionFile, Wr as listEnabledTelegramAccounts, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xa as resolveOpenClawAgentDir, Xi as resetConfigOverrides, Xn as hydrateSessionManagerFromDb, Xr as resolveSlackAccount, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Ya as resolveAuthStorePathForDisplay, Yi as getConfigOverrides, Yn as DB_SESSION_HYDRATION_LIMIT, Yt as setActivePluginRegistry, Za as withFileLock, Zi as setConfigOverride, Zn as emitSessionTranscriptUpdate, Zr as resolveSlackReplyToMode, Zt as clearRegisteredPluginApis, _a as isDispatchWrapperExecutable, _i as resolveGroupSessionKey, _n as updateSessionStoreEntry, _r as hasNonzeroUsage, a as isCliProvider, aa as listWritableExplicitTrustedSafeBinDirs, ai as resolveWhatsAppAccount, an as matchPluginCommand, ao as splitTrailingAuthProfile, ar as mergePromptContributions, at as resolveExecPolicyPreset, ba as unwrapKnownShellMultiplexerInvocation, bi as isGatewayMessageChannel, bn as deliveryContextFromSession, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as analyzeShellCommand, ci as resolveIMessageAccount, cn as getActivePreservationLease, co as DEFAULT_PROVIDER, cr as buildInboundUserContextPrefix, d as resolveDefaultModelForAgent, da as splitCommandChain, di as resolveDiscordAccount, dn as loadSessionStore, dr as resolveTimezone, ea as parseConfigPath, ei as listEnabledSignalAccounts, en as buildPluginHealthReport, eo as normalizeSecretInput, er as TASK_RUN_STATUSES, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as DEFAULT_SAFE_BINS, fi as normalizeDiscordToken, fn as readSessionUpdatedAt, fr as resolveSenderLabel, ga as extractShellWrapperInlineCommand, gi as resolveAccountEntry, gn as updateSessionStore, gr as deriveSessionTotalTokens, h as resolveThinkingDefault, ha as resolveCommandResolutionFromArgv, hi as resolveChannelGroupToolsPolicy, hn as updateLastRoute, hr as derivePromptTokens, i as findNormalizedProviderValue, ia as isTrustedSafeBinPath, ii as hasAnyWhatsAppAuth, in as listPluginCommands, io as resolveSecretInputRef, ir as createCurrentUserPromptEnvelope, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ji as normalizeHyphenSlug, jn as INPUT_PROVENANCE_KIND_VALUES, jr as setSessionRuntimeModel, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as resolveSlackNativeStreaming, ki as GATEWAY_CLIENT_NAMES, kn as extractToolCallNames, kr as mergeSessionEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as buildEnforcedShellCommand, li as createDiscordActionGate, ln as getConfiguredSessionStorageRuntime, lr as formatUtcTimestamp, m as resolveSubagentSpawnModelSelection, ma as resolveAllowlistCandidatePath, mi as resolveChannelGroupRequireMention, mn as syncConfiguredSessionTranscriptToRuntime, mr as isDiagnosticsEnabled, n as buildConfiguredAllowlistKeys, na as unsetConfigValueAtPath, ni as isWhatsAppGroupJid, nn as executePluginCommand, no as hasConfiguredSecretInput, nr as sanitizeJsonb, nt as normalizeScpRemoteHost, o as modelKey, oa as normalizeTrustedSafeBinDirs, oi as formatCliCommand, on as registerPluginCommand, oo as DEFAULT_CONTEXT_TOKENS, or as toJsonValue$1, p as resolveReasoningDefault, pa as matchAllowlist, pi as resolveChannelGroupPolicy, pn as recordSessionMetaFromInbound, pr as emitDiagnosticEvent, q as validateConfigObjectWithPlugins, qa as markAuthProfileGood, qi as replaceBufferedPluginTaskPasses, qn as createPrimaryWriteInterceptor, qr as resolveTelegramToken, r as buildModelAliasIndex, ra as getTrustedSafeBinDirs, ri as normalizeWhatsAppTarget, rn as getPluginCommandSpecs, ro as normalizeResolvedSecretInputString, rr as sha256, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as validateSafeBinArgv, si as resolveCliName, so as DEFAULT_MODEL, sr as buildInboundMetaSystemPrompt, t as buildAllowedModelSet, ta as setConfigValueAtPath, ti as resolveSignalAccount, tn as clearPluginCommands, to as coerceSecretRef, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as isWindowsPlatform, ui as listEnabledDiscordAccounts, un as isPreservationArmed, ur as formatZonedTimestamp, va as isShellWrapperExecutable, vi as INTERNAL_MESSAGE_CHANNEL, vn as isCacheEnabled, vr as makeZeroUsageSnapshot, w as buildAssistantMessage, wa as resolveSafeBinProfiles, wi as normalizeMessageChannel, wn as normalizeSessionDeliveryFields, wr as resolveChannelResetConfig, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as splitShellArgs, xi as isInternalMessageChannel, xn as deliveryContextKey, xr as SESSION_RUN_STATUSES, xt as isAvatarDataUrl, ya as unwrapKnownDispatchWrapperInvocation, yi as isDeliverableMessageChannel, yn as resolveCacheTtlMs$1, yr as normalizeUsage, z as markAuthProfileUsed, za as resolveAgentMaxConcurrent, zi as optionalStringEnum, zn as parseDurationMs, zr as normalizeChannelId$1, zt as listChatChannels } from "./model-selection-CdZITU0t.js";
|
|
9
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-zGOMIGSh.js";
|
|
10
|
+
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-vLJrYADD.js";
|
|
11
|
+
import { c as resolveSessionFilePathOptions, d as resolveSessionTranscriptsDirForAgent, f as resolveStorePath, l as resolveSessionTranscriptPath, n as isPrimarySessionTranscriptFileName, o as resolveDefaultSessionStorePath, p as runTasksWithConcurrency, s as resolveSessionFilePath } from "./artifacts-QHme-vnS.js";
|
|
12
12
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-BnH5Yy9T.js";
|
|
13
|
-
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-
|
|
14
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
15
|
-
import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-
|
|
16
|
-
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
13
|
+
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-ENMm5qbW.js";
|
|
14
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-Do1AlhD5.js";
|
|
15
|
+
import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-LlrD6k2x.js";
|
|
16
|
+
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-9BPY4SaX.js";
|
|
17
17
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BDA1WAvZ.js";
|
|
18
|
-
import { _ as resolveProviderPromptCacheKey, a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, f as getGlobalHookRunner, g as buildPluginTurnIdentity, h as buildPluginRuntimeIdentity, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, m as promptBuildResultToContribution, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, p as initializeGlobalHookRunner, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext, v as resolveProviderRuntimeIdentity } from "./outbound-message-hooks-
|
|
19
|
-
import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-
|
|
18
|
+
import { _ as resolveProviderPromptCacheKey, a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, f as getGlobalHookRunner, g as buildPluginTurnIdentity, h as buildPluginRuntimeIdentity, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, m as promptBuildResultToContribution, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, p as initializeGlobalHookRunner, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext, v as resolveProviderRuntimeIdentity } from "./outbound-message-hooks-RBQbGzGm.js";
|
|
19
|
+
import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-Bbg-zObh.js";
|
|
20
20
|
import { r as getDiagnosticSessionState, s as redactChannelCorrelation } from "./diagnostic-session-state-Bnyx-w0F.js";
|
|
21
21
|
import { t as redactIdentifier } from "./redact-identifier-WYElxwAZ.js";
|
|
22
|
-
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-
|
|
22
|
+
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-DZne_lu8.js";
|
|
23
23
|
import { t as CommandLane } from "./lanes-DTaUAkeG.js";
|
|
24
|
-
import { a as getCommandLaneSnapshots, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isQueuedCommandCancellation, t as CommandLaneAbortedError } from "./command-queue-
|
|
25
|
-
import { $ as resolveTelegramStreamMode, A as resolveTelegramFetch, B as buildTelegramParentPeer, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as buildGroupLabel, G as extractTelegramLocation, H as buildTypingThreadParams, I as buildSenderLabel, J as resolveTelegramDirectPeerId, K as hasBotMention, L as buildSenderName, M as withTelegramApiErrorLogging, N as loadCronStore, O as registerAccount, P as resolveCronStorePath, Q as resolveTelegramReplyId, R as buildTelegramGroupFrom, S as fingerprintTelegramToken, T as recordState, U as describeReplyTarget, V as buildTelegramThreadParams, W as expandTextLinks, X as resolveTelegramGroupAllowFromContext, Y as resolveTelegramForumThreadId, Z as resolveTelegramMediaPlaceholder, _ as isTelegramEditMayHaveLandedError, _t as getPairingAdapter, a as reactMessageTelegram, at as firstDefined$1, b as renderTelegramHtmlText, bt as parseTelegramTarget, c as sendStickerTelegram, ct as resolveGroupAllowFromSources, d as wasSentByBot, dt as addChannelAllowFromStoreEntry, et as resolveTelegramThreadSpec, f as extractTelegramErrorText, ft as readChannelAllowFromStore, g as isTelegramClientRejection, gt as writeJsonFileAtomically, h as isSafeToRetrySendError, ht as readJsonFileWithFallback, i as editMessageTelegram, it as resolveSenderAllowMatch$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as formatLocationText, m as isRecoverableTelegramNetworkError, mt as upsertChannelPairingRequest, n as createForumTopicTelegram, nt as normalizeAllowFrom$2, o as sendMessageTelegram, ot as isSenderIdAllowed, p as isDefiniteTelegramRequestNonDeliveryError, pt as removeChannelAllowFromStoreEntry, q as normalizeForwardedContext, r as deleteMessageTelegram, rt as normalizeDmAllowFromWithStore$1, s as sendPollTelegram, st as mergeDmAllowFromSources, t as buildInlineKeyboard, tt as isSenderAllowed$1, u as resolveTelegramVoiceSend, ut as toLocationContext, v as markdownToTelegramChunks, vt as listPairingChannels, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as resolveTelegramTargetChatType, y as markdownToTelegramHtml, yt as isVoiceCompatibleAudio, z as buildTelegramGroupPeerId } from "./send-
|
|
26
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
27
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
28
|
-
import { $ as resolveSandboxConfigForAgent, A as isFailoverAssistantError, B as isTimeoutErrorMessage, C as formatRawAssistantErrorForUi, D as isCloudCodeAssistFormatError, E as isBillingAssistantError, F as isTransientHttpError, G as registerBrowserRoutes, H as resolveSandboxContext, I as parseImageDimensionError, J as getBridgeAuthForPort, K as resolveBrowserConfig, L as parseImageSizeError, M as isLikelyContextOverflowError, N as isRateLimitAssistantError, O as isCompactionFailureError, P as isRawApiErrorPayload, Q as trimToUndefined$1, R as sanitizeUserFacingText, S as formatBillingErrorMessage, T as isAuthAssistantError, U as resolveSandboxRuntimeStatus, V as ensureSandboxWorkspaceForSession, W as createBrowserRouteContext, X as resolveBrowserControlAuth, Y as ensureBrowserControlAuth, Z as resolveGatewayCredentialsFromConfig, _ as downgradeOpenAIReasoningBlocks, a as isMessagingToolDuplicateNormalized, at as stripPluginOnlyAllowlist, b as classifyFailoverReason, c as sanitizeImageBlocks, ct as resolveToolProfilePolicy, d as canonicalizeBase64, dt as buildBootstrapContextFiles, et as applyOwnerOnlyToolPolicy, f as estimateBase64DecodedBytes, ft as ensureSessionHeader, g as downgradeOpenAIFunctionCallReasoningPairs, h as sanitizeToolCallIdsForCloudCodeAssist, ht as sanitizeGoogleTurnOrdering, it as mergeAlsoAllowPolicy, j as isFailoverErrorMessage, k as isContextOverflowError, l as sanitizeToolResultImages, lt as compileGlobPatterns, m as extractToolResultId, mt as resolveBootstrapTotalMaxChars, n as validateGeminiTurns, nt as collectExplicitAllowlist, o as normalizeTextForComparison, ot as expandToolGroups, p as extractToolCallsFromAssistant, pt as resolveBootstrapMaxChars, q as resolveProfile, r as pickFallbackThinkingLevel, rt as expandPolicyWithPluginGroups, s as sanitizeSessionMessagesImages, st as normalizeToolName, t as validateAnthropicTurns, tt as buildPluginToolGroups, u as resolveImageSanitizationLimits, ut as matchesAnyGlobPattern, v as isGoogleModelApi, w as getApiErrorPayloadFingerprint, x as formatAssistantErrorText, y as BILLING_ERROR_USER_MESSAGE, z as isAuthPermanentErrorMessage } from "./pi-embedded-helpers-
|
|
29
|
-
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-
|
|
30
|
-
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-
|
|
31
|
-
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-
|
|
32
|
-
import { _ as readErrorName, a as isBlockedHostnameOrIp, f as formatErrorChainMessage, h as hasErrnoCode, l as normalizeHostname, m as formatUncaughtError, n as SsrFBlockedError, p as formatErrorMessage, u as collectErrorGraphCandidates } from "./proxy-env-
|
|
33
|
-
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-
|
|
34
|
-
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-
|
|
24
|
+
import { a as getCommandLaneSnapshots, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isQueuedCommandCancellation, t as CommandLaneAbortedError } from "./command-queue-CkNuNlmY.js";
|
|
25
|
+
import { $ as resolveTelegramStreamMode, A as resolveTelegramFetch, B as buildTelegramParentPeer, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as buildGroupLabel, G as extractTelegramLocation, H as buildTypingThreadParams, I as buildSenderLabel, J as resolveTelegramDirectPeerId, K as hasBotMention, L as buildSenderName, M as withTelegramApiErrorLogging, N as loadCronStore, O as registerAccount, P as resolveCronStorePath, Q as resolveTelegramReplyId, R as buildTelegramGroupFrom, S as fingerprintTelegramToken, T as recordState, U as describeReplyTarget, V as buildTelegramThreadParams, W as expandTextLinks, X as resolveTelegramGroupAllowFromContext, Y as resolveTelegramForumThreadId, Z as resolveTelegramMediaPlaceholder, _ as isTelegramEditMayHaveLandedError, _t as getPairingAdapter, a as reactMessageTelegram, at as firstDefined$1, b as renderTelegramHtmlText, bt as parseTelegramTarget, c as sendStickerTelegram, ct as resolveGroupAllowFromSources, d as wasSentByBot, dt as addChannelAllowFromStoreEntry, et as resolveTelegramThreadSpec, f as extractTelegramErrorText, ft as readChannelAllowFromStore, g as isTelegramClientRejection, gt as writeJsonFileAtomically, h as isSafeToRetrySendError, ht as readJsonFileWithFallback, i as editMessageTelegram, it as resolveSenderAllowMatch$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as formatLocationText, m as isRecoverableTelegramNetworkError, mt as upsertChannelPairingRequest, n as createForumTopicTelegram, nt as normalizeAllowFrom$2, o as sendMessageTelegram, ot as isSenderIdAllowed, p as isDefiniteTelegramRequestNonDeliveryError, pt as removeChannelAllowFromStoreEntry, q as normalizeForwardedContext, r as deleteMessageTelegram, rt as normalizeDmAllowFromWithStore$1, s as sendPollTelegram, st as mergeDmAllowFromSources, t as buildInlineKeyboard, tt as isSenderAllowed$1, u as resolveTelegramVoiceSend, ut as toLocationContext, v as markdownToTelegramChunks, vt as listPairingChannels, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as resolveTelegramTargetChatType, y as markdownToTelegramHtml, yt as isVoiceCompatibleAudio, z as buildTelegramGroupPeerId } from "./send-DEFcgo-1.js";
|
|
26
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-D_fm2PuR.js";
|
|
27
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-B9KKtGuw.js";
|
|
28
|
+
import { $ as resolveSandboxConfigForAgent, A as isFailoverAssistantError, B as isTimeoutErrorMessage, C as formatRawAssistantErrorForUi, D as isCloudCodeAssistFormatError, E as isBillingAssistantError, F as isTransientHttpError, G as registerBrowserRoutes, H as resolveSandboxContext, I as parseImageDimensionError, J as getBridgeAuthForPort, K as resolveBrowserConfig, L as parseImageSizeError, M as isLikelyContextOverflowError, N as isRateLimitAssistantError, O as isCompactionFailureError, P as isRawApiErrorPayload, Q as trimToUndefined$1, R as sanitizeUserFacingText, S as formatBillingErrorMessage, T as isAuthAssistantError, U as resolveSandboxRuntimeStatus, V as ensureSandboxWorkspaceForSession, W as createBrowserRouteContext, X as resolveBrowserControlAuth, Y as ensureBrowserControlAuth, Z as resolveGatewayCredentialsFromConfig, _ as downgradeOpenAIReasoningBlocks, a as isMessagingToolDuplicateNormalized, at as stripPluginOnlyAllowlist, b as classifyFailoverReason, c as sanitizeImageBlocks, ct as resolveToolProfilePolicy, d as canonicalizeBase64, dt as buildBootstrapContextFiles, et as applyOwnerOnlyToolPolicy, f as estimateBase64DecodedBytes, ft as ensureSessionHeader, g as downgradeOpenAIFunctionCallReasoningPairs, h as sanitizeToolCallIdsForCloudCodeAssist, ht as sanitizeGoogleTurnOrdering, it as mergeAlsoAllowPolicy, j as isFailoverErrorMessage, k as isContextOverflowError, l as sanitizeToolResultImages, lt as compileGlobPatterns, m as extractToolResultId, mt as resolveBootstrapTotalMaxChars, n as validateGeminiTurns, nt as collectExplicitAllowlist, o as normalizeTextForComparison, ot as expandToolGroups, p as extractToolCallsFromAssistant, pt as resolveBootstrapMaxChars, q as resolveProfile, r as pickFallbackThinkingLevel, rt as expandPolicyWithPluginGroups, s as sanitizeSessionMessagesImages, st as normalizeToolName, t as validateAnthropicTurns, tt as buildPluginToolGroups, u as resolveImageSanitizationLimits, ut as matchesAnyGlobPattern, v as isGoogleModelApi, w as getApiErrorPayloadFingerprint, x as formatAssistantErrorText, y as BILLING_ERROR_USER_MESSAGE, z as isAuthPermanentErrorMessage } from "./pi-embedded-helpers-BYLOFsUc.js";
|
|
29
|
+
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-FHxGdLnd.js";
|
|
30
|
+
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-ckuLxkyg.js";
|
|
31
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-Zj-NwKjV.js";
|
|
32
|
+
import { _ as readErrorName, a as isBlockedHostnameOrIp, f as formatErrorChainMessage, h as hasErrnoCode, l as normalizeHostname, m as formatUncaughtError, n as SsrFBlockedError, p as formatErrorMessage, u as collectErrorGraphCandidates } from "./proxy-env-CzGKpJY_.js";
|
|
33
|
+
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-LRpYbPaA.js";
|
|
34
|
+
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-gQ6FSjVk.js";
|
|
35
35
|
import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-CNiEVKpL.js";
|
|
36
36
|
import { a as normalizeReasoningLevel, c as normalizeVerboseLevel, i as normalizeElevatedLevel, l as resolveResponseUsageMode, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-CwmtMy_H.js";
|
|
37
|
-
import { a as decodeDataUrl, c as ensureOpenClawModelsJson, i as coerceImageModelConfig, o as resolveProviderVisionModelFromConfig, r as coerceImageAssistantText, s as minimaxUnderstandImage } from "./provider-image-
|
|
38
|
-
import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-
|
|
39
|
-
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-
|
|
37
|
+
import { a as decodeDataUrl, c as ensureOpenClawModelsJson, i as coerceImageModelConfig, o as resolveProviderVisionModelFromConfig, r as coerceImageAssistantText, s as minimaxUnderstandImage } from "./provider-image-BllyLBJM.js";
|
|
38
|
+
import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-XFfvRPXl.js";
|
|
39
|
+
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-BoHKSk-O.js";
|
|
40
40
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-BfPtlUW6.js";
|
|
41
|
-
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
42
|
-
import { r as makeProxyFetch } from "./proxy-fetch-
|
|
43
|
-
import { _ as extractTextFromChatContent, a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-
|
|
44
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
41
|
+
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-TJjLK0FV.js";
|
|
42
|
+
import { r as makeProxyFetch } from "./proxy-fetch-DCI0KuH6.js";
|
|
43
|
+
import { _ as extractTextFromChatContent, a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-DOtaZ7KV.js";
|
|
44
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DVkNDBNe.js";
|
|
45
45
|
import { n as isSafeFenceBreak, r as parseFenceSpans, t as findFenceSpanAt } from "./fences-DHXKaTRv.js";
|
|
46
|
-
import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-
|
|
47
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
48
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-
|
|
49
|
-
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-
|
|
50
|
-
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
51
|
-
import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-
|
|
52
|
-
import { _ as resolveReplyToMode, a as normalizeOutboundPayloadsForJson, b as normalizeTargetForProvider, c as loadChannelOutboundAdapter, d as filterMessagingToolDuplicates, f as filterMessagingToolMediaDuplicates, g as createReplyToModeFilterForChannel, h as shouldSuppressReasoningPayload, i as normalizeOutboundPayloads, l as applyReplyTagsToPayload, m as shouldSuppressMessagingToolReplies, o as normalizeReplyPayloadsForDelivery, p as isRenderablePayload, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as applyReplyThreading, v as buildTargetResolverSignature, y as normalizeChannelTargetInput } from "./deliver-
|
|
53
|
-
import { a as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-
|
|
46
|
+
import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-BhntPUH_.js";
|
|
47
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-Dd7jV1JF.js";
|
|
48
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-C4MMLUJr.js";
|
|
49
|
+
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-DC0fovy_.js";
|
|
50
|
+
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-BhMQp_i8.js";
|
|
51
|
+
import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-DGWNXyKA.js";
|
|
52
|
+
import { _ as resolveReplyToMode, a as normalizeOutboundPayloadsForJson, b as normalizeTargetForProvider, c as loadChannelOutboundAdapter, d as filterMessagingToolDuplicates, f as filterMessagingToolMediaDuplicates, g as createReplyToModeFilterForChannel, h as shouldSuppressReasoningPayload, i as normalizeOutboundPayloads, l as applyReplyTagsToPayload, m as shouldSuppressMessagingToolReplies, o as normalizeReplyPayloadsForDelivery, p as isRenderablePayload, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as applyReplyThreading, v as buildTargetResolverSignature, y as normalizeChannelTargetInput } from "./deliver-CXqNQ8yi.js";
|
|
53
|
+
import { a as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-DNRxe9C8.js";
|
|
54
54
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-BXGkQwOQ.js";
|
|
55
55
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-D61IHNsz.js";
|
|
56
|
-
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-
|
|
56
|
+
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-DNq7LYjU.js";
|
|
57
57
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-DzQsLh91.js";
|
|
58
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
59
|
-
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-
|
|
60
|
-
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-
|
|
61
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
62
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
63
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
64
|
-
import { t as createTelegramPollingTransport } from "./proxy-
|
|
65
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
66
|
-
import { t as recordInboundSessionMetaSafe } from "./session-meta-
|
|
67
|
-
import { n as resolveMemorySearchConfig } from "./manager-
|
|
68
|
-
import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-
|
|
58
|
+
import { t as convertMarkdownTables } from "./tables-DEyD0zuy.js";
|
|
59
|
+
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-B0XAAUwL.js";
|
|
60
|
+
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-DGITtNUL.js";
|
|
61
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-Dq8ChBfS.js";
|
|
62
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-CNLmncRW.js";
|
|
63
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-jDAjkfZE.js";
|
|
64
|
+
import { t as createTelegramPollingTransport } from "./proxy-fWL7CKDP.js";
|
|
65
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-NkETqb6B.js";
|
|
66
|
+
import { t as recordInboundSessionMetaSafe } from "./session-meta-DuK_BrWT.js";
|
|
67
|
+
import { n as resolveMemorySearchConfig } from "./manager-DdA_cy40.js";
|
|
68
|
+
import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-31VWpPCz.js";
|
|
69
69
|
import { createRequire } from "node:module";
|
|
70
|
-
import * as fs$
|
|
70
|
+
import * as fs$1 from "node:fs/promises";
|
|
71
71
|
import fs, { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
72
72
|
import os, { homedir } from "node:os";
|
|
73
73
|
import * as path$1 from "node:path";
|
|
74
74
|
import path, { basename, isAbsolute, join } from "node:path";
|
|
75
|
-
import
|
|
76
|
-
import
|
|
75
|
+
import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
76
|
+
import json5 from "json5";
|
|
77
77
|
import { inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
78
78
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
79
79
|
import { fileURLToPath } from "node:url";
|
|
@@ -3100,7 +3100,7 @@ function setPromptSourceCacheEntry(key, entry) {
|
|
|
3100
3100
|
}
|
|
3101
3101
|
function readOpenFileUtf8(fd) {
|
|
3102
3102
|
return new Promise((resolve, reject) => {
|
|
3103
|
-
|
|
3103
|
+
syncFs.readFile(fd, "utf-8", (error, data) => {
|
|
3104
3104
|
if (error) {
|
|
3105
3105
|
reject(error);
|
|
3106
3106
|
return;
|
|
@@ -3111,7 +3111,7 @@ function readOpenFileUtf8(fd) {
|
|
|
3111
3111
|
}
|
|
3112
3112
|
function closeOpenFile(fd) {
|
|
3113
3113
|
return new Promise((resolve, reject) => {
|
|
3114
|
-
|
|
3114
|
+
syncFs.close(fd, (error) => {
|
|
3115
3115
|
if (error) {
|
|
3116
3116
|
reject(error);
|
|
3117
3117
|
return;
|
|
@@ -3550,9 +3550,9 @@ async function copyIfMissing(params) {
|
|
|
3550
3550
|
if (!opened.ok) return opened.reason === "path" ? "missing-source" : "invalid";
|
|
3551
3551
|
let content;
|
|
3552
3552
|
try {
|
|
3553
|
-
content =
|
|
3553
|
+
content = syncFs.readFileSync(opened.fd);
|
|
3554
3554
|
} finally {
|
|
3555
|
-
|
|
3555
|
+
syncFs.closeSync(opened.fd);
|
|
3556
3556
|
}
|
|
3557
3557
|
try {
|
|
3558
3558
|
await writeFileWithinRoot({
|
|
@@ -3915,7 +3915,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3915
3915
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3916
3916
|
if (workspaceDir) {
|
|
3917
3917
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3918
|
-
if (
|
|
3918
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3919
3919
|
}
|
|
3920
3920
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
3921
3921
|
cwd: params.cwd,
|
|
@@ -3924,7 +3924,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3924
3924
|
});
|
|
3925
3925
|
if (packageRoot) {
|
|
3926
3926
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3927
|
-
if (
|
|
3927
|
+
if (syncFs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
|
|
3928
3928
|
}
|
|
3929
3929
|
return DOCS_SITE_URL;
|
|
3930
3930
|
}
|
|
@@ -8338,7 +8338,7 @@ function resolveDefaultIdentityPath() {
|
|
|
8338
8338
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
8339
8339
|
}
|
|
8340
8340
|
function ensureDir$2(filePath) {
|
|
8341
|
-
|
|
8341
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
8342
8342
|
}
|
|
8343
8343
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
8344
8344
|
function base64UrlEncode(buf) {
|
|
@@ -8374,8 +8374,8 @@ function generateIdentity() {
|
|
|
8374
8374
|
}
|
|
8375
8375
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
8376
8376
|
try {
|
|
8377
|
-
if (
|
|
8378
|
-
const raw =
|
|
8377
|
+
if (syncFs.existsSync(filePath)) {
|
|
8378
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
8379
8379
|
const parsed = JSON.parse(raw);
|
|
8380
8380
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
8381
8381
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -8384,9 +8384,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
8384
8384
|
...parsed,
|
|
8385
8385
|
deviceId: derivedId
|
|
8386
8386
|
};
|
|
8387
|
-
|
|
8387
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
8388
8388
|
try {
|
|
8389
|
-
|
|
8389
|
+
syncFs.chmodSync(filePath, 384);
|
|
8390
8390
|
} catch {}
|
|
8391
8391
|
return {
|
|
8392
8392
|
deviceId: derivedId,
|
|
@@ -8411,9 +8411,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
8411
8411
|
privateKeyPem: identity.privateKeyPem,
|
|
8412
8412
|
createdAtMs: Date.now()
|
|
8413
8413
|
};
|
|
8414
|
-
|
|
8414
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
8415
8415
|
try {
|
|
8416
|
-
|
|
8416
|
+
syncFs.chmodSync(filePath, 384);
|
|
8417
8417
|
} catch {}
|
|
8418
8418
|
return identity;
|
|
8419
8419
|
}
|
|
@@ -8605,8 +8605,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
8605
8605
|
}
|
|
8606
8606
|
function readStore(filePath) {
|
|
8607
8607
|
try {
|
|
8608
|
-
if (!
|
|
8609
|
-
const raw =
|
|
8608
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
8609
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
8610
8610
|
const parsed = JSON.parse(raw);
|
|
8611
8611
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
8612
8612
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -8616,10 +8616,10 @@ function readStore(filePath) {
|
|
|
8616
8616
|
}
|
|
8617
8617
|
}
|
|
8618
8618
|
function writeStore(filePath, store) {
|
|
8619
|
-
|
|
8620
|
-
|
|
8619
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
8620
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
8621
8621
|
try {
|
|
8622
|
-
|
|
8622
|
+
syncFs.chmodSync(filePath, 384);
|
|
8623
8623
|
} catch {}
|
|
8624
8624
|
}
|
|
8625
8625
|
function loadDeviceAuthToken(params) {
|
|
@@ -12476,7 +12476,7 @@ async function routeReply(params) {
|
|
|
12476
12476
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
12477
12477
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
12478
12478
|
try {
|
|
12479
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
12479
|
+
const { deliverOutboundPayloads } = await import("./deliver-CXqNQ8yi.js").then((n) => n.n);
|
|
12480
12480
|
const outboundSession = buildOutboundSessionContext({
|
|
12481
12481
|
cfg,
|
|
12482
12482
|
agentId: resolvedAgentId,
|
|
@@ -14064,7 +14064,7 @@ async function sendTranscriptEcho(params) {
|
|
|
14064
14064
|
}
|
|
14065
14065
|
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
|
14066
14066
|
try {
|
|
14067
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
14067
|
+
const { deliverOutboundPayloads } = await import("./deliver-CXqNQ8yi.js").then((n) => n.n);
|
|
14068
14068
|
await deliverOutboundPayloads({
|
|
14069
14069
|
cfg,
|
|
14070
14070
|
channel: normalizedChannel,
|
|
@@ -18346,7 +18346,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
18346
18346
|
}
|
|
18347
18347
|
function ensureDir$1(filePath) {
|
|
18348
18348
|
const dir = path.dirname(filePath);
|
|
18349
|
-
|
|
18349
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
18350
18350
|
}
|
|
18351
18351
|
function coerceAllowlistEntries(allowlist) {
|
|
18352
18352
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -18416,11 +18416,11 @@ function generateToken() {
|
|
|
18416
18416
|
function loadExecApprovals() {
|
|
18417
18417
|
const filePath = resolveExecApprovalsPath();
|
|
18418
18418
|
try {
|
|
18419
|
-
if (!
|
|
18419
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
18420
18420
|
version: 1,
|
|
18421
18421
|
agents: {}
|
|
18422
18422
|
});
|
|
18423
|
-
const raw =
|
|
18423
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
18424
18424
|
const parsed = JSON.parse(raw);
|
|
18425
18425
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
18426
18426
|
version: 1,
|
|
@@ -18437,9 +18437,9 @@ function loadExecApprovals() {
|
|
|
18437
18437
|
function saveExecApprovals(file) {
|
|
18438
18438
|
const filePath = resolveExecApprovalsPath();
|
|
18439
18439
|
ensureDir$1(filePath);
|
|
18440
|
-
|
|
18440
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
18441
18441
|
try {
|
|
18442
|
-
|
|
18442
|
+
syncFs.chmodSync(filePath, 384);
|
|
18443
18443
|
} catch {}
|
|
18444
18444
|
}
|
|
18445
18445
|
function ensureExecApprovals() {
|
|
@@ -19005,18 +19005,18 @@ function peekSystemEventEntries(sessionKey) {
|
|
|
19005
19005
|
function resolvePowerShellPath() {
|
|
19006
19006
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
19007
19007
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
19008
|
-
if (
|
|
19008
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
19009
19009
|
const programW6432 = process.env.ProgramW6432;
|
|
19010
19010
|
if (programW6432 && programW6432 !== programFiles) {
|
|
19011
19011
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
19012
|
-
if (
|
|
19012
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
19013
19013
|
}
|
|
19014
19014
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
19015
19015
|
if (pwshInPath) return pwshInPath;
|
|
19016
19016
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19017
19017
|
if (systemRoot) {
|
|
19018
19018
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19019
|
-
if (
|
|
19019
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
19020
19020
|
}
|
|
19021
19021
|
return "powershell.exe";
|
|
19022
19022
|
}
|
|
@@ -19054,7 +19054,7 @@ function resolveShellFromPath(name) {
|
|
|
19054
19054
|
for (const entry of entries) {
|
|
19055
19055
|
const candidate = path.join(entry, name);
|
|
19056
19056
|
try {
|
|
19057
|
-
|
|
19057
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
19058
19058
|
return candidate;
|
|
19059
19059
|
} catch {}
|
|
19060
19060
|
}
|
|
@@ -22655,7 +22655,7 @@ function ensureContextWindowCacheLoaded() {
|
|
|
22655
22655
|
await ensureOpenClawModelsJson(cfg);
|
|
22656
22656
|
} catch {}
|
|
22657
22657
|
try {
|
|
22658
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-
|
|
22658
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-B9KKtGuw.js").then((n) => n.r);
|
|
22659
22659
|
const agentDir = resolveOpenClawAgentDir();
|
|
22660
22660
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
22661
22661
|
applyDiscoveredContextWindows({
|
|
@@ -22738,7 +22738,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22738
22738
|
function hasGitMarker(repoRoot) {
|
|
22739
22739
|
const gitPath = path.join(repoRoot, ".git");
|
|
22740
22740
|
try {
|
|
22741
|
-
const stat =
|
|
22741
|
+
const stat = syncFs.statSync(gitPath);
|
|
22742
22742
|
return stat.isDirectory() || stat.isFile();
|
|
22743
22743
|
} catch {
|
|
22744
22744
|
return false;
|
|
@@ -22750,10 +22750,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22750
22750
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22751
22751
|
const gitPath = path.join(repoRoot, ".git");
|
|
22752
22752
|
try {
|
|
22753
|
-
const stat =
|
|
22753
|
+
const stat = syncFs.statSync(gitPath);
|
|
22754
22754
|
if (stat.isDirectory()) return gitPath;
|
|
22755
22755
|
if (!stat.isFile()) return null;
|
|
22756
|
-
const match =
|
|
22756
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22757
22757
|
if (!match?.[1]) return null;
|
|
22758
22758
|
return path.resolve(repoRoot, match[1].trim());
|
|
22759
22759
|
} catch {
|
|
@@ -22820,7 +22820,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22820
22820
|
cachedCommit = null;
|
|
22821
22821
|
return cachedCommit;
|
|
22822
22822
|
}
|
|
22823
|
-
const head =
|
|
22823
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
22824
22824
|
if (!head) {
|
|
22825
22825
|
cachedCommit = null;
|
|
22826
22826
|
return cachedCommit;
|
|
@@ -22828,7 +22828,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22828
22828
|
if (head.startsWith("ref:")) {
|
|
22829
22829
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22830
22830
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22831
|
-
cachedCommit = formatCommit(
|
|
22831
|
+
cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
|
|
22832
22832
|
return cachedCommit;
|
|
22833
22833
|
}
|
|
22834
22834
|
cachedCommit = formatCommit(head);
|
|
@@ -23053,17 +23053,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23053
23053
|
} catch {
|
|
23054
23054
|
return;
|
|
23055
23055
|
}
|
|
23056
|
-
if (!
|
|
23056
|
+
if (!syncFs.existsSync(logPath)) return;
|
|
23057
23057
|
try {
|
|
23058
23058
|
const TAIL_BYTES = 8192;
|
|
23059
|
-
const stat =
|
|
23059
|
+
const stat = syncFs.statSync(logPath);
|
|
23060
23060
|
const offset = Math.max(0, stat.size - TAIL_BYTES);
|
|
23061
23061
|
const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
|
|
23062
|
-
const fd =
|
|
23062
|
+
const fd = syncFs.openSync(logPath, "r");
|
|
23063
23063
|
try {
|
|
23064
|
-
|
|
23064
|
+
syncFs.readSync(fd, buf, 0, buf.length, offset);
|
|
23065
23065
|
} finally {
|
|
23066
|
-
|
|
23066
|
+
syncFs.closeSync(fd);
|
|
23067
23067
|
}
|
|
23068
23068
|
const tail = buf.toString("utf-8");
|
|
23069
23069
|
const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
|
|
@@ -27500,7 +27500,7 @@ function resolveRepoRoot(params) {
|
|
|
27500
27500
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
27501
27501
|
if (configured) try {
|
|
27502
27502
|
const resolved = path.resolve(configured);
|
|
27503
|
-
if (
|
|
27503
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
27504
27504
|
} catch {}
|
|
27505
27505
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
27506
27506
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -27897,7 +27897,7 @@ async function buildContextReply(params) {
|
|
|
27897
27897
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
27898
27898
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
27899
27899
|
function loadTemplate(fileName) {
|
|
27900
|
-
return
|
|
27900
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
27901
27901
|
}
|
|
27902
27902
|
function generateHtml(sessionData) {
|
|
27903
27903
|
const template = loadTemplate("template.html");
|
|
@@ -27971,7 +27971,7 @@ async function buildExportSessionReply(params) {
|
|
|
27971
27971
|
} catch (err) {
|
|
27972
27972
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
27973
27973
|
}
|
|
27974
|
-
if (!
|
|
27974
|
+
if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
27975
27975
|
const sessionManager = SessionManager.open(sessionFile);
|
|
27976
27976
|
const entries = sessionManager.getEntries();
|
|
27977
27977
|
const header = sessionManager.getHeader();
|
|
@@ -27992,8 +27992,8 @@ async function buildExportSessionReply(params) {
|
|
|
27992
27992
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
27993
27993
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
27994
27994
|
const outputDir = path.dirname(outputPath);
|
|
27995
|
-
if (!
|
|
27996
|
-
|
|
27995
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
27996
|
+
syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
27997
27997
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
27998
27998
|
return { text: [
|
|
27999
27999
|
"✅ Session exported!",
|
|
@@ -28168,8 +28168,8 @@ function resolveZaiApiKey() {
|
|
|
28168
28168
|
}
|
|
28169
28169
|
try {
|
|
28170
28170
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
28171
|
-
if (!
|
|
28172
|
-
const data = JSON.parse(
|
|
28171
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
28172
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
28173
28173
|
return data["z-ai"]?.access || data.zai?.access;
|
|
28174
28174
|
} catch {
|
|
28175
28175
|
return;
|
|
@@ -29988,7 +29988,7 @@ function shouldPersistAnyBindingState() {
|
|
|
29988
29988
|
}
|
|
29989
29989
|
function shouldPersistBindingMutations() {
|
|
29990
29990
|
if (shouldPersistAnyBindingState()) return true;
|
|
29991
|
-
return
|
|
29991
|
+
return syncFs.existsSync(resolveThreadBindingsPath());
|
|
29992
29992
|
}
|
|
29993
29993
|
function saveBindingsToDisk(params = {}) {
|
|
29994
29994
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -31252,7 +31252,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
31252
31252
|
totals.totalCost += costTotal;
|
|
31253
31253
|
};
|
|
31254
31254
|
async function* readJsonlRecords(filePath) {
|
|
31255
|
-
const fileStream =
|
|
31255
|
+
const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
|
|
31256
31256
|
const rl = readline.createInterface({
|
|
31257
31257
|
input: fileStream,
|
|
31258
31258
|
crlfDelay: Infinity
|
|
@@ -31324,10 +31324,10 @@ async function loadCostUsageSummary(params) {
|
|
|
31324
31324
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
31325
31325
|
const totals = emptyTotals();
|
|
31326
31326
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
31327
|
-
const entries = await
|
|
31327
|
+
const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
31328
31328
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && isPrimarySessionTranscriptFileName(entry.name)).map(async (entry) => {
|
|
31329
31329
|
const filePath = path.join(sessionsDir, entry.name);
|
|
31330
|
-
const stats = await
|
|
31330
|
+
const stats = await syncFs.promises.stat(filePath).catch(() => null);
|
|
31331
31331
|
if (!stats) return null;
|
|
31332
31332
|
if (stats.mtimeMs < sinceTime) return null;
|
|
31333
31333
|
return filePath;
|
|
@@ -31360,7 +31360,7 @@ async function loadCostUsageSummary(params) {
|
|
|
31360
31360
|
}
|
|
31361
31361
|
async function loadSessionCostSummary(params) {
|
|
31362
31362
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
31363
|
-
if (!sessionFile || !
|
|
31363
|
+
if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
|
|
31364
31364
|
const totals = emptyTotals();
|
|
31365
31365
|
let firstActivity;
|
|
31366
31366
|
let lastActivity;
|
|
@@ -32539,8 +32539,8 @@ function normalizeSessionKey(value) {
|
|
|
32539
32539
|
}
|
|
32540
32540
|
function readSessionStore(storePath) {
|
|
32541
32541
|
try {
|
|
32542
|
-
const raw =
|
|
32543
|
-
const parsed =
|
|
32542
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
32543
|
+
const parsed = json5.parse(raw);
|
|
32544
32544
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
32545
32545
|
} catch {}
|
|
32546
32546
|
return {};
|
|
@@ -34203,7 +34203,7 @@ async function createModelSelectionState(params) {
|
|
|
34203
34203
|
}
|
|
34204
34204
|
}
|
|
34205
34205
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
34206
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
34206
|
+
const { ensureAuthProfileStore } = await import("./model-selection-CdZITU0t.js").then((n) => n.P);
|
|
34207
34207
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
34208
34208
|
const providerKey = normalizeProviderId(provider);
|
|
34209
34209
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -37725,7 +37725,7 @@ function asBoolean(value) {
|
|
|
37725
37725
|
}
|
|
37726
37726
|
function resolveTempPathParts(opts) {
|
|
37727
37727
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
37728
|
-
if (!opts.tmpDir)
|
|
37728
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
37729
37729
|
recursive: true,
|
|
37730
37730
|
mode: 448
|
|
37731
37731
|
});
|
|
@@ -37811,7 +37811,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
37811
37811
|
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}`);
|
|
37812
37812
|
const body = res.body;
|
|
37813
37813
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
37814
|
-
const fileHandle = await fs$
|
|
37814
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
37815
37815
|
let thrown;
|
|
37816
37816
|
try {
|
|
37817
37817
|
const reader = body.getReader();
|
|
@@ -37829,7 +37829,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
37829
37829
|
await fileHandle.close();
|
|
37830
37830
|
}
|
|
37831
37831
|
if (thrown) {
|
|
37832
|
-
await fs$
|
|
37832
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
37833
37833
|
throw thrown;
|
|
37834
37834
|
}
|
|
37835
37835
|
} finally {
|
|
@@ -37842,7 +37842,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
37842
37842
|
}
|
|
37843
37843
|
async function writeBase64ToFile(filePath, base64) {
|
|
37844
37844
|
const buf = Buffer.from(base64, "base64");
|
|
37845
|
-
await fs$
|
|
37845
|
+
await fs$1.writeFile(filePath, buf);
|
|
37846
37846
|
return {
|
|
37847
37847
|
path: filePath,
|
|
37848
37848
|
bytes: buf.length
|
|
@@ -41281,9 +41281,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
41281
41281
|
const entries = [];
|
|
41282
41282
|
for (const rawPath of paths) {
|
|
41283
41283
|
const resolved = resolveUserPath(rawPath);
|
|
41284
|
-
if (!
|
|
41284
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
41285
41285
|
try {
|
|
41286
|
-
const payload = JSON.parse(
|
|
41286
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
41287
41287
|
entries.push(...parseCatalogEntries(payload));
|
|
41288
41288
|
} catch {}
|
|
41289
41289
|
}
|
|
@@ -45203,7 +45203,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
45203
45203
|
const root = resolveStateDir();
|
|
45204
45204
|
const agentsDir = path.join(root, "agents");
|
|
45205
45205
|
try {
|
|
45206
|
-
return
|
|
45206
|
+
return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
45207
45207
|
} catch {
|
|
45208
45208
|
return [];
|
|
45209
45209
|
}
|
|
@@ -51498,7 +51498,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
51498
51498
|
if (corruptedSessionId) {
|
|
51499
51499
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
51500
51500
|
try {
|
|
51501
|
-
|
|
51501
|
+
syncFs.unlinkSync(transcriptPath);
|
|
51502
51502
|
} catch {}
|
|
51503
51503
|
}
|
|
51504
51504
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -52294,7 +52294,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
52294
52294
|
if (!logPath) return {};
|
|
52295
52295
|
const snapshot = {};
|
|
52296
52296
|
if (params.includeByteSize) try {
|
|
52297
|
-
const stat = await
|
|
52297
|
+
const stat = await syncFs.promises.stat(logPath);
|
|
52298
52298
|
const size = Math.floor(stat.size);
|
|
52299
52299
|
snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
|
|
52300
52300
|
} catch {
|
|
@@ -52308,7 +52308,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
52308
52308
|
return snapshot;
|
|
52309
52309
|
}
|
|
52310
52310
|
async function readLastNonzeroUsageFromSessionLog(logPath) {
|
|
52311
|
-
const handle = await
|
|
52311
|
+
const handle = await syncFs.promises.open(logPath, "r");
|
|
52312
52312
|
try {
|
|
52313
52313
|
let position = (await handle.stat()).size;
|
|
52314
52314
|
let leadingPartial = "";
|
|
@@ -53081,9 +53081,9 @@ async function readPostCompactionContext(workspaceDir) {
|
|
|
53081
53081
|
if (!opened.ok) return null;
|
|
53082
53082
|
const sections = extractSections((() => {
|
|
53083
53083
|
try {
|
|
53084
|
-
return
|
|
53084
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
53085
53085
|
} finally {
|
|
53086
|
-
|
|
53086
|
+
syncFs.closeSync(opened.fd);
|
|
53087
53087
|
}
|
|
53088
53088
|
})(), ["Session Startup", "Red Lines"]);
|
|
53089
53089
|
if (sections.length === 0) return null;
|
|
@@ -53326,7 +53326,7 @@ async function runReplyAgent(params) {
|
|
|
53326
53326
|
if (resolved) transcriptCandidates.add(resolved);
|
|
53327
53327
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
53328
53328
|
for (const candidate of transcriptCandidates) try {
|
|
53329
|
-
|
|
53329
|
+
syncFs.unlinkSync(candidate);
|
|
53330
53330
|
} catch {}
|
|
53331
53331
|
}
|
|
53332
53332
|
return true;
|
|
@@ -54435,7 +54435,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
54435
54435
|
return;
|
|
54436
54436
|
}
|
|
54437
54437
|
try {
|
|
54438
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
54438
|
+
const { deliverOutboundPayloads } = await import("./deliver-CXqNQ8yi.js").then((n) => n.n);
|
|
54439
54439
|
const outboundSession = buildOutboundSessionContext({
|
|
54440
54440
|
cfg: params.cfg,
|
|
54441
54441
|
sessionKey: params.sessionKey
|
|
@@ -54541,7 +54541,7 @@ async function forkSessionFromParent(params) {
|
|
|
54541
54541
|
agentId: params.agentId,
|
|
54542
54542
|
sessionsDir: params.sessionsDir
|
|
54543
54543
|
});
|
|
54544
|
-
if (!parentSessionFile || !
|
|
54544
|
+
if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
|
|
54545
54545
|
try {
|
|
54546
54546
|
const manager = SessionManager.open(parentSessionFile);
|
|
54547
54547
|
const leafId = manager.getLeafId();
|
|
@@ -54565,7 +54565,7 @@ async function forkSessionFromParent(params) {
|
|
|
54565
54565
|
cwd: manager.getCwd(),
|
|
54566
54566
|
parentSession: parentSessionFile
|
|
54567
54567
|
};
|
|
54568
|
-
|
|
54568
|
+
syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
54569
54569
|
return {
|
|
54570
54570
|
sessionId,
|
|
54571
54571
|
sessionFile
|
|
@@ -63624,7 +63624,7 @@ async function describeStickerImage(params) {
|
|
|
63624
63624
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
63625
63625
|
try {
|
|
63626
63626
|
const buffer = await fs.readFile(imagePath);
|
|
63627
|
-
const { describeImageWithModel } = await import("./provider-image-
|
|
63627
|
+
const { describeImageWithModel } = await import("./provider-image-BllyLBJM.js").then((n) => n.n);
|
|
63628
63628
|
return (await describeImageWithModel({
|
|
63629
63629
|
buffer,
|
|
63630
63630
|
fileName: "sticker.webp",
|
|
@@ -65337,7 +65337,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
65337
65337
|
let transcript;
|
|
65338
65338
|
let carry;
|
|
65339
65339
|
if (needsPreflightTranscription) try {
|
|
65340
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
65340
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-B_5sTSyb.js");
|
|
65341
65341
|
const uploadable = audioAttachments.filter((att) => typeof att.url === "string" && att.url.length > 0);
|
|
65342
65342
|
if (uploadable.length > 0) {
|
|
65343
65343
|
const preflight = await transcribeFirstAudio({
|
|
@@ -66798,7 +66798,7 @@ function identityHasValues(identity) {
|
|
|
66798
66798
|
}
|
|
66799
66799
|
function loadIdentityFromFile(identityPath) {
|
|
66800
66800
|
try {
|
|
66801
|
-
const parsed = parseIdentityMarkdown(
|
|
66801
|
+
const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
|
|
66802
66802
|
if (!identityHasValues(parsed)) return null;
|
|
66803
66803
|
return parsed;
|
|
66804
66804
|
} catch {
|
|
@@ -66822,7 +66822,7 @@ function resolveAvatarSource(cfg, agentId) {
|
|
|
66822
66822
|
}
|
|
66823
66823
|
function resolveExistingPath(value) {
|
|
66824
66824
|
try {
|
|
66825
|
-
return
|
|
66825
|
+
return syncFs.realpathSync(value);
|
|
66826
66826
|
} catch {
|
|
66827
66827
|
return path.resolve(value);
|
|
66828
66828
|
}
|
|
@@ -66840,7 +66840,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
66840
66840
|
reason: "unsupported_extension"
|
|
66841
66841
|
};
|
|
66842
66842
|
try {
|
|
66843
|
-
const stat =
|
|
66843
|
+
const stat = syncFs.statSync(realPath);
|
|
66844
66844
|
if (!stat.isFile()) return {
|
|
66845
66845
|
ok: false,
|
|
66846
66846
|
reason: "missing"
|
|
@@ -72541,23 +72541,23 @@ function createDefaultDeps() {
|
|
|
72541
72541
|
};
|
|
72542
72542
|
},
|
|
72543
72543
|
sendMessageTelegram: async (...args) => {
|
|
72544
|
-
const { sendMessageTelegram } = await import("./send-
|
|
72544
|
+
const { sendMessageTelegram } = await import("./send-DEFcgo-1.js").then((n) => n.l);
|
|
72545
72545
|
return await sendMessageTelegram(...args);
|
|
72546
72546
|
},
|
|
72547
72547
|
sendMessageDiscord: async (...args) => {
|
|
72548
|
-
const { sendMessageDiscord } = await import("./send-
|
|
72548
|
+
const { sendMessageDiscord } = await import("./send-Do1AlhD5.js").then((n) => n.t);
|
|
72549
72549
|
return await sendMessageDiscord(...args);
|
|
72550
72550
|
},
|
|
72551
72551
|
sendMessageSlack: async (...args) => {
|
|
72552
|
-
const { sendMessageSlack } = await import("./send-
|
|
72552
|
+
const { sendMessageSlack } = await import("./send-ENMm5qbW.js").then((n) => n.n);
|
|
72553
72553
|
return await sendMessageSlack(...args);
|
|
72554
72554
|
},
|
|
72555
72555
|
sendMessageSignal: async (...args) => {
|
|
72556
|
-
const { sendMessageSignal } = await import("./send-
|
|
72556
|
+
const { sendMessageSignal } = await import("./send-Dq8ChBfS.js").then((n) => n.i);
|
|
72557
72557
|
return await sendMessageSignal(...args);
|
|
72558
72558
|
},
|
|
72559
72559
|
sendMessageIMessage: async (...args) => {
|
|
72560
|
-
const { sendMessageIMessage } = await import("./send-
|
|
72560
|
+
const { sendMessageIMessage } = await import("./send-CNLmncRW.js").then((n) => n.n);
|
|
72561
72561
|
return await sendMessageIMessage(...args);
|
|
72562
72562
|
}
|
|
72563
72563
|
};
|
|
@@ -78457,7 +78457,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
78457
78457
|
function readFileIfExists(filePath) {
|
|
78458
78458
|
if (!filePath) return;
|
|
78459
78459
|
try {
|
|
78460
|
-
return
|
|
78460
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
78461
78461
|
} catch {
|
|
78462
78462
|
return;
|
|
78463
78463
|
}
|
|
@@ -79078,7 +79078,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
79078
79078
|
prefix: "line-media",
|
|
79079
79079
|
extension: getExtensionForContentType(contentType)
|
|
79080
79080
|
});
|
|
79081
|
-
await
|
|
79081
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
79082
79082
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
79083
79083
|
return {
|
|
79084
79084
|
path: filePath,
|
|
@@ -84874,7 +84874,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
84874
84874
|
}
|
|
84875
84875
|
let commandsRegistry;
|
|
84876
84876
|
async function getCommandsRegistry() {
|
|
84877
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
84877
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DC0fovy_.js").then((n) => n.n);
|
|
84878
84878
|
return commandsRegistry;
|
|
84879
84879
|
}
|
|
84880
84880
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -85204,14 +85204,14 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
85204
85204
|
const channelName = channelInfo?.name;
|
|
85205
85205
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
85206
85206
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
85207
|
-
import("./resolve-route-
|
|
85207
|
+
import("./resolve-route-jDAjkfZE.js").then((n) => n.r),
|
|
85208
85208
|
import("./inbound-context-BXGkQwOQ.js").then((n) => n.n),
|
|
85209
85209
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
85210
85210
|
]);
|
|
85211
85211
|
const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
|
|
85212
85212
|
import("./conversation-label-BnH5Yy9T.js").then((n) => n.t),
|
|
85213
|
-
import("./reply-prefix-
|
|
85214
|
-
import("./session-meta-
|
|
85213
|
+
import("./reply-prefix-DVkNDBNe.js").then((n) => n.n),
|
|
85214
|
+
import("./session-meta-DuK_BrWT.js").then((n) => n.n)
|
|
85215
85215
|
]);
|
|
85216
85216
|
const route = resolveAgentRoute({
|
|
85217
85217
|
cfg,
|
|
@@ -85276,9 +85276,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
85276
85276
|
});
|
|
85277
85277
|
const deliverSlashPayloads = async (replies) => {
|
|
85278
85278
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode, resolveChunkNewlinePacking }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
85279
|
-
import("./replies-
|
|
85280
|
-
import("./chunk-
|
|
85281
|
-
import("./markdown-tables-
|
|
85279
|
+
import("./replies-NkETqb6B.js").then((n) => n.r),
|
|
85280
|
+
import("./chunk-BhntPUH_.js").then((n) => n.s),
|
|
85281
|
+
import("./markdown-tables-Dd7jV1JF.js").then((n) => n.t)
|
|
85282
85282
|
]);
|
|
85283
85283
|
await deliverSlackSlashReplies({
|
|
85284
85284
|
replies,
|
|
@@ -85332,7 +85332,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
85332
85332
|
let nativeCommands = [];
|
|
85333
85333
|
if (nativeEnabled) {
|
|
85334
85334
|
reg = await getCommandsRegistry();
|
|
85335
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
85335
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BhMQp_i8.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
85336
85336
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
85337
85337
|
skillCommands,
|
|
85338
85338
|
provider: "slack"
|
|
@@ -85851,7 +85851,7 @@ async function auditTelegramGroupMembership(params) {
|
|
|
85851
85851
|
groups: [],
|
|
85852
85852
|
elapsedMs: Date.now() - started
|
|
85853
85853
|
};
|
|
85854
|
-
const fetcher = params.proxyUrl ? (await import("./proxy-
|
|
85854
|
+
const fetcher = params.proxyUrl ? (await import("./proxy-fWL7CKDP.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
|
|
85855
85855
|
const { fetchWithTimeout } = await import("./fetch-timeout-BfPtlUW6.js").then((n) => n.r);
|
|
85856
85856
|
const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
|
|
85857
85857
|
const groups = [];
|
|
@@ -88385,7 +88385,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
88385
88385
|
let audioPreflightCarry;
|
|
88386
88386
|
const audioConfigEnabled = cfg.tools?.media?.audio && cfg.tools.media.audio.enabled !== false;
|
|
88387
88387
|
if (hasAudio && !hasUserText && !disableAudioPreflight && (isGroup && requireMention && mentionRegexes.length > 0 || audioConfigEnabled === true)) try {
|
|
88388
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
88388
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-B_5sTSyb.js");
|
|
88389
88389
|
const preflight = await transcribeFirstAudio({
|
|
88390
88390
|
ctx: {
|
|
88391
88391
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -92795,7 +92795,7 @@ async function getMemorySearchManager(params) {
|
|
|
92795
92795
|
if (cached) return { manager: cached };
|
|
92796
92796
|
}
|
|
92797
92797
|
try {
|
|
92798
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
92798
|
+
const { QmdMemoryManager } = await import("./qmd-manager-BwZ0V5fL.js");
|
|
92799
92799
|
const primary = await QmdMemoryManager.create({
|
|
92800
92800
|
cfg: params.cfg,
|
|
92801
92801
|
agentId: params.agentId,
|
|
@@ -92807,7 +92807,7 @@ async function getMemorySearchManager(params) {
|
|
|
92807
92807
|
const wrapper = new FallbackMemoryManager({
|
|
92808
92808
|
primary,
|
|
92809
92809
|
fallbackFactory: async () => {
|
|
92810
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
92810
|
+
const { MemoryIndexManager } = await import("./manager-DdA_cy40.js").then((n) => n.t);
|
|
92811
92811
|
return await MemoryIndexManager.get(params);
|
|
92812
92812
|
}
|
|
92813
92813
|
}, () => {
|
|
@@ -92822,7 +92822,7 @@ async function getMemorySearchManager(params) {
|
|
|
92822
92822
|
}
|
|
92823
92823
|
}
|
|
92824
92824
|
try {
|
|
92825
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
92825
|
+
const { MemoryIndexManager } = await import("./manager-DdA_cy40.js").then((n) => n.t);
|
|
92826
92826
|
return { manager: await MemoryIndexManager.get(params) };
|
|
92827
92827
|
} catch (err) {
|
|
92828
92828
|
return {
|
|
@@ -93374,7 +93374,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
93374
93374
|
}
|
|
93375
93375
|
async function checkReadableFile(pathname) {
|
|
93376
93376
|
try {
|
|
93377
|
-
await fs.access(pathname,
|
|
93377
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
93378
93378
|
return { exists: true };
|
|
93379
93379
|
} catch (err) {
|
|
93380
93380
|
const code = err.code;
|
|
@@ -93433,7 +93433,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
93433
93433
|
}
|
|
93434
93434
|
let dirReadable = null;
|
|
93435
93435
|
try {
|
|
93436
|
-
await fs.access(memoryDir,
|
|
93436
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
93437
93437
|
dirReadable = true;
|
|
93438
93438
|
} catch (err) {
|
|
93439
93439
|
const code = err.code;
|
|
@@ -93880,7 +93880,7 @@ function createPluginRuntime(options = {}) {
|
|
|
93880
93880
|
workStates: readTaskWorkStates
|
|
93881
93881
|
},
|
|
93882
93882
|
resolveLearningWorkspaceDir: (agentId) => resolveLearningWorkspaceDir(loadConfig(), agentId),
|
|
93883
|
-
sessions: { startUserRun: async (params) => (await import("./user-run-recording-
|
|
93883
|
+
sessions: { startUserRun: async (params) => (await import("./user-run-recording-B0XAAUwL.js").then((n) => n.n)).startUserSessionRun(params) }
|
|
93884
93884
|
};
|
|
93885
93885
|
Object.defineProperty(runtime, "analysis", {
|
|
93886
93886
|
enumerable: true,
|
|
@@ -93923,7 +93923,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
93923
93923
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
93924
93924
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
93925
93925
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
93926
|
-
for (const candidate of orderedCandidates) if (
|
|
93926
|
+
for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
|
|
93927
93927
|
const parent = path.dirname(cursor);
|
|
93928
93928
|
if (parent === cursor) break;
|
|
93929
93929
|
cursor = parent;
|
|
@@ -94466,7 +94466,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
94466
94466
|
continue;
|
|
94467
94467
|
}
|
|
94468
94468
|
const safeSource = opened.path;
|
|
94469
|
-
|
|
94469
|
+
syncFs.closeSync(opened.fd);
|
|
94470
94470
|
let mod = null;
|
|
94471
94471
|
try {
|
|
94472
94472
|
mod = getJiti()(safeSource);
|
|
@@ -94626,7 +94626,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
94626
94626
|
}
|
|
94627
94627
|
function safeRealpathOrResolve(value) {
|
|
94628
94628
|
try {
|
|
94629
|
-
return
|
|
94629
|
+
return syncFs.realpathSync(value);
|
|
94630
94630
|
} catch {
|
|
94631
94631
|
return path.resolve(value);
|
|
94632
94632
|
}
|
|
@@ -95088,9 +95088,9 @@ function resolvePatchFileOps(options) {
|
|
|
95088
95088
|
});
|
|
95089
95089
|
assertBoundaryRead(opened, filePath);
|
|
95090
95090
|
try {
|
|
95091
|
-
return
|
|
95091
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
95092
95092
|
} finally {
|
|
95093
|
-
|
|
95093
|
+
syncFs.closeSync(opened.fd);
|
|
95094
95094
|
}
|
|
95095
95095
|
},
|
|
95096
95096
|
writeFile: async (filePath, content) => {
|
|
@@ -95386,7 +95386,7 @@ async function recordLoopOutcome(args) {
|
|
|
95386
95386
|
if (!args.ctx?.sessionKey) return;
|
|
95387
95387
|
try {
|
|
95388
95388
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
|
|
95389
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
95389
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-C1fqyXXD.js");
|
|
95390
95390
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
95391
95391
|
sessionKey: args.ctx.sessionKey,
|
|
95392
95392
|
sessionId: args.ctx?.agentId
|
|
@@ -95413,8 +95413,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
95413
95413
|
const params = args.params;
|
|
95414
95414
|
if (args.ctx?.sessionKey) {
|
|
95415
95415
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
|
|
95416
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
95417
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
95416
|
+
const { logToolLoopAction } = await import("./diagnostic-Bbg-zObh.js").then((n) => n.n);
|
|
95417
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C1fqyXXD.js");
|
|
95418
95418
|
const sessionState = getDiagnosticSessionState({
|
|
95419
95419
|
sessionKey: args.ctx.sessionKey,
|
|
95420
95420
|
sessionId: args.ctx?.agentId
|
|
@@ -97834,9 +97834,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
97834
97834
|
if (!opened.ok) return "";
|
|
97835
97835
|
const sections = extractSections((() => {
|
|
97836
97836
|
try {
|
|
97837
|
-
return
|
|
97837
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
97838
97838
|
} finally {
|
|
97839
|
-
|
|
97839
|
+
syncFs.closeSync(opened.fd);
|
|
97840
97840
|
}
|
|
97841
97841
|
})(), ["Session Startup", "Red Lines"]);
|
|
97842
97842
|
if (sections.length === 0) return "";
|
|
@@ -99669,7 +99669,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
99669
99669
|
if (!apiKeyInfo.apiKey) {
|
|
99670
99670
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
99671
99671
|
} else if (model.provider === "github-copilot") {
|
|
99672
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
99672
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-zGOMIGSh.js").then((n) => n.n);
|
|
99673
99673
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
99674
99674
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
99675
99675
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -106714,7 +106714,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
106714
106714
|
await copilotTokenState.refreshInFlight;
|
|
106715
106715
|
return;
|
|
106716
106716
|
}
|
|
106717
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
106717
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-zGOMIGSh.js").then((n) => n.n);
|
|
106718
106718
|
copilotTokenState.refreshInFlight = (async () => {
|
|
106719
106719
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
106720
106720
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -106806,7 +106806,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
106806
106806
|
return;
|
|
106807
106807
|
}
|
|
106808
106808
|
if (model.provider === "github-copilot") {
|
|
106809
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
106809
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-zGOMIGSh.js").then((n) => n.n);
|
|
106810
106810
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
106811
106811
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
106812
106812
|
if (copilotTokenState) {
|