@symerian/symi 3.5.21 → 3.5.23
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-NT0EKnK_.js → agent-CBfp75J4.js} +18 -18
- package/dist/{agent-scope-Bnsyyeci.js → agent-scope-DOrZjOnW.js} +18 -18
- package/dist/{agents.config-DA0ISLi7.js → agents.config-B7sNDvhz.js} +1 -1
- package/dist/{audit-CXIXYDRx.js → audit-Ce-u6aaR.js} +20 -20
- package/dist/{auth-choice-BtXIQPTU.js → auth-choice-CUvx59kv.js} +11 -11
- package/dist/{auth-profiles-D5nYBj_Z.js → auth-profiles-Ce7R_25e.js} +2 -2
- package/dist/{auth-token-fgnCQEHT.js → auth-token-Cr28IDKY.js} +3 -3
- package/dist/{browser-cli-DOTM7UBC.js → browser-cli-Ibgld3mA.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-Bpjj5p7I.js → call-xdEE97oU.js} +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-XRJiHUm5.js → channel-options-DCmWOAc0.js} +1 -1
- package/dist/{channels-cli-CQ4M05oy.js → channels-cli-Cs1Z0dn8.js} +57 -57
- package/dist/{chrome-OTJg3QKn.js → chrome-CmQwGAuL.js} +7 -7
- package/dist/{chrome-38OnGyuN.js → chrome-DJChpTwP.js} +2 -2
- package/dist/{cli-B-uoiYP2.js → cli-CadU09SC.js} +45 -45
- package/dist/{client-CTrfpKT3.js → client-Cs9Bh-G0.js} +1 -1
- package/dist/{commands-registry-CwXsDVuO.js → commands-registry-Ca5hh7nh.js} +1 -1
- package/dist/{completion-cli-Cn_81QBb.js → completion-cli-Dd56ibFZ.js} +12 -12
- package/dist/{config-BngIfn5l.js → config-B4jkreCN.js} +2 -2
- package/dist/{config-cli-B1cPkJ4p.js → config-cli-GwUJEapt.js} +4 -4
- package/dist/{config-guard-DStz4_V2.js → config-guard-BRm3RiOi.js} +6 -6
- package/dist/{config-validation-Dxj9LRzr.js → config-validation-Cdyg1BZB.js} +1 -1
- package/dist/{configure-C7zmSgvC.js → configure-5md67tCP.js} +14 -14
- package/dist/{consolidate-CO32_TEx.js → consolidate-DymnvvYm.js} +6 -6
- package/dist/{control-service-CUreKVeY.js → control-service-D8kKOts5.js} +4 -4
- package/dist/control-ui/css/style.css +38 -3
- package/dist/control-ui/index.html +2 -2
- package/dist/control-ui/js/symframe-awaiting.js +15 -10
- package/dist/control-ui/js/symframe-substrate.js +11 -7
- package/dist/control-ui/js/symframe.js +12 -28
- package/dist/{control-ui-assets-B8B9z_Ll.js → control-ui-assets-CJQ97d4u.js} +1 -1
- package/dist/{cost-cli-D-ssjcRF.js → cost-cli-DWiVCOCx.js} +3 -3
- package/dist/{cron-cli-otPeKxmi.js → cron-cli-CE9bV9Et.js} +7 -7
- package/dist/{daemon-cli-qDdMg615.js → daemon-cli-BYiG4GOU.js} +11 -11
- package/dist/{daemon-runtime-CKn0wmCk.js → daemon-runtime-DlQla_dA.js} +10 -10
- package/dist/{deliver-BiWlR84Y.js → deliver-B04yNX82.js} +4 -4
- package/dist/{deliver-CWMFmMCv.js → deliver-lTZLIQqf.js} +2 -2
- package/dist/{deps-CdibsPMx.js → deps-Bf9dt2UO.js} +1 -1
- package/dist/{devices-cli-DDPwF2Nx.js → devices-cli-Bhr6jGtH.js} +6 -6
- package/dist/{diagnostics-CYkqD5lP.js → diagnostics-DlZODdRf.js} +5 -5
- package/dist/{directory-cli-giqTe8Yg.js → directory-cli-Bm5QYEo-.js} +3 -3
- package/dist/{dm-policy-shared-B61_yf6G.js → dm-policy-shared-CeFt0nch.js} +1 -1
- package/dist/{dns-cli-Dssz4RqF.js → dns-cli-CubLq4j9.js} +3 -3
- package/dist/{docs-cli-Ct1STieY.js → docs-cli-PS8m1er7.js} +1 -1
- package/dist/{doctor-completion-CL7MyXlo.js → doctor-completion-BpUGRguQ.js} +2 -2
- package/dist/{doctor-config-flow-ljVnQJjo.js → doctor-config-flow-C52W1uUK.js} +9 -9
- package/dist/{exec-approvals-cli-DsBoQu5H.js → exec-approvals-cli-CzvIqBUd.js} +13 -13
- package/dist/{file-lock-2AecMjCa.js → file-lock-BVUYnlQv.js} +8 -8
- package/dist/{fs-safe-B0Is-oLk.js → fs-safe-BdejYjW8.js} +6 -6
- package/dist/{gateway-cli-DG_2YZ8B.js → gateway-cli-D1d5YAt0.js} +98 -98
- package/dist/{gateway-rpc-gaoD882s.js → gateway-rpc-BTGT1SuZ.js} +1 -1
- package/dist/{glass-ui-ws-Bof7krDJ.js → glass-ui-ws-BH9WH_VN.js} +67 -67
- package/dist/{health-CMbUI4aN.js → health-DpE9GWGn.js} +4 -4
- package/dist/{hooks-cli-Cgjor7F-.js → hooks-cli-D7xxbEwI.js} +59 -59
- package/dist/{image-ops-BzCBIakN.js → image-ops-L70xVnpG.js} +10 -10
- package/dist/index.js +52 -52
- package/dist/{inspect-DzYUb_Dl.js → inspect-CGKsaVZ4.js} +4 -4
- package/dist/{install-safe-path-BrpA09f2.js → install-safe-path-B2JrFspY.js} +11 -11
- package/dist/{installs-bnDlOSq2.js → installs-D890uIIW.js} +10 -10
- package/dist/{internal-csqU78gW.js → internal-DVCddhhN.js} +9 -9
- package/dist/{lifecycle-core-cSR_xiIO.js → lifecycle-core-wFwnK_mD.js} +5 -5
- package/dist/llm-slug-generator.js +4 -4
- package/dist/{local-roots-2Jb79HZ8.js → local-roots-CgDCgCuM.js} +1 -1
- package/dist/{logs-cli-Kr145PO_.js → logs-cli-DvIVuW0d.js} +7 -7
- package/dist/{manager-DG6PODgu.js → manager-CoCX7L5u.js} +15 -15
- package/dist/{manager-Cv4xI8sP.js → manager-DDynl084.js} +1 -1
- package/dist/{memory-BFnx3v3_.js → memory-B067LTL9.js} +5 -5
- package/dist/{memory-cli-CHNghdrm.js → memory-cli-D8Z_5-Nz.js} +12 -12
- package/dist/{model-Cwbcw-km.js → model-MUMSB_7d.js} +1 -1
- package/dist/{model-auth-_C07_3Yr.js → model-auth-1EAQvYRv.js} +2 -2
- package/dist/{model-catalog-BWurV7gl.js → model-catalog-IWi6-nY9.js} +3 -3
- package/dist/{model-picker-Dpkr5xBW.js → model-picker-Cf6UgQEh.js} +5 -5
- package/dist/{model-selection-CCTzD29o.js → model-selection-7wdmO-Iw.js} +1 -1
- package/dist/{models-cli-BbK8HMKa.js → models-cli-C979SN3Z.js} +55 -55
- package/dist/{models-config-DlXge3Sd.js → models-config-B5Xxy-c-.js} +8 -8
- package/dist/{node-cli-BPnBosC4.js → node-cli-DGybtex_.js} +27 -27
- package/dist/{node-service-Cc18m-uk.js → node-service-BH08wY5j.js} +1 -1
- package/dist/{nodes-cli-CN_m6PO5.js → nodes-cli-C-mEw2av.js} +10 -10
- package/dist/{nodes-screen-Cp5QP3ET.js → nodes-screen-De9ma6e1.js} +4 -4
- package/dist/{npm-registry-spec-C-muP97-.js → npm-registry-spec-DTqn-NXZ.js} +9 -9
- package/dist/{onboard-B2IcTMv-.js → onboard-CotuAZi6.js} +15 -15
- package/dist/{onboard-channels-wfGO5Zlh.js → onboard-channels-DSyynpou.js} +4 -4
- package/dist/{onboard-custom-DnDrvxSg.js → onboard-custom-BcRYreNG.js} +3 -3
- package/dist/{onboard-helpers-BKejzolA.js → onboard-helpers-CLXJ8zp0.js} +8 -8
- package/dist/{onboard-hooks-D9jHwImb.js → onboard-hooks-2SCajRKc.js} +1 -1
- package/dist/{onboard-remote-y3ZmP90U.js → onboard-remote-BYBai0w3.js} +1 -1
- package/dist/{onboard-skills-BFhHfrt9.js → onboard-skills-BxJlS1Bk.js} +3 -3
- package/dist/{onboarding-DqlPV372.js → onboarding-BnoGiOh3.js} +12 -12
- package/dist/{onboarding.finalize-Bwjv3jew.js → onboarding.finalize-g86Q4433.js} +31 -31
- package/dist/{onboarding.gateway-config-CiRo9EMt.js → onboarding.gateway-config-CEXjbEM0.js} +8 -8
- package/dist/{openai-model-default-De-UAjwg.js → openai-model-default-BkuuK-Di.js} +2 -2
- package/dist/{pairing-cli-CBMMCNnx.js → pairing-cli-Rsae0KnN.js} +5 -5
- package/dist/{pairing-store-Be-ZQK87.js → pairing-store-BNhJOnWn.js} +1 -1
- package/dist/{pairing-token-B703A1U3.js → pairing-token-Dcy37-4s.js} +7 -7
- package/dist/{paths-BWqg8NZT.js → paths-DObzwe08.js} +1 -1
- package/dist/{pi-auth-json-D-vdh-nY.js → pi-auth-json-Db8XJVGL.js} +6 -6
- package/dist/{pi-embedded-helpers-j1JrlsI0.js → pi-embedded-helpers-D-OFjhdI.js} +6 -6
- package/dist/{pi-tools.policy-CvAqjEH9.js → pi-tools.policy-H2t-Xkfc.js} +3 -3
- package/dist/{plugin-auto-enable-BXSJTxI7.js → plugin-auto-enable-DJBhDIMq.js} +1 -1
- package/dist/{plugin-registry-B43UosQh.js → plugin-registry-AsC9gydF.js} +3 -3
- package/dist/plugin-sdk/index.js +6 -6
- package/dist/{plugins-cli-BV2wbjfI.js → plugins-cli-CbByGz8z.js} +54 -54
- package/dist/{ports-CB_Iu83U.js → ports-gxLM5ahL.js} +2 -2
- package/dist/{ports-Bi3V_3n9.js → ports-r7LBic2V.js} +1 -1
- package/dist/{program-context-BmXxHUKe.js → program-context-CiyK6MfV.js} +40 -40
- package/dist/{prompt-select-styled-BlQZX6pK.js → prompt-select-styled-DaNQ_GgB.js} +38 -38
- package/dist/{provider-auth-helpers-WLwb6tL4.js → provider-auth-helpers-D2FDvwT5.js} +6 -6
- package/dist/{push-apns-CBGvXev_.js → push-apns-va-DRu4U.js} +4 -4
- package/dist/{pw-ai-CP5pn3eU.js → pw-ai-BiBvIJzd.js} +7 -7
- package/dist/{pw-ai-DY_6l11g.js → pw-ai-DLsdzdgc.js} +1 -1
- package/dist/{qmd-manager-Dxyue7B1.js → qmd-manager-C8-M4Pru.js} +19 -19
- package/dist/{qr-cli-DHw6muwK.js → qr-cli-1sCVaPcF.js} +3 -3
- package/dist/{register.agent-CXdTiqyP.js → register.agent-BqdQ0s30.js} +67 -67
- package/dist/{register.configure-DVcn-gCO.js → register.configure-Dhwi-4FG.js} +70 -70
- package/dist/{register.maintenance-cpspl8D6.js → register.maintenance-iMjNw9uy.js} +67 -67
- package/dist/{register.message-BjcYy5UG.js → register.message-Ao_b9s2g.js} +47 -47
- package/dist/{register.onboard-D4RN92s2.js → register.onboard-ymhSAezZ.js} +25 -25
- package/dist/{register.setup-BvoXF0xl.js → register.setup-CKs9mqtD.js} +28 -28
- package/dist/{register.status-health-sessions-DjDvCXBn.js → register.status-health-sessions-U-azRmpb.js} +41 -41
- package/dist/{replies-B_3j7R_Q.js → replies-CbXXjn9X.js} +1 -1
- package/dist/{reply-prefix-CtZtkTJK.js → reply-prefix-BFNeXT65.js} +1 -1
- package/dist/{resolve-route-Du0VftVs.js → resolve-route-C1IIA6kH.js} +1 -1
- package/dist/{routes-BwTUoI5h.js → routes-ivqbutvM.js} +10 -10
- package/dist/{rpc-CwxSZZOx.js → rpc-DjqFrbOc.js} +1 -1
- package/dist/{sandbox-CZGTCone.js → sandbox-BkznAPKO.js} +18 -18
- package/dist/{sandbox-cli-DEtGT_4y.js → sandbox-cli-Bb9cBtBH.js} +13 -13
- package/dist/{security-cli-DJd7Fcdy.js → security-cli-JKsf9SIu.js} +29 -29
- package/dist/{send-CxjvucMO.js → send-B0jHSNMF.js} +7 -7
- package/dist/{server-context-DXdk410X.js → server-context-ChcbJgNo.js} +5 -5
- package/dist/{server-methods-DfVfzYqq.js → server-methods-B2tykucj.js} +60 -60
- package/dist/{server-node-events-B0yC6hi1.js → server-node-events-BKqszk_a.js} +48 -48
- package/dist/{service-CRZoXO_n.js → service-e6MzlLCd.js} +15 -15
- package/dist/{session-dirs-a00Ad2SO.js → session-dirs-C9E2G0yZ.js} +2 -2
- package/dist/{session-utils-CJhcRx3E.js → session-utils-Cs1jlD-q.js} +14 -14
- package/dist/{sessions-BCc3THTm.js → sessions-Dxf5Kjig.js} +10 -10
- package/dist/{shared-C39SiDDJ.js → shared-1xPo9ygd.js} +1 -1
- package/dist/{shared-Dh-O8nRd.js → shared-COtpr3Ad.js} +3 -3
- package/dist/{skill-commands-DWvXs3lz.js → skill-commands-DDGGlq68.js} +4 -4
- package/dist/{skill-scanner-CIlHPszT.js → skill-scanner-BCgVcIwi.js} +5 -5
- package/dist/{skills-CYcBtLGH.js → skills-BwDmcZdt.js} +4 -4
- package/dist/{skills-cli-CD9s3cgm.js → skills-cli-B-7TY-vS.js} +7 -7
- package/dist/{skills-install-BTa9IuQ6.js → skills-install-Dwzsjoc8.js} +3 -3
- package/dist/{skills-remote-BcRQTDsZ.js → skills-remote-bz71Bstn.js} +3 -3
- package/dist/{skills-status-DLnCHUZ2.js → skills-status-BKX1PjCc.js} +1 -1
- package/dist/{sqlite-BpogPlQW.js → sqlite-Cod7C5ba.js} +5 -5
- package/dist/{status-BWxLtb3D.js → status-DHBVIMyL.js} +23 -23
- package/dist/{status-Doq8T1zj.js → status-DPGFZPpp.js} +3 -3
- package/dist/{status.update-CKfyV6zw.js → status.update-DGJi0OLl.js} +3 -3
- package/dist/{symframe-cli-D1CtN3pf.js → symframe-cli-CX3dINPw.js} +9 -9
- package/dist/{symi-root-DeCVdZB4.js → symi-root-BQ0IpoW2.js} +2 -2
- package/dist/{synthesis-yl24Ovw4.js → synthesis-D91XE0n4.js} +4 -4
- package/dist/{synthesis-VZNnlUTf.js → synthesis-DmqicCsT.js} +45 -45
- package/dist/{system-cli-r7WJj0Xh.js → system-cli-DUHzCGfK.js} +7 -7
- package/dist/{systemd-CsoVnIbM.js → systemd-CUIM0n5P.js} +5 -5
- package/dist/{systemd-hints-QISwLlFU.js → systemd-hints-CsrzMCTD.js} +6 -6
- package/dist/{systemd-linger-BnhuRdbt.js → systemd-linger-BzYk7A6M.js} +1 -1
- package/dist/{tui-J7Jxp-FF.js → tui-DCqVZ6sC.js} +7 -7
- package/dist/{tui-cli-DR48dU_C.js → tui-cli-CI-P3sei.js} +19 -19
- package/dist/{unified-runner-BV5TdNFv.js → unified-runner-CdJx7yN8.js} +10 -10
- package/dist/{unified-runner-DXjH-prv.js → unified-runner-CznU7Ad0.js} +101 -101
- package/dist/{update-check-u6Jgr1cz.js → update-check-BCL_K7kx.js} +5 -5
- package/dist/{update-cli-CKpjWtlv.js → update-cli-DBoIBDNe.js} +77 -77
- package/dist/{update-runner-G2YgEATs.js → update-runner-BLV8SI96.js} +15 -15
- package/dist/{update-Cb0Fmxic.js → update-yYduAjKd.js} +3 -3
- package/dist/{webhooks-cli-DjUITimx.js → webhooks-cli-D5k-Y2A8.js} +4 -4
- package/dist/{with-timeout-CLrF-Yr_.js → with-timeout-DPR4A2dx.js} +1 -1
- package/dist/{workspace-dirs-DCICLTHx.js → workspace-dirs-jKFQf7of.js} +1 -1
- package/dist/{wsl-DTi7eX-V.js → wsl-CglTdtlb.js} +2 -2
- package/extensions/memory-core/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/package.json +1 -1
|
@@ -3,93 +3,93 @@ import { D as shouldLogVerbose, H as createInternalHookEvent, M as getChildLogge
|
|
|
3
3
|
import { _ as resolveStateDir, u as resolveGatewayPort } from "./paths-By0XjHBk.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-CTPsqyE_.js";
|
|
5
5
|
import { d as createNonExitingRuntime, f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-CHbO_DkH.js";
|
|
6
|
-
import { T as resolveAuthProfileDisplayLabel, a as markAuthProfileFailure, b as ensureAuthProfileStore, g as markAuthProfileGood, h as listProfilesForProvider, i as isProfileInCooldown, n as resolveAuthProfileOrder, o as markAuthProfileUsed, r as getSoonestCooldownExpiry, w as resolveAuthStorePathForDisplay } from "./auth-profiles-
|
|
6
|
+
import { T as resolveAuthProfileDisplayLabel, a as markAuthProfileFailure, b as ensureAuthProfileStore, g as markAuthProfileGood, h as listProfilesForProvider, i as isProfileInCooldown, n as resolveAuthProfileOrder, o as markAuthProfileUsed, r as getSoonestCooldownExpiry, w as resolveAuthStorePathForDisplay } from "./auth-profiles-Ce7R_25e.js";
|
|
7
7
|
import { t as formatCliCommand } from "./command-format-BzjsXBTi.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-DUSb7CCb.js";
|
|
9
|
-
import { n as resolveSymiPackageRootSync, t as resolveSymiPackageRoot } from "./symi-root-
|
|
9
|
+
import { n as resolveSymiPackageRootSync, t as resolveSymiPackageRoot } from "./symi-root-BQ0IpoW2.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-DuYbft0z.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-
|
|
12
|
-
import { C as DEFAULT_MODEL, S as DEFAULT_CONTEXT_TOKENS, _ as resolveModelRefFromString, a as findNormalizedProviderValue, b as resolveThinkingDefault, c as modelKey, h as resolveDefaultModelForAgent, l as normalizeModelRef$1, m as resolveConfiguredModelRef, n as buildConfiguredAllowlistKeys, r as buildModelAliasIndex, t as buildAllowedModelSet, u as normalizeProviderId, w as DEFAULT_PROVIDER, x as getProviderAdapter, y as resolveSubagentSpawnModelSelection } from "./model-selection-
|
|
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-DOrZjOnW.js";
|
|
12
|
+
import { C as DEFAULT_MODEL, S as DEFAULT_CONTEXT_TOKENS, _ as resolveModelRefFromString, a as findNormalizedProviderValue, b as resolveThinkingDefault, c as modelKey, h as resolveDefaultModelForAgent, l as normalizeModelRef$1, m as resolveConfiguredModelRef, n as buildConfiguredAllowlistKeys, r as buildModelAliasIndex, t as buildAllowedModelSet, u as normalizeProviderId, w as DEFAULT_PROVIDER, x as getProviderAdapter, y as resolveSubagentSpawnModelSelection } from "./model-selection-7wdmO-Iw.js";
|
|
13
13
|
import { n as normalizeSecretInput } from "./normalize-secret-input-DjGU5EXe.js";
|
|
14
14
|
import { n as saveJsonFile, t as loadJsonFile } from "./json-file-CNp4GTiH.js";
|
|
15
15
|
import { t as resolveSymiAgentDir } from "./agent-paths-BbZSGrUA.js";
|
|
16
|
-
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-
|
|
17
|
-
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-
|
|
16
|
+
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-D-OFjhdI.js";
|
|
17
|
+
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-B4jkreCN.js";
|
|
18
18
|
import { t as parseBooleanValue } from "./boolean-CbZoNRMn.js";
|
|
19
19
|
import { t as isTruthyEnvValue } from "./env-BRnPI9sO.js";
|
|
20
20
|
import { i as resolveShellEnvFallbackTimeoutMs, n as getShellPathFromLoginShell } from "./shell-env-Dc3iU7HK.js";
|
|
21
21
|
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-D1MLZEjS.js";
|
|
22
22
|
import { a as isPathInsideWithRealpath } from "./legacy-names-BQ9vKISY.js";
|
|
23
|
-
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-
|
|
24
|
-
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-
|
|
25
|
-
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-
|
|
23
|
+
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-BkznAPKO.js";
|
|
24
|
+
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-DJChpTwP.js";
|
|
25
|
+
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-ChcbJgNo.js";
|
|
26
26
|
import { l as parseFrontmatterBlock } from "./frontmatter-B_jqcova.js";
|
|
27
|
-
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-
|
|
28
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./routes-
|
|
27
|
+
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-BwDmcZdt.js";
|
|
28
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./routes-ivqbutvM.js";
|
|
29
29
|
import { n as formatErrorMessage, r as formatUncaughtError, t as extractErrorCode } from "./errors-bI7Tdx75.js";
|
|
30
|
-
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-
|
|
30
|
+
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-DObzwe08.js";
|
|
31
31
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DOZRI5XH.js";
|
|
32
|
-
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-
|
|
33
|
-
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-
|
|
32
|
+
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-L70xVnpG.js";
|
|
33
|
+
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-Dxf5Kjig.js";
|
|
34
34
|
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-hF45sewN.js";
|
|
35
35
|
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-DgjXWzf-.js";
|
|
36
36
|
import { t as normalizeChatType } from "./chat-type-CUJqUqwu.js";
|
|
37
37
|
import { n as resolveConversationLabel } from "./conversation-label-CffvEjpp.js";
|
|
38
38
|
import { a as resolveSlackAccount, c as resolveSlackBotToken, n as listChannelPlugins, r as normalizeChannelId$1, s as resolveSlackAppToken, t as getChannelPlugin } from "./plugins-CF5skkHh.js";
|
|
39
|
-
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-
|
|
39
|
+
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-B0jHSNMF.js";
|
|
40
40
|
import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, t as resolveDefaultSessionStorePath } from "./paths-BtvQ7JvU.js";
|
|
41
41
|
import { i as normalizeInputProvenance, n as applyInputProvenanceToUserMessage, r as hasInterSessionUserProvenance } from "./input-provenance-Dfn-vEsu.js";
|
|
42
42
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-x1D4Vniz.js";
|
|
43
43
|
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-COroyVA5.js";
|
|
44
44
|
import { n as isSilentReplyText, t as SILENT_REPLY_TOKEN } from "./tokens-0yh2UnJq.js";
|
|
45
|
-
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-
|
|
45
|
+
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-lTZLIQqf.js";
|
|
46
46
|
import { a as logMessageProcessed, i as logLaneEnqueue, o as logMessageQueued, r as logLaneDequeue, s as logSessionStateChange, t as diag } from "./diagnostic-DbT9t0Sh.js";
|
|
47
47
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-DnkpMfCl.js";
|
|
48
|
-
import { i as resolveApiKeyForProvider, n as getCustomProviderApiKey, o as resolveEnvApiKey, r as requireApiKey, s as resolveModelAuthMode, t as getApiKeyForModel } from "./model-auth-
|
|
49
|
-
import { b as OLLAMA_NATIVE_BASE_URL, c as normalizeGoogleModelId, t as ensureSymiModelsJson, x as createOllamaStreamFn } from "./models-config-
|
|
50
|
-
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-
|
|
48
|
+
import { i as resolveApiKeyForProvider, n as getCustomProviderApiKey, o as resolveEnvApiKey, r as requireApiKey, s as resolveModelAuthMode, t as getApiKeyForModel } from "./model-auth-1EAQvYRv.js";
|
|
49
|
+
import { b as OLLAMA_NATIVE_BASE_URL, c as normalizeGoogleModelId, t as ensureSymiModelsJson, x as createOllamaStreamFn } from "./models-config-B5Xxy-c-.js";
|
|
50
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-Db8XJVGL.js";
|
|
51
51
|
import { c as hasNonzeroUsage, l as normalizeUsage, n as loadCostUsageSummary, o as derivePromptTokens, r as loadSessionCostSummary } from "./session-cost-usage-D3mgssM_.js";
|
|
52
|
-
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-
|
|
53
|
-
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$2 } from "./with-timeout-
|
|
54
|
-
import { i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
55
|
-
import { n as resolveMemoryBackendConfig, t as getMemorySearchManager } from "./memory-
|
|
56
|
-
import { a as parseGeminiAuth, c as resolveMemorySearchConfig, n as retryAsync, o as collectProviderApiKeysForExecution, s as executeWithApiKeyRotation } from "./manager-
|
|
57
|
-
import { f as runTasksWithConcurrency } from "./internal-
|
|
52
|
+
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-Cs1jlD-q.js";
|
|
53
|
+
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$2 } from "./with-timeout-DPR4A2dx.js";
|
|
54
|
+
import { i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-BFNeXT65.js";
|
|
55
|
+
import { n as resolveMemoryBackendConfig, t as getMemorySearchManager } from "./memory-B067LTL9.js";
|
|
56
|
+
import { a as parseGeminiAuth, c as resolveMemorySearchConfig, n as retryAsync, o as collectProviderApiKeysForExecution, s as executeWithApiKeyRotation } from "./manager-CoCX7L5u.js";
|
|
57
|
+
import { f as runTasksWithConcurrency } from "./internal-DVCddhhN.js";
|
|
58
58
|
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-BxfKjCUx.js";
|
|
59
59
|
import { n as resolveMarkdownTableMode } from "./markdown-tables-CS1Tvb3z.js";
|
|
60
60
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-BhdrdVp5.js";
|
|
61
61
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-JHxT9355.js";
|
|
62
|
-
import { n as getDefaultMediaLocalRoots } from "./local-roots-
|
|
62
|
+
import { n as getDefaultMediaLocalRoots } from "./local-roots-CgDCgCuM.js";
|
|
63
63
|
import { i as resolveNativeSkillsEnabled, n as isRestartEnabled, r as resolveNativeCommandsEnabled, t as isCommandFlagEnabled } from "./commands-DUzLGgEZ.js";
|
|
64
|
-
import { a as shouldHandleTextCommands, i as normalizeCommandBody, n as listChatCommands, r as listChatCommandsForConfig } from "./commands-registry-
|
|
65
|
-
import { Ht as SESSION_LABEL_MAX_LENGTH } from "./client-
|
|
66
|
-
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege } from "./call-
|
|
64
|
+
import { a as shouldHandleTextCommands, i as normalizeCommandBody, n as listChatCommands, r as listChatCommandsForConfig } from "./commands-registry-Ca5hh7nh.js";
|
|
65
|
+
import { Ht as SESSION_LABEL_MAX_LENGTH } from "./client-Cs9Bh-G0.js";
|
|
66
|
+
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege } from "./call-xdEE97oU.js";
|
|
67
67
|
import { n as resolveToolDisplay, t as formatToolDetail } from "./tool-display-DFOL6UQ9.js";
|
|
68
68
|
import { n as formatTimeAgo } from "./format-relative-D4GQsWlP.js";
|
|
69
69
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-B7Rvs8pK.js";
|
|
70
|
-
import { g as getSkillsSnapshotVersion, h as ensureSkillsWatcher, t as getRemoteSkillEligibility } from "./skills-remote-
|
|
70
|
+
import { g as getSkillsSnapshotVersion, h as ensureSkillsWatcher, t as getRemoteSkillEligibility } from "./skills-remote-bz71Bstn.js";
|
|
71
71
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-ClQLvlCW.js";
|
|
72
|
-
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-
|
|
73
|
-
import { i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames } from "./skill-commands-
|
|
74
|
-
import { a as removeChannelAllowFromStoreEntry, c as listPairingChannels, i as readChannelAllowFromStore, o as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-
|
|
72
|
+
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-IWi6-nY9.js";
|
|
73
|
+
import { i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames } from "./skill-commands-DDGGlq68.js";
|
|
74
|
+
import { a as removeChannelAllowFromStoreEntry, c as listPairingChannels, i as readChannelAllowFromStore, o as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-BNhJOnWn.js";
|
|
75
75
|
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-DioSaIeH.js";
|
|
76
|
-
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-
|
|
76
|
+
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-De9ma6e1.js";
|
|
77
77
|
import { n as parseNodeList, r as parsePairingList, t as resolveNodeIdFromCandidates } from "./node-match-N7nsmfM6.js";
|
|
78
78
|
import { t as formatDurationCompact$1 } from "./format-duration-CIjmjQST.js";
|
|
79
79
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-9ygk6nTV.js";
|
|
80
80
|
import { i as resolveModelCostConfig, n as formatTokenCount$2, r as formatUsd, t as estimateUsageCost } from "./usage-format-DeczTGI-.js";
|
|
81
81
|
import { i as resolveWindow, n as formatSummaryReport, r as loadCostBenchmarkSummary, t as buildCostBreakdown } from "./breakdown-B_Dhhm3K.js";
|
|
82
82
|
import { c as resolveGatewayLaunchAgentLabel, d as resolveGatewaySystemdServiceName } from "./constants-BLIhifCJ.js";
|
|
83
|
-
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-
|
|
83
|
+
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-D8kKOts5.js";
|
|
84
84
|
import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-DQs772BN.js";
|
|
85
85
|
import { t as emitSymframePush } from "./symframe-broadcast-CXo2qoxy.js";
|
|
86
86
|
import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-H1qOf0q-.js";
|
|
87
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
87
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C1IIA6kH.js";
|
|
88
88
|
import { t as parseTimeoutMs } from "./parse-timeout-DmEcHIsV.js";
|
|
89
|
-
import { n as registerMemoryCli } from "./memory-cli-
|
|
90
|
-
import { i as resolveSlackThreadTs, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
91
|
-
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-
|
|
92
|
-
import { a as buildModelAliasLines, n as resolveModel$2 } from "./model-
|
|
89
|
+
import { n as registerMemoryCli } from "./memory-cli-D8Z_5-Nz.js";
|
|
90
|
+
import { i as resolveSlackThreadTs, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-CbXXjn9X.js";
|
|
91
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-H2t-Xkfc.js";
|
|
92
|
+
import { a as buildModelAliasLines, n as resolveModel$2 } from "./model-MUMSB_7d.js";
|
|
93
93
|
import { createRequire } from "node:module";
|
|
94
94
|
import process$1 from "node:process";
|
|
95
95
|
import { fileURLToPath } from "node:url";
|
|
@@ -98,7 +98,7 @@ import path from "node:path";
|
|
|
98
98
|
import fs, { constants, existsSync, statSync } from "node:fs";
|
|
99
99
|
import os, { homedir } from "node:os";
|
|
100
100
|
import JSON5 from "json5";
|
|
101
|
-
import
|
|
101
|
+
import fs$1 from "node:fs/promises";
|
|
102
102
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
103
103
|
import { complete, createAssistantMessageEventStream, streamSimple } from "@mariozechner/pi-ai";
|
|
104
104
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
@@ -1848,7 +1848,7 @@ async function imageResult(params) {
|
|
|
1848
1848
|
}, params.label, params.imageSanitization);
|
|
1849
1849
|
}
|
|
1850
1850
|
async function imageResultFromFile(params) {
|
|
1851
|
-
const buf = await
|
|
1851
|
+
const buf = await fs$1.readFile(params.path);
|
|
1852
1852
|
const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
|
|
1853
1853
|
return await imageResult({
|
|
1854
1854
|
label: params.label,
|
|
@@ -5828,7 +5828,7 @@ async function routeReply(params) {
|
|
|
5828
5828
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
5829
5829
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
5830
5830
|
try {
|
|
5831
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
5831
|
+
const { deliverOutboundPayloads } = await import("./deliver-lTZLIQqf.js").then((n) => n.n);
|
|
5832
5832
|
return {
|
|
5833
5833
|
ok: true,
|
|
5834
5834
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -11669,7 +11669,7 @@ var MediaAttachmentCache = class {
|
|
|
11669
11669
|
const size = await this.ensureLocalStat(entry);
|
|
11670
11670
|
if (entry.resolvedPath) {
|
|
11671
11671
|
if (size !== void 0 && size > params.maxBytes) throw new MediaUnderstandingSkipError("maxBytes", `Attachment ${params.attachmentIndex + 1} exceeds maxBytes ${params.maxBytes}`);
|
|
11672
|
-
const buffer = await
|
|
11672
|
+
const buffer = await fs$1.readFile(entry.resolvedPath);
|
|
11673
11673
|
entry.buffer = buffer;
|
|
11674
11674
|
entry.bufferMime = entry.bufferMime ?? entry.attachment.mime ?? await detectMime({
|
|
11675
11675
|
buffer,
|
|
@@ -11739,10 +11739,10 @@ var MediaAttachmentCache = class {
|
|
|
11739
11739
|
prefix: "symi-media",
|
|
11740
11740
|
extension: path.extname(bufferResult.fileName || "") || ""
|
|
11741
11741
|
});
|
|
11742
|
-
await
|
|
11742
|
+
await fs$1.writeFile(tmpPath, bufferResult.buffer);
|
|
11743
11743
|
entry.tempPath = tmpPath;
|
|
11744
11744
|
entry.tempCleanup = async () => {
|
|
11745
|
-
await
|
|
11745
|
+
await fs$1.unlink(tmpPath).catch(() => {});
|
|
11746
11746
|
};
|
|
11747
11747
|
return {
|
|
11748
11748
|
path: tmpPath,
|
|
@@ -11789,12 +11789,12 @@ var MediaAttachmentCache = class {
|
|
|
11789
11789
|
if (entry.statSize !== void 0) return entry.statSize;
|
|
11790
11790
|
try {
|
|
11791
11791
|
const currentPath = entry.resolvedPath;
|
|
11792
|
-
const stat = await
|
|
11792
|
+
const stat = await fs$1.stat(currentPath);
|
|
11793
11793
|
if (!stat.isFile()) {
|
|
11794
11794
|
entry.resolvedPath = void 0;
|
|
11795
11795
|
return;
|
|
11796
11796
|
}
|
|
11797
|
-
const canonicalPath = await
|
|
11797
|
+
const canonicalPath = await fs$1.realpath(currentPath).catch(() => currentPath);
|
|
11798
11798
|
if (!isInboundPathAllowed({
|
|
11799
11799
|
filePath: canonicalPath,
|
|
11800
11800
|
roots: await this.getCanonicalLocalPathRoots()
|
|
@@ -11816,7 +11816,7 @@ var MediaAttachmentCache = class {
|
|
|
11816
11816
|
if (this.canonicalLocalPathRoots) return await this.canonicalLocalPathRoots;
|
|
11817
11817
|
this.canonicalLocalPathRoots = (async () => mergeInboundPathRoots(this.localPathRoots, await Promise.all(this.localPathRoots.map(async (root) => {
|
|
11818
11818
|
if (root.includes("*")) return root;
|
|
11819
|
-
return await
|
|
11819
|
+
return await fs$1.realpath(root).catch(() => root);
|
|
11820
11820
|
}))))();
|
|
11821
11821
|
return await this.canonicalLocalPathRoots;
|
|
11822
11822
|
}
|
|
@@ -11887,7 +11887,7 @@ function formatAudioTranscripts(outputs) {
|
|
|
11887
11887
|
async function fileExists(filePath) {
|
|
11888
11888
|
if (!filePath) return false;
|
|
11889
11889
|
try {
|
|
11890
|
-
await
|
|
11890
|
+
await fs$1.stat(filePath);
|
|
11891
11891
|
return true;
|
|
11892
11892
|
} catch {
|
|
11893
11893
|
return false;
|
|
@@ -11987,7 +11987,7 @@ async function resolveCliOutput(params) {
|
|
|
11987
11987
|
const commandId = commandBase(params.command);
|
|
11988
11988
|
const fileOutput = commandId === "whisper-cli" ? resolveWhisperCppOutputPath(params.args) : commandId === "whisper" ? resolveWhisperOutputPath(params.args, params.mediaPath) : null;
|
|
11989
11989
|
if (fileOutput && await fileExists(fileOutput)) try {
|
|
11990
|
-
const content = await
|
|
11990
|
+
const content = await fs$1.readFile(fileOutput, "utf8");
|
|
11991
11991
|
if (content.trim()) return content.trim();
|
|
11992
11992
|
} catch {}
|
|
11993
11993
|
if (commandId === "gemini") {
|
|
@@ -12278,7 +12278,7 @@ async function runCliEntry(params) {
|
|
|
12278
12278
|
maxBytes,
|
|
12279
12279
|
timeoutMs
|
|
12280
12280
|
});
|
|
12281
|
-
const outputDir = await
|
|
12281
|
+
const outputDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-media-cli-"));
|
|
12282
12282
|
const mediaPath = pathResult.path;
|
|
12283
12283
|
const outputBase = path.join(outputDir, path.parse(mediaPath).name);
|
|
12284
12284
|
const templCtx = {
|
|
@@ -12312,7 +12312,7 @@ async function runCliEntry(params) {
|
|
|
12312
12312
|
model: command
|
|
12313
12313
|
};
|
|
12314
12314
|
} finally {
|
|
12315
|
-
await
|
|
12315
|
+
await fs$1.rm(outputDir, {
|
|
12316
12316
|
recursive: true,
|
|
12317
12317
|
force: true
|
|
12318
12318
|
}).catch(() => {});
|
|
@@ -12356,9 +12356,9 @@ function candidateBinaryNames(name) {
|
|
|
12356
12356
|
}
|
|
12357
12357
|
async function isExecutable$1(filePath) {
|
|
12358
12358
|
try {
|
|
12359
|
-
if (!(await
|
|
12359
|
+
if (!(await fs$1.stat(filePath)).isFile()) return false;
|
|
12360
12360
|
if (process.platform === "win32") return true;
|
|
12361
|
-
await
|
|
12361
|
+
await fs$1.access(filePath, constants.X_OK);
|
|
12362
12362
|
return true;
|
|
12363
12363
|
} catch {
|
|
12364
12364
|
return false;
|
|
@@ -14070,7 +14070,7 @@ async function createModelSelectionState(params) {
|
|
|
14070
14070
|
}
|
|
14071
14071
|
}
|
|
14072
14072
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
14073
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
14073
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-Ce7R_25e.js").then((n) => n.t);
|
|
14074
14074
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
14075
14075
|
const providerKey = normalizeProviderId(provider);
|
|
14076
14076
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17214,7 +17214,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
17214
17214
|
cwd: process.cwd(),
|
|
17215
17215
|
root: params.sandbox.workspaceDir
|
|
17216
17216
|
});
|
|
17217
|
-
if (!(await
|
|
17217
|
+
if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
17218
17218
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
17219
17219
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
17220
17220
|
return {
|
|
@@ -18228,13 +18228,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
18228
18228
|
cwd: params.workdir,
|
|
18229
18229
|
root: params.workdir
|
|
18230
18230
|
});
|
|
18231
|
-
stat = await
|
|
18231
|
+
stat = await fs$1.stat(absPath);
|
|
18232
18232
|
} catch {
|
|
18233
18233
|
return;
|
|
18234
18234
|
}
|
|
18235
18235
|
if (!stat.isFile()) return;
|
|
18236
18236
|
if (stat.size > 512 * 1024) return;
|
|
18237
|
-
const content = await
|
|
18237
|
+
const content = await fs$1.readFile(absPath, "utf-8");
|
|
18238
18238
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
18239
18239
|
if (first) {
|
|
18240
18240
|
const idx = first.index;
|
|
@@ -22969,7 +22969,7 @@ async function handleCommands(params) {
|
|
|
22969
22969
|
try {
|
|
22970
22970
|
const messages = [];
|
|
22971
22971
|
if (sessionFile) {
|
|
22972
|
-
const content = await
|
|
22972
|
+
const content = await fs$1.readFile(sessionFile, "utf-8");
|
|
22973
22973
|
for (const line of content.split("\n")) {
|
|
22974
22974
|
if (!line.trim()) continue;
|
|
22975
22975
|
try {
|
|
@@ -25156,7 +25156,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25156
25156
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
25157
25157
|
throw new Error("jsonlPath outside allowed roots");
|
|
25158
25158
|
}
|
|
25159
|
-
const canonical = await
|
|
25159
|
+
const canonical = await fs$1.realpath(resolved).catch(() => resolved);
|
|
25160
25160
|
if (!isInboundPathAllowed({
|
|
25161
25161
|
filePath: canonical,
|
|
25162
25162
|
roots
|
|
@@ -25164,7 +25164,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25164
25164
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
25165
25165
|
throw new Error("jsonlPath outside allowed roots");
|
|
25166
25166
|
}
|
|
25167
|
-
return await
|
|
25167
|
+
return await fs$1.readFile(canonical, "utf8");
|
|
25168
25168
|
}
|
|
25169
25169
|
const CanvasToolSchema = Type.Object({
|
|
25170
25170
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -26838,7 +26838,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
26838
26838
|
accountId: params.accountId
|
|
26839
26839
|
}),
|
|
26840
26840
|
sandboxValidated: true,
|
|
26841
|
-
readFile: (filePath) =>
|
|
26841
|
+
readFile: (filePath) => fs$1.readFile(filePath)
|
|
26842
26842
|
});
|
|
26843
26843
|
params.args.buffer = media.buffer.toString("base64");
|
|
26844
26844
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -33452,7 +33452,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
33452
33452
|
return;
|
|
33453
33453
|
}
|
|
33454
33454
|
try {
|
|
33455
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
33455
|
+
const { deliverOutboundPayloads } = await import("./deliver-lTZLIQqf.js").then((n) => n.n);
|
|
33456
33456
|
await deliverOutboundPayloads({
|
|
33457
33457
|
cfg: params.cfg,
|
|
33458
33458
|
channel,
|
|
@@ -33857,7 +33857,7 @@ async function stageSandboxMedia(params) {
|
|
|
33857
33857
|
};
|
|
33858
33858
|
try {
|
|
33859
33859
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
33860
|
-
await
|
|
33860
|
+
await fs$1.mkdir(destDir, { recursive: true });
|
|
33861
33861
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
33862
33862
|
cfg,
|
|
33863
33863
|
accountId: ctx.AccountId
|
|
@@ -33907,7 +33907,7 @@ async function stageSandboxMedia(params) {
|
|
|
33907
33907
|
usedNames.add(fileName);
|
|
33908
33908
|
const dest = path.join(destDir, fileName);
|
|
33909
33909
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
33910
|
-
else await
|
|
33910
|
+
else await fs$1.copyFile(source, dest);
|
|
33911
33911
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
33912
33912
|
staged.set(source, stagedPath);
|
|
33913
33913
|
}
|
|
@@ -39238,7 +39238,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
39238
39238
|
}
|
|
39239
39239
|
let commandsRegistry;
|
|
39240
39240
|
async function getCommandsRegistry() {
|
|
39241
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
39241
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Ca5hh7nh.js").then((n) => n.t);
|
|
39242
39242
|
return commandsRegistry;
|
|
39243
39243
|
}
|
|
39244
39244
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -39580,11 +39580,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39580
39580
|
const channelName = channelInfo?.name;
|
|
39581
39581
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
39582
39582
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
39583
|
-
import("./resolve-route-
|
|
39583
|
+
import("./resolve-route-C1IIA6kH.js").then((n) => n.r),
|
|
39584
39584
|
import("./inbound-context-B7Rvs8pK.js").then((n) => n.n),
|
|
39585
39585
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
39586
39586
|
]);
|
|
39587
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CffvEjpp.js").then((n) => n.t), import("./reply-prefix-
|
|
39587
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CffvEjpp.js").then((n) => n.t), import("./reply-prefix-BFNeXT65.js").then((n) => n.n)]);
|
|
39588
39588
|
const route = resolveAgentRoute({
|
|
39589
39589
|
cfg,
|
|
39590
39590
|
channel: "slack",
|
|
@@ -39641,7 +39641,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39641
39641
|
});
|
|
39642
39642
|
const deliverSlashPayloads = async (replies) => {
|
|
39643
39643
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
39644
|
-
import("./replies-
|
|
39644
|
+
import("./replies-CbXXjn9X.js").then((n) => n.r),
|
|
39645
39645
|
import("./chunk-BxfKjCUx.js").then((n) => n.s),
|
|
39646
39646
|
import("./markdown-tables-CS1Tvb3z.js").then((n) => n.t)
|
|
39647
39647
|
]);
|
|
@@ -39696,7 +39696,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39696
39696
|
let nativeCommands = [];
|
|
39697
39697
|
if (nativeEnabled) {
|
|
39698
39698
|
reg = await getCommandsRegistry();
|
|
39699
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
39699
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DDGGlq68.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
39700
39700
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
39701
39701
|
skillCommands,
|
|
39702
39702
|
provider: "slack"
|
|
@@ -40829,7 +40829,7 @@ function resolvePluginTools(params) {
|
|
|
40829
40829
|
//#endregion
|
|
40830
40830
|
//#region src/agents/apply-patch-update.ts
|
|
40831
40831
|
async function defaultReadFile(filePath) {
|
|
40832
|
-
return
|
|
40832
|
+
return fs$1.readFile(filePath, "utf8");
|
|
40833
40833
|
}
|
|
40834
40834
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
40835
40835
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -41073,10 +41073,10 @@ function resolvePatchFileOps(options) {
|
|
|
41073
41073
|
};
|
|
41074
41074
|
}
|
|
41075
41075
|
return {
|
|
41076
|
-
readFile: (filePath) =>
|
|
41077
|
-
writeFile: (filePath, content) =>
|
|
41078
|
-
remove: (filePath) =>
|
|
41079
|
-
mkdirp: (dir) =>
|
|
41076
|
+
readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
|
|
41077
|
+
writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
|
|
41078
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
41079
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
41080
41080
|
};
|
|
41081
41081
|
}
|
|
41082
41082
|
async function ensureDir(filePath, ops) {
|
|
@@ -42281,7 +42281,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
42281
42281
|
};
|
|
42282
42282
|
let content;
|
|
42283
42283
|
try {
|
|
42284
|
-
content = await
|
|
42284
|
+
content = await fs$1.readFile(sessionFile, "utf-8");
|
|
42285
42285
|
} catch (err) {
|
|
42286
42286
|
if (err?.code === "ENOENT") return {
|
|
42287
42287
|
repaired: false,
|
|
@@ -42329,15 +42329,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
42329
42329
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
42330
42330
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
42331
42331
|
try {
|
|
42332
|
-
const stat = await
|
|
42333
|
-
await
|
|
42334
|
-
if (stat) await
|
|
42335
|
-
await
|
|
42336
|
-
if (stat) await
|
|
42337
|
-
await
|
|
42332
|
+
const stat = await fs$1.stat(sessionFile).catch(() => null);
|
|
42333
|
+
await fs$1.writeFile(backupPath, content, "utf-8");
|
|
42334
|
+
if (stat) await fs$1.chmod(backupPath, stat.mode);
|
|
42335
|
+
await fs$1.writeFile(tmpPath, cleaned, "utf-8");
|
|
42336
|
+
if (stat) await fs$1.chmod(tmpPath, stat.mode);
|
|
42337
|
+
await fs$1.rename(tmpPath, sessionFile);
|
|
42338
42338
|
} catch (err) {
|
|
42339
42339
|
try {
|
|
42340
|
-
await
|
|
42340
|
+
await fs$1.unlink(tmpPath);
|
|
42341
42341
|
} catch (cleanupErr) {
|
|
42342
42342
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
42343
42343
|
}
|
|
@@ -43610,7 +43610,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
43610
43610
|
if (!isSessionManagerCacheEnabled()) return;
|
|
43611
43611
|
if (isSessionManagerCached(sessionFile)) return;
|
|
43612
43612
|
try {
|
|
43613
|
-
const handle = await
|
|
43613
|
+
const handle = await fs$1.open(sessionFile, "r");
|
|
43614
43614
|
try {
|
|
43615
43615
|
const buffer = Buffer$1.alloc(4096);
|
|
43616
43616
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -43750,7 +43750,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43750
43750
|
} catch (err) {
|
|
43751
43751
|
return fail(describeUnknownError(err));
|
|
43752
43752
|
}
|
|
43753
|
-
await
|
|
43753
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
43754
43754
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
43755
43755
|
const sandbox = await resolveSandboxContext({
|
|
43756
43756
|
config: params.config,
|
|
@@ -43758,7 +43758,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43758
43758
|
workspaceDir: resolvedWorkspace
|
|
43759
43759
|
});
|
|
43760
43760
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
43761
|
-
await
|
|
43761
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
43762
43762
|
await ensureSessionHeader({
|
|
43763
43763
|
sessionFile: params.sessionFile,
|
|
43764
43764
|
sessionId: params.sessionId,
|
|
@@ -44083,12 +44083,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
44083
44083
|
const existing = writers.get(filePath);
|
|
44084
44084
|
if (existing) return existing;
|
|
44085
44085
|
const dir = path.dirname(filePath);
|
|
44086
|
-
const ready =
|
|
44086
|
+
const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
44087
44087
|
let queue = Promise.resolve();
|
|
44088
44088
|
const writer = {
|
|
44089
44089
|
filePath,
|
|
44090
44090
|
write: (line) => {
|
|
44091
|
-
queue = queue.then(() => ready).then(() =>
|
|
44091
|
+
queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
44092
44092
|
}
|
|
44093
44093
|
};
|
|
44094
44094
|
writers.set(filePath, writer);
|
|
@@ -47179,7 +47179,7 @@ Use the message tool with buttons:
|
|
|
47179
47179
|
*/
|
|
47180
47180
|
async function readSessionFile(sessionFile) {
|
|
47181
47181
|
try {
|
|
47182
|
-
return await
|
|
47182
|
+
return await fs$1.readFile(sessionFile, "utf-8");
|
|
47183
47183
|
} catch {
|
|
47184
47184
|
return null;
|
|
47185
47185
|
}
|
|
@@ -47188,8 +47188,8 @@ async function writeAtomically(sessionFile, text) {
|
|
|
47188
47188
|
const dir = path.dirname(sessionFile);
|
|
47189
47189
|
const base = path.basename(sessionFile);
|
|
47190
47190
|
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
47191
|
-
await
|
|
47192
|
-
await
|
|
47191
|
+
await fs$1.writeFile(tmp, text, "utf-8");
|
|
47192
|
+
await fs$1.rename(tmp, sessionFile);
|
|
47193
47193
|
}
|
|
47194
47194
|
/**
|
|
47195
47195
|
* Remove empty assistant JSONL entries from the session file.
|
|
@@ -47291,7 +47291,7 @@ function isInPoisonRange(version) {
|
|
|
47291
47291
|
*/
|
|
47292
47292
|
async function checkSessionPoison(sessionFile) {
|
|
47293
47293
|
try {
|
|
47294
|
-
const firstLine = (await
|
|
47294
|
+
const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
47295
47295
|
if (!firstLine) return null;
|
|
47296
47296
|
const header = JSON.parse(firstLine);
|
|
47297
47297
|
if (header.type !== "session") return null;
|
|
@@ -47309,7 +47309,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
47309
47309
|
*/
|
|
47310
47310
|
async function archivePoisonedSession(sessionFile) {
|
|
47311
47311
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
47312
|
-
await
|
|
47312
|
+
await fs$1.rename(sessionFile, archiveName);
|
|
47313
47313
|
return archiveName;
|
|
47314
47314
|
}
|
|
47315
47315
|
/**
|
|
@@ -47318,14 +47318,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
47318
47318
|
*/
|
|
47319
47319
|
async function stampSessionVersion(sessionFile) {
|
|
47320
47320
|
try {
|
|
47321
|
-
const lines = (await
|
|
47321
|
+
const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
|
|
47322
47322
|
if (lines.length === 0) return;
|
|
47323
47323
|
const header = JSON.parse(lines[0]);
|
|
47324
47324
|
if (header.type !== "session") return;
|
|
47325
47325
|
if (header.symiVersion === VERSION) return;
|
|
47326
47326
|
header.symiVersion = VERSION;
|
|
47327
47327
|
lines[0] = JSON.stringify(header);
|
|
47328
|
-
await
|
|
47328
|
+
await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
47329
47329
|
} catch {}
|
|
47330
47330
|
}
|
|
47331
47331
|
/**
|
|
@@ -47554,7 +47554,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
47554
47554
|
return;
|
|
47555
47555
|
}
|
|
47556
47556
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
47557
|
-
await
|
|
47557
|
+
await fs$1.writeFile(params.sessionFile, "", "utf-8");
|
|
47558
47558
|
sm.fileEntries = [header];
|
|
47559
47559
|
sm.byId?.clear?.();
|
|
47560
47560
|
sm.labelsById?.clear?.();
|
|
@@ -48112,7 +48112,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48112
48112
|
const prevCwd = process.cwd();
|
|
48113
48113
|
const runAbortController = new AbortController();
|
|
48114
48114
|
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"}`);
|
|
48115
|
-
await
|
|
48115
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
48116
48116
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
48117
48117
|
const sandbox = await resolveSandboxContext({
|
|
48118
48118
|
config: params.config,
|
|
@@ -48120,7 +48120,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48120
48120
|
workspaceDir: resolvedWorkspace
|
|
48121
48121
|
});
|
|
48122
48122
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
48123
|
-
await
|
|
48123
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
48124
48124
|
let restoreSkillEnv;
|
|
48125
48125
|
process.chdir(effectiveWorkspace);
|
|
48126
48126
|
try {
|
|
@@ -48329,7 +48329,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48329
48329
|
sessionFile: params.sessionFile,
|
|
48330
48330
|
warn: (message) => log$7.warn(message)
|
|
48331
48331
|
});
|
|
48332
|
-
const hadSessionFile = await
|
|
48332
|
+
const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
48333
48333
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
48334
48334
|
modelApi: params.model?.api,
|
|
48335
48335
|
provider: params.provider,
|
|
@@ -49421,7 +49421,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
49421
49421
|
}
|
|
49422
49422
|
runLoopIterations += 1;
|
|
49423
49423
|
attemptedThinking.add(thinkLevel);
|
|
49424
|
-
await
|
|
49424
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
49425
49425
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
49426
49426
|
const attempt = await runEmbeddedAttempt({
|
|
49427
49427
|
sessionId: params.sessionId,
|