@symerian/symi 3.4.1 → 3.4.2
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-BgGJEKk4.js → agent-BcHmIY_n.js} +17 -17
- package/dist/{agent-scope-DIjW66iO.js → agent-scope-CKTVXF_1.js} +18 -18
- package/dist/{agents.config-CuasVG0i.js → agents.config-D6lBCMyT.js} +1 -1
- package/dist/{audit-BRI7EaSZ.js → audit-CMPCYnHv.js} +20 -20
- package/dist/{auth-choice-Ar8WHnyN.js → auth-choice-s1SGAS0u.js} +8 -8
- package/dist/{auth-profiles-BFSVvFKy.js → auth-profiles-BDvJK1Bg.js} +9 -9
- package/dist/{auth-token-C8wKZLJM.js → auth-token-BKp_ClDP.js} +1 -1
- package/dist/{browser-cli-BdYqssco.js → browser-cli-DW3CxkSc.js} +9 -9
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +4 -4
- package/dist/bundled/session-memory/handler.js +4 -4
- package/dist/{call-CbF18cyd.js → call-BjHvYJx2.js} +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-D2lzRM-e.js → channel-options-77nGDc70.js} +1 -1
- package/dist/{channels-cli-DFN6N0Vp.js → channels-cli-C048Z7h-.js} +54 -54
- package/dist/{chrome-D5UEEo4y.js → chrome-BQoO4LXq.js} +2 -2
- package/dist/{chrome-CbVmSQ7D.js → chrome-C0vnHDyY.js} +7 -7
- package/dist/{chrome-BWQSyLHT.js → chrome-droANDig.js} +7 -7
- package/dist/{cli-BI2hMJ3x.js → cli-CXAyZ9dx.js} +42 -42
- package/dist/{client-ZZqt0H0-.js → client-Bs2zB0rY.js} +1 -1
- package/dist/{command-registry-CwnRHggJ.js → command-registry-B9TplwzB.js} +4 -4
- package/dist/{commands-registry-BNCcZy2y.js → commands-registry-CLePPNDW.js} +1 -1
- package/dist/{completion-cli-DwN2HXNn.js → completion-cli-Dv8CNTMW.js} +2 -2
- package/dist/{completion-cli-Cyueakwc.js → completion-cli-ecfjoaIU.js} +12 -12
- package/dist/{config-MU0QT0xu.js → config-BEaq2Sb6.js} +2 -2
- package/dist/{config-cli-C2Nwn4ID.js → config-cli-CAwWFZwh.js} +4 -4
- package/dist/{config-guard-VJr2yVm_.js → config-guard-29sjAeg8.js} +6 -6
- package/dist/{config-validation-BkJh21Ko.js → config-validation-Bp2AdKjN.js} +1 -1
- package/dist/{configure-2zKlA3cu.js → configure-DvVtZB1V.js} +14 -14
- package/dist/{consolidate-DhJ5sq5p.js → consolidate-DeA11kIO.js} +6 -6
- package/dist/{control-service-D1aZqS0Q.js → control-service-DhlgNQGb.js} +4 -4
- package/dist/{control-ui-assets-DUhvOLUL.js → control-ui-assets-D22DSxhv.js} +1 -1
- package/dist/{cron-cli-Ch8MwxYs.js → cron-cli-Cr8hrEDQ.js} +7 -7
- package/dist/{daemon-cli-DbwmIQAj.js → daemon-cli-OZuuMobs.js} +11 -11
- package/dist/{daemon-runtime-DDwhgI7i.js → daemon-runtime-Dr_xKl0r.js} +10 -10
- package/dist/{deliver-VAsFQe0w.js → deliver-BwcK0QD6.js} +4 -4
- package/dist/{deliver-BX3IOm7k.js → deliver-ccf_boim.js} +2 -2
- package/dist/{deliver-BBoTRer2.js → deliver-vzAN9mRl.js} +4 -4
- package/dist/{deps-BCywDAi0.js → deps-B6QYsl_-.js} +1 -1
- package/dist/{devices-cli-ZiU2HGbP.js → devices-cli-DN3SH89Z.js} +6 -6
- package/dist/{diagnostics-DxdqTfpW.js → diagnostics-nLP2i_BY.js} +5 -5
- package/dist/{directory-cli-DJnKldBM.js → directory-cli-B72WzWuP.js} +3 -3
- package/dist/{dm-policy-shared-BzGFEhLb.js → dm-policy-shared-DiZ3lMtl.js} +1 -1
- package/dist/{dns-cli-LhrwMgGE.js → dns-cli-DPO4AuUq.js} +3 -3
- package/dist/{docs-cli-DjQ3SvBq.js → docs-cli-C2BEC5yU.js} +1 -1
- package/dist/{doctor-completion-DLMAxB2b.js → doctor-completion-Cvu8koMQ.js} +2 -2
- package/dist/{doctor-completion-B9khF9iy.js → doctor-completion-DwrIExJJ.js} +1 -1
- package/dist/{doctor-config-flow-j1iK-0XV.js → doctor-config-flow-Cu1ZuFHd.js} +9 -9
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-DqWFmApk.js → exec-approvals-cli-BN5OFwrg.js} +13 -13
- package/dist/extensionAPI.js +4 -4
- package/dist/{fs-safe-B6nMaZqV.js → fs-safe-DjAKGGJ8.js} +6 -6
- package/dist/{gateway-cli-05LQa0LN.js → gateway-cli-C_wDspkm.js} +120 -120
- package/dist/{gateway-cli-CUiAKfCT.js → gateway-cli-uquFQTQW.js} +1 -1
- package/dist/{gateway-rpc-RZAJMB1i.js → gateway-rpc-fQLZhzRK.js} +1 -1
- package/dist/{health-DnOYGIFp.js → health-DUulgHFK.js} +4 -4
- package/dist/{hooks-cli-BERKc4aw.js → hooks-cli-6UBBpeAz.js} +56 -56
- package/dist/{image-ops-C-gIIp7Q.js → image-ops-c7_of0HT.js} +10 -10
- package/dist/index.js +49 -49
- package/dist/{inspect-BDzd6yBs.js → inspect-op0Ov-v4.js} +4 -4
- package/dist/{install-safe-path-CQXx3s9R.js → install-safe-path-B73BkVO3.js} +11 -11
- package/dist/{installs-DhSLZRT7.js → installs-BzgwvqqQ.js} +10 -10
- package/dist/{internal-CHnZdvRy.js → internal-C3o_xyzP.js} +9 -9
- package/dist/{lifecycle-core-B9_prcP5.js → lifecycle-core-BmGPBj_P.js} +5 -5
- package/dist/llm-slug-generator.js +4 -4
- package/dist/{local-roots-BnDnugq3.js → local-roots-CUKhHNCV.js} +1 -1
- package/dist/{logs-cli-BuaYoENt.js → logs-cli-BXBN6_Kf.js} +7 -7
- package/dist/{manager-BQJivzx9.js → manager-C_5p8DxF.js} +14 -14
- package/dist/{manager-GRHfrG3p.js → manager-DOfc0hW0.js} +1 -1
- package/dist/{manager-1b5V7lDX.js → manager-WHZtXzz0.js} +1 -1
- package/dist/{memory-ZiPonhHz.js → memory-BZPO-RoX.js} +5 -5
- package/dist/{memory-cli-B5TU8zxX.js → memory-cli-4vj-LpgO.js} +12 -12
- package/dist/{model-BRcKPW49.js → model-CbRy_3xW.js} +1 -1
- package/dist/{model-catalog-De1c8o1y.js → model-catalog-BrW9BL1p.js} +4 -4
- package/dist/{model-picker-CjVFmtQf.js → model-picker-UrQQVAuN.js} +3 -3
- package/dist/{models-cli-BzP7r0Pr.js → models-cli-BRnmApgY.js} +52 -52
- package/dist/{models-config-C-VjjDXg.js → models-config-Dh1tABIl.js} +7 -7
- package/dist/{node-cli-dAjmpFFQ.js → node-cli-DXCDRV3y.js} +27 -27
- package/dist/{node-service-DLCN3Pek.js → node-service-n6G8Ybbk.js} +1 -1
- package/dist/{nodes-cli-Bavn0Wq1.js → nodes-cli-Fyv-oG6A.js} +10 -10
- package/dist/{nodes-screen-JELuBMBi.js → nodes-screen-CT94yu_w.js} +4 -4
- package/dist/{npm-registry-spec-BXw_6vF6.js → npm-registry-spec-B8X06AqB.js} +9 -9
- package/dist/{onboard-DbjF9LIj.js → onboard-CEyd79t_.js} +13 -13
- package/dist/{onboard-Yx5pWXot.js → onboard-CLSFAKKt.js} +1 -1
- package/dist/{onboard-channels-D1ThqeIv.js → onboard-channels-DqhDDHZ3.js} +4 -4
- package/dist/{onboard-custom-Dmv0zr-6.js → onboard-custom-BRFhBogJ.js} +3 -3
- package/dist/{onboard-helpers-DpIB1xVU.js → onboard-helpers-wgkj6qF2.js} +8 -8
- package/dist/{onboard-hooks-DDANBk-9.js → onboard-hooks-CknstfLG.js} +1 -1
- package/dist/{onboard-remote-MlK-zjua.js → onboard-remote-B5rlIYUq.js} +1 -1
- package/dist/{onboard-skills-BFebcdsU.js → onboard-skills-_6kHqhHz.js} +4 -4
- package/dist/{onboarding-BIOnPknC.js → onboarding-CJuG6AyD.js} +1 -1
- package/dist/{onboarding-B4y_mt01.js → onboarding-CREA0oQK.js} +12 -12
- package/dist/{onboarding.finalize-DvuthtW0.js → onboarding.finalize-7iPylQyi.js} +4 -4
- package/dist/{onboarding.finalize-CdYyVsOB.js → onboarding.finalize-CkgL8Zde.js} +31 -31
- package/dist/{onboarding.gateway-config-DC9fM10t.js → onboarding.gateway-config-DtNG0As8.js} +8 -8
- package/dist/{openai-model-default-DYlS_J2T.js → openai-model-default-DeTAMJKz.js} +2 -2
- package/dist/{pairing-cli-D1zyMuRV.js → pairing-cli-BvP6MoPZ.js} +4 -4
- package/dist/{pairing-store-BGf29nPx.js → pairing-store-S9CXOhSG.js} +1 -1
- package/dist/{pairing-token-CURbSHdi.js → pairing-token-DorpwP8O.js} +7 -7
- package/dist/{paths-Dc6A9_vI.js → paths-DaQrPPet.js} +1 -1
- package/dist/{pi-auth-json-SHGGQzOL.js → pi-auth-json-CVwNh4rb.js} +5 -5
- package/dist/{pi-embedded-BvMMjrvj.js → pi-embedded-B7_uthwZ.js} +10 -10
- package/dist/{pi-embedded-helpers-D4cxQiPr.js → pi-embedded-helpers-DGW2untm.js} +6 -6
- package/dist/{pi-tools.policy-NmG0EGEY.js → pi-tools.policy-BcTgKDG6.js} +3 -3
- package/dist/{plugin-auto-enable-D2TNEv3x.js → plugin-auto-enable-BDPdHiLS.js} +1 -1
- package/dist/{plugin-registry-B0d7w7Tq.js → plugin-registry-bskbnEuW.js} +3 -3
- package/dist/plugin-sdk/index.js +6 -6
- package/dist/{plugins-cli-DNMBwSsv.js → plugins-cli-LQUO7D2v.js} +51 -51
- package/dist/{ports-DRHSHvqY.js → ports-ChuJYhEL.js} +1 -1
- package/dist/{ports-DqxP-bXz.js → ports-EAVAOFyK.js} +2 -2
- package/dist/{program-DKmohZYs.js → program-BgrmtnFn.js} +2 -2
- package/dist/{program-context-BHCqXp7K.js → program-context-C_uJXnZV.js} +38 -38
- package/dist/{prompt-select-styled-DIpkZ3Py.js → prompt-select-styled-B3nTSykf.js} +36 -35
- package/dist/{prompt-select-styled-CJ7vyifz.js → prompt-select-styled-CuGBQ9LO.js} +2 -1
- package/dist/{provider-auth-helpers-rT0mj3Rg.js → provider-auth-helpers-IsZNkaS0.js} +5 -5
- package/dist/{push-apns-KHQGzTcZ.js → push-apns-C7t2qAZ6.js} +4 -4
- package/dist/{pw-ai-HU-K9Kp6.js → pw-ai-Bc5uzn_J.js} +1 -1
- package/dist/{pw-ai-CNOE7SUx.js → pw-ai-Tm3pd-HP.js} +1 -1
- package/dist/{pw-ai-CyCnG_Kj.js → pw-ai-YJhl5L-z.js} +7 -7
- package/dist/{qmd-manager-CAQYVZT8.js → qmd-manager-CrRvB46v.js} +19 -19
- package/dist/{qr-cli-Cc3gulVb.js → qr-cli-D1U-qIkG.js} +3 -3
- package/dist/{register.agent-D3QRjMQA.js → register.agent-BblNQlzT.js} +64 -64
- package/dist/{register.configure-BlCCtcgW.js → register.configure-BJ7xtOUZ.js} +67 -67
- package/dist/{register.maintenance-C-U8Vjdk.js → register.maintenance-DLJpeuc4.js} +64 -64
- package/dist/{register.maintenance-BH0tQsKC.js → register.maintenance-w7sKxODf.js} +5 -5
- package/dist/{register.message-BJEu7jXo.js → register.message-CXEwBJ1O.js} +44 -44
- package/dist/{register.onboard-B_WCIG9n.js → register.onboard-B520Ixsd.js} +22 -22
- package/dist/{register.onboard-CcvZY9rS.js → register.onboard-DJmVC_6h.js} +2 -2
- package/dist/{register.setup-CXojM7PS.js → register.setup-BTse4F3a.js} +25 -25
- package/dist/{register.setup-CLFM22gp.js → register.setup-Br-aZ0qD.js} +2 -2
- package/dist/{register.status-health-sessions-DAraoWwd.js → register.status-health-sessions-Dbizirr2.js} +38 -38
- package/dist/{register.subclis-4IO5JLGL.js → register.subclis-CSJZQox4.js} +3 -3
- package/dist/{replies-t5bPemnD.js → replies-CbipVshj.js} +1 -1
- package/dist/{reply-prefix-BOdARKaY.js → reply-prefix-DZQBodKF.js} +1 -1
- package/dist/{resolve-route-CRWE36h5.js → resolve-route-BbUl3Hi7.js} +1 -1
- package/dist/{routes-CTOYLhQ1.js → routes-DiqMB1cp.js} +10 -10
- package/dist/{rpc-BLUOZg0H.js → rpc-BcPBUUXl.js} +1 -1
- package/dist/{run-main-dgWHEHSR.js → run-main-DISYU1dh.js} +3 -3
- package/dist/{sandbox-CpZmnHRC.js → sandbox-DPn-s_K5.js} +18 -18
- package/dist/{sandbox-cli-DtbM64tR.js → sandbox-cli-Bl5CMRjH.js} +13 -13
- package/dist/{security-cli-CnNnxSRu.js → security-cli-DuxEuSGr.js} +28 -28
- package/dist/{send-zbkImdk9.js → send-CYJucYob.js} +7 -7
- package/dist/{server-context-Dytgl6ZD.js → server-context-BUbuOgNz.js} +5 -5
- package/dist/{server-node-events-CY5_aNdi.js → server-node-events-7ToqdaU5.js} +45 -45
- package/dist/{service-AP9pR9R5.js → service-9ItKCWWS.js} +15 -15
- package/dist/{session-dirs-CFEdAT4Z.js → session-dirs-DONOhYc3.js} +16 -16
- package/dist/{session-utils-NOQiGgMD.js → session-utils-CqSXwGYa.js} +12 -12
- package/dist/{sessions-B7Of0Rqm.js → sessions-DorP6zY8.js} +11 -11
- package/dist/{shared-BmS-LOw8.js → shared-Z3KjnA8n.js} +3 -3
- package/dist/{shared-DmYHvtn2.js → shared-ot5_jkpP.js} +1 -1
- package/dist/{skill-commands-5QB5E8bv.js → skill-commands-RbglvrSW.js} +4 -4
- package/dist/{skill-scanner-YF2jR4RY.js → skill-scanner-CZK0TG9g.js} +5 -5
- package/dist/{skills-Bmjf5nFv.js → skills-DS1Vdylm.js} +4 -4
- package/dist/{skills-cli-CGPerRcN.js → skills-cli-BmIb-9--.js} +7 -7
- package/dist/{skills-install-DLUMpiCC.js → skills-install-DcX1Txvp.js} +3 -3
- package/dist/{skills-remote-CqwR3Zvp.js → skills-remote-BDSyRdyX.js} +3 -3
- package/dist/{skills-status-BNDqwHkP.js → skills-status-F7nlolZZ.js} +1 -1
- package/dist/{sqlite-DBEvS-Ne.js → sqlite-BUXBg2yu.js} +5 -5
- package/dist/{status-C6HwMPLx.js → status-CR4VgVZ0.js} +3 -3
- package/dist/{status-CJ4x2gHu.js → status-Hf__QNbH.js} +23 -23
- package/dist/{status.update-iWEAq6bt.js → status.update-DOj5ifHZ.js} +3 -3
- package/dist/{symi-root-DueRHNOE.js → symi-root-0MUhiNlM.js} +2 -2
- package/dist/{synthesis-Q30uczDF.js → synthesis-B4G0BnU5.js} +4 -4
- package/dist/{synthesis-DcGTICel.js → synthesis-C-IePZG6.js} +4 -4
- package/dist/{synthesis-DvSl5w4K.js → synthesis-CK0K7wFk.js} +42 -42
- package/dist/{system-cli-DKMfh71A.js → system-cli-BKp2K0sb.js} +7 -7
- package/dist/{systemd-9LEEqibe.js → systemd-8KKQdTO_.js} +5 -5
- package/dist/{systemd-hints-RoqMZFFM.js → systemd-hints-BefHB3bX.js} +6 -6
- package/dist/{systemd-linger-CWJhsBBY.js → systemd-linger-C0-G8yq4.js} +1 -1
- package/dist/{tui-DeVQrlt9.js → tui-BheB3rbE.js} +7 -7
- package/dist/{tui-cli-3EAQXwu7.js → tui-cli-BDcU-VgA.js} +19 -19
- package/dist/{unified-runner-CSn91cbr.js → unified-runner-BSdnT6eM.js} +10 -10
- package/dist/{unified-runner-CjFXehHb.js → unified-runner-D6p4N2vu.js} +99 -99
- package/dist/{update-CE8nDV7s.js → update-Djvyvehx.js} +3 -3
- package/dist/{update-check-CZxZhEXr.js → update-check-BdSIMYWq.js} +5 -5
- package/dist/{update-cli-BN4_mr6c.js → update-cli-BmQuYKTw.js} +5 -5
- package/dist/{update-cli-CUGTzKWo.js → update-cli-CwznFR5g.js} +74 -74
- package/dist/{webhooks-cli-CoIL1D4T.js → webhooks-cli-D_wAaLOU.js} +4 -4
- package/dist/{with-timeout-COajnkmj.js → with-timeout-CAUWEPmp.js} +1 -1
- package/dist/{workspace-dirs-D5OnUmvw.js → workspace-dirs-QmSWJptJ.js} +1 -1
- package/dist/{wsl-ZWGwnnKI.js → wsl-DO9usEVV.js} +2 -2
- package/package.json +1 -1
|
@@ -3,86 +3,86 @@ import { D as shouldLogVerbose, H as createInternalHookEvent, M as getChildLogge
|
|
|
3
3
|
import { g as resolveStateDir, u as resolveGatewayPort } from "./paths-BSzKwaxE.js";
|
|
4
4
|
import { S as isPlainObject, _ as shortenHomeInString, b as sliceUtf16Safe, c as escapeRegExp, h as resolveUserPath, r as clampInt, t as CONFIG_DIR, u as isRecord, v as shortenHomePath, x as truncateUtf16Safe, y as sleep } from "./utils-BU8jVQFM.js";
|
|
5
5
|
import { d as createNonExitingRuntime, f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-CtH6J8AV.js";
|
|
6
|
-
import { A as buildConfiguredAllowlistKeys, At as resolveShellEnvFallbackTimeoutMs, Ct as resolveEnvApiKey, Et as normalizeSecretInput, F as modelKey, H as resolveDefaultModelForAgent, Ht as DEFAULT_MODEL, I as normalizeModelRef$1, K as resolveSubagentSpawnModelSelection, L as normalizeProviderId, M as findNormalizedProviderValue, Ot as getShellPathFromLoginShell, T as resolveSymiAgentDir, Ut as DEFAULT_PROVIDER, V as resolveConfiguredModelRef, Vt as DEFAULT_CONTEXT_TOKENS, W as resolveModelRefFromString, Wt as resolveAuthProfileDisplayLabel, _t as createOllamaStreamFn, a as markAuthProfileFailure, b as ensureAuthProfileStore, bt as requireApiKey, et as normalizeGoogleModelId, g as markAuthProfileGood, gt as OLLAMA_NATIVE_BASE_URL, h as listProfilesForProvider, i as isProfileInCooldown, j as buildModelAliasIndex, k as buildAllowedModelSet, n as resolveAuthProfileOrder, o as markAuthProfileUsed, q as resolveThinkingDefault, r as getSoonestCooldownExpiry, vt as getApiKeyForModel, w as resolveAuthStorePathForDisplay, wt as resolveModelAuthMode, xt as resolveApiKeyForProvider, yt as getCustomProviderApiKey } from "./auth-profiles-
|
|
6
|
+
import { A as buildConfiguredAllowlistKeys, At as resolveShellEnvFallbackTimeoutMs, Ct as resolveEnvApiKey, Et as normalizeSecretInput, F as modelKey, H as resolveDefaultModelForAgent, Ht as DEFAULT_MODEL, I as normalizeModelRef$1, K as resolveSubagentSpawnModelSelection, L as normalizeProviderId, M as findNormalizedProviderValue, Ot as getShellPathFromLoginShell, T as resolveSymiAgentDir, Ut as DEFAULT_PROVIDER, V as resolveConfiguredModelRef, Vt as DEFAULT_CONTEXT_TOKENS, W as resolveModelRefFromString, Wt as resolveAuthProfileDisplayLabel, _t as createOllamaStreamFn, a as markAuthProfileFailure, b as ensureAuthProfileStore, bt as requireApiKey, et as normalizeGoogleModelId, g as markAuthProfileGood, gt as OLLAMA_NATIVE_BASE_URL, h as listProfilesForProvider, i as isProfileInCooldown, j as buildModelAliasIndex, k as buildAllowedModelSet, n as resolveAuthProfileOrder, o as markAuthProfileUsed, q as resolveThinkingDefault, r as getSoonestCooldownExpiry, vt as getApiKeyForModel, w as resolveAuthStorePathForDisplay, wt as resolveModelAuthMode, xt as resolveApiKeyForProvider, yt as getCustomProviderApiKey } from "./auth-profiles-BDvJK1Bg.js";
|
|
7
7
|
import { t as formatCliCommand } from "./command-format-BvAkTjTI.js";
|
|
8
8
|
import { S as resolveThreadParentSessionKey, _ as isAcpSessionKey, a as classifySessionKeyShape, b as isSubagentSessionKey, c as resolveAgentIdFromSessionKey, g as getSubagentDepth, l as resolveThreadSessionKeys, m as normalizeAccountId, o as normalizeAgentId, p as DEFAULT_ACCOUNT_ID, r as buildAgentMainSessionKey, s as normalizeMainKey, t as DEFAULT_AGENT_ID, u as sanitizeAgentId, x as parseAgentSessionKey, y as isCronSessionKey } from "./session-key-B_ZVH1kE.js";
|
|
9
|
-
import { n as resolveSymiPackageRootSync, t as resolveSymiPackageRoot } from "./symi-root-
|
|
9
|
+
import { n as resolveSymiPackageRootSync, t as resolveSymiPackageRoot } from "./symi-root-0MUhiNlM.js";
|
|
10
10
|
import { a as logError, i as logDebug, n as runExec, o as logInfo, r as spawnWithFallback, s as logWarn, t as runCommandWithTimeout } from "./exec-DKyLtSjm.js";
|
|
11
|
-
import { C as ensureAgentWorkspace, E as loadWorkspaceBootstrapFiles, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, f as resolveSessionAgentIds, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, m as DEFAULT_AGENT_WORKSPACE_DIR, r as resolveAgentConfig, s as resolveAgentSkillsFilter, w as filterBootstrapFilesForSession } from "./agent-scope-
|
|
11
|
+
import { C as ensureAgentWorkspace, E as loadWorkspaceBootstrapFiles, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, f as resolveSessionAgentIds, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, m as DEFAULT_AGENT_WORKSPACE_DIR, r as resolveAgentConfig, s as resolveAgentSkillsFilter, w as filterBootstrapFilesForSession } from "./agent-scope-CKTVXF_1.js";
|
|
12
12
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-BTNK6Tcd.js";
|
|
13
13
|
import { t as parseBooleanValue } from "./boolean-Wzu0-e0P.js";
|
|
14
14
|
import { t as isTruthyEnvValue } from "./env-B97Ms861.js";
|
|
15
|
-
import { A as isRawApiErrorPayload, B as sanitizeGoogleTurnOrdering, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, I as buildBootstrapContextFiles, L as ensureSessionHeader, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, R as resolveBootstrapMaxChars, S as isBillingAssistantError, T as isContextOverflowError, _ as formatAssistantErrorText, a as normalizeTextForComparison, b as getApiErrorPayloadFingerprint, c as sanitizeToolResultImages, d as extractToolResultId, f as downgradeOpenAIReasoningBlocks, g as classifyFailoverReason, h as BILLING_ERROR_USER_MESSAGE, i as isMessagingToolDuplicateNormalized, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as resolveImageSanitizationLimits, m as isGoogleModelApi, n as validateGeminiTurns, o as sanitizeSessionMessagesImages, p as isAntigravityClaude, r as pickFallbackThinkingLevel, s as sanitizeImageBlocks, t as validateAnthropicTurns, u as extractToolCallsFromAssistant, v as formatBillingErrorMessage, w as isCompactionFailureError, x as isAuthAssistantError, y as formatRawAssistantErrorForUi, z as resolveBootstrapTotalMaxChars } from "./pi-embedded-helpers-
|
|
16
|
-
import { A as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, C as unsetConfigValueAtPath, N as VERSION, S as setConfigValueAtPath, _ as resetConfigOverrides, b as getConfigValueAtPath, c as resolveConfigSnapshotHash, f as parseDurationMs, g as getConfigOverrides, h as validateJsonSchemaValue, i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot, u as validateConfigObjectWithPlugins, v as setConfigOverride, x as parseConfigPath, y as unsetConfigOverride } from "./config-
|
|
15
|
+
import { A as isRawApiErrorPayload, B as sanitizeGoogleTurnOrdering, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, I as buildBootstrapContextFiles, L as ensureSessionHeader, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, R as resolveBootstrapMaxChars, S as isBillingAssistantError, T as isContextOverflowError, _ as formatAssistantErrorText, a as normalizeTextForComparison, b as getApiErrorPayloadFingerprint, c as sanitizeToolResultImages, d as extractToolResultId, f as downgradeOpenAIReasoningBlocks, g as classifyFailoverReason, h as BILLING_ERROR_USER_MESSAGE, i as isMessagingToolDuplicateNormalized, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as resolveImageSanitizationLimits, m as isGoogleModelApi, n as validateGeminiTurns, o as sanitizeSessionMessagesImages, p as isAntigravityClaude, r as pickFallbackThinkingLevel, s as sanitizeImageBlocks, t as validateAnthropicTurns, u as extractToolCallsFromAssistant, v as formatBillingErrorMessage, w as isCompactionFailureError, x as isAuthAssistantError, y as formatRawAssistantErrorForUi, z as resolveBootstrapTotalMaxChars } from "./pi-embedded-helpers-DGW2untm.js";
|
|
16
|
+
import { A as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, C as unsetConfigValueAtPath, N as VERSION, S as setConfigValueAtPath, _ as resetConfigOverrides, b as getConfigValueAtPath, c as resolveConfigSnapshotHash, f as parseDurationMs, g as getConfigOverrides, h as validateJsonSchemaValue, i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot, u as validateConfigObjectWithPlugins, v as setConfigOverride, x as parseConfigPath, y as unsetConfigOverride } from "./config-BEaq2Sb6.js";
|
|
17
17
|
import { a as safeStatSync, c as applyTestPluginDefaults, d as resolveEnableState, f as resolveMemorySlotDecision, h as isDangerousHostEnvVarName, i as isPathInside, n as loadPluginManifestRegistry, r as discoverSymiPlugins, u as normalizePluginsConfig } from "./manifest-registry-D_LsBSyt.js";
|
|
18
18
|
import { a as isPathInsideWithRealpath } from "./legacy-names-Catogrri.js";
|
|
19
|
-
import { C as stripPluginOnlyAllowlist, S as resolveToolProfilePolicy, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as mergeAlsoAllowPolicy, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, x as normalizeToolName } from "./sandbox-
|
|
20
|
-
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-
|
|
21
|
-
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-
|
|
19
|
+
import { C as stripPluginOnlyAllowlist, S as resolveToolProfilePolicy, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as mergeAlsoAllowPolicy, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, x as normalizeToolName } from "./sandbox-DPn-s_K5.js";
|
|
20
|
+
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-BQoO4LXq.js";
|
|
21
|
+
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-BUbuOgNz.js";
|
|
22
22
|
import { l as parseFrontmatterBlock } from "./frontmatter-CHu3sfCM.js";
|
|
23
|
-
import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-
|
|
24
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./routes-
|
|
23
|
+
import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-DS1Vdylm.js";
|
|
24
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./routes-DiqMB1cp.js";
|
|
25
25
|
import { n as formatErrorMessage, r as formatUncaughtError, t as extractErrorCode } from "./errors-Z-WkF18Q.js";
|
|
26
|
-
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-
|
|
26
|
+
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-DaQrPPet.js";
|
|
27
27
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-CC9kEPCT.js";
|
|
28
|
-
import { _ as mediaKindFromMime, c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, h as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as normalizeMimeType$1, p as kindFromMime, s as resizeToJpeg, u as getFileExtension } from "./image-ops-
|
|
29
|
-
import { C as capArrayByJsonBytes, F as resolveSessionResetType, H as resolveMainSessionKey, I as resolveThreadFlag, J as acquireSessionWriteLock, L as DEFAULT_RESET_TRIGGERS, M as evaluateSessionFreshness, N as resolveChannelResetConfig, P as resolveSessionResetPolicy, R as resolveFreshSessionTotalTokens, S as archiveSessionTranscripts, W as deriveSessionMetaPatch, X as resolveSessionLockMaxHoldFromTimeout, _ as mergeDeliveryContext, a as resolveAndPersistSessionFile, c as recordSessionMetaFromInbound, d as updateSessionStore, f as updateSessionStoreEntry, g as deliveryContextKey, h as deliveryContextFromSession, j as resolveSessionKey, m as resolveCacheTtlMs$1, o as loadSessionStore, p as isCacheEnabled, q as resolveGroupSessionKey, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateLastRoute, v as normalizeDeliveryContext, y as normalizeSessionDeliveryFields } from "./sessions-
|
|
28
|
+
import { _ as mediaKindFromMime, c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, h as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as normalizeMimeType$1, p as kindFromMime, s as resizeToJpeg, u as getFileExtension } from "./image-ops-c7_of0HT.js";
|
|
29
|
+
import { C as capArrayByJsonBytes, F as resolveSessionResetType, H as resolveMainSessionKey, I as resolveThreadFlag, J as acquireSessionWriteLock, L as DEFAULT_RESET_TRIGGERS, M as evaluateSessionFreshness, N as resolveChannelResetConfig, P as resolveSessionResetPolicy, R as resolveFreshSessionTotalTokens, S as archiveSessionTranscripts, W as deriveSessionMetaPatch, X as resolveSessionLockMaxHoldFromTimeout, _ as mergeDeliveryContext, a as resolveAndPersistSessionFile, c as recordSessionMetaFromInbound, d as updateSessionStore, f as updateSessionStoreEntry, g as deliveryContextKey, h as deliveryContextFromSession, j as resolveSessionKey, m as resolveCacheTtlMs$1, o as loadSessionStore, p as isCacheEnabled, q as resolveGroupSessionKey, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateLastRoute, v as normalizeDeliveryContext, y as normalizeSessionDeliveryFields } from "./sessions-DorP6zY8.js";
|
|
30
30
|
import { c as normalizeStringEntries, i as resolveChannelGroupRequireMention, l as normalizeStringEntriesLower, n as listChannelDocks, o as normalizeAtHashSlug, r as resolveChannelGroupPolicy, s as normalizeHyphenSlug, t as getChannelDock } from "./dock-CnGWTXL4.js";
|
|
31
31
|
import { a as isInternalMessageChannel, c as listDeliverableMessageChannels, h as GATEWAY_CLIENT_NAMES, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES, n as isDeliverableMessageChannel, o as isMarkdownCapableMessageChannel, p as GATEWAY_CLIENT_IDS, t as INTERNAL_MESSAGE_CHANNEL, u as resolveGatewayMessageChannel } from "./message-channel-C_V8IAYx.js";
|
|
32
32
|
import { t as normalizeChatType } from "./chat-type-B7XD_ESN.js";
|
|
33
33
|
import { n as resolveConversationLabel } from "./conversation-label-CS5Zjc4w.js";
|
|
34
34
|
import { a as resolveSlackAccount, c as resolveSlackBotToken, n as listChannelPlugins, r as normalizeChannelId$1, s as resolveSlackAppToken, t as getChannelPlugin } from "./plugins-DuuHorqi.js";
|
|
35
|
-
import { _ as resolveSlackChannelId, a as markdownToIRWithMeta, c as MediaFetchError, d as createSlackWebClient, f as resolveSlackWebClientOptions, g as parseSlackTarget, h as buildSlackBlocksFallbackText, i as renderMarkdownWithMarkers, l as fetchRemoteMedia, m as validateSlackBlocksArray, o as getDefaultLocalRoots, p as parseSlackBlocksInput, s as loadWebMedia, t as sendMessageSlack, u as readResponseWithLimit } from "./send-
|
|
35
|
+
import { _ as resolveSlackChannelId, a as markdownToIRWithMeta, c as MediaFetchError, d as createSlackWebClient, f as resolveSlackWebClientOptions, g as parseSlackTarget, h as buildSlackBlocksFallbackText, i as renderMarkdownWithMarkers, l as fetchRemoteMedia, m as validateSlackBlocksArray, o as getDefaultLocalRoots, p as parseSlackBlocksInput, s as loadWebMedia, t as sendMessageSlack, u as readResponseWithLimit } from "./send-CYJucYob.js";
|
|
36
36
|
import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, t as resolveDefaultSessionStorePath } from "./paths-CJcw9nbZ.js";
|
|
37
37
|
import { i as normalizeInputProvenance, n as applyInputProvenanceToUserMessage, r as hasInterSessionUserProvenance } from "./input-provenance-DsLesw6T.js";
|
|
38
38
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-Ch7wLX-j.js";
|
|
39
39
|
import { a as normalizeElevatedLevel, c as normalizeUsageDisplay, d as supportsXHighThinking, l as normalizeVerboseLevel, n as formatXHighModelHint, o as normalizeReasoningLevel, s as normalizeThinkLevel, t as formatThinkingLevels, u as resolveResponseUsageMode } from "./thinking-177f26eg.js";
|
|
40
40
|
import { n as isSilentReplyText, t as SILENT_REPLY_TOKEN } from "./tokens-BKbemuIk.js";
|
|
41
|
-
import { c as normalizeChannelTargetInput, d as parseReplyDirectives, f as MEDIA_TOKEN_RE, g as initializeGlobalHookRunner, h as getGlobalHookRunner, l as normalizeTargetForProvider, m as parseInlineDirectives$1, o as normalizeReplyPayloadsForDelivery, p as splitMediaFromOutput, s as buildTargetResolverSignature, t as deliverOutboundPayloads, u as throwIfAborted } from "./deliver-
|
|
41
|
+
import { c as normalizeChannelTargetInput, d as parseReplyDirectives, f as MEDIA_TOKEN_RE, g as initializeGlobalHookRunner, h as getGlobalHookRunner, l as normalizeTargetForProvider, m as parseInlineDirectives$1, o as normalizeReplyPayloadsForDelivery, p as splitMediaFromOutput, s as buildTargetResolverSignature, t as deliverOutboundPayloads, u as throwIfAborted } from "./deliver-ccf_boim.js";
|
|
42
42
|
import { a as logMessageProcessed, i as logLaneEnqueue, o as logMessageQueued, r as logLaneDequeue, s as logSessionStateChange, t as diag } from "./diagnostic-CwF3MnBL.js";
|
|
43
43
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-I4x9gPY4.js";
|
|
44
|
-
import { t as ensureSymiModelsJson } from "./models-config-
|
|
45
|
-
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-
|
|
44
|
+
import { t as ensureSymiModelsJson } from "./models-config-Dh1tABIl.js";
|
|
45
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-CVwNh4rb.js";
|
|
46
46
|
import { c as hasNonzeroUsage, l as normalizeUsage, n as loadCostUsageSummary, o as derivePromptTokens, r as loadSessionCostSummary } from "./session-cost-usage-DYcv40ss.js";
|
|
47
|
-
import { C as enqueueSystemEvent, E as buildChannelSummary, S as drainSystemEventEntries, _ as loadProviderUsageSummary, a as loadCombinedSessionStoreForGateway, b as resolveUsageProviderId, d as formatDoctorNonInteractiveHint, g as writeRestartSentinel, k as redactIdentifier, x as lookupContextTokens, y as formatUsageWindowSummary } from "./session-utils-
|
|
48
|
-
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$2 } from "./with-timeout-
|
|
49
|
-
import { i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
50
|
-
import { n as resolveMemoryBackendConfig, t as getMemorySearchManager } from "./memory-
|
|
51
|
-
import { a as parseGeminiAuth, c as resolveMemorySearchConfig, n as retryAsync, o as collectProviderApiKeysForExecution, s as executeWithApiKeyRotation } from "./manager-
|
|
52
|
-
import { f as runTasksWithConcurrency } from "./internal-
|
|
47
|
+
import { C as enqueueSystemEvent, E as buildChannelSummary, S as drainSystemEventEntries, _ as loadProviderUsageSummary, a as loadCombinedSessionStoreForGateway, b as resolveUsageProviderId, d as formatDoctorNonInteractiveHint, g as writeRestartSentinel, k as redactIdentifier, x as lookupContextTokens, y as formatUsageWindowSummary } from "./session-utils-CqSXwGYa.js";
|
|
48
|
+
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$2 } from "./with-timeout-CAUWEPmp.js";
|
|
49
|
+
import { i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DZQBodKF.js";
|
|
50
|
+
import { n as resolveMemoryBackendConfig, t as getMemorySearchManager } from "./memory-BZPO-RoX.js";
|
|
51
|
+
import { a as parseGeminiAuth, c as resolveMemorySearchConfig, n as retryAsync, o as collectProviderApiKeysForExecution, s as executeWithApiKeyRotation } from "./manager-C_5p8DxF.js";
|
|
52
|
+
import { f as runTasksWithConcurrency } from "./internal-C3o_xyzP.js";
|
|
53
53
|
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-DQGU0F8t.js";
|
|
54
54
|
import { n as resolveMarkdownTableMode } from "./markdown-tables-GTLvbzuR.js";
|
|
55
55
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CgmRK282.js";
|
|
56
56
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-DG6T0ZdL.js";
|
|
57
|
-
import { n as getDefaultMediaLocalRoots } from "./local-roots-
|
|
57
|
+
import { n as getDefaultMediaLocalRoots } from "./local-roots-CUKhHNCV.js";
|
|
58
58
|
import { i as resolveNativeSkillsEnabled, n as isRestartEnabled, r as resolveNativeCommandsEnabled, t as isCommandFlagEnabled } from "./commands-B3UrgxIz.js";
|
|
59
|
-
import { a as shouldHandleTextCommands, i as normalizeCommandBody, n as listChatCommands, r as listChatCommandsForConfig } from "./commands-registry-
|
|
60
|
-
import { Rt as SESSION_LABEL_MAX_LENGTH } from "./client-
|
|
61
|
-
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege } from "./call-
|
|
59
|
+
import { a as shouldHandleTextCommands, i as normalizeCommandBody, n as listChatCommands, r as listChatCommandsForConfig } from "./commands-registry-CLePPNDW.js";
|
|
60
|
+
import { Rt as SESSION_LABEL_MAX_LENGTH } from "./client-Bs2zB0rY.js";
|
|
61
|
+
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege } from "./call-BjHvYJx2.js";
|
|
62
62
|
import { n as resolveToolDisplay, t as formatToolDetail } from "./tool-display-Dr6VaTg5.js";
|
|
63
63
|
import { n as formatTimeAgo } from "./format-relative-Vm-Tqk0h.js";
|
|
64
64
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DqAyGDbE.js";
|
|
65
|
-
import { g as getSkillsSnapshotVersion, h as ensureSkillsWatcher, t as getRemoteSkillEligibility } from "./skills-remote-
|
|
65
|
+
import { g as getSkillsSnapshotVersion, h as ensureSkillsWatcher, t as getRemoteSkillEligibility } from "./skills-remote-BDSyRdyX.js";
|
|
66
66
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DdkUSfiI.js";
|
|
67
|
-
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-
|
|
68
|
-
import { i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames } from "./skill-commands-
|
|
69
|
-
import { a as removeChannelAllowFromStoreEntry, c as listPairingChannels, i as readChannelAllowFromStore, o as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-
|
|
67
|
+
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-BrW9BL1p.js";
|
|
68
|
+
import { i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames } from "./skill-commands-RbglvrSW.js";
|
|
69
|
+
import { a as removeChannelAllowFromStoreEntry, c as listPairingChannels, i as readChannelAllowFromStore, o as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-S9CXOhSG.js";
|
|
70
70
|
import { _ as getTrustedSafeBinDirs, b as buildSafeShellCommand, d as resolveExecApprovals, f as resolveExecApprovalsFromFile, g as resolveSafeBins, h as evaluateShellAllowlist, i as maxAsk, l as recordAllowlistUse, n as addAllowlistEntry, o as minSecurity, u as requiresExecApproval, y as buildSafeBinsShellCommand } from "./exec-approvals-CZOc8M5w.js";
|
|
71
|
-
import { a as canvasSnapshotTempPath, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeUrlToFile, g as normalizePathPrepend, h as mergePathPrepend, i as parseEnvPairs, l as parseCameraSnapPayload, m as applyPathPrepend, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as buildNodeShellCommand, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile } from "./nodes-screen-
|
|
71
|
+
import { a as canvasSnapshotTempPath, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeUrlToFile, g as normalizePathPrepend, h as mergePathPrepend, i as parseEnvPairs, l as parseCameraSnapPayload, m as applyPathPrepend, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as buildNodeShellCommand, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile } from "./nodes-screen-CT94yu_w.js";
|
|
72
72
|
import { n as parseNodeList, r as parsePairingList, t as resolveNodeIdFromCandidates } from "./node-match-dNgkVIEe.js";
|
|
73
73
|
import { t as formatDurationCompact$1 } from "./format-duration-DbZRICyO.js";
|
|
74
74
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-2_Os41y-.js";
|
|
75
75
|
import { i as resolveModelCostConfig, n as formatTokenCount$2, r as formatUsd, t as estimateUsageCost } from "./usage-format-Ca9K30TH.js";
|
|
76
76
|
import { c as resolveGatewayLaunchAgentLabel, d as resolveGatewaySystemdServiceName } from "./constants-DsZw7bas.js";
|
|
77
|
-
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-
|
|
77
|
+
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-DhlgNQGb.js";
|
|
78
78
|
import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-BhvnarfO.js";
|
|
79
79
|
import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-BvIcXQLj.js";
|
|
80
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
80
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BbUl3Hi7.js";
|
|
81
81
|
import { t as parseTimeoutMs } from "./parse-timeout-CpgyC-LD.js";
|
|
82
|
-
import { n as registerMemoryCli } from "./memory-cli-
|
|
83
|
-
import { i as resolveSlackThreadTs, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
84
|
-
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-
|
|
85
|
-
import { a as buildModelAliasLines, n as resolveModel$2 } from "./model-
|
|
82
|
+
import { n as registerMemoryCli } from "./memory-cli-4vj-LpgO.js";
|
|
83
|
+
import { i as resolveSlackThreadTs, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-CbipVshj.js";
|
|
84
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-BcTgKDG6.js";
|
|
85
|
+
import { a as buildModelAliasLines, n as resolveModel$2 } from "./model-CbRy_3xW.js";
|
|
86
86
|
import { createRequire } from "node:module";
|
|
87
87
|
import process$1 from "node:process";
|
|
88
88
|
import { fileURLToPath } from "node:url";
|
|
@@ -91,7 +91,7 @@ import path from "node:path";
|
|
|
91
91
|
import fs, { constants, existsSync, statSync } from "node:fs";
|
|
92
92
|
import os, { homedir } from "node:os";
|
|
93
93
|
import JSON5 from "json5";
|
|
94
|
-
import
|
|
94
|
+
import fsPromises from "node:fs/promises";
|
|
95
95
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
96
96
|
import { complete, createAssistantMessageEventStream, streamSimple } from "@mariozechner/pi-ai";
|
|
97
97
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
@@ -1841,7 +1841,7 @@ async function imageResult(params) {
|
|
|
1841
1841
|
}, params.label, params.imageSanitization);
|
|
1842
1842
|
}
|
|
1843
1843
|
async function imageResultFromFile(params) {
|
|
1844
|
-
const buf = await
|
|
1844
|
+
const buf = await fsPromises.readFile(params.path);
|
|
1845
1845
|
const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
|
|
1846
1846
|
return await imageResult({
|
|
1847
1847
|
label: params.label,
|
|
@@ -5801,7 +5801,7 @@ async function routeReply(params) {
|
|
|
5801
5801
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
5802
5802
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
5803
5803
|
try {
|
|
5804
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
5804
|
+
const { deliverOutboundPayloads } = await import("./deliver-ccf_boim.js").then((n) => n.n);
|
|
5805
5805
|
return {
|
|
5806
5806
|
ok: true,
|
|
5807
5807
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -11645,7 +11645,7 @@ var MediaAttachmentCache = class {
|
|
|
11645
11645
|
const size = await this.ensureLocalStat(entry);
|
|
11646
11646
|
if (entry.resolvedPath) {
|
|
11647
11647
|
if (size !== void 0 && size > params.maxBytes) throw new MediaUnderstandingSkipError("maxBytes", `Attachment ${params.attachmentIndex + 1} exceeds maxBytes ${params.maxBytes}`);
|
|
11648
|
-
const buffer = await
|
|
11648
|
+
const buffer = await fsPromises.readFile(entry.resolvedPath);
|
|
11649
11649
|
entry.buffer = buffer;
|
|
11650
11650
|
entry.bufferMime = entry.bufferMime ?? entry.attachment.mime ?? await detectMime({
|
|
11651
11651
|
buffer,
|
|
@@ -11715,10 +11715,10 @@ var MediaAttachmentCache = class {
|
|
|
11715
11715
|
prefix: "symi-media",
|
|
11716
11716
|
extension: path.extname(bufferResult.fileName || "") || ""
|
|
11717
11717
|
});
|
|
11718
|
-
await
|
|
11718
|
+
await fsPromises.writeFile(tmpPath, bufferResult.buffer);
|
|
11719
11719
|
entry.tempPath = tmpPath;
|
|
11720
11720
|
entry.tempCleanup = async () => {
|
|
11721
|
-
await
|
|
11721
|
+
await fsPromises.unlink(tmpPath).catch(() => {});
|
|
11722
11722
|
};
|
|
11723
11723
|
return {
|
|
11724
11724
|
path: tmpPath,
|
|
@@ -11765,12 +11765,12 @@ var MediaAttachmentCache = class {
|
|
|
11765
11765
|
if (entry.statSize !== void 0) return entry.statSize;
|
|
11766
11766
|
try {
|
|
11767
11767
|
const currentPath = entry.resolvedPath;
|
|
11768
|
-
const stat = await
|
|
11768
|
+
const stat = await fsPromises.stat(currentPath);
|
|
11769
11769
|
if (!stat.isFile()) {
|
|
11770
11770
|
entry.resolvedPath = void 0;
|
|
11771
11771
|
return;
|
|
11772
11772
|
}
|
|
11773
|
-
const canonicalPath = await
|
|
11773
|
+
const canonicalPath = await fsPromises.realpath(currentPath).catch(() => currentPath);
|
|
11774
11774
|
if (!isInboundPathAllowed({
|
|
11775
11775
|
filePath: canonicalPath,
|
|
11776
11776
|
roots: await this.getCanonicalLocalPathRoots()
|
|
@@ -11792,7 +11792,7 @@ var MediaAttachmentCache = class {
|
|
|
11792
11792
|
if (this.canonicalLocalPathRoots) return await this.canonicalLocalPathRoots;
|
|
11793
11793
|
this.canonicalLocalPathRoots = (async () => mergeInboundPathRoots(this.localPathRoots, await Promise.all(this.localPathRoots.map(async (root) => {
|
|
11794
11794
|
if (root.includes("*")) return root;
|
|
11795
|
-
return await
|
|
11795
|
+
return await fsPromises.realpath(root).catch(() => root);
|
|
11796
11796
|
}))))();
|
|
11797
11797
|
return await this.canonicalLocalPathRoots;
|
|
11798
11798
|
}
|
|
@@ -11863,7 +11863,7 @@ function formatAudioTranscripts(outputs) {
|
|
|
11863
11863
|
async function fileExists(filePath) {
|
|
11864
11864
|
if (!filePath) return false;
|
|
11865
11865
|
try {
|
|
11866
|
-
await
|
|
11866
|
+
await fsPromises.stat(filePath);
|
|
11867
11867
|
return true;
|
|
11868
11868
|
} catch {
|
|
11869
11869
|
return false;
|
|
@@ -11963,7 +11963,7 @@ async function resolveCliOutput(params) {
|
|
|
11963
11963
|
const commandId = commandBase(params.command);
|
|
11964
11964
|
const fileOutput = commandId === "whisper-cli" ? resolveWhisperCppOutputPath(params.args) : commandId === "whisper" ? resolveWhisperOutputPath(params.args, params.mediaPath) : null;
|
|
11965
11965
|
if (fileOutput && await fileExists(fileOutput)) try {
|
|
11966
|
-
const content = await
|
|
11966
|
+
const content = await fsPromises.readFile(fileOutput, "utf8");
|
|
11967
11967
|
if (content.trim()) return content.trim();
|
|
11968
11968
|
} catch {}
|
|
11969
11969
|
if (commandId === "gemini") {
|
|
@@ -12254,7 +12254,7 @@ async function runCliEntry(params) {
|
|
|
12254
12254
|
maxBytes,
|
|
12255
12255
|
timeoutMs
|
|
12256
12256
|
});
|
|
12257
|
-
const outputDir = await
|
|
12257
|
+
const outputDir = await fsPromises.mkdtemp(path.join(os.tmpdir(), "symi-media-cli-"));
|
|
12258
12258
|
const mediaPath = pathResult.path;
|
|
12259
12259
|
const outputBase = path.join(outputDir, path.parse(mediaPath).name);
|
|
12260
12260
|
const templCtx = {
|
|
@@ -12288,7 +12288,7 @@ async function runCliEntry(params) {
|
|
|
12288
12288
|
model: command
|
|
12289
12289
|
};
|
|
12290
12290
|
} finally {
|
|
12291
|
-
await
|
|
12291
|
+
await fsPromises.rm(outputDir, {
|
|
12292
12292
|
recursive: true,
|
|
12293
12293
|
force: true
|
|
12294
12294
|
}).catch(() => {});
|
|
@@ -12332,9 +12332,9 @@ function candidateBinaryNames(name) {
|
|
|
12332
12332
|
}
|
|
12333
12333
|
async function isExecutable$1(filePath) {
|
|
12334
12334
|
try {
|
|
12335
|
-
if (!(await
|
|
12335
|
+
if (!(await fsPromises.stat(filePath)).isFile()) return false;
|
|
12336
12336
|
if (process.platform === "win32") return true;
|
|
12337
|
-
await
|
|
12337
|
+
await fsPromises.access(filePath, constants.X_OK);
|
|
12338
12338
|
return true;
|
|
12339
12339
|
} catch {
|
|
12340
12340
|
return false;
|
|
@@ -14038,7 +14038,7 @@ async function createModelSelectionState(params) {
|
|
|
14038
14038
|
}
|
|
14039
14039
|
}
|
|
14040
14040
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
14041
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
14041
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-BDvJK1Bg.js").then((n) => n.t);
|
|
14042
14042
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
14043
14043
|
const providerKey = normalizeProviderId(provider);
|
|
14044
14044
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17182,7 +17182,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
17182
17182
|
cwd: process.cwd(),
|
|
17183
17183
|
root: params.sandbox.workspaceDir
|
|
17184
17184
|
});
|
|
17185
|
-
if (!(await
|
|
17185
|
+
if (!(await fsPromises.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
17186
17186
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
17187
17187
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
17188
17188
|
return {
|
|
@@ -18196,13 +18196,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
18196
18196
|
cwd: params.workdir,
|
|
18197
18197
|
root: params.workdir
|
|
18198
18198
|
});
|
|
18199
|
-
stat = await
|
|
18199
|
+
stat = await fsPromises.stat(absPath);
|
|
18200
18200
|
} catch {
|
|
18201
18201
|
return;
|
|
18202
18202
|
}
|
|
18203
18203
|
if (!stat.isFile()) return;
|
|
18204
18204
|
if (stat.size > 512 * 1024) return;
|
|
18205
|
-
const content = await
|
|
18205
|
+
const content = await fsPromises.readFile(absPath, "utf-8");
|
|
18206
18206
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
18207
18207
|
if (first) {
|
|
18208
18208
|
const idx = first.index;
|
|
@@ -22878,7 +22878,7 @@ async function handleCommands(params) {
|
|
|
22878
22878
|
try {
|
|
22879
22879
|
const messages = [];
|
|
22880
22880
|
if (sessionFile) {
|
|
22881
|
-
const content = await
|
|
22881
|
+
const content = await fsPromises.readFile(sessionFile, "utf-8");
|
|
22882
22882
|
for (const line of content.split("\n")) {
|
|
22883
22883
|
if (!line.trim()) continue;
|
|
22884
22884
|
try {
|
|
@@ -25065,7 +25065,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25065
25065
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
25066
25066
|
throw new Error("jsonlPath outside allowed roots");
|
|
25067
25067
|
}
|
|
25068
|
-
const canonical = await
|
|
25068
|
+
const canonical = await fsPromises.realpath(resolved).catch(() => resolved);
|
|
25069
25069
|
if (!isInboundPathAllowed({
|
|
25070
25070
|
filePath: canonical,
|
|
25071
25071
|
roots
|
|
@@ -25073,7 +25073,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25073
25073
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
25074
25074
|
throw new Error("jsonlPath outside allowed roots");
|
|
25075
25075
|
}
|
|
25076
|
-
return await
|
|
25076
|
+
return await fsPromises.readFile(canonical, "utf8");
|
|
25077
25077
|
}
|
|
25078
25078
|
const CanvasToolSchema = Type.Object({
|
|
25079
25079
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -26616,7 +26616,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
26616
26616
|
accountId: params.accountId
|
|
26617
26617
|
}),
|
|
26618
26618
|
sandboxValidated: true,
|
|
26619
|
-
readFile: (filePath) =>
|
|
26619
|
+
readFile: (filePath) => fsPromises.readFile(filePath)
|
|
26620
26620
|
});
|
|
26621
26621
|
params.args.buffer = media.buffer.toString("base64");
|
|
26622
26622
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -33110,7 +33110,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
33110
33110
|
return;
|
|
33111
33111
|
}
|
|
33112
33112
|
try {
|
|
33113
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
33113
|
+
const { deliverOutboundPayloads } = await import("./deliver-ccf_boim.js").then((n) => n.n);
|
|
33114
33114
|
await deliverOutboundPayloads({
|
|
33115
33115
|
cfg: params.cfg,
|
|
33116
33116
|
channel,
|
|
@@ -33515,7 +33515,7 @@ async function stageSandboxMedia(params) {
|
|
|
33515
33515
|
};
|
|
33516
33516
|
try {
|
|
33517
33517
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
33518
|
-
await
|
|
33518
|
+
await fsPromises.mkdir(destDir, { recursive: true });
|
|
33519
33519
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
33520
33520
|
cfg,
|
|
33521
33521
|
accountId: ctx.AccountId
|
|
@@ -33565,7 +33565,7 @@ async function stageSandboxMedia(params) {
|
|
|
33565
33565
|
usedNames.add(fileName);
|
|
33566
33566
|
const dest = path.join(destDir, fileName);
|
|
33567
33567
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
33568
|
-
else await
|
|
33568
|
+
else await fsPromises.copyFile(source, dest);
|
|
33569
33569
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
33570
33570
|
staged.set(source, stagedPath);
|
|
33571
33571
|
}
|
|
@@ -38876,7 +38876,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
38876
38876
|
}
|
|
38877
38877
|
let commandsRegistry;
|
|
38878
38878
|
async function getCommandsRegistry() {
|
|
38879
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
38879
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CLePPNDW.js").then((n) => n.t);
|
|
38880
38880
|
return commandsRegistry;
|
|
38881
38881
|
}
|
|
38882
38882
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -39218,11 +39218,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39218
39218
|
const channelName = channelInfo?.name;
|
|
39219
39219
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
39220
39220
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
39221
|
-
import("./resolve-route-
|
|
39221
|
+
import("./resolve-route-BbUl3Hi7.js").then((n) => n.r),
|
|
39222
39222
|
import("./inbound-context-DqAyGDbE.js").then((n) => n.n),
|
|
39223
39223
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
39224
39224
|
]);
|
|
39225
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CS5Zjc4w.js").then((n) => n.t), import("./reply-prefix-
|
|
39225
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CS5Zjc4w.js").then((n) => n.t), import("./reply-prefix-DZQBodKF.js").then((n) => n.n)]);
|
|
39226
39226
|
const route = resolveAgentRoute({
|
|
39227
39227
|
cfg,
|
|
39228
39228
|
channel: "slack",
|
|
@@ -39279,7 +39279,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39279
39279
|
});
|
|
39280
39280
|
const deliverSlashPayloads = async (replies) => {
|
|
39281
39281
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
39282
|
-
import("./replies-
|
|
39282
|
+
import("./replies-CbipVshj.js").then((n) => n.r),
|
|
39283
39283
|
import("./chunk-DQGU0F8t.js").then((n) => n.s),
|
|
39284
39284
|
import("./markdown-tables-GTLvbzuR.js").then((n) => n.t)
|
|
39285
39285
|
]);
|
|
@@ -39334,7 +39334,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39334
39334
|
let nativeCommands = [];
|
|
39335
39335
|
if (nativeEnabled) {
|
|
39336
39336
|
reg = await getCommandsRegistry();
|
|
39337
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
39337
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-RbglvrSW.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
39338
39338
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
39339
39339
|
skillCommands,
|
|
39340
39340
|
provider: "slack"
|
|
@@ -40467,7 +40467,7 @@ function resolvePluginTools(params) {
|
|
|
40467
40467
|
//#endregion
|
|
40468
40468
|
//#region src/agents/apply-patch-update.ts
|
|
40469
40469
|
async function defaultReadFile(filePath) {
|
|
40470
|
-
return
|
|
40470
|
+
return fsPromises.readFile(filePath, "utf8");
|
|
40471
40471
|
}
|
|
40472
40472
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
40473
40473
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -40711,10 +40711,10 @@ function resolvePatchFileOps(options) {
|
|
|
40711
40711
|
};
|
|
40712
40712
|
}
|
|
40713
40713
|
return {
|
|
40714
|
-
readFile: (filePath) =>
|
|
40715
|
-
writeFile: (filePath, content) =>
|
|
40716
|
-
remove: (filePath) =>
|
|
40717
|
-
mkdirp: (dir) =>
|
|
40714
|
+
readFile: (filePath) => fsPromises.readFile(filePath, "utf8"),
|
|
40715
|
+
writeFile: (filePath, content) => fsPromises.writeFile(filePath, content, "utf8"),
|
|
40716
|
+
remove: (filePath) => fsPromises.rm(filePath),
|
|
40717
|
+
mkdirp: (dir) => fsPromises.mkdir(dir, { recursive: true }).then(() => {})
|
|
40718
40718
|
};
|
|
40719
40719
|
}
|
|
40720
40720
|
async function ensureDir(filePath, ops) {
|
|
@@ -41881,7 +41881,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
41881
41881
|
};
|
|
41882
41882
|
let content;
|
|
41883
41883
|
try {
|
|
41884
|
-
content = await
|
|
41884
|
+
content = await fsPromises.readFile(sessionFile, "utf-8");
|
|
41885
41885
|
} catch (err) {
|
|
41886
41886
|
if (err?.code === "ENOENT") return {
|
|
41887
41887
|
repaired: false,
|
|
@@ -41929,15 +41929,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
41929
41929
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
41930
41930
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
41931
41931
|
try {
|
|
41932
|
-
const stat = await
|
|
41933
|
-
await
|
|
41934
|
-
if (stat) await
|
|
41935
|
-
await
|
|
41936
|
-
if (stat) await
|
|
41937
|
-
await
|
|
41932
|
+
const stat = await fsPromises.stat(sessionFile).catch(() => null);
|
|
41933
|
+
await fsPromises.writeFile(backupPath, content, "utf-8");
|
|
41934
|
+
if (stat) await fsPromises.chmod(backupPath, stat.mode);
|
|
41935
|
+
await fsPromises.writeFile(tmpPath, cleaned, "utf-8");
|
|
41936
|
+
if (stat) await fsPromises.chmod(tmpPath, stat.mode);
|
|
41937
|
+
await fsPromises.rename(tmpPath, sessionFile);
|
|
41938
41938
|
} catch (err) {
|
|
41939
41939
|
try {
|
|
41940
|
-
await
|
|
41940
|
+
await fsPromises.unlink(tmpPath);
|
|
41941
41941
|
} catch (cleanupErr) {
|
|
41942
41942
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
41943
41943
|
}
|
|
@@ -43210,7 +43210,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
43210
43210
|
if (!isSessionManagerCacheEnabled()) return;
|
|
43211
43211
|
if (isSessionManagerCached(sessionFile)) return;
|
|
43212
43212
|
try {
|
|
43213
|
-
const handle = await
|
|
43213
|
+
const handle = await fsPromises.open(sessionFile, "r");
|
|
43214
43214
|
try {
|
|
43215
43215
|
const buffer = Buffer$1.alloc(4096);
|
|
43216
43216
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -43350,7 +43350,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43350
43350
|
} catch (err) {
|
|
43351
43351
|
return fail(describeUnknownError(err));
|
|
43352
43352
|
}
|
|
43353
|
-
await
|
|
43353
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
43354
43354
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
43355
43355
|
const sandbox = await resolveSandboxContext({
|
|
43356
43356
|
config: params.config,
|
|
@@ -43358,7 +43358,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43358
43358
|
workspaceDir: resolvedWorkspace
|
|
43359
43359
|
});
|
|
43360
43360
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
43361
|
-
await
|
|
43361
|
+
await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
|
|
43362
43362
|
await ensureSessionHeader({
|
|
43363
43363
|
sessionFile: params.sessionFile,
|
|
43364
43364
|
sessionId: params.sessionId,
|
|
@@ -43683,12 +43683,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
43683
43683
|
const existing = writers.get(filePath);
|
|
43684
43684
|
if (existing) return existing;
|
|
43685
43685
|
const dir = path.dirname(filePath);
|
|
43686
|
-
const ready =
|
|
43686
|
+
const ready = fsPromises.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
43687
43687
|
let queue = Promise.resolve();
|
|
43688
43688
|
const writer = {
|
|
43689
43689
|
filePath,
|
|
43690
43690
|
write: (line) => {
|
|
43691
|
-
queue = queue.then(() => ready).then(() =>
|
|
43691
|
+
queue = queue.then(() => ready).then(() => fsPromises.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
43692
43692
|
}
|
|
43693
43693
|
};
|
|
43694
43694
|
writers.set(filePath, writer);
|
|
@@ -46868,7 +46868,7 @@ Use the message tool with buttons:
|
|
|
46868
46868
|
*/
|
|
46869
46869
|
async function readSessionFile(sessionFile) {
|
|
46870
46870
|
try {
|
|
46871
|
-
return await
|
|
46871
|
+
return await fsPromises.readFile(sessionFile, "utf-8");
|
|
46872
46872
|
} catch {
|
|
46873
46873
|
return null;
|
|
46874
46874
|
}
|
|
@@ -46877,8 +46877,8 @@ async function writeAtomically(sessionFile, text) {
|
|
|
46877
46877
|
const dir = path.dirname(sessionFile);
|
|
46878
46878
|
const base = path.basename(sessionFile);
|
|
46879
46879
|
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
46880
|
-
await
|
|
46881
|
-
await
|
|
46880
|
+
await fsPromises.writeFile(tmp, text, "utf-8");
|
|
46881
|
+
await fsPromises.rename(tmp, sessionFile);
|
|
46882
46882
|
}
|
|
46883
46883
|
/**
|
|
46884
46884
|
* Remove empty assistant JSONL entries from the session file.
|
|
@@ -46980,7 +46980,7 @@ function isInPoisonRange(version) {
|
|
|
46980
46980
|
*/
|
|
46981
46981
|
async function checkSessionPoison(sessionFile) {
|
|
46982
46982
|
try {
|
|
46983
|
-
const firstLine = (await
|
|
46983
|
+
const firstLine = (await fsPromises.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
46984
46984
|
if (!firstLine) return null;
|
|
46985
46985
|
const header = JSON.parse(firstLine);
|
|
46986
46986
|
if (header.type !== "session") return null;
|
|
@@ -46998,7 +46998,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
46998
46998
|
*/
|
|
46999
46999
|
async function archivePoisonedSession(sessionFile) {
|
|
47000
47000
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
47001
|
-
await
|
|
47001
|
+
await fsPromises.rename(sessionFile, archiveName);
|
|
47002
47002
|
return archiveName;
|
|
47003
47003
|
}
|
|
47004
47004
|
/**
|
|
@@ -47007,14 +47007,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
47007
47007
|
*/
|
|
47008
47008
|
async function stampSessionVersion(sessionFile) {
|
|
47009
47009
|
try {
|
|
47010
|
-
const lines = (await
|
|
47010
|
+
const lines = (await fsPromises.readFile(sessionFile, "utf-8")).split("\n");
|
|
47011
47011
|
if (lines.length === 0) return;
|
|
47012
47012
|
const header = JSON.parse(lines[0]);
|
|
47013
47013
|
if (header.type !== "session") return;
|
|
47014
47014
|
if (header.symiVersion === VERSION) return;
|
|
47015
47015
|
header.symiVersion = VERSION;
|
|
47016
47016
|
lines[0] = JSON.stringify(header);
|
|
47017
|
-
await
|
|
47017
|
+
await fsPromises.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
47018
47018
|
} catch {}
|
|
47019
47019
|
}
|
|
47020
47020
|
/**
|
|
@@ -47243,7 +47243,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
47243
47243
|
return;
|
|
47244
47244
|
}
|
|
47245
47245
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
47246
|
-
await
|
|
47246
|
+
await fsPromises.writeFile(params.sessionFile, "", "utf-8");
|
|
47247
47247
|
sm.fileEntries = [header];
|
|
47248
47248
|
sm.byId?.clear?.();
|
|
47249
47249
|
sm.labelsById?.clear?.();
|
|
@@ -47801,7 +47801,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
47801
47801
|
const prevCwd = process.cwd();
|
|
47802
47802
|
const runAbortController = new AbortController();
|
|
47803
47803
|
log$7.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
47804
|
-
await
|
|
47804
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
47805
47805
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
47806
47806
|
const sandbox = await resolveSandboxContext({
|
|
47807
47807
|
config: params.config,
|
|
@@ -47809,7 +47809,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
47809
47809
|
workspaceDir: resolvedWorkspace
|
|
47810
47810
|
});
|
|
47811
47811
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
47812
|
-
await
|
|
47812
|
+
await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
|
|
47813
47813
|
let restoreSkillEnv;
|
|
47814
47814
|
process.chdir(effectiveWorkspace);
|
|
47815
47815
|
try {
|
|
@@ -48018,7 +48018,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48018
48018
|
sessionFile: params.sessionFile,
|
|
48019
48019
|
warn: (message) => log$7.warn(message)
|
|
48020
48020
|
});
|
|
48021
|
-
const hadSessionFile = await
|
|
48021
|
+
const hadSessionFile = await fsPromises.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
48022
48022
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
48023
48023
|
modelApi: params.model?.api,
|
|
48024
48024
|
provider: params.provider,
|
|
@@ -49110,7 +49110,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
49110
49110
|
}
|
|
49111
49111
|
runLoopIterations += 1;
|
|
49112
49112
|
attemptedThinking.add(thinkLevel);
|
|
49113
|
-
await
|
|
49113
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
49114
49114
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
49115
49115
|
const attempt = await runEmbeddedAttempt({
|
|
49116
49116
|
sessionId: params.sessionId,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { h as resolveUserPath } from "./utils-BU8jVQFM.js";
|
|
2
2
|
import { o as loadPluginManifest, r as discoverSymiPlugins } from "./manifest-registry-D_LsBSyt.js";
|
|
3
|
-
import { i as resolvePluginInstallDir, n as installPluginFromNpmSpec, t as recordPluginInstall } from "./installs-
|
|
4
|
-
import
|
|
3
|
+
import { i as resolvePluginInstallDir, n as installPluginFromNpmSpec, t as recordPluginInstall } from "./installs-BzgwvqqQ.js";
|
|
4
|
+
import fsPromises from "node:fs/promises";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/update.ts
|
|
7
7
|
async function readInstalledPackageVersion(dir) {
|
|
8
8
|
try {
|
|
9
|
-
const raw = await
|
|
9
|
+
const raw = await fsPromises.readFile(`${dir}/package.json`, "utf-8");
|
|
10
10
|
const parsed = JSON.parse(raw);
|
|
11
11
|
return typeof parsed.version === "string" ? parsed.version : void 0;
|
|
12
12
|
} catch {
|