@symerian/symi 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-Cf7lxbx4.js → agents-DfyzZKBc.js} +4 -4
- package/dist/{agents.config-CsltNAhl.js → agents.config-Dzr8Us0l.js} +1 -1
- package/dist/{agents.config-aAHTt-cM.js → agents.config-VjZQr5GP.js} +1 -1
- package/dist/{audio-preflight-CPBOQV4I.js → audio-preflight-C40mKAp7.js} +4 -4
- package/dist/{auth-choice-Cy78Q2jy.js → auth-choice-BJPRC23V.js} +1 -1
- package/dist/{auth-choice-wU5fEl73.js → auth-choice-C01glnpg.js} +1 -1
- package/dist/{banner-BRzyFiIY.js → banner-B4wP-CCZ.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-up8R2ST5.js → channel-options-Bb2WRpn4.js} +1 -1
- package/dist/{channel-options-BcCKOiwh.js → channel-options-DRK05uet.js} +1 -1
- package/dist/{channel-web-CrH0yvww.js → channel-web-Cv1L-jTo.js} +1 -1
- package/dist/{channels-cli-BiHu6J16.js → channels-cli-CPvaBiNE.js} +4 -4
- package/dist/{channels-cli-DG3sTlC7.js → channels-cli-Dnwswsi2.js} +4 -4
- package/dist/{chrome-D2SKJnR7.js → chrome-CDJYxX5a.js} +7 -7
- package/dist/{cli-YBkGYxfg.js → cli-CgQySW2m.js} +1 -1
- package/dist/{cli-BUkGaPzi.js → cli-hT0g_Q65.js} +1 -1
- package/dist/{command-registry-YX9EbrJh.js → command-registry-D7MjQKMD.js} +9 -9
- package/dist/{completion-cli-DZf03KrT.js → completion-cli-BLYlpN4p.js} +1 -1
- package/dist/{completion-cli-Cm8iWdRA.js → completion-cli-Bcv09Yuh.js} +2 -2
- package/dist/{config-cli-1PDMhq8v.js → config-cli-CIkKTucr.js} +1 -1
- package/dist/{config-cli-Dx3mtUwm.js → config-cli-CtKkpyHu.js} +1 -1
- package/dist/{configure-DZn4tz03.js → configure-BP4M7T_e.js} +3 -3
- package/dist/{configure-DKN7f4VI.js → configure-Bhm7x3Ri.js} +3 -3
- package/dist/{deliver-C-37cZUe.js → deliver-BH0l3UKW.js} +1 -1
- package/dist/{doctor-completion--aLGEAgK.js → doctor-completion-DVs_xVw4.js} +1 -1
- package/dist/{doctor-completion-D4SLAoAE.js → doctor-completion-bTUb2Em4.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-ZbqwB66o.js → gateway-cli-BPf1OUhU.js} +9 -9
- package/dist/{gateway-cli-CMVvut5c.js → gateway-cli-CY_R8dGA.js} +9 -9
- package/dist/{glass-ui-ws-Bg6ek2Vs.js → glass-ui-ws-Cx9mt64o.js} +7 -7
- package/dist/{glass-ui-ws-Cykb9Xv4.js → glass-ui-ws-DMQldmwk.js} +7 -7
- package/dist/{health-BMKu3MJz.js → health-CM3gPoYN.js} +1 -1
- package/dist/{health-CGoPVhko.js → health-vuMM-FAs.js} +1 -1
- package/dist/{hooks-cli-CFtgfZBU.js → hooks-cli-B8kuyvML.js} +2 -2
- package/dist/{hooks-cli-CQUjUbF8.js → hooks-cli-tLOOQscu.js} +2 -2
- package/dist/{image-DcpMiprB.js → image-CHzdaNJ4.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{models-BPJ5Z5tU.js → models-CBtd5YaQ.js} +2 -2
- package/dist/{models-cli-D9miPqtu.js → models-cli-B8Fq0Of1.js} +2 -2
- package/dist/{models-cli-I7FIJUNa.js → models-cli-CIp8mElS.js} +3 -3
- package/dist/{onboard-CCZ5n-rI.js → onboard-CjSHwvTP.js} +2 -2
- package/dist/{onboard-BU6-iBln.js → onboard-DBCSZwxu.js} +2 -2
- package/dist/{onboard-channels-CaRYhl9J.js → onboard-channels-BgMpB9vX.js} +1 -1
- package/dist/{onboard-channels-B188R3F1.js → onboard-channels-eCCJophA.js} +1 -1
- package/dist/{onboarding-CNgU4kg8.js → onboarding-3iCiOVeb.js} +3 -3
- package/dist/{onboarding-Gsj-iMyY.js → onboarding-ztTrPGQa.js} +3 -3
- package/dist/{onboarding.finalize-C64KHESC.js → onboarding.finalize-DsOBEKtX.js} +6 -6
- package/dist/{onboarding.finalize-BvPgcu7R.js → onboarding.finalize-bcSfd4yw.js} +5 -5
- package/dist/{pi-embedded-DXSWVPEZ.js → pi-embedded-Ch-LcMWg.js} +107 -2
- package/dist/{pi-embedded-RoXbo73e.js → pi-embedded-CpI5F8DC.js} +121 -16
- package/dist/{pi-embedded-helpers-B8kqLWns.js → pi-embedded-helpers-lgx_U5KS.js} +4 -4
- package/dist/{plugin-registry-dNrBrnR0.js → plugin-registry-BfqJjw6d.js} +1 -1
- package/dist/{plugin-registry-ByLEBcK_.js → plugin-registry-CL--iTFl.js} +1 -1
- package/dist/plugin-sdk/{accounts-BtaOa4z_.js → accounts-BToL3HlP.js} +1 -1
- package/dist/plugin-sdk/{accounts-Ddm33hQm.js → accounts-D9zGZU5t.js} +3 -3
- package/dist/plugin-sdk/{accounts-s-AdhXVR.js → accounts-Dtszw3Zn.js} +1 -1
- package/dist/plugin-sdk/{active-listener-BXYeALs0.js → active-listener-bEk__wbB.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-CYYpcO9W.js → agent-scope-C3gMMKCU.js} +2 -2
- package/dist/plugin-sdk/agents/session-version.d.ts +48 -0
- package/dist/plugin-sdk/{api-key-rotation-D_sMvI5W.js → api-key-rotation-CVBMpnPc.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-VpItkiy3.js → audio-preflight-DoQQKlxa.js} +24 -24
- package/dist/plugin-sdk/{bindings-C7hRtgYW.js → bindings-BbwoUGPx.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-DoC1xtDu.js → channel-activity-Ji7f0gqq.js} +1 -1
- package/dist/plugin-sdk/{channel-web-Dn3ufSyq.js → channel-web-mO5qO05p.js} +22 -22
- package/dist/plugin-sdk/{chrome-B7RdxmJ0.js → chrome-C7c_0I5M.js} +3 -3
- package/dist/plugin-sdk/{chunk-Dw2XBYXv.js → chunk-jvk9axTQ.js} +1 -1
- package/dist/plugin-sdk/{command-format-GKSevep4.js → command-format-DSdvQ_M5.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-COIaslGl.js → commands-registry-CQFbmUMs.js} +4 -4
- package/dist/plugin-sdk/{config-KlTNfkFF.js → config-DDkdiUOR.js} +9 -9
- package/dist/plugin-sdk/{deliver-BZ99UKQq.js → deliver-BZ6iNLl7.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-05pm5Rxi.js → diagnostic-mFf4i4G9.js} +1 -1
- package/dist/plugin-sdk/{image-CLOPx7yW.js → image-BOYy0Ump.js} +4 -4
- package/dist/plugin-sdk/{image-ops-BlQR__MN.js → image-ops-Bnp6LXEx.js} +1 -1
- package/dist/plugin-sdk/index.js +53 -53
- package/dist/plugin-sdk/{ir-BJ6BHE5b.js → ir-Fb3qpcis.js} +4 -4
- package/dist/plugin-sdk/{local-roots-BHLNSI8U.js → local-roots-Ckk1QfzI.js} +3 -3
- package/dist/plugin-sdk/{login-DQMXuxOk.js → login-Bh3DZPam.js} +7 -7
- package/dist/plugin-sdk/{login-qr-BjVZSoCi.js → login-qr-DbR7odSr.js} +9 -9
- package/dist/plugin-sdk/{manager-CBSBFuFz.js → manager-DckktAQ3.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-CPnHl_K3.js → manifest-registry-B3ugY9-f.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-BoYFajMu.js → markdown-tables-Dfaqilz6.js} +1 -1
- package/dist/plugin-sdk/{message-channel-COTAJzHd.js → message-channel-BdI5Ra9S.js} +1 -1
- package/dist/plugin-sdk/{model-selection-CsbEfrS0.js → model-selection-OpU8HN50.js} +4 -4
- package/dist/plugin-sdk/{outbound-attachment-CnslKL38.js → outbound-attachment-DnVQfTG2.js} +2 -2
- package/dist/plugin-sdk/{outbound-B0e8KdaR.js → outbound-rF6G8Xpr.js} +7 -7
- package/dist/plugin-sdk/{pi-auth-json-qWi7ZIYV.js → pi-auth-json-CJk8t14T.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-CW630epe.js → pi-embedded-helpers-BveUP4hk.js} +17 -17
- package/dist/plugin-sdk/{plugins-BNByVCIH.js → plugins-BbAvhC25.js} +4 -4
- package/dist/plugin-sdk/{pw-ai-CnbPIPY9.js → pw-ai-DjGUsee-.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-CH0XbIHf.js → qmd-manager-mjKcdwVr.js} +4 -4
- package/dist/plugin-sdk/{registry-D0xTnUWt.js → registry--_pGht6S.js} +2 -2
- package/dist/plugin-sdk/{replies-LLcQL3w6.js → replies-fI39rPGa.js} +3 -3
- package/dist/plugin-sdk/{reply-DqjPcp_q.js → reply-B4uPw1l4.js} +183 -78
- package/dist/plugin-sdk/{reply-prefix-uxfMZW4p.js → reply-prefix-BHuV5t70.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-BiyAyTWz.js → resolve-outbound-target-BkCUbYGV.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-B3CCBumQ.js → resolve-route-D3JH_D2N.js} +3 -3
- package/dist/plugin-sdk/{retry-CwQ_iIj8.js → retry-ilSJqnz9.js} +1 -1
- package/dist/plugin-sdk/{runner-CGBT7tgF.js → runner-BVqnEfNe.js} +9 -9
- package/dist/plugin-sdk/{send-C5h_YxNb.js → send-BHbXh8Ly.js} +7 -7
- package/dist/plugin-sdk/{send-pYqe432l.js → send-BMfJIhCk.js} +6 -6
- package/dist/plugin-sdk/{send-B2CEnVLL.js → send-BtANzsAo.js} +6 -6
- package/dist/plugin-sdk/{send-CjOBB3Vo.js → send-Bxdu6ZZy.js} +10 -10
- package/dist/plugin-sdk/{send-CRsR8-vO.js → send-D6LMZJ_h.js} +10 -10
- package/dist/plugin-sdk/{session-BsOrxiMj.js → session-kI0tzViQ.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-ff_01_r3.js → skill-commands-DCNXVERE.js} +5 -5
- package/dist/plugin-sdk/{skills-_yTP47Cd.js → skills-B1GeRYlu.js} +7 -7
- package/dist/plugin-sdk/{sqlite-CxAR5ttJ.js → sqlite-Cq_7Cg4E.js} +1 -1
- package/dist/plugin-sdk/{store-BdrNabcU.js → store-Do3t33-c.js} +2 -2
- package/dist/plugin-sdk/{subsystem-B2uDN3TV.js → subsystem-Coz2AgU8.js} +1 -1
- package/dist/plugin-sdk/{tables-DNwXwNFa.js → tables-DR0NmBeH.js} +1 -1
- package/dist/plugin-sdk/{target-errors-Paro1BjP.js → target-errors-B7YyMnIi.js} +2 -2
- package/dist/plugin-sdk/{thinking-CXqf7WTe.js → thinking-DCNUIAHY.js} +5 -5
- package/dist/plugin-sdk/{tokens-bC3UVmVH.js → tokens-CWMflosr.js} +1 -1
- package/dist/plugin-sdk/{tool-images-HJ2sfZDV.js → tool-images-D7Lno-TE.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-BVA6fax-.js → tool-loop-detection-edmW8ZiF.js} +2 -2
- package/dist/plugin-sdk/web-BkEJ_MjB.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-DfseosPO.js → whatsapp-actions-CcBzDuL-.js} +21 -21
- package/dist/{plugins-cli-BJRG_tkQ.js → plugins-cli-DVLIR6IN.js} +2 -2
- package/dist/{plugins-cli-DPaKpbZ0.js → plugins-cli-MaXVJ6uV.js} +2 -2
- package/dist/{program-context-27mCl36z.js → program-context-C0vN6LYk.js} +17 -17
- package/dist/{program-DCyh129g.js → program-v4cRnLjP.js} +7 -7
- package/dist/{prompt-select-styled-JUdZMeZI.js → prompt-select-styled-CEmtUvNV.js} +4 -4
- package/dist/{prompt-select-styled-kpNeUDud.js → prompt-select-styled-D48W5rxp.js} +4 -4
- package/dist/{provider-auth-helpers-DyW_7UGQ.js → provider-auth-helpers-C4-EqP9W.js} +1 -1
- package/dist/{provider-auth-helpers-C9GRYN-o.js → provider-auth-helpers-CPbCxhvj.js} +1 -1
- package/dist/{push-apns-DSpV-UMg.js → push-apns-DpdcOumU.js} +1 -1
- package/dist/{push-apns-CZw1UMXk.js → push-apns-glbAu-g9.js} +1 -1
- package/dist/{pw-ai-1htA-NnS.js → pw-ai-De-KR9_s.js} +1 -1
- package/dist/{register.agent-B7jOO00w.js → register.agent-2jRwf1Rt.js} +5 -5
- package/dist/{register.agent-Dt-fGSRM.js → register.agent-DrocnT2d.js} +6 -6
- package/dist/{register.configure-BB1NVcZv.js → register.configure-DULdexW6.js} +6 -6
- package/dist/{register.configure-B4ssKdGP.js → register.configure-yy5Qb8fJ.js} +6 -6
- package/dist/{register.maintenance-ICQUl02l.js → register.maintenance-CI3D-c8a.js} +8 -8
- package/dist/{register.maintenance-B6JGjudV.js → register.maintenance-v_G9yCLf.js} +7 -7
- package/dist/{register.message-BEP0P-gF.js → register.message-DkwXioit.js} +2 -2
- package/dist/{register.message-B-hq0-gd.js → register.message-UoA7D74J.js} +2 -2
- package/dist/{register.onboard-Dgsu5_C8.js → register.onboard-D3qTCyiW.js} +4 -4
- package/dist/{register.onboard-CrgzRM5X.js → register.onboard-DFe3IAjB.js} +4 -4
- package/dist/{register.setup-B3pPkZ-g.js → register.setup-DO3vwGHY.js} +4 -4
- package/dist/{register.setup-C8xPuOMY.js → register.setup-DXT4OS3N.js} +4 -4
- package/dist/{register.status-health-sessions-DzM7DkCi.js → register.status-health-sessions-C5IRI7-t.js} +3 -3
- package/dist/{register.status-health-sessions-RqNzd4Pm.js → register.status-health-sessions-DGLfWuS4.js} +3 -3
- package/dist/{register.subclis-DcJgaLOK.js → register.subclis-PQ2Ulz3J.js} +9 -9
- package/dist/{reply-DiFKjgpz.js → reply-kuehpmXb.js} +107 -2
- package/dist/{run-main-Ck0iMwKh.js → run-main-BHKGY1KH.js} +14 -14
- package/dist/{runner-BcQ0sF9T.js → runner-DUBExAb5.js} +1 -1
- package/dist/{server-methods-pP1Q9SDn.js → server-methods-BHjqwsiI.js} +7 -7
- package/dist/{server-methods-CBQha8Aw.js → server-methods-rmWST_iV.js} +7 -7
- package/dist/{server-node-events-aW9AFIXA.js → server-node-events-KVX4S5Md.js} +2 -2
- package/dist/{server-node-events-CfY2QTYr.js → server-node-events-za7_iA-n.js} +2 -2
- package/dist/{status-iwhTBXbZ.js → status-BJITmlhZ.js} +2 -2
- package/dist/{status-DYp8kqmj.js → status-Bow6kS56.js} +2 -2
- package/dist/{status-BKc593Qu.js → status-CRuOmtVo.js} +1 -1
- package/dist/{status-BNOqNwMY.js → status-DJhmJYSu.js} +1 -1
- package/dist/{subagent-registry-yBrXpTO-.js → subagent-registry-BxM7J5m6.js} +107 -2
- package/dist/{update-cli-B8lS5-Z5.js → update-cli-BfGdSZRk.js} +8 -8
- package/dist/{update-cli-Cma87YH0.js → update-cli-Dqh498qQ.js} +7 -7
- package/dist/{update-runner-DZmjPgW-.js → update-runner-C0iELmzo.js} +1 -1
- package/dist/{update-runner-Cx6XjioC.js → update-runner-YRJPtj9J.js} +1 -1
- package/dist/{web-C5liFFox.js → web-9AS0DiSZ.js} +1 -1
- package/dist/{web-CycbZoQb.js → web-CVAyVZBT.js} +2 -2
- package/dist/{web-BWuN3c4n.js → web-CubghJNN.js} +1 -1
- package/dist/{web-B9ciy43q.js → web-DFqKskm8.js} +6 -6
- package/package.json +1 -1
- package/dist/plugin-sdk/web-GvAx9MMo.js +0 -65
|
@@ -55582,6 +55582,109 @@ function guardSessionManager(sessionManager, opts) {
|
|
|
55582
55582
|
return sessionManager;
|
|
55583
55583
|
}
|
|
55584
55584
|
|
|
55585
|
+
//#endregion
|
|
55586
|
+
//#region src/agents/session-version.ts
|
|
55587
|
+
/**
|
|
55588
|
+
* Session Versioning — version-based session migration.
|
|
55589
|
+
*
|
|
55590
|
+
* Each session gets a `symiVersion` field in its JSONL header.
|
|
55591
|
+
* On session load, if the session was created by a known-poison version
|
|
55592
|
+
* (2.3.0-2.3.4), it's archived and a fresh session starts.
|
|
55593
|
+
*
|
|
55594
|
+
* Sessions without `symiVersion` predate 2.3.0 and were created with Claude,
|
|
55595
|
+
* which does not produce corrupted tool args or looping output. Do NOT
|
|
55596
|
+
* archive unversioned sessions — they are safe. Only sessions with an
|
|
55597
|
+
* explicit symiVersion in the known-poison range are archived.
|
|
55598
|
+
*
|
|
55599
|
+
* @module
|
|
55600
|
+
*/
|
|
55601
|
+
/** Versions that produced corrupted sessions (tool arg garbage, looping). */
|
|
55602
|
+
const POISON_VERSION_MIN = [
|
|
55603
|
+
2,
|
|
55604
|
+
3,
|
|
55605
|
+
0
|
|
55606
|
+
];
|
|
55607
|
+
const POISON_VERSION_MAX = [
|
|
55608
|
+
2,
|
|
55609
|
+
3,
|
|
55610
|
+
4
|
|
55611
|
+
];
|
|
55612
|
+
function parseVersion(v) {
|
|
55613
|
+
return v.split(".").map((s) => parseInt(s, 10)).filter((n) => !Number.isNaN(n));
|
|
55614
|
+
}
|
|
55615
|
+
function compareVersions(a, b) {
|
|
55616
|
+
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
55617
|
+
const av = a[i] ?? 0;
|
|
55618
|
+
const bv = b[i] ?? 0;
|
|
55619
|
+
if (av < bv) return -1;
|
|
55620
|
+
if (av > bv) return 1;
|
|
55621
|
+
}
|
|
55622
|
+
return 0;
|
|
55623
|
+
}
|
|
55624
|
+
function isInPoisonRange(version) {
|
|
55625
|
+
const v = parseVersion(version);
|
|
55626
|
+
if (v.length < 3) return false;
|
|
55627
|
+
return compareVersions(v, POISON_VERSION_MIN) >= 0 && compareVersions(v, POISON_VERSION_MAX) <= 0;
|
|
55628
|
+
}
|
|
55629
|
+
/**
|
|
55630
|
+
* Check if a session file was created by a poisoned Symi version.
|
|
55631
|
+
* Returns the symiVersion if poisoned, null if safe.
|
|
55632
|
+
*/
|
|
55633
|
+
async function checkSessionPoison(sessionFile) {
|
|
55634
|
+
try {
|
|
55635
|
+
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
55636
|
+
if (!firstLine) return null;
|
|
55637
|
+
const header = JSON.parse(firstLine);
|
|
55638
|
+
if (header.type !== "session") return null;
|
|
55639
|
+
const symiVersion = header.symiVersion;
|
|
55640
|
+
if (typeof symiVersion !== "string") return null;
|
|
55641
|
+
if (isInPoisonRange(symiVersion)) return symiVersion;
|
|
55642
|
+
return null;
|
|
55643
|
+
} catch {
|
|
55644
|
+
return null;
|
|
55645
|
+
}
|
|
55646
|
+
}
|
|
55647
|
+
/**
|
|
55648
|
+
* Archive a poisoned session file by renaming it.
|
|
55649
|
+
* The archived file can be inspected later but won't be loaded.
|
|
55650
|
+
*/
|
|
55651
|
+
async function archivePoisonedSession(sessionFile) {
|
|
55652
|
+
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
55653
|
+
await fs.rename(sessionFile, archiveName);
|
|
55654
|
+
return archiveName;
|
|
55655
|
+
}
|
|
55656
|
+
/**
|
|
55657
|
+
* Stamp the current Symi version into a session file's header.
|
|
55658
|
+
* Reads the first line, adds/updates symiVersion, rewrites the line.
|
|
55659
|
+
*/
|
|
55660
|
+
async function stampSessionVersion(sessionFile) {
|
|
55661
|
+
try {
|
|
55662
|
+
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
55663
|
+
if (lines.length === 0) return;
|
|
55664
|
+
const header = JSON.parse(lines[0]);
|
|
55665
|
+
if (header.type !== "session") return;
|
|
55666
|
+
if (header.symiVersion === VERSION) return;
|
|
55667
|
+
header.symiVersion = VERSION;
|
|
55668
|
+
lines[0] = JSON.stringify(header);
|
|
55669
|
+
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
55670
|
+
} catch {}
|
|
55671
|
+
}
|
|
55672
|
+
/**
|
|
55673
|
+
* Check and handle a session file before use.
|
|
55674
|
+
* If poisoned: archive it and return { archived: true }.
|
|
55675
|
+
* Otherwise: stamp the current version and return { archived: false }.
|
|
55676
|
+
*/
|
|
55677
|
+
async function handleSessionVersion(sessionFile) {
|
|
55678
|
+
const poison = await checkSessionPoison(sessionFile);
|
|
55679
|
+
if (poison) return {
|
|
55680
|
+
archived: true,
|
|
55681
|
+
archivePath: await archivePoisonedSession(sessionFile),
|
|
55682
|
+
poisonVersion: poison
|
|
55683
|
+
};
|
|
55684
|
+
await stampSessionVersion(sessionFile);
|
|
55685
|
+
return { archived: false };
|
|
55686
|
+
}
|
|
55687
|
+
|
|
55585
55688
|
//#endregion
|
|
55586
55689
|
//#region src/agents/stream-monitor.ts
|
|
55587
55690
|
/**
|
|
@@ -58530,6 +58633,8 @@ async function runEmbeddedAttempt(params) {
|
|
|
58530
58633
|
provider: params.provider,
|
|
58531
58634
|
modelId: params.modelId
|
|
58532
58635
|
});
|
|
58636
|
+
const versionCheck = await handleSessionVersion(params.sessionFile);
|
|
58637
|
+
if (versionCheck.archived) log$4.warn(`session archived: created by ${versionCheck.poisonVersion}, known corruption range → ${versionCheck.archivePath}`);
|
|
58533
58638
|
await prewarmSessionFile(params.sessionFile);
|
|
58534
58639
|
sessionManager = guardSessionManager(SessionManager.open(params.sessionFile), {
|
|
58535
58640
|
agentId: sessionAgentId,
|
|
@@ -60201,7 +60306,7 @@ async function runAgentTurn(params) {
|
|
|
60201
60306
|
function createDefaultDeps() {
|
|
60202
60307
|
return {
|
|
60203
60308
|
sendMessageWhatsApp: async (...args) => {
|
|
60204
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
60309
|
+
const { sendMessageWhatsApp } = await import("./web-CubghJNN.js");
|
|
60205
60310
|
return await sendMessageWhatsApp(...args);
|
|
60206
60311
|
},
|
|
60207
60312
|
sendMessageTelegram: async (...args) => {
|
|
@@ -75481,7 +75586,7 @@ function loadWebLoginQr() {
|
|
|
75481
75586
|
return webLoginQrPromise;
|
|
75482
75587
|
}
|
|
75483
75588
|
function loadWebChannel() {
|
|
75484
|
-
webChannelPromise ??= import("./web-
|
|
75589
|
+
webChannelPromise ??= import("./web-CubghJNN.js");
|
|
75485
75590
|
return webChannelPromise;
|
|
75486
75591
|
}
|
|
75487
75592
|
function loadWhatsAppActions() {
|
|
@@ -14,7 +14,7 @@ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExis
|
|
|
14
14
|
import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
15
15
|
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-D-hWrHoH.js";
|
|
16
16
|
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-C1IYd3g7.js";
|
|
17
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
17
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-BH0l3UKW.js";
|
|
18
18
|
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-D0xmLpej.js";
|
|
19
19
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-C1vRJs5w.js";
|
|
20
20
|
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-8zZqL37v.js";
|
|
@@ -22,10 +22,10 @@ import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normali
|
|
|
22
22
|
import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-ByaQt43P.js";
|
|
23
23
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-j5tVLINv.js";
|
|
24
24
|
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-BQINJQIT.js";
|
|
25
|
-
import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
25
|
+
import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-lgx_U5KS.js";
|
|
26
26
|
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-BmV60pPT.js";
|
|
27
27
|
import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverSymiPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-D-mTF1cj.js";
|
|
28
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
28
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-CDJYxX5a.js";
|
|
29
29
|
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BNpGMnp-.js";
|
|
30
30
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-CPfngF0S.js";
|
|
31
31
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
|
|
@@ -36,7 +36,7 @@ import { t as resolveIMessageAccount } from "./accounts-DImOt9jX.js";
|
|
|
36
36
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DkMamAQ-.js";
|
|
37
37
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-C8Tqw4td.js";
|
|
38
38
|
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-ChC2CXaN.js";
|
|
39
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
39
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-CHzdaNJ4.js";
|
|
40
40
|
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-jpn5vRTY.js";
|
|
41
41
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-BNh23mUR.js";
|
|
42
42
|
import { n as retryAsync } from "./retry-QGp0jvVi.js";
|
|
@@ -49,7 +49,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-F0moAwIl.js";
|
|
|
49
49
|
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-C_aYUwpl.js";
|
|
50
50
|
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-DklY7Cj7.js";
|
|
51
51
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-QOi5vzUt.js";
|
|
52
|
-
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-
|
|
52
|
+
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-DUBExAb5.js";
|
|
53
53
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DtLn7YU3.js";
|
|
54
54
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DtXYsHEc.js";
|
|
55
55
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D9q-fIPB.js";
|
|
@@ -79,7 +79,7 @@ import { EdgeTTS } from "node-edge-tts";
|
|
|
79
79
|
import AjvPkg from "ajv";
|
|
80
80
|
import { createServer } from "node:http";
|
|
81
81
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
82
|
-
import WebSocket, { WebSocket
|
|
82
|
+
import WebSocket$1, { WebSocket } from "ws";
|
|
83
83
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
84
84
|
import { createJiti } from "jiti";
|
|
85
85
|
import { Type } from "@sinclair/typebox";
|
|
@@ -5714,7 +5714,7 @@ var GatewayClient = class {
|
|
|
5714
5714
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
5715
5715
|
});
|
|
5716
5716
|
}
|
|
5717
|
-
this.ws = new WebSocket
|
|
5717
|
+
this.ws = new WebSocket(url, wsOptions);
|
|
5718
5718
|
this.ws.on("open", () => {
|
|
5719
5719
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
5720
5720
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -5933,7 +5933,7 @@ var GatewayClient = class {
|
|
|
5933
5933
|
return null;
|
|
5934
5934
|
}
|
|
5935
5935
|
async request(method, params, opts) {
|
|
5936
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
5936
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
5937
5937
|
const id = randomUUID();
|
|
5938
5938
|
const frame = {
|
|
5939
5939
|
type: "req",
|
|
@@ -7199,7 +7199,7 @@ async function routeReply(params) {
|
|
|
7199
7199
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7200
7200
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7201
7201
|
try {
|
|
7202
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7202
|
+
const { deliverOutboundPayloads } = await import("./deliver-BH0l3UKW.js").then((n) => n.n);
|
|
7203
7203
|
return {
|
|
7204
7204
|
ok: true,
|
|
7205
7205
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -41673,7 +41673,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
41673
41673
|
return;
|
|
41674
41674
|
}
|
|
41675
41675
|
try {
|
|
41676
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
41676
|
+
const { deliverOutboundPayloads } = await import("./deliver-BH0l3UKW.js").then((n) => n.n);
|
|
41677
41677
|
await deliverOutboundPayloads({
|
|
41678
41678
|
cfg: params.cfg,
|
|
41679
41679
|
channel,
|
|
@@ -45119,7 +45119,7 @@ async function describeStickerImage(params) {
|
|
|
45119
45119
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
45120
45120
|
try {
|
|
45121
45121
|
const buffer = await fs$1.readFile(imagePath);
|
|
45122
|
-
const { describeImageWithModel } = await import("./image-
|
|
45122
|
+
const { describeImageWithModel } = await import("./image-CHzdaNJ4.js").then((n) => n.n);
|
|
45123
45123
|
return (await describeImageWithModel({
|
|
45124
45124
|
buffer,
|
|
45125
45125
|
fileName: "sticker.webp",
|
|
@@ -47781,7 +47781,7 @@ async function preflightDiscordMessage(params) {
|
|
|
47781
47781
|
let preflightTranscript;
|
|
47782
47782
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
47783
47783
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
47784
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
47784
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-C40mKAp7.js");
|
|
47785
47785
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
47786
47786
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
47787
47787
|
ctx: {
|
|
@@ -55580,6 +55580,109 @@ function guardSessionManager(sessionManager, opts) {
|
|
|
55580
55580
|
return sessionManager;
|
|
55581
55581
|
}
|
|
55582
55582
|
|
|
55583
|
+
//#endregion
|
|
55584
|
+
//#region src/agents/session-version.ts
|
|
55585
|
+
/**
|
|
55586
|
+
* Session Versioning — version-based session migration.
|
|
55587
|
+
*
|
|
55588
|
+
* Each session gets a `symiVersion` field in its JSONL header.
|
|
55589
|
+
* On session load, if the session was created by a known-poison version
|
|
55590
|
+
* (2.3.0-2.3.4), it's archived and a fresh session starts.
|
|
55591
|
+
*
|
|
55592
|
+
* Sessions without `symiVersion` predate 2.3.0 and were created with Claude,
|
|
55593
|
+
* which does not produce corrupted tool args or looping output. Do NOT
|
|
55594
|
+
* archive unversioned sessions — they are safe. Only sessions with an
|
|
55595
|
+
* explicit symiVersion in the known-poison range are archived.
|
|
55596
|
+
*
|
|
55597
|
+
* @module
|
|
55598
|
+
*/
|
|
55599
|
+
/** Versions that produced corrupted sessions (tool arg garbage, looping). */
|
|
55600
|
+
const POISON_VERSION_MIN = [
|
|
55601
|
+
2,
|
|
55602
|
+
3,
|
|
55603
|
+
0
|
|
55604
|
+
];
|
|
55605
|
+
const POISON_VERSION_MAX = [
|
|
55606
|
+
2,
|
|
55607
|
+
3,
|
|
55608
|
+
4
|
|
55609
|
+
];
|
|
55610
|
+
function parseVersion(v) {
|
|
55611
|
+
return v.split(".").map((s) => parseInt(s, 10)).filter((n) => !Number.isNaN(n));
|
|
55612
|
+
}
|
|
55613
|
+
function compareVersions(a, b) {
|
|
55614
|
+
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
55615
|
+
const av = a[i] ?? 0;
|
|
55616
|
+
const bv = b[i] ?? 0;
|
|
55617
|
+
if (av < bv) return -1;
|
|
55618
|
+
if (av > bv) return 1;
|
|
55619
|
+
}
|
|
55620
|
+
return 0;
|
|
55621
|
+
}
|
|
55622
|
+
function isInPoisonRange(version) {
|
|
55623
|
+
const v = parseVersion(version);
|
|
55624
|
+
if (v.length < 3) return false;
|
|
55625
|
+
return compareVersions(v, POISON_VERSION_MIN) >= 0 && compareVersions(v, POISON_VERSION_MAX) <= 0;
|
|
55626
|
+
}
|
|
55627
|
+
/**
|
|
55628
|
+
* Check if a session file was created by a poisoned Symi version.
|
|
55629
|
+
* Returns the symiVersion if poisoned, null if safe.
|
|
55630
|
+
*/
|
|
55631
|
+
async function checkSessionPoison(sessionFile) {
|
|
55632
|
+
try {
|
|
55633
|
+
const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
55634
|
+
if (!firstLine) return null;
|
|
55635
|
+
const header = JSON.parse(firstLine);
|
|
55636
|
+
if (header.type !== "session") return null;
|
|
55637
|
+
const symiVersion = header.symiVersion;
|
|
55638
|
+
if (typeof symiVersion !== "string") return null;
|
|
55639
|
+
if (isInPoisonRange(symiVersion)) return symiVersion;
|
|
55640
|
+
return null;
|
|
55641
|
+
} catch {
|
|
55642
|
+
return null;
|
|
55643
|
+
}
|
|
55644
|
+
}
|
|
55645
|
+
/**
|
|
55646
|
+
* Archive a poisoned session file by renaming it.
|
|
55647
|
+
* The archived file can be inspected later but won't be loaded.
|
|
55648
|
+
*/
|
|
55649
|
+
async function archivePoisonedSession(sessionFile) {
|
|
55650
|
+
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
55651
|
+
await fs$1.rename(sessionFile, archiveName);
|
|
55652
|
+
return archiveName;
|
|
55653
|
+
}
|
|
55654
|
+
/**
|
|
55655
|
+
* Stamp the current Symi version into a session file's header.
|
|
55656
|
+
* Reads the first line, adds/updates symiVersion, rewrites the line.
|
|
55657
|
+
*/
|
|
55658
|
+
async function stampSessionVersion(sessionFile) {
|
|
55659
|
+
try {
|
|
55660
|
+
const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
|
|
55661
|
+
if (lines.length === 0) return;
|
|
55662
|
+
const header = JSON.parse(lines[0]);
|
|
55663
|
+
if (header.type !== "session") return;
|
|
55664
|
+
if (header.symiVersion === VERSION) return;
|
|
55665
|
+
header.symiVersion = VERSION;
|
|
55666
|
+
lines[0] = JSON.stringify(header);
|
|
55667
|
+
await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
55668
|
+
} catch {}
|
|
55669
|
+
}
|
|
55670
|
+
/**
|
|
55671
|
+
* Check and handle a session file before use.
|
|
55672
|
+
* If poisoned: archive it and return { archived: true }.
|
|
55673
|
+
* Otherwise: stamp the current version and return { archived: false }.
|
|
55674
|
+
*/
|
|
55675
|
+
async function handleSessionVersion(sessionFile) {
|
|
55676
|
+
const poison = await checkSessionPoison(sessionFile);
|
|
55677
|
+
if (poison) return {
|
|
55678
|
+
archived: true,
|
|
55679
|
+
archivePath: await archivePoisonedSession(sessionFile),
|
|
55680
|
+
poisonVersion: poison
|
|
55681
|
+
};
|
|
55682
|
+
await stampSessionVersion(sessionFile);
|
|
55683
|
+
return { archived: false };
|
|
55684
|
+
}
|
|
55685
|
+
|
|
55583
55686
|
//#endregion
|
|
55584
55687
|
//#region src/agents/stream-monitor.ts
|
|
55585
55688
|
/**
|
|
@@ -58528,6 +58631,8 @@ async function runEmbeddedAttempt(params) {
|
|
|
58528
58631
|
provider: params.provider,
|
|
58529
58632
|
modelId: params.modelId
|
|
58530
58633
|
});
|
|
58634
|
+
const versionCheck = await handleSessionVersion(params.sessionFile);
|
|
58635
|
+
if (versionCheck.archived) log$4.warn(`session archived: created by ${versionCheck.poisonVersion}, known corruption range → ${versionCheck.archivePath}`);
|
|
58531
58636
|
await prewarmSessionFile(params.sessionFile);
|
|
58532
58637
|
sessionManager = guardSessionManager(SessionManager.open(params.sessionFile), {
|
|
58533
58638
|
agentId: sessionAgentId,
|
|
@@ -60199,7 +60304,7 @@ async function runAgentTurn(params) {
|
|
|
60199
60304
|
function createDefaultDeps() {
|
|
60200
60305
|
return {
|
|
60201
60306
|
sendMessageWhatsApp: async (...args) => {
|
|
60202
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
60307
|
+
const { sendMessageWhatsApp } = await import("./web-DFqKskm8.js");
|
|
60203
60308
|
return await sendMessageWhatsApp(...args);
|
|
60204
60309
|
},
|
|
60205
60310
|
sendMessageTelegram: async (...args) => {
|
|
@@ -63104,7 +63209,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
63104
63209
|
super(options);
|
|
63105
63210
|
}
|
|
63106
63211
|
createWebSocket(url) {
|
|
63107
|
-
return new WebSocket(url, { agent });
|
|
63212
|
+
return new WebSocket$1(url, { agent });
|
|
63108
63213
|
}
|
|
63109
63214
|
}
|
|
63110
63215
|
return new ProxyGatewayPlugin();
|
|
@@ -73322,7 +73427,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
73322
73427
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
73323
73428
|
let preflightTranscript;
|
|
73324
73429
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
73325
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
73430
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-C40mKAp7.js");
|
|
73326
73431
|
preflightTranscript = await transcribeFirstAudio({
|
|
73327
73432
|
ctx: {
|
|
73328
73433
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -75479,7 +75584,7 @@ function loadWebLoginQr() {
|
|
|
75479
75584
|
return webLoginQrPromise;
|
|
75480
75585
|
}
|
|
75481
75586
|
function loadWebChannel() {
|
|
75482
|
-
webChannelPromise ??= import("./web-
|
|
75587
|
+
webChannelPromise ??= import("./web-DFqKskm8.js");
|
|
75483
75588
|
return webChannelPromise;
|
|
75484
75589
|
}
|
|
75485
75590
|
function loadWhatsAppActions() {
|
|
@@ -10,7 +10,7 @@ import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
|
10
10
|
import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-ByaQt43P.js";
|
|
11
11
|
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-BQINJQIT.js";
|
|
12
12
|
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-BmV60pPT.js";
|
|
13
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
13
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-CDJYxX5a.js";
|
|
14
14
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-BNpGMnp-.js";
|
|
15
15
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-CPfngF0S.js";
|
|
16
16
|
import { t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
|
|
@@ -931,7 +931,7 @@ function isModuleNotFoundError(err) {
|
|
|
931
931
|
}
|
|
932
932
|
async function loadPwAiModule(mode) {
|
|
933
933
|
try {
|
|
934
|
-
return await import("./pw-ai-
|
|
934
|
+
return await import("./pw-ai-De-KR9_s.js");
|
|
935
935
|
} catch (err) {
|
|
936
936
|
if (mode === "soft") return null;
|
|
937
937
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3471,11 +3471,11 @@ function createProfileContext(opts, profile) {
|
|
|
3471
3471
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3472
3472
|
const profileState = getProfileState();
|
|
3473
3473
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3474
|
-
await (await import("./pw-ai-
|
|
3474
|
+
await (await import("./pw-ai-De-KR9_s.js")).closePlaywrightBrowserConnection();
|
|
3475
3475
|
} catch {}
|
|
3476
3476
|
if (profileState.running) await stopRunningBrowser();
|
|
3477
3477
|
try {
|
|
3478
|
-
await (await import("./pw-ai-
|
|
3478
|
+
await (await import("./pw-ai-De-KR9_s.js")).closePlaywrightBrowserConnection();
|
|
3479
3479
|
} catch {}
|
|
3480
3480
|
if (!fs.existsSync(userDataDir)) return {
|
|
3481
3481
|
moved: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { ft as loadSymiPlugins } from "./reply-
|
|
2
|
+
import { ft as loadSymiPlugins } from "./reply-kuehpmXb.js";
|
|
3
3
|
import { d as getActivePluginRegistry } from "./registry-Cja8eT7G.js";
|
|
4
4
|
import { t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
|
|
5
5
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-CgUHAtCo.js";
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
|
2
2
|
import { M as getActivePluginRegistry, o as createSubsystemLogger } from "./entry.js";
|
|
3
3
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-D-jRCY0d.js";
|
|
4
4
|
import { i as loadConfig } from "./config-DHBLS1Hl.js";
|
|
5
|
-
import { m as loadSymiPlugins } from "./subagent-registry-
|
|
5
|
+
import { m as loadSymiPlugins } from "./subagent-registry-BxM7J5m6.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/plugin-registry.ts
|
|
8
8
|
var plugin_registry_exports = /* @__PURE__ */ __exportAll({ ensurePluginRegistryLoaded: () => ensurePluginRegistryLoaded });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
|
-
import { _ as createAccountListHelpers } from "./accounts-
|
|
2
|
+
import { _ as createAccountListHelpers } from "./accounts-D9zGZU5t.js";
|
|
3
3
|
|
|
4
4
|
//#region src/signal/accounts.ts
|
|
5
5
|
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("signal");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { a as resolveOAuthDir } from "./paths-DR2yt_mP.js";
|
|
3
|
-
import { P as resolveUserPath, W as info, X as success, k as jidToE164, tt as getChildLogger } from "./registry
|
|
4
|
-
import { i as defaultRuntime } from "./subsystem-
|
|
5
|
-
import { t as formatCliCommand } from "./command-format-
|
|
3
|
+
import { P as resolveUserPath, W as info, X as success, k as jidToE164, tt as getChildLogger } from "./registry--_pGht6S.js";
|
|
4
|
+
import { i as defaultRuntime } from "./subsystem-Coz2AgU8.js";
|
|
5
|
+
import { t as formatCliCommand } from "./command-format-DSdvQ_M5.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs$1 from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
|
-
import { _ as createAccountListHelpers } from "./accounts-
|
|
2
|
+
import { _ as createAccountListHelpers } from "./accounts-D9zGZU5t.js";
|
|
3
3
|
|
|
4
4
|
//#region src/imessage/accounts.ts
|
|
5
5
|
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("imessage");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as DEFAULT_ACCOUNT_ID } from "./session-key-C_0eELjb.js";
|
|
2
|
-
import { t as formatCliCommand } from "./command-format-
|
|
2
|
+
import { t as formatCliCommand } from "./command-format-DSdvQ_M5.js";
|
|
3
3
|
|
|
4
4
|
//#region src/web/active-listener.ts
|
|
5
5
|
const listeners = /* @__PURE__ */ new Map();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as isCronSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-DR2yt_mP.js";
|
|
3
|
-
import { P as resolveUserPath, U as danger, W as info, Y as shouldLogVerbose, Z as warn, j as pathExists, nt as getLogger, q as logVerboseConsole } from "./registry
|
|
4
|
-
import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
3
|
+
import { P as resolveUserPath, U as danger, W as info, Y as shouldLogVerbose, Z as warn, j as pathExists, nt as getLogger, q as logVerboseConsole } from "./registry--_pGht6S.js";
|
|
4
|
+
import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Coz2AgU8.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import os from "node:os";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Versioning — version-based session migration.
|
|
3
|
+
*
|
|
4
|
+
* Each session gets a `symiVersion` field in its JSONL header.
|
|
5
|
+
* On session load, if the session was created by a known-poison version
|
|
6
|
+
* (2.3.0-2.3.4), it's archived and a fresh session starts.
|
|
7
|
+
*
|
|
8
|
+
* Sessions without `symiVersion` predate 2.3.0 and were created with Claude,
|
|
9
|
+
* which does not produce corrupted tool args or looping output. Do NOT
|
|
10
|
+
* archive unversioned sessions — they are safe. Only sessions with an
|
|
11
|
+
* explicit symiVersion in the known-poison range are archived.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
declare function parseVersion(v: string): number[];
|
|
16
|
+
declare function compareVersions(a: number[], b: number[]): number;
|
|
17
|
+
declare function isInPoisonRange(version: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Check if a session file was created by a poisoned Symi version.
|
|
20
|
+
* Returns the symiVersion if poisoned, null if safe.
|
|
21
|
+
*/
|
|
22
|
+
export declare function checkSessionPoison(sessionFile: string): Promise<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Archive a poisoned session file by renaming it.
|
|
25
|
+
* The archived file can be inspected later but won't be loaded.
|
|
26
|
+
*/
|
|
27
|
+
export declare function archivePoisonedSession(sessionFile: string): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Stamp the current Symi version into a session file's header.
|
|
30
|
+
* Reads the first line, adds/updates symiVersion, rewrites the line.
|
|
31
|
+
*/
|
|
32
|
+
export declare function stampSessionVersion(sessionFile: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Check and handle a session file before use.
|
|
35
|
+
* If poisoned: archive it and return { archived: true }.
|
|
36
|
+
* Otherwise: stamp the current version and return { archived: false }.
|
|
37
|
+
*/
|
|
38
|
+
export declare function handleSessionVersion(sessionFile: string): Promise<{
|
|
39
|
+
archived: boolean;
|
|
40
|
+
archivePath?: string;
|
|
41
|
+
poisonVersion?: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const __testing: {
|
|
44
|
+
isInPoisonRange: typeof isInPoisonRange;
|
|
45
|
+
parseVersion: typeof parseVersion;
|
|
46
|
+
compareVersions: typeof compareVersions;
|
|
47
|
+
};
|
|
48
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import "./accounts-
|
|
1
|
+
import "./accounts-D9zGZU5t.js";
|
|
2
2
|
import "./paths-DR2yt_mP.js";
|
|
3
3
|
import "./github-copilot-token-D9X2phUj.js";
|
|
4
|
-
import "./plugins-
|
|
5
|
-
import { K as logVerbose, Y as shouldLogVerbose } from "./registry
|
|
6
|
-
import "./config-
|
|
7
|
-
import "./subsystem-
|
|
8
|
-
import "./command-format-
|
|
9
|
-
import "./model-selection-
|
|
10
|
-
import "./agent-scope-
|
|
11
|
-
import "./manifest-registry-
|
|
4
|
+
import "./plugins-BbAvhC25.js";
|
|
5
|
+
import { K as logVerbose, Y as shouldLogVerbose } from "./registry--_pGht6S.js";
|
|
6
|
+
import "./config-DDkdiUOR.js";
|
|
7
|
+
import "./subsystem-Coz2AgU8.js";
|
|
8
|
+
import "./command-format-DSdvQ_M5.js";
|
|
9
|
+
import "./model-selection-OpU8HN50.js";
|
|
10
|
+
import "./agent-scope-C3gMMKCU.js";
|
|
11
|
+
import "./manifest-registry-B3ugY9-f.js";
|
|
12
12
|
import "./redact-DPnDWsnT.js";
|
|
13
13
|
import "./errors-Bv8oZiTO.js";
|
|
14
|
-
import "./image-ops-
|
|
14
|
+
import "./image-ops-Bnp6LXEx.js";
|
|
15
15
|
import "./ssrf-DKZ8eBrk.js";
|
|
16
|
-
import "./local-roots-
|
|
17
|
-
import "./message-channel-
|
|
18
|
-
import "./bindings-
|
|
19
|
-
import "./tool-images-
|
|
20
|
-
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-
|
|
21
|
-
import "./skills-
|
|
22
|
-
import "./chrome-
|
|
23
|
-
import "./thinking-
|
|
24
|
-
import "./accounts-
|
|
25
|
-
import "./accounts-
|
|
26
|
-
import "./pi-embedded-helpers-
|
|
16
|
+
import "./local-roots-Ckk1QfzI.js";
|
|
17
|
+
import "./message-channel-BdI5Ra9S.js";
|
|
18
|
+
import "./bindings-BbwoUGPx.js";
|
|
19
|
+
import "./tool-images-D7Lno-TE.js";
|
|
20
|
+
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-BVqnEfNe.js";
|
|
21
|
+
import "./skills-B1GeRYlu.js";
|
|
22
|
+
import "./chrome-C7c_0I5M.js";
|
|
23
|
+
import "./thinking-DCNUIAHY.js";
|
|
24
|
+
import "./accounts-Dtszw3Zn.js";
|
|
25
|
+
import "./accounts-BToL3HlP.js";
|
|
26
|
+
import "./pi-embedded-helpers-BveUP4hk.js";
|
|
27
27
|
import "./paths-A0xdf3yk.js";
|
|
28
|
-
import "./store-
|
|
29
|
-
import "./image-
|
|
28
|
+
import "./store-Do3t33-c.js";
|
|
29
|
+
import "./image-BOYy0Ump.js";
|
|
30
30
|
import "./pi-model-discovery-LbcEa65a.js";
|
|
31
|
-
import "./api-key-rotation-
|
|
31
|
+
import "./api-key-rotation-CVBMpnPc.js";
|
|
32
32
|
|
|
33
33
|
//#region src/media-understanding/audio-preflight.ts
|
|
34
34
|
/**
|