@symerian/symi 2.8.12 → 2.8.14
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-BuZxOb3B.js → accounts-Bsg6r6H7.js} +1 -1
- package/dist/{accounts-BRw8yhIW.js → accounts-BsgY6sda.js} +21 -21
- package/dist/{accounts-3dCrO3oZ.js → accounts-wWWkC0JH.js} +1 -1
- package/dist/{active-listener-BVZOh2T1.js → active-listener-AVNn5_U9.js} +1 -1
- package/dist/{agent-scope-CpEJ0B88.js → agent-scope-Cpm7a9ss.js} +3 -3
- package/dist/{agents-OAonMxYV.js → agents-DlAvDWxz.js} +4 -4
- package/dist/{agents.config-BIhaDwT2.js → agents.config-BKKMbeeE.js} +1 -1
- package/dist/{agents.config-DGu_K5xz.js → agents.config-Dd-11klq.js} +1 -1
- package/dist/{audio-preflight-Cb-T0r6e.js → audio-preflight-rrz8KyHd.js} +29 -29
- package/dist/{audit-Bi9Je9FZ.js → audit-BhCJV2l6.js} +1 -1
- package/dist/{audit-Oa5dsn5p.js → audit-CB97BqHJ.js} +1 -1
- package/dist/{auth-choice-BvPX7B4c.js → auth-choice-C6woT6k2.js} +1 -1
- package/dist/{auth-choice-DDzWns1k.js → auth-choice-CRQRPwQt.js} +1 -1
- package/dist/{auth-profiles-C2vj6htZ.js → auth-profiles-BzB_Exeq.js} +17 -17
- package/dist/{banner-BFdiq-O5.js → banner-DrNha2_N.js} +1 -1
- package/dist/{bindings-BsHoBLIE.js → bindings-xcRox9xM.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +54 -54
- 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 +54 -54
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-D8QD7GoV.js → channel-activity-CzHaIUAp.js} +1 -1
- package/dist/{channel-options-DTqUB0OP.js → channel-options-D8q9En4T.js} +1 -1
- package/dist/{channel-options-tfnOGSNF.js → channel-options-DYy2sCfN.js} +1 -1
- package/dist/{channel-web-CcUXobcu.js → channel-web-CRBU4eZk.js} +1 -1
- package/dist/{channels-cli-CmShA-wJ.js → channels-cli-BUk43hHR.js} +7 -7
- package/dist/{channels-cli-BcE5tHIr.js → channels-cli-Dk3kUw9A.js} +7 -7
- package/dist/{chrome-ROtrXlNs.js → chrome-DwXnykXR.js} +14 -14
- package/dist/{chunk-BRe1o4Af.js → chunk-BcxcL1U3.js} +1 -1
- package/dist/{cli-BxoD2wzk.js → cli-5gWsnsB7.js} +4 -4
- package/dist/{cli-CKG2iAr3.js → cli-DjZzJy3t.js} +4 -4
- package/dist/{command-registry-D1Le-Fmh.js → command-registry-LjFltTU9.js} +10 -10
- package/dist/{commands-registry-DxbSTLNQ.js → commands-registry-ByGkL6hs.js} +4 -4
- package/dist/{completion-cli-DgiFjSGS.js → completion-cli-BVTGy8th.js} +1 -1
- package/dist/{completion-cli-D9pC-ttw.js → completion-cli-Cf6fYZWL.js} +2 -2
- package/dist/{config-BkZ9HOKT.js → config-C4WnAd-c.js} +17 -17
- package/dist/{config-cli-C_uZQsTl.js → config-cli-C7DIbGxx.js} +1 -1
- package/dist/{config-cli-5mFA0UDP.js → config-cli-EgWrCemi.js} +1 -1
- package/dist/{configure-BJcy7wXm.js → configure-B67uIawm.js} +3 -3
- package/dist/{configure-DuRTFCuW.js → configure-Bk-snuxh.js} +3 -3
- package/dist/{consolidate-07QMweFF.js → consolidate-DRtVvG2U.js} +4 -4
- package/dist/{deliver-B0OUq6RP.js → deliver-SLYAWE19.js} +20 -20
- package/dist/{diagnostic-BUcR3Meg.js → diagnostic-DTkZsRNM.js} +1 -1
- package/dist/{doctor-completion-sQVhKKei.js → doctor-completion-By066O3p.js} +1 -1
- package/dist/{doctor-completion-DCRTHpiY.js → doctor-completion-lE_33xaY.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-BDXYbTKj.js → env-CB65jmJQ.js} +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CT1M0pRK.js} +4 -4
- package/dist/{gateway-cli-C3ujhxO0.js → gateway-cli-C6uT2x34.js} +182 -13
- package/dist/{gateway-cli-C_MT4JFm.js → gateway-cli-DqEgqVKC.js} +182 -13
- package/dist/{gemini-auth-BefM10YB.js → gemini-auth-D80BsXr2.js} +1 -1
- package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
- package/dist/{glass-ui-ws-ColAiWUr.js → glass-ui-ws-77TY57IO.js} +11 -11
- package/dist/{glass-ui-ws-B7zRY2BL.js → glass-ui-ws-CLAUHeZR.js} +11 -11
- package/dist/{health-C12hy3Ao.js → health-2jkjZxY8.js} +1 -1
- package/dist/{health-vKJZ7iJR.js → health-CvMHgR-L.js} +1 -1
- package/dist/{hooks-cli-CdUQvj8s.js → hooks-cli-CRZySOiz.js} +5 -5
- package/dist/{hooks-cli-fCPl5hur.js → hooks-cli-DSaezFsD.js} +5 -5
- package/dist/{image-BuVL0jHI.js → image-BHF_fnIp.js} +4 -4
- package/dist/{image-ops-C7CauEK8.js → image-ops-CY7v6vvp.js} +16 -16
- package/dist/index.js +9 -9
- package/dist/{internal-DjnxpF_K.js → internal-FNqguZSK.js} +11 -11
- package/dist/{ir-7tMVY7D_.js → ir-D6MiJpAy.js} +4 -4
- package/dist/llm-slug-generator.js +54 -54
- package/dist/{local-roots-ClipCZ9s.js → local-roots-tcdaIEhh.js} +5 -5
- package/dist/{login-D4rZWBXe.js → login-D4ZkmSrY.js} +7 -7
- package/dist/{login-qr-DdAVHOEC.js → login-qr-C9ftIq3n.js} +12 -12
- package/dist/{manager-DHRBy5oR.js → manager-BtWtmpxN.js} +1 -1
- package/dist/{manager-CLrJn9l-.js → manager-DDELj5o9.js} +1 -1
- package/dist/{manager-BJvYQ7xP.js → manager-DrmlegR2.js} +1 -1
- package/dist/{manager-Df_ZdrNG.js → manager-DxCmjSfP.js} +24 -24
- package/dist/{manifest-registry-CBCGTsIb.js → manifest-registry-BvGv6lp9.js} +19 -19
- package/dist/{markdown-tables-x2Xe2UXh.js → markdown-tables-CE-qSMGB.js} +1 -1
- package/dist/{memory-cli-T-a5-lqZ.js → memory-cli-ENCASZJk.js} +3 -3
- package/dist/{memory-cli-BgJciaHC.js → memory-cli-Qgbcxvuf.js} +3 -3
- package/dist/{message-channel-OlFBYAw8.js → message-channel-lwVT8QjK.js} +1 -1
- package/dist/{models-BXXV_sZU.js → models-COhUz7M9.js} +2 -2
- package/dist/{models-cli-BI-DyItH.js → models-cli-CCxYcF4R.js} +5 -5
- package/dist/{models-cli-Bs6JAGq-.js → models-cli-CYvXBvmZ.js} +6 -6
- package/dist/{onboard-Czi_FRdi.js → onboard-CQNUYBIp.js} +2 -2
- package/dist/{onboard-channels-sTuhQBVu.js → onboard-channels-9erx07qe.js} +1 -1
- package/dist/{onboard-channels-BUCYZF02.js → onboard-channels-CWw8G-6n.js} +1 -1
- package/dist/{onboard-DKDCWveE.js → onboard-fVpLVnwg.js} +2 -2
- package/dist/{onboarding-Bgx0qZhA.js → onboarding-CtEiH9WG.js} +3 -3
- package/dist/{onboarding-CokRRVEi.js → onboarding-D-OIkDwZ.js} +3 -3
- package/dist/{onboarding.finalize-BCv5jB0d.js → onboarding.finalize-BY3HNjX4.js} +9 -9
- package/dist/{onboarding.finalize-BzEKyraI.js → onboarding.finalize-DTbpLV-T.js} +8 -8
- package/dist/{outbound-Zmd7UyQH.js → outbound-C6Gm22UF.js} +7 -7
- package/dist/{outbound-attachment-DeCnZT-8.js → outbound-attachment-BWyKV1Gy.js} +2 -2
- package/dist/paths-CYmyCDsE.js +212 -0
- package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
- package/dist/{pi-auth-json-RXOlh8ar.js → pi-auth-json-Bv1NzJdR.js} +1 -1
- package/dist/{pi-embedded-DXY7TLac.js → pi-embedded-CdOdQw2i.js} +265 -13
- package/dist/{pi-embedded-helpers-D1_Sab0M.js → pi-embedded-helpers-DwQ9wJeT.js} +73 -73
- package/dist/{pi-tools.policy-BZrM6a-w.js → pi-tools.policy-Bx5zp45n.js} +2 -0
- package/dist/{pi-tools.policy-QIVWAVVI.js → pi-tools.policy-o0ytjRqu.js} +2 -0
- package/dist/{plugin-registry-CyrsJDyE.js → plugin-registry-BrJ0-qlu.js} +1 -1
- package/dist/{plugin-registry-B2cpTmJz.js → plugin-registry-Cuc8ORuR.js} +1 -1
- package/dist/plugin-sdk/agents/pi-embedded-runner/long-task-prompt.d.ts +7 -0
- package/dist/plugin-sdk/agents/tools/task-tool.d.ts +7 -0
- package/dist/plugin-sdk/{channel-web-t6enTxNE.js → channel-web-t8UOP6Zu.js} +1 -1
- package/dist/plugin-sdk/index.js +3 -3
- package/dist/plugin-sdk/{manager-LRE7zEk2.js → manager-BPm5oefC.js} +1 -1
- package/dist/plugin-sdk/{reply-JypoGhql.js → reply-BKAHTugL.js} +265 -13
- package/dist/plugin-sdk/{synthesis-_WpVyZKx.js → synthesis-CVF7Fwhd.js} +2 -2
- package/dist/plugin-sdk/{web-BTVj4kiQ.js → web-D0DsmFvw.js} +3 -3
- package/dist/{plugins-cli-B-zoQyqU.js → plugins-cli-BDalhI46.js} +5 -5
- package/dist/{plugins-cli-DJwRd3EZ.js → plugins-cli-DFmriy-c.js} +5 -5
- package/dist/{plugins-BzmbgY7s.js → plugins-v8k1XVOy.js} +9 -9
- package/dist/{program-H7h6Iqrq.js → program-DKh41c2a.js} +10 -10
- package/dist/{program-context-BgecQAHU.js → program-context-Cq7pqOrw.js} +19 -19
- package/dist/{prompt-select-styled-BglmD29e.js → prompt-select-styled-BFCAZLwK.js} +6 -6
- package/dist/{prompt-select-styled-BDN2o35i.js → prompt-select-styled-DvvSE_ni.js} +6 -6
- package/dist/{provider-auth-helpers-BGIgr7xM.js → provider-auth-helpers-B-LkDxxi.js} +1 -1
- package/dist/{provider-auth-helpers-MfKmTeLY.js → provider-auth-helpers-DXppgV1l.js} +1 -1
- package/dist/{push-apns-b6bH1EBC.js → push-apns-DCA47WA5.js} +1 -1
- package/dist/{push-apns-IcfSTzfr.js → push-apns-DvudhEAb.js} +1 -1
- package/dist/{pw-ai-DWkC5eGA.js → pw-ai-XGqnSWju.js} +11 -11
- package/dist/{qmd-manager-BXkbA8Y9.js → qmd-manager-CbRJhonG.js} +8 -8
- package/dist/{register.agent-ChwMSIC4.js → register.agent-_BV5KyFb.js} +9 -9
- package/dist/{register.agent-BgyETrrj.js → register.agent-aFj_SMi3.js} +8 -8
- package/dist/{register.configure-DH3L2tqW.js → register.configure-CvOoD5gE.js} +9 -9
- package/dist/{register.configure-Bm4CvoLF.js → register.configure-Dx0Uhmlz.js} +9 -9
- package/dist/{register.maintenance-BbOBw1eI.js → register.maintenance-BuZpoSik.js} +10 -10
- package/dist/{register.maintenance-CAyHUEzP.js → register.maintenance-CMeJR7DG.js} +11 -11
- package/dist/{register.message-DheqsiR0.js → register.message-qysZPg3G.js} +5 -5
- package/dist/{register.message-DQ3MOWFE.js → register.message-xxGePuRC.js} +5 -5
- package/dist/{register.onboard-DOJkUhoY.js → register.onboard-1MP2I0q4.js} +7 -7
- package/dist/{register.onboard-CxqR4S1C.js → register.onboard-D4Aow7Gc.js} +7 -7
- package/dist/{register.setup-zdrIJA2P.js → register.setup-BT74aXzA.js} +7 -7
- package/dist/{register.setup-48YBHzMZ.js → register.setup-DzliKkWh.js} +7 -7
- package/dist/{register.status-health-sessions-CeT5pVXb.js → register.status-health-sessions-B3K2gZ72.js} +7 -7
- package/dist/{register.status-health-sessions-CimrhScH.js → register.status-health-sessions-D7VYZlrU.js} +7 -7
- package/dist/{register.subclis-B-zh940S.js → register.subclis-BCy0IDRv.js} +10 -10
- package/dist/{registry-DYq1AYOv.js → registry-X6fUE0K7.js} +19 -19
- package/dist/{replies-CUWXgyx2.js → replies-86F3PldM.js} +3 -3
- package/dist/{reply-CUR4xpYM.js → reply-Dg1ZU3DZ.js} +263 -13
- package/dist/{reply-prefix-CvEIl6_d.js → reply-prefix-CI_IdwqH.js} +1 -1
- package/dist/{resolve-route-Jy5dFY67.js → resolve-route-BgSuN9c6.js} +4 -4
- package/dist/{retry-B-y5suGA.js → retry-4oEAHckB.js} +1 -1
- package/dist/{run-main-CW_kj5Lj.js → run-main-OS2aFAJ2.js} +18 -18
- package/dist/{runner-ecX1WzDt.js → runner-B5oNTtgf.js} +22 -22
- package/dist/{security-cli-BpnzAB5_.js → security-cli-BadXDWTh.js} +2 -2
- package/dist/{security-cli-D9WEiEjD.js → security-cli-D5y28-RH.js} +2 -2
- package/dist/{send-DFtnbzqy.js → send-ASDB3AzC.js} +7 -7
- package/dist/{send-Bb4it0te.js → send-BTfqlrYd.js} +18 -18
- package/dist/{send-C0QjmPaf.js → send-CSydU49L.js} +10 -10
- package/dist/{send-Cpk3Ti6-.js → send-Du-IfSne.js} +6 -6
- package/dist/{send-BKo1T3HF.js → send-cCTQjuOZ.js} +6 -6
- package/dist/{server-methods-C1h0A5n0.js → server-methods-BszFAkbJ.js} +8 -8
- package/dist/{server-methods-C4id-H_X.js → server-methods-D_iKJ-sj.js} +8 -8
- package/dist/{server-node-events-CD2yDaEj.js → server-node-events-CENHuAVz.js} +5 -5
- package/dist/{server-node-events-BPZEGV_N.js → server-node-events-uBu3XOjd.js} +5 -5
- package/dist/{session-BTeY6Gn2.js → session-D8qLj_xN.js} +8 -8
- package/dist/{skill-commands-DG2lcozb.js → skill-commands-BcOduw6G.js} +16 -16
- package/dist/{skills-CXxrn_e2.js → skills-BrYDT4Jr.js} +24 -24
- package/dist/{sqlite-BN_hIcmu.js → sqlite-P-gMg7fi.js} +3 -3
- package/dist/{status-_xBnHTlx.js → status-BvbJavmh.js} +1 -1
- package/dist/{status-DCeW2a07.js → status-CA0mUJld.js} +4 -4
- package/dist/{status-Cb932Vl4.js → status-CBnCPUMG.js} +4 -4
- package/dist/{status-DvHD1cnq.js → status-DJAeKN4G.js} +1 -1
- package/dist/{store-01F_JM7O.js → store-Ceagbc4L.js} +6 -6
- package/dist/{subagent-registry-BKuL9PdW.js → subagent-registry-C1OyZl-M.js} +263 -13
- package/dist/{subsystem-BjyjJF-d.js → subsystem-CzXhCdeY.js} +1 -1
- package/dist/{synthesis-DOiTUsXQ.js → synthesis-DNTyB7JY.js} +2 -2
- package/dist/{synthesis-BUqDGjlc.js → synthesis-DuqSkHEr.js} +54 -54
- package/dist/{synthesis-C9RputIi.js → synthesis-brHrnNF2.js} +4 -4
- package/dist/{synthesis-Ia9egx87.js → synthesis-z5B41p_r.js} +4 -4
- package/dist/{tables-DoG-pFrf.js → tables-qbCoZrYA.js} +1 -1
- package/dist/{target-errors-DeJTztcq.js → target-errors-uNitqCCT.js} +2 -2
- package/dist/{thinking-BprCy23Z.js → thinking-BV7SCNJP.js} +5 -5
- package/dist/{tokens-W0JzCJJM.js → tokens-Bl5R3wPD.js} +1 -1
- package/dist/{tool-images-SqqWIT22.js → tool-images-JxNglLSr.js} +2 -2
- package/dist/{tool-loop-detection-Dj9h1ogr.js → tool-loop-detection-dfE771kg.js} +3 -3
- package/dist/{unified-runner-CVItnwwP.js → unified-runner-Czg3pdBc.js} +489 -237
- package/dist/{update-cli-ChEABesZ.js → update-cli-0lyGyl31.js} +11 -11
- package/dist/{update-cli-D6ax3jSX.js → update-cli-CIzkVfmj.js} +10 -10
- package/dist/{update-runner-B2EY9BWM.js → update-runner-D7-LDziQ.js} +1 -1
- package/dist/{update-runner-CWG6GxKs.js → update-runner-aYPcKYAN.js} +1 -1
- package/dist/{web-z-yQ8riS.js → web-B90A99YU.js} +58 -58
- package/dist/{web-CpSE67Jp.js → web-BJ5dUZso.js} +5 -5
- package/dist/{web-D6PPeyG7.js → web-CN7wnU7w.js} +4 -4
- package/dist/{web-DMdb2p-h.js → web-Wk1ay1eQ.js} +2 -2
- package/dist/{whatsapp-actions-DmVpLXmh.js → whatsapp-actions-llk0IUn2.js} +23 -23
- package/dist/{workspace-DscDraUb.js → workspace-CywO4ayZ.js} +27 -27
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/learning-loop/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/pipeline/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/skills/long-task/scripts/detach-task.sh +57 -5
|
@@ -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-Dg1ZU3DZ.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";
|
|
@@ -67,8 +67,8 @@ import "./diagnostic-session-state-CUslJyKP.js";
|
|
|
67
67
|
import "./send-DpMnSIi5.js";
|
|
68
68
|
import "./model-ECsJuJew.js";
|
|
69
69
|
import { a as resolveAgentIdentity } from "./reply-prefix-CE2YmmsD.js";
|
|
70
|
-
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-
|
|
71
|
-
import { a as resolveMemorySearchConfig } from "./manager-
|
|
70
|
+
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-ENCASZJk.js";
|
|
71
|
+
import { a as resolveMemorySearchConfig } from "./manager-DrmlegR2.js";
|
|
72
72
|
import "./retry-BoS4e4X_.js";
|
|
73
73
|
import "./sqlite-D55gRQbH.js";
|
|
74
74
|
import { a as ToolInputError } from "./target-errors-C9e6dMU_.js";
|
|
@@ -106,7 +106,7 @@ import "./pairing-labels-CTL1gXZb.js";
|
|
|
106
106
|
import { n as formatTokenCount, r as formatUsd } from "./usage-format-D4P4IiJ6.js";
|
|
107
107
|
import { t as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS } from "./exec-approvals-DEigTi7M.js";
|
|
108
108
|
import "./nodes-screen-BZS89z6C.js";
|
|
109
|
-
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, r as resolveEffectiveToolPolicy } from "./pi-tools.policy-
|
|
109
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, r as resolveEffectiveToolPolicy } from "./pi-tools.policy-Bx5zp45n.js";
|
|
110
110
|
import "./control-service-C0pRqIFv.js";
|
|
111
111
|
import { i as parseAbsoluteTimeMs, n as resolveCronStaggerMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-CZ1Rrj7O.js";
|
|
112
112
|
import { n as resolveMessageChannelSelection } from "./channel-selection-9fIQGtZy.js";
|
|
@@ -134,22 +134,22 @@ import "./diagnostics-1uBuB9IE.js";
|
|
|
134
134
|
import "./table-BWuvjnmY.js";
|
|
135
135
|
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-Curv3BNf.js";
|
|
136
136
|
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-pJIdlnB5.js";
|
|
137
|
-
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-
|
|
137
|
+
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-BhCJV2l6.js";
|
|
138
138
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-CDkyebpA.js";
|
|
139
|
-
import { r as pickGatewaySelfPresence } from "./status-
|
|
140
|
-
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-
|
|
139
|
+
import { r as pickGatewaySelfPresence } from "./status-CA0mUJld.js";
|
|
140
|
+
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-CvMHgR-L.js";
|
|
141
141
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BrP31IQR.js";
|
|
142
142
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-Bbvpax6u.js";
|
|
143
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
144
|
-
import { C as startGatewayConfigReloader, S as resolveCronRunLogPath, _ as MAX_PAYLOAD_BYTES, a as loadFavoritesSet, b as abortChatRunById, c as resolveAssistantIdentity, d as formatError, f as loadVoiceWakeConfig, g as MAX_BUFFERED_BYTES, h as HEALTH_REFRESH_INTERVAL_MS, i as safeParseJson, l as listSystemPresence, m as DEDUPE_TTL_MS, n as handleGatewayRequest, o as reconcileFavorites, p as DEDUPE_MAX, r as broadcastPresenceSnapshot, s as DEFAULT_ASSISTANT_IDENTITY, t as coreGatewayHandlers, u as upsertPresence, v as TICK_INTERVAL_MS, x as appendCronRunLog, y as getHandshakeTimeoutMs } from "./server-methods-
|
|
145
|
-
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-
|
|
143
|
+
import { t as runOnboardingWizard } from "./onboarding-D-OIkDwZ.js";
|
|
144
|
+
import { C as startGatewayConfigReloader, S as resolveCronRunLogPath, _ as MAX_PAYLOAD_BYTES, a as loadFavoritesSet, b as abortChatRunById, c as resolveAssistantIdentity, d as formatError, f as loadVoiceWakeConfig, g as MAX_BUFFERED_BYTES, h as HEALTH_REFRESH_INTERVAL_MS, i as safeParseJson, l as listSystemPresence, m as DEDUPE_TTL_MS, n as handleGatewayRequest, o as reconcileFavorites, p as DEDUPE_MAX, r as broadcastPresenceSnapshot, s as DEFAULT_ASSISTANT_IDENTITY, t as coreGatewayHandlers, u as upsertPresence, v as TICK_INTERVAL_MS, x as appendCronRunLog, y as getHandshakeTimeoutMs } from "./server-methods-D_iKJ-sj.js";
|
|
145
|
+
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-DCA47WA5.js";
|
|
146
146
|
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-CjltkjCx.js";
|
|
147
|
-
import "./agents.config-
|
|
147
|
+
import "./agents.config-Dd-11klq.js";
|
|
148
148
|
import "./dm-policy-shared-KlzpDeT_.js";
|
|
149
149
|
import "./node-service-DxPZ_ZFk.js";
|
|
150
150
|
import "./status.update-8HXdAdwz.js";
|
|
151
151
|
import "./skills-install-B8r7cGKR.js";
|
|
152
|
-
import "./update-runner-
|
|
152
|
+
import "./update-runner-D7-LDziQ.js";
|
|
153
153
|
import { t as resolveAgentSessionDirs } from "./session-dirs-CBqamQff.js";
|
|
154
154
|
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-D2fHsr-Z.js";
|
|
155
155
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -5409,6 +5409,174 @@ function applyGatewayLaneConcurrency(cfg) {
|
|
|
5409
5409
|
setCommandLaneConcurrency(CommandLane.Subagent, resolveSubagentMaxConcurrent(cfg));
|
|
5410
5410
|
}
|
|
5411
5411
|
|
|
5412
|
+
//#endregion
|
|
5413
|
+
//#region src/infra/long-task-janitor.ts
|
|
5414
|
+
const TASK_FILE_SUFFIXES = [
|
|
5415
|
+
".pid",
|
|
5416
|
+
".cmd",
|
|
5417
|
+
".started",
|
|
5418
|
+
".log",
|
|
5419
|
+
".status"
|
|
5420
|
+
];
|
|
5421
|
+
const TASK_FILE_PREFIX = "task-";
|
|
5422
|
+
const DEFAULT_TASK_FILE_AGE_MS = 10080 * 60 * 1e3;
|
|
5423
|
+
const DEFAULT_SWEEP_INTERVAL_MS = 1440 * 60 * 1e3;
|
|
5424
|
+
function defaultIsPidAlive(pid) {
|
|
5425
|
+
try {
|
|
5426
|
+
process.kill(pid, 0);
|
|
5427
|
+
return true;
|
|
5428
|
+
} catch (err) {
|
|
5429
|
+
if (err.code === "EPERM") return true;
|
|
5430
|
+
return false;
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
/**
|
|
5434
|
+
* Sweep dead-task state files from a single workspace directory.
|
|
5435
|
+
*
|
|
5436
|
+
* A task-id is eligible for sweep when its recorded PID is no longer alive
|
|
5437
|
+
* AND the oldest of its state files is older than ageMs. Conservative on
|
|
5438
|
+
* purpose: leaving a stale set for one extra cycle is harmless; deleting
|
|
5439
|
+
* the state of a live task is not.
|
|
5440
|
+
*
|
|
5441
|
+
* Orphans without a `.pid` file (parent crashed before line 180) are also
|
|
5442
|
+
* caught — we key on any task-<id>.<suffix> match.
|
|
5443
|
+
*/
|
|
5444
|
+
async function sweepLongTaskFiles(workdir, options = {}) {
|
|
5445
|
+
const result = {
|
|
5446
|
+
scanned: 0,
|
|
5447
|
+
swept: 0,
|
|
5448
|
+
errors: 0,
|
|
5449
|
+
sweptIds: []
|
|
5450
|
+
};
|
|
5451
|
+
const now = options.now ?? Date.now();
|
|
5452
|
+
const ageMs = options.ageMs ?? DEFAULT_TASK_FILE_AGE_MS;
|
|
5453
|
+
const isPidAlive = options.isPidAlive ?? defaultIsPidAlive;
|
|
5454
|
+
let entries;
|
|
5455
|
+
try {
|
|
5456
|
+
entries = await fs.promises.readdir(workdir);
|
|
5457
|
+
} catch {
|
|
5458
|
+
return result;
|
|
5459
|
+
}
|
|
5460
|
+
const taskIds = /* @__PURE__ */ new Set();
|
|
5461
|
+
for (const entry of entries) {
|
|
5462
|
+
if (!entry.startsWith(TASK_FILE_PREFIX)) continue;
|
|
5463
|
+
for (const suffix of TASK_FILE_SUFFIXES) if (entry.endsWith(suffix)) {
|
|
5464
|
+
const id = entry.slice(5, -suffix.length);
|
|
5465
|
+
if (id.length > 0) taskIds.add(id);
|
|
5466
|
+
break;
|
|
5467
|
+
}
|
|
5468
|
+
}
|
|
5469
|
+
for (const taskId of taskIds) {
|
|
5470
|
+
result.scanned++;
|
|
5471
|
+
const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${taskId}.pid`);
|
|
5472
|
+
let pid = 0;
|
|
5473
|
+
let pidStatMs = null;
|
|
5474
|
+
try {
|
|
5475
|
+
const pidText = await fs.promises.readFile(pidPath, "utf8");
|
|
5476
|
+
pid = Number.parseInt(pidText.trim(), 10);
|
|
5477
|
+
pidStatMs = (await fs.promises.stat(pidPath)).mtimeMs;
|
|
5478
|
+
} catch (err) {
|
|
5479
|
+
if (err.code !== "ENOENT") {
|
|
5480
|
+
result.errors++;
|
|
5481
|
+
continue;
|
|
5482
|
+
}
|
|
5483
|
+
}
|
|
5484
|
+
if (pid > 0 && Number.isFinite(pid) && isPidAlive(pid)) continue;
|
|
5485
|
+
let oldestMs = pidStatMs ?? Number.POSITIVE_INFINITY;
|
|
5486
|
+
for (const suffix of TASK_FILE_SUFFIXES) {
|
|
5487
|
+
if (suffix === ".pid" && pidStatMs !== null) continue;
|
|
5488
|
+
try {
|
|
5489
|
+
const stat = await fs.promises.stat(path.join(workdir, `${TASK_FILE_PREFIX}${taskId}${suffix}`));
|
|
5490
|
+
if (stat.mtimeMs < oldestMs) oldestMs = stat.mtimeMs;
|
|
5491
|
+
} catch {}
|
|
5492
|
+
}
|
|
5493
|
+
if (!Number.isFinite(oldestMs)) continue;
|
|
5494
|
+
if (now - oldestMs < ageMs) continue;
|
|
5495
|
+
let unlinkErrors = 0;
|
|
5496
|
+
for (const suffix of TASK_FILE_SUFFIXES) try {
|
|
5497
|
+
await fs.promises.unlink(path.join(workdir, `${TASK_FILE_PREFIX}${taskId}${suffix}`));
|
|
5498
|
+
} catch (err) {
|
|
5499
|
+
if (err.code !== "ENOENT") unlinkErrors++;
|
|
5500
|
+
}
|
|
5501
|
+
if (unlinkErrors > 0) result.errors++;
|
|
5502
|
+
else {
|
|
5503
|
+
result.swept++;
|
|
5504
|
+
result.sweptIds.push(taskId);
|
|
5505
|
+
}
|
|
5506
|
+
}
|
|
5507
|
+
return result;
|
|
5508
|
+
}
|
|
5509
|
+
async function collectAgentWorkspaces(cfg) {
|
|
5510
|
+
const config = cfg ?? loadConfig();
|
|
5511
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5512
|
+
for (const agentId of listAgentIds(config)) try {
|
|
5513
|
+
const ws = resolveAgentWorkspaceDir(config, agentId);
|
|
5514
|
+
if (ws) seen.add(ws);
|
|
5515
|
+
} catch {}
|
|
5516
|
+
return [...seen];
|
|
5517
|
+
}
|
|
5518
|
+
let janitorTimer = null;
|
|
5519
|
+
let janitorBootKick = null;
|
|
5520
|
+
function startLongTaskJanitor(options = {}) {
|
|
5521
|
+
if (janitorTimer) return () => stopLongTaskJanitor();
|
|
5522
|
+
const log = getChildLogger({ module: "long-task-janitor" });
|
|
5523
|
+
const intervalMs = options.intervalMs ?? DEFAULT_SWEEP_INTERVAL_MS;
|
|
5524
|
+
const ageMs = options.ageMs ?? DEFAULT_TASK_FILE_AGE_MS;
|
|
5525
|
+
const getWorkspaces = options.getWorkspaces ?? (() => collectAgentWorkspaces());
|
|
5526
|
+
const nowFn = options.now ?? Date.now;
|
|
5527
|
+
const sweep = async () => {
|
|
5528
|
+
let workspaces = [];
|
|
5529
|
+
try {
|
|
5530
|
+
workspaces = await getWorkspaces();
|
|
5531
|
+
} catch (err) {
|
|
5532
|
+
log.warn({ err: String(err) }, "long-task-janitor: collect workspaces failed");
|
|
5533
|
+
return;
|
|
5534
|
+
}
|
|
5535
|
+
let scanned = 0;
|
|
5536
|
+
let swept = 0;
|
|
5537
|
+
let errors = 0;
|
|
5538
|
+
for (const ws of workspaces) try {
|
|
5539
|
+
const r = await sweepLongTaskFiles(ws, {
|
|
5540
|
+
now: nowFn(),
|
|
5541
|
+
ageMs
|
|
5542
|
+
});
|
|
5543
|
+
scanned += r.scanned;
|
|
5544
|
+
swept += r.swept;
|
|
5545
|
+
errors += r.errors;
|
|
5546
|
+
} catch (err) {
|
|
5547
|
+
errors++;
|
|
5548
|
+
log.warn({
|
|
5549
|
+
err: String(err),
|
|
5550
|
+
workdir: ws
|
|
5551
|
+
}, "long-task-janitor: sweep failed");
|
|
5552
|
+
}
|
|
5553
|
+
if (swept > 0 || errors > 0) log.info({
|
|
5554
|
+
scanned,
|
|
5555
|
+
swept,
|
|
5556
|
+
errors
|
|
5557
|
+
}, "long-task-janitor: sweep complete");
|
|
5558
|
+
};
|
|
5559
|
+
janitorBootKick = setTimeout(() => {
|
|
5560
|
+
sweep();
|
|
5561
|
+
}, 6e4);
|
|
5562
|
+
janitorBootKick.unref?.();
|
|
5563
|
+
janitorTimer = setInterval(() => {
|
|
5564
|
+
sweep();
|
|
5565
|
+
}, intervalMs);
|
|
5566
|
+
janitorTimer.unref?.();
|
|
5567
|
+
return () => stopLongTaskJanitor();
|
|
5568
|
+
}
|
|
5569
|
+
function stopLongTaskJanitor() {
|
|
5570
|
+
if (janitorTimer) {
|
|
5571
|
+
clearInterval(janitorTimer);
|
|
5572
|
+
janitorTimer = null;
|
|
5573
|
+
}
|
|
5574
|
+
if (janitorBootKick) {
|
|
5575
|
+
clearTimeout(janitorBootKick);
|
|
5576
|
+
janitorBootKick = null;
|
|
5577
|
+
}
|
|
5578
|
+
}
|
|
5579
|
+
|
|
5412
5580
|
//#endregion
|
|
5413
5581
|
//#region src/gateway/server/health-state.ts
|
|
5414
5582
|
let presenceVersion = 1;
|
|
@@ -5497,6 +5665,7 @@ function startGatewayMaintenanceTimers(params) {
|
|
|
5497
5665
|
params.refreshGatewayHealthSnapshot({ probe: true }).catch((err) => params.logHealth.error(`refresh failed: ${formatError(err)}`));
|
|
5498
5666
|
}, HEALTH_REFRESH_INTERVAL_MS);
|
|
5499
5667
|
params.refreshGatewayHealthSnapshot({ probe: true }).catch((err) => params.logHealth.error(`initial refresh failed: ${formatError(err)}`));
|
|
5668
|
+
startLongTaskJanitor();
|
|
5500
5669
|
return {
|
|
5501
5670
|
tickInterval,
|
|
5502
5671
|
healthInterval,
|
|
@@ -11959,7 +12128,7 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
11959
12128
|
});
|
|
11960
12129
|
let glassUiBridgeCleanup = null;
|
|
11961
12130
|
if (!minimalTestGateway) {
|
|
11962
|
-
const { createGlassUiBridge } = await import("./glass-ui-ws-
|
|
12131
|
+
const { createGlassUiBridge } = await import("./glass-ui-ws-77TY57IO.js");
|
|
11963
12132
|
glassUiBridgeCleanup = createGlassUiBridge({
|
|
11964
12133
|
wss: glassUiWss,
|
|
11965
12134
|
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-CYmyCDsE.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync 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 (!fsSync.existsSync(pathname)) return;
|
|
10
|
+
const raw = fsSync.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 (!fsSync.existsSync(dir)) fsSync.mkdirSync(dir, {
|
|
19
19
|
recursive: true,
|
|
20
20
|
mode: 448
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
fsSync.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
23
|
+
fsSync.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 { Ut as resolveModelProfile } from "./reply-
|
|
4
|
+
import { Ut as resolveModelProfile } from "./reply-Dg1ZU3DZ.js";
|
|
5
5
|
import "./registry-Cja8eT7G.js";
|
|
6
6
|
import "./subsystem-D9vIQve0.js";
|
|
7
7
|
import "./exec-CWkblSrI.js";
|
|
@@ -60,8 +60,8 @@ import "./diagnostic-session-state-CUslJyKP.js";
|
|
|
60
60
|
import "./send-DpMnSIi5.js";
|
|
61
61
|
import "./model-ECsJuJew.js";
|
|
62
62
|
import "./reply-prefix-CE2YmmsD.js";
|
|
63
|
-
import "./memory-cli-
|
|
64
|
-
import "./manager-
|
|
63
|
+
import "./memory-cli-ENCASZJk.js";
|
|
64
|
+
import "./manager-DrmlegR2.js";
|
|
65
65
|
import "./retry-BoS4e4X_.js";
|
|
66
66
|
import "./sqlite-D55gRQbH.js";
|
|
67
67
|
import "./target-errors-C9e6dMU_.js";
|
|
@@ -98,7 +98,7 @@ import "./prompt-style-Y2J72w6p.js";
|
|
|
98
98
|
import "./pairing-labels-CTL1gXZb.js";
|
|
99
99
|
import "./exec-approvals-DEigTi7M.js";
|
|
100
100
|
import "./nodes-screen-BZS89z6C.js";
|
|
101
|
-
import "./pi-tools.policy-
|
|
101
|
+
import "./pi-tools.policy-Bx5zp45n.js";
|
|
102
102
|
import "./control-service-C0pRqIFv.js";
|
|
103
103
|
import "./stagger-CZ1Rrj7O.js";
|
|
104
104
|
import "./channel-selection-9fIQGtZy.js";
|
|
@@ -113,19 +113,19 @@ import "./systemd-Xs16roN5.js";
|
|
|
113
113
|
import "./service-DzLem5vL.js";
|
|
114
114
|
import "./diagnostics-1uBuB9IE.js";
|
|
115
115
|
import "./table-BWuvjnmY.js";
|
|
116
|
-
import "./audit-
|
|
117
|
-
import "./status-
|
|
118
|
-
import "./health-
|
|
116
|
+
import "./audit-BhCJV2l6.js";
|
|
117
|
+
import "./status-CA0mUJld.js";
|
|
118
|
+
import "./health-CvMHgR-L.js";
|
|
119
119
|
import "./control-ui-assets-BrP31IQR.js";
|
|
120
120
|
import "./update-check-Bbvpax6u.js";
|
|
121
|
-
import { n as handleGatewayRequest } from "./server-methods-
|
|
122
|
-
import "./push-apns-
|
|
123
|
-
import "./agents.config-
|
|
121
|
+
import { n as handleGatewayRequest } from "./server-methods-D_iKJ-sj.js";
|
|
122
|
+
import "./push-apns-DCA47WA5.js";
|
|
123
|
+
import "./agents.config-Dd-11klq.js";
|
|
124
124
|
import "./dm-policy-shared-KlzpDeT_.js";
|
|
125
125
|
import "./node-service-DxPZ_ZFk.js";
|
|
126
126
|
import "./status.update-8HXdAdwz.js";
|
|
127
127
|
import "./skills-install-B8r7cGKR.js";
|
|
128
|
-
import "./update-runner-
|
|
128
|
+
import "./update-runner-D7-LDziQ.js";
|
|
129
129
|
|
|
130
130
|
//#region src/gateway/glass-ui-ws.ts
|
|
131
131
|
const SESSION_KEY = "agent:main:main";
|
|
@@ -14,7 +14,7 @@ import "./client-qUlxXXVJ.js";
|
|
|
14
14
|
import "./call-BrRWr7Lj.js";
|
|
15
15
|
import "./message-channel-C9dERklz.js";
|
|
16
16
|
import "./pairing-token-Byh6drgn.js";
|
|
17
|
-
import { Q as resolveModelProfile } from "./subagent-registry-
|
|
17
|
+
import { Q as resolveModelProfile } from "./subagent-registry-C1OyZl-M.js";
|
|
18
18
|
import "./sessions-BPD85pWA.js";
|
|
19
19
|
import "./tokens-Csntmwwn.js";
|
|
20
20
|
import "./plugins-CwSlLxM8.js";
|
|
@@ -52,8 +52,8 @@ import "./tool-images-CVLISeRT.js";
|
|
|
52
52
|
import "./thinking-8sKPnzpp.js";
|
|
53
53
|
import "./models-config-J1x_DaPn.js";
|
|
54
54
|
import "./reply-prefix-BUN71nd5.js";
|
|
55
|
-
import "./memory-cli-
|
|
56
|
-
import "./manager-
|
|
55
|
+
import "./memory-cli-Qgbcxvuf.js";
|
|
56
|
+
import "./manager-DDELj5o9.js";
|
|
57
57
|
import "./gemini-auth-DEakvf-D.js";
|
|
58
58
|
import "./retry-C4Q_VPOo.js";
|
|
59
59
|
import "./sqlite-BP8tiuca.js";
|
|
@@ -97,7 +97,7 @@ import "./replies-Sxbew659.js";
|
|
|
97
97
|
import "./onboard-helpers-CF0Cp3OB.js";
|
|
98
98
|
import "./prompt-style-BxVdnrLq.js";
|
|
99
99
|
import "./pairing-labels-BHx_CdbP.js";
|
|
100
|
-
import "./pi-tools.policy-
|
|
100
|
+
import "./pi-tools.policy-o0ytjRqu.js";
|
|
101
101
|
import "./dangerous-tools-Cw6NBIXW.js";
|
|
102
102
|
import "./catalog-KcLvtTfa.js";
|
|
103
103
|
import "./install-safe-path-C__62m3G.js";
|
|
@@ -108,19 +108,19 @@ import "./systemd-CJ5L2ee4.js";
|
|
|
108
108
|
import "./service-RxN7lQKN.js";
|
|
109
109
|
import "./diagnostics-C6xPE2ln.js";
|
|
110
110
|
import "./table-Bka4fasy.js";
|
|
111
|
-
import "./audit-
|
|
112
|
-
import "./status-
|
|
113
|
-
import "./health-
|
|
111
|
+
import "./audit-CB97BqHJ.js";
|
|
112
|
+
import "./status-CBnCPUMG.js";
|
|
113
|
+
import "./health-2jkjZxY8.js";
|
|
114
114
|
import "./control-ui-assets-Clf7H-Sm.js";
|
|
115
115
|
import "./update-check-BNjupSIM.js";
|
|
116
|
-
import { n as handleGatewayRequest } from "./server-methods-
|
|
117
|
-
import "./push-apns-
|
|
118
|
-
import "./agents.config-
|
|
116
|
+
import { n as handleGatewayRequest } from "./server-methods-BszFAkbJ.js";
|
|
117
|
+
import "./push-apns-DvudhEAb.js";
|
|
118
|
+
import "./agents.config-BKKMbeeE.js";
|
|
119
119
|
import "./dm-policy-shared-JiSNSaKz.js";
|
|
120
120
|
import "./node-service-B-qdOCNb.js";
|
|
121
121
|
import "./status.update-B5zI1_Id.js";
|
|
122
122
|
import "./skills-install-BnEN_qla.js";
|
|
123
|
-
import "./update-runner-
|
|
123
|
+
import "./update-runner-aYPcKYAN.js";
|
|
124
124
|
|
|
125
125
|
//#region src/gateway/glass-ui-ws.ts
|
|
126
126
|
const SESSION_KEY = "agent:main:main";
|
|
@@ -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-DXt3pc08.js";
|
|
6
6
|
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-BrRWr7Lj.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-C1OyZl-M.js";
|
|
8
8
|
import { M as canonicalizeMainSessionAlias, N as resolveAgentMainSessionKey, d as updateSessionStore, l as saveSessionStore, o as loadSessionStore } from "./sessions-BPD85pWA.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";
|
|
@@ -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-Dg1ZU3DZ.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";
|
|
@@ -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-Dg1ZU3DZ.js";
|
|
5
5
|
import "./registry-Cja8eT7G.js";
|
|
6
6
|
import { f as defaultRuntime } from "./subsystem-D9vIQve0.js";
|
|
7
7
|
import "./exec-CWkblSrI.js";
|
|
@@ -62,8 +62,8 @@ import "./diagnostic-session-state-CUslJyKP.js";
|
|
|
62
62
|
import "./send-DpMnSIi5.js";
|
|
63
63
|
import "./model-ECsJuJew.js";
|
|
64
64
|
import "./reply-prefix-CE2YmmsD.js";
|
|
65
|
-
import "./memory-cli-
|
|
66
|
-
import "./manager-
|
|
65
|
+
import "./memory-cli-ENCASZJk.js";
|
|
66
|
+
import "./manager-DrmlegR2.js";
|
|
67
67
|
import "./retry-BoS4e4X_.js";
|
|
68
68
|
import "./sqlite-D55gRQbH.js";
|
|
69
69
|
import "./target-errors-C9e6dMU_.js";
|
|
@@ -100,7 +100,7 @@ import "./prompt-style-Y2J72w6p.js";
|
|
|
100
100
|
import "./pairing-labels-CTL1gXZb.js";
|
|
101
101
|
import "./exec-approvals-DEigTi7M.js";
|
|
102
102
|
import "./nodes-screen-BZS89z6C.js";
|
|
103
|
-
import "./pi-tools.policy-
|
|
103
|
+
import "./pi-tools.policy-Bx5zp45n.js";
|
|
104
104
|
import "./control-service-C0pRqIFv.js";
|
|
105
105
|
import "./stagger-CZ1Rrj7O.js";
|
|
106
106
|
import "./channel-selection-9fIQGtZy.js";
|
|
@@ -109,7 +109,7 @@ import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchiv
|
|
|
109
109
|
import { t as renderTable } from "./table-BWuvjnmY.js";
|
|
110
110
|
import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-D2fHsr-Z.js";
|
|
111
111
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-egB5Xv4U.js";
|
|
112
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
112
|
+
import { t as buildPluginStatusReport } from "./status-BvbJavmh.js";
|
|
113
113
|
import fs from "node:fs";
|
|
114
114
|
import path from "node:path";
|
|
115
115
|
import fs$1 from "node:fs/promises";
|
|
@@ -16,7 +16,7 @@ import "./client-qUlxXXVJ.js";
|
|
|
16
16
|
import "./call-BrRWr7Lj.js";
|
|
17
17
|
import "./message-channel-C9dERklz.js";
|
|
18
18
|
import "./pairing-token-Byh6drgn.js";
|
|
19
|
-
import "./subagent-registry-
|
|
19
|
+
import "./subagent-registry-C1OyZl-M.js";
|
|
20
20
|
import "./sessions-BPD85pWA.js";
|
|
21
21
|
import "./tokens-Csntmwwn.js";
|
|
22
22
|
import "./plugins-CwSlLxM8.js";
|
|
@@ -54,8 +54,8 @@ import "./tool-images-CVLISeRT.js";
|
|
|
54
54
|
import "./thinking-8sKPnzpp.js";
|
|
55
55
|
import "./models-config-J1x_DaPn.js";
|
|
56
56
|
import "./reply-prefix-BUN71nd5.js";
|
|
57
|
-
import "./memory-cli-
|
|
58
|
-
import "./manager-
|
|
57
|
+
import "./memory-cli-Qgbcxvuf.js";
|
|
58
|
+
import "./manager-DDELj5o9.js";
|
|
59
59
|
import "./gemini-auth-DEakvf-D.js";
|
|
60
60
|
import "./retry-C4Q_VPOo.js";
|
|
61
61
|
import "./sqlite-BP8tiuca.js";
|
|
@@ -99,13 +99,13 @@ import "./replies-Sxbew659.js";
|
|
|
99
99
|
import "./onboard-helpers-CF0Cp3OB.js";
|
|
100
100
|
import "./prompt-style-BxVdnrLq.js";
|
|
101
101
|
import "./pairing-labels-BHx_CdbP.js";
|
|
102
|
-
import "./pi-tools.policy-
|
|
102
|
+
import "./pi-tools.policy-o0ytjRqu.js";
|
|
103
103
|
import { a as extractArchive, c as resolveArchiveKind, i as unscopedPackageName, l as resolvePackedRootDir, o as fileExists, s as readJsonFile, t as resolveSafeInstallDir } from "./install-safe-path-C__62m3G.js";
|
|
104
104
|
import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchive, r as resolveArchiveSourcePath, t as validateRegistryNpmSpec } from "./npm-registry-spec-PuS2I1Em.js";
|
|
105
105
|
import { t as renderTable } from "./table-Bka4fasy.js";
|
|
106
106
|
import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-mCPSj6kV.js";
|
|
107
107
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-CS4zxjqL.js";
|
|
108
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
108
|
+
import { t as buildPluginStatusReport } from "./status-DJAeKN4G.js";
|
|
109
109
|
import path from "node:path";
|
|
110
110
|
import fs from "node:fs";
|
|
111
111
|
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 { L as getApiKeyForModel, M as resolveImplicitBedrockProvider, N as resolveImplicitCopilotProvider, P as resolveImplicitProviders, W as normalizeSecretInput, et as resolveSymiAgentDir, 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-X6fUE0K7.js";
|
|
3
|
+
import { L as getApiKeyForModel, M as resolveImplicitBedrockProvider, N as resolveImplicitCopilotProvider, P as resolveImplicitProviders, W as normalizeSecretInput, et as resolveSymiAgentDir, j as normalizeProviders, z as requireApiKey } from "./auth-profiles-BzB_Exeq.js";
|
|
4
|
+
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-DwQ9wJeT.js";
|
|
5
|
+
import { n as loadConfig } from "./config-C4WnAd-c.js";
|
|
6
6
|
import { n as redactToolDetail } from "./redact-BDMXB06K.js";
|
|
7
7
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as runExec } from "./workspace-
|
|
1
|
+
import { _ as runExec } from "./workspace-CywO4ayZ.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
|
|
5
|
+
import fs 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
|
|
26
|
+
handle = await fs.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
|
|
33
|
+
const [stat, lstat] = await Promise.all([handle.stat(), fs.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
|
|
38
|
-
const realStat = await fs
|
|
37
|
+
const realPath = await fs.realpath(filePath);
|
|
38
|
+
const realStat = await fs.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
|
|
55
|
+
rootReal = await fs.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
|
|
324
|
+
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-img-"));
|
|
325
325
|
try {
|
|
326
326
|
return await fn(dir);
|
|
327
327
|
} finally {
|
|
328
|
-
await fs
|
|
328
|
+
await fs.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
|
|
337
|
+
await fs.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
|
|
365
|
+
await fs.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
|
|
382
|
+
return await fs.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
|
|
389
|
+
await fs.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
|
|
401
|
+
return await fs.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
|
|
452
|
+
await fs.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
|
|
462
|
+
return await fs.readFile(output);
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
async function resizeToJpeg(params) {
|