@symerian/symi 2.8.14 → 2.8.16
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-wWWkC0JH.js → accounts-3dCrO3oZ.js} +1 -1
- package/dist/{accounts-BsgY6sda.js → accounts-BRw8yhIW.js} +21 -21
- package/dist/{accounts-Bsg6r6H7.js → accounts-BuZxOb3B.js} +1 -1
- package/dist/{acp-cli-D7uCUCr8.js → acp-cli-BgR7mxTS.js} +2 -2
- package/dist/{acp-cli-CAU8UW9I.js → acp-cli-D1JYg9c1.js} +2 -2
- package/dist/{active-listener-AVNn5_U9.js → active-listener-BVZOh2T1.js} +1 -1
- package/dist/{agent-scope-Cpm7a9ss.js → agent-scope-CpEJ0B88.js} +3 -3
- package/dist/{agents-DlAvDWxz.js → agents-D6V12K_e.js} +5 -5
- package/dist/{agents.config-Dd-11klq.js → agents.config-BIIkG8rN.js} +1 -1
- package/dist/{agents.config-BKKMbeeE.js → agents.config-C0iGGY9q.js} +1 -1
- package/dist/{audio-preflight-rrz8KyHd.js → audio-preflight-rjCWpcfE.js} +29 -29
- package/dist/{audit-CB97BqHJ.js → audit-Dr_8rC6G.js} +2 -2
- package/dist/{audit-BhCJV2l6.js → audit-xiwEIT96.js} +2 -2
- package/dist/{auth-choice-CRQRPwQt.js → auth-choice-BcCUgEa4.js} +2 -2
- package/dist/{auth-choice-C6woT6k2.js → auth-choice-jyLLyEpy.js} +2 -2
- package/dist/{auth-profiles-BzB_Exeq.js → auth-profiles-C2vj6htZ.js} +17 -17
- package/dist/{banner-DrNha2_N.js → banner-DSRsscTp.js} +1 -1
- package/dist/{bindings-xcRox9xM.js → bindings-BsHoBLIE.js} +2 -2
- package/dist/{browser-cli-5ME9iiC3.js → browser-cli-BQeCPbES.js} +3 -3
- package/dist/{browser-cli-BTci35qB.js → browser-cli-IXepRCZR.js} +3 -3
- 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/{call-Cmb04dff.js → call-BkJK3eYP.js} +2 -1
- package/dist/{call-BrRWr7Lj.js → call-CAGvQYXj.js} +2 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CzHaIUAp.js → channel-activity-D8QD7GoV.js} +1 -1
- package/dist/{channel-options-D8q9En4T.js → channel-options-BSdsxwj0.js} +1 -1
- package/dist/{channel-options-DYy2sCfN.js → channel-options-Cr_if7it.js} +1 -1
- package/dist/{channel-web-CRBU4eZk.js → channel-web-C3gcPe4C.js} +1 -1
- package/dist/{channels-cli-Dk3kUw9A.js → channels-cli-Bn6mTlYq.js} +9 -9
- package/dist/{channels-cli-BUk43hHR.js → channels-cli-O7MxdB1l.js} +9 -9
- package/dist/{chrome-DwXnykXR.js → chrome-C08Z0XAa.js} +21 -21
- package/dist/{chunk-BcxcL1U3.js → chunk-BRe1o4Af.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-5gWsnsB7.js → cli-CLOf6U-k.js} +6 -6
- package/dist/{cli-DjZzJy3t.js → cli-RIwsXnB-.js} +6 -6
- package/dist/{client-C7AOOnKZ.js → client-CYsBIR3j.js} +27 -1
- package/dist/{client-qUlxXXVJ.js → client-Cmq13-uF.js} +27 -1
- package/dist/{command-registry-LjFltTU9.js → command-registry-BiznuVYK.js} +11 -11
- package/dist/{commands-registry-ByGkL6hs.js → commands-registry-DxbSTLNQ.js} +4 -4
- package/dist/{completion-cli-Cf6fYZWL.js → completion-cli-BVG9ZtBG.js} +2 -2
- package/dist/{completion-cli-BVTGy8th.js → completion-cli-D-xVtDhj.js} +1 -1
- package/dist/{config-C4WnAd-c.js → config-BkZ9HOKT.js} +17 -17
- package/dist/{config-cli-EgWrCemi.js → config-cli-CDTQQFyj.js} +1 -1
- package/dist/{config-cli-C7DIbGxx.js → config-cli-zd2upqe_.js} +1 -1
- package/dist/{configure-B67uIawm.js → configure-BHdczngQ.js} +6 -6
- package/dist/{configure-Bk-snuxh.js → configure-Cu4CiLWY.js} +6 -6
- package/dist/{consolidate-DRtVvG2U.js → consolidate-07QMweFF.js} +4 -4
- package/dist/control-ui/index.html +7 -0
- package/dist/control-ui/js/menu.js +2 -0
- package/dist/control-ui/js/settings.js +1 -0
- package/dist/{cron-cli-CGJveo7P.js → cron-cli-CZCm3aLt.js} +3 -3
- package/dist/{cron-cli-Crh_r2aK.js → cron-cli-Dq2FEfK1.js} +3 -3
- package/dist/{daemon-cli-Cq-IaYw4.js → daemon-cli-B2_uIgDM.js} +2 -2
- package/dist/{daemon-cli-CAIg9sMo.js → daemon-cli-CweMes2K.js} +2 -2
- package/dist/daemon-cli.js +27 -0
- package/dist/{deliver-SLYAWE19.js → deliver-qUx-eLKt.js} +20 -20
- package/dist/{devices-cli-CUT_8CuJ.js → devices-cli-3ui-Wcaj.js} +2 -2
- package/dist/{devices-cli-hSn5vjJZ.js → devices-cli-DeoPyzAd.js} +2 -2
- package/dist/{diagnostic-DTkZsRNM.js → diagnostic-BUcR3Meg.js} +1 -1
- package/dist/{doctor-completion-lE_33xaY.js → doctor-completion-ClveVbW_.js} +1 -1
- package/dist/{doctor-completion-By066O3p.js → doctor-completion-e-Ke-FnA.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-CB65jmJQ.js → env-BDXYbTKj.js} +1 -1
- package/dist/{exec-approvals-cli-BTfZiH6z.js → exec-approvals-cli-Bx9loYnQ.js} +4 -4
- package/dist/{exec-approvals-cli-DTad2Zi_.js → exec-approvals-cli-CTEn_Eu_.js} +4 -4
- package/dist/extensionAPI.js +2 -2
- package/dist/{frontmatter-CT1M0pRK.js → frontmatter-CTR5f_Ez.js} +4 -4
- package/dist/{gateway-cli-DqEgqVKC.js → gateway-cli-CBseg7zA.js} +34 -16
- package/dist/{gateway-cli-C6uT2x34.js → gateway-cli-DGMuMxMT.js} +34 -16
- package/dist/{gateway-rpc-BKJyAcQd.js → gateway-rpc-DbSbyIcL.js} +1 -1
- package/dist/{gateway-rpc-DActF8Qj.js → gateway-rpc-QsFn5Zr1.js} +1 -1
- package/dist/{gemini-auth-D80BsXr2.js → gemini-auth-BefM10YB.js} +1 -1
- package/dist/{github-copilot-token-B8B2pmph.js → github-copilot-token-cCYzSU9h.js} +7 -7
- package/dist/{glass-ui-ws-CLAUHeZR.js → glass-ui-ws-B0WonpHP.js} +13 -13
- package/dist/{glass-ui-ws-77TY57IO.js → glass-ui-ws-BU6qyCvM.js} +13 -13
- package/dist/{health-2jkjZxY8.js → health-BrpUi4qW.js} +2 -2
- package/dist/{health-CvMHgR-L.js → health-d4gqJJCY.js} +2 -2
- package/dist/{hooks-cli-CRZySOiz.js → hooks-cli-CBStbWME.js} +7 -7
- package/dist/{hooks-cli-DSaezFsD.js → hooks-cli-Dm2SU8AY.js} +7 -7
- package/dist/{image-BHF_fnIp.js → image-C6rCON9L.js} +4 -4
- package/dist/{image-ops-CY7v6vvp.js → image-ops-C7CauEK8.js} +16 -16
- package/dist/index.js +11 -11
- package/dist/{internal-FNqguZSK.js → internal-DjnxpF_K.js} +11 -11
- package/dist/{ir-D6MiJpAy.js → ir-7tMVY7D_.js} +4 -4
- package/dist/llm-slug-generator.js +54 -54
- package/dist/{local-roots-tcdaIEhh.js → local-roots-ClipCZ9s.js} +5 -5
- package/dist/{login-D4ZkmSrY.js → login-D4rZWBXe.js} +7 -7
- package/dist/{login-qr-C9ftIq3n.js → login-qr-DdAVHOEC.js} +12 -12
- package/dist/{logs-cli-BPnrAg0W.js → logs-cli-1hn28HCu.js} +3 -3
- package/dist/{logs-cli-DiDesnnp.js → logs-cli-R4WwQvR2.js} +3 -3
- package/dist/{manager-DxCmjSfP.js → manager-B-5p7UGu.js} +25 -25
- package/dist/{manager-DrmlegR2.js → manager-BOvfAdfG.js} +2 -2
- package/dist/{manager-BtWtmpxN.js → manager-CtwApSQo.js} +2 -2
- package/dist/{manager-DDELj5o9.js → manager-DDboJTtn.js} +2 -2
- package/dist/{manifest-registry-BvGv6lp9.js → manifest-registry-CBCGTsIb.js} +19 -19
- package/dist/{markdown-tables-CE-qSMGB.js → markdown-tables-x2Xe2UXh.js} +1 -1
- package/dist/{memory-cli-ENCASZJk.js → memory-cli-BOxWccJu.js} +3 -3
- package/dist/{memory-cli-Qgbcxvuf.js → memory-cli-D2QHGsxh.js} +3 -3
- package/dist/{message-channel-lwVT8QjK.js → message-channel-OlFBYAw8.js} +1 -1
- package/dist/{models-COhUz7M9.js → models-Cn1cbmce.js} +3 -3
- package/dist/{models-cli-CYvXBvmZ.js → models-cli-CXW-3Zot.js} +8 -8
- package/dist/{models-cli-CCxYcF4R.js → models-cli-Cdkkr4--.js} +7 -7
- package/dist/{node-cli-DwDQpTW5.js → node-cli-BBN6PoOG.js} +1 -1
- package/dist/{node-cli-DEcCM2p0.js → node-cli-BsAzTrAx.js} +1 -1
- package/dist/{nodes-cli-CqBLemeB.js → nodes-cli-DE60dv81.js} +3 -3
- package/dist/{nodes-cli-u8k6TPmF.js → nodes-cli-t3azniiS.js} +3 -3
- package/dist/{onboard-CQNUYBIp.js → onboard-BJ9vVhFw.js} +3 -3
- package/dist/{onboard-fVpLVnwg.js → onboard-UB4D1vwP.js} +3 -3
- package/dist/{onboard-channels-CWw8G-6n.js → onboard-channels-Cfc9EhLj.js} +1 -1
- package/dist/{onboard-channels-9erx07qe.js → onboard-channels-Gfgyvx9N.js} +1 -1
- package/dist/{onboard-helpers-C8f_xi6R.js → onboard-helpers-B7jBYbCU.js} +1 -1
- package/dist/{onboard-helpers-CF0Cp3OB.js → onboard-helpers-DjlGq6iG.js} +1 -1
- package/dist/{onboard-remote-DgGH0dTe.js → onboard-remote-CXuHbtrT.js} +1 -1
- package/dist/{onboard-remote-CWal5_aZ.js → onboard-remote-D7wGqONm.js} +1 -1
- package/dist/{onboard-skills-DnzJLU2H.js → onboard-skills-BDhqz3te.js} +1 -1
- package/dist/{onboard-skills-CO2TjuO3.js → onboard-skills-ChQnpMi-.js} +1 -1
- package/dist/{onboarding-D-OIkDwZ.js → onboarding-BfSg5GnT.js} +7 -7
- package/dist/{onboarding-CtEiH9WG.js → onboarding-Bv89FLSZ.js} +7 -7
- package/dist/{onboarding.finalize-BY3HNjX4.js → onboarding.finalize-B8MFYp8E.js} +12 -12
- package/dist/{onboarding.finalize-DTbpLV-T.js → onboarding.finalize-DMJTZPb_.js} +11 -11
- package/dist/{onboarding.gateway-config-DlV0vso8.js → onboarding.gateway-config-Cm5jIfRz.js} +3 -3
- package/dist/{onboarding.gateway-config-D4rQoPRi.js → onboarding.gateway-config-wAyLcGRu.js} +3 -3
- package/dist/{outbound-C6Gm22UF.js → outbound-Zmd7UyQH.js} +7 -7
- package/dist/{outbound-attachment-BWyKV1Gy.js → outbound-attachment-DeCnZT-8.js} +2 -2
- package/dist/{paths-DEuVuViW.js → paths-CbQV9WEg.js} +1 -1
- package/dist/{pi-auth-json-Bv1NzJdR.js → pi-auth-json-RXOlh8ar.js} +1 -1
- package/dist/{pi-embedded-CdOdQw2i.js → pi-embedded-CzKPTG9K.js} +149 -75
- package/dist/{pi-embedded-helpers-DwQ9wJeT.js → pi-embedded-helpers-P13adotN.js} +73 -73
- package/dist/{plugin-registry-BrJ0-qlu.js → plugin-registry-CQAtbgft.js} +1 -1
- package/dist/{plugin-registry-Cuc8ORuR.js → plugin-registry-R7nyNT_4.js} +1 -1
- package/dist/plugin-sdk/{channel-web-t8UOP6Zu.js → channel-web-D1qaoERA.js} +1 -1
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +6 -3
- package/dist/plugin-sdk/gateway/protocol/schema/tasks.d.ts +40 -0
- package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +3 -0
- package/dist/plugin-sdk/gateway/protocol/schema.d.ts +1 -0
- package/dist/plugin-sdk/index.js +3 -3
- package/dist/plugin-sdk/infra/long-task-state.d.ts +34 -0
- package/dist/plugin-sdk/{manager-BPm5oefC.js → manager-CVuMChKq.js} +2 -2
- package/dist/plugin-sdk/{reply-BKAHTugL.js → reply-LZax-i7K.js} +149 -75
- package/dist/plugin-sdk/{synthesis-CVF7Fwhd.js → synthesis-DnknLqQP.js} +2 -2
- package/dist/plugin-sdk/{web-D0DsmFvw.js → web-DGGSyBgc.js} +3 -3
- package/dist/{plugins-v8k1XVOy.js → plugins-BzmbgY7s.js} +9 -9
- package/dist/{plugins-cli-DFmriy-c.js → plugins-cli-CyaM2yPX.js} +7 -7
- package/dist/{plugins-cli-BDalhI46.js → plugins-cli-DGWVBlc8.js} +7 -7
- package/dist/{program-DKh41c2a.js → program-2jsiC85C.js} +12 -12
- package/dist/{program-context-Cq7pqOrw.js → program-context-DQg-ZH6A.js} +30 -30
- package/dist/{prompt-select-styled-DvvSE_ni.js → prompt-select-styled-CQJkA--o.js} +8 -8
- package/dist/{prompt-select-styled-BFCAZLwK.js → prompt-select-styled-Csj7D4id.js} +8 -8
- package/dist/{provider-auth-helpers-DXppgV1l.js → provider-auth-helpers-C1rUolDI.js} +1 -1
- package/dist/{provider-auth-helpers-B-LkDxxi.js → provider-auth-helpers-DSq3qfws.js} +1 -1
- package/dist/{push-apns-DCA47WA5.js → push-apns-Dv3XQClG.js} +1 -1
- package/dist/{push-apns-DvudhEAb.js → push-apns-FvyXV3Um.js} +1 -1
- package/dist/{pw-ai-XGqnSWju.js → pw-ai-CeWN4iD9.js} +11 -11
- package/dist/{qmd-manager-CbRJhonG.js → qmd-manager-BXkbA8Y9.js} +8 -8
- package/dist/{register.agent-_BV5KyFb.js → register.agent-Cs5QU2Cd.js} +11 -11
- package/dist/{register.agent-aFj_SMi3.js → register.agent-DCIdzwFG.js} +10 -10
- package/dist/{register.configure-Dx0Uhmlz.js → register.configure-BBKyd--9.js} +13 -13
- package/dist/{register.configure-CvOoD5gE.js → register.configure-C64fHXoT.js} +13 -13
- package/dist/{register.maintenance-CMeJR7DG.js → register.maintenance-D99fy4mM.js} +13 -13
- package/dist/{register.maintenance-BuZpoSik.js → register.maintenance-DRUMeCun.js} +12 -12
- package/dist/{register.message-xxGePuRC.js → register.message-BL30Nofx.js} +7 -7
- package/dist/{register.message-qysZPg3G.js → register.message-CelO3y3f.js} +7 -7
- package/dist/{register.onboard-1MP2I0q4.js → register.onboard-Cb9K2U81.js} +9 -9
- package/dist/{register.onboard-D4Aow7Gc.js → register.onboard-j6fg7rSF.js} +9 -9
- package/dist/{register.setup-BT74aXzA.js → register.setup-BfbJZE5C.js} +9 -9
- package/dist/{register.setup-DzliKkWh.js → register.setup-xyGsh3Fi.js} +9 -9
- package/dist/{register.status-health-sessions-D7VYZlrU.js → register.status-health-sessions-BE4TcJ1J.js} +9 -9
- package/dist/{register.status-health-sessions-B3K2gZ72.js → register.status-health-sessions-CpnBFwbx.js} +9 -9
- package/dist/{register.subclis-BCy0IDRv.js → register.subclis-8cGjLTmN.js} +20 -20
- package/dist/{registry-X6fUE0K7.js → registry-DYq1AYOv.js} +19 -19
- package/dist/{replies-86F3PldM.js → replies-CUWXgyx2.js} +3 -3
- package/dist/{reply-Dg1ZU3DZ.js → reply-CaGCmutq.js} +125 -78
- package/dist/{reply-prefix-CI_IdwqH.js → reply-prefix-CvEIl6_d.js} +1 -1
- package/dist/{resolve-route-BgSuN9c6.js → resolve-route-Jy5dFY67.js} +4 -4
- package/dist/{retry-4oEAHckB.js → retry-B-y5suGA.js} +1 -1
- package/dist/{rpc-DYHXLh0P.js → rpc-C3ZUAjXK.js} +1 -1
- package/dist/{rpc-DdlEeEXT.js → rpc-St4eAsjR.js} +1 -1
- package/dist/{run-main-OS2aFAJ2.js → run-main-BzZuJeMa.js} +20 -20
- package/dist/{runner-B5oNTtgf.js → runner-D633VT13.js} +22 -22
- package/dist/{security-cli-BadXDWTh.js → security-cli-B8gavsuQ.js} +3 -3
- package/dist/{security-cli-D5y28-RH.js → security-cli-BSvxNP9m.js} +3 -3
- package/dist/{send-cCTQjuOZ.js → send-BKo1T3HF.js} +6 -6
- package/dist/{send-BTfqlrYd.js → send-Bb4it0te.js} +18 -18
- package/dist/{send-CSydU49L.js → send-C0QjmPaf.js} +10 -10
- package/dist/{send-Du-IfSne.js → send-Cpk3Ti6-.js} +6 -6
- package/dist/{send-ASDB3AzC.js → send-DFtnbzqy.js} +7 -7
- package/dist/{server-methods-BszFAkbJ.js → server-methods-BKlZejQC.js} +57 -13
- package/dist/{server-methods-D_iKJ-sj.js → server-methods-DEV38b_O.js} +57 -13
- package/dist/{server-node-events-CENHuAVz.js → server-node-events-3FL5gBKp.js} +7 -7
- package/dist/{server-node-events-uBu3XOjd.js → server-node-events-BX5JLPyV.js} +7 -7
- package/dist/{session-D8qLj_xN.js → session-BTeY6Gn2.js} +8 -8
- package/dist/{skill-commands-BcOduw6G.js → skill-commands-DG2lcozb.js} +16 -16
- package/dist/{skills-BrYDT4Jr.js → skills-CXxrn_e2.js} +24 -24
- package/dist/{sqlite-P-gMg7fi.js → sqlite-BN_hIcmu.js} +3 -3
- package/dist/{status-CBnCPUMG.js → status-L76LBY6B.js} +6 -6
- package/dist/{status-BvbJavmh.js → status-h7VP4Vpq.js} +1 -1
- package/dist/{status-DJAeKN4G.js → status-uBCH1pzQ.js} +1 -1
- package/dist/{status-CA0mUJld.js → status-zNfi0s3F.js} +6 -6
- package/dist/{store-Ceagbc4L.js → store-01F_JM7O.js} +6 -6
- package/dist/{subagent-registry-C1OyZl-M.js → subagent-registry-DlIPWOrx.js} +125 -78
- package/dist/{subsystem-CzXhCdeY.js → subsystem-BjyjJF-d.js} +1 -1
- package/dist/{synthesis-brHrnNF2.js → synthesis-1XabTYcd.js} +6 -6
- package/dist/{synthesis-z5B41p_r.js → synthesis-BfB-Lbjy.js} +6 -6
- package/dist/{synthesis-DuqSkHEr.js → synthesis-D1xCmGZi.js} +54 -54
- package/dist/{synthesis-DNTyB7JY.js → synthesis-D3EObLPS.js} +2 -2
- package/dist/{system-cli-BFopJ_xI.js → system-cli-BN9MXNk7.js} +3 -3
- package/dist/{system-cli-DryauSOX.js → system-cli-CD5latLh.js} +3 -3
- package/dist/{tables-qbCoZrYA.js → tables-DoG-pFrf.js} +1 -1
- package/dist/{target-errors-uNitqCCT.js → target-errors-DeJTztcq.js} +2 -2
- package/dist/{thinking-BV7SCNJP.js → thinking-BprCy23Z.js} +5 -5
- package/dist/{tokens-Bl5R3wPD.js → tokens-W0JzCJJM.js} +1 -1
- package/dist/{tool-images-JxNglLSr.js → tool-images-SqqWIT22.js} +2 -2
- package/dist/{tool-loop-detection-dfE771kg.js → tool-loop-detection-Dj9h1ogr.js} +3 -3
- package/dist/{tui-CvHbwJ3G.js → tui-Cu4TZK3I.js} +2 -2
- package/dist/{tui-BiBFm_RY.js → tui-DLkE0D7e.js} +2 -2
- package/dist/{tui-cli-CmyT9ctV.js → tui-cli-BfuEq3Q-.js} +3 -3
- package/dist/{tui-cli-CU6A8Bu2.js → tui-cli-DC9Bq-N_.js} +3 -3
- package/dist/{unified-runner-Czg3pdBc.js → unified-runner-KFxqPxWe.js} +378 -304
- package/dist/{update-cli-0lyGyl31.js → update-cli-CwtAWyeY.js} +14 -14
- package/dist/{update-cli-CIzkVfmj.js → update-cli-bTfRfI4b.js} +13 -13
- package/dist/{update-runner-D7-LDziQ.js → update-runner-BixvbAbN.js} +1 -1
- package/dist/{update-runner-aYPcKYAN.js → update-runner-DeT8NIX6.js} +1 -1
- package/dist/{web-Wk1ay1eQ.js → web-Bwrtjkmy.js} +2 -2
- package/dist/{web-CN7wnU7w.js → web-CO0AUYgu.js} +6 -6
- package/dist/{web-BJ5dUZso.js → web-N4FG6nyF.js} +7 -7
- package/dist/{web-B90A99YU.js → web-YSRcfzpP.js} +58 -58
- package/dist/{whatsapp-actions-llk0IUn2.js → whatsapp-actions-DmVpLXmh.js} +23 -23
- package/dist/{workspace-CywO4ayZ.js → workspace-DscDraUb.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/dist/paths-CYmyCDsE.js +0 -212
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
+
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CE7eVGHg.js";
|
|
3
3
|
import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-
|
|
5
|
-
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-
|
|
6
|
-
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
7
|
-
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-
|
|
8
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
9
|
-
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-
|
|
10
|
-
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-
|
|
11
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
4
|
+
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-DYq1AYOv.js";
|
|
5
|
+
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-CpEJ0B88.js";
|
|
6
|
+
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BjyjJF-d.js";
|
|
7
|
+
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-DscDraUb.js";
|
|
8
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CbQV9WEg.js";
|
|
9
|
+
import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-C2vj6htZ.js";
|
|
10
|
+
import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-BDXYbTKj.js";
|
|
11
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-cCYzSU9h.js";
|
|
12
12
|
import { t as parseBooleanValue$1 } from "./boolean-CE7i9tBR.js";
|
|
13
|
-
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
14
|
-
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-
|
|
15
|
-
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-
|
|
16
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
17
|
-
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-
|
|
13
|
+
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-P13adotN.js";
|
|
14
|
+
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-BkZ9HOKT.js";
|
|
15
|
+
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-CBCGTsIb.js";
|
|
16
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-C08Z0XAa.js";
|
|
17
|
+
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-CXxrn_e2.js";
|
|
18
18
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-XIsvXeC-.js";
|
|
19
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
19
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-C7CauEK8.js";
|
|
20
20
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
|
|
21
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./store-
|
|
22
|
-
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-
|
|
23
|
-
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-
|
|
21
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./store-01F_JM7O.js";
|
|
22
|
+
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-BprCy23Z.js";
|
|
23
|
+
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-OlFBYAw8.js";
|
|
24
24
|
import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
|
|
25
25
|
import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
|
|
26
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-
|
|
27
|
-
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-
|
|
28
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
29
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
30
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
31
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
26
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-BzmbgY7s.js";
|
|
27
|
+
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-BRw8yhIW.js";
|
|
28
|
+
import { t as resolveIMessageAccount } from "./accounts-3dCrO3oZ.js";
|
|
29
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BuZxOb3B.js";
|
|
30
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BKo1T3HF.js";
|
|
31
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-C0QjmPaf.js";
|
|
32
32
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
|
|
33
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
34
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
35
|
-
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-
|
|
33
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-SqqWIT22.js";
|
|
34
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-qUx-eLKt.js";
|
|
35
|
+
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-BUcR3Meg.js";
|
|
36
36
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
|
|
37
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
38
|
-
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-
|
|
39
|
-
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
40
|
-
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
37
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-C6rCON9L.js";
|
|
38
|
+
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-RXOlh8ar.js";
|
|
39
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-W0JzCJJM.js";
|
|
40
|
+
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-Bb4it0te.js";
|
|
41
41
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
|
|
42
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
43
|
-
import { a as resolveMemorySearchConfig, i as resolveOllamaBaseUrl, r as probeOllamaEmbeddingModels, t as MemoryIndexManager } from "./manager-
|
|
44
|
-
import { c as normalizeExtraMemoryPaths, f as runTasksWithConcurrency, s as listMemoryFiles } from "./internal-
|
|
45
|
-
import { n as retryAsync } from "./retry-
|
|
46
|
-
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-
|
|
47
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
48
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
42
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CvEIl6_d.js";
|
|
43
|
+
import { a as resolveMemorySearchConfig, i as resolveOllamaBaseUrl, r as probeOllamaEmbeddingModels, t as MemoryIndexManager } from "./manager-B-5p7UGu.js";
|
|
44
|
+
import { c as normalizeExtraMemoryPaths, f as runTasksWithConcurrency, s as listMemoryFiles } from "./internal-DjnxpF_K.js";
|
|
45
|
+
import { n as retryAsync } from "./retry-B-y5suGA.js";
|
|
46
|
+
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-DeJTztcq.js";
|
|
47
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-BRe1o4Af.js";
|
|
48
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-x2Xe2UXh.js";
|
|
49
49
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CVCBkyv1.js";
|
|
50
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
51
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
52
|
-
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-
|
|
53
|
-
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-
|
|
54
|
-
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
50
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-ClipCZ9s.js";
|
|
51
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-7tMVY7D_.js";
|
|
52
|
+
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-DxbSTLNQ.js";
|
|
53
|
+
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-D633VT13.js";
|
|
54
|
+
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-DG2lcozb.js";
|
|
55
55
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DZQU0r3y.js";
|
|
56
56
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-ClslA6GS.js";
|
|
57
57
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-q0xAK3nQ.js";
|
|
58
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
58
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D8QD7GoV.js";
|
|
59
59
|
import { n as normalizePollInput } from "./polls-Kt7OzYCK.js";
|
|
60
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
61
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
62
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
63
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
60
|
+
import { t as convertMarkdownTables } from "./tables-DoG-pFrf.js";
|
|
61
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-Cpk3Ti6-.js";
|
|
62
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-DFtnbzqy.js";
|
|
63
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-Jy5dFY67.js";
|
|
64
64
|
import { t as makeProxyFetch } from "./proxy-d9fklNTC.js";
|
|
65
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
66
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
65
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CUWXgyx2.js";
|
|
66
|
+
import { t as getActiveWebListener } from "./active-listener-BVZOh2T1.js";
|
|
67
67
|
import { createRequire } from "node:module";
|
|
68
68
|
import * as path$1 from "node:path";
|
|
69
69
|
import path from "node:path";
|
|
70
|
-
import
|
|
70
|
+
import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
71
71
|
import os, { homedir } from "node:os";
|
|
72
|
-
import
|
|
73
|
-
import * as fs$
|
|
74
|
-
import fs from "node:fs/promises";
|
|
72
|
+
import JSON5 from "json5";
|
|
73
|
+
import * as fs$2 from "node:fs/promises";
|
|
74
|
+
import fs$1 from "node:fs/promises";
|
|
75
75
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
76
76
|
import { inspect, promisify } from "node:util";
|
|
77
77
|
import { fileURLToPath } from "node:url";
|
|
@@ -81,7 +81,7 @@ import AjvPkg from "ajv";
|
|
|
81
81
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
82
82
|
import { createServer } from "node:http";
|
|
83
83
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
84
|
-
import WebSocket, { WebSocket
|
|
84
|
+
import WebSocket$1, { WebSocket } from "ws";
|
|
85
85
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
86
86
|
import { EdgeTTS } from "node-edge-tts";
|
|
87
87
|
import { createJiti } from "jiti";
|
|
@@ -4010,7 +4010,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
4010
4010
|
const workspaceDir = params.workspaceDir?.trim();
|
|
4011
4011
|
if (workspaceDir) {
|
|
4012
4012
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
4013
|
-
if (
|
|
4013
|
+
if (fs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
4014
4014
|
}
|
|
4015
4015
|
const packageRoot = await resolveSymiPackageRoot({
|
|
4016
4016
|
cwd: params.cwd,
|
|
@@ -4019,7 +4019,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
4019
4019
|
});
|
|
4020
4020
|
if (!packageRoot) return null;
|
|
4021
4021
|
const packageDocs = path.join(packageRoot, "docs");
|
|
4022
|
-
return
|
|
4022
|
+
return fs.existsSync(packageDocs) ? packageDocs : null;
|
|
4023
4023
|
}
|
|
4024
4024
|
|
|
4025
4025
|
//#endregion
|
|
@@ -4328,7 +4328,7 @@ async function getMemorySearchManager(params) {
|
|
|
4328
4328
|
if (cached) return { manager: cached };
|
|
4329
4329
|
}
|
|
4330
4330
|
try {
|
|
4331
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
4331
|
+
const { QmdMemoryManager } = await import("./qmd-manager-BXkbA8Y9.js");
|
|
4332
4332
|
const primary = await QmdMemoryManager.create({
|
|
4333
4333
|
cfg: params.cfg,
|
|
4334
4334
|
agentId: params.agentId,
|
|
@@ -4340,7 +4340,7 @@ async function getMemorySearchManager(params) {
|
|
|
4340
4340
|
const wrapper = new FallbackMemoryManager({
|
|
4341
4341
|
primary,
|
|
4342
4342
|
fallbackFactory: async () => {
|
|
4343
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4343
|
+
const { MemoryIndexManager } = await import("./manager-B-5p7UGu.js").then((n) => n.n);
|
|
4344
4344
|
return await MemoryIndexManager.get(params);
|
|
4345
4345
|
}
|
|
4346
4346
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -4353,7 +4353,7 @@ async function getMemorySearchManager(params) {
|
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
4355
4355
|
try {
|
|
4356
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
4356
|
+
const { MemoryIndexManager } = await import("./manager-B-5p7UGu.js").then((n) => n.n);
|
|
4357
4357
|
return { manager: await MemoryIndexManager.get(params) };
|
|
4358
4358
|
} catch (err) {
|
|
4359
4359
|
return {
|
|
@@ -7027,7 +7027,7 @@ async function recordLoopOutcome(args) {
|
|
|
7027
7027
|
if (!args.ctx?.sessionKey) return;
|
|
7028
7028
|
try {
|
|
7029
7029
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
7030
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
7030
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-Dj9h1ogr.js");
|
|
7031
7031
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
7032
7032
|
sessionKey: args.ctx.sessionKey,
|
|
7033
7033
|
sessionId: args.ctx?.agentId
|
|
@@ -7048,8 +7048,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
7048
7048
|
const params = args.params;
|
|
7049
7049
|
if (args.ctx?.sessionKey) {
|
|
7050
7050
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
|
|
7051
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
7052
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
7051
|
+
const { logToolLoopAction } = await import("./diagnostic-BUcR3Meg.js").then((n) => n.n);
|
|
7052
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Dj9h1ogr.js");
|
|
7053
7053
|
const sessionState = getDiagnosticSessionState({
|
|
7054
7054
|
sessionKey: args.ctx.sessionKey,
|
|
7055
7055
|
sessionId: args.ctx?.agentId
|
|
@@ -7336,7 +7336,7 @@ function resolveDefaultIdentityPath() {
|
|
|
7336
7336
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
7337
7337
|
}
|
|
7338
7338
|
function ensureDir$2(filePath) {
|
|
7339
|
-
|
|
7339
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7340
7340
|
}
|
|
7341
7341
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
7342
7342
|
function base64UrlEncode(buf) {
|
|
@@ -7372,8 +7372,8 @@ function generateIdentity() {
|
|
|
7372
7372
|
}
|
|
7373
7373
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
7374
7374
|
try {
|
|
7375
|
-
if (
|
|
7376
|
-
const raw =
|
|
7375
|
+
if (fs.existsSync(filePath)) {
|
|
7376
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
7377
7377
|
const parsed = JSON.parse(raw);
|
|
7378
7378
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
7379
7379
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -7382,9 +7382,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7382
7382
|
...parsed,
|
|
7383
7383
|
deviceId: derivedId
|
|
7384
7384
|
};
|
|
7385
|
-
|
|
7385
|
+
fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
7386
7386
|
try {
|
|
7387
|
-
|
|
7387
|
+
fs.chmodSync(filePath, 384);
|
|
7388
7388
|
} catch {}
|
|
7389
7389
|
return {
|
|
7390
7390
|
deviceId: derivedId,
|
|
@@ -7409,9 +7409,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
7409
7409
|
privateKeyPem: identity.privateKeyPem,
|
|
7410
7410
|
createdAtMs: Date.now()
|
|
7411
7411
|
};
|
|
7412
|
-
|
|
7412
|
+
fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
7413
7413
|
try {
|
|
7414
|
-
|
|
7414
|
+
fs.chmodSync(filePath, 384);
|
|
7415
7415
|
} catch {}
|
|
7416
7416
|
return identity;
|
|
7417
7417
|
}
|
|
@@ -7434,7 +7434,7 @@ function normalizeFingerprint(input) {
|
|
|
7434
7434
|
const execFileAsync = promisify(execFile);
|
|
7435
7435
|
async function fileExists(filePath) {
|
|
7436
7436
|
try {
|
|
7437
|
-
await fs.access(filePath);
|
|
7437
|
+
await fs$1.access(filePath);
|
|
7438
7438
|
return true;
|
|
7439
7439
|
} catch {
|
|
7440
7440
|
return false;
|
|
@@ -7461,8 +7461,8 @@ async function generateSelfSignedCert(params) {
|
|
|
7461
7461
|
"-subj",
|
|
7462
7462
|
"/CN=symi-gateway"
|
|
7463
7463
|
]);
|
|
7464
|
-
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
7465
|
-
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
7464
|
+
await fs$1.chmod(params.keyPath, 384).catch(() => {});
|
|
7465
|
+
await fs$1.chmod(params.certPath, 384).catch(() => {});
|
|
7466
7466
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
7467
7467
|
}
|
|
7468
7468
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -7500,9 +7500,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
7500
7500
|
error: "gateway tls: cert/key missing"
|
|
7501
7501
|
};
|
|
7502
7502
|
try {
|
|
7503
|
-
const cert = await fs.readFile(certPath, "utf8");
|
|
7504
|
-
const key = await fs.readFile(keyPath, "utf8");
|
|
7505
|
-
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
7503
|
+
const cert = await fs$1.readFile(certPath, "utf8");
|
|
7504
|
+
const key = await fs$1.readFile(keyPath, "utf8");
|
|
7505
|
+
const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
|
|
7506
7506
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
7507
7507
|
if (!fingerprintSha256) return {
|
|
7508
7508
|
enabled: false,
|
|
@@ -7561,8 +7561,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7561
7561
|
}
|
|
7562
7562
|
function readStore(filePath) {
|
|
7563
7563
|
try {
|
|
7564
|
-
if (!
|
|
7565
|
-
const raw =
|
|
7564
|
+
if (!fs.existsSync(filePath)) return null;
|
|
7565
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
7566
7566
|
const parsed = JSON.parse(raw);
|
|
7567
7567
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7568
7568
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7572,10 +7572,10 @@ function readStore(filePath) {
|
|
|
7572
7572
|
}
|
|
7573
7573
|
}
|
|
7574
7574
|
function writeStore(filePath, store) {
|
|
7575
|
-
|
|
7576
|
-
|
|
7575
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7576
|
+
fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7577
7577
|
try {
|
|
7578
|
-
|
|
7578
|
+
fs.chmodSync(filePath, 384);
|
|
7579
7579
|
} catch {}
|
|
7580
7580
|
}
|
|
7581
7581
|
function loadDeviceAuthToken(params) {
|
|
@@ -8684,6 +8684,31 @@ const SessionsUsageParamsSchema = Type.Object({
|
|
|
8684
8684
|
includeContextWeight: Type.Optional(Type.Boolean())
|
|
8685
8685
|
}, { additionalProperties: false });
|
|
8686
8686
|
|
|
8687
|
+
//#endregion
|
|
8688
|
+
//#region src/gateway/protocol/schema/tasks.ts
|
|
8689
|
+
/**
|
|
8690
|
+
* tasks.list — enumerates long-running detached tasks across configured
|
|
8691
|
+
* agent workspaces. Optional `workdir` override scans a single absolute
|
|
8692
|
+
* directory instead.
|
|
8693
|
+
*/
|
|
8694
|
+
const TasksListParamsSchema = Type.Object({ workdir: Type.Optional(Type.String()) }, { additionalProperties: false });
|
|
8695
|
+
const TaskInfoSchema = Type.Object({
|
|
8696
|
+
id: Type.String(),
|
|
8697
|
+
agentId: Type.Optional(Type.String()),
|
|
8698
|
+
workdir: Type.String(),
|
|
8699
|
+
pid: Type.Union([Type.Integer(), Type.Null()]),
|
|
8700
|
+
alive: Type.Boolean(),
|
|
8701
|
+
archived: Type.Boolean(),
|
|
8702
|
+
status: Type.String(),
|
|
8703
|
+
started: Type.Union([Type.String(), Type.Null()]),
|
|
8704
|
+
cmd: Type.Union([Type.String(), Type.Null()]),
|
|
8705
|
+
pidPath: Type.String(),
|
|
8706
|
+
statusPath: Type.String(),
|
|
8707
|
+
archivedPath: Type.String(),
|
|
8708
|
+
logPath: Type.String()
|
|
8709
|
+
}, { additionalProperties: false });
|
|
8710
|
+
const TasksListResultSchema = Type.Object({ tasks: Type.Array(TaskInfoSchema) }, { additionalProperties: false });
|
|
8711
|
+
|
|
8687
8712
|
//#endregion
|
|
8688
8713
|
//#region src/gateway/protocol/schema/wizard.ts
|
|
8689
8714
|
const WizardRunStatusSchema = Type.Union([
|
|
@@ -8769,6 +8794,7 @@ const validateAgentIdentityParams = ajv.compile(AgentIdentityParamsSchema);
|
|
|
8769
8794
|
const validateAgentWaitParams = ajv.compile(AgentWaitParamsSchema);
|
|
8770
8795
|
const validateWakeParams = ajv.compile(WakeParamsSchema);
|
|
8771
8796
|
const validateAgentsListParams = ajv.compile(AgentsListParamsSchema);
|
|
8797
|
+
const validateTasksListParams = ajv.compile(TasksListParamsSchema);
|
|
8772
8798
|
const validateAgentsCreateParams = ajv.compile(AgentsCreateParamsSchema);
|
|
8773
8799
|
const validateAgentsUpdateParams = ajv.compile(AgentsUpdateParamsSchema);
|
|
8774
8800
|
const validateAgentsDeleteParams = ajv.compile(AgentsDeleteParamsSchema);
|
|
@@ -8894,7 +8920,7 @@ var GatewayClient = class {
|
|
|
8894
8920
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8895
8921
|
});
|
|
8896
8922
|
}
|
|
8897
|
-
this.ws = new WebSocket
|
|
8923
|
+
this.ws = new WebSocket(url, wsOptions);
|
|
8898
8924
|
this.ws.on("open", () => {
|
|
8899
8925
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8900
8926
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -9113,7 +9139,7 @@ var GatewayClient = class {
|
|
|
9113
9139
|
return null;
|
|
9114
9140
|
}
|
|
9115
9141
|
async request(method, params, opts) {
|
|
9116
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
9142
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
9117
9143
|
const id = randomUUID();
|
|
9118
9144
|
const frame = {
|
|
9119
9145
|
type: "req",
|
|
@@ -9191,6 +9217,7 @@ const METHOD_SCOPE_GROUPS = {
|
|
|
9191
9217
|
"cron.list",
|
|
9192
9218
|
"cron.status",
|
|
9193
9219
|
"cron.runs",
|
|
9220
|
+
"tasks.list",
|
|
9194
9221
|
"system-presence",
|
|
9195
9222
|
"last-heartbeat",
|
|
9196
9223
|
"node.list",
|
|
@@ -10380,7 +10407,7 @@ async function routeReply(params) {
|
|
|
10380
10407
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10381
10408
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10382
10409
|
try {
|
|
10383
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10410
|
+
const { deliverOutboundPayloads } = await import("./deliver-qUx-eLKt.js").then((n) => n.n);
|
|
10384
10411
|
return {
|
|
10385
10412
|
ok: true,
|
|
10386
10413
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -10776,8 +10803,8 @@ function normalizeSessionKey(value) {
|
|
|
10776
10803
|
}
|
|
10777
10804
|
function readSessionStore(storePath) {
|
|
10778
10805
|
try {
|
|
10779
|
-
const raw =
|
|
10780
|
-
const parsed =
|
|
10806
|
+
const raw = fs.readFileSync(storePath, "utf-8");
|
|
10807
|
+
const parsed = JSON5.parse(raw);
|
|
10781
10808
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10782
10809
|
} catch {}
|
|
10783
10810
|
return {};
|
|
@@ -15835,7 +15862,7 @@ async function createModelSelectionState(params) {
|
|
|
15835
15862
|
}
|
|
15836
15863
|
}
|
|
15837
15864
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
15838
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles-
|
|
15865
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles-C2vj6htZ.js").then((n) => n.t);
|
|
15839
15866
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
15840
15867
|
const providerKey = normalizeProviderId(provider);
|
|
15841
15868
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -18208,8 +18235,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
18208
18235
|
];
|
|
18209
18236
|
function isExecutableFile(filePath) {
|
|
18210
18237
|
try {
|
|
18211
|
-
if (!
|
|
18212
|
-
if (process.platform !== "win32")
|
|
18238
|
+
if (!fs.statSync(filePath).isFile()) return false;
|
|
18239
|
+
if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
|
|
18213
18240
|
return true;
|
|
18214
18241
|
} catch {
|
|
18215
18242
|
return false;
|
|
@@ -18247,7 +18274,7 @@ function normalizeMatchTarget(value) {
|
|
|
18247
18274
|
}
|
|
18248
18275
|
function tryRealpath(value) {
|
|
18249
18276
|
try {
|
|
18250
|
-
return
|
|
18277
|
+
return fs.realpathSync(value);
|
|
18251
18278
|
} catch {
|
|
18252
18279
|
return null;
|
|
18253
18280
|
}
|
|
@@ -19479,7 +19506,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19479
19506
|
}
|
|
19480
19507
|
function ensureDir$1(filePath) {
|
|
19481
19508
|
const dir = path.dirname(filePath);
|
|
19482
|
-
|
|
19509
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
19483
19510
|
}
|
|
19484
19511
|
function coerceAllowlistEntries(allowlist) {
|
|
19485
19512
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19549,11 +19576,11 @@ function generateToken() {
|
|
|
19549
19576
|
function loadExecApprovals() {
|
|
19550
19577
|
const filePath = resolveExecApprovalsPath();
|
|
19551
19578
|
try {
|
|
19552
|
-
if (!
|
|
19579
|
+
if (!fs.existsSync(filePath)) return normalizeExecApprovals({
|
|
19553
19580
|
version: 1,
|
|
19554
19581
|
agents: {}
|
|
19555
19582
|
});
|
|
19556
|
-
const raw =
|
|
19583
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
19557
19584
|
const parsed = JSON.parse(raw);
|
|
19558
19585
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19559
19586
|
version: 1,
|
|
@@ -19570,9 +19597,9 @@ function loadExecApprovals() {
|
|
|
19570
19597
|
function saveExecApprovals(file) {
|
|
19571
19598
|
const filePath = resolveExecApprovalsPath();
|
|
19572
19599
|
ensureDir$1(filePath);
|
|
19573
|
-
|
|
19600
|
+
fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19574
19601
|
try {
|
|
19575
|
-
|
|
19602
|
+
fs.chmodSync(filePath, 384);
|
|
19576
19603
|
} catch {}
|
|
19577
19604
|
}
|
|
19578
19605
|
function ensureExecApprovals() {
|
|
@@ -19893,7 +19920,7 @@ function resolvePowerShellPath() {
|
|
|
19893
19920
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
19894
19921
|
if (systemRoot) {
|
|
19895
19922
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
19896
|
-
if (
|
|
19923
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
19897
19924
|
}
|
|
19898
19925
|
return "powershell.exe";
|
|
19899
19926
|
}
|
|
@@ -19931,7 +19958,7 @@ function resolveShellFromPath(name) {
|
|
|
19931
19958
|
for (const entry of entries) {
|
|
19932
19959
|
const candidate = path.join(entry, name);
|
|
19933
19960
|
try {
|
|
19934
|
-
|
|
19961
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
19935
19962
|
return candidate;
|
|
19936
19963
|
} catch {}
|
|
19937
19964
|
}
|
|
@@ -20679,7 +20706,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
20679
20706
|
cwd: process.cwd(),
|
|
20680
20707
|
root: params.sandbox.workspaceDir
|
|
20681
20708
|
});
|
|
20682
|
-
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20709
|
+
if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
20683
20710
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
20684
20711
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
20685
20712
|
return {
|
|
@@ -21730,13 +21757,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
21730
21757
|
cwd: params.workdir,
|
|
21731
21758
|
root: params.workdir
|
|
21732
21759
|
});
|
|
21733
|
-
stat = await fs.stat(absPath);
|
|
21760
|
+
stat = await fs$1.stat(absPath);
|
|
21734
21761
|
} catch {
|
|
21735
21762
|
return;
|
|
21736
21763
|
}
|
|
21737
21764
|
if (!stat.isFile()) return;
|
|
21738
21765
|
if (stat.size > 512 * 1024) return;
|
|
21739
|
-
const content = await fs.readFile(absPath, "utf-8");
|
|
21766
|
+
const content = await fs$1.readFile(absPath, "utf-8");
|
|
21740
21767
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
21741
21768
|
if (first) {
|
|
21742
21769
|
const idx = first.index;
|
|
@@ -22987,7 +23014,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22987
23014
|
function hasGitMarker(repoRoot) {
|
|
22988
23015
|
const gitPath = path.join(repoRoot, ".git");
|
|
22989
23016
|
try {
|
|
22990
|
-
const stat =
|
|
23017
|
+
const stat = fs.statSync(gitPath);
|
|
22991
23018
|
return stat.isDirectory() || stat.isFile();
|
|
22992
23019
|
} catch {
|
|
22993
23020
|
return false;
|
|
@@ -22999,10 +23026,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22999
23026
|
function resolveGitDirFromMarker(repoRoot) {
|
|
23000
23027
|
const gitPath = path.join(repoRoot, ".git");
|
|
23001
23028
|
try {
|
|
23002
|
-
const stat =
|
|
23029
|
+
const stat = fs.statSync(gitPath);
|
|
23003
23030
|
if (stat.isDirectory()) return gitPath;
|
|
23004
23031
|
if (!stat.isFile()) return null;
|
|
23005
|
-
const match =
|
|
23032
|
+
const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
23006
23033
|
if (!match?.[1]) return null;
|
|
23007
23034
|
return path.resolve(repoRoot, match[1].trim());
|
|
23008
23035
|
} catch {
|
|
@@ -23069,7 +23096,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
23069
23096
|
cachedCommit = null;
|
|
23070
23097
|
return cachedCommit;
|
|
23071
23098
|
}
|
|
23072
|
-
const head =
|
|
23099
|
+
const head = fs.readFileSync(headPath, "utf-8").trim();
|
|
23073
23100
|
if (!head) {
|
|
23074
23101
|
cachedCommit = null;
|
|
23075
23102
|
return cachedCommit;
|
|
@@ -23077,7 +23104,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
23077
23104
|
if (head.startsWith("ref:")) {
|
|
23078
23105
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
23079
23106
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
23080
|
-
cachedCommit = formatCommit(
|
|
23107
|
+
cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
|
|
23081
23108
|
return cachedCommit;
|
|
23082
23109
|
}
|
|
23083
23110
|
cachedCommit = formatCommit(head);
|
|
@@ -23281,9 +23308,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
23281
23308
|
} catch {
|
|
23282
23309
|
return;
|
|
23283
23310
|
}
|
|
23284
|
-
if (!
|
|
23311
|
+
if (!fs.existsSync(logPath)) return;
|
|
23285
23312
|
try {
|
|
23286
|
-
const lines =
|
|
23313
|
+
const lines = fs.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
23287
23314
|
let input = 0;
|
|
23288
23315
|
let output = 0;
|
|
23289
23316
|
let promptTokens = 0;
|
|
@@ -24523,7 +24550,7 @@ function resolveRepoRoot(params) {
|
|
|
24523
24550
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
24524
24551
|
if (configured) try {
|
|
24525
24552
|
const resolved = path.resolve(configured);
|
|
24526
|
-
if (
|
|
24553
|
+
if (fs.statSync(resolved).isDirectory()) return resolved;
|
|
24527
24554
|
} catch {}
|
|
24528
24555
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
24529
24556
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24842,7 +24869,7 @@ async function buildContextReply(params) {
|
|
|
24842
24869
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24843
24870
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24844
24871
|
function loadTemplate(fileName) {
|
|
24845
|
-
return
|
|
24872
|
+
return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24846
24873
|
}
|
|
24847
24874
|
function generateHtml(sessionData) {
|
|
24848
24875
|
const template = loadTemplate("template.html");
|
|
@@ -24916,7 +24943,7 @@ async function buildExportSessionReply(params) {
|
|
|
24916
24943
|
} catch (err) {
|
|
24917
24944
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24918
24945
|
}
|
|
24919
|
-
if (!
|
|
24946
|
+
if (!fs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24920
24947
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24921
24948
|
const entries = sessionManager.getEntries();
|
|
24922
24949
|
const header = sessionManager.getHeader();
|
|
@@ -24937,8 +24964,8 @@ async function buildExportSessionReply(params) {
|
|
|
24937
24964
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24938
24965
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24939
24966
|
const outputDir = path.dirname(outputPath);
|
|
24940
|
-
if (!
|
|
24941
|
-
|
|
24967
|
+
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
|
24968
|
+
fs.writeFileSync(outputPath, html, "utf-8");
|
|
24942
24969
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24943
24970
|
return { text: [
|
|
24944
24971
|
"✅ Session exported!",
|
|
@@ -25052,8 +25079,8 @@ function resolveZaiApiKey() {
|
|
|
25052
25079
|
}
|
|
25053
25080
|
try {
|
|
25054
25081
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
25055
|
-
if (!
|
|
25056
|
-
const data = JSON.parse(
|
|
25082
|
+
if (!fs.existsSync(authPath)) return;
|
|
25083
|
+
const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
|
|
25057
25084
|
return data["z-ai"]?.access || data.zai?.access;
|
|
25058
25085
|
} catch {
|
|
25059
25086
|
return;
|
|
@@ -26618,7 +26645,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26618
26645
|
}
|
|
26619
26646
|
function shouldPersistBindingMutations() {
|
|
26620
26647
|
if (shouldPersistAnyBindingState()) return true;
|
|
26621
|
-
return
|
|
26648
|
+
return fs.existsSync(resolveThreadBindingsPath());
|
|
26622
26649
|
}
|
|
26623
26650
|
function saveBindingsToDisk(params = {}) {
|
|
26624
26651
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -27606,7 +27633,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
27606
27633
|
totals.totalCost += costTotal;
|
|
27607
27634
|
};
|
|
27608
27635
|
async function* readJsonlRecords(filePath) {
|
|
27609
|
-
const fileStream =
|
|
27636
|
+
const fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
|
|
27610
27637
|
const rl = readline.createInterface({
|
|
27611
27638
|
input: fileStream,
|
|
27612
27639
|
crlfDelay: Infinity
|
|
@@ -27678,10 +27705,10 @@ async function loadCostUsageSummary(params) {
|
|
|
27678
27705
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
27679
27706
|
const totals = emptyTotals();
|
|
27680
27707
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
27681
|
-
const entries = await
|
|
27708
|
+
const entries = await fs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
27682
27709
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
27683
27710
|
const filePath = path.join(sessionsDir, entry.name);
|
|
27684
|
-
const stats = await
|
|
27711
|
+
const stats = await fs.promises.stat(filePath).catch(() => null);
|
|
27685
27712
|
if (!stats) return null;
|
|
27686
27713
|
if (stats.mtimeMs < sinceTime) return null;
|
|
27687
27714
|
return filePath;
|
|
@@ -27714,7 +27741,7 @@ async function loadCostUsageSummary(params) {
|
|
|
27714
27741
|
}
|
|
27715
27742
|
async function loadSessionCostSummary(params) {
|
|
27716
27743
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
27717
|
-
if (!sessionFile || !
|
|
27744
|
+
if (!sessionFile || !fs.existsSync(sessionFile)) return null;
|
|
27718
27745
|
const totals = emptyTotals();
|
|
27719
27746
|
let firstActivity;
|
|
27720
27747
|
let lastActivity;
|
|
@@ -29586,7 +29613,7 @@ async function handleCommands(params) {
|
|
|
29586
29613
|
try {
|
|
29587
29614
|
const messages = [];
|
|
29588
29615
|
if (sessionFile) {
|
|
29589
|
-
const content = await fs.readFile(sessionFile, "utf-8");
|
|
29616
|
+
const content = await fs$1.readFile(sessionFile, "utf-8");
|
|
29590
29617
|
for (const line of content.split("\n")) {
|
|
29591
29618
|
if (!line.trim()) continue;
|
|
29592
29619
|
try {
|
|
@@ -31920,7 +31947,7 @@ function asBoolean(value) {
|
|
|
31920
31947
|
}
|
|
31921
31948
|
function resolveTempPathParts(opts) {
|
|
31922
31949
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
31923
|
-
if (!opts.tmpDir)
|
|
31950
|
+
if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
|
|
31924
31951
|
recursive: true,
|
|
31925
31952
|
mode: 448
|
|
31926
31953
|
});
|
|
@@ -31986,7 +32013,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
31986
32013
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
31987
32014
|
const body = res.body;
|
|
31988
32015
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
31989
|
-
const fileHandle = await fs$
|
|
32016
|
+
const fileHandle = await fs$2.open(filePath, "w");
|
|
31990
32017
|
let bytes = 0;
|
|
31991
32018
|
let thrown;
|
|
31992
32019
|
try {
|
|
@@ -32005,7 +32032,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
32005
32032
|
await fileHandle.close();
|
|
32006
32033
|
}
|
|
32007
32034
|
if (thrown) {
|
|
32008
|
-
await fs$
|
|
32035
|
+
await fs$2.unlink(filePath).catch(() => {});
|
|
32009
32036
|
throw thrown;
|
|
32010
32037
|
}
|
|
32011
32038
|
return {
|
|
@@ -32015,7 +32042,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
32015
32042
|
}
|
|
32016
32043
|
async function writeBase64ToFile(filePath, base64) {
|
|
32017
32044
|
const buf = Buffer.from(base64, "base64");
|
|
32018
|
-
await fs$
|
|
32045
|
+
await fs$2.writeFile(filePath, buf);
|
|
32019
32046
|
return {
|
|
32020
32047
|
path: filePath,
|
|
32021
32048
|
bytes: buf.length
|
|
@@ -32081,7 +32108,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
32081
32108
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
32082
32109
|
throw new Error("jsonlPath outside allowed roots");
|
|
32083
32110
|
}
|
|
32084
|
-
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
32111
|
+
const canonical = await fs$1.realpath(resolved).catch(() => resolved);
|
|
32085
32112
|
if (!isInboundPathAllowed({
|
|
32086
32113
|
filePath: canonical,
|
|
32087
32114
|
roots
|
|
@@ -32089,7 +32116,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
32089
32116
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
32090
32117
|
throw new Error("jsonlPath outside allowed roots");
|
|
32091
32118
|
}
|
|
32092
|
-
return await fs.readFile(canonical, "utf8");
|
|
32119
|
+
return await fs$1.readFile(canonical, "utf8");
|
|
32093
32120
|
}
|
|
32094
32121
|
const CanvasToolSchema = Type.Object({
|
|
32095
32122
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -32893,12 +32920,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
32893
32920
|
}
|
|
32894
32921
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
32895
32922
|
const filePath = resolveRestartSentinelPath(env);
|
|
32896
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32923
|
+
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
32897
32924
|
const data = {
|
|
32898
32925
|
version: 1,
|
|
32899
32926
|
payload
|
|
32900
32927
|
};
|
|
32901
|
-
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32928
|
+
await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
32902
32929
|
return filePath;
|
|
32903
32930
|
}
|
|
32904
32931
|
|
|
@@ -33713,7 +33740,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
33713
33740
|
accountId: params.accountId
|
|
33714
33741
|
}),
|
|
33715
33742
|
sandboxValidated: true,
|
|
33716
|
-
readFile: (filePath) => fs.readFile(filePath)
|
|
33743
|
+
readFile: (filePath) => fs$1.readFile(filePath)
|
|
33717
33744
|
});
|
|
33718
33745
|
params.args.buffer = media.buffer.toString("base64");
|
|
33719
33746
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -36998,7 +37025,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
36998
37025
|
const root = resolveStateDir();
|
|
36999
37026
|
const agentsDir = path.join(root, "agents");
|
|
37000
37027
|
try {
|
|
37001
|
-
return
|
|
37028
|
+
return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
37002
37029
|
} catch {
|
|
37003
37030
|
return [];
|
|
37004
37031
|
}
|
|
@@ -38765,6 +38792,103 @@ function createSubagentsTool(opts) {
|
|
|
38765
38792
|
};
|
|
38766
38793
|
}
|
|
38767
38794
|
|
|
38795
|
+
//#endregion
|
|
38796
|
+
//#region src/infra/long-task-state.ts
|
|
38797
|
+
/**
|
|
38798
|
+
* Shared helpers for reading the on-disk state files written by
|
|
38799
|
+
* skills/long-task/scripts/detach-task.sh:
|
|
38800
|
+
*
|
|
38801
|
+
* task-<id>.pid — PID of the detached process
|
|
38802
|
+
* task-<id>.cmd — literal command line
|
|
38803
|
+
* task-<id>.started — ISO-8601 start timestamp
|
|
38804
|
+
* task-<id>.log — combined stdout + stderr
|
|
38805
|
+
* task-<id>.status — current state line
|
|
38806
|
+
* task-<id>.archived — tombstone written by the janitor when it sweeps
|
|
38807
|
+
* a finished task more than 7 days old
|
|
38808
|
+
*
|
|
38809
|
+
* Both the agent-facing tools (task_list / task_cancel) and the gateway's
|
|
38810
|
+
* tasks.list RPC consume this helper so the two views stay in sync.
|
|
38811
|
+
*/
|
|
38812
|
+
const TASK_FILE_PREFIX = "task-";
|
|
38813
|
+
const TASK_ID_RE = /^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,59}$/;
|
|
38814
|
+
const TASK_FILE_SUFFIXES = [
|
|
38815
|
+
".pid",
|
|
38816
|
+
".status",
|
|
38817
|
+
".started",
|
|
38818
|
+
".cmd",
|
|
38819
|
+
".log",
|
|
38820
|
+
".archived"
|
|
38821
|
+
];
|
|
38822
|
+
function defaultIsPidAlive(pid) {
|
|
38823
|
+
try {
|
|
38824
|
+
process.kill(pid, 0);
|
|
38825
|
+
return true;
|
|
38826
|
+
} catch (err) {
|
|
38827
|
+
if (err.code === "EPERM") return true;
|
|
38828
|
+
return false;
|
|
38829
|
+
}
|
|
38830
|
+
}
|
|
38831
|
+
async function safeRead(filePath) {
|
|
38832
|
+
try {
|
|
38833
|
+
return (await fs.promises.readFile(filePath, "utf8")).trim();
|
|
38834
|
+
} catch {
|
|
38835
|
+
return null;
|
|
38836
|
+
}
|
|
38837
|
+
}
|
|
38838
|
+
async function readTaskInfo(workdir, id, isPidAlive = defaultIsPidAlive) {
|
|
38839
|
+
const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.pid`);
|
|
38840
|
+
const statusPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.status`);
|
|
38841
|
+
const archivedPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.archived`);
|
|
38842
|
+
const logPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.log`);
|
|
38843
|
+
const [pidText, status, started, cmd, archived] = await Promise.all([
|
|
38844
|
+
safeRead(pidPath),
|
|
38845
|
+
safeRead(statusPath),
|
|
38846
|
+
safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.started`)),
|
|
38847
|
+
safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.cmd`)),
|
|
38848
|
+
safeRead(archivedPath)
|
|
38849
|
+
]);
|
|
38850
|
+
let pid = null;
|
|
38851
|
+
if (pidText) {
|
|
38852
|
+
const parsed = Number.parseInt(pidText, 10);
|
|
38853
|
+
if (Number.isFinite(parsed) && parsed > 0) pid = parsed;
|
|
38854
|
+
}
|
|
38855
|
+
let resolvedStatus;
|
|
38856
|
+
if (status) resolvedStatus = status;
|
|
38857
|
+
else if (archived) resolvedStatus = archived;
|
|
38858
|
+
else resolvedStatus = "missing";
|
|
38859
|
+
return {
|
|
38860
|
+
id,
|
|
38861
|
+
pid,
|
|
38862
|
+
alive: pid !== null && isPidAlive(pid),
|
|
38863
|
+
archived: archived !== null,
|
|
38864
|
+
status: resolvedStatus,
|
|
38865
|
+
started,
|
|
38866
|
+
cmd,
|
|
38867
|
+
pidPath,
|
|
38868
|
+
statusPath,
|
|
38869
|
+
archivedPath,
|
|
38870
|
+
logPath
|
|
38871
|
+
};
|
|
38872
|
+
}
|
|
38873
|
+
async function listTasksInWorkdir(workdir, isPidAlive = defaultIsPidAlive) {
|
|
38874
|
+
let entries;
|
|
38875
|
+
try {
|
|
38876
|
+
entries = await fs.promises.readdir(workdir);
|
|
38877
|
+
} catch {
|
|
38878
|
+
return [];
|
|
38879
|
+
}
|
|
38880
|
+
const taskIds = /* @__PURE__ */ new Set();
|
|
38881
|
+
for (const entry of entries) {
|
|
38882
|
+
if (!entry.startsWith(TASK_FILE_PREFIX)) continue;
|
|
38883
|
+
for (const suffix of TASK_FILE_SUFFIXES) if (entry.endsWith(suffix)) {
|
|
38884
|
+
const id = entry.slice(5, -suffix.length);
|
|
38885
|
+
if (id.length > 0 && TASK_ID_RE.test(id)) taskIds.add(id);
|
|
38886
|
+
break;
|
|
38887
|
+
}
|
|
38888
|
+
}
|
|
38889
|
+
return await Promise.all([...taskIds].toSorted().map((id) => readTaskInfo(workdir, id, isPidAlive)));
|
|
38890
|
+
}
|
|
38891
|
+
|
|
38768
38892
|
//#endregion
|
|
38769
38893
|
//#region src/agents/tools/task-tool.ts
|
|
38770
38894
|
/**
|
|
@@ -38774,21 +38898,14 @@ function createSubagentsTool(opts) {
|
|
|
38774
38898
|
* script writes task-<id>.{pid,cmd,started,log,status} state files into
|
|
38775
38899
|
* the agent's workspace; these tools read and act on those files so the
|
|
38776
38900
|
* agent can answer "what's running?" and kill a task without needing
|
|
38777
|
-
* shell access.
|
|
38901
|
+
* shell access. Shared scanning logic lives in
|
|
38902
|
+
* src/infra/long-task-state.ts so the gateway's tasks.list RPC and these
|
|
38903
|
+
* agent tools agree on every shape detail.
|
|
38778
38904
|
*
|
|
38779
38905
|
* task-id allow-list mirrors detach-task.sh: 1–60 chars from
|
|
38780
38906
|
* [a-zA-Z0-9._-], must not start with '.' or '-'. Diverging would let the
|
|
38781
38907
|
* agent kill processes it never spawned via path traversal.
|
|
38782
38908
|
*/
|
|
38783
|
-
const TASK_FILE_PREFIX = "task-";
|
|
38784
|
-
const TASK_ID_RE = /^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,59}$/;
|
|
38785
|
-
const TASK_FILE_SUFFIXES = [
|
|
38786
|
-
".pid",
|
|
38787
|
-
".status",
|
|
38788
|
-
".started",
|
|
38789
|
-
".cmd",
|
|
38790
|
-
".log"
|
|
38791
|
-
];
|
|
38792
38909
|
const ALLOWED_SIGNALS = new Set([
|
|
38793
38910
|
"SIGTERM",
|
|
38794
38911
|
"SIGINT",
|
|
@@ -38820,58 +38937,30 @@ function isPidAlive(pid) {
|
|
|
38820
38937
|
return false;
|
|
38821
38938
|
}
|
|
38822
38939
|
}
|
|
38823
|
-
async function safeRead(filePath) {
|
|
38824
|
-
try {
|
|
38825
|
-
return (await fsSync.promises.readFile(filePath, "utf8")).trim();
|
|
38826
|
-
} catch {
|
|
38827
|
-
return null;
|
|
38828
|
-
}
|
|
38829
|
-
}
|
|
38830
38940
|
function resolveWorkdir(deps, override) {
|
|
38831
38941
|
const raw = override?.trim();
|
|
38832
38942
|
if (!raw) return deps.workspaceDir;
|
|
38833
38943
|
if (!path.isAbsolute(raw)) throw new Error(`workdir must be an absolute path (got: ${raw})`);
|
|
38834
38944
|
return raw;
|
|
38835
38945
|
}
|
|
38836
|
-
async function readTaskInfo(workdir, id) {
|
|
38837
|
-
const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.pid`);
|
|
38838
|
-
const [pidText, status, started, cmd] = await Promise.all([
|
|
38839
|
-
safeRead(pidPath),
|
|
38840
|
-
safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.status`)),
|
|
38841
|
-
safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.started`)),
|
|
38842
|
-
safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.cmd`))
|
|
38843
|
-
]);
|
|
38844
|
-
let pid = null;
|
|
38845
|
-
if (pidText) {
|
|
38846
|
-
const parsed = Number.parseInt(pidText, 10);
|
|
38847
|
-
if (Number.isFinite(parsed) && parsed > 0) pid = parsed;
|
|
38848
|
-
}
|
|
38849
|
-
return {
|
|
38850
|
-
id,
|
|
38851
|
-
pid,
|
|
38852
|
-
alive: pid !== null && isPidAlive(pid),
|
|
38853
|
-
status: status ?? "missing",
|
|
38854
|
-
started,
|
|
38855
|
-
cmd,
|
|
38856
|
-
pidPath,
|
|
38857
|
-
statusPath: path.join(workdir, `${TASK_FILE_PREFIX}${id}.status`),
|
|
38858
|
-
logPath: path.join(workdir, `${TASK_FILE_PREFIX}${id}.log`)
|
|
38859
|
-
};
|
|
38860
|
-
}
|
|
38861
38946
|
function createTaskListTool(deps) {
|
|
38862
38947
|
return {
|
|
38863
38948
|
label: "Task List",
|
|
38864
38949
|
name: "task_list",
|
|
38865
38950
|
description: `List long-running detached tasks in the agent's workspace.
|
|
38866
38951
|
|
|
38867
|
-
Globs task-<id>.{pid,status,started,cmd,log} files, reads their
|
|
38868
|
-
checks each PID's liveness. Use this to find the task-id of a
|
|
38869
|
-
detach-task before calling task_cancel, or to answer "what's
|
|
38870
|
-
now?" without re-asking the user.
|
|
38871
|
-
|
|
38872
|
-
Returns: { workdir, tasks: [{ id, pid, alive, status, started, cmd, pidPath, statusPath, logPath }] }.
|
|
38873
|
-
|
|
38874
|
-
|
|
38952
|
+
Globs task-<id>.{pid,status,started,cmd,log,archived} files, reads their
|
|
38953
|
+
state, and checks each PID's liveness. Use this to find the task-id of a
|
|
38954
|
+
running detach-task before calling task_cancel, or to answer "what's
|
|
38955
|
+
running right now?" without re-asking the user.
|
|
38956
|
+
|
|
38957
|
+
Returns: { workdir, tasks: [{ id, pid, alive, status, archived, started, cmd, pidPath, statusPath, archivedPath, logPath }] }.
|
|
38958
|
+
- archived=true means the janitor swept this task's live state files (>7d
|
|
38959
|
+
dead) and replaced them with a tombstone. The canonical end status is
|
|
38960
|
+
preserved in the .archived file. Distinct from "missing" (no tombstone,
|
|
38961
|
+
no live files) which means the task crashed or its workdir was wiped.
|
|
38962
|
+
- Tasks whose .pid file is missing are still listed (alive=false, pid=null)
|
|
38963
|
+
so the agent can spot orphan state files.`,
|
|
38875
38964
|
parameters: TaskListSchema,
|
|
38876
38965
|
execute: async (_toolCallId, args) => {
|
|
38877
38966
|
const override = readStringParam(args, "workdir");
|
|
@@ -38885,34 +38974,19 @@ the agent can spot orphan state files.`,
|
|
|
38885
38974
|
error: err instanceof Error ? err.message : String(err)
|
|
38886
38975
|
});
|
|
38887
38976
|
}
|
|
38888
|
-
let entries;
|
|
38889
38977
|
try {
|
|
38890
|
-
|
|
38891
|
-
|
|
38892
|
-
if (err.code === "ENOENT") return jsonResult({
|
|
38978
|
+
const tasks = await listTasksInWorkdir(workdir, isPidAlive);
|
|
38979
|
+
return jsonResult({
|
|
38893
38980
|
workdir,
|
|
38894
|
-
tasks
|
|
38981
|
+
tasks
|
|
38895
38982
|
});
|
|
38983
|
+
} catch (err) {
|
|
38896
38984
|
return jsonResult({
|
|
38897
38985
|
workdir,
|
|
38898
38986
|
tasks: [],
|
|
38899
38987
|
error: err instanceof Error ? err.message : String(err)
|
|
38900
38988
|
});
|
|
38901
38989
|
}
|
|
38902
|
-
const taskIds = /* @__PURE__ */ new Set();
|
|
38903
|
-
for (const entry of entries) {
|
|
38904
|
-
if (!entry.startsWith(TASK_FILE_PREFIX)) continue;
|
|
38905
|
-
for (const suffix of TASK_FILE_SUFFIXES) if (entry.endsWith(suffix)) {
|
|
38906
|
-
const id = entry.slice(5, -suffix.length);
|
|
38907
|
-
if (id.length > 0 && TASK_ID_RE.test(id)) taskIds.add(id);
|
|
38908
|
-
break;
|
|
38909
|
-
}
|
|
38910
|
-
}
|
|
38911
|
-
const tasks = await Promise.all([...taskIds].toSorted().map((id) => readTaskInfo(workdir, id)));
|
|
38912
|
-
return jsonResult({
|
|
38913
|
-
workdir,
|
|
38914
|
-
tasks
|
|
38915
|
-
});
|
|
38916
38990
|
}
|
|
38917
38991
|
};
|
|
38918
38992
|
}
|
|
@@ -38966,7 +39040,7 @@ Returns: { ok, taskId, pid, sentSignal, alreadyDead?, error? }.`,
|
|
|
38966
39040
|
const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${taskId}.pid`);
|
|
38967
39041
|
let pidText;
|
|
38968
39042
|
try {
|
|
38969
|
-
pidText = (await
|
|
39043
|
+
pidText = (await fs.promises.readFile(pidPath, "utf8")).trim();
|
|
38970
39044
|
} catch (err) {
|
|
38971
39045
|
if (err.code === "ENOENT") return jsonResult({
|
|
38972
39046
|
ok: false,
|
|
@@ -41116,18 +41190,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
41116
41190
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
41117
41191
|
}
|
|
41118
41192
|
async function writeCliImages(images) {
|
|
41119
|
-
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
41193
|
+
const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
|
|
41120
41194
|
const paths = [];
|
|
41121
41195
|
for (let i = 0; i < images.length; i += 1) {
|
|
41122
41196
|
const image = images[i];
|
|
41123
41197
|
const ext = resolveImageExtension(image.mimeType);
|
|
41124
41198
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
41125
41199
|
const buffer = Buffer.from(image.data, "base64");
|
|
41126
|
-
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
41200
|
+
await fs$1.writeFile(filePath, buffer, { mode: 384 });
|
|
41127
41201
|
paths.push(filePath);
|
|
41128
41202
|
}
|
|
41129
41203
|
const cleanup = async () => {
|
|
41130
|
-
await fs.rm(tempDir, {
|
|
41204
|
+
await fs$1.rm(tempDir, {
|
|
41131
41205
|
recursive: true,
|
|
41132
41206
|
force: true
|
|
41133
41207
|
});
|
|
@@ -42201,7 +42275,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
42201
42275
|
if (corruptedSessionId) {
|
|
42202
42276
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
42203
42277
|
try {
|
|
42204
|
-
|
|
42278
|
+
fs.unlinkSync(transcriptPath);
|
|
42205
42279
|
} catch {}
|
|
42206
42280
|
}
|
|
42207
42281
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -42940,9 +43014,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
42940
43014
|
* Returns messages from the last N lines (default 100).
|
|
42941
43015
|
*/
|
|
42942
43016
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
42943
|
-
if (!
|
|
43017
|
+
if (!fs.existsSync(sessionFile)) return [];
|
|
42944
43018
|
try {
|
|
42945
|
-
const recentLines =
|
|
43019
|
+
const recentLines = fs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
42946
43020
|
const messages = [];
|
|
42947
43021
|
for (const line of recentLines) try {
|
|
42948
43022
|
const entry = JSON.parse(line);
|
|
@@ -42983,8 +43057,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
42983
43057
|
async function readPostCompactionContext(workspaceDir) {
|
|
42984
43058
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
42985
43059
|
try {
|
|
42986
|
-
if (!
|
|
42987
|
-
const sections = extractSections(await
|
|
43060
|
+
if (!fs.existsSync(agentsPath)) return null;
|
|
43061
|
+
const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
42988
43062
|
if (sections.length === 0) return null;
|
|
42989
43063
|
const combined = sections.join("\n\n");
|
|
42990
43064
|
return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
|
|
@@ -43188,7 +43262,7 @@ async function runReplyAgent(params) {
|
|
|
43188
43262
|
if (resolved) transcriptCandidates.add(resolved);
|
|
43189
43263
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
43190
43264
|
for (const candidate of transcriptCandidates) try {
|
|
43191
|
-
|
|
43265
|
+
fs.unlinkSync(candidate);
|
|
43192
43266
|
} catch {}
|
|
43193
43267
|
}
|
|
43194
43268
|
return true;
|
|
@@ -44094,7 +44168,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
44094
44168
|
return;
|
|
44095
44169
|
}
|
|
44096
44170
|
try {
|
|
44097
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
44171
|
+
const { deliverOutboundPayloads } = await import("./deliver-qUx-eLKt.js").then((n) => n.n);
|
|
44098
44172
|
await deliverOutboundPayloads({
|
|
44099
44173
|
cfg: params.cfg,
|
|
44100
44174
|
channel,
|
|
@@ -44120,7 +44194,7 @@ function forkSessionFromParent(params) {
|
|
|
44120
44194
|
agentId: params.agentId,
|
|
44121
44195
|
sessionsDir: params.sessionsDir
|
|
44122
44196
|
});
|
|
44123
|
-
if (!parentSessionFile || !
|
|
44197
|
+
if (!parentSessionFile || !fs.existsSync(parentSessionFile)) return null;
|
|
44124
44198
|
try {
|
|
44125
44199
|
const manager = SessionManager.open(parentSessionFile);
|
|
44126
44200
|
const leafId = manager.getLeafId();
|
|
@@ -44144,7 +44218,7 @@ function forkSessionFromParent(params) {
|
|
|
44144
44218
|
cwd: manager.getCwd(),
|
|
44145
44219
|
parentSession: parentSessionFile
|
|
44146
44220
|
};
|
|
44147
|
-
|
|
44221
|
+
fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
44148
44222
|
return {
|
|
44149
44223
|
sessionId,
|
|
44150
44224
|
sessionFile
|
|
@@ -44469,7 +44543,7 @@ async function stageSandboxMedia(params) {
|
|
|
44469
44543
|
};
|
|
44470
44544
|
try {
|
|
44471
44545
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
44472
|
-
await fs.mkdir(destDir, { recursive: true });
|
|
44546
|
+
await fs$1.mkdir(destDir, { recursive: true });
|
|
44473
44547
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
44474
44548
|
cfg,
|
|
44475
44549
|
accountId: ctx.AccountId
|
|
@@ -44519,7 +44593,7 @@ async function stageSandboxMedia(params) {
|
|
|
44519
44593
|
usedNames.add(fileName);
|
|
44520
44594
|
const dest = path.join(destDir, fileName);
|
|
44521
44595
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
44522
|
-
else await fs.copyFile(source, dest);
|
|
44596
|
+
else await fs$1.copyFile(source, dest);
|
|
44523
44597
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
44524
44598
|
staged.set(source, stagedPath);
|
|
44525
44599
|
}
|
|
@@ -47539,8 +47613,8 @@ async function describeStickerImage(params) {
|
|
|
47539
47613
|
const { provider, model } = resolved;
|
|
47540
47614
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
47541
47615
|
try {
|
|
47542
|
-
const buffer = await fs.readFile(imagePath);
|
|
47543
|
-
const { describeImageWithModel } = await import("./image-
|
|
47616
|
+
const buffer = await fs$1.readFile(imagePath);
|
|
47617
|
+
const { describeImageWithModel } = await import("./image-C6rCON9L.js").then((n) => n.n);
|
|
47544
47618
|
return (await describeImageWithModel({
|
|
47545
47619
|
buffer,
|
|
47546
47620
|
fileName: "sticker.webp",
|
|
@@ -47963,7 +48037,7 @@ function createWhatsAppLoginTool() {
|
|
|
47963
48037
|
force: Type.Optional(Type.Boolean())
|
|
47964
48038
|
}),
|
|
47965
48039
|
execute: async (_toolCallId, args) => {
|
|
47966
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
48040
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DdAVHOEC.js");
|
|
47967
48041
|
if ((args?.action ?? "start") === "wait") {
|
|
47968
48042
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
47969
48043
|
return {
|
|
@@ -48245,7 +48319,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
48245
48319
|
}
|
|
48246
48320
|
async function checkReadableFile(pathname) {
|
|
48247
48321
|
try {
|
|
48248
|
-
await fs.access(pathname,
|
|
48322
|
+
await fs$1.access(pathname, fs.constants.R_OK);
|
|
48249
48323
|
return { exists: true };
|
|
48250
48324
|
} catch (err) {
|
|
48251
48325
|
const code = err.code;
|
|
@@ -48262,7 +48336,7 @@ async function scanSessionFiles(agentId) {
|
|
|
48262
48336
|
try {
|
|
48263
48337
|
return {
|
|
48264
48338
|
source: "sessions",
|
|
48265
|
-
totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
48339
|
+
totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
|
|
48266
48340
|
issues
|
|
48267
48341
|
};
|
|
48268
48342
|
} catch (err) {
|
|
@@ -48294,7 +48368,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
48294
48368
|
if (alt.issue) issues.push(alt.issue);
|
|
48295
48369
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
48296
48370
|
for (const extraPath of resolvedExtraPaths) try {
|
|
48297
|
-
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
48371
|
+
if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
|
|
48298
48372
|
const extraCheck = await checkReadableFile(extraPath);
|
|
48299
48373
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
48300
48374
|
} catch (err) {
|
|
@@ -48304,7 +48378,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
48304
48378
|
}
|
|
48305
48379
|
let dirReadable = null;
|
|
48306
48380
|
try {
|
|
48307
|
-
await fs.access(memoryDir,
|
|
48381
|
+
await fs$1.access(memoryDir, fs.constants.R_OK);
|
|
48308
48382
|
dirReadable = true;
|
|
48309
48383
|
} catch (err) {
|
|
48310
48384
|
const code = err.code;
|
|
@@ -48352,7 +48426,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
48352
48426
|
if (!dbPath) return null;
|
|
48353
48427
|
let stat;
|
|
48354
48428
|
try {
|
|
48355
|
-
stat = await fs.stat(dbPath);
|
|
48429
|
+
stat = await fs$1.stat(dbPath);
|
|
48356
48430
|
} catch (err) {
|
|
48357
48431
|
const code = err.code;
|
|
48358
48432
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -50289,7 +50363,7 @@ async function preflightDiscordMessage(params) {
|
|
|
50289
50363
|
let preflightTranscript;
|
|
50290
50364
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
50291
50365
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
50292
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
50366
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-rjCWpcfE.js");
|
|
50293
50367
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
50294
50368
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
50295
50369
|
ctx: {
|
|
@@ -51252,7 +51326,7 @@ function identityHasValues(identity) {
|
|
|
51252
51326
|
}
|
|
51253
51327
|
function loadIdentityFromFile(identityPath) {
|
|
51254
51328
|
try {
|
|
51255
|
-
const parsed = parseIdentityMarkdown(
|
|
51329
|
+
const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
|
|
51256
51330
|
if (!identityHasValues(parsed)) return null;
|
|
51257
51331
|
return parsed;
|
|
51258
51332
|
} catch {
|
|
@@ -51291,7 +51365,7 @@ function isDataAvatar(value) {
|
|
|
51291
51365
|
}
|
|
51292
51366
|
function resolveExistingPath(value) {
|
|
51293
51367
|
try {
|
|
51294
|
-
return
|
|
51368
|
+
return fs.realpathSync(value);
|
|
51295
51369
|
} catch {
|
|
51296
51370
|
return path.resolve(value);
|
|
51297
51371
|
}
|
|
@@ -51315,7 +51389,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
51315
51389
|
reason: "unsupported_extension"
|
|
51316
51390
|
};
|
|
51317
51391
|
try {
|
|
51318
|
-
if (!
|
|
51392
|
+
if (!fs.statSync(realPath).isFile()) return {
|
|
51319
51393
|
ok: false,
|
|
51320
51394
|
reason: "missing"
|
|
51321
51395
|
};
|
|
@@ -52178,7 +52252,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
52178
52252
|
}
|
|
52179
52253
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
52180
52254
|
try {
|
|
52181
|
-
const raw = await
|
|
52255
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
52182
52256
|
return {
|
|
52183
52257
|
value: JSON.parse(raw),
|
|
52184
52258
|
exists: true
|
|
@@ -52196,14 +52270,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
52196
52270
|
}
|
|
52197
52271
|
async function writeJsonFileAtomically(filePath, value) {
|
|
52198
52272
|
const dir = path.dirname(filePath);
|
|
52199
|
-
await
|
|
52273
|
+
await fs.promises.mkdir(dir, {
|
|
52200
52274
|
recursive: true,
|
|
52201
52275
|
mode: 448
|
|
52202
52276
|
});
|
|
52203
52277
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
52204
|
-
await
|
|
52205
|
-
await
|
|
52206
|
-
await
|
|
52278
|
+
await fs.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
52279
|
+
await fs.promises.chmod(tmp, 384);
|
|
52280
|
+
await fs.promises.rename(tmp, filePath);
|
|
52207
52281
|
}
|
|
52208
52282
|
async function readPreferencesStore(filePath) {
|
|
52209
52283
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -54295,27 +54369,27 @@ function isVoiceChannelType(type) {
|
|
|
54295
54369
|
function createDefaultDeps() {
|
|
54296
54370
|
return {
|
|
54297
54371
|
sendMessageWhatsApp: async (...args) => {
|
|
54298
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
54372
|
+
const { sendMessageWhatsApp } = await import("./web-YSRcfzpP.js");
|
|
54299
54373
|
return await sendMessageWhatsApp(...args);
|
|
54300
54374
|
},
|
|
54301
54375
|
sendMessageTelegram: async (...args) => {
|
|
54302
|
-
const { sendMessageTelegram } = await import("./send-
|
|
54376
|
+
const { sendMessageTelegram } = await import("./send-Bb4it0te.js").then((n) => n.l);
|
|
54303
54377
|
return await sendMessageTelegram(...args);
|
|
54304
54378
|
},
|
|
54305
54379
|
sendMessageDiscord: async (...args) => {
|
|
54306
|
-
const { sendMessageDiscord } = await import("./send-
|
|
54380
|
+
const { sendMessageDiscord } = await import("./send-C0QjmPaf.js").then((n) => n.t);
|
|
54307
54381
|
return await sendMessageDiscord(...args);
|
|
54308
54382
|
},
|
|
54309
54383
|
sendMessageSlack: async (...args) => {
|
|
54310
|
-
const { sendMessageSlack } = await import("./send-
|
|
54384
|
+
const { sendMessageSlack } = await import("./send-BKo1T3HF.js").then((n) => n.n);
|
|
54311
54385
|
return await sendMessageSlack(...args);
|
|
54312
54386
|
},
|
|
54313
54387
|
sendMessageSignal: async (...args) => {
|
|
54314
|
-
const { sendMessageSignal } = await import("./send-
|
|
54388
|
+
const { sendMessageSignal } = await import("./send-Cpk3Ti6-.js").then((n) => n.i);
|
|
54315
54389
|
return await sendMessageSignal(...args);
|
|
54316
54390
|
},
|
|
54317
54391
|
sendMessageIMessage: async (...args) => {
|
|
54318
|
-
const { sendMessageIMessage } = await import("./send-
|
|
54392
|
+
const { sendMessageIMessage } = await import("./send-DFtnbzqy.js").then((n) => n.n);
|
|
54319
54393
|
return await sendMessageIMessage(...args);
|
|
54320
54394
|
}
|
|
54321
54395
|
};
|
|
@@ -55224,10 +55298,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
55224
55298
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
55225
55299
|
}
|
|
55226
55300
|
async function writeWavFile(pcm) {
|
|
55227
|
-
const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
55301
|
+
const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
|
|
55228
55302
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
55229
55303
|
const wav = buildWavBuffer(pcm);
|
|
55230
|
-
await fs.writeFile(filePath, wav);
|
|
55304
|
+
await fs$1.writeFile(filePath, wav);
|
|
55231
55305
|
scheduleTempCleanup(tempDir);
|
|
55232
55306
|
return {
|
|
55233
55307
|
path: filePath,
|
|
@@ -55236,7 +55310,7 @@ async function writeWavFile(pcm) {
|
|
|
55236
55310
|
}
|
|
55237
55311
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
55238
55312
|
setTimeout(() => {
|
|
55239
|
-
fs.rm(tempDir, {
|
|
55313
|
+
fs$1.rm(tempDir, {
|
|
55240
55314
|
recursive: true,
|
|
55241
55315
|
force: true
|
|
55242
55316
|
}).catch((err) => {
|
|
@@ -57200,7 +57274,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
57200
57274
|
super(options);
|
|
57201
57275
|
}
|
|
57202
57276
|
createWebSocket(url) {
|
|
57203
|
-
return new WebSocket(url, { agent });
|
|
57277
|
+
return new WebSocket$1(url, { agent });
|
|
57204
57278
|
}
|
|
57205
57279
|
}
|
|
57206
57280
|
return new ProxyGatewayPlugin();
|
|
@@ -58300,7 +58374,7 @@ async function detectBinary(name) {
|
|
|
58300
58374
|
if (!isSafeExecutableValue(name)) return false;
|
|
58301
58375
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
58302
58376
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
58303
|
-
await fs.access(resolved);
|
|
58377
|
+
await fs$1.access(resolved);
|
|
58304
58378
|
return true;
|
|
58305
58379
|
} catch {
|
|
58306
58380
|
return false;
|
|
@@ -58850,7 +58924,7 @@ function normalizeAllowList$1(list) {
|
|
|
58850
58924
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
58851
58925
|
try {
|
|
58852
58926
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
58853
|
-
const content = await fs.readFile(expanded, "utf8");
|
|
58927
|
+
const content = await fs$1.readFile(expanded, "utf8");
|
|
58854
58928
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
58855
58929
|
if (userHostMatch) return userHostMatch[1];
|
|
58856
58930
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -59194,7 +59268,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
59194
59268
|
function readFileIfExists(filePath) {
|
|
59195
59269
|
if (!filePath) return;
|
|
59196
59270
|
try {
|
|
59197
|
-
return
|
|
59271
|
+
return fs.readFileSync(filePath, "utf-8").trim();
|
|
59198
59272
|
} catch {
|
|
59199
59273
|
return;
|
|
59200
59274
|
}
|
|
@@ -59755,7 +59829,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
59755
59829
|
prefix: "line-media",
|
|
59756
59830
|
extension: getExtensionForContentType(contentType)
|
|
59757
59831
|
});
|
|
59758
|
-
await
|
|
59832
|
+
await fs.promises.writeFile(filePath, buffer);
|
|
59759
59833
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
59760
59834
|
return {
|
|
59761
59835
|
path: filePath,
|
|
@@ -64742,7 +64816,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
64742
64816
|
}
|
|
64743
64817
|
let commandsRegistry;
|
|
64744
64818
|
async function getCommandsRegistry() {
|
|
64745
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
64819
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DxbSTLNQ.js").then((n) => n.n);
|
|
64746
64820
|
return commandsRegistry;
|
|
64747
64821
|
}
|
|
64748
64822
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -65084,11 +65158,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
65084
65158
|
const channelName = channelInfo?.name;
|
|
65085
65159
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
65086
65160
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
65087
|
-
import("./resolve-route-
|
|
65161
|
+
import("./resolve-route-Jy5dFY67.js").then((n) => n.r),
|
|
65088
65162
|
import("./inbound-context-DZQU0r3y.js").then((n) => n.n),
|
|
65089
65163
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
65090
65164
|
]);
|
|
65091
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-
|
|
65165
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-CvEIl6_d.js").then((n) => n.n)]);
|
|
65092
65166
|
const route = resolveAgentRoute({
|
|
65093
65167
|
cfg,
|
|
65094
65168
|
channel: "slack",
|
|
@@ -65145,9 +65219,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
65145
65219
|
});
|
|
65146
65220
|
const deliverSlashPayloads = async (replies) => {
|
|
65147
65221
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
65148
|
-
import("./replies-
|
|
65149
|
-
import("./chunk-
|
|
65150
|
-
import("./markdown-tables-
|
|
65222
|
+
import("./replies-CUWXgyx2.js").then((n) => n.r),
|
|
65223
|
+
import("./chunk-BRe1o4Af.js").then((n) => n.s),
|
|
65224
|
+
import("./markdown-tables-x2Xe2UXh.js").then((n) => n.t)
|
|
65151
65225
|
]);
|
|
65152
65226
|
await deliverSlackSlashReplies({
|
|
65153
65227
|
replies,
|
|
@@ -65200,7 +65274,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
65200
65274
|
let nativeCommands = [];
|
|
65201
65275
|
if (nativeEnabled) {
|
|
65202
65276
|
reg = await getCommandsRegistry();
|
|
65203
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
65277
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DG2lcozb.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
65204
65278
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
65205
65279
|
skillCommands,
|
|
65206
65280
|
provider: "slack"
|
|
@@ -67418,7 +67492,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
67418
67492
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
67419
67493
|
let preflightTranscript;
|
|
67420
67494
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
67421
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
67495
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-rjCWpcfE.js");
|
|
67422
67496
|
preflightTranscript = await transcribeFirstAudio({
|
|
67423
67497
|
ctx: {
|
|
67424
67498
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -69186,7 +69260,7 @@ function safeParseState(raw) {
|
|
|
69186
69260
|
async function readTelegramUpdateOffset(params) {
|
|
69187
69261
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
69188
69262
|
try {
|
|
69189
|
-
return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
69263
|
+
return safeParseState(await fs$1.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
69190
69264
|
} catch (err) {
|
|
69191
69265
|
if (err.code === "ENOENT") return null;
|
|
69192
69266
|
return null;
|
|
@@ -69195,7 +69269,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
69195
69269
|
async function writeTelegramUpdateOffset(params) {
|
|
69196
69270
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
69197
69271
|
const dir = path.dirname(filePath);
|
|
69198
|
-
await fs.mkdir(dir, {
|
|
69272
|
+
await fs$1.mkdir(dir, {
|
|
69199
69273
|
recursive: true,
|
|
69200
69274
|
mode: 448
|
|
69201
69275
|
});
|
|
@@ -69204,9 +69278,9 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
69204
69278
|
version: STORE_VERSION,
|
|
69205
69279
|
lastUpdateId: params.updateId
|
|
69206
69280
|
};
|
|
69207
|
-
await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
69208
|
-
await fs.chmod(tmp, 384);
|
|
69209
|
-
await fs.rename(tmp, filePath);
|
|
69281
|
+
await fs$1.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
69282
|
+
await fs$1.chmod(tmp, 384);
|
|
69283
|
+
await fs$1.rename(tmp, filePath);
|
|
69210
69284
|
}
|
|
69211
69285
|
|
|
69212
69286
|
//#endregion
|
|
@@ -69563,23 +69637,23 @@ let webLoginQrPromise = null;
|
|
|
69563
69637
|
let webChannelPromise = null;
|
|
69564
69638
|
let whatsappActionsPromise = null;
|
|
69565
69639
|
function loadWebOutbound() {
|
|
69566
|
-
webOutboundPromise ??= import("./outbound-
|
|
69640
|
+
webOutboundPromise ??= import("./outbound-Zmd7UyQH.js").then((n) => n.t);
|
|
69567
69641
|
return webOutboundPromise;
|
|
69568
69642
|
}
|
|
69569
69643
|
function loadWebLogin() {
|
|
69570
|
-
webLoginPromise ??= import("./login-
|
|
69644
|
+
webLoginPromise ??= import("./login-D4rZWBXe.js").then((n) => n.n);
|
|
69571
69645
|
return webLoginPromise;
|
|
69572
69646
|
}
|
|
69573
69647
|
function loadWebLoginQr() {
|
|
69574
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
69648
|
+
webLoginQrPromise ??= import("./login-qr-DdAVHOEC.js");
|
|
69575
69649
|
return webLoginQrPromise;
|
|
69576
69650
|
}
|
|
69577
69651
|
function loadWebChannel() {
|
|
69578
|
-
webChannelPromise ??= import("./web-
|
|
69652
|
+
webChannelPromise ??= import("./web-YSRcfzpP.js");
|
|
69579
69653
|
return webChannelPromise;
|
|
69580
69654
|
}
|
|
69581
69655
|
function loadWhatsAppActions() {
|
|
69582
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
69656
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-DmVpLXmh.js");
|
|
69583
69657
|
return whatsappActionsPromise;
|
|
69584
69658
|
}
|
|
69585
69659
|
function createPluginRuntime() {
|
|
@@ -69802,7 +69876,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
69802
69876
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
69803
69877
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
69804
69878
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
69805
|
-
for (const candidate of orderedCandidates) if (
|
|
69879
|
+
for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
|
|
69806
69880
|
const parent = path.dirname(cursor);
|
|
69807
69881
|
if (parent === cursor) break;
|
|
69808
69882
|
cursor = parent;
|
|
@@ -70348,7 +70422,7 @@ function resolvePluginTools(params) {
|
|
|
70348
70422
|
//#endregion
|
|
70349
70423
|
//#region src/agents/apply-patch-update.ts
|
|
70350
70424
|
async function defaultReadFile(filePath) {
|
|
70351
|
-
return fs.readFile(filePath, "utf8");
|
|
70425
|
+
return fs$1.readFile(filePath, "utf8");
|
|
70352
70426
|
}
|
|
70353
70427
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
70354
70428
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -70592,10 +70666,10 @@ function resolvePatchFileOps(options) {
|
|
|
70592
70666
|
};
|
|
70593
70667
|
}
|
|
70594
70668
|
return {
|
|
70595
|
-
readFile: (filePath) => fs.readFile(filePath, "utf8"),
|
|
70596
|
-
writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
|
|
70597
|
-
remove: (filePath) => fs.rm(filePath),
|
|
70598
|
-
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
70669
|
+
readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
|
|
70670
|
+
writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
|
|
70671
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
70672
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
70599
70673
|
};
|
|
70600
70674
|
}
|
|
70601
70675
|
async function ensureDir(filePath, ops) {
|
|
@@ -71851,7 +71925,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71851
71925
|
};
|
|
71852
71926
|
let content;
|
|
71853
71927
|
try {
|
|
71854
|
-
content = await fs.readFile(sessionFile, "utf-8");
|
|
71928
|
+
content = await fs$1.readFile(sessionFile, "utf-8");
|
|
71855
71929
|
} catch (err) {
|
|
71856
71930
|
if (err?.code === "ENOENT") return {
|
|
71857
71931
|
repaired: false,
|
|
@@ -71899,15 +71973,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
71899
71973
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
71900
71974
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
71901
71975
|
try {
|
|
71902
|
-
const stat = await fs.stat(sessionFile).catch(() => null);
|
|
71903
|
-
await fs.writeFile(backupPath, content, "utf-8");
|
|
71904
|
-
if (stat) await fs.chmod(backupPath, stat.mode);
|
|
71905
|
-
await fs.writeFile(tmpPath, cleaned, "utf-8");
|
|
71906
|
-
if (stat) await fs.chmod(tmpPath, stat.mode);
|
|
71907
|
-
await fs.rename(tmpPath, sessionFile);
|
|
71976
|
+
const stat = await fs$1.stat(sessionFile).catch(() => null);
|
|
71977
|
+
await fs$1.writeFile(backupPath, content, "utf-8");
|
|
71978
|
+
if (stat) await fs$1.chmod(backupPath, stat.mode);
|
|
71979
|
+
await fs$1.writeFile(tmpPath, cleaned, "utf-8");
|
|
71980
|
+
if (stat) await fs$1.chmod(tmpPath, stat.mode);
|
|
71981
|
+
await fs$1.rename(tmpPath, sessionFile);
|
|
71908
71982
|
} catch (err) {
|
|
71909
71983
|
try {
|
|
71910
|
-
await fs.unlink(tmpPath);
|
|
71984
|
+
await fs$1.unlink(tmpPath);
|
|
71911
71985
|
} catch (cleanupErr) {
|
|
71912
71986
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
71913
71987
|
}
|
|
@@ -72595,8 +72669,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
72595
72669
|
const workspaceDir = process.cwd();
|
|
72596
72670
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
72597
72671
|
try {
|
|
72598
|
-
if (!
|
|
72599
|
-
const sections = extractSections(await
|
|
72672
|
+
if (!fs.existsSync(agentsPath)) return "";
|
|
72673
|
+
const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
72600
72674
|
if (sections.length === 0) return "";
|
|
72601
72675
|
const combined = sections.join("\n\n");
|
|
72602
72676
|
return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
|
|
@@ -73152,7 +73226,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
73152
73226
|
if (!isSessionManagerCacheEnabled()) return;
|
|
73153
73227
|
if (isSessionManagerCached(sessionFile)) return;
|
|
73154
73228
|
try {
|
|
73155
|
-
const handle = await fs.open(sessionFile, "r");
|
|
73229
|
+
const handle = await fs$1.open(sessionFile, "r");
|
|
73156
73230
|
try {
|
|
73157
73231
|
const buffer = Buffer$1.alloc(4096);
|
|
73158
73232
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -73285,14 +73359,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
73285
73359
|
if (!apiKeyInfo.apiKey) {
|
|
73286
73360
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
73287
73361
|
} else if (model.provider === "github-copilot") {
|
|
73288
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
73362
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
|
|
73289
73363
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
73290
73364
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
73291
73365
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
73292
73366
|
} catch (err) {
|
|
73293
73367
|
return fail(describeUnknownError(err));
|
|
73294
73368
|
}
|
|
73295
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
73369
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
73296
73370
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
73297
73371
|
const sandbox = await resolveSandboxContext({
|
|
73298
73372
|
config: params.config,
|
|
@@ -73300,7 +73374,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
73300
73374
|
workspaceDir: resolvedWorkspace
|
|
73301
73375
|
});
|
|
73302
73376
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
73303
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
73377
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
73304
73378
|
await ensureSessionHeader({
|
|
73305
73379
|
sessionFile: params.sessionFile,
|
|
73306
73380
|
sessionId: params.sessionId,
|
|
@@ -73654,12 +73728,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
73654
73728
|
const existing = writers.get(filePath);
|
|
73655
73729
|
if (existing) return existing;
|
|
73656
73730
|
const dir = path.dirname(filePath);
|
|
73657
|
-
const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73731
|
+
const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
73658
73732
|
let queue = Promise.resolve();
|
|
73659
73733
|
const writer = {
|
|
73660
73734
|
filePath,
|
|
73661
73735
|
write: (line) => {
|
|
73662
|
-
queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73736
|
+
queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
73663
73737
|
}
|
|
73664
73738
|
};
|
|
73665
73739
|
writers.set(filePath, writer);
|
|
@@ -74688,11 +74762,11 @@ function appendRawStream(payload) {
|
|
|
74688
74762
|
if (!rawStreamReady) {
|
|
74689
74763
|
rawStreamReady = true;
|
|
74690
74764
|
try {
|
|
74691
|
-
|
|
74765
|
+
fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
74692
74766
|
} catch {}
|
|
74693
74767
|
}
|
|
74694
74768
|
try {
|
|
74695
|
-
|
|
74769
|
+
fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
74696
74770
|
} catch {}
|
|
74697
74771
|
}
|
|
74698
74772
|
|
|
@@ -76501,7 +76575,7 @@ Use the message tool with buttons:
|
|
|
76501
76575
|
*/
|
|
76502
76576
|
async function readSessionFile(sessionFile) {
|
|
76503
76577
|
try {
|
|
76504
|
-
return await fs.readFile(sessionFile, "utf-8");
|
|
76578
|
+
return await fs$1.readFile(sessionFile, "utf-8");
|
|
76505
76579
|
} catch {
|
|
76506
76580
|
return null;
|
|
76507
76581
|
}
|
|
@@ -76510,8 +76584,8 @@ async function writeAtomically(sessionFile, text) {
|
|
|
76510
76584
|
const dir = path.dirname(sessionFile);
|
|
76511
76585
|
const base = path.basename(sessionFile);
|
|
76512
76586
|
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
76513
|
-
await fs.writeFile(tmp, text, "utf-8");
|
|
76514
|
-
await fs.rename(tmp, sessionFile);
|
|
76587
|
+
await fs$1.writeFile(tmp, text, "utf-8");
|
|
76588
|
+
await fs$1.rename(tmp, sessionFile);
|
|
76515
76589
|
}
|
|
76516
76590
|
/**
|
|
76517
76591
|
* Remove empty assistant JSONL entries from the session file.
|
|
@@ -76613,7 +76687,7 @@ function isInPoisonRange(version) {
|
|
|
76613
76687
|
*/
|
|
76614
76688
|
async function checkSessionPoison(sessionFile) {
|
|
76615
76689
|
try {
|
|
76616
|
-
const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
76690
|
+
const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
|
|
76617
76691
|
if (!firstLine) return null;
|
|
76618
76692
|
const header = JSON.parse(firstLine);
|
|
76619
76693
|
if (header.type !== "session") return null;
|
|
@@ -76631,7 +76705,7 @@ async function checkSessionPoison(sessionFile) {
|
|
|
76631
76705
|
*/
|
|
76632
76706
|
async function archivePoisonedSession(sessionFile) {
|
|
76633
76707
|
const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
76634
|
-
await fs.rename(sessionFile, archiveName);
|
|
76708
|
+
await fs$1.rename(sessionFile, archiveName);
|
|
76635
76709
|
return archiveName;
|
|
76636
76710
|
}
|
|
76637
76711
|
/**
|
|
@@ -76640,14 +76714,14 @@ async function archivePoisonedSession(sessionFile) {
|
|
|
76640
76714
|
*/
|
|
76641
76715
|
async function stampSessionVersion(sessionFile) {
|
|
76642
76716
|
try {
|
|
76643
|
-
const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
|
|
76717
|
+
const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
|
|
76644
76718
|
if (lines.length === 0) return;
|
|
76645
76719
|
const header = JSON.parse(lines[0]);
|
|
76646
76720
|
if (header.type !== "session") return;
|
|
76647
76721
|
if (header.symiVersion === VERSION) return;
|
|
76648
76722
|
header.symiVersion = VERSION;
|
|
76649
76723
|
lines[0] = JSON.stringify(header);
|
|
76650
|
-
await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
76724
|
+
await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
|
|
76651
76725
|
} catch {}
|
|
76652
76726
|
}
|
|
76653
76727
|
/**
|
|
@@ -76814,7 +76888,7 @@ const SCRIPT_REL_PATH = "skills/long-task/scripts/detach-task.sh";
|
|
|
76814
76888
|
let cachedScriptPath;
|
|
76815
76889
|
function isExecutable(candidatePath) {
|
|
76816
76890
|
try {
|
|
76817
|
-
|
|
76891
|
+
fs.accessSync(candidatePath, fs.constants.X_OK);
|
|
76818
76892
|
return true;
|
|
76819
76893
|
} catch {
|
|
76820
76894
|
return false;
|
|
@@ -76839,12 +76913,12 @@ async function resolveDetachScriptPath(params) {
|
|
|
76839
76913
|
return null;
|
|
76840
76914
|
}
|
|
76841
76915
|
const candidate = path.join(packageRoot, SCRIPT_REL_PATH);
|
|
76842
|
-
if (!
|
|
76916
|
+
if (!fs.existsSync(candidate)) {
|
|
76843
76917
|
cachedScriptPath = null;
|
|
76844
76918
|
return null;
|
|
76845
76919
|
}
|
|
76846
76920
|
if (!isExecutable(candidate)) try {
|
|
76847
|
-
|
|
76921
|
+
fs.chmodSync(candidate, 493);
|
|
76848
76922
|
} catch {
|
|
76849
76923
|
cachedScriptPath = null;
|
|
76850
76924
|
return null;
|
|
@@ -76868,7 +76942,7 @@ async function buildLongTaskPromptSuffix(params) {
|
|
|
76868
76942
|
"- Register a cron monitor via the `cron` tool's `add` action. Use the schema documented in that tool's own description for the exact field names — do NOT guess. The monitor should fire roughly every 3 minutes as an isolated agentTurn job, and its message must literally contain the task-id, PID, log path, and status path so the future turn has enough context without re-deriving them.",
|
|
76869
76943
|
"- Safe status read (inside the monitor turn):",
|
|
76870
76944
|
" `status=$(cat \"<workdir>/task-<id>.status\" 2>/dev/null || echo missing)`",
|
|
76871
|
-
" Possible values: `running pid=<N> started=<ISO>`, `complete rc=<N> ended=<ISO>`, `aborted rc=<N> signal=<TERM|INT|HUP> ended=<ISO>`, or `missing`
|
|
76945
|
+
" Possible values: `running pid=<N> started=<ISO>`, `complete rc=<N> ended=<ISO>`, `aborted rc=<N> signal=<TERM|INT|HUP> ended=<ISO>`, `archived swept-from=… at=<ISO>` if the janitor archived an old finished task, or `missing` only when neither `.status` nor `.archived` exists (task crashed or workdir was wiped).",
|
|
76872
76946
|
"- Monitor responsibilities each tick:",
|
|
76873
76947
|
" • If status begins with `running`: tail -n 20 <log>, post a one-sentence progress line.",
|
|
76874
76948
|
" • If status begins with `complete`: post a final summary with rc and tail, then call cron action=remove on this job id.",
|
|
@@ -76901,7 +76975,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
76901
76975
|
return;
|
|
76902
76976
|
}
|
|
76903
76977
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
76904
|
-
await fs.writeFile(params.sessionFile, "", "utf-8");
|
|
76978
|
+
await fs$1.writeFile(params.sessionFile, "", "utf-8");
|
|
76905
76979
|
sm.fileEntries = [header];
|
|
76906
76980
|
sm.byId?.clear?.();
|
|
76907
76981
|
sm.labelsById?.clear?.();
|
|
@@ -77459,7 +77533,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
77459
77533
|
const prevCwd = process.cwd();
|
|
77460
77534
|
const runAbortController = new AbortController();
|
|
77461
77535
|
log$9.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
77462
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
77536
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
77463
77537
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
77464
77538
|
const sandbox = await resolveSandboxContext({
|
|
77465
77539
|
config: params.config,
|
|
@@ -77467,7 +77541,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
77467
77541
|
workspaceDir: resolvedWorkspace
|
|
77468
77542
|
});
|
|
77469
77543
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
77470
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
77544
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
77471
77545
|
let restoreSkillEnv;
|
|
77472
77546
|
process.chdir(effectiveWorkspace);
|
|
77473
77547
|
try {
|
|
@@ -77705,7 +77779,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
77705
77779
|
sessionFile: params.sessionFile,
|
|
77706
77780
|
warn: (message) => log$9.warn(message)
|
|
77707
77781
|
});
|
|
77708
|
-
const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
77782
|
+
const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
77709
77783
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
77710
77784
|
modelApi: params.model?.api,
|
|
77711
77785
|
provider: params.provider,
|
|
@@ -78712,7 +78786,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
78712
78786
|
return;
|
|
78713
78787
|
}
|
|
78714
78788
|
if (model.provider === "github-copilot") {
|
|
78715
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
78789
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
|
|
78716
78790
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
78717
78791
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
78718
78792
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -78797,7 +78871,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
78797
78871
|
}
|
|
78798
78872
|
runLoopIterations += 1;
|
|
78799
78873
|
attemptedThinking.add(thinkLevel);
|
|
78800
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
78874
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
78801
78875
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
78802
78876
|
const attempt = await runEmbeddedAttempt({
|
|
78803
78877
|
sessionId: params.sessionId,
|