@symerian/symi 2.6.11 → 2.6.13
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-dRUMQQrB.js → accounts-3dCrO3oZ.js} +1 -1
- package/dist/{accounts-D1r2dq1t.js → accounts-BRw8yhIW.js} +21 -21
- package/dist/{accounts-wSphH5gv.js → accounts-BuZxOb3B.js} +1 -1
- package/dist/{active-listener-DFUTUjxt.js → active-listener-CfHHV2SU.js} +1 -1
- package/dist/{agent-scope-D68_xfTL.js → agent-scope-CpEJ0B88.js} +3 -3
- package/dist/{agents-DRRBdgqz.js → agents-CrSpoNsS.js} +4 -4
- package/dist/{agents.config-GCucbcBy.js → agents.config-B3GILTs5.js} +1 -1
- package/dist/{agents.config-BO1N5Z_6.js → agents.config-Co1CO8fA.js} +1 -1
- package/dist/{audio-preflight-CjV36MUe.js → audio-preflight-BVaaZWkg.js} +29 -29
- package/dist/{auth-choice-C1sul2-I.js → auth-choice-BBmXnDnK.js} +1 -1
- package/dist/{auth-choice-i7tTgbDd.js → auth-choice-BHWxDJh7.js} +1 -1
- package/dist/{auth-profiles-Bl9aU7fc.js → auth-profiles-DdK1Hxaa.js} +17 -17
- package/dist/{banner-VbhMdl-b.js → banner-RLiOIu-3.js} +1 -1
- package/dist/{bindings-Bat2RnAR.js → bindings-BsHoBLIE.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-DK0AV-r9.js → channel-activity-B6G1jnQT.js} +1 -1
- package/dist/{channel-options-CsXOvqAc.js → channel-options-BCK41AON.js} +1 -1
- package/dist/{channel-options-Esf0QB4M.js → channel-options-PDf46S-K.js} +1 -1
- package/dist/{channel-web-DDC84nZg.js → channel-web-C3XZ7c2q.js} +1 -1
- package/dist/{channels-cli-DomEe8uI.js → channels-cli-723vy6L6.js} +4 -4
- package/dist/{channels-cli-C989dAD4.js → channels-cli-CUWuD7qf.js} +4 -4
- package/dist/{chrome-DRHvMBbb.js → chrome-DkaXoP36.js} +14 -14
- package/dist/{chunk-DR8ukp6r.js → chunk-09egQapi.js} +1 -1
- package/dist/{cli-CPRCkEdK.js → cli-CAzmrOs0.js} +1 -1
- package/dist/{cli-RXswESw1.js → cli-DYdRSi_j.js} +1 -1
- package/dist/{command-registry-DwBw5-nh.js → command-registry-B2aO0Q7_.js} +9 -9
- package/dist/{commands-registry-DIakZUZb.js → commands-registry-Bfc7Uz0o.js} +4 -4
- package/dist/{completion-cli-Cwx8MtF9.js → completion-cli-BKm12loU.js} +1 -1
- package/dist/{completion-cli-C43sjF75.js → completion-cli-BsKD_vBb.js} +2 -2
- package/dist/{config-CvmE3Yx1.js → config-5SdHIcHU.js} +12 -12
- package/dist/{config-cli-DG0xBZhs.js → config-cli-Bynmd81Q.js} +1 -1
- package/dist/{config-cli-CkkIU7AY.js → config-cli-D47lU7kU.js} +1 -1
- package/dist/{configure-DlVtomYJ.js → configure-B3vS2Iz5.js} +3 -3
- package/dist/{configure-nxnXIUVI.js → configure-Df6GmKAR.js} +3 -3
- package/dist/{deliver-UMgfGLxW.js → deliver-C46-vyqg.js} +20 -20
- package/dist/{diagnostic-spWOtH_g.js → diagnostic-rPhsBoZz.js} +1 -1
- package/dist/{doctor-completion-Dd5P0i9L.js → doctor-completion-DyiRkYT4.js} +1 -1
- package/dist/{doctor-completion-CWr51Q4O.js → doctor-completion-SEerte2S.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-xmBFQPBP.js → env-BDXYbTKj.js} +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{frontmatter-CV0YkjoY.js → frontmatter-CTR5f_Ez.js} +2 -2
- package/dist/{gateway-cli-BBJjWKyu.js → gateway-cli-PjmG0pFo.js} +9 -9
- package/dist/{gateway-cli-B1h1FhD-.js → gateway-cli-k19iT2vJ.js} +9 -9
- package/dist/{gemini-auth-C6Z-2T42.js → gemini-auth-Dy12ZAH3.js} +1 -1
- package/dist/{github-copilot-token-B8B2pmph.js → github-copilot-token-cCYzSU9h.js} +7 -7
- package/dist/{glass-ui-ws-UewDPjVh.js → glass-ui-ws-D0Yv090T.js} +7 -7
- package/dist/{glass-ui-ws-Bk01KSVI.js → glass-ui-ws-iCEtluQU.js} +7 -7
- package/dist/{health-Dzi6letr.js → health-B32Q-KYM.js} +1 -1
- package/dist/{health-BiipZUOd.js → health-CXjAtn1-.js} +1 -1
- package/dist/{hooks-cli-BdelOAPH.js → hooks-cli-DA6zOGNz.js} +2 -2
- package/dist/{hooks-cli-DxRXaSHR.js → hooks-cli-DfRmFenH.js} +2 -2
- package/dist/{image-CK4oZUJJ.js → image-CuzFLQWC.js} +4 -4
- package/dist/{image-ops-M5agStZn.js → image-ops-C7CauEK8.js} +16 -16
- package/dist/index.js +6 -6
- package/dist/{ir-B-XXcYFe.js → ir-CTiz95Vb.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-CdXg5-Cx.js → local-roots-DhZz0Ybs.js} +5 -5
- package/dist/{login-qr-BKIOHn1V.js → login-qr-AP9agO-i.js} +12 -12
- package/dist/{login-BHUrERYo.js → login-ul8zaw_S.js} +7 -7
- package/dist/{manager-DW3JqFpY.js → manager-PprhCvO_.js} +22 -22
- package/dist/{manifest-registry-0J48biqr.js → manifest-registry-yb7sAlu4.js} +19 -19
- package/dist/{markdown-tables-tW9bGjLM.js → markdown-tables-C-BmIap8.js} +1 -1
- package/dist/{message-channel-DwDSKGn4.js → message-channel-OlFBYAw8.js} +1 -1
- package/dist/{models-cli-CF0KZtK4.js → models-cli-BgCUViRO.js} +2 -2
- package/dist/{models-cli-D5KE-evn.js → models-cli-CbJUD_L1.js} +3 -3
- package/dist/{models-DUrbBEOU.js → models-zowe4LXa.js} +2 -2
- package/dist/{onboard-DK-oOqRl.js → onboard-CYvIpUXQ.js} +2 -2
- package/dist/{onboard-Bizq_LAS.js → onboard-DsKgcThj.js} +2 -2
- package/dist/{onboard-channels-B6yLPqH5.js → onboard-channels-DLiV4Y0t.js} +1 -1
- package/dist/{onboard-channels-DSZzjOo1.js → onboard-channels-DxCGWgB0.js} +1 -1
- package/dist/{onboarding-CkWWIQA7.js → onboarding-BA5v1JEG.js} +3 -3
- package/dist/{onboarding-DGSCNnGY.js → onboarding-DioGtMFo.js} +3 -3
- package/dist/{onboarding.finalize-Dj0noUgo.js → onboarding.finalize-CAbRXb0h.js} +5 -5
- package/dist/{onboarding.finalize-BMGwhjIR.js → onboarding.finalize-DMXCA49f.js} +6 -6
- package/dist/{outbound-CIVsLpJK.js → outbound-CtMCmwxR.js} +7 -7
- package/dist/{outbound-attachment-CHcmlip8.js → outbound-attachment-DJldbweZ.js} +2 -2
- package/dist/{paths-DEuVuViW.js → paths-CbQV9WEg.js} +1 -1
- package/dist/{pi-auth-json-BYuCWAs0.js → pi-auth-json-Bk8ERadJ.js} +8 -8
- package/dist/{pi-embedded-DLma-HLn.js → pi-embedded-CFFnZEcA.js} +14 -4
- package/dist/{pi-embedded-helpers-BU8EZuwx.js → pi-embedded-helpers-CfqDGQ9J.js} +73 -73
- package/dist/{plugin-registry-D8PAS3Sx.js → plugin-registry-Bt5YCgFq.js} +1 -1
- package/dist/{plugin-registry-BcgpVdtC.js → plugin-registry-HFOrv3KN.js} +1 -1
- package/dist/plugin-sdk/{channel-web-DgNOPxkV.js → channel-web-C2w1HotM.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-DJN8Xcq2.js → reply-D5CxbzCs.js} +14 -4
- package/dist/plugin-sdk/{web-HkDBSFef.js → web-ClsKdqx-.js} +2 -2
- package/dist/{plugins-Bkr5ZdYs.js → plugins-BzmbgY7s.js} +9 -9
- package/dist/{plugins-cli-Bcmq1fs1.js → plugins-cli-C7xTf9NV.js} +2 -2
- package/dist/{plugins-cli-B_ln22KG.js → plugins-cli-CXz_UApK.js} +2 -2
- package/dist/{program-C_rxRb1M.js → program-8hWr4qGZ.js} +7 -7
- package/dist/{program-context-BqH8IVSK.js → program-context-BBtSJunF.js} +17 -17
- package/dist/{prompt-select-styled-DMRbQO0q.js → prompt-select-styled-CwfroEHp.js} +4 -4
- package/dist/{prompt-select-styled-D8WAeDQY.js → prompt-select-styled-DUXeA9Zp.js} +4 -4
- package/dist/{provider-auth-helpers-DstpUAya.js → provider-auth-helpers-Dc7jBEOA.js} +1 -1
- package/dist/{provider-auth-helpers-DiuVmtmQ.js → provider-auth-helpers-DhLHWjNU.js} +1 -1
- package/dist/{push-apns-be2xWY22.js → push-apns-CVZe5WVN.js} +1 -1
- package/dist/{push-apns-DKU4DgbI.js → push-apns-CflJh75N.js} +1 -1
- package/dist/{pw-ai-BTgmcNVp.js → pw-ai-m0mj2KWK.js} +11 -11
- package/dist/{qmd-manager-BKu9rOuB.js → qmd-manager-iDLSiI4Z.js} +7 -7
- package/dist/{register.agent-Dcd_oFsG.js → register.agent-BnuJQ5lg.js} +6 -6
- package/dist/{register.agent-k7WxtPOd.js → register.agent-DV7IR1rI.js} +5 -5
- package/dist/{register.configure-BOgCp-h4.js → register.configure-BhncI0ij.js} +6 -6
- package/dist/{register.configure-DMHVPA-T.js → register.configure-DaIrJXWo.js} +6 -6
- package/dist/{register.maintenance-Bsbgpe-Z.js → register.maintenance-BO1XWhVb.js} +7 -7
- package/dist/{register.maintenance-BdBlQQ6G.js → register.maintenance-DK_p-7so.js} +8 -8
- package/dist/{register.message-BE0gDUQZ.js → register.message-B194ue2R.js} +2 -2
- package/dist/{register.message-DAyubW1M.js → register.message-B4CGCAn_.js} +2 -2
- package/dist/{register.onboard-CqavyaNa.js → register.onboard-DidMCka8.js} +4 -4
- package/dist/{register.onboard-CTKa4O9W.js → register.onboard-Dt53qGB5.js} +4 -4
- package/dist/{register.setup-DpkI2F6r.js → register.setup-CLV1kk2-.js} +4 -4
- package/dist/{register.setup-BO3CD8Pz.js → register.setup-DgUxMRZR.js} +4 -4
- package/dist/{register.status-health-sessions-C5Qa-DmU.js → register.status-health-sessions-CB10JLY6.js} +3 -3
- package/dist/{register.status-health-sessions-ClDUpT3j.js → register.status-health-sessions-TvGuwVoR.js} +3 -3
- package/dist/{register.subclis-Bvil7KuO.js → register.subclis-elNdyQio.js} +9 -9
- package/dist/{registry-UkL38jvt.js → registry-DYq1AYOv.js} +17 -17
- package/dist/{replies-mfnbLu2p.js → replies-LSmuwOhA.js} +3 -3
- package/dist/{reply-4ilKYVzu.js → reply-DUZvOCsG.js} +14 -4
- package/dist/{reply-prefix-DkGsdyBm.js → reply-prefix-DpqZu44Z.js} +1 -1
- package/dist/{resolve-route-q8AFnU5c.js → resolve-route-C4_I4GFI.js} +4 -4
- package/dist/{retry-CqMeDhyp.js → retry-BBVXkKBV.js} +1 -1
- package/dist/{run-main-D1n_tgGX.js → run-main-gBPGqO8r.js} +14 -14
- package/dist/{runner-CKYly94z.js → runner-CU9l0uJh.js} +22 -22
- package/dist/{send-Cd81AY_Z.js → send-CQAKg_12.js} +7 -7
- package/dist/{send-qItpAHcI.js → send-CVMyYPQw.js} +6 -6
- package/dist/{send-D3zDmQim.js → send-CvhXrdgS.js} +10 -10
- package/dist/{send-XRUYukww.js → send-DAN9hA5h.js} +6 -6
- package/dist/{send-B7z8CDbr.js → send-DYj_o4_F.js} +18 -18
- package/dist/{server-methods-BRdl4pcP.js → server-methods-BG0N79yY.js} +7 -7
- package/dist/{server-methods-VC0ahxUh.js → server-methods-dgW-8gC7.js} +7 -7
- package/dist/{server-node-events-Y5xFGvsj.js → server-node-events-B_hsQw_N.js} +2 -2
- package/dist/{server-node-events-Bq2fr8Z3.js → server-node-events-ZtQKBPo3.js} +2 -2
- package/dist/{session-Dh2wWQkD.js → session-DSU1vxxi.js} +8 -8
- package/dist/{skill-commands-B_f8uGi7.js → skill-commands-DcVwOafC.js} +16 -16
- package/dist/{skills-CGHRETGF.js → skills-Bs0AW1g3.js} +24 -24
- package/dist/{sqlite-Bv87EXeg.js → sqlite-D_mz1_-y.js} +16 -16
- package/dist/{status-BxNHXm7T.js → status-BqhJ-HsW.js} +1 -1
- package/dist/{status-DOCg6R55.js → status-Cd9-xWsZ.js} +2 -2
- package/dist/{status-CRCD2RpZ.js → status-D-IvYfjk.js} +2 -2
- package/dist/{status-DNJBoKuu.js → status-D4Lr90yH.js} +1 -1
- package/dist/{store-Ea3zM6xK.js → store-01F_JM7O.js} +6 -6
- package/dist/{subagent-registry-7wPEZQKK.js → subagent-registry-J2pIBQF7.js} +14 -4
- package/dist/{subsystem-DN75fnEF.js → subsystem-BjyjJF-d.js} +1 -1
- package/dist/{tables-BX7_aBvN.js → tables-qMwbq29u.js} +1 -1
- package/dist/{target-errors-7KhTCTdS.js → target-errors-Bbr9rlzN.js} +2 -2
- package/dist/{thinking-C9-JAUzD.js → thinking-BprCy23Z.js} +5 -5
- package/dist/{tokens-BZGy4v--.js → tokens-Bux9Y_xD.js} +1 -1
- package/dist/{tool-images-B1qVCntj.js → tool-images-SqqWIT22.js} +2 -2
- package/dist/{tool-loop-detection-C8FBZVVx.js → tool-loop-detection-DR_rrIA1.js} +3 -3
- package/dist/{unified-runner-quomT1T-.js → unified-runner-oH9Pt-cO.js} +232 -222
- package/dist/{update-cli-CcyCWvCB.js → update-cli-B7TLu25J.js} +8 -8
- package/dist/{update-cli-FOE23Lo4.js → update-cli-D8nA6U7C.js} +7 -7
- package/dist/{update-runner-CJg-OANA.js → update-runner-D8AFB8Oi.js} +1 -1
- package/dist/{update-runner-Dcjlf0aY.js → update-runner-DvZOsoQs.js} +1 -1
- package/dist/{web-DcHxbz2H.js → web-0xZpP0WA.js} +57 -57
- package/dist/{web-CuNZExQK.js → web-CAy-xQv2.js} +1 -1
- package/dist/{web-BTmqdXgt.js → web-DDiOPIdv.js} +2 -2
- package/dist/{web-DPBfrIzo.js → web-mQInjWbW.js} +1 -1
- package/dist/{whatsapp-actions-SXenaJIn.js → whatsapp-actions-BIeSWsCF.js} +23 -23
- package/dist/{workspace-DqJ5h-ZB.js → workspace-DscDraUb.js} +27 -27
- package/package.json +1 -1
- package/dist/paths-CYmyCDsE.js +0 -212
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { s as resolveStateDir } from "./paths-
|
|
2
|
+
import { s as resolveStateDir } from "./paths-CE7eVGHg.js";
|
|
3
3
|
import { m as normalizeOptionalAccountId, p as normalizeAccountId } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { c as getActivePluginRegistry, v as createInternalHookEvent, x as triggerInternalHook } from "./registry-
|
|
5
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
6
|
-
import { B as resolveMirroredTranscriptText, i as isMessagingToolDuplicate, z as appendAssistantMessageToSessionTranscript } from "./pi-embedded-helpers-
|
|
7
|
-
import { d as getChannelDock } from "./thinking-
|
|
8
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
9
|
-
import { a as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
10
|
-
import { c as resolveChunkMode, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph } from "./chunk-
|
|
11
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
12
|
-
import { t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
13
|
-
import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-
|
|
4
|
+
import { c as getActivePluginRegistry, v as createInternalHookEvent, x as triggerInternalHook } from "./registry-DYq1AYOv.js";
|
|
5
|
+
import { t as createSubsystemLogger } from "./subsystem-BjyjJF-d.js";
|
|
6
|
+
import { B as resolveMirroredTranscriptText, i as isMessagingToolDuplicate, z as appendAssistantMessageToSessionTranscript } from "./pi-embedded-helpers-CfqDGQ9J.js";
|
|
7
|
+
import { d as getChannelDock } from "./thinking-BprCy23Z.js";
|
|
8
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-BzmbgY7s.js";
|
|
9
|
+
import { a as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-Bux9Y_xD.js";
|
|
10
|
+
import { c as resolveChunkMode, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph } from "./chunk-09egQapi.js";
|
|
11
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-C-BmIap8.js";
|
|
12
|
+
import { t as getAgentScopedMediaLocalRoots } from "./local-roots-DhZz0Ybs.js";
|
|
13
|
+
import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-DAN9hA5h.js";
|
|
14
14
|
import path from "node:path";
|
|
15
|
-
import
|
|
15
|
+
import fs from "node:fs";
|
|
16
16
|
import crypto from "node:crypto";
|
|
17
17
|
|
|
18
18
|
//#region src/plugins/hooks.ts
|
|
@@ -721,11 +721,11 @@ function resolveFailedDir(stateDir) {
|
|
|
721
721
|
/** Ensure the queue directory (and failed/ subdirectory) exist. */
|
|
722
722
|
async function ensureQueueDir(stateDir) {
|
|
723
723
|
const queueDir = resolveQueueDir(stateDir);
|
|
724
|
-
await
|
|
724
|
+
await fs.promises.mkdir(queueDir, {
|
|
725
725
|
recursive: true,
|
|
726
726
|
mode: 448
|
|
727
727
|
});
|
|
728
|
-
await
|
|
728
|
+
await fs.promises.mkdir(resolveFailedDir(stateDir), {
|
|
729
729
|
recursive: true,
|
|
730
730
|
mode: 448
|
|
731
731
|
});
|
|
@@ -752,18 +752,18 @@ async function enqueueDelivery(params, stateDir) {
|
|
|
752
752
|
const filePath = path.join(queueDir, `${id}.json`);
|
|
753
753
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
754
754
|
const json = JSON.stringify(entry, null, 2);
|
|
755
|
-
await
|
|
755
|
+
await fs.promises.writeFile(tmp, json, {
|
|
756
756
|
encoding: "utf-8",
|
|
757
757
|
mode: 384
|
|
758
758
|
});
|
|
759
|
-
await
|
|
759
|
+
await fs.promises.rename(tmp, filePath);
|
|
760
760
|
return id;
|
|
761
761
|
}
|
|
762
762
|
/** Remove a successfully delivered entry from the queue. */
|
|
763
763
|
async function ackDelivery(id, stateDir) {
|
|
764
764
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
765
765
|
try {
|
|
766
|
-
await
|
|
766
|
+
await fs.promises.unlink(filePath);
|
|
767
767
|
} catch (err) {
|
|
768
768
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
|
|
769
769
|
}
|
|
@@ -771,16 +771,16 @@ async function ackDelivery(id, stateDir) {
|
|
|
771
771
|
/** Update a queue entry after a failed delivery attempt. */
|
|
772
772
|
async function failDelivery(id, error, stateDir) {
|
|
773
773
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
774
|
-
const raw = await
|
|
774
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
775
775
|
const entry = JSON.parse(raw);
|
|
776
776
|
entry.retryCount += 1;
|
|
777
777
|
entry.lastError = error;
|
|
778
778
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
779
|
-
await
|
|
779
|
+
await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
|
|
780
780
|
encoding: "utf-8",
|
|
781
781
|
mode: 384
|
|
782
782
|
});
|
|
783
|
-
await
|
|
783
|
+
await fs.promises.rename(tmp, filePath);
|
|
784
784
|
}
|
|
785
785
|
|
|
786
786
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-BjyjJF-d.js";
|
|
3
3
|
import { i as pruneDiagnosticSessionStates, r as getDiagnosticSessionState, t as diagnosticSessionStates } from "./diagnostic-session-state-Zw87xFym.js";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/diagnostic-events.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as resolveCliName } from "./command-format-BtYOfWxC.js";
|
|
2
2
|
import { t as resolveSymiPackageRoot } from "./symi-root-BNuQ4lAT.js";
|
|
3
3
|
import { t as note } from "./note-DDecZomM.js";
|
|
4
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-BsKD_vBb.js";
|
|
5
5
|
import { spawnSync } from "node:child_process";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
2
2
|
import { r as resolveCliName } from "./command-format-COaS-S7B.js";
|
|
3
3
|
import { t as note } from "./note-DeHoW7xO.js";
|
|
4
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-BKm12loU.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
|
package/dist/entry.js
CHANGED
|
@@ -2500,7 +2500,7 @@ if (!ensureExperimentalWarningSuppressed()) {
|
|
|
2500
2500
|
applyCliProfileEnv({ profile: parsed.profile });
|
|
2501
2501
|
process$1.argv = parsed.argv;
|
|
2502
2502
|
}
|
|
2503
|
-
import("./run-main-
|
|
2503
|
+
import("./run-main-gBPGqO8r.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
|
|
2504
2504
|
console.error("[symi] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
2505
2505
|
process$1.exitCode = 1;
|
|
2506
2506
|
});
|
package/dist/extensionAPI.js
CHANGED
|
@@ -7,7 +7,7 @@ import { a as resolveAgentIdentity } from "./reply-prefix-K_J_nfgx.js";
|
|
|
7
7
|
import "./github-copilot-token-BbsJ0Qbo.js";
|
|
8
8
|
import "./env-CQ_DQOwT.js";
|
|
9
9
|
import "./tokens-Cn6drXx2.js";
|
|
10
|
-
import { D as resolveAgentTimeoutMs, p as runEmbeddedPiAgent } from "./pi-embedded-
|
|
10
|
+
import { D as resolveAgentTimeoutMs, p as runEmbeddedPiAgent } from "./pi-embedded-CFFnZEcA.js";
|
|
11
11
|
import "./plugins-71oIavrF.js";
|
|
12
12
|
import "./accounts-DDEyGwby.js";
|
|
13
13
|
import "./bindings-DYVakimr.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as parseBooleanValue } from "./boolean-CE7i9tBR.js";
|
|
2
2
|
import { n as MANIFEST_KEY, t as LEGACY_MANIFEST_KEYS } from "./legacy-names-CePMUvus.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import JSON5 from "json5";
|
|
6
6
|
import YAML from "yaml";
|
|
7
7
|
|
|
@@ -79,7 +79,7 @@ function hasBinary(bin) {
|
|
|
79
79
|
for (const part of parts) for (const ext of extensions) {
|
|
80
80
|
const candidate = path.join(part, bin + ext);
|
|
81
81
|
try {
|
|
82
|
-
|
|
82
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
83
83
|
hasBinaryCache.set(bin, true);
|
|
84
84
|
return true;
|
|
85
85
|
} catch {}
|
|
@@ -21,7 +21,7 @@ import "./pairing-token-Byh6drgn.js";
|
|
|
21
21
|
import { t as safeEqualSecret } from "./secret-equal-CbntzRkh.js";
|
|
22
22
|
import { a as isValidIPv4, c as resolveClientIp, d as resolveHostName, f as rawDataToString, i as isTrustedProxyAddress, l as resolveGatewayBindHost, n as isLoopbackHost, o as normalizeHostHeader, t as isLoopbackAddress, u as resolveGatewayListenHosts } from "./net-DZ5Ayk-W.js";
|
|
23
23
|
import { n as pickPrimaryTailnetIPv4, r as pickPrimaryTailnetIPv6 } from "./tailnet-Cmumpn76.js";
|
|
24
|
-
import { $ as getCliSessionId, $t as setPreRestartDeferralCheck, An as DEFAULT_INPUT_TIMEOUT_MS, At as normalizeOptionalSessionKey, Bt as buildSafeExternalPrompt, Cn as enqueueSystemEvent, Cr as onAgentEvent, Dn as DEFAULT_INPUT_IMAGE_MAX_BYTES, E as createDefaultDeps, F as buildHistoryContextFromEntries, Ft as buildDeliveryFromLegacyPayload, H as getTotalPendingReplies, Ht as getHookType, In as resolveAgentTimeoutMs, It as hasLegacyDeliveryHints, J as runAgentTurn, Jt as emitGatewayRestart, Kt as consumeGatewaySigusr1RestartAuthorization, Lt as stripLegacyDeliveryFields, Mn as extractImageContentFromSource, Mt as normalizePayloadToSystemText, Nn as normalizeMimeList, Nt as normalizeRequiredName, O as resolveAgentAvatar, On as DEFAULT_INPUT_IMAGE_MIMES, Ot as inferLegacyName, Pn as resolveInputFileLimits, Pt as migrateLegacyCronPayload, Q as resolveModelProfile, Qt as setGatewaySigusr1RestartPolicy, Sr as getAgentRunContext, St as summarizeRestartSentinel, T as createOutboundSendDeps, Tt as normalizeHttpWebhookUrl, Ut as isExternalHookSession, Vt as detectSuspiciousPatterns, X as getActiveEmbeddedRunCount, Xt as markGatewaySigusr1RestartHandled, Yt as isGatewaySigusr1RestartExternallyAllowed, _ as readJsonBodyWithLimit, at as resolveAnnounceTargetFromKey, b as sleepWithAbort, br as clearAgentRunContext, bt as formatRestartSentinelMessage, cr as getActiveTaskCount, ct as resolveOutboundSessionRoute, dn as requestHeartbeatNow, dr as resetAllLanes, dt as resolveOutboundTarget, et as setCliSessionId, f as getPluginToolMeta, fr as setCommandLaneConcurrency, ft as resolveSessionDeliveryTarget, g as handleSlackHttpRequest, gt as runWithModelFallback, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, i as listDescendantRunsForRequester, it as readLatestAssistantReply, jn as extractFileContentFromSource, jt as normalizeOptionalText, kn as DEFAULT_INPUT_MAX_REDIRECTS, kt as normalizeOptionalAgentId, l as applyToolPolicyPipeline, m as loadSymiPlugins, mr as CommandLane, mt as resetDirectoryCache, n as countActiveRunsForSession, pr as waitForActiveTasks, q as resolveCronStyleNow, qt as deferGatewayRestartUntilIdle, r as initSubagentRegistry, rt as createSymiTools, s as runSubagentAnnounceFlow, t as countActiveDescendantRuns, tt as runCliAgent, u as buildDefaultToolPolicyPipelineSteps, ur as getTotalQueueSize, v as requestBodyErrorToText, vt as consumeRestartSentinel, wr as registerAgentRunContext, x as agentCommand, xr as emitAgentEvent, y as computeBackoff, yr as stripHeartbeatToken } from "./subagent-registry-
|
|
24
|
+
import { $ as getCliSessionId, $t as setPreRestartDeferralCheck, An as DEFAULT_INPUT_TIMEOUT_MS, At as normalizeOptionalSessionKey, Bt as buildSafeExternalPrompt, Cn as enqueueSystemEvent, Cr as onAgentEvent, Dn as DEFAULT_INPUT_IMAGE_MAX_BYTES, E as createDefaultDeps, F as buildHistoryContextFromEntries, Ft as buildDeliveryFromLegacyPayload, H as getTotalPendingReplies, Ht as getHookType, In as resolveAgentTimeoutMs, It as hasLegacyDeliveryHints, J as runAgentTurn, Jt as emitGatewayRestart, Kt as consumeGatewaySigusr1RestartAuthorization, Lt as stripLegacyDeliveryFields, Mn as extractImageContentFromSource, Mt as normalizePayloadToSystemText, Nn as normalizeMimeList, Nt as normalizeRequiredName, O as resolveAgentAvatar, On as DEFAULT_INPUT_IMAGE_MIMES, Ot as inferLegacyName, Pn as resolveInputFileLimits, Pt as migrateLegacyCronPayload, Q as resolveModelProfile, Qt as setGatewaySigusr1RestartPolicy, Sr as getAgentRunContext, St as summarizeRestartSentinel, T as createOutboundSendDeps, Tt as normalizeHttpWebhookUrl, Ut as isExternalHookSession, Vt as detectSuspiciousPatterns, X as getActiveEmbeddedRunCount, Xt as markGatewaySigusr1RestartHandled, Yt as isGatewaySigusr1RestartExternallyAllowed, _ as readJsonBodyWithLimit, at as resolveAnnounceTargetFromKey, b as sleepWithAbort, br as clearAgentRunContext, bt as formatRestartSentinelMessage, cr as getActiveTaskCount, ct as resolveOutboundSessionRoute, dn as requestHeartbeatNow, dr as resetAllLanes, dt as resolveOutboundTarget, et as setCliSessionId, f as getPluginToolMeta, fr as setCommandLaneConcurrency, ft as resolveSessionDeliveryTarget, g as handleSlackHttpRequest, gt as runWithModelFallback, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, i as listDescendantRunsForRequester, it as readLatestAssistantReply, jn as extractFileContentFromSource, jt as normalizeOptionalText, kn as DEFAULT_INPUT_MAX_REDIRECTS, kt as normalizeOptionalAgentId, l as applyToolPolicyPipeline, m as loadSymiPlugins, mr as CommandLane, mt as resetDirectoryCache, n as countActiveRunsForSession, pr as waitForActiveTasks, q as resolveCronStyleNow, qt as deferGatewayRestartUntilIdle, r as initSubagentRegistry, rt as createSymiTools, s as runSubagentAnnounceFlow, t as countActiveDescendantRuns, tt as runCliAgent, u as buildDefaultToolPolicyPipelineSteps, ur as getTotalQueueSize, v as requestBodyErrorToText, vt as consumeRestartSentinel, wr as registerAgentRunContext, x as agentCommand, xr as emitAgentEvent, y as computeBackoff, yr as stripHeartbeatToken } from "./subagent-registry-J2pIBQF7.js";
|
|
25
25
|
import { D as resolveSessionResetPolicy, F as resolveMainSessionKey, H as cleanStaleLockFiles, I as resolveMainSessionKeyFromConfig, K as mergeDeliveryContext, M as canonicalizeMainSessionAlias, N as resolveAgentMainSessionKey, T as evaluateSessionFreshness, W as deliveryContextFromSession, d as updateSessionStore, n as parseSessionThreadInfo, o as loadSessionStore } from "./sessions-CJXnZVjR.js";
|
|
26
26
|
import { a as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-Csntmwwn.js";
|
|
27
27
|
import { n as listChannelPlugins, o as normalizeWhatsAppTarget, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
|
|
@@ -130,20 +130,20 @@ import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } fr
|
|
|
130
130
|
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-BtG9rny3.js";
|
|
131
131
|
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-Byo5jCLN.js";
|
|
132
132
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-CA_XIzr_.js";
|
|
133
|
-
import { i as pickGatewaySelfPresence } from "./status-
|
|
134
|
-
import { a as styleHealthChannelLine, l as startHeartbeatRunner, n as getHealthSnapshot, s as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-
|
|
133
|
+
import { i as pickGatewaySelfPresence } from "./status-D-IvYfjk.js";
|
|
134
|
+
import { a as styleHealthChannelLine, l as startHeartbeatRunner, n as getHealthSnapshot, s as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-CXjAtn1-.js";
|
|
135
135
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BseSWee1.js";
|
|
136
136
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-ZdimP1aU.js";
|
|
137
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
138
|
-
import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-
|
|
139
|
-
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-
|
|
137
|
+
import { t as runOnboardingWizard } from "./onboarding-BA5v1JEG.js";
|
|
138
|
+
import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-BG0N79yY.js";
|
|
139
|
+
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-CVZe5WVN.js";
|
|
140
140
|
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-CzWeiE-Y.js";
|
|
141
|
-
import "./agents.config-
|
|
141
|
+
import "./agents.config-Co1CO8fA.js";
|
|
142
142
|
import "./dm-policy-shared-DJ-61hCT.js";
|
|
143
143
|
import "./node-service-fcZExd22.js";
|
|
144
144
|
import "./status.update-DbmZz0Aq.js";
|
|
145
145
|
import "./skills-install-1ZdwGTnh.js";
|
|
146
|
-
import "./update-runner-
|
|
146
|
+
import "./update-runner-D8AFB8Oi.js";
|
|
147
147
|
import { t as resolveAgentSessionDirs } from "./session-dirs-DWgIYmAt.js";
|
|
148
148
|
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-B51TF6q3.js";
|
|
149
149
|
import { n as forceFreePortAndWait } from "./ports-Dn122MUd.js";
|
|
@@ -11835,7 +11835,7 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
11835
11835
|
});
|
|
11836
11836
|
let glassUiBridgeCleanup = null;
|
|
11837
11837
|
if (!minimalTestGateway) {
|
|
11838
|
-
const { createGlassUiBridge } = await import("./glass-ui-ws-
|
|
11838
|
+
const { createGlassUiBridge } = await import("./glass-ui-ws-iCEtluQU.js");
|
|
11839
11839
|
glassUiBridgeCleanup = createGlassUiBridge({
|
|
11840
11840
|
wss: glassUiWss,
|
|
11841
11841
|
context: gatewayRequestContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as expandHomePrefix, g as resolveStateDir, i as isNixMode, l as resolveGatewayLockDir, o as resolveConfigPath, r as STATE_DIR, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, E as truncateUtf16Safe, H as getLogger, P as setVerbose, R as colorize, S as shortenHomePath, U as getResolvedLoggerSettings, V as getChildLogger, c as ensureDir, t as CONFIG_DIR, y as resolveUserPath, z as isRich } from "./utils-B-0b9bGM.js";
|
|
3
3
|
import { d as supportsXHighThinking, l as normalizeVerboseLevel, s as normalizeThinkLevel } from "./thinking-EAliFiVK.js";
|
|
4
|
-
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, _ as loadCombinedSessionStoreForGateway, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, g as listSessionsFromStore, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-
|
|
4
|
+
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, _ as loadCombinedSessionStoreForGateway, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, g as listSessionsFromStore, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-DUZvOCsG.js";
|
|
5
5
|
import { S as parseAgentSessionKey, c as normalizeMainKey, f as toAgentRequestSessionKey, l as resolveAgentIdFromSessionKey, m as DEFAULT_ACCOUNT_ID, p as toAgentStoreSessionKey, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, x as isSubagentSessionKey, y as isCronRunSessionKey } from "./session-key-DCt45XZa.js";
|
|
6
6
|
import { r as matchesSkillFilter, t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
7
7
|
import { C as createInternalHookEvent, S as clearInternalHooks, T as triggerInternalHook, m as createEmptyPluginRegistry, r as DEFAULT_CHAT_CHANNEL, w as registerInternalHook } from "./registry-Cja8eT7G.js";
|
|
@@ -135,20 +135,20 @@ import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } fr
|
|
|
135
135
|
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-BJvwnR5z.js";
|
|
136
136
|
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-CrITRV6w.js";
|
|
137
137
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-BHTF5p0X.js";
|
|
138
|
-
import { r as pickGatewaySelfPresence } from "./status-
|
|
139
|
-
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-
|
|
138
|
+
import { r as pickGatewaySelfPresence } from "./status-Cd9-xWsZ.js";
|
|
139
|
+
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-B32Q-KYM.js";
|
|
140
140
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Z947tKLt.js";
|
|
141
141
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-CtckACbb.js";
|
|
142
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
143
|
-
import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-
|
|
144
|
-
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-
|
|
142
|
+
import { t as runOnboardingWizard } from "./onboarding-DioGtMFo.js";
|
|
143
|
+
import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-dgW-8gC7.js";
|
|
144
|
+
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-CflJh75N.js";
|
|
145
145
|
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-Bv0M7ka7.js";
|
|
146
|
-
import "./agents.config-
|
|
146
|
+
import "./agents.config-B3GILTs5.js";
|
|
147
147
|
import "./dm-policy-shared-Bh3TbexU.js";
|
|
148
148
|
import "./node-service-Cxz4e-Qd.js";
|
|
149
149
|
import "./status.update-DtwCUTf-.js";
|
|
150
150
|
import "./skills-install-D67isO1L.js";
|
|
151
|
-
import "./update-runner-
|
|
151
|
+
import "./update-runner-DvZOsoQs.js";
|
|
152
152
|
import { t as resolveAgentSessionDirs } from "./session-dirs-DWgIYmAt.js";
|
|
153
153
|
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-CYxdoAlY.js";
|
|
154
154
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -11839,7 +11839,7 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
11839
11839
|
});
|
|
11840
11840
|
let glassUiBridgeCleanup = null;
|
|
11841
11841
|
if (!minimalTestGateway) {
|
|
11842
|
-
const { createGlassUiBridge } = await import("./glass-ui-ws-
|
|
11842
|
+
const { createGlassUiBridge } = await import("./glass-ui-ws-D0Yv090T.js");
|
|
11843
11843
|
glassUiBridgeCleanup = createGlassUiBridge({
|
|
11844
11844
|
wss: glassUiWss,
|
|
11845
11845
|
context: gatewayRequestContext,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { s as resolveStateDir } from "./paths-
|
|
2
|
+
import { s as resolveStateDir } from "./paths-CE7eVGHg.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
|
|
6
6
|
//#region src/infra/json-file.ts
|
|
7
7
|
function loadJsonFile(pathname) {
|
|
8
8
|
try {
|
|
9
|
-
if (!
|
|
10
|
-
const raw =
|
|
9
|
+
if (!fs.existsSync(pathname)) return;
|
|
10
|
+
const raw = fs.readFileSync(pathname, "utf8");
|
|
11
11
|
return JSON.parse(raw);
|
|
12
12
|
} catch {
|
|
13
13
|
return;
|
|
@@ -15,12 +15,12 @@ function loadJsonFile(pathname) {
|
|
|
15
15
|
}
|
|
16
16
|
function saveJsonFile(pathname, data) {
|
|
17
17
|
const dir = path.dirname(pathname);
|
|
18
|
-
if (!
|
|
18
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, {
|
|
19
19
|
recursive: true,
|
|
20
20
|
mode: 448
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
fs.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
23
|
+
fs.chmodSync(pathname, 384);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./paths-Cqn-zk3M.js";
|
|
2
2
|
import "./utils-B-0b9bGM.js";
|
|
3
3
|
import "./thinking-EAliFiVK.js";
|
|
4
|
-
import "./reply-
|
|
4
|
+
import "./reply-DUZvOCsG.js";
|
|
5
5
|
import "./registry-Cja8eT7G.js";
|
|
6
6
|
import "./subsystem-D9vIQve0.js";
|
|
7
7
|
import "./exec-CWkblSrI.js";
|
|
@@ -113,18 +113,18 @@ import "./service-Cl74hx8J.js";
|
|
|
113
113
|
import "./diagnostics-BAMlsVVX.js";
|
|
114
114
|
import "./table-BTgkRafz.js";
|
|
115
115
|
import "./audit-CrITRV6w.js";
|
|
116
|
-
import "./status-
|
|
117
|
-
import "./health-
|
|
116
|
+
import "./status-Cd9-xWsZ.js";
|
|
117
|
+
import "./health-B32Q-KYM.js";
|
|
118
118
|
import "./control-ui-assets-Z947tKLt.js";
|
|
119
119
|
import "./update-check-CtckACbb.js";
|
|
120
|
-
import { n as handleGatewayRequest } from "./server-methods-
|
|
121
|
-
import "./push-apns-
|
|
122
|
-
import "./agents.config-
|
|
120
|
+
import { n as handleGatewayRequest } from "./server-methods-dgW-8gC7.js";
|
|
121
|
+
import "./push-apns-CflJh75N.js";
|
|
122
|
+
import "./agents.config-B3GILTs5.js";
|
|
123
123
|
import "./dm-policy-shared-Bh3TbexU.js";
|
|
124
124
|
import "./node-service-Cxz4e-Qd.js";
|
|
125
125
|
import "./status.update-DtwCUTf-.js";
|
|
126
126
|
import "./skills-install-D67isO1L.js";
|
|
127
|
-
import "./update-runner-
|
|
127
|
+
import "./update-runner-DvZOsoQs.js";
|
|
128
128
|
|
|
129
129
|
//#region src/gateway/glass-ui-ws.ts
|
|
130
130
|
const SESSION_KEY = "agent:main:main";
|
|
@@ -13,7 +13,7 @@ import "./client-DMBZpU6X.js";
|
|
|
13
13
|
import "./call-BcE47FtD.js";
|
|
14
14
|
import "./message-channel-C9dERklz.js";
|
|
15
15
|
import "./pairing-token-Byh6drgn.js";
|
|
16
|
-
import "./subagent-registry-
|
|
16
|
+
import "./subagent-registry-J2pIBQF7.js";
|
|
17
17
|
import "./sessions-CJXnZVjR.js";
|
|
18
18
|
import "./tokens-Csntmwwn.js";
|
|
19
19
|
import "./plugins-CwSlLxM8.js";
|
|
@@ -108,18 +108,18 @@ import "./service-Cm9j9WzQ.js";
|
|
|
108
108
|
import "./diagnostics-CS1ov_hH.js";
|
|
109
109
|
import "./table-D01d2GuY.js";
|
|
110
110
|
import "./audit-Byo5jCLN.js";
|
|
111
|
-
import "./status-
|
|
112
|
-
import "./health-
|
|
111
|
+
import "./status-D-IvYfjk.js";
|
|
112
|
+
import "./health-CXjAtn1-.js";
|
|
113
113
|
import "./control-ui-assets-BseSWee1.js";
|
|
114
114
|
import "./update-check-ZdimP1aU.js";
|
|
115
|
-
import { n as handleGatewayRequest } from "./server-methods-
|
|
116
|
-
import "./push-apns-
|
|
117
|
-
import "./agents.config-
|
|
115
|
+
import { n as handleGatewayRequest } from "./server-methods-BG0N79yY.js";
|
|
116
|
+
import "./push-apns-CVZe5WVN.js";
|
|
117
|
+
import "./agents.config-Co1CO8fA.js";
|
|
118
118
|
import "./dm-policy-shared-DJ-61hCT.js";
|
|
119
119
|
import "./node-service-fcZExd22.js";
|
|
120
120
|
import "./status.update-DbmZz0Aq.js";
|
|
121
121
|
import "./skills-install-1ZdwGTnh.js";
|
|
122
|
-
import "./update-runner-
|
|
122
|
+
import "./update-runner-D8AFB8Oi.js";
|
|
123
123
|
|
|
124
124
|
//#region src/gateway/glass-ui-ws.ts
|
|
125
125
|
const SESSION_KEY = "agent:main:main";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as theme, k as info, l as escapeRegExp, z as isRich } from "./utils-B-0b9bGM.js";
|
|
2
|
-
import { At as resolveHeartbeatDeliveryTarget, Cr as peekSystemEventEntries, Vn as resolveUserTimezone, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ct as setHeartbeatWakeHandler, dr as resolveHeartbeatPrompt$1, fr as stripHeartbeatToken, jt as resolveHeartbeatSenderContext, lr as DEFAULT_HEARTBEAT_EVERY, lt as resolveHeartbeatReasonKind, nr as getQueueSize, r as appendCronStyleCurrentTimeLine, sr as CommandLane, st as requestHeartbeatNow, t as getReplyFromConfig, ur as isHeartbeatContentEffectivelyEmpty } from "./reply-
|
|
2
|
+
import { At as resolveHeartbeatDeliveryTarget, Cr as peekSystemEventEntries, Vn as resolveUserTimezone, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ct as setHeartbeatWakeHandler, dr as resolveHeartbeatPrompt$1, fr as stripHeartbeatToken, jt as resolveHeartbeatSenderContext, lr as DEFAULT_HEARTBEAT_EVERY, lt as resolveHeartbeatReasonKind, nr as getQueueSize, r as appendCronStyleCurrentTimeLine, sr as CommandLane, st as requestHeartbeatNow, t as getReplyFromConfig, ur as isHeartbeatContentEffectivelyEmpty } from "./reply-DUZvOCsG.js";
|
|
3
3
|
import { l as resolveAgentIdFromSessionKey, p as toAgentStoreSessionKey, s as normalizeAgentId } from "./session-key-DCt45XZa.js";
|
|
4
4
|
import { f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
|
|
5
5
|
import { b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-CgUHAtCo.js";
|
|
@@ -4,7 +4,7 @@ import { l as resolveAgentIdFromSessionKey, p as toAgentStoreSessionKey, s as no
|
|
|
4
4
|
import { b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-D-jRCY0d.js";
|
|
5
5
|
import { C as parseDurationMs, i as loadConfig } from "./config-DHBLS1Hl.js";
|
|
6
6
|
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-BcE47FtD.js";
|
|
7
|
-
import { Jn as resolveUserTimezone, K as appendCronStyleCurrentTimeLine, Tn as peekSystemEventEntries, W as getReplyFromConfig, _r as isHeartbeatContentEffectivelyEmpty, dn as requestHeartbeatNow, fn as setHeartbeatWakeHandler, gr as DEFAULT_HEARTBEAT_EVERY, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, lr as getQueueSize, lt as resolveHeartbeatDeliveryTarget, mr as CommandLane, pn as resolveHeartbeatReasonKind, ut as resolveHeartbeatSenderContext, vr as resolveHeartbeatPrompt$1, yr as stripHeartbeatToken } from "./subagent-registry-
|
|
7
|
+
import { Jn as resolveUserTimezone, K as appendCronStyleCurrentTimeLine, Tn as peekSystemEventEntries, W as getReplyFromConfig, _r as isHeartbeatContentEffectivelyEmpty, dn as requestHeartbeatNow, fn as setHeartbeatWakeHandler, gr as DEFAULT_HEARTBEAT_EVERY, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, lr as getQueueSize, lt as resolveHeartbeatDeliveryTarget, mr as CommandLane, pn as resolveHeartbeatReasonKind, ut as resolveHeartbeatSenderContext, vr as resolveHeartbeatPrompt$1, yr as stripHeartbeatToken } from "./subagent-registry-J2pIBQF7.js";
|
|
8
8
|
import { M as canonicalizeMainSessionAlias, N as resolveAgentMainSessionKey, d as updateSessionStore, l as saveSessionStore, o as loadSessionStore } from "./sessions-CJXnZVjR.js";
|
|
9
9
|
import { r as SYMIPULSE_TOKEN } from "./tokens-Csntmwwn.js";
|
|
10
10
|
import { n as listChannelPlugins, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
|
|
@@ -15,7 +15,7 @@ import "./client-DMBZpU6X.js";
|
|
|
15
15
|
import "./call-BcE47FtD.js";
|
|
16
16
|
import "./message-channel-C9dERklz.js";
|
|
17
17
|
import "./pairing-token-Byh6drgn.js";
|
|
18
|
-
import "./subagent-registry-
|
|
18
|
+
import "./subagent-registry-J2pIBQF7.js";
|
|
19
19
|
import "./sessions-CJXnZVjR.js";
|
|
20
20
|
import "./tokens-Csntmwwn.js";
|
|
21
21
|
import "./plugins-CwSlLxM8.js";
|
|
@@ -104,7 +104,7 @@ import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchiv
|
|
|
104
104
|
import { t as renderTable } from "./table-D01d2GuY.js";
|
|
105
105
|
import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-B51TF6q3.js";
|
|
106
106
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-CEoLdlyb.js";
|
|
107
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
107
|
+
import { t as buildPluginStatusReport } from "./status-D4Lr90yH.js";
|
|
108
108
|
import path from "node:path";
|
|
109
109
|
import fs from "node:fs";
|
|
110
110
|
import fs$1 from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, S as shortenHomePath, t as CONFIG_DIR, y as resolveUserPath } from "./utils-B-0b9bGM.js";
|
|
3
3
|
import "./thinking-EAliFiVK.js";
|
|
4
|
-
import "./reply-
|
|
4
|
+
import "./reply-DUZvOCsG.js";
|
|
5
5
|
import "./registry-Cja8eT7G.js";
|
|
6
6
|
import { f as defaultRuntime } from "./subsystem-D9vIQve0.js";
|
|
7
7
|
import "./exec-CWkblSrI.js";
|
|
@@ -108,7 +108,7 @@ import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchiv
|
|
|
108
108
|
import { t as renderTable } from "./table-BTgkRafz.js";
|
|
109
109
|
import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-CYxdoAlY.js";
|
|
110
110
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-BqLZtMLa.js";
|
|
111
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
111
|
+
import { t as buildPluginStatusReport } from "./status-BqhJ-HsW.js";
|
|
112
112
|
import fs from "node:fs";
|
|
113
113
|
import path from "node:path";
|
|
114
114
|
import fs$1 from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { R as shortenHomeInString, k as isRecord } from "./registry-
|
|
3
|
-
import { $ as resolveSymiAgentDir, L as getApiKeyForModel, M as resolveImplicitBedrockProvider, N as resolveImplicitCopilotProvider, P as resolveImplicitProviders, U as normalizeSecretInput, j as normalizeProviders, z as requireApiKey } from "./auth-profiles-
|
|
4
|
-
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-
|
|
5
|
-
import { n as loadConfig } from "./config-
|
|
2
|
+
import { R as shortenHomeInString, k as isRecord } from "./registry-DYq1AYOv.js";
|
|
3
|
+
import { $ as resolveSymiAgentDir, L as getApiKeyForModel, M as resolveImplicitBedrockProvider, N as resolveImplicitCopilotProvider, P as resolveImplicitProviders, U as normalizeSecretInput, j as normalizeProviders, z as requireApiKey } from "./auth-profiles-DdK1Hxaa.js";
|
|
4
|
+
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-CfqDGQ9J.js";
|
|
5
|
+
import { n as loadConfig } from "./config-5SdHIcHU.js";
|
|
6
6
|
import { n as redactToolDetail } from "./redact-BDMXB06K.js";
|
|
7
7
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Bv5YDJc8.js";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as runExec } from "./workspace-
|
|
1
|
+
import { _ as runExec } from "./workspace-DscDraUb.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { constants } from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
|
-
import fs from "node:fs/promises";
|
|
5
|
+
import fs$1 from "node:fs/promises";
|
|
6
6
|
import { fileTypeFromBuffer } from "file-type";
|
|
7
7
|
|
|
8
8
|
//#region src/infra/fs-safe.ts
|
|
@@ -23,19 +23,19 @@ const isSymlinkOpenError = (err) => isNodeError(err) && (err.code === "ELOOP" ||
|
|
|
23
23
|
async function openVerifiedLocalFile(filePath) {
|
|
24
24
|
let handle;
|
|
25
25
|
try {
|
|
26
|
-
handle = await fs.open(filePath, OPEN_READ_FLAGS);
|
|
26
|
+
handle = await fs$1.open(filePath, OPEN_READ_FLAGS);
|
|
27
27
|
} catch (err) {
|
|
28
28
|
if (isNotFoundError(err)) throw new SafeOpenError("not-found", "file not found");
|
|
29
29
|
if (isSymlinkOpenError(err)) throw new SafeOpenError("symlink", "symlink open blocked", { cause: err });
|
|
30
30
|
throw err;
|
|
31
31
|
}
|
|
32
32
|
try {
|
|
33
|
-
const [stat, lstat] = await Promise.all([handle.stat(), fs.lstat(filePath)]);
|
|
33
|
+
const [stat, lstat] = await Promise.all([handle.stat(), fs$1.lstat(filePath)]);
|
|
34
34
|
if (lstat.isSymbolicLink()) throw new SafeOpenError("symlink", "symlink not allowed");
|
|
35
35
|
if (!stat.isFile()) throw new SafeOpenError("not-file", "not a file");
|
|
36
36
|
if (stat.ino !== lstat.ino || stat.dev !== lstat.dev) throw new SafeOpenError("path-mismatch", "path changed during read");
|
|
37
|
-
const realPath = await fs.realpath(filePath);
|
|
38
|
-
const realStat = await fs.stat(realPath);
|
|
37
|
+
const realPath = await fs$1.realpath(filePath);
|
|
38
|
+
const realStat = await fs$1.stat(realPath);
|
|
39
39
|
if (stat.ino !== realStat.ino || stat.dev !== realStat.dev) throw new SafeOpenError("path-mismatch", "path mismatch");
|
|
40
40
|
return {
|
|
41
41
|
handle,
|
|
@@ -52,7 +52,7 @@ async function openVerifiedLocalFile(filePath) {
|
|
|
52
52
|
async function openFileWithinRoot(params) {
|
|
53
53
|
let rootReal;
|
|
54
54
|
try {
|
|
55
|
-
rootReal = await fs.realpath(params.rootDir);
|
|
55
|
+
rootReal = await fs$1.realpath(params.rootDir);
|
|
56
56
|
} catch (err) {
|
|
57
57
|
if (isNotFoundError(err)) throw new SafeOpenError("not-found", "root dir not found");
|
|
58
58
|
throw err;
|
|
@@ -321,11 +321,11 @@ function readJpegExifOrientation(buffer) {
|
|
|
321
321
|
return null;
|
|
322
322
|
}
|
|
323
323
|
async function withTempDir(fn) {
|
|
324
|
-
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-img-"));
|
|
324
|
+
const dir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-img-"));
|
|
325
325
|
try {
|
|
326
326
|
return await fn(dir);
|
|
327
327
|
} finally {
|
|
328
|
-
await fs.rm(dir, {
|
|
328
|
+
await fs$1.rm(dir, {
|
|
329
329
|
recursive: true,
|
|
330
330
|
force: true
|
|
331
331
|
}).catch(() => {});
|
|
@@ -334,7 +334,7 @@ async function withTempDir(fn) {
|
|
|
334
334
|
async function sipsMetadataFromBuffer(buffer) {
|
|
335
335
|
return await withTempDir(async (dir) => {
|
|
336
336
|
const input = path.join(dir, "in.img");
|
|
337
|
-
await fs.writeFile(input, buffer);
|
|
337
|
+
await fs$1.writeFile(input, buffer);
|
|
338
338
|
const { stdout } = await runExec("/usr/bin/sips", [
|
|
339
339
|
"-g",
|
|
340
340
|
"pixelWidth",
|
|
@@ -362,7 +362,7 @@ async function sipsResizeToJpeg(params) {
|
|
|
362
362
|
return await withTempDir(async (dir) => {
|
|
363
363
|
const input = path.join(dir, "in.img");
|
|
364
364
|
const output = path.join(dir, "out.jpg");
|
|
365
|
-
await fs.writeFile(input, params.buffer);
|
|
365
|
+
await fs$1.writeFile(input, params.buffer);
|
|
366
366
|
await runExec("/usr/bin/sips", [
|
|
367
367
|
"-Z",
|
|
368
368
|
String(Math.max(1, Math.round(params.maxSide))),
|
|
@@ -379,14 +379,14 @@ async function sipsResizeToJpeg(params) {
|
|
|
379
379
|
timeoutMs: 2e4,
|
|
380
380
|
maxBuffer: 1024 * 1024
|
|
381
381
|
});
|
|
382
|
-
return await fs.readFile(output);
|
|
382
|
+
return await fs$1.readFile(output);
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
async function sipsConvertToJpeg(buffer) {
|
|
386
386
|
return await withTempDir(async (dir) => {
|
|
387
387
|
const input = path.join(dir, "in.heic");
|
|
388
388
|
const output = path.join(dir, "out.jpg");
|
|
389
|
-
await fs.writeFile(input, buffer);
|
|
389
|
+
await fs$1.writeFile(input, buffer);
|
|
390
390
|
await runExec("/usr/bin/sips", [
|
|
391
391
|
"-s",
|
|
392
392
|
"format",
|
|
@@ -398,7 +398,7 @@ async function sipsConvertToJpeg(buffer) {
|
|
|
398
398
|
timeoutMs: 2e4,
|
|
399
399
|
maxBuffer: 1024 * 1024
|
|
400
400
|
});
|
|
401
|
-
return await fs.readFile(output);
|
|
401
|
+
return await fs$1.readFile(output);
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
404
|
async function getImageMetadata(buffer) {
|
|
@@ -449,7 +449,7 @@ async function sipsApplyOrientation(buffer, orientation) {
|
|
|
449
449
|
return await withTempDir(async (dir) => {
|
|
450
450
|
const input = path.join(dir, "in.jpg");
|
|
451
451
|
const output = path.join(dir, "out.jpg");
|
|
452
|
-
await fs.writeFile(input, buffer);
|
|
452
|
+
await fs$1.writeFile(input, buffer);
|
|
453
453
|
await runExec("/usr/bin/sips", [
|
|
454
454
|
...ops,
|
|
455
455
|
input,
|
|
@@ -459,7 +459,7 @@ async function sipsApplyOrientation(buffer, orientation) {
|
|
|
459
459
|
timeoutMs: 2e4,
|
|
460
460
|
maxBuffer: 1024 * 1024
|
|
461
461
|
});
|
|
462
|
-
return await fs.readFile(output);
|
|
462
|
+
return await fs$1.readFile(output);
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
async function resizeToJpeg(params) {
|