@symerian/symi 3.5.26 → 3.5.27
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-CoHzNs_e.js → agent-DxRVDqSg.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-CuwXq_EA.js → audit-C_3fAFeS.js} +20 -20
- package/dist/{auth-choice-DKRHawfp.js → auth-choice-DQplW60s.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-BI81RlI8.js → browser-cli-D6xFqw9w.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-xUpyZDH4.js → call-AZ9vNhST.js} +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-vjcKi2yl.js → channel-options-DnWkDAWi.js} +1 -1
- package/dist/{channels-cli-CfBFa-VO.js → channels-cli-CGCyzahW.js} +57 -57
- package/dist/{chrome-38OnGyuN.js → chrome-DJChpTwP.js} +2 -2
- package/dist/{chrome-CmQwGAuL.js → chrome-OTJg3QKn.js} +7 -7
- package/dist/{cli-qf0qK7oi.js → cli-DZAtyHzb.js} +45 -45
- package/dist/{client-DiPa71im.js → client-DH75FlQF.js} +1 -1
- package/dist/{commands-registry-CwXsDVuO.js → commands-registry-Ca5hh7nh.js} +1 -1
- package/dist/{completion-cli-Ddfrnilx.js → completion-cli-Cbf0-8ob.js} +12 -12
- package/dist/{config-BngIfn5l.js → config-B4jkreCN.js} +2 -2
- package/dist/{config-cli-JVGYyfYA.js → config-cli-D4RmoOxe.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-Bqz2Hvnf.js → configure-kaf3aurx.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 +159 -0
- 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-pZ_7Wzhj.js → cron-cli-VH_t2D1o.js} +7 -7
- package/dist/{daemon-cli-BDzcfcu_.js → daemon-cli-3PFXkheJ.js} +11 -11
- package/dist/{daemon-runtime-CKn0wmCk.js → daemon-runtime-DlQla_dA.js} +10 -10
- package/dist/{deliver-B04yNX82.js → deliver-BiWlR84Y.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-BIZbo_Pt.js → devices-cli-Bhi1rWnT.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-eh7aImCx.js → doctor-completion--j-3qqz6.js} +2 -2
- package/dist/{doctor-config-flow-ljVnQJjo.js → doctor-config-flow-C52W1uUK.js} +9 -9
- package/dist/{exec-approvals-cli-B2UY9dZC.js → exec-approvals-cli-xTOKcyZh.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-BwPy7u0B.js → gateway-cli-B3FuQctH.js} +98 -98
- package/dist/{gateway-rpc-DmFOiGIJ.js → gateway-rpc-C6lKFbor.js} +1 -1
- package/dist/{glass-ui-ws-CwOiILiY.js → glass-ui-ws-BJcI_IdV.js} +67 -67
- package/dist/{health-Bc1wmAO5.js → health-7UqIGG8U.js} +4 -4
- package/dist/{hooks-cli-DOjHV2fF.js → hooks-cli-D43GEG-W.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-CYFlhj51.js → logs-cli-BTU7zrkU.js} +7 -7
- package/dist/{manager-DuWp0CTD.js → manager-Cw7IJGbB.js} +15 -15
- package/dist/{manager-F0-SHT1B.js → manager-DbVMwpDc.js} +1 -1
- package/dist/{memory-fFc7GGPZ.js → memory-BZ24UkLW.js} +5 -5
- package/dist/{memory-cli-BnBKckEk.js → memory-cli-0HHYm-B8.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-DVdb_TUS.js → models-cli-C2EXmrYH.js} +55 -55
- package/dist/{models-config-DlXge3Sd.js → models-config-B5Xxy-c-.js} +8 -8
- package/dist/{node-cli-B0ePfMUr.js → node-cli-CWbA6YCw.js} +27 -27
- package/dist/{node-service-Cc18m-uk.js → node-service-BH08wY5j.js} +1 -1
- package/dist/{nodes-cli-L0gy-26E.js → nodes-cli-BfHcv62i.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-D6GZ2t-L.js → onboard-DnwWawQO.js} +15 -15
- package/dist/{onboard-channels-DVS9vciR.js → onboard-channels-qDThNkyj.js} +4 -4
- package/dist/{onboard-custom-DnDrvxSg.js → onboard-custom-BcRYreNG.js} +3 -3
- package/dist/{onboard-helpers-CJlheOSJ.js → onboard-helpers-7IGQ8nAM.js} +8 -8
- package/dist/{onboard-hooks-D9jHwImb.js → onboard-hooks-2SCajRKc.js} +1 -1
- package/dist/{onboard-remote-CVZ8l58S.js → onboard-remote-Dr75eqOQ.js} +1 -1
- package/dist/{onboard-skills-MgcaLiE6.js → onboard-skills-uO7HZwjc.js} +3 -3
- package/dist/{onboarding-D-mzwQ_f.js → onboarding-DxZAGVkD.js} +12 -12
- package/dist/{onboarding.finalize-DBFL76p0.js → onboarding.finalize-Dt-rcgpk.js} +31 -31
- package/dist/{onboarding.gateway-config-BCDgsFl8.js → onboarding.gateway-config-CkP7K4EN.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-KP94aK4z.js → plugin-registry-D2_TLnOr.js} +3 -3
- package/dist/{plugins-cli-B4ljapU5.js → plugins-cli-CqV1Q7ao.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-BzqGUxMS.js → program-context-B0ovpbFU.js} +40 -40
- package/dist/{prompt-select-styled-BVkRteee.js → prompt-select-styled-B5GrNfqR.js} +38 -38
- package/dist/{provider-auth-helpers-C6GjAO-s.js → provider-auth-helpers-DU8RlQz7.js} +6 -6
- package/dist/{push-apns-CbbWM63o.js → push-apns-CyAPMMJC.js} +4 -4
- package/dist/{pw-ai-CP5pn3eU.js → pw-ai-BiBvIJzd.js} +7 -7
- package/dist/{pw-ai-DLsdzdgc.js → pw-ai-DY_6l11g.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-DhS2lmWo.js → register.agent-BKbQhrre.js} +67 -67
- package/dist/{register.configure-ChjzXxh8.js → register.configure-C4_ShaQV.js} +70 -70
- package/dist/{register.maintenance-frHWf6Xs.js → register.maintenance-BOYWTu9C.js} +67 -67
- package/dist/{register.message-DWB4eVII.js → register.message-BtCthbpo.js} +47 -47
- package/dist/{register.onboard-4P8ud4Sw.js → register.onboard-D5GmuX8K.js} +25 -25
- package/dist/{register.setup-D0I7sEGc.js → register.setup-DzospfSf.js} +28 -28
- package/dist/{register.status-health-sessions-69Gigo_H.js → register.status-health-sessions-NVbWTQpZ.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-DTqyJZKO.js → rpc-B1czfnym.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-iJpHPABF.js → security-cli-l59T6lAJ.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-DHWxmfIu.js → server-methods-Bl41VzMu.js} +60 -60
- package/dist/{server-node-events-DHSiqnRS.js → server-node-events-CxYKzrbU.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-ISN-LC9F.js → status-D7QX7VDk.js} +23 -23
- package/dist/{status-DUbs9rVu.js → status-DrWy5OkC.js} +3 -3
- package/dist/{status.update-CKfyV6zw.js → status.update-DGJi0OLl.js} +3 -3
- package/dist/{symframe-cli-CPE5nxuJ.js → symframe-cli-BVmRLRid.js} +9 -9
- package/dist/{symi-root-DeCVdZB4.js → symi-root-BQ0IpoW2.js} +2 -2
- package/dist/{synthesis-CDPVZw2P.js → synthesis-CO5pr92g.js} +4 -4
- package/dist/{synthesis-DkHCk0El.js → synthesis-ts2nG0tK.js} +45 -45
- package/dist/{system-cli-nWJwLo85.js → system-cli-Du1GEeoO.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-ZL7IGA7l.js → tui-B2MY6Mj2.js} +7 -7
- package/dist/{tui-cli-CEpMtmhP.js → tui-cli-BMEnosW9.js} +19 -19
- package/dist/{unified-runner-CsadjpQa.js → unified-runner-4O0ifBsI.js} +101 -101
- package/dist/{unified-runner-Cppo8O8z.js → unified-runner-O3qR5Iie.js} +10 -10
- package/dist/{update-check-u6Jgr1cz.js → update-check-BCL_K7kx.js} +5 -5
- package/dist/{update-cli-48-Nah-Y.js → update-cli-BMURsYJU.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 +6 -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-BZ24UkLW.js";
|
|
56
|
+
import { a as parseGeminiAuth, c as resolveMemorySearchConfig, n as retryAsync, o as collectProviderApiKeysForExecution, s as executeWithApiKeyRotation } from "./manager-Cw7IJGbB.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-DH75FlQF.js";
|
|
66
|
+
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege } from "./call-AZ9vNhST.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-0HHYm-B8.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,
|
|
@@ -5834,7 +5834,7 @@ async function routeReply(params) {
|
|
|
5834
5834
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
5835
5835
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
5836
5836
|
try {
|
|
5837
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
5837
|
+
const { deliverOutboundPayloads } = await import("./deliver-lTZLIQqf.js").then((n) => n.n);
|
|
5838
5838
|
return {
|
|
5839
5839
|
ok: true,
|
|
5840
5840
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -11675,7 +11675,7 @@ var MediaAttachmentCache = class {
|
|
|
11675
11675
|
const size = await this.ensureLocalStat(entry);
|
|
11676
11676
|
if (entry.resolvedPath) {
|
|
11677
11677
|
if (size !== void 0 && size > params.maxBytes) throw new MediaUnderstandingSkipError("maxBytes", `Attachment ${params.attachmentIndex + 1} exceeds maxBytes ${params.maxBytes}`);
|
|
11678
|
-
const buffer = await
|
|
11678
|
+
const buffer = await fs$1.readFile(entry.resolvedPath);
|
|
11679
11679
|
entry.buffer = buffer;
|
|
11680
11680
|
entry.bufferMime = entry.bufferMime ?? entry.attachment.mime ?? await detectMime({
|
|
11681
11681
|
buffer,
|
|
@@ -11745,10 +11745,10 @@ var MediaAttachmentCache = class {
|
|
|
11745
11745
|
prefix: "symi-media",
|
|
11746
11746
|
extension: path.extname(bufferResult.fileName || "") || ""
|
|
11747
11747
|
});
|
|
11748
|
-
await
|
|
11748
|
+
await fs$1.writeFile(tmpPath, bufferResult.buffer);
|
|
11749
11749
|
entry.tempPath = tmpPath;
|
|
11750
11750
|
entry.tempCleanup = async () => {
|
|
11751
|
-
await
|
|
11751
|
+
await fs$1.unlink(tmpPath).catch(() => {});
|
|
11752
11752
|
};
|
|
11753
11753
|
return {
|
|
11754
11754
|
path: tmpPath,
|
|
@@ -11795,12 +11795,12 @@ var MediaAttachmentCache = class {
|
|
|
11795
11795
|
if (entry.statSize !== void 0) return entry.statSize;
|
|
11796
11796
|
try {
|
|
11797
11797
|
const currentPath = entry.resolvedPath;
|
|
11798
|
-
const stat = await
|
|
11798
|
+
const stat = await fs$1.stat(currentPath);
|
|
11799
11799
|
if (!stat.isFile()) {
|
|
11800
11800
|
entry.resolvedPath = void 0;
|
|
11801
11801
|
return;
|
|
11802
11802
|
}
|
|
11803
|
-
const canonicalPath = await
|
|
11803
|
+
const canonicalPath = await fs$1.realpath(currentPath).catch(() => currentPath);
|
|
11804
11804
|
if (!isInboundPathAllowed({
|
|
11805
11805
|
filePath: canonicalPath,
|
|
11806
11806
|
roots: await this.getCanonicalLocalPathRoots()
|
|
@@ -11822,7 +11822,7 @@ var MediaAttachmentCache = class {
|
|
|
11822
11822
|
if (this.canonicalLocalPathRoots) return await this.canonicalLocalPathRoots;
|
|
11823
11823
|
this.canonicalLocalPathRoots = (async () => mergeInboundPathRoots(this.localPathRoots, await Promise.all(this.localPathRoots.map(async (root) => {
|
|
11824
11824
|
if (root.includes("*")) return root;
|
|
11825
|
-
return await
|
|
11825
|
+
return await fs$1.realpath(root).catch(() => root);
|
|
11826
11826
|
}))))();
|
|
11827
11827
|
return await this.canonicalLocalPathRoots;
|
|
11828
11828
|
}
|
|
@@ -11893,7 +11893,7 @@ function formatAudioTranscripts(outputs) {
|
|
|
11893
11893
|
async function fileExists(filePath) {
|
|
11894
11894
|
if (!filePath) return false;
|
|
11895
11895
|
try {
|
|
11896
|
-
await
|
|
11896
|
+
await fs$1.stat(filePath);
|
|
11897
11897
|
return true;
|
|
11898
11898
|
} catch {
|
|
11899
11899
|
return false;
|
|
@@ -11993,7 +11993,7 @@ async function resolveCliOutput(params) {
|
|
|
11993
11993
|
const commandId = commandBase(params.command);
|
|
11994
11994
|
const fileOutput = commandId === "whisper-cli" ? resolveWhisperCppOutputPath(params.args) : commandId === "whisper" ? resolveWhisperOutputPath(params.args, params.mediaPath) : null;
|
|
11995
11995
|
if (fileOutput && await fileExists(fileOutput)) try {
|
|
11996
|
-
const content = await
|
|
11996
|
+
const content = await fs$1.readFile(fileOutput, "utf8");
|
|
11997
11997
|
if (content.trim()) return content.trim();
|
|
11998
11998
|
} catch {}
|
|
11999
11999
|
if (commandId === "gemini") {
|
|
@@ -12284,7 +12284,7 @@ async function runCliEntry(params) {
|
|
|
12284
12284
|
maxBytes,
|
|
12285
12285
|
timeoutMs
|
|
12286
12286
|
});
|
|
12287
|
-
const outputDir = await
|
|
12287
|
+
const outputDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-media-cli-"));
|
|
12288
12288
|
const mediaPath = pathResult.path;
|
|
12289
12289
|
const outputBase = path.join(outputDir, path.parse(mediaPath).name);
|
|
12290
12290
|
const templCtx = {
|
|
@@ -12318,7 +12318,7 @@ async function runCliEntry(params) {
|
|
|
12318
12318
|
model: command
|
|
12319
12319
|
};
|
|
12320
12320
|
} finally {
|
|
12321
|
-
await
|
|
12321
|
+
await fs$1.rm(outputDir, {
|
|
12322
12322
|
recursive: true,
|
|
12323
12323
|
force: true
|
|
12324
12324
|
}).catch(() => {});
|
|
@@ -12362,9 +12362,9 @@ function candidateBinaryNames(name) {
|
|
|
12362
12362
|
}
|
|
12363
12363
|
async function isExecutable$1(filePath) {
|
|
12364
12364
|
try {
|
|
12365
|
-
if (!(await
|
|
12365
|
+
if (!(await fs$1.stat(filePath)).isFile()) return false;
|
|
12366
12366
|
if (process.platform === "win32") return true;
|
|
12367
|
-
await
|
|
12367
|
+
await fs$1.access(filePath, constants.X_OK);
|
|
12368
12368
|
return true;
|
|
12369
12369
|
} catch {
|
|
12370
12370
|
return false;
|
|
@@ -14076,7 +14076,7 @@ async function createModelSelectionState(params) {
|
|
|
14076
14076
|
}
|
|
14077
14077
|
}
|
|
14078
14078
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
14079
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
14079
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-Ce7R_25e.js").then((n) => n.t);
|
|
14080
14080
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
14081
14081
|
const providerKey = normalizeProviderId(provider);
|
|
14082
14082
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -17220,7 +17220,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
17220
17220
|
cwd: process.cwd(),
|
|
17221
17221
|
root: params.sandbox.workspaceDir
|
|
17222
17222
|
});
|
|
17223
|
-
if (!(await
|
|
17223
|
+
if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
17224
17224
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
17225
17225
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
17226
17226
|
return {
|
|
@@ -18234,13 +18234,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
18234
18234
|
cwd: params.workdir,
|
|
18235
18235
|
root: params.workdir
|
|
18236
18236
|
});
|
|
18237
|
-
stat = await
|
|
18237
|
+
stat = await fs$1.stat(absPath);
|
|
18238
18238
|
} catch {
|
|
18239
18239
|
return;
|
|
18240
18240
|
}
|
|
18241
18241
|
if (!stat.isFile()) return;
|
|
18242
18242
|
if (stat.size > 512 * 1024) return;
|
|
18243
|
-
const content = await
|
|
18243
|
+
const content = await fs$1.readFile(absPath, "utf-8");
|
|
18244
18244
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
18245
18245
|
if (first) {
|
|
18246
18246
|
const idx = first.index;
|
|
@@ -22975,7 +22975,7 @@ async function handleCommands(params) {
|
|
|
22975
22975
|
try {
|
|
22976
22976
|
const messages = [];
|
|
22977
22977
|
if (sessionFile) {
|
|
22978
|
-
const content = await
|
|
22978
|
+
const content = await fs$1.readFile(sessionFile, "utf-8");
|
|
22979
22979
|
for (const line of content.split("\n")) {
|
|
22980
22980
|
if (!line.trim()) continue;
|
|
22981
22981
|
try {
|
|
@@ -25162,7 +25162,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25162
25162
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
25163
25163
|
throw new Error("jsonlPath outside allowed roots");
|
|
25164
25164
|
}
|
|
25165
|
-
const canonical = await
|
|
25165
|
+
const canonical = await fs$1.realpath(resolved).catch(() => resolved);
|
|
25166
25166
|
if (!isInboundPathAllowed({
|
|
25167
25167
|
filePath: canonical,
|
|
25168
25168
|
roots
|
|
@@ -25170,7 +25170,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
25170
25170
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
25171
25171
|
throw new Error("jsonlPath outside allowed roots");
|
|
25172
25172
|
}
|
|
25173
|
-
return await
|
|
25173
|
+
return await fs$1.readFile(canonical, "utf8");
|
|
25174
25174
|
}
|
|
25175
25175
|
const CanvasToolSchema = Type.Object({
|
|
25176
25176
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -26873,7 +26873,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
26873
26873
|
accountId: params.accountId
|
|
26874
26874
|
}),
|
|
26875
26875
|
sandboxValidated: true,
|
|
26876
|
-
readFile: (filePath) =>
|
|
26876
|
+
readFile: (filePath) => fs$1.readFile(filePath)
|
|
26877
26877
|
});
|
|
26878
26878
|
params.args.buffer = media.buffer.toString("base64");
|
|
26879
26879
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -33487,7 +33487,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
33487
33487
|
return;
|
|
33488
33488
|
}
|
|
33489
33489
|
try {
|
|
33490
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
33490
|
+
const { deliverOutboundPayloads } = await import("./deliver-lTZLIQqf.js").then((n) => n.n);
|
|
33491
33491
|
await deliverOutboundPayloads({
|
|
33492
33492
|
cfg: params.cfg,
|
|
33493
33493
|
channel,
|
|
@@ -33892,7 +33892,7 @@ async function stageSandboxMedia(params) {
|
|
|
33892
33892
|
};
|
|
33893
33893
|
try {
|
|
33894
33894
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
33895
|
-
await
|
|
33895
|
+
await fs$1.mkdir(destDir, { recursive: true });
|
|
33896
33896
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
33897
33897
|
cfg,
|
|
33898
33898
|
accountId: ctx.AccountId
|
|
@@ -33942,7 +33942,7 @@ async function stageSandboxMedia(params) {
|
|
|
33942
33942
|
usedNames.add(fileName);
|
|
33943
33943
|
const dest = path.join(destDir, fileName);
|
|
33944
33944
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
33945
|
-
else await
|
|
33945
|
+
else await fs$1.copyFile(source, dest);
|
|
33946
33946
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
33947
33947
|
staged.set(source, stagedPath);
|
|
33948
33948
|
}
|
|
@@ -39273,7 +39273,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
39273
39273
|
}
|
|
39274
39274
|
let commandsRegistry;
|
|
39275
39275
|
async function getCommandsRegistry() {
|
|
39276
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
39276
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Ca5hh7nh.js").then((n) => n.t);
|
|
39277
39277
|
return commandsRegistry;
|
|
39278
39278
|
}
|
|
39279
39279
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -39615,11 +39615,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39615
39615
|
const channelName = channelInfo?.name;
|
|
39616
39616
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
39617
39617
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
39618
|
-
import("./resolve-route-
|
|
39618
|
+
import("./resolve-route-C1IIA6kH.js").then((n) => n.r),
|
|
39619
39619
|
import("./inbound-context-B7Rvs8pK.js").then((n) => n.n),
|
|
39620
39620
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
39621
39621
|
]);
|
|
39622
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CffvEjpp.js").then((n) => n.t), import("./reply-prefix-
|
|
39622
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-CffvEjpp.js").then((n) => n.t), import("./reply-prefix-BFNeXT65.js").then((n) => n.n)]);
|
|
39623
39623
|
const route = resolveAgentRoute({
|
|
39624
39624
|
cfg,
|
|
39625
39625
|
channel: "slack",
|
|
@@ -39676,7 +39676,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39676
39676
|
});
|
|
39677
39677
|
const deliverSlashPayloads = async (replies) => {
|
|
39678
39678
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
39679
|
-
import("./replies-
|
|
39679
|
+
import("./replies-CbXXjn9X.js").then((n) => n.r),
|
|
39680
39680
|
import("./chunk-BxfKjCUx.js").then((n) => n.s),
|
|
39681
39681
|
import("./markdown-tables-CS1Tvb3z.js").then((n) => n.t)
|
|
39682
39682
|
]);
|
|
@@ -39731,7 +39731,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
39731
39731
|
let nativeCommands = [];
|
|
39732
39732
|
if (nativeEnabled) {
|
|
39733
39733
|
reg = await getCommandsRegistry();
|
|
39734
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
39734
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DDGGlq68.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
39735
39735
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
39736
39736
|
skillCommands,
|
|
39737
39737
|
provider: "slack"
|
|
@@ -40864,7 +40864,7 @@ function resolvePluginTools(params) {
|
|
|
40864
40864
|
//#endregion
|
|
40865
40865
|
//#region src/agents/apply-patch-update.ts
|
|
40866
40866
|
async function defaultReadFile(filePath) {
|
|
40867
|
-
return
|
|
40867
|
+
return fs$1.readFile(filePath, "utf8");
|
|
40868
40868
|
}
|
|
40869
40869
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
40870
40870
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -41108,10 +41108,10 @@ function resolvePatchFileOps(options) {
|
|
|
41108
41108
|
};
|
|
41109
41109
|
}
|
|
41110
41110
|
return {
|
|
41111
|
-
readFile: (filePath) =>
|
|
41112
|
-
writeFile: (filePath, content) =>
|
|
41113
|
-
remove: (filePath) =>
|
|
41114
|
-
mkdirp: (dir) =>
|
|
41111
|
+
readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
|
|
41112
|
+
writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
|
|
41113
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
41114
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
41115
41115
|
};
|
|
41116
41116
|
}
|
|
41117
41117
|
async function ensureDir(filePath, ops) {
|
|
@@ -42316,7 +42316,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
42316
42316
|
};
|
|
42317
42317
|
let content;
|
|
42318
42318
|
try {
|
|
42319
|
-
content = await
|
|
42319
|
+
content = await fs$1.readFile(sessionFile, "utf-8");
|
|
42320
42320
|
} catch (err) {
|
|
42321
42321
|
if (err?.code === "ENOENT") return {
|
|
42322
42322
|
repaired: false,
|
|
@@ -42364,15 +42364,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
42364
42364
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
42365
42365
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
42366
42366
|
try {
|
|
42367
|
-
const stat = await
|
|
42368
|
-
await
|
|
42369
|
-
if (stat) await
|
|
42370
|
-
await
|
|
42371
|
-
if (stat) await
|
|
42372
|
-
await
|
|
42367
|
+
const stat = await fs$1.stat(sessionFile).catch(() => null);
|
|
42368
|
+
await fs$1.writeFile(backupPath, content, "utf-8");
|
|
42369
|
+
if (stat) await fs$1.chmod(backupPath, stat.mode);
|
|
42370
|
+
await fs$1.writeFile(tmpPath, cleaned, "utf-8");
|
|
42371
|
+
if (stat) await fs$1.chmod(tmpPath, stat.mode);
|
|
42372
|
+
await fs$1.rename(tmpPath, sessionFile);
|
|
42373
42373
|
} catch (err) {
|
|
42374
42374
|
try {
|
|
42375
|
-
await
|
|
42375
|
+
await fs$1.unlink(tmpPath);
|
|
42376
42376
|
} catch (cleanupErr) {
|
|
42377
42377
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
42378
42378
|
}
|
|
@@ -43645,7 +43645,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
43645
43645
|
if (!isSessionManagerCacheEnabled()) return;
|
|
43646
43646
|
if (isSessionManagerCached(sessionFile)) return;
|
|
43647
43647
|
try {
|
|
43648
|
-
const handle = await
|
|
43648
|
+
const handle = await fs$1.open(sessionFile, "r");
|
|
43649
43649
|
try {
|
|
43650
43650
|
const buffer = Buffer$1.alloc(4096);
|
|
43651
43651
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -43785,7 +43785,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43785
43785
|
} catch (err) {
|
|
43786
43786
|
return fail(describeUnknownError(err));
|
|
43787
43787
|
}
|
|
43788
|
-
await
|
|
43788
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
43789
43789
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
43790
43790
|
const sandbox = await resolveSandboxContext({
|
|
43791
43791
|
config: params.config,
|
|
@@ -43793,7 +43793,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
43793
43793
|
workspaceDir: resolvedWorkspace
|
|
43794
43794
|
});
|
|
43795
43795
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
43796
|
-
await
|
|
43796
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
43797
43797
|
await ensureSessionHeader({
|
|
43798
43798
|
sessionFile: params.sessionFile,
|
|
43799
43799
|
sessionId: params.sessionId,
|
|
@@ -44118,12 +44118,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
44118
44118
|
const existing = writers.get(filePath);
|
|
44119
44119
|
if (existing) return existing;
|
|
44120
44120
|
const dir = path.dirname(filePath);
|
|
44121
|
-
const ready =
|
|
44121
|
+
const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
44122
44122
|
let queue = Promise.resolve();
|
|
44123
44123
|
const writer = {
|
|
44124
44124
|
filePath,
|
|
44125
44125
|
write: (line) => {
|
|
44126
|
-
queue = queue.then(() => ready).then(() =>
|
|
44126
|
+
queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
44127
44127
|
}
|
|
44128
44128
|
};
|
|
44129
44129
|
writers.set(filePath, writer);
|
|
@@ -47214,7 +47214,7 @@ Use the message tool with buttons:
|
|
|
47214
47214
|
*/
|
|
47215
47215
|
async function readSessionFile(sessionFile) {
|
|
47216
47216
|
try {
|
|
47217
|
-
return await
|
|
47217
|
+
return await fs$1.readFile(sessionFile, "utf-8");
|
|
47218
47218
|
} catch {
|
|
47219
47219
|
return null;
|
|
47220
47220
|
}
|
|
@@ -47223,8 +47223,8 @@ async function writeAtomically(sessionFile, text) {
|
|
|
47223
47223
|
const dir = path.dirname(sessionFile);
|
|
47224
47224
|
const base = path.basename(sessionFile);
|
|
47225
47225
|
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
47226
|
-
await
|
|
47227
|
-
await
|
|
47226
|
+
await fs$1.writeFile(tmp, text, "utf-8");
|
|
47227
|
+
await fs$1.rename(tmp, sessionFile);
|
|
47228
47228
|
}
|
|
47229
47229
|
/**
|
|
47230
47230
|
* Remove empty assistant JSONL entries from the session file.
|
|
@@ -47326,7 +47326,7 @@ function isInPoisonRange(version) {
|
|
|
47326
47326
|
*/
|
|
47327
47327
|
async function checkSessionPoison(sessionFile) {
|
|
47328
47328
|
try {
|
|
47329
|
-
const firstLine = (await
|
|
47329
|
+
const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
47330
47330
|
if (!firstLine) return null;
|
|
47331
47331
|
const header = JSON.parse(firstLine);
|
|
47332
47332
|
if (header.type !== "session") return null;
|
|
@@ -47344,7 +47344,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
47344
47344
|
*/
|
|
47345
47345
|
async function archivePoisonedSession(sessionFile) {
|
|
47346
47346
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
47347
|
-
await
|
|
47347
|
+
await fs$1.rename(sessionFile, archiveName);
|
|
47348
47348
|
return archiveName;
|
|
47349
47349
|
}
|
|
47350
47350
|
/**
|
|
@@ -47353,14 +47353,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
47353
47353
|
*/
|
|
47354
47354
|
async function stampSessionVersion(sessionFile) {
|
|
47355
47355
|
try {
|
|
47356
|
-
const lines = (await
|
|
47356
|
+
const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
|
|
47357
47357
|
if (lines.length === 0) return;
|
|
47358
47358
|
const header = JSON.parse(lines[0]);
|
|
47359
47359
|
if (header.type !== "session") return;
|
|
47360
47360
|
if (header.symiVersion === VERSION) return;
|
|
47361
47361
|
header.symiVersion = VERSION;
|
|
47362
47362
|
lines[0] = JSON.stringify(header);
|
|
47363
|
-
await
|
|
47363
|
+
await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
47364
47364
|
} catch {}
|
|
47365
47365
|
}
|
|
47366
47366
|
/**
|
|
@@ -47589,7 +47589,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
47589
47589
|
return;
|
|
47590
47590
|
}
|
|
47591
47591
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
47592
|
-
await
|
|
47592
|
+
await fs$1.writeFile(params.sessionFile, "", "utf-8");
|
|
47593
47593
|
sm.fileEntries = [header];
|
|
47594
47594
|
sm.byId?.clear?.();
|
|
47595
47595
|
sm.labelsById?.clear?.();
|
|
@@ -48147,7 +48147,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48147
48147
|
const prevCwd = process.cwd();
|
|
48148
48148
|
const runAbortController = new AbortController();
|
|
48149
48149
|
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"}`);
|
|
48150
|
-
await
|
|
48150
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
48151
48151
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
48152
48152
|
const sandbox = await resolveSandboxContext({
|
|
48153
48153
|
config: params.config,
|
|
@@ -48155,7 +48155,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48155
48155
|
workspaceDir: resolvedWorkspace
|
|
48156
48156
|
});
|
|
48157
48157
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
48158
|
-
await
|
|
48158
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
48159
48159
|
let restoreSkillEnv;
|
|
48160
48160
|
process.chdir(effectiveWorkspace);
|
|
48161
48161
|
try {
|
|
@@ -48364,7 +48364,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
48364
48364
|
sessionFile: params.sessionFile,
|
|
48365
48365
|
warn: (message) => log$7.warn(message)
|
|
48366
48366
|
});
|
|
48367
|
-
const hadSessionFile = await
|
|
48367
|
+
const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
48368
48368
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
48369
48369
|
modelApi: params.model?.api,
|
|
48370
48370
|
provider: params.provider,
|
|
@@ -49456,7 +49456,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
49456
49456
|
}
|
|
49457
49457
|
runLoopIterations += 1;
|
|
49458
49458
|
attemptedThinking.add(thinkLevel);
|
|
49459
|
-
await
|
|
49459
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
49460
49460
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
49461
49461
|
const attempt = await runEmbeddedAttempt({
|
|
49462
49462
|
sessionId: params.sessionId,
|