@symerian/symi 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-ChTFYj8Q.js → accounts-CWktKM8a.js} +1 -1
- package/dist/{accounts-CJR8j_Kq.js → accounts-qtxJ-6em.js} +1 -1
- package/dist/{accounts-CI6zQTJj.js → accounts-tNElYrCH.js} +14 -14
- package/dist/{active-listener-D6sXIjAg.js → active-listener-C9r8ZB9m.js} +1 -1
- package/dist/{agent-scope-Bw1Ed8W9.js → agent-scope-BxoUQqgM.js} +3 -3
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-CPBOQV4I.js} +4 -4
- package/dist/{audio-preflight-BkIfnmpi.js → audio-preflight-O3ASWbaG.js} +29 -29
- package/dist/{bindings-BU2hsBd9.js → bindings-B7Ke6LJi.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +53 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-C9-gaquj.js → channel-activity-CsM_hJ_s.js} +1 -1
- package/dist/{chrome-CxSAp8x3.js → chrome-BFekevcE.js} +20 -20
- package/dist/{chrome-CDJYxX5a.js → chrome-D2SKJnR7.js} +7 -7
- package/dist/{chunk-ClbN9Pqy.js → chunk-BW5f05BR.js} +1 -1
- package/dist/{command-format-UKHV-j0K.js → command-format-BaxDnULz.js} +1 -1
- package/dist/{command-registry-DXt0PsFy.js → command-registry-CsDAPQfS.js} +4 -4
- package/dist/{commands-registry-VSmULp-g.js → commands-registry-D7CTCQPm.js} +4 -4
- package/dist/{completion-cli-BsSDzZNA.js → completion-cli-B_f5PMBc.js} +1 -1
- package/dist/{completion-cli-CPMOXTf2.js → completion-cli-CSdjFWHy.js} +2 -2
- package/dist/{config-eEaJddXj.js → config-DRbjHIwD.js} +12 -12
- package/dist/{deliver-BH0l3UKW.js → deliver-C-37cZUe.js} +1 -1
- package/dist/{deliver-BA7ZN3iM.js → deliver-CvCK5Mm9.js} +20 -20
- package/dist/{diagnostic-C3nsWaw3.js → diagnostic-CI0kRQkt.js} +1 -1
- package/dist/{doctor-completion-8qbLmeX0.js → doctor-completion-BWJvfjTC.js} +1 -1
- package/dist/{doctor-completion-Dnxn_-ov.js → doctor-completion-llX6EnGy.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{frontmatter-DPlG6yha.js → frontmatter-C_bv_0P8.js} +2 -2
- package/dist/{gateway-cli-XIsXoJZ3.js → gateway-cli-70k2-I4K.js} +12 -8
- package/dist/{gateway-cli-DKDpOBp-.js → gateway-cli-BApdH1bD.js} +12 -8
- package/dist/{gemini-auth-CF48hUR9.js → gemini-auth-CdSPHuLl.js} +1 -1
- package/dist/{github-copilot-token-DJqsJ2-r.js → github-copilot-token-C_qUP7p5.js} +7 -7
- package/dist/{image-BGmVDkkw.js → image-B0wGflxA.js} +4 -4
- package/dist/{image-CHzdaNJ4.js → image-DcpMiprB.js} +1 -1
- package/dist/{image-ops-S8-8dAhx.js → image-ops-CvJzsyvE.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{ir-CbFUkv_T.js → ir-DccrnjsE.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-C7OCYACU.js → local-roots-DMwIh5cS.js} +5 -5
- package/dist/{login-B8uiUAnV.js → login-CwCoxapk.js} +7 -7
- package/dist/{login-qr-CIZk8uKX.js → login-qr-Batf3PT5.js} +12 -12
- package/dist/{manager-BoLr3xR_.js → manager-D_LwXbc6.js} +13 -13
- package/dist/{manifest-registry-CneMHk0N.js → manifest-registry-D0IQ3WuX.js} +19 -19
- package/dist/{markdown-tables-DSHvnTLx.js → markdown-tables-iMQQZu4Q.js} +1 -1
- package/dist/{message-channel-DbsRltF2.js → message-channel-Dz5lr5b0.js} +1 -1
- package/dist/{model-auth-CwOuTuXl.js → model-auth-DK43VicI.js} +9 -9
- package/dist/{onboard-CXOUIg28.js → onboard-1wGdR0wt.js} +1 -1
- package/dist/{onboard-DBeHwdks.js → onboard-nQYq_dsr.js} +1 -1
- package/dist/{onboarding-Dfjn2-9q.js → onboarding-Peg7PNOz.js} +1 -1
- package/dist/{onboarding-C58wjONa.js → onboarding-gQRA57l_.js} +1 -1
- package/dist/{onboarding.finalize-7r1HYXWd.js → onboarding.finalize-C4DSBMrV.js} +4 -4
- package/dist/{onboarding.finalize-DGD56sXW.js → onboarding.finalize-D26o-hBA.js} +3 -3
- package/dist/{outbound-opDNxv-l.js → outbound-D4fN_ZlE.js} +7 -7
- package/dist/{outbound-attachment-Co2diKdP.js → outbound-attachment-DjNDa3zn.js} +2 -2
- package/dist/{paths-CySxpNhH.js → paths-Cce4PUkG.js} +5 -5
- package/dist/{paths-Cb87-LzP.js → paths-DLyHUt31.js} +1 -1
- package/dist/{pi-auth-json-DPWPoruO.js → pi-auth-json-0SYBFZTt.js} +8 -8
- package/dist/{pi-embedded-CAJ6egA1.js → pi-embedded-CfxhTbYF.js} +16 -16
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-B8kqLWns.js} +4 -4
- package/dist/{pi-embedded-helpers-DEEaCvEp.js → pi-embedded-helpers-DLFjnVBb.js} +52 -52
- package/dist/{pi-embedded-B6uRrG1f.js → pi-embedded-k69DSy1Y.js} +162 -162
- package/dist/{plugins-C4C9637U.js → plugins-DQYI3Fr-.js} +9 -9
- package/dist/{program-CutjuJj0.js → program-Bx47hl_J.js} +2 -2
- package/dist/{program-context-qVc_lsLV.js → program-context-JFmxYLfK.js} +6 -6
- package/dist/{prompt-select-styled-C0yn8YjW.js → prompt-select-styled--d3H0JCo.js} +1 -1
- package/dist/{prompt-select-styled-BCHe7Fks.js → prompt-select-styled-BeJhp9PS.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-1htA-NnS.js} +1 -1
- package/dist/{pw-ai-DhwRiS06.js → pw-ai-BnAKvSuw.js} +11 -11
- package/dist/{qmd-manager-DdZh9PHs.js → qmd-manager-QHUP-_em.js} +7 -7
- package/dist/{register.maintenance-DMLPFSKI.js → register.maintenance-CYhp47Hs.js} +5 -5
- package/dist/{register.maintenance-D1MuIUlv.js → register.maintenance-CvaHYkoX.js} +4 -4
- package/dist/{register.onboard-CXHhSH4B.js → register.onboard-CoySBEdQ.js} +2 -2
- package/dist/{register.onboard-D1X2dUGZ.js → register.onboard-mCscJN7t.js} +2 -2
- package/dist/{register.setup-Q58lN0TV.js → register.setup-BmE-pwMT.js} +2 -2
- package/dist/{register.setup-DFDb5BDi.js → register.setup-CzrsIQMG.js} +2 -2
- package/dist/{register.subclis-CrTXa8cj.js → register.subclis-wsgQ6wk8.js} +3 -3
- package/dist/{registry-DP24za6g.js → registry-CK4e9hn8.js} +17 -17
- package/dist/{replies-DpPvWiGF.js → replies-BIX_isV7.js} +3 -3
- package/dist/{reply-prefix-CtL0omgM.js → reply-prefix-XlyuyChD.js} +1 -1
- package/dist/{resolve-route-BVikmvWO.js → resolve-route-CZ-1eqw0.js} +4 -4
- package/dist/{retry-dGG-MbxL.js → retry-Cly39XZB.js} +1 -1
- package/dist/{run-main-BLKPL_vM.js → run-main-mKcFqx7h.js} +3 -3
- package/dist/{runner-DUBExAb5.js → runner-BcQ0sF9T.js} +1 -1
- package/dist/{runner-B_KP4voe.js → runner-odEv83vv.js} +9 -9
- package/dist/{send-DeEosX8F.js → send-B1u-LrcS.js} +18 -18
- package/dist/{send-DwKJK3sM.js → send-CiTGOvEc.js} +10 -10
- package/dist/{send-zSarozV2.js → send-DW96zgDL.js} +6 -6
- package/dist/{send-CHEOWVc8.js → send-DeFniOjh.js} +6 -6
- package/dist/{send-DbcLJb0P.js → send-WyRqb4WD.js} +7 -7
- package/dist/{session-DV1MNlbV.js → session-SM36BTsl.js} +8 -8
- package/dist/{skill-commands-D610IKhm.js → skill-commands-BJMb_psG.js} +9 -9
- package/dist/{skills-o5WVqM4V.js → skills-BFekKL7i.js} +21 -21
- package/dist/{sqlite-6H6Zw1cs.js → sqlite-DRbx2dhW.js} +4 -4
- package/dist/{store-vVE6N2mH.js → store-C0wvOkae.js} +2 -2
- package/dist/{subsystem-DgpxyDQ_.js → subsystem-Bs9YvKLa.js} +1 -1
- package/dist/{tables-BIWsCKXJ.js → tables-DuZspiBu.js} +1 -1
- package/dist/{target-errors-DyItGyW9.js → target-errors-Be1SwYlW.js} +2 -2
- package/dist/{thinking-Ni0HF-w6.js → thinking-CdlENGRW.js} +5 -5
- package/dist/{tokens-c_SLAkVb.js → tokens-H1H1LiSQ.js} +1 -1
- package/dist/{tool-images-DBCfXdli.js → tool-images-DXB7tqWi.js} +2 -2
- package/dist/{tool-loop-detection-Bbc9OPFR.js → tool-loop-detection-Cs8_HCsx.js} +3 -3
- package/dist/{update-cli-BkU6ori8.js → update-cli-BEBDpJF4.js} +5 -5
- package/dist/{update-cli-D18nWvzY.js → update-cli-C22V-tFW.js} +4 -4
- package/dist/{web-KYh3LgI0.js → web-DolrvXij.js} +6 -6
- package/dist/{web-BsjZ2RTT.js → web-kIIXN8hK.js} +57 -57
- package/dist/{whatsapp-actions-oRQjcdQe.js → whatsapp-actions-D1RsnX7P.js} +23 -23
- package/dist/{workspace-CbvamIU6.js → workspace-wAaHI8-5.js} +6 -6
- package/package.json +1 -1
|
@@ -99,10 +99,10 @@ import "./prompt-style-DwCXob2h.js";
|
|
|
99
99
|
import "./pairing-labels-D1HDboV2.js";
|
|
100
100
|
import "./pi-tools.policy-De00gPXt.js";
|
|
101
101
|
import "./note-DDecZomM.js";
|
|
102
|
-
import "./register.subclis-
|
|
103
|
-
import "./command-registry-
|
|
102
|
+
import "./register.subclis-wsgQ6wk8.js";
|
|
103
|
+
import "./command-registry-CsDAPQfS.js";
|
|
104
104
|
import "./program-context-CqzR_m-7.js";
|
|
105
|
-
import { r as installCompletion } from "./completion-cli-
|
|
105
|
+
import { r as installCompletion } from "./completion-cli-CSdjFWHy.js";
|
|
106
106
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CfRwa6qh.js";
|
|
107
107
|
import "./runtime-guard-D7waq_Ho.js";
|
|
108
108
|
import { r as isSystemdUserServiceAvailable } from "./systemd-DlMdyFDY.js";
|
|
@@ -110,7 +110,7 @@ import { t as resolveGatewayService } from "./service-Cm9j9WzQ.js";
|
|
|
110
110
|
import { r as healthCommand } from "./health-BmaWws9G.js";
|
|
111
111
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BseSWee1.js";
|
|
112
112
|
import { t as formatHealthCheckFailure } from "./health-format-CzgUHmmX.js";
|
|
113
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
113
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-llX6EnGy.js";
|
|
114
114
|
import { t as runTui } from "./tui-BJB80muc.js";
|
|
115
115
|
import os from "node:os";
|
|
116
116
|
import path from "node:path";
|
|
@@ -103,16 +103,16 @@ import "./control-service-Bz7rxLWq.js";
|
|
|
103
103
|
import "./stagger-BUClb97_.js";
|
|
104
104
|
import "./channel-selection-DuWs0Aak.js";
|
|
105
105
|
import "./runtime-guard-B37eizu-.js";
|
|
106
|
-
import "./program-context-
|
|
106
|
+
import "./program-context-JFmxYLfK.js";
|
|
107
107
|
import "./note-DeHoW7xO.js";
|
|
108
|
-
import { r as installCompletion } from "./completion-cli-
|
|
108
|
+
import { r as installCompletion } from "./completion-cli-B_f5PMBc.js";
|
|
109
109
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-2mwX-jqj.js";
|
|
110
110
|
import { r as isSystemdUserServiceAvailable } from "./systemd-riq8uNJQ.js";
|
|
111
111
|
import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
|
|
112
112
|
import { r as healthCommand } from "./health-BBGgp_dC.js";
|
|
113
113
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Z947tKLt.js";
|
|
114
114
|
import { t as formatHealthCheckFailure } from "./health-format-DSwnXZPU.js";
|
|
115
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
115
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BWJvfjTC.js";
|
|
116
116
|
import { t as runTui } from "./tui-CriznorL.js";
|
|
117
117
|
import os from "node:os";
|
|
118
118
|
import path from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { D as escapeRegExp, H as toWhatsappJid, rt as getChildLogger } from "./registry-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { n as loadConfig } from "./config-
|
|
5
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
6
|
-
import { a as loadWebMedia } from "./ir-
|
|
2
|
+
import { D as escapeRegExp, H as toWhatsappJid, rt as getChildLogger } from "./registry-CK4e9hn8.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-Bs9YvKLa.js";
|
|
4
|
+
import { n as loadConfig } from "./config-DRbjHIwD.js";
|
|
5
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-iMQQZu4Q.js";
|
|
6
|
+
import { a as loadWebMedia } from "./ir-DccrnjsE.js";
|
|
7
7
|
import { n as normalizePollInput } from "./polls-CCuCaqgv.js";
|
|
8
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
9
|
-
import { n as requireActiveWebListener } from "./active-listener-
|
|
8
|
+
import { t as convertMarkdownTables } from "./tables-DuZspiBu.js";
|
|
9
|
+
import { n as requireActiveWebListener } from "./active-listener-C9r8ZB9m.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
|
|
12
12
|
//#region src/markdown/whatsapp.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as saveMediaBuffer } from "./store-
|
|
2
|
-
import { a as loadWebMedia } from "./ir-
|
|
1
|
+
import { r as saveMediaBuffer } from "./store-C0wvOkae.js";
|
|
2
|
+
import { a as loadWebMedia } from "./ir-DccrnjsE.js";
|
|
3
3
|
|
|
4
4
|
//#region src/media/outbound-attachment.ts
|
|
5
5
|
async function resolveOutboundAttachmentFromUrl(mediaUrl, maxBytes, options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/home-dir.ts
|
|
6
6
|
function normalize(value) {
|
|
@@ -85,10 +85,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
85
85
|
if (override) return resolveUserPath(override, env, effectiveHomedir);
|
|
86
86
|
const newDir = newStateDir(effectiveHomedir);
|
|
87
87
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
88
|
-
if (
|
|
88
|
+
if (fs.existsSync(newDir)) return newDir;
|
|
89
89
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
90
90
|
try {
|
|
91
|
-
return
|
|
91
|
+
return fs.existsSync(dir);
|
|
92
92
|
} catch {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
@@ -127,7 +127,7 @@ function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDi
|
|
|
127
127
|
function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)) {
|
|
128
128
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
129
129
|
try {
|
|
130
|
-
return
|
|
130
|
+
return fs.existsSync(candidate);
|
|
131
131
|
} catch {
|
|
132
132
|
return false;
|
|
133
133
|
}
|
|
@@ -144,7 +144,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
|
|
|
144
144
|
const stateOverride = env.SYMI_STATE_DIR?.trim();
|
|
145
145
|
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
146
146
|
try {
|
|
147
|
-
return
|
|
147
|
+
return fs.existsSync(candidate);
|
|
148
148
|
} catch {
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-Cce4PUkG.js";
|
|
2
2
|
import { s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import "./registry-
|
|
3
|
-
import "./agent-scope-
|
|
4
|
-
import "./subsystem-
|
|
5
|
-
import "./workspace-
|
|
1
|
+
import "./paths-Cce4PUkG.js";
|
|
2
|
+
import "./registry-CK4e9hn8.js";
|
|
3
|
+
import "./agent-scope-BxoUQqgM.js";
|
|
4
|
+
import "./subsystem-Bs9YvKLa.js";
|
|
5
|
+
import "./workspace-wAaHI8-5.js";
|
|
6
6
|
import "./boolean-B8-BqKGQ.js";
|
|
7
|
-
import "./command-format-
|
|
8
|
-
import { A as normalizeProviderId, _ as ensureAuthProfileStore } from "./model-auth-
|
|
9
|
-
import "./github-copilot-token-
|
|
7
|
+
import "./command-format-BaxDnULz.js";
|
|
8
|
+
import { A as normalizeProviderId, _ as ensureAuthProfileStore } from "./model-auth-DK43VicI.js";
|
|
9
|
+
import "./github-copilot-token-C_qUP7p5.js";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
|
|
@@ -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-C-37cZUe.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-B8kqLWns.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-D2SKJnR7.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-DcpMiprB.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-BcQ0sF9T.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
|
|
82
|
+
import WebSocket, { WebSocket as WebSocket$1 } 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(url, wsOptions);
|
|
5717
|
+
this.ws = new WebSocket$1(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.OPEN) throw new Error("gateway not connected");
|
|
5936
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.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-C-37cZUe.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-C-37cZUe.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-DcpMiprB.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-CPBOQV4I.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: {
|
|
@@ -51787,7 +51787,7 @@ function isVoiceChannelType(type) {
|
|
|
51787
51787
|
function createDefaultDeps() {
|
|
51788
51788
|
return {
|
|
51789
51789
|
sendMessageWhatsApp: async (...args) => {
|
|
51790
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
51790
|
+
const { sendMessageWhatsApp } = await import("./web-DolrvXij.js");
|
|
51791
51791
|
return await sendMessageWhatsApp(...args);
|
|
51792
51792
|
},
|
|
51793
51793
|
sendMessageTelegram: async (...args) => {
|
|
@@ -54694,7 +54694,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
54694
54694
|
super(options);
|
|
54695
54695
|
}
|
|
54696
54696
|
createWebSocket(url) {
|
|
54697
|
-
return new WebSocket
|
|
54697
|
+
return new WebSocket(url, { agent });
|
|
54698
54698
|
}
|
|
54699
54699
|
}
|
|
54700
54700
|
return new ProxyGatewayPlugin();
|
|
@@ -64912,7 +64912,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
64912
64912
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
64913
64913
|
let preflightTranscript;
|
|
64914
64914
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
64915
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
64915
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CPBOQV4I.js");
|
|
64916
64916
|
preflightTranscript = await transcribeFirstAudio({
|
|
64917
64917
|
ctx: {
|
|
64918
64918
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -67069,7 +67069,7 @@ function loadWebLoginQr() {
|
|
|
67069
67069
|
return webLoginQrPromise;
|
|
67070
67070
|
}
|
|
67071
67071
|
function loadWebChannel() {
|
|
67072
|
-
webChannelPromise ??= import("./web-
|
|
67072
|
+
webChannelPromise ??= import("./web-DolrvXij.js");
|
|
67073
67073
|
return webChannelPromise;
|
|
67074
67074
|
}
|
|
67075
67075
|
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-D2SKJnR7.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-1htA-NnS.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-1htA-NnS.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-1htA-NnS.js")).closePlaywrightBrowserConnection();
|
|
3479
3479
|
} catch {}
|
|
3480
3480
|
if (!fs.existsSync(userDataDir)) return {
|
|
3481
3481
|
moved: false,
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-Cce4PUkG.js";
|
|
2
2
|
import { c as normalizeMainKey, l as resolveAgentIdFromSessionKey, m as normalizeOptionalAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredSymiTmpDir, t as CHANNEL_IDS } from "./registry-
|
|
4
|
-
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-
|
|
5
|
-
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
6
|
-
import { _ as runExec, a as DEFAULT_SYMICORE_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SYMIPULSE_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-
|
|
7
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
3
|
+
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredSymiTmpDir, t as CHANNEL_IDS } from "./registry-CK4e9hn8.js";
|
|
4
|
+
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-BxoUQqgM.js";
|
|
5
|
+
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Bs9YvKLa.js";
|
|
6
|
+
import { _ as runExec, a as DEFAULT_SYMICORE_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SYMIPULSE_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-wAaHI8-5.js";
|
|
7
|
+
import { r as normalizeChannelId } from "./plugins-DQYI3Fr-.js";
|
|
8
8
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
9
9
|
import { t as parseBooleanValue } from "./boolean-B8-BqKGQ.js";
|
|
10
|
-
import { t as formatCliCommand } from "./command-format-
|
|
11
|
-
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-
|
|
12
|
-
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-
|
|
13
|
-
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-
|
|
14
|
-
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-
|
|
15
|
-
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-
|
|
16
|
-
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-
|
|
10
|
+
import { t as formatCliCommand } from "./command-format-BaxDnULz.js";
|
|
11
|
+
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-CvJzsyvE.js";
|
|
12
|
+
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-DK43VicI.js";
|
|
13
|
+
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-Dz5lr5b0.js";
|
|
14
|
+
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-DRbjHIwD.js";
|
|
15
|
+
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-BFekevcE.js";
|
|
16
|
+
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-BFekKL7i.js";
|
|
17
17
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-BoQgnc8X.js";
|
|
18
18
|
import { t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
|
|
19
|
-
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-
|
|
20
|
-
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-
|
|
19
|
+
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-C0wvOkae.js";
|
|
20
|
+
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-CdlENGRW.js";
|
|
21
21
|
import { n as resolveConversationLabel } from "./conversation-label-DXUkoKcB.js";
|
|
22
|
-
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
22
|
+
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DLyHUt31.js";
|
|
23
23
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
|
|
24
|
-
import { t as sanitizeContentBlocksImages } from "./tool-images-
|
|
24
|
+
import { t as sanitizeContentBlocksImages } from "./tool-images-DXB7tqWi.js";
|
|
25
25
|
import fs from "node:fs/promises";
|
|
26
26
|
import os from "node:os";
|
|
27
27
|
import path, { posix } from "node:path";
|
|
28
|
-
import
|
|
28
|
+
import fs$1, { existsSync, realpathSync } from "node:fs";
|
|
29
29
|
import { spawn } from "node:child_process";
|
|
30
30
|
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
|
|
31
31
|
import crypto, { createHash, timingSafeEqual } from "node:crypto";
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-BnAKvSuw.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -2689,11 +2689,11 @@ async function movePathToTrash(targetPath) {
|
|
|
2689
2689
|
return targetPath;
|
|
2690
2690
|
} catch {
|
|
2691
2691
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
2692
|
-
|
|
2692
|
+
fs$1.mkdirSync(trashDir, { recursive: true });
|
|
2693
2693
|
const base = path.basename(targetPath);
|
|
2694
2694
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2695
|
+
if (fs$1.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
|
|
2696
|
+
fs$1.renameSync(targetPath, dest);
|
|
2697
2697
|
return dest;
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
@@ -2771,7 +2771,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
2771
2771
|
} catch {}
|
|
2772
2772
|
const userDataDir = resolveSymiUserDataDir(name);
|
|
2773
2773
|
const profileDir = path.dirname(userDataDir);
|
|
2774
|
-
if (
|
|
2774
|
+
if (fs$1.existsSync(profileDir)) {
|
|
2775
2775
|
await movePathToTrash(profileDir);
|
|
2776
2776
|
deleted = true;
|
|
2777
2777
|
}
|
|
@@ -3473,13 +3473,13 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-BnAKvSuw.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-BnAKvSuw.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
|
-
if (!
|
|
3482
|
+
if (!fs$1.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|
|
3484
3484
|
from: userDataDir
|
|
3485
3485
|
};
|
|
@@ -3898,7 +3898,7 @@ function releaseAllLocksSync() {
|
|
|
3898
3898
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
3899
3899
|
} catch {}
|
|
3900
3900
|
try {
|
|
3901
|
-
|
|
3901
|
+
fs$1.rmSync(held.lockPath, { force: true });
|
|
3902
3902
|
} catch {}
|
|
3903
3903
|
HELD_LOCKS.delete(sessionFile);
|
|
3904
3904
|
}
|
|
@@ -5699,7 +5699,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
5699
5699
|
}
|
|
5700
5700
|
function archiveFileOnDisk(filePath, reason) {
|
|
5701
5701
|
const archived = `${filePath}.${reason}.${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}`;
|
|
5702
|
-
|
|
5702
|
+
fs$1.renameSync(filePath, archived);
|
|
5703
5703
|
return archived;
|
|
5704
5704
|
}
|
|
5705
5705
|
/**
|
|
@@ -5709,7 +5709,7 @@ function archiveFileOnDisk(filePath, reason) {
|
|
|
5709
5709
|
function archiveSessionTranscripts(opts) {
|
|
5710
5710
|
const archived = [];
|
|
5711
5711
|
for (const candidate of resolveSessionTranscriptCandidates(opts.sessionId, opts.storePath, opts.sessionFile, opts.agentId)) {
|
|
5712
|
-
if (!
|
|
5712
|
+
if (!fs$1.existsSync(candidate)) continue;
|
|
5713
5713
|
try {
|
|
5714
5714
|
archived.push(archiveFileOnDisk(candidate, opts.reason));
|
|
5715
5715
|
} catch {}
|
|
@@ -5741,15 +5741,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
5741
5741
|
let removed = 0;
|
|
5742
5742
|
let scanned = 0;
|
|
5743
5743
|
for (const dir of directories) {
|
|
5744
|
-
const entries = await
|
|
5744
|
+
const entries = await fs$1.promises.readdir(dir).catch(() => []);
|
|
5745
5745
|
for (const entry of entries) {
|
|
5746
5746
|
const timestamp = parseArchivedTimestamp(entry, reason);
|
|
5747
5747
|
if (timestamp == null) continue;
|
|
5748
5748
|
scanned += 1;
|
|
5749
5749
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
5750
5750
|
const fullPath = path.join(dir, entry);
|
|
5751
|
-
if (!(await
|
|
5752
|
-
await
|
|
5751
|
+
if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
5752
|
+
await fs$1.promises.rm(fullPath).catch(() => void 0);
|
|
5753
5753
|
removed += 1;
|
|
5754
5754
|
}
|
|
5755
5755
|
}
|
|
@@ -5885,7 +5885,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
5885
5885
|
}
|
|
5886
5886
|
function getFileMtimeMs(filePath) {
|
|
5887
5887
|
try {
|
|
5888
|
-
return
|
|
5888
|
+
return fs$1.statSync(filePath).mtimeMs;
|
|
5889
5889
|
} catch {
|
|
5890
5890
|
return;
|
|
5891
5891
|
}
|
|
@@ -5964,7 +5964,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
5964
5964
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
5965
5965
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
5966
5966
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
5967
|
-
const raw =
|
|
5967
|
+
const raw = fs$1.readFileSync(storePath, "utf-8");
|
|
5968
5968
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
5969
5969
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
5970
5970
|
continue;
|
|
@@ -6116,7 +6116,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
6116
6116
|
}
|
|
6117
6117
|
async function getSessionFileSize(storePath) {
|
|
6118
6118
|
try {
|
|
6119
|
-
return (await
|
|
6119
|
+
return (await fs$1.promises.stat(storePath)).size;
|
|
6120
6120
|
} catch {
|
|
6121
6121
|
return null;
|
|
6122
6122
|
}
|
|
@@ -6133,7 +6133,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6133
6133
|
if (fileSize <= maxBytes) return false;
|
|
6134
6134
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
6135
6135
|
try {
|
|
6136
|
-
await
|
|
6136
|
+
await fs$1.promises.rename(storePath, backupPath);
|
|
6137
6137
|
log.info("rotated session store file", {
|
|
6138
6138
|
backupPath: path.basename(backupPath),
|
|
6139
6139
|
sizeBytes: fileSize
|
|
@@ -6144,11 +6144,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6144
6144
|
try {
|
|
6145
6145
|
const dir = path.dirname(storePath);
|
|
6146
6146
|
const baseName = path.basename(storePath);
|
|
6147
|
-
const backups = (await
|
|
6147
|
+
const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
6148
6148
|
const maxBackups = 3;
|
|
6149
6149
|
if (backups.length > maxBackups) {
|
|
6150
6150
|
const toDelete = backups.slice(maxBackups);
|
|
6151
|
-
for (const old of toDelete) await
|
|
6151
|
+
for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
6152
6152
|
log.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
6153
6153
|
}
|
|
6154
6154
|
} catch {}
|
|
@@ -6203,14 +6203,14 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6203
6203
|
await rotateSessionFile(storePath, maintenance.rotateBytes);
|
|
6204
6204
|
}
|
|
6205
6205
|
}
|
|
6206
|
-
await
|
|
6206
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6207
6207
|
const json = JSON.stringify(store, null, 2);
|
|
6208
6208
|
if (process.platform === "win32") {
|
|
6209
6209
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6210
6210
|
try {
|
|
6211
|
-
await
|
|
6211
|
+
await fs$1.promises.writeFile(tmp, json, "utf-8");
|
|
6212
6212
|
for (let i = 0; i < 5; i++) try {
|
|
6213
|
-
await
|
|
6213
|
+
await fs$1.promises.rename(tmp, storePath);
|
|
6214
6214
|
break;
|
|
6215
6215
|
} catch {
|
|
6216
6216
|
if (i < 4) await new Promise((r) => setTimeout(r, 50 * (i + 1)));
|
|
@@ -6220,27 +6220,27 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6220
6220
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
6221
6221
|
throw err;
|
|
6222
6222
|
} finally {
|
|
6223
|
-
await
|
|
6223
|
+
await fs$1.promises.rm(tmp, { force: true }).catch(() => void 0);
|
|
6224
6224
|
}
|
|
6225
6225
|
return;
|
|
6226
6226
|
}
|
|
6227
6227
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6228
6228
|
try {
|
|
6229
|
-
await
|
|
6229
|
+
await fs$1.promises.writeFile(tmp, json, {
|
|
6230
6230
|
mode: 384,
|
|
6231
6231
|
encoding: "utf-8"
|
|
6232
6232
|
});
|
|
6233
|
-
await
|
|
6234
|
-
await
|
|
6233
|
+
await fs$1.promises.rename(tmp, storePath);
|
|
6234
|
+
await fs$1.promises.chmod(storePath, 384);
|
|
6235
6235
|
} catch (err) {
|
|
6236
6236
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
6237
6237
|
try {
|
|
6238
|
-
await
|
|
6239
|
-
await
|
|
6238
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6239
|
+
await fs$1.promises.writeFile(storePath, json, {
|
|
6240
6240
|
mode: 384,
|
|
6241
6241
|
encoding: "utf-8"
|
|
6242
6242
|
});
|
|
6243
|
-
await
|
|
6243
|
+
await fs$1.promises.chmod(storePath, 384);
|
|
6244
6244
|
} catch (err2) {
|
|
6245
6245
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
6246
6246
|
throw err2;
|
|
@@ -6249,7 +6249,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6249
6249
|
}
|
|
6250
6250
|
throw err;
|
|
6251
6251
|
} finally {
|
|
6252
|
-
await
|
|
6252
|
+
await fs$1.promises.rm(tmp, { force: true });
|
|
6253
6253
|
}
|
|
6254
6254
|
}
|
|
6255
6255
|
async function updateSessionStore(storePath, mutator, opts) {
|
|
@@ -6494,8 +6494,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
6494
6494
|
return trimmed ? trimmed : null;
|
|
6495
6495
|
}
|
|
6496
6496
|
async function ensureSessionHeader(params) {
|
|
6497
|
-
if (
|
|
6498
|
-
await
|
|
6497
|
+
if (fs$1.existsSync(params.sessionFile)) return;
|
|
6498
|
+
await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
6499
6499
|
const header = {
|
|
6500
6500
|
type: "session",
|
|
6501
6501
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -6503,7 +6503,7 @@ async function ensureSessionHeader(params) {
|
|
|
6503
6503
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6504
6504
|
cwd: process.cwd()
|
|
6505
6505
|
};
|
|
6506
|
-
await
|
|
6506
|
+
await fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
6507
6507
|
encoding: "utf-8",
|
|
6508
6508
|
mode: 384
|
|
6509
6509
|
});
|