@fased/fased 0.1.10 → 0.1.12
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/README.md +7 -5
- package/dist/{active-listener-BC05EmaA.js → active-listener-CNrLAfOg.js} +1 -1
- package/dist/{agent-scope-DVw8mi_i.js → agent-scope-T2X-I1lP.js} +124 -124
- package/dist/{agents-CsxQP5xg.js → agents-Du8P7IN9.js} +8 -8
- package/dist/{attachment-normalize-CSxeaVcP.js → attachment-normalize-CXopR3aI.js} +1 -1
- package/dist/{attachment-normalize-f9lQXrZo.js → attachment-normalize-aZQqs-5G.js} +1 -1
- package/dist/{audio-preflight-DD1zXhwM.js → audio-preflight-BYZ53Lzg.js} +2 -2
- package/dist/{audio-preflight-C_g_wQAc.js → audio-preflight-CwheEXYS.js} +31 -31
- package/dist/{audio-preflight-CVU3GLti.js → audio-preflight-DWQBQ91D.js} +1 -1
- package/dist/{audio-preflight-BeJd4YPQ.js → audio-preflight-Dc1K_vOi.js} +2 -2
- package/dist/{audio-preflight-DBtzpOL_.js → audio-preflight-MekUgowQ.js} +1 -1
- package/dist/{audit-CDgqnjys.js → audit-Bjpi9xJU.js} +1 -1
- package/dist/{audit-BB2lDlNb.js → audit-T0cmU0nW.js} +1 -1
- package/dist/{auth-Bfgwy6TQ.js → auth-DPKqQb8Y.js} +5 -5
- package/dist/{auth-choice-DlcbJgp_.js → auth-choice-BpV7vqnP.js} +1 -1
- package/dist/{auth-choice-prompt-DMlwK9kF.js → auth-choice-prompt-B7PJvTVu.js} +1 -1
- package/dist/{auth-choice-prompt-CcOEzXoi.js → auth-choice-prompt-BFm4XkAG.js} +1 -1
- package/dist/{auth-choice-DbEAsUsi.js → auth-choice-yoUpVms3.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +31 -31
- package/dist/bundled/bootstrap-extra-files/handler.js +3 -3
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +31 -31
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-D2IwnDWk.js → channel-activity-C0DEUhUn.js} +1 -1
- package/dist/{channel-web-CMZFjZzU.js → channel-web-BuXn4FNd.js} +1 -1
- package/dist/{channel-web-qHKfuCHE.js → channel-web-P7ida1rd.js} +1 -1
- package/dist/{channels-BoOF2dAy.js → channels-DUuqHLzY.js} +6 -6
- package/dist/{channels-DvT6s1kl.js → channels-DqIpnZo-.js} +6 -6
- package/dist/{channels-cli-NoUnbEgC.js → channels-cli-BJZkhaUa.js} +5 -5
- package/dist/{channels-cli-CNhEFKbn.js → channels-cli-Czjdq6Zj.js} +5 -5
- package/dist/{chunk-BFGwq8HC.js → chunk-Q3WlKwcl.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-Ctvy4-cz.js → cli-25AS5uBh.js} +2 -2
- package/dist/{cli-CE8pVYeA.js → cli-BM7AHeMZ.js} +2 -2
- package/dist/{command-registry-fqlYdOTI.js → command-registry-CL3sTZBq.js} +9 -9
- package/dist/{commands-registry-C7qLmjBS.js → commands-registry-CwvSkARW.js} +1 -1
- package/dist/{completion-cli-CKzB1lB1.js → completion-cli-BeDxB08Q.js} +2 -2
- package/dist/{completion-cli-Bd9iPo4A.js → completion-cli-DXT5UV5h.js} +1 -1
- package/dist/{config-cli-CQpqSVFS.js → config-cli-0iLJIK_0.js} +1 -1
- package/dist/{config-cli-DUNkddbL.js → config-cli-BqKGZgHh.js} +1 -1
- package/dist/{config-eval-CG37crOn.js → config-eval-BMGRKCyr.js} +3 -3
- package/dist/{configure-B2WT8-lE.js → configure-C4jaHUYt.js} +12 -12
- package/dist/{configure-DxDNasaD.js → configure-C6WQjQYZ.js} +12 -12
- package/dist/control-ui/assets/app-wpJSg6bV.js.map +1 -1
- package/dist/{cron-cli-DYWW7cv1.js → cron-cli-CpAzr8UN.js} +2 -2
- package/dist/{cron-cli-D3Dznk0V.js → cron-cli-JKIl7U3h.js} +2 -2
- package/dist/{daemon-cli-DDUjmEow.js → daemon-cli-BNds0Hef.js} +1 -1
- package/dist/{daemon-cli-DFjCvbUo.js → daemon-cli-DB2nP-oP.js} +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/{deps-4rCQ5SBd.js → deps-CZ5BtLba.js} +1 -1
- package/dist/{deps-CBapZnsi.js → deps-CmbKRFX-.js} +1 -1
- package/dist/{diagnostic-DWKSfm_q.js → diagnostic-PXNTTbiu.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-DyKd0D6V.js → fetch-D6yXePhv.js} +1 -1
- package/dist/{fetch-guard-Ztzfiio9.js → fetch-guard-B-XqKRhJ.js} +1 -1
- package/dist/{filesystem-manager-9uqWGvqg.js → filesystem-manager-_ccVdKHj.js} +4 -4
- package/dist/{fs-safe--dkmYAev.js → fs-safe-CkRcL-Cg.js} +2 -2
- package/dist/{gateway-cli-CNCA_gcT.js → gateway-cli-DWdySCrK.js} +27 -27
- package/dist/{gateway-cli-BXl9lmch.js → gateway-cli-DZcWa_Tx.js} +27 -27
- package/dist/{github-copilot-token-DYrFvncE.js → github-copilot-token-eyrRGmGp.js} +8 -8
- package/dist/{health-C_g99tp_.js → health-Cd-khz-9.js} +2 -2
- package/dist/{health-DTTfLYjl.js → health-D4RxkHwO.js} +2 -2
- package/dist/{heartbeat-runner-D04n14H-.js → heartbeat-runner-Ba95YjHH.js} +1 -1
- package/dist/{heartbeat-runner-DXh84Wuy.js → heartbeat-runner-CpK_gAIv.js} +1 -1
- package/dist/{hooks-cli-FhVd5CE-.js → hooks-cli-B_dJIUTW.js} +3 -3
- package/dist/{hooks-cli-BDpBNlPV.js → hooks-cli-CJD6gu6w.js} +3 -3
- package/dist/index.js +7 -7
- package/dist/{internal-yBWuTfFC.js → internal-CtV-S2kE.js} +3 -3
- package/dist/{ipv4-P47TSJIK.js → ipv4-C3GrgewJ.js} +2 -2
- package/dist/{ipv4-Citn8Cno.js → ipv4-mFIX9nv4.js} +2 -2
- package/dist/{lifecycle-B4RibYD4.js → lifecycle-C4k_XIAn.js} +1 -1
- package/dist/{lifecycle-Bgh3V8Jt.js → lifecycle-OLgxIVgL.js} +1 -1
- package/dist/{list.auth-overview-BQzrIpgk.js → list.auth-overview-CaS7O8M6.js} +1 -1
- package/dist/{list.auth-overview-fBVXihg0.js → list.auth-overview-DvgE-pEr.js} +1 -1
- package/dist/llm-slug-generator.js +31 -31
- package/dist/{login-DPlzYTXi.js → login-C4KKxuM4.js} +2 -2
- package/dist/{login-qr-c2Drd9vA.js → login-qr-DMxUP87H.js} +3 -3
- package/dist/{manager-XJq9ONvb.js → manager-O_PUm8xA.js} +8 -8
- package/dist/{markdown-tables-7kI-7mng.js → markdown-tables-QOHpjP76.js} +1 -1
- package/dist/{media-D4nEnyX9.js → media-KeWZMCmf.js} +5 -5
- package/dist/{memory-search-Z2b0d-jA.js → memory-search-BVlFBMLd.js} +2 -2
- package/dist/{model-catalog-B2mRe6cZ.js → model-catalog-CuBQyuRB.js} +9 -9
- package/dist/{models-D8MTK6SG.js → models-CcYHBi_r.js} +4 -4
- package/dist/{models-cli-CXdCnyks.js → models-cli-BAsSzs36.js} +5 -5
- package/dist/{models-cli-Bl8xk6-0.js → models-cli-CwNjNmaD.js} +4 -4
- package/dist/{node-cli-DkgKrYS1.js → node-cli-CqENdMLC.js} +2 -2
- package/dist/{node-cli-Cqh8buCU.js → node-cli-LfnYXPVk.js} +2 -2
- package/dist/{onboard-BD0MOrv7.js → onboard-CjinvB7q.js} +6 -6
- package/dist/{onboard-Dz8z4vBi.js → onboard-DiAeyhSY.js} +6 -6
- package/dist/{onboard-channels-CPh2EJOi.js → onboard-channels-BOR7r6J2.js} +2 -2
- package/dist/{onboard-channels-DUa2qkms.js → onboard-channels-CEv6tCJQ.js} +2 -2
- package/dist/{onboard-search-BnHMgV2k.js → onboard-search-B3wBacDO.js} +5 -5
- package/dist/{onboard-search-CqiDzWQw.js → onboard-search-DE_DRU35.js} +5 -5
- package/dist/{onboarding-BC-5Pv9o.js → onboarding-CYRCJeTz.js} +100 -63
- package/dist/{onboarding-DgTB_zq7.js → onboarding-Cy5d82Kg.js} +100 -63
- package/dist/{openresponses-http-CcawkBY4.js → openresponses-http-BK_0sg-w.js} +2 -2
- package/dist/{openresponses-http-BirGBJTm.js → openresponses-http-CSrODtfo.js} +1 -1
- package/dist/{openresponses-http-BsQmM8zM.js → openresponses-http-D9Q0e2D0.js} +1 -1
- package/dist/{openresponses-http-BQa9rI-N.js → openresponses-http-Dr_hPplW.js} +31 -31
- package/dist/{openresponses-http-BYiaPg-e.js → openresponses-http-DypSiMi3.js} +2 -2
- package/dist/{outbound-attachment-BnC5ITTB.js → outbound-attachment-DO7UVxZm.js} +2 -2
- package/dist/{outbound-vYt3OL7q.js → outbound-nrqaUQPn.js} +6 -6
- package/dist/{parent-default-help-DbMf7NQe.js → parent-default-help-BaTTrhnu.js} +1 -1
- package/dist/{parent-default-help-CpfuGajV.js → parent-default-help-Df_c3iTF.js} +1 -1
- package/dist/{path-alias-guards-BgsaoH-B.js → path-alias-guards-BVcGMct5.js} +1 -1
- package/dist/{paths-0bvQb_LS.js → paths-WauZ9inL.js} +13 -13
- package/dist/{pi-embedded-Bapdl5Mb.js → pi-embedded-B6jLpS4e.js} +234 -234
- package/dist/{pi-embedded-DlBsi5bC.js → pi-embedded-DEzQtNcl.js} +5 -5
- package/dist/{pi-model-discovery-DpUv4v_r.js → pi-model-discovery-B1-QPAbn.js} +7 -7
- package/dist/pi-model-discovery-runtime-C3EP4IIA.js +5 -0
- package/dist/{plugin-registry-C7oTQytM.js → plugin-registry-BIMCuigY.js} +1 -1
- package/dist/{plugin-registry-2aqMgXpl.js → plugin-registry-DCy0l8-h.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Vg4EuYfg.js → audio-preflight-DXwdBAPl.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-BbjERcpR.js → audio-preflight-K0n0C4E6.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.js +1 -1
- package/dist/plugin-sdk/{channel-web-JBsCrpEe.js → channel-web-D6K8VR5v.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{openresponses-http-dj-a8V7Z.js → openresponses-http-BP3xOe-Y.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-ihpGpya5.js → openresponses-http-BxWGSEv1.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-CddkbYKA.js → pi-model-discovery-runtime-Cv_H-NDs.js} +1 -1
- package/dist/plugin-sdk/{registry-BhjWgT6A.js → registry-Dpq_OloZ.js} +8 -8
- package/dist/plugin-sdk/{reply-CvmqbVx1.js → reply-Bg7g6Uem.js} +5 -5
- package/dist/plugin-sdk/src/brand.d.ts +2 -2
- package/dist/plugin-sdk/{status-DsTgMPSP.js → status-DvKbZrfW.js} +5 -5
- package/dist/plugin-sdk/{web-DHSHEbWK.js → web-BjxFpY7T.js} +2 -2
- package/dist/plugin-sdk/{web-CLXmBst6.js → web-CVUx-6o3.js} +1 -1
- package/dist/{plugins-cli-CXa9m7-A.js → plugins-cli-BnfUnqOU.js} +5 -5
- package/dist/{plugins-cli-Dj-p00ob.js → plugins-cli-D9zklM0p.js} +5 -5
- package/dist/{program-B3cXsVO0.js → program-CqMsm4EB.js} +7 -7
- package/dist/{program-context-Di7qiwOM.js → program-context-DPhz8FN3.js} +24 -24
- package/dist/{prompt-select-styled-C5o0Ff06.js → prompt-select-styled-BGaZLmeA.js} +4 -4
- package/dist/{prompt-select-styled-8KBIPNro.js → prompt-select-styled-D-2EpC11.js} +4 -4
- package/dist/{pw-ai-DAn5Q5Mg.js → pw-ai-CM1mw9Kc.js} +5 -5
- package/dist/{qmd-manager-BQu_lmJ6.js → qmd-manager--NffQxNh.js} +5 -5
- package/dist/{qmd-scope-Bv2HOfhX.js → qmd-scope-BgLcDW_Q.js} +1 -1
- package/dist/{query-expansion-LNmYRPvI.js → query-expansion-BW1RomSn.js} +2 -2
- package/dist/{register.agent-ll5ykI9x.js → register.agent-C6orfeKi.js} +9 -9
- package/dist/{register.agent-BYkIkPHf.js → register.agent-jy-C0MEz.js} +8 -8
- package/dist/{register.configure-DubkYh7h.js → register.configure-H9A87IRW.js} +12 -12
- package/dist/{register.configure-C0GU1zbA.js → register.configure-R5Gp68OD.js} +12 -12
- package/dist/{register.maintenance-Pz6desR4.js → register.maintenance-2VJJezzk.js} +9 -9
- package/dist/{register.maintenance-Corgqhj5.js → register.maintenance-CKLT7i2A.js} +8 -8
- package/dist/{register.message-COK8wYD_.js → register.message-M8tJ8ZGt.js} +3 -3
- package/dist/{register.message-oi2ewJpl.js → register.message-RbpY8_gf.js} +3 -3
- package/dist/{register.onboard-C7ysxMn6.js → register.onboard-Cmju7Jau.js} +14 -14
- package/dist/{register.onboard-zwRY0Dsh.js → register.onboard-CzuAo1h5.js} +14 -14
- package/dist/{register.setup-B1YGF1bz.js → register.setup-BIZLxrJN.js} +14 -14
- package/dist/{register.setup-J2tUgD6C.js → register.setup-CcFkJ--V.js} +14 -14
- package/dist/{register.status-health-sessions-DmjjMrJZ.js → register.status-health-sessions-BzNqkPbh.js} +6 -6
- package/dist/{register.status-health-sessions-DCazjMZa.js → register.status-health-sessions-DP58oA2z.js} +6 -6
- package/dist/{register.subclis-Bj8pFyAT.js → register.subclis-CcunjiP0.js} +16 -16
- package/dist/{replies-D0__mn7d.js → replies-lgWzXlwM.js} +2 -2
- package/dist/{reply-DQfPM5ia.js → reply-BBDR--RC.js} +9 -9
- package/dist/{reply-prefix-CteprwTK.js → reply-prefix-BM90m-1s.js} +1 -1
- package/dist/{resolve-route-Twc4mQV7.js → resolve-route-DyTOJJs4.js} +1 -1
- package/dist/{run-main-Cf6N-U3j.js → run-main-Hm6uygbR.js} +14 -14
- package/dist/{runtime-helper-grants-DONSfqWx.js → runtime-helper-grants-BX7MNAiX.js} +1 -1
- package/dist/{runtime-helper-grants-DzP6dgWv.js → runtime-helper-grants-DsRzAU91.js} +1 -1
- package/dist/{sandbox-cli-DHHAXWD8.js → sandbox-cli-C9LRf1BU.js} +2 -2
- package/dist/{sandbox-cli-CqUHfq55.js → sandbox-cli-CphPxb_Y.js} +2 -2
- package/dist/{security-cli-DNlCSlQR.js → security-cli-B1T-BpNW.js} +3 -3
- package/dist/{security-cli-CAEEYR8C.js → security-cli-DvQyNPyj.js} +3 -3
- package/dist/{send-BVmNzYrR.js → send-B8seeqjd.js} +18 -18
- package/dist/{send-BG45zdAY.js → send-BPleg3km.js} +5 -5
- package/dist/{send-BAtDZt7a.js → send-CAqldeiP.js} +5 -5
- package/dist/{send-DD6K3WP6.js → send-D63evlEI.js} +7 -7
- package/dist/{send-6RE7ZD_B.js → send-M0lHXvC5.js} +4 -4
- package/dist/{server-RYyJ2HTj.js → server-Dce2V0BV.js} +2 -2
- package/dist/{server-cron-D7rN6EY6.js → server-cron-DIvtrfmE.js} +2 -2
- package/dist/{server-cron-V9GBrg1S.js → server-cron-DYFn5b-C.js} +2 -2
- package/dist/{server-B67PKank.js → server-itEHgEB-.js} +2 -2
- package/dist/{server-node-events-eh5LuLg6.js → server-node-events-Bw_TYnRI.js} +3 -3
- package/dist/{server-node-events-CAG2ic6e.js → server-node-events-Cat4mX6Y.js} +3 -3
- package/dist/{session-CHL2ptKy.js → session-Cvg_ryor.js} +5 -5
- package/dist/{skill-commands-_zLgADck.js → skill-commands-D_QLBtje.js} +24 -24
- package/dist/{status-CTveTSuF.js → status-B-5uZdap.js} +1 -1
- package/dist/{status-DIkbKBxH.js → status-B3Mdifey.js} +4 -4
- package/dist/{status-BuGyo-1M.js → status-B_i6iCPI.js} +4 -4
- package/dist/{status-jb8w0SwX.js → status-DP-ZmLoI.js} +1 -1
- package/dist/{tables-Dtfop_e5.js → tables-Cif1OeQ1.js} +1 -1
- package/dist/{target-errors-DrHV8jza.js → target-errors-B-8Jf9OT.js} +2 -2
- package/dist/{tool-loop-detection-CPr-VVyD.js → tool-loop-detection-6p0-ziTi.js} +2 -2
- package/dist/{tui-Dinku0o-.js → tui-Cp1X0KaI.js} +1 -1
- package/dist/{tui-lmdDZi6Y.js → tui-DX2hKjKi.js} +1 -1
- package/dist/{tui-cli-dq7xafwR.js → tui-cli-DQIeHToU.js} +3 -3
- package/dist/{tui-cli-z5WV3SVg.js → tui-cli-ttzW7LkP.js} +3 -3
- package/dist/{update-cli-Cq47v0X_.js → update-cli-D5EsEoEh.js} +9 -9
- package/dist/{update-cli-BdQ3mRGs.js → update-cli-Dh0CR2-f.js} +10 -10
- package/dist/{update-runner-BnRMhKva.js → update-runner-B-O5EFkI.js} +1 -1
- package/dist/{update-runner-C0SU1jGT.js → update-runner-Bs5Vqr8x.js} +1 -1
- package/dist/{web-B9YrSF5u.js → web-BBv1hZEl.js} +1 -1
- package/dist/{web-D9wmjTDC.js → web-C7ARZ3T9.js} +3 -3
- package/dist/{web-DaMiLN7K.js → web-CKYCUuIo.js} +1 -1
- package/dist/{web-sBExtZCA.js → web-Cp2B8UG5.js} +35 -35
- package/dist/{web-BmjUKJI0.js → web-ifDkl2qg.js} +3 -3
- package/dist/{web-search-providers.runtime-TGCiBzhv.js → web-search-providers.runtime-B6bTk9-Z.js} +1 -1
- package/dist/{web-search-providers.runtime-gM-8LIxg.js → web-search-providers.runtime-tUcnQoHZ.js} +1 -1
- package/dist/{whatsapp-actions-C5qguyU5.js → whatsapp-actions-BAux9gs7.js} +12 -12
- package/docs/install/index.md +16 -10
- package/docs/install/installer.md +18 -9
- package/docs/install/node.md +5 -4
- package/docs/install/vps.md +7 -3
- package/extensions/acpx/package.json +1 -1
- 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/fased-federation/package.json +1 -1
- package/extensions/feishu/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/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/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/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/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/scripts/start-managed.sh +53 -12
- package/dist/pi-model-discovery-runtime-9_2G9r_K.js +0 -5
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { $ as loadSessionStore, $i as resolveOwnerDisplaySetting, $o as matchPluginCommand, $r as discoverFasedAgentPlugins, $t as normalizeTelegramCommandName, A as getChatChannelMeta, Aa as createTelegramActionGate, Ai as extractErrorCode, An as analyzeShellCommand, Ao as resolveMessageChannel, Ar as normalizeModelCatalogModelId, As as isRich, At as DEFAULT_RESET_TRIGGERS, B as loadCombinedSessionStoreForGateway, Ba as resolveSlackAppToken, Bi as logDebug, Bn as isShellWrapperExecutable, Bo as resolveEffectiveEnableState, Br as resolveApiKeyForProfile, Bs as resolveAgentModelFallbackValues, Bt as canonicalizeMainSessionAlias, C as ensureAgentWorkspace, Ca as createNonExitingRuntime, Cn as unsetConfigValueAtPath, Co as isDeliverableMessageChannel, Cr as resolveModelAuthMode, Ct as resolveSessionLockMaxHoldFromTimeout, Da as unregisterActiveProgressLine, Dn as listWritableExplicitTrustedSafeBinDirs, Do as listDeliverableMessageChannels, Dr as retryAsync, Dt as resolveSessionResetPolicy, E as loadWorkspaceBootstrapFiles, Ea as registerActiveProgressLine, En as isTrustedSafeBinPath, Eo as isMarkdownCapableMessageChannel, Es as shouldLogVerbose, Et as resolveChannelResetConfig, F as getActivePluginRegistryKey, Fa as buildChannelAccountBindings, Fi as redactToolDetail, Fn as matchAllowlist, Fo as normalizeHyphenSlug, Fr as getSoonestCooldownExpiry, Fs as resolvePreferredFasedAgentTmpDir, Ft as resolveSessionFilePath, G as extractDeliveryInfo, Ga as createDiscordActionGate, Gn as normalizeSafeBinProfileFixtures, Go as ADMIN_SCOPE, Gr as markAuthProfileGood, Gt as loadConfig, H as resolveContextTokensForModel, Ha as listEnabledSignalAccounts, Hi as logInfo, Hn as unwrapKnownShellMultiplexerInvocation, Ho as CHANNEL_IDS, Hr as dedupeProfileIds, Hs as toAgentModelListLike, Ht as resolveExplicitAgentSessionKey, I as requireActivePluginRegistry, Ii as compileSafeRegex, In as resolveAllowlistCandidatePath, Io as normalizeStringEntries, Ir as isProfileInCooldown, Is as createInternalHookEvent, It as resolveSessionFilePathOptions, J as resolveMirroredTranscriptText, Ja as normalizeDiscordToken, Ji as resolveShellEnvFallbackTimeoutMs, Jn as isSafeExecutableValue, Jo as normalizePluginHttpPath, Jr as resolveFasedAgentAgentDir, Jt as readConfigFileSnapshotForWrite, K as parseSessionThreadInfo, Ka as listEnabledDiscordAccounts, Kn as resolveSafeBinProfiles, Ko as CLI_DEFAULT_OPERATOR_SCOPES, Kr as ensureAuthProfileStore, Kt as parseConfigJson5, L as setActivePluginRegistry, La as isTruthyEnvValue, Li as runCommandWithTimeout, Ln as resolveCommandResolutionFromArgv, Lo as normalizeStringEntriesLower, Lr as markAuthProfileFailure, Lt as resolveSessionTranscriptPath, M as normalizeAnyChannelId, Ma as listTelegramAccountIds, Mi as formatUncaughtError, Mn as isWindowsPlatform, Mo as GATEWAY_CLIENT_MODES, Mr as normalizeProviderCatalogRows, Ms as getChildLogger, Mt as resolveFreshSessionTotalTokens, N as normalizeChannelId$2, Na as resolveTelegramAccount, Nn as splitCommandChain, No as GATEWAY_CLIENT_NAMES, Nt as setSessionRuntimeModel, Oa as formatCliCommand, On as normalizeTrustedSafeBinDirs, Oo as normalizeMessageChannel, Or as buildModelCatalogMergeKey, Os as warn, Ot as resolveSessionResetType, P as getActivePluginRegistry, Pa as resolveTelegramToken, Pi as redactSensitiveText, Pn as DEFAULT_SAFE_BINS, Po as normalizeAtHashSlug, Pr as resolveAuthProfileOrder, Ps as normalizeLogLevel, Pt as resolveDefaultSessionStorePath, Qa as DEFAULT_AGENT_ID, Qi as sanitizeHostExecEnv, Qn as resolveSlackStreamingMode, Qo as listPluginCommands, Qr as loadPluginManifestRegistry, Qt as TELEGRAM_COMMAND_NAME_PATTERN, R as createPluginRegistry, Ra as parseBooleanValue$1, Ri as runExec, Rn as extractShellWrapperInlineCommand, Ro as applyTestPluginDefaults, Rr as markAuthProfileUsed, Rt as resolveSessionTranscriptsDirForAgent, S as DEFAULT_USER_FILENAME, Sa as webAuthExists, Si as getPackageManifestMetadata, Sn as setConfigValueAtPath, So as INTERNAL_MESSAGE_CHANNEL, Sr as resolveEnvApiKey, Ss as danger, St as acquireSessionWriteLock, Ta as clearActiveProgressLine, Ti as openBoundaryFileSync, Tn as getTrustedSafeBinDirs, To as isInternalMessageChannel, Tr as listCurrentModelCatalogRows, Ts as setVerbose, Tt as evaluateSessionFreshness, U as ensureFasedAgentModelsJson, Ua as resolveSignalAccount, Ui as logWarn, Un as splitShellArgs, Uo as CHAT_CHANNEL_ORDER, Ur as listProfilesForProvider, Ut as resolveMainSessionKey, V as lookupContextTokens, Va as resolveSlackBotToken, Vi as logError, Vn as unwrapKnownDispatchWrapperInvocation, Vo as resolveMemorySlotDecision, Vr as runTasksWithConcurrency, Vs as resolveAgentModelPrimaryValue, Vt as resolveAgentMainSessionKey, Wa as resolveIMessageAccount, Wn as SAFE_BIN_PROFILES, Wo as normalizeChatChannelId, Wr as listProvidersWithStoredCredentials, Wt as createConfigIO, X as resolveAndPersistSessionFile, Xa as resolveChannelGroupRequireMention, Xn as resolveDiscordPreviewStreamMode, Xo as executePluginCommand, Xr as findNormalizedProviderValue$1, Xt as writeConfigFile, Y as resolveSessionTranscriptFile, Ya as resolveChannelGroupPolicy, Yi as isDangerousHostEnvOverrideVarName, Yn as mapStreamingModeToSlackLegacyDraftStreamMode, Yo as clearPluginCommands, Yr as withFileLock, Yt as resolveConfigSnapshotHash, Z as emitSessionTranscriptUpdate, Za as resolveChannelGroupToolsPolicy, Zi as isDangerousHostInheritedEnvVarName, Zn as resolveSlackNativeStreaming, Zo as getPluginCommandSpecs, Zr as normalizeProviderId$2, Zt as validateConfigObjectWithPlugins, _ as DEFAULT_BOOTSTRAP_FILENAME, _i as supportsXHighThinking, _n as resetConfigOverrides, _o as isSubagentSessionKey, _r as normalizeGoogleModelId, _s as sleep$1, _t as parseInlineDirectives$1, a as resolveAgentDir, aa as listChannelDocks, ai as isPrivateNetworkBaseUrl, an as resolveIMessageRemoteAttachmentRoots, ao as normalizeMainKey, ar as findNormalizedProviderValue, as as escapeRegExp, at as isCacheEnabled, b as DEFAULT_SOUL_FILENAME, bi as DEFAULT_PROVIDER, bn as getConfigValueAtPath, bo as resolveAccountEntry, br as requireApiKey, bs as truncateUtf16Safe, bt as hasInterSessionUserProvenance, c as resolveAgentSkillsFilter, ca as normalizeSignalMessagingTarget, ci as coerceSecretRef, cn as getBlockedNetworkModeReason, co as sanitizeAgentId, cr as normalizeModelRef$2, ct as deliveryContextKey, d as resolveEffectiveModelFallbacks, di as lookupProviderManifestModelCapability, dn as isAvatarDataUrl, do as normalizeOptionalAccountId, dr as resolveConfiguredModelRef, dt as normalizeSessionDeliveryFields, ea as deriveSessionMetaPatch, ei as isPathInside, en as resolveTelegramCustomCommands, eo as buildAgentMainSessionKey, er as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, es as CONFIG_DIR, et as readSessionUpdatedAt, f as resolveRunModelFallbacksOverride, fa as getWebAuthAgeMs, fi as formatThinkingLevels, fn as isAvatarHttpUrl, fo as isBlockedObjectKey, fr as resolveDefaultModelForAgent, ft as normalizeAccountId$3, g as DEFAULT_AGENT_WORKSPACE_DIR, gi as resolveModelThinkingCapability, gn as getConfigOverrides, go as isCronSessionKey, gr as resolveThinkingDefault, gs as shortenHomePath, gt as extractToolCallNames, h as DEFAULT_AGENTS_FILENAME, hi as normalizeThinkLevel, hn as validateJsonSchemaValue, ho as isAcpSessionKey, hr as resolveSubagentSpawnModelSelection, hs as shortenHomeInString, ht as countToolResults, i as resolveAgentConfig, ia as getChannelDock, ii as resolveAuthProfileDisplayLabel, in as resolveIMessageAttachmentRoots, io as normalizeAgentId, ir as buildModelAliasIndex, is as ensureDir$3, it as updateSessionStoreEntry, j as listChatChannels, ja as listEnabledTelegramAccounts, ji as formatErrorMessage, jn as buildEnforcedShellCommand, jo as GATEWAY_CLIENT_IDS, jr as normalizeModelCatalogProviderId, js as theme, jt as mergeSessionEntry, k as createSubsystemLogger, ka as resolveCliName, ki as resolvePathViaExistingAncestorSync, kn as validateSafeBinArgv, ko as resolveGatewayMessageChannel, kr as mergeModelCatalogRowsByAuthority, ks as colorize, kt as resolveThreadFlag, l as resolveAgentWorkspaceDir, la as hasAnyWhatsAppAuth, li as splitTrailingAuthProfile, ln as parseDurationMs, lo as DEFAULT_ACCOUNT_ID, lr as normalizeProviderId$1, lt as mergeDeliveryContext, m as resolveSessionAgentIds, ma as logoutWeb, mn as isSupportedLocalAvatarExtension, mo as getSubagentDepth, mr as resolveReasoningDefault, mt as capArrayByJsonBytes, n as listAgentEntries, na as listChannelPlugins, ni as resolveFasedAgentPackageRoot, nn as isInboundPathAllowed, nr as buildAllowedModelSet, ns as clampInt, nt as updateLastRoute, oa as isWhatsAppGroupJid, oi as normalizeSecretInput, on as normalizeScpRemoteHost, oo as resolveAgentIdFromSessionKey, or as isCliProvider, os as formatTerminalLink, ot as resolveCacheTtlMs$1, p as resolveSessionAgentId, pa as logWebSelfId, pi as formatXHighModelHint, pn as isPathWithinRoot, po as deriveSessionChatType, pr as resolveModelRefFromString, ps as resolveUserPath, pt as archiveSessionTranscripts, q as appendAssistantMessageToSessionTranscript, qa as resolveDiscordAccount, qi as getShellPathFromLoginShell, qn as applyMergePatch, qo as resolveLeastPrivilegeOperatorScopesForMethod, qr as resolveAuthStorePathForDisplay, qt as readConfigFileSnapshot, r as listAgentIds, ra as normalizeChannelId$1, ri as resolveFasedAgentPackageRootSync, rn as mergeInboundPathRoots, ro as classifySessionKeyShape, rr as buildConfiguredAllowlistKeys, rt as updateSessionStore, s as resolveAgentModelFallbacksOverride, sa as normalizeWhatsAppTarget, si as assertSecretInputResolved, sn as MODEL_APIS, so as resolveThreadSessionKeys, sr as modelKey, ss as isRecord$3, st as deliveryContextFromSession, t as hasConfiguredModelFallbacks, ta as getChannelPlugin, ti as safeStatSync, tn as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, tr as resolveAgentMaxConcurrent, tt as recordSessionMetaFromInbound, u as resolveDefaultAgentId, ua as resolveWhatsAppAccount, ui as isOpenAISignInRuntimeModelSupported, un as AVATAR_MAX_BYTES, uo as normalizeAccountId$2, us as normalizeE164, ut as normalizeDeliveryContext, v as DEFAULT_HEARTBEAT_FILENAME, va as readWebSelfId, vi as DEFAULT_CONTEXT_TOKENS, vn as setConfigOverride, vo as parseAgentSessionKey, vr as getApiKeyForModel, vs as sliceUtf16Safe, vt as INPUT_PROVENANCE_KIND_VALUES, w as filterBootstrapFilesForSession, wa as defaultRuntime, wi as openBoundaryFile, wn as ensurePluginAllowlisted, wo as isGatewayMessageChannel, wr as CURRENT_MODEL_PROVIDER_CATALOG, ws as logVerbose, wt as resolveSessionKey$1, x as DEFAULT_TOOLS_FILENAME, xi as VERSION, xn as parseConfigPath, xo as resolveGroupSessionKey, xr as resolveApiKeyForProvider, xs as isPlainObject, xt as normalizeInputProvenance, y as DEFAULT_IDENTITY_FILENAME, yi as DEFAULT_MODEL, yn as unsetConfigOverride, yo as resolveThreadParentSessionKey, yr as getCustomProviderApiKey, yt as applyInputProvenanceToUserMessage, z as createRuntimeHelpers, za as resolveSlackAccount, zi as spawnWithFallback, zn as isDispatchWrapperExecutable, zo as normalizePluginsConfig, zr as resolveProfilesUnavailableReason, zs as triggerInternalHook, zt as resolveStorePath } from "./agent-scope-DVw8mi_i.js";
|
|
3
|
-
import { a as saveJsonFile, f as resolveStateDir, h as resolveRequiredHomeDir, i as loadJsonFile, l as resolveGatewayPort, o as STATE_DIR, p as expandHomePrefix, s as resolveConfigPath } from "./github-copilot-token-
|
|
2
|
+
import { $ as loadSessionStore, $i as resolveOwnerDisplaySetting, $o as matchPluginCommand, $r as discoverFasedAgentPlugins, $t as normalizeTelegramCommandName, A as getChatChannelMeta, Aa as createTelegramActionGate, Ai as extractErrorCode, An as analyzeShellCommand, Ao as resolveMessageChannel, Ar as normalizeModelCatalogModelId, As as isRich, At as DEFAULT_RESET_TRIGGERS, B as loadCombinedSessionStoreForGateway, Ba as resolveSlackAppToken, Bi as logDebug, Bn as isShellWrapperExecutable, Bo as resolveEffectiveEnableState, Br as resolveApiKeyForProfile, Bs as resolveAgentModelFallbackValues, Bt as canonicalizeMainSessionAlias, C as ensureAgentWorkspace, Ca as createNonExitingRuntime, Cn as unsetConfigValueAtPath, Co as isDeliverableMessageChannel, Cr as resolveModelAuthMode, Ct as resolveSessionLockMaxHoldFromTimeout, Da as unregisterActiveProgressLine, Dn as listWritableExplicitTrustedSafeBinDirs, Do as listDeliverableMessageChannels, Dr as retryAsync, Dt as resolveSessionResetPolicy, E as loadWorkspaceBootstrapFiles, Ea as registerActiveProgressLine, En as isTrustedSafeBinPath, Eo as isMarkdownCapableMessageChannel, Es as shouldLogVerbose, Et as resolveChannelResetConfig, F as getActivePluginRegistryKey, Fa as buildChannelAccountBindings, Fi as redactToolDetail, Fn as matchAllowlist, Fo as normalizeHyphenSlug, Fr as getSoonestCooldownExpiry, Fs as resolvePreferredFasedAgentTmpDir, Ft as resolveSessionFilePath, G as extractDeliveryInfo, Ga as createDiscordActionGate, Gn as normalizeSafeBinProfileFixtures, Go as ADMIN_SCOPE, Gr as markAuthProfileGood, Gt as loadConfig, H as resolveContextTokensForModel, Ha as listEnabledSignalAccounts, Hi as logInfo, Hn as unwrapKnownShellMultiplexerInvocation, Ho as CHANNEL_IDS, Hr as dedupeProfileIds, Hs as toAgentModelListLike, Ht as resolveExplicitAgentSessionKey, I as requireActivePluginRegistry, Ii as compileSafeRegex, In as resolveAllowlistCandidatePath, Io as normalizeStringEntries, Ir as isProfileInCooldown, Is as createInternalHookEvent, It as resolveSessionFilePathOptions, J as resolveMirroredTranscriptText, Ja as normalizeDiscordToken, Ji as resolveShellEnvFallbackTimeoutMs, Jn as isSafeExecutableValue, Jo as normalizePluginHttpPath, Jr as resolveFasedAgentAgentDir, Jt as readConfigFileSnapshotForWrite, K as parseSessionThreadInfo, Ka as listEnabledDiscordAccounts, Kn as resolveSafeBinProfiles, Ko as CLI_DEFAULT_OPERATOR_SCOPES, Kr as ensureAuthProfileStore, Kt as parseConfigJson5, L as setActivePluginRegistry, La as isTruthyEnvValue, Li as runCommandWithTimeout, Ln as resolveCommandResolutionFromArgv, Lo as normalizeStringEntriesLower, Lr as markAuthProfileFailure, Lt as resolveSessionTranscriptPath, M as normalizeAnyChannelId, Ma as listTelegramAccountIds, Mi as formatUncaughtError, Mn as isWindowsPlatform, Mo as GATEWAY_CLIENT_MODES, Mr as normalizeProviderCatalogRows, Ms as getChildLogger, Mt as resolveFreshSessionTotalTokens, N as normalizeChannelId$2, Na as resolveTelegramAccount, Nn as splitCommandChain, No as GATEWAY_CLIENT_NAMES, Nt as setSessionRuntimeModel, Oa as formatCliCommand, On as normalizeTrustedSafeBinDirs, Oo as normalizeMessageChannel, Or as buildModelCatalogMergeKey, Os as warn, Ot as resolveSessionResetType, P as getActivePluginRegistry, Pa as resolveTelegramToken, Pi as redactSensitiveText, Pn as DEFAULT_SAFE_BINS, Po as normalizeAtHashSlug, Pr as resolveAuthProfileOrder, Ps as normalizeLogLevel, Pt as resolveDefaultSessionStorePath, Qa as DEFAULT_AGENT_ID, Qi as sanitizeHostExecEnv, Qn as resolveSlackStreamingMode, Qo as listPluginCommands, Qr as loadPluginManifestRegistry, Qt as TELEGRAM_COMMAND_NAME_PATTERN, R as createPluginRegistry, Ra as parseBooleanValue$1, Ri as runExec, Rn as extractShellWrapperInlineCommand, Ro as applyTestPluginDefaults, Rr as markAuthProfileUsed, Rt as resolveSessionTranscriptsDirForAgent, S as DEFAULT_USER_FILENAME, Sa as webAuthExists, Si as getPackageManifestMetadata, Sn as setConfigValueAtPath, So as INTERNAL_MESSAGE_CHANNEL, Sr as resolveEnvApiKey, Ss as danger, St as acquireSessionWriteLock, Ta as clearActiveProgressLine, Ti as openBoundaryFileSync, Tn as getTrustedSafeBinDirs, To as isInternalMessageChannel, Tr as listCurrentModelCatalogRows, Ts as setVerbose, Tt as evaluateSessionFreshness, U as ensureFasedAgentModelsJson, Ua as resolveSignalAccount, Ui as logWarn, Un as splitShellArgs, Uo as CHAT_CHANNEL_ORDER, Ur as listProfilesForProvider, Ut as resolveMainSessionKey, V as lookupContextTokens, Va as resolveSlackBotToken, Vi as logError, Vn as unwrapKnownDispatchWrapperInvocation, Vo as resolveMemorySlotDecision, Vr as runTasksWithConcurrency, Vs as resolveAgentModelPrimaryValue, Vt as resolveAgentMainSessionKey, Wa as resolveIMessageAccount, Wn as SAFE_BIN_PROFILES, Wo as normalizeChatChannelId, Wr as listProvidersWithStoredCredentials, Wt as createConfigIO, X as resolveAndPersistSessionFile, Xa as resolveChannelGroupRequireMention, Xn as resolveDiscordPreviewStreamMode, Xo as executePluginCommand, Xr as findNormalizedProviderValue$1, Xt as writeConfigFile, Y as resolveSessionTranscriptFile, Ya as resolveChannelGroupPolicy, Yi as isDangerousHostEnvOverrideVarName, Yn as mapStreamingModeToSlackLegacyDraftStreamMode, Yo as clearPluginCommands, Yr as withFileLock, Yt as resolveConfigSnapshotHash, Z as emitSessionTranscriptUpdate, Za as resolveChannelGroupToolsPolicy, Zi as isDangerousHostInheritedEnvVarName, Zn as resolveSlackNativeStreaming, Zo as getPluginCommandSpecs, Zr as normalizeProviderId$2, Zt as validateConfigObjectWithPlugins, _ as DEFAULT_BOOTSTRAP_FILENAME, _i as supportsXHighThinking, _n as resetConfigOverrides, _o as isSubagentSessionKey, _r as normalizeGoogleModelId, _s as sleep$1, _t as parseInlineDirectives$1, a as resolveAgentDir, aa as listChannelDocks, ai as isPrivateNetworkBaseUrl, an as resolveIMessageRemoteAttachmentRoots, ao as normalizeMainKey, ar as findNormalizedProviderValue, as as escapeRegExp, at as isCacheEnabled, b as DEFAULT_SOUL_FILENAME, bi as DEFAULT_PROVIDER, bn as getConfigValueAtPath, bo as resolveAccountEntry, br as requireApiKey, bs as truncateUtf16Safe, bt as hasInterSessionUserProvenance, c as resolveAgentSkillsFilter, ca as normalizeSignalMessagingTarget, ci as coerceSecretRef, cn as getBlockedNetworkModeReason, co as sanitizeAgentId, cr as normalizeModelRef$2, ct as deliveryContextKey, d as resolveEffectiveModelFallbacks, di as lookupProviderManifestModelCapability, dn as isAvatarDataUrl, do as normalizeOptionalAccountId, dr as resolveConfiguredModelRef, dt as normalizeSessionDeliveryFields, ea as deriveSessionMetaPatch, ei as isPathInside, en as resolveTelegramCustomCommands, eo as buildAgentMainSessionKey, er as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, es as CONFIG_DIR, et as readSessionUpdatedAt, f as resolveRunModelFallbacksOverride, fa as getWebAuthAgeMs, fi as formatThinkingLevels, fn as isAvatarHttpUrl, fo as isBlockedObjectKey, fr as resolveDefaultModelForAgent, ft as normalizeAccountId$3, g as DEFAULT_AGENT_WORKSPACE_DIR, gi as resolveModelThinkingCapability, gn as getConfigOverrides, go as isCronSessionKey, gr as resolveThinkingDefault, gs as shortenHomePath, gt as extractToolCallNames, h as DEFAULT_AGENTS_FILENAME, hi as normalizeThinkLevel, hn as validateJsonSchemaValue, ho as isAcpSessionKey, hr as resolveSubagentSpawnModelSelection, hs as shortenHomeInString, ht as countToolResults, i as resolveAgentConfig, ia as getChannelDock, ii as resolveAuthProfileDisplayLabel, in as resolveIMessageAttachmentRoots, io as normalizeAgentId, ir as buildModelAliasIndex, is as ensureDir$3, it as updateSessionStoreEntry, j as listChatChannels, ja as listEnabledTelegramAccounts, ji as formatErrorMessage, jn as buildEnforcedShellCommand, jo as GATEWAY_CLIENT_IDS, jr as normalizeModelCatalogProviderId, js as theme, jt as mergeSessionEntry, k as createSubsystemLogger, ka as resolveCliName, ki as resolvePathViaExistingAncestorSync, kn as validateSafeBinArgv, ko as resolveGatewayMessageChannel, kr as mergeModelCatalogRowsByAuthority, ks as colorize, kt as resolveThreadFlag, l as resolveAgentWorkspaceDir, la as hasAnyWhatsAppAuth, li as splitTrailingAuthProfile, ln as parseDurationMs, lo as DEFAULT_ACCOUNT_ID, lr as normalizeProviderId$1, lt as mergeDeliveryContext, m as resolveSessionAgentIds, ma as logoutWeb, mn as isSupportedLocalAvatarExtension, mo as getSubagentDepth, mr as resolveReasoningDefault, mt as capArrayByJsonBytes, n as listAgentEntries, na as listChannelPlugins, ni as resolveFasedAgentPackageRoot, nn as isInboundPathAllowed, nr as buildAllowedModelSet, ns as clampInt, nt as updateLastRoute, oa as isWhatsAppGroupJid, oi as normalizeSecretInput, on as normalizeScpRemoteHost, oo as resolveAgentIdFromSessionKey, or as isCliProvider, os as formatTerminalLink, ot as resolveCacheTtlMs$1, p as resolveSessionAgentId, pa as logWebSelfId, pi as formatXHighModelHint, pn as isPathWithinRoot, po as deriveSessionChatType, pr as resolveModelRefFromString, ps as resolveUserPath, pt as archiveSessionTranscripts, q as appendAssistantMessageToSessionTranscript, qa as resolveDiscordAccount, qi as getShellPathFromLoginShell, qn as applyMergePatch, qo as resolveLeastPrivilegeOperatorScopesForMethod, qr as resolveAuthStorePathForDisplay, qt as readConfigFileSnapshot, r as listAgentIds, ra as normalizeChannelId$1, ri as resolveFasedAgentPackageRootSync, rn as mergeInboundPathRoots, ro as classifySessionKeyShape, rr as buildConfiguredAllowlistKeys, rt as updateSessionStore, s as resolveAgentModelFallbacksOverride, sa as normalizeWhatsAppTarget, si as assertSecretInputResolved, sn as MODEL_APIS, so as resolveThreadSessionKeys, sr as modelKey, ss as isRecord$3, st as deliveryContextFromSession, t as hasConfiguredModelFallbacks, ta as getChannelPlugin, ti as safeStatSync, tn as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, tr as resolveAgentMaxConcurrent, tt as recordSessionMetaFromInbound, u as resolveDefaultAgentId, ua as resolveWhatsAppAccount, ui as isOpenAISignInRuntimeModelSupported, un as AVATAR_MAX_BYTES, uo as normalizeAccountId$2, us as normalizeE164, ut as normalizeDeliveryContext, v as DEFAULT_HEARTBEAT_FILENAME, va as readWebSelfId, vi as DEFAULT_CONTEXT_TOKENS, vn as setConfigOverride, vo as parseAgentSessionKey, vr as getApiKeyForModel, vs as sliceUtf16Safe, vt as INPUT_PROVENANCE_KIND_VALUES, w as filterBootstrapFilesForSession, wa as defaultRuntime, wi as openBoundaryFile, wn as ensurePluginAllowlisted, wo as isGatewayMessageChannel, wr as CURRENT_MODEL_PROVIDER_CATALOG, ws as logVerbose, wt as resolveSessionKey$1, x as DEFAULT_TOOLS_FILENAME, xi as VERSION, xn as parseConfigPath, xo as resolveGroupSessionKey, xr as resolveApiKeyForProvider, xs as isPlainObject, xt as normalizeInputProvenance, y as DEFAULT_IDENTITY_FILENAME, yi as DEFAULT_MODEL, yn as unsetConfigOverride, yo as resolveThreadParentSessionKey, yr as getCustomProviderApiKey, yt as applyInputProvenanceToUserMessage, z as createRuntimeHelpers, za as resolveSlackAccount, zi as spawnWithFallback, zn as isDispatchWrapperExecutable, zo as normalizePluginsConfig, zr as resolveProfilesUnavailableReason, zs as triggerInternalHook, zt as resolveStorePath } from "./agent-scope-T2X-I1lP.js";
|
|
3
|
+
import { a as saveJsonFile, f as resolveStateDir, h as resolveRequiredHomeDir, i as loadJsonFile, l as resolveGatewayPort, o as STATE_DIR, p as expandHomePrefix, s as resolveConfigPath } from "./github-copilot-token-eyrRGmGp.js";
|
|
4
4
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-BNq0hhpR.js";
|
|
5
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, d as isSilentReplyPrefixText, f as isSilentReplyText, i as createSlackWebClient, l as HEARTBEAT_TOKEN, m as resolveSlackChannelId, o as parseSlackBlocksInput, p as parseSlackTarget, s as validateSlackBlocksArray, t as sendMessageSlack, u as SILENT_REPLY_TOKEN } from "./send-
|
|
6
|
-
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-
|
|
5
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, d as isSilentReplyPrefixText, f as isSilentReplyText, i as createSlackWebClient, l as HEARTBEAT_TOKEN, m as resolveSlackChannelId, o as parseSlackBlocksInput, p as parseSlackTarget, s as validateSlackBlocksArray, t as sendMessageSlack, u as SILENT_REPLY_TOKEN } from "./send-M0lHXvC5.js";
|
|
6
|
+
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-D63evlEI.js";
|
|
7
7
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CSsVRTTy.js";
|
|
8
|
-
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-
|
|
8
|
+
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-PXNTTbiu.js";
|
|
9
9
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-CexmAKza.js";
|
|
10
10
|
import { t as redactIdentifier } from "./redact-identifier-Cy6Tnhkn.js";
|
|
11
|
-
import { $ as readChannelAllowFromStore, A as extractTelegramLocation, B as normalizeAllowFrom$2, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as mergeDmAllowFromSources, H as resolveSenderAllowMatch, I as resolveTelegramReplyId, J as toLocationContext, K as resolveGroupAllowFromSources, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as firstDefined$2, V as normalizeDmAllowFromWithStore$1, W as isSenderIdAllowed, X as resolveCronStorePath, Y as loadCronStore, Z as saveCronStore, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as buildGroupLabel, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as formatLocationText, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
12
|
-
import { E as mediaKindFromMime, S as kindFromMime, _ as extensionForMime, a as buildImageResizeSideGrid, b as isAudioFileName, c as MediaFetchError, g as detectMime, h as getDefaultMediaLocalRoots, i as IMAGE_REDUCE_QUALITY_STEPS, l as fetchRemoteMedia, m as getAgentScopedMediaLocalRoots, n as loadWebMedia, o as getImageMetadata, s as resizeToJpeg, t as getDefaultLocalRoots, u as readResponseWithLimit, v as getFileExtension, w as MAX_IMAGE_BYTES, x as isGifMedia, y as imageMimeFromFormat } from "./media-
|
|
13
|
-
import { i as discoverModels, r as discoverAuthStorage } from "./pi-model-discovery-
|
|
14
|
-
import { B as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, C as assertBrowserNavigationAllowed, D as fetchJson$1, E as appendCdpPath, F as isLoopbackHost, G as DEFAULT_FASED_BROWSER_COLOR, H as DEFAULT_AI_SNAPSHOT_MAX_CHARS, I as isSecureWebSocketUrl, K as DEFAULT_FASED_BROWSER_ENABLED, L as isTrustedProxyAddress, M as stopChromeExtensionRelayServer, N as rawDataToString, O as fetchOk, P as isLoopbackAddress, R as resolveClientIp, S as InvalidBrowserNavigationUrlError, T as withBrowserNavigationPolicy, U as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, W as DEFAULT_BROWSER_EVALUATE_ENABLED, _ as captureScreenshot, b as normalizeCdpWsUrl, c as normalizeBrowserFormField, d as isChromeReachable, f as launchFasedAgentChrome, g as resolveLsofCommandSync, h as resolveBrowserExecutableForPlatform, i as resolveExistingPathsWithinRoot, j as ensureChromeExtensionRelayServer, m as stopFasedAgentChrome, n as DEFAULT_TRACE_DIR, o as resolveWritablePathWithinRoot, p as resolveFasedAgentUserDataDir, q as DEFAULT_FASED_BROWSER_PROFILE_NAME, r as DEFAULT_UPLOAD_DIR, t as DEFAULT_DOWNLOAD_DIR, u as isChromeCdpReady, v as createTargetViaCdp, w as assertBrowserNavigationResultAllowed, x as snapshotAria, z as resolveForwardedClientIp } from "./paths-
|
|
11
|
+
import { $ as readChannelAllowFromStore, A as extractTelegramLocation, B as normalizeAllowFrom$2, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as mergeDmAllowFromSources, H as resolveSenderAllowMatch, I as resolveTelegramReplyId, J as toLocationContext, K as resolveGroupAllowFromSources, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as firstDefined$2, V as normalizeDmAllowFromWithStore$1, W as isSenderIdAllowed, X as resolveCronStorePath, Y as loadCronStore, Z as saveCronStore, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as buildGroupLabel, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as formatLocationText, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-B8seeqjd.js";
|
|
12
|
+
import { E as mediaKindFromMime, S as kindFromMime, _ as extensionForMime, a as buildImageResizeSideGrid, b as isAudioFileName, c as MediaFetchError, g as detectMime, h as getDefaultMediaLocalRoots, i as IMAGE_REDUCE_QUALITY_STEPS, l as fetchRemoteMedia, m as getAgentScopedMediaLocalRoots, n as loadWebMedia, o as getImageMetadata, s as resizeToJpeg, t as getDefaultLocalRoots, u as readResponseWithLimit, v as getFileExtension, w as MAX_IMAGE_BYTES, x as isGifMedia, y as imageMimeFromFormat } from "./media-KeWZMCmf.js";
|
|
13
|
+
import { i as discoverModels, r as discoverAuthStorage } from "./pi-model-discovery-B1-QPAbn.js";
|
|
14
|
+
import { B as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, C as assertBrowserNavigationAllowed, D as fetchJson$1, E as appendCdpPath, F as isLoopbackHost, G as DEFAULT_FASED_BROWSER_COLOR, H as DEFAULT_AI_SNAPSHOT_MAX_CHARS, I as isSecureWebSocketUrl, K as DEFAULT_FASED_BROWSER_ENABLED, L as isTrustedProxyAddress, M as stopChromeExtensionRelayServer, N as rawDataToString, O as fetchOk, P as isLoopbackAddress, R as resolveClientIp, S as InvalidBrowserNavigationUrlError, T as withBrowserNavigationPolicy, U as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, W as DEFAULT_BROWSER_EVALUATE_ENABLED, _ as captureScreenshot, b as normalizeCdpWsUrl, c as normalizeBrowserFormField, d as isChromeReachable, f as launchFasedAgentChrome, g as resolveLsofCommandSync, h as resolveBrowserExecutableForPlatform, i as resolveExistingPathsWithinRoot, j as ensureChromeExtensionRelayServer, m as stopFasedAgentChrome, n as DEFAULT_TRACE_DIR, o as resolveWritablePathWithinRoot, p as resolveFasedAgentUserDataDir, q as DEFAULT_FASED_BROWSER_PROFILE_NAME, r as DEFAULT_UPLOAD_DIR, t as DEFAULT_DOWNLOAD_DIR, u as isChromeCdpReady, v as createTargetViaCdp, w as assertBrowserNavigationResultAllowed, x as snapshotAria, z as resolveForwardedClientIp } from "./paths-WauZ9inL.js";
|
|
15
15
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DYsl9qoS.js";
|
|
16
16
|
import { n as redactSensitiveUrlLikeString, t as redactSensitiveUrl } from "./redact-sensitive-url-Dp_gOi-q.js";
|
|
17
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
18
|
-
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-
|
|
19
|
-
import { a as writeFileWithinRoot, n as openFileWithinRoot, r as readFileWithinRoot, t as SafeOpenError } from "./fs-safe
|
|
20
|
-
import { C as createAsyncLock, S as resolvePairingPaths, T as writeJsonAtomic, _ as assertSandboxPath, b as resolveSandboxedMediaSource, c as getSkillsSnapshotVersion, d as resolveSkillsPromptForRun, f as syncSkillsToWorkspace, g as assertMediaNotDataUrl, h as sanitizeEnvVars, i as resolveSkillCommandInvocation, l as buildWorkspaceSkillSnapshot, m as applySkillEnvOverridesFromSnapshot, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as applySkillEnvOverrides, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as loadWorkspaceSkillEntries, v as resolveSandboxInputPath, w as readJsonFile$1, x as pruneExpiredPending, y as resolveSandboxPath } from "./skill-commands-
|
|
21
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
22
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
23
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, l as markdownToSignalTextChunks, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
17
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-BM90m-1s.js";
|
|
18
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-BVcGMct5.js";
|
|
19
|
+
import { a as writeFileWithinRoot, n as openFileWithinRoot, r as readFileWithinRoot, t as SafeOpenError } from "./fs-safe-CkRcL-Cg.js";
|
|
20
|
+
import { C as createAsyncLock, S as resolvePairingPaths, T as writeJsonAtomic, _ as assertSandboxPath, b as resolveSandboxedMediaSource, c as getSkillsSnapshotVersion, d as resolveSkillsPromptForRun, f as syncSkillsToWorkspace, g as assertMediaNotDataUrl, h as sanitizeEnvVars, i as resolveSkillCommandInvocation, l as buildWorkspaceSkillSnapshot, m as applySkillEnvOverridesFromSnapshot, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as applySkillEnvOverrides, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as loadWorkspaceSkillEntries, v as resolveSandboxInputPath, w as readJsonFile$1, x as pruneExpiredPending, y as resolveSandboxPath } from "./skill-commands-D_QLBtje.js";
|
|
21
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-Q3WlKwcl.js";
|
|
22
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-QOHpjP76.js";
|
|
23
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, l as markdownToSignalTextChunks, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CAqldeiP.js";
|
|
24
24
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-ByUoGUeM.js";
|
|
25
|
-
import { t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
26
|
-
import { i as saveMediaBuffer, n as ensureMediaDir, r as getMediaDir } from "./outbound-attachment-
|
|
27
|
-
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-
|
|
28
|
-
import { t as resolveMemorySearchConfig } from "./memory-search-
|
|
29
|
-
import { i as executeWithApiKeyRotation, n as parseGeminiAuth, r as collectProviderApiKeysForExecution } from "./manager-
|
|
30
|
-
import { c as normalizeExtraMemoryPaths, s as listMemoryFiles } from "./internal-
|
|
31
|
-
import { i as resolveQmdScopeDenial } from "./qmd-scope-
|
|
32
|
-
import { _ as sanitizeToolResultImages, a as createActionGate, b as estimateBase64DecodedBytes, c as jsonResult, d as readReactionParams, f as readStringArrayParam, g as sanitizeImageBlocks, h as sanitizeContentBlocksImages, 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, v as resolveImageSanitizationLimits, y as canonicalizeBase64 } from "./target-errors-
|
|
33
|
-
import { C as isRestartEnabled, S as isNativeCommandsExplicitlyDisabled, T as resolveNativeSkillsEnabled, _ as normalizeReasoningLevel, a as listChatCommands, b as resolveResponseUsageMode, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as normalizeElevatedLevel, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as normalizeUsageDisplay, w as resolveNativeCommandsEnabled, x as isCommandFlagEnabled, y as normalizeVerboseLevel } from "./commands-registry-
|
|
25
|
+
import { t as fetchWithSsrFGuard } from "./fetch-guard-B-XqKRhJ.js";
|
|
26
|
+
import { i as saveMediaBuffer, n as ensureMediaDir, r as getMediaDir } from "./outbound-attachment-DO7UVxZm.js";
|
|
27
|
+
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-D6yXePhv.js";
|
|
28
|
+
import { t as resolveMemorySearchConfig } from "./memory-search-BVlFBMLd.js";
|
|
29
|
+
import { i as executeWithApiKeyRotation, n as parseGeminiAuth, r as collectProviderApiKeysForExecution } from "./manager-O_PUm8xA.js";
|
|
30
|
+
import { c as normalizeExtraMemoryPaths, s as listMemoryFiles } from "./internal-CtV-S2kE.js";
|
|
31
|
+
import { i as resolveQmdScopeDenial } from "./qmd-scope-BgLcDW_Q.js";
|
|
32
|
+
import { _ as sanitizeToolResultImages, a as createActionGate, b as estimateBase64DecodedBytes, c as jsonResult, d as readReactionParams, f as readStringArrayParam, g as sanitizeImageBlocks, h as sanitizeContentBlocksImages, 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, v as resolveImageSanitizationLimits, y as canonicalizeBase64 } from "./target-errors-B-8Jf9OT.js";
|
|
33
|
+
import { C as isRestartEnabled, S as isNativeCommandsExplicitlyDisabled, T as resolveNativeSkillsEnabled, _ as normalizeReasoningLevel, a as listChatCommands, b as resolveResponseUsageMode, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as normalizeElevatedLevel, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as normalizeUsageDisplay, w as resolveNativeCommandsEnabled, x as isCommandFlagEnabled, y as normalizeVerboseLevel } from "./commands-registry-CwvSkARW.js";
|
|
34
34
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-B0OuvpCZ.js";
|
|
35
35
|
import { n as normalizePollInput } from "./polls-CYTwXmA1.js";
|
|
36
36
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BvR7Vq1g.js";
|
|
37
|
-
import { a as formatIMessageChatTarget, c as normalizeIMessageHandle, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, l as parseIMessageTarget, o as formatIMessageTargetForLog, r as createIMessageRpcClient, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-
|
|
38
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
39
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
40
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
37
|
+
import { a as formatIMessageChatTarget, c as normalizeIMessageHandle, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, l as parseIMessageTarget, o as formatIMessageTargetForLog, r as createIMessageRpcClient, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-BPleg3km.js";
|
|
38
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DyTOJJs4.js";
|
|
39
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-C0DEUhUn.js";
|
|
40
|
+
import { t as convertMarkdownTables } from "./tables-Cif1OeQ1.js";
|
|
41
41
|
import { t as makeProxyFetch } from "./proxy-DkRPPIHD.js";
|
|
42
42
|
import { t as resolveHookConfig } from "./config-CtKjZZ4x.js";
|
|
43
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
44
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
43
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-lgWzXlwM.js";
|
|
44
|
+
import { t as getActiveWebListener } from "./active-listener-CNrLAfOg.js";
|
|
45
45
|
import { createRequire } from "node:module";
|
|
46
|
-
import * as fs$
|
|
46
|
+
import * as fs$1 from "node:fs/promises";
|
|
47
47
|
import fs, { appendFile, mkdir } from "node:fs/promises";
|
|
48
48
|
import os, { homedir } from "node:os";
|
|
49
49
|
import * as path$1 from "node:path";
|
|
50
50
|
import path, { isAbsolute, posix } from "node:path";
|
|
51
|
-
import
|
|
51
|
+
import syncFs, { constants, existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
52
52
|
import JSON5 from "json5";
|
|
53
53
|
import { inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
54
54
|
import crypto, { X509Certificate, createDecipheriv, createHash, createHmac, randomBytes, randomUUID, scryptSync, timingSafeEqual } from "node:crypto";
|
|
@@ -4872,7 +4872,7 @@ function resolveSatRuntimeDefaultsFile(env = process.env) {
|
|
|
4872
4872
|
path.resolve(import.meta.dirname, "..", "..", "config", "sat-runtime.env"),
|
|
4873
4873
|
path.resolve(import.meta.dirname, "..", "..", "..", "config", "sat-runtime.env")
|
|
4874
4874
|
];
|
|
4875
|
-
for (const candidate of candidates) if (candidate &&
|
|
4875
|
+
for (const candidate of candidates) if (candidate && syncFs.existsSync(candidate)) return candidate;
|
|
4876
4876
|
return null;
|
|
4877
4877
|
}
|
|
4878
4878
|
function loadSatRuntimeDefaults(env = process.env) {
|
|
@@ -4880,7 +4880,7 @@ function loadSatRuntimeDefaults(env = process.env) {
|
|
|
4880
4880
|
if (explicit) return explicit;
|
|
4881
4881
|
const file = resolveSatRuntimeDefaultsFile(env);
|
|
4882
4882
|
if (!file) return null;
|
|
4883
|
-
const parsed = parseEnvFile(
|
|
4883
|
+
const parsed = parseEnvFile(syncFs.readFileSync(file, "utf8"));
|
|
4884
4884
|
if (!parsed.programId || !parsed.bondProgramId || !parsed.mintAddress || !parsed.mintProgramId) return null;
|
|
4885
4885
|
return {
|
|
4886
4886
|
programId: parsed.programId,
|
|
@@ -4987,12 +4987,12 @@ function resolveWalletStatePaths(env = process.env) {
|
|
|
4987
4987
|
}
|
|
4988
4988
|
function ensureWalletStateDir(env = process.env) {
|
|
4989
4989
|
const paths = resolveWalletStatePaths(env);
|
|
4990
|
-
|
|
4990
|
+
syncFs.mkdirSync(paths.rootDir, {
|
|
4991
4991
|
recursive: true,
|
|
4992
4992
|
mode: 448
|
|
4993
4993
|
});
|
|
4994
4994
|
try {
|
|
4995
|
-
|
|
4995
|
+
syncFs.chmodSync(paths.rootDir, 448);
|
|
4996
4996
|
} catch {}
|
|
4997
4997
|
return paths;
|
|
4998
4998
|
}
|
|
@@ -5288,9 +5288,9 @@ function normalizeRegistry(raw) {
|
|
|
5288
5288
|
}
|
|
5289
5289
|
function readWalletProviderRegistry(env = process.env) {
|
|
5290
5290
|
const file = registryPath(env);
|
|
5291
|
-
if (!
|
|
5291
|
+
if (!syncFs.existsSync(file)) return makeDefaultRegistry();
|
|
5292
5292
|
try {
|
|
5293
|
-
const normalized = normalizeRegistry(JSON.parse(
|
|
5293
|
+
const normalized = normalizeRegistry(JSON.parse(syncFs.readFileSync(file, "utf8")));
|
|
5294
5294
|
if (normalized.changed) writeWalletProviderRegistry(normalized.registry, env);
|
|
5295
5295
|
return normalized.registry;
|
|
5296
5296
|
} catch {
|
|
@@ -5304,12 +5304,12 @@ function writeWalletProviderRegistry(registry, env = process.env) {
|
|
|
5304
5304
|
version: 1,
|
|
5305
5305
|
updatedAt: nowIso$2()
|
|
5306
5306
|
};
|
|
5307
|
-
|
|
5307
|
+
syncFs.writeFileSync(file, `${JSON.stringify(payload, null, 2)}\n`, {
|
|
5308
5308
|
encoding: "utf8",
|
|
5309
5309
|
mode: REGISTRY_FILE_MODE
|
|
5310
5310
|
});
|
|
5311
5311
|
try {
|
|
5312
|
-
|
|
5312
|
+
syncFs.chmodSync(file, REGISTRY_FILE_MODE);
|
|
5313
5313
|
} catch {}
|
|
5314
5314
|
}
|
|
5315
5315
|
function resolveWalletSelectionForAgent(params) {
|
|
@@ -6313,7 +6313,7 @@ var EmbeddedKeystoreAdapter = class {
|
|
|
6313
6313
|
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6314
6314
|
details: "missing embedded keystore config (FASED_WALLET_KEYSTORE_PATH, FASED_WALLET_PASSPHRASE, FASED_WALLET_[EMBEDDED_KEYSTORE_]RPC_URL)"
|
|
6315
6315
|
};
|
|
6316
|
-
if (!
|
|
6316
|
+
if (!syncFs.existsSync(this.keystorePath)) return {
|
|
6317
6317
|
ok: false,
|
|
6318
6318
|
provider: this.id,
|
|
6319
6319
|
configured: true,
|
|
@@ -6321,7 +6321,7 @@ var EmbeddedKeystoreAdapter = class {
|
|
|
6321
6321
|
details: `keystore file not found: ${this.keystorePath}`
|
|
6322
6322
|
};
|
|
6323
6323
|
try {
|
|
6324
|
-
if (detectKeystoreType(await
|
|
6324
|
+
if (detectKeystoreType(await syncFs.promises.readFile(this.keystorePath, "utf8")) !== "solana-envelope") throw new Error("keystore file is not a Solana keystore envelope");
|
|
6325
6325
|
const [address, lamports] = await Promise.all([this.getSolanaAddress(), this.getSolanaBalanceLamports()]);
|
|
6326
6326
|
return {
|
|
6327
6327
|
ok: true,
|
|
@@ -6353,7 +6353,7 @@ var EmbeddedKeystoreAdapter = class {
|
|
|
6353
6353
|
return result;
|
|
6354
6354
|
}
|
|
6355
6355
|
try {
|
|
6356
|
-
if (detectKeystoreType(await
|
|
6356
|
+
if (detectKeystoreType(await syncFs.promises.readFile(this.keystorePath, "utf8")) === "solana-envelope") {
|
|
6357
6357
|
if (this.supportsChain("solana")) result.solana = await this.getSolanaAddress();
|
|
6358
6358
|
}
|
|
6359
6359
|
return result;
|
|
@@ -6538,7 +6538,7 @@ var EmbeddedKeystoreAdapter = class {
|
|
|
6538
6538
|
message: "embedded-keystore missing keystore path or passphrase"
|
|
6539
6539
|
});
|
|
6540
6540
|
this.solanaKeypairPromise ??= (async () => {
|
|
6541
|
-
const envelope = parseSolanaKeystoreEnvelope(await
|
|
6541
|
+
const envelope = parseSolanaKeystoreEnvelope(await syncFs.promises.readFile(this.keystorePath, "utf8"));
|
|
6542
6542
|
if (!envelope) throw new WalletProviderError({
|
|
6543
6543
|
code: "wallet_provider_invalid_config",
|
|
6544
6544
|
message: "embedded-keystore file is not a Solana keystore envelope"
|
|
@@ -6748,7 +6748,7 @@ function signerTimeoutFor(payload) {
|
|
|
6748
6748
|
function assertSecureLocalSignerSocket(socketPath) {
|
|
6749
6749
|
let stat;
|
|
6750
6750
|
try {
|
|
6751
|
-
stat =
|
|
6751
|
+
stat = syncFs.lstatSync(socketPath);
|
|
6752
6752
|
} catch (err) {
|
|
6753
6753
|
throw new WalletProviderError({
|
|
6754
6754
|
code: "wallet_provider_unavailable",
|
|
@@ -7172,12 +7172,12 @@ const MASTER_KEY_BYTES = 32;
|
|
|
7172
7172
|
const MASTER_KEY_FILENAME = "master.key";
|
|
7173
7173
|
function ensureSecretsDir(env = process.env) {
|
|
7174
7174
|
const dir = path.join(resolveStateDir(env), "secrets");
|
|
7175
|
-
|
|
7175
|
+
syncFs.mkdirSync(dir, {
|
|
7176
7176
|
recursive: true,
|
|
7177
7177
|
mode: SECRETS_DIR_MODE
|
|
7178
7178
|
});
|
|
7179
7179
|
try {
|
|
7180
|
-
|
|
7180
|
+
syncFs.chmodSync(dir, SECRETS_DIR_MODE);
|
|
7181
7181
|
} catch {}
|
|
7182
7182
|
return dir;
|
|
7183
7183
|
}
|
|
@@ -7190,18 +7190,18 @@ function resolveWalletProviderSecretPath(providerId, env = process.env) {
|
|
|
7190
7190
|
}
|
|
7191
7191
|
function readOrCreateMasterKey(env = process.env) {
|
|
7192
7192
|
const keyPath = resolveMasterKeyPath(env);
|
|
7193
|
-
if (
|
|
7194
|
-
const raw =
|
|
7193
|
+
if (syncFs.existsSync(keyPath)) {
|
|
7194
|
+
const raw = syncFs.readFileSync(keyPath, "utf8").trim();
|
|
7195
7195
|
const parsed = Buffer.from(raw, "hex");
|
|
7196
7196
|
if (parsed.length === MASTER_KEY_BYTES) return parsed;
|
|
7197
7197
|
}
|
|
7198
7198
|
const key = randomBytes(MASTER_KEY_BYTES);
|
|
7199
|
-
|
|
7199
|
+
syncFs.writeFileSync(keyPath, `${key.toString("hex")}\n`, {
|
|
7200
7200
|
mode: SECRET_FILE_MODE,
|
|
7201
7201
|
encoding: "utf8"
|
|
7202
7202
|
});
|
|
7203
7203
|
try {
|
|
7204
|
-
|
|
7204
|
+
syncFs.chmodSync(keyPath, SECRET_FILE_MODE);
|
|
7205
7205
|
} catch {}
|
|
7206
7206
|
return key;
|
|
7207
7207
|
}
|
|
@@ -7251,9 +7251,9 @@ function decryptProviderPayload(encrypted, env = process.env) {
|
|
|
7251
7251
|
}
|
|
7252
7252
|
function loadWalletProviderSecret(providerId, env = process.env) {
|
|
7253
7253
|
const secretPath = resolveWalletProviderSecretPath(providerId, env);
|
|
7254
|
-
if (!
|
|
7254
|
+
if (!syncFs.existsSync(secretPath)) return null;
|
|
7255
7255
|
try {
|
|
7256
|
-
const value = decryptProviderPayload(JSON.parse(
|
|
7256
|
+
const value = decryptProviderPayload(JSON.parse(syncFs.readFileSync(secretPath, "utf8")), env);
|
|
7257
7257
|
if (!value || value.providerId !== providerId) return null;
|
|
7258
7258
|
return value;
|
|
7259
7259
|
} catch {
|
|
@@ -7587,14 +7587,14 @@ function normalizeState(input) {
|
|
|
7587
7587
|
}
|
|
7588
7588
|
function loadState$2(env = process.env) {
|
|
7589
7589
|
const statePath = resolveStatePath(env);
|
|
7590
|
-
if (!
|
|
7590
|
+
if (!syncFs.existsSync(statePath)) return {
|
|
7591
7591
|
version: 2,
|
|
7592
7592
|
passkeys: [],
|
|
7593
7593
|
challenges: [],
|
|
7594
7594
|
grants: []
|
|
7595
7595
|
};
|
|
7596
7596
|
try {
|
|
7597
|
-
const raw =
|
|
7597
|
+
const raw = syncFs.readFileSync(statePath, "utf8");
|
|
7598
7598
|
return normalizeState(JSON.parse(raw));
|
|
7599
7599
|
} catch {
|
|
7600
7600
|
return {
|
|
@@ -7607,12 +7607,12 @@ function loadState$2(env = process.env) {
|
|
|
7607
7607
|
}
|
|
7608
7608
|
function saveState$1(state, env = process.env) {
|
|
7609
7609
|
const statePath = resolveStatePath(env);
|
|
7610
|
-
|
|
7610
|
+
syncFs.writeFileSync(statePath, `${JSON.stringify(state, null, 2)}\n`, {
|
|
7611
7611
|
encoding: "utf8",
|
|
7612
7612
|
mode: 384
|
|
7613
7613
|
});
|
|
7614
7614
|
try {
|
|
7615
|
-
|
|
7615
|
+
syncFs.chmodSync(statePath, 384);
|
|
7616
7616
|
} catch {}
|
|
7617
7617
|
}
|
|
7618
7618
|
function pruneState$1(state) {
|
|
@@ -7754,9 +7754,9 @@ function normalizeWalletUsageBucket(raw) {
|
|
|
7754
7754
|
}
|
|
7755
7755
|
function loadLedger(paths) {
|
|
7756
7756
|
const fallback = defaultWalletUsageLedger();
|
|
7757
|
-
if (!
|
|
7757
|
+
if (!syncFs.existsSync(paths.dailyUsagePath)) return fallback;
|
|
7758
7758
|
try {
|
|
7759
|
-
const raw =
|
|
7759
|
+
const raw = syncFs.readFileSync(paths.dailyUsagePath, "utf8");
|
|
7760
7760
|
const parsed = JSON.parse(raw);
|
|
7761
7761
|
if (parsed && parsed.version === 2 && typeof parsed.date === "string") {
|
|
7762
7762
|
const walletsRaw = parsed.wallets && typeof parsed.wallets === "object" && !Array.isArray(parsed.wallets) ? parsed.wallets : {};
|
|
@@ -7784,9 +7784,9 @@ function loadLedger(paths) {
|
|
|
7784
7784
|
return fallback;
|
|
7785
7785
|
}
|
|
7786
7786
|
function writeLedger(paths, ledger) {
|
|
7787
|
-
|
|
7787
|
+
syncFs.writeFileSync(paths.dailyUsagePath, `${JSON.stringify(ledger, null, 2)}\n`, { mode: 384 });
|
|
7788
7788
|
try {
|
|
7789
|
-
|
|
7789
|
+
syncFs.chmodSync(paths.dailyUsagePath, 384);
|
|
7790
7790
|
} catch {}
|
|
7791
7791
|
}
|
|
7792
7792
|
function resolveWalletUsageBucket(ledger, walletId) {
|
|
@@ -7992,9 +7992,9 @@ function readWalletPolicyState(env = process.env) {
|
|
|
7992
7992
|
updatedAt: nowIso$1(),
|
|
7993
7993
|
wallets: {}
|
|
7994
7994
|
};
|
|
7995
|
-
if (!
|
|
7995
|
+
if (!syncFs.existsSync(statePath)) return fallback;
|
|
7996
7996
|
try {
|
|
7997
|
-
const raw =
|
|
7997
|
+
const raw = syncFs.readFileSync(statePath, "utf8");
|
|
7998
7998
|
const parsed = JSON.parse(raw);
|
|
7999
7999
|
if (parsed.version !== 1) return fallback;
|
|
8000
8000
|
const walletsRaw = parsed.wallets && typeof parsed.wallets === "object" && !Array.isArray(parsed.wallets) ? parsed.wallets : {};
|
|
@@ -8015,9 +8015,9 @@ function readWalletPolicyState(env = process.env) {
|
|
|
8015
8015
|
}
|
|
8016
8016
|
function writeWalletPolicyState(state, env = process.env) {
|
|
8017
8017
|
const statePath = resolveWalletPolicyStatePath(ensureWalletStateDir(env));
|
|
8018
|
-
|
|
8018
|
+
syncFs.writeFileSync(statePath, `${JSON.stringify(state, null, 2)}\n`, { mode: 384 });
|
|
8019
8019
|
try {
|
|
8020
|
-
|
|
8020
|
+
syncFs.chmodSync(statePath, 384);
|
|
8021
8021
|
} catch {}
|
|
8022
8022
|
}
|
|
8023
8023
|
function buildResolvedPolicyFromDefaults(defaults) {
|
|
@@ -8630,25 +8630,25 @@ function resolveCustodyShareStatePath(walletId, env = process.env) {
|
|
|
8630
8630
|
}
|
|
8631
8631
|
function locateCustodyStatePath(walletId, env = process.env) {
|
|
8632
8632
|
const scopedPath = resolveCustodyStatePath(walletId, env);
|
|
8633
|
-
if (
|
|
8633
|
+
if (syncFs.existsSync(scopedPath)) return scopedPath;
|
|
8634
8634
|
const legacyPath = resolveLegacyCustodyStatePath(env);
|
|
8635
|
-
return
|
|
8635
|
+
return syncFs.existsSync(legacyPath) ? legacyPath : scopedPath;
|
|
8636
8636
|
}
|
|
8637
8637
|
function locateCustodyShareStatePath(walletId, env = process.env) {
|
|
8638
8638
|
const scopedPath = resolveCustodyShareStatePath(walletId, env);
|
|
8639
|
-
if (
|
|
8639
|
+
if (syncFs.existsSync(scopedPath)) return scopedPath;
|
|
8640
8640
|
const legacyPath = resolveLegacyCustodyShareStatePath(env);
|
|
8641
|
-
return
|
|
8641
|
+
return syncFs.existsSync(legacyPath) ? legacyPath : scopedPath;
|
|
8642
8642
|
}
|
|
8643
8643
|
function listCustodyStateTargets(env = process.env) {
|
|
8644
8644
|
const walletPaths = ensureWalletStateDir(env);
|
|
8645
8645
|
const custodyRoot = path.join(walletPaths.rootDir, "custody");
|
|
8646
8646
|
const targets = /* @__PURE__ */ new Set();
|
|
8647
|
-
if (
|
|
8648
|
-
for (const entry of
|
|
8647
|
+
if (syncFs.existsSync(custodyRoot)) {
|
|
8648
|
+
for (const entry of syncFs.readdirSync(custodyRoot, { withFileTypes: true })) if (entry.isDirectory() && entry.name.trim()) targets.add(entry.name.trim());
|
|
8649
8649
|
}
|
|
8650
8650
|
const out = [...targets];
|
|
8651
|
-
if (
|
|
8651
|
+
if (syncFs.existsSync(resolveLegacyCustodyStatePath(env)) || out.length === 0) out.push(void 0);
|
|
8652
8652
|
return out;
|
|
8653
8653
|
}
|
|
8654
8654
|
function readUnlockTtlSeconds(env = process.env, requestedTtlSeconds) {
|
|
@@ -8870,9 +8870,9 @@ function resolveWalletCustodyScope(params) {
|
|
|
8870
8870
|
}
|
|
8871
8871
|
function loadShareState(walletId, env = process.env) {
|
|
8872
8872
|
const filePath = locateCustodyShareStatePath(walletId, env);
|
|
8873
|
-
if (!
|
|
8873
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
8874
8874
|
try {
|
|
8875
|
-
const parsed = JSON.parse(
|
|
8875
|
+
const parsed = JSON.parse(syncFs.readFileSync(filePath, "utf8"));
|
|
8876
8876
|
if (parsed.version === 1 && parsed.scheme === "xor-3of3-v1" && typeof parsed.secretBytes === "number" && parsed.secretBytes > 0 && typeof parsed.hotShare === "string" && typeof parsed.coldShare === "string" && typeof parsed.deviceShareHash === "string" && typeof parsed.secretChecksum === "string" && typeof parsed.createdAt === "string" && typeof parsed.updatedAt === "string") {
|
|
8877
8877
|
const hot = decodeBase64Share(parsed.hotShare);
|
|
8878
8878
|
const cold = decodeBase64Share(parsed.coldShare);
|
|
@@ -8933,12 +8933,12 @@ function loadShareState(walletId, env = process.env) {
|
|
|
8933
8933
|
}
|
|
8934
8934
|
function loadState$1(walletId, env = process.env) {
|
|
8935
8935
|
const filePath = locateCustodyStatePath(walletId, env);
|
|
8936
|
-
if (!
|
|
8936
|
+
if (!syncFs.existsSync(filePath)) return {
|
|
8937
8937
|
version: 1,
|
|
8938
8938
|
unlockSessions: []
|
|
8939
8939
|
};
|
|
8940
8940
|
try {
|
|
8941
|
-
const parsed = JSON.parse(
|
|
8941
|
+
const parsed = JSON.parse(syncFs.readFileSync(filePath, "utf8"));
|
|
8942
8942
|
if (parsed.version !== 1 || !Array.isArray(parsed.unlockSessions)) return {
|
|
8943
8943
|
version: 1,
|
|
8944
8944
|
unlockSessions: []
|
|
@@ -8975,16 +8975,16 @@ function loadState$1(walletId, env = process.env) {
|
|
|
8975
8975
|
}
|
|
8976
8976
|
function saveState(state, walletId, env = process.env) {
|
|
8977
8977
|
const filePath = resolveCustodyStatePath(walletId, env);
|
|
8978
|
-
|
|
8978
|
+
syncFs.mkdirSync(path.dirname(filePath), {
|
|
8979
8979
|
recursive: true,
|
|
8980
8980
|
mode: 448
|
|
8981
8981
|
});
|
|
8982
|
-
|
|
8982
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(state, null, 2)}\n`, {
|
|
8983
8983
|
encoding: "utf8",
|
|
8984
8984
|
mode: 384
|
|
8985
8985
|
});
|
|
8986
8986
|
try {
|
|
8987
|
-
|
|
8987
|
+
syncFs.chmodSync(filePath, 384);
|
|
8988
8988
|
} catch {}
|
|
8989
8989
|
}
|
|
8990
8990
|
function pruneState(state) {
|
|
@@ -9515,7 +9515,7 @@ function identityHasValues(identity) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
function loadIdentityFromFile(identityPath) {
|
|
9517
9517
|
try {
|
|
9518
|
-
const parsed = parseIdentityMarkdown(
|
|
9518
|
+
const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
|
|
9519
9519
|
if (!identityHasValues(parsed)) return null;
|
|
9520
9520
|
return parsed;
|
|
9521
9521
|
} catch {
|
|
@@ -9543,7 +9543,7 @@ function resolveAvatarSource(cfg, agentId, opts) {
|
|
|
9543
9543
|
}
|
|
9544
9544
|
function resolveExistingPath(value) {
|
|
9545
9545
|
try {
|
|
9546
|
-
return
|
|
9546
|
+
return syncFs.realpathSync(value);
|
|
9547
9547
|
} catch {
|
|
9548
9548
|
return path.resolve(value);
|
|
9549
9549
|
}
|
|
@@ -9561,7 +9561,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
9561
9561
|
reason: "unsupported_extension"
|
|
9562
9562
|
};
|
|
9563
9563
|
try {
|
|
9564
|
-
const stat =
|
|
9564
|
+
const stat = syncFs.statSync(realPath);
|
|
9565
9565
|
if (!stat.isFile()) return {
|
|
9566
9566
|
ok: false,
|
|
9567
9567
|
reason: "missing"
|
|
@@ -9635,12 +9635,12 @@ function appendWalletAuditEntry(params) {
|
|
|
9635
9635
|
actor: params.actor?.trim() || "system",
|
|
9636
9636
|
details: params.details ?? {}
|
|
9637
9637
|
};
|
|
9638
|
-
|
|
9638
|
+
syncFs.appendFileSync(paths.auditLogPath, `${JSON.stringify(entry)}\n`, {
|
|
9639
9639
|
encoding: "utf8",
|
|
9640
9640
|
mode: 384
|
|
9641
9641
|
});
|
|
9642
9642
|
try {
|
|
9643
|
-
|
|
9643
|
+
syncFs.chmodSync(paths.auditLogPath, 384);
|
|
9644
9644
|
} catch {}
|
|
9645
9645
|
return entry;
|
|
9646
9646
|
}
|
|
@@ -9784,7 +9784,7 @@ function resolveDefaultIdentityPath() {
|
|
|
9784
9784
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
9785
9785
|
}
|
|
9786
9786
|
function ensureDir$2(filePath) {
|
|
9787
|
-
|
|
9787
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
9788
9788
|
}
|
|
9789
9789
|
const ED25519_SPKI_PREFIX$1 = Buffer.from("302a300506032b6570032100", "hex");
|
|
9790
9790
|
function base64UrlEncode(buf) {
|
|
@@ -9820,8 +9820,8 @@ function generateIdentity() {
|
|
|
9820
9820
|
}
|
|
9821
9821
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
9822
9822
|
try {
|
|
9823
|
-
if (
|
|
9824
|
-
const raw =
|
|
9823
|
+
if (syncFs.existsSync(filePath)) {
|
|
9824
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
9825
9825
|
const parsed = JSON.parse(raw);
|
|
9826
9826
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
9827
9827
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -9830,9 +9830,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
9830
9830
|
...parsed,
|
|
9831
9831
|
deviceId: derivedId
|
|
9832
9832
|
};
|
|
9833
|
-
|
|
9833
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
9834
9834
|
try {
|
|
9835
|
-
|
|
9835
|
+
syncFs.chmodSync(filePath, 384);
|
|
9836
9836
|
} catch {}
|
|
9837
9837
|
return {
|
|
9838
9838
|
deviceId: derivedId,
|
|
@@ -9857,9 +9857,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
9857
9857
|
privateKeyPem: identity.privateKeyPem,
|
|
9858
9858
|
createdAtMs: Date.now()
|
|
9859
9859
|
};
|
|
9860
|
-
|
|
9860
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
9861
9861
|
try {
|
|
9862
|
-
|
|
9862
|
+
syncFs.chmodSync(filePath, 384);
|
|
9863
9863
|
} catch {}
|
|
9864
9864
|
return identity;
|
|
9865
9865
|
}
|
|
@@ -10566,12 +10566,12 @@ function linksFilePath(env = process.env) {
|
|
|
10566
10566
|
}
|
|
10567
10567
|
function loadFile$1(env = process.env) {
|
|
10568
10568
|
const filePath = linksFilePath(env);
|
|
10569
|
-
if (!
|
|
10569
|
+
if (!syncFs.existsSync(filePath)) return {
|
|
10570
10570
|
version: 1,
|
|
10571
10571
|
links: []
|
|
10572
10572
|
};
|
|
10573
10573
|
try {
|
|
10574
|
-
const parsed = JSON.parse(
|
|
10574
|
+
const parsed = JSON.parse(syncFs.readFileSync(filePath, "utf8"));
|
|
10575
10575
|
if (parsed?.version === 1 && Array.isArray(parsed.links)) return {
|
|
10576
10576
|
version: 1,
|
|
10577
10577
|
links: parsed.links
|
|
@@ -10584,12 +10584,12 @@ function loadFile$1(env = process.env) {
|
|
|
10584
10584
|
}
|
|
10585
10585
|
function saveFile$1(file, env = process.env) {
|
|
10586
10586
|
const filePath = linksFilePath(env);
|
|
10587
|
-
|
|
10587
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, {
|
|
10588
10588
|
encoding: "utf8",
|
|
10589
10589
|
mode: 384
|
|
10590
10590
|
});
|
|
10591
10591
|
try {
|
|
10592
|
-
|
|
10592
|
+
syncFs.chmodSync(filePath, 384);
|
|
10593
10593
|
} catch {}
|
|
10594
10594
|
}
|
|
10595
10595
|
function upsertWalletSettlementLink(params) {
|
|
@@ -10691,7 +10691,7 @@ function sanitizeStore(raw) {
|
|
|
10691
10691
|
function loadStore(filePath = resolveTaskRegistryPath()) {
|
|
10692
10692
|
if (cachedStore && loadedPath === filePath) return cachedStore;
|
|
10693
10693
|
try {
|
|
10694
|
-
const raw =
|
|
10694
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
10695
10695
|
cachedStore = sanitizeStore(JSON.parse(raw));
|
|
10696
10696
|
} catch {
|
|
10697
10697
|
cachedStore = defaultStore();
|
|
@@ -10700,10 +10700,10 @@ function loadStore(filePath = resolveTaskRegistryPath()) {
|
|
|
10700
10700
|
return cachedStore;
|
|
10701
10701
|
}
|
|
10702
10702
|
function saveStore(store, filePath = resolveTaskRegistryPath()) {
|
|
10703
|
-
|
|
10703
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
10704
10704
|
const tmpPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
|
|
10705
|
-
|
|
10706
|
-
|
|
10705
|
+
syncFs.writeFileSync(tmpPath, `${JSON.stringify(store, null, 2)}\n`, "utf8");
|
|
10706
|
+
syncFs.renameSync(tmpPath, filePath);
|
|
10707
10707
|
cachedStore = store;
|
|
10708
10708
|
loadedPath = filePath;
|
|
10709
10709
|
}
|
|
@@ -11297,12 +11297,12 @@ async function executeWalletSendWithRetry(params) {
|
|
|
11297
11297
|
}
|
|
11298
11298
|
function loadFile(env = process.env) {
|
|
11299
11299
|
const paths = ensureWalletStateDir(env);
|
|
11300
|
-
if (!
|
|
11300
|
+
if (!syncFs.existsSync(paths.sendApprovalsPath)) return {
|
|
11301
11301
|
version: 1,
|
|
11302
11302
|
requests: []
|
|
11303
11303
|
};
|
|
11304
11304
|
try {
|
|
11305
|
-
const parsed = JSON.parse(
|
|
11305
|
+
const parsed = JSON.parse(syncFs.readFileSync(paths.sendApprovalsPath, "utf8"));
|
|
11306
11306
|
if (parsed?.version === 1 && Array.isArray(parsed.requests)) return {
|
|
11307
11307
|
version: 1,
|
|
11308
11308
|
requests: parsed.requests
|
|
@@ -11315,12 +11315,12 @@ function loadFile(env = process.env) {
|
|
|
11315
11315
|
}
|
|
11316
11316
|
function saveFile(file, env = process.env) {
|
|
11317
11317
|
const paths = ensureWalletStateDir(env);
|
|
11318
|
-
|
|
11318
|
+
syncFs.writeFileSync(paths.sendApprovalsPath, `${JSON.stringify(file, null, 2)}\n`, {
|
|
11319
11319
|
encoding: "utf8",
|
|
11320
11320
|
mode: 384
|
|
11321
11321
|
});
|
|
11322
11322
|
try {
|
|
11323
|
-
|
|
11323
|
+
syncFs.chmodSync(paths.sendApprovalsPath, 384);
|
|
11324
11324
|
} catch {}
|
|
11325
11325
|
}
|
|
11326
11326
|
function markExpired(file) {
|
|
@@ -11734,7 +11734,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
11734
11734
|
function hasGitMarker(repoRoot) {
|
|
11735
11735
|
const gitPath = path.join(repoRoot, ".git");
|
|
11736
11736
|
try {
|
|
11737
|
-
const stat =
|
|
11737
|
+
const stat = syncFs.statSync(gitPath);
|
|
11738
11738
|
return stat.isDirectory() || stat.isFile();
|
|
11739
11739
|
} catch {
|
|
11740
11740
|
return false;
|
|
@@ -11746,10 +11746,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
11746
11746
|
function resolveGitDirFromMarker(repoRoot) {
|
|
11747
11747
|
const gitPath = path.join(repoRoot, ".git");
|
|
11748
11748
|
try {
|
|
11749
|
-
const stat =
|
|
11749
|
+
const stat = syncFs.statSync(gitPath);
|
|
11750
11750
|
if (stat.isDirectory()) return gitPath;
|
|
11751
11751
|
if (!stat.isFile()) return null;
|
|
11752
|
-
const match =
|
|
11752
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
11753
11753
|
if (!match?.[1]) return null;
|
|
11754
11754
|
return path.resolve(repoRoot, match[1].trim());
|
|
11755
11755
|
} catch {
|
|
@@ -11798,7 +11798,7 @@ function isMissingPathError$2(error) {
|
|
|
11798
11798
|
function resolveGitRefsBase(headPath) {
|
|
11799
11799
|
const gitDir = path.dirname(headPath);
|
|
11800
11800
|
try {
|
|
11801
|
-
const commonDirRaw =
|
|
11801
|
+
const commonDirRaw = syncFs.readFileSync(path.join(gitDir, "commondir"), "utf-8").trim();
|
|
11802
11802
|
if (!commonDirRaw) return gitDir;
|
|
11803
11803
|
return path.resolve(gitDir, commonDirRaw);
|
|
11804
11804
|
} catch (error) {
|
|
@@ -11817,7 +11817,7 @@ function resolveRefPath(refsBase, ref) {
|
|
|
11817
11817
|
}
|
|
11818
11818
|
function readCommitFromPackedRefs(refsBase, ref) {
|
|
11819
11819
|
try {
|
|
11820
|
-
const packedRefs =
|
|
11820
|
+
const packedRefs = syncFs.readFileSync(path.join(refsBase, "packed-refs"), "utf-8");
|
|
11821
11821
|
for (const line of packedRefs.split("\n")) {
|
|
11822
11822
|
if (!line || line.startsWith("#") || line.startsWith("^")) continue;
|
|
11823
11823
|
const [commit, packedRef] = line.trim().split(/\s+/, 2);
|
|
@@ -11853,7 +11853,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
11853
11853
|
cachedCommit = null;
|
|
11854
11854
|
return cachedCommit;
|
|
11855
11855
|
}
|
|
11856
|
-
const head =
|
|
11856
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
11857
11857
|
if (!head) {
|
|
11858
11858
|
cachedCommit = null;
|
|
11859
11859
|
return cachedCommit;
|
|
@@ -11867,7 +11867,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
11867
11867
|
return cachedCommit;
|
|
11868
11868
|
}
|
|
11869
11869
|
try {
|
|
11870
|
-
cachedCommit = formatCommit(
|
|
11870
|
+
cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
|
|
11871
11871
|
return cachedCommit;
|
|
11872
11872
|
} catch (error) {
|
|
11873
11873
|
if (!isMissingPathError$2(error)) throw error;
|
|
@@ -12078,9 +12078,9 @@ function sanitizeBucket(input) {
|
|
|
12078
12078
|
}
|
|
12079
12079
|
function readSnapshot(env) {
|
|
12080
12080
|
const file = observabilityPath(env);
|
|
12081
|
-
if (!
|
|
12081
|
+
if (!syncFs.existsSync(file)) return makeDefaultSnapshot();
|
|
12082
12082
|
try {
|
|
12083
|
-
const parsed = JSON.parse(
|
|
12083
|
+
const parsed = JSON.parse(syncFs.readFileSync(file, "utf8"));
|
|
12084
12084
|
if (parsed?.version !== 1) return makeDefaultSnapshot();
|
|
12085
12085
|
return {
|
|
12086
12086
|
version: 1,
|
|
@@ -12097,12 +12097,12 @@ function readSnapshot(env) {
|
|
|
12097
12097
|
}
|
|
12098
12098
|
function writeSnapshot(env, snapshot) {
|
|
12099
12099
|
const file = observabilityPath(env);
|
|
12100
|
-
|
|
12100
|
+
syncFs.writeFileSync(file, `${JSON.stringify(snapshot, null, 2)}\n`, {
|
|
12101
12101
|
mode: 384,
|
|
12102
12102
|
encoding: "utf8"
|
|
12103
12103
|
});
|
|
12104
12104
|
try {
|
|
12105
|
-
|
|
12105
|
+
syncFs.chmodSync(file, 384);
|
|
12106
12106
|
} catch {}
|
|
12107
12107
|
}
|
|
12108
12108
|
function incrementWalletObservabilityCounter(params) {
|
|
@@ -13311,8 +13311,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
13311
13311
|
}
|
|
13312
13312
|
function readStore(filePath) {
|
|
13313
13313
|
try {
|
|
13314
|
-
if (!
|
|
13315
|
-
const raw =
|
|
13314
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
13315
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
13316
13316
|
const parsed = JSON.parse(raw);
|
|
13317
13317
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
13318
13318
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -13322,10 +13322,10 @@ function readStore(filePath) {
|
|
|
13322
13322
|
}
|
|
13323
13323
|
}
|
|
13324
13324
|
function writeStore(filePath, store) {
|
|
13325
|
-
|
|
13326
|
-
|
|
13325
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
13326
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
13327
13327
|
try {
|
|
13328
|
-
|
|
13328
|
+
syncFs.chmodSync(filePath, 384);
|
|
13329
13329
|
} catch {}
|
|
13330
13330
|
}
|
|
13331
13331
|
function loadDeviceAuthToken(params) {
|
|
@@ -17881,11 +17881,11 @@ function resolveFailedDir(stateDir) {
|
|
|
17881
17881
|
/** Ensure the queue directory (and failed/ subdirectory) exist. */
|
|
17882
17882
|
async function ensureQueueDir(stateDir) {
|
|
17883
17883
|
const queueDir = resolveQueueDir(stateDir);
|
|
17884
|
-
await
|
|
17884
|
+
await syncFs.promises.mkdir(queueDir, {
|
|
17885
17885
|
recursive: true,
|
|
17886
17886
|
mode: 448
|
|
17887
17887
|
});
|
|
17888
|
-
await
|
|
17888
|
+
await syncFs.promises.mkdir(resolveFailedDir(stateDir), {
|
|
17889
17889
|
recursive: true,
|
|
17890
17890
|
mode: 448
|
|
17891
17891
|
});
|
|
@@ -17912,18 +17912,18 @@ async function enqueueDelivery(params, stateDir) {
|
|
|
17912
17912
|
const filePath = path.join(queueDir, `${id}.json`);
|
|
17913
17913
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
17914
17914
|
const json = JSON.stringify(entry, null, 2);
|
|
17915
|
-
await
|
|
17915
|
+
await syncFs.promises.writeFile(tmp, json, {
|
|
17916
17916
|
encoding: "utf-8",
|
|
17917
17917
|
mode: 384
|
|
17918
17918
|
});
|
|
17919
|
-
await
|
|
17919
|
+
await syncFs.promises.rename(tmp, filePath);
|
|
17920
17920
|
return id;
|
|
17921
17921
|
}
|
|
17922
17922
|
/** Remove a successfully delivered entry from the queue. */
|
|
17923
17923
|
async function ackDelivery(id, stateDir) {
|
|
17924
17924
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
17925
17925
|
try {
|
|
17926
|
-
await
|
|
17926
|
+
await syncFs.promises.unlink(filePath);
|
|
17927
17927
|
} catch (err) {
|
|
17928
17928
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
|
|
17929
17929
|
}
|
|
@@ -17931,17 +17931,17 @@ async function ackDelivery(id, stateDir) {
|
|
|
17931
17931
|
/** Update a queue entry after a failed delivery attempt. */
|
|
17932
17932
|
async function failDelivery(id, error, stateDir) {
|
|
17933
17933
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
17934
|
-
const raw = await
|
|
17934
|
+
const raw = await syncFs.promises.readFile(filePath, "utf-8");
|
|
17935
17935
|
const entry = JSON.parse(raw);
|
|
17936
17936
|
entry.retryCount += 1;
|
|
17937
17937
|
entry.lastAttemptAt = Date.now();
|
|
17938
17938
|
entry.lastError = error;
|
|
17939
17939
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
17940
|
-
await
|
|
17940
|
+
await syncFs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
|
|
17941
17941
|
encoding: "utf-8",
|
|
17942
17942
|
mode: 384
|
|
17943
17943
|
});
|
|
17944
|
-
await
|
|
17944
|
+
await syncFs.promises.rename(tmp, filePath);
|
|
17945
17945
|
}
|
|
17946
17946
|
|
|
17947
17947
|
//#endregion
|
|
@@ -19107,27 +19107,27 @@ function createOutboundSendDepsFromCliSource(deps) {
|
|
|
19107
19107
|
function createDefaultDeps() {
|
|
19108
19108
|
return {
|
|
19109
19109
|
sendMessageWhatsApp: async (...args) => {
|
|
19110
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
19110
|
+
const { sendMessageWhatsApp } = await import("./web-Cp2B8UG5.js");
|
|
19111
19111
|
return await sendMessageWhatsApp(...args);
|
|
19112
19112
|
},
|
|
19113
19113
|
sendMessageTelegram: async (...args) => {
|
|
19114
|
-
const { sendMessageTelegram } = await import("./send-
|
|
19114
|
+
const { sendMessageTelegram } = await import("./send-B8seeqjd.js").then((n) => n.l);
|
|
19115
19115
|
return await sendMessageTelegram(...args);
|
|
19116
19116
|
},
|
|
19117
19117
|
sendMessageDiscord: async (...args) => {
|
|
19118
|
-
const { sendMessageDiscord } = await import("./send-
|
|
19118
|
+
const { sendMessageDiscord } = await import("./send-D63evlEI.js").then((n) => n.t);
|
|
19119
19119
|
return await sendMessageDiscord(...args);
|
|
19120
19120
|
},
|
|
19121
19121
|
sendMessageSlack: async (...args) => {
|
|
19122
|
-
const { sendMessageSlack } = await import("./send-
|
|
19122
|
+
const { sendMessageSlack } = await import("./send-M0lHXvC5.js").then((n) => n.n);
|
|
19123
19123
|
return await sendMessageSlack(...args);
|
|
19124
19124
|
},
|
|
19125
19125
|
sendMessageSignal: async (...args) => {
|
|
19126
|
-
const { sendMessageSignal } = await import("./send-
|
|
19126
|
+
const { sendMessageSignal } = await import("./send-CAqldeiP.js").then((n) => n.i);
|
|
19127
19127
|
return await sendMessageSignal(...args);
|
|
19128
19128
|
},
|
|
19129
19129
|
sendMessageIMessage: async (...args) => {
|
|
19130
|
-
const { sendMessageIMessage } = await import("./send-
|
|
19130
|
+
const { sendMessageIMessage } = await import("./send-BPleg3km.js").then((n) => n.n);
|
|
19131
19131
|
return await sendMessageIMessage(...args);
|
|
19132
19132
|
}
|
|
19133
19133
|
};
|
|
@@ -21278,7 +21278,7 @@ async function getMemorySearchManager(params) {
|
|
|
21278
21278
|
if (cached) return { manager: cached };
|
|
21279
21279
|
}
|
|
21280
21280
|
try {
|
|
21281
|
-
const { QmdMemoryManager } = await import("./qmd-manager
|
|
21281
|
+
const { QmdMemoryManager } = await import("./qmd-manager--NffQxNh.js");
|
|
21282
21282
|
const primary = await QmdMemoryManager.create({
|
|
21283
21283
|
cfg: params.cfg,
|
|
21284
21284
|
agentId: params.agentId,
|
|
@@ -21290,7 +21290,7 @@ async function getMemorySearchManager(params) {
|
|
|
21290
21290
|
const wrapper = new FallbackMemoryManager({
|
|
21291
21291
|
primary,
|
|
21292
21292
|
fallbackFactory: async () => {
|
|
21293
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
21293
|
+
const { MemoryIndexManager } = await import("./manager-O_PUm8xA.js").then((n) => n.t);
|
|
21294
21294
|
return await MemoryIndexManager.get(params);
|
|
21295
21295
|
}
|
|
21296
21296
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -21303,12 +21303,12 @@ async function getMemorySearchManager(params) {
|
|
|
21303
21303
|
}
|
|
21304
21304
|
}
|
|
21305
21305
|
try {
|
|
21306
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
21306
|
+
const { MemoryIndexManager } = await import("./manager-O_PUm8xA.js").then((n) => n.t);
|
|
21307
21307
|
return { manager: await MemoryIndexManager.get(params) };
|
|
21308
21308
|
} catch (err) {
|
|
21309
21309
|
const message = err instanceof Error ? err.message : String(err);
|
|
21310
21310
|
if (isNodeSqliteUnavailable(message)) {
|
|
21311
|
-
const { FilesystemMemorySearchManager } = await import("./filesystem-manager-
|
|
21311
|
+
const { FilesystemMemorySearchManager } = await import("./filesystem-manager-_ccVdKHj.js");
|
|
21312
21312
|
const manager = await FilesystemMemorySearchManager.create({
|
|
21313
21313
|
cfg: params.cfg,
|
|
21314
21314
|
agentId: params.agentId,
|
|
@@ -26981,7 +26981,7 @@ function normalizeSessionKey(value) {
|
|
|
26981
26981
|
}
|
|
26982
26982
|
function readSessionStore(storePath) {
|
|
26983
26983
|
try {
|
|
26984
|
-
const raw =
|
|
26984
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
26985
26985
|
const parsed = JSON5.parse(raw);
|
|
26986
26986
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
26987
26987
|
} catch {}
|
|
@@ -41166,7 +41166,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
41166
41166
|
}
|
|
41167
41167
|
function ensureDir$1(filePath) {
|
|
41168
41168
|
const dir = path.dirname(filePath);
|
|
41169
|
-
|
|
41169
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
41170
41170
|
}
|
|
41171
41171
|
function coerceAllowlistEntries(allowlist) {
|
|
41172
41172
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -41236,11 +41236,11 @@ function generateToken() {
|
|
|
41236
41236
|
function loadExecApprovals() {
|
|
41237
41237
|
const filePath = resolveExecApprovalsPath();
|
|
41238
41238
|
try {
|
|
41239
|
-
if (!
|
|
41239
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
41240
41240
|
version: 1,
|
|
41241
41241
|
agents: {}
|
|
41242
41242
|
});
|
|
41243
|
-
const raw =
|
|
41243
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
41244
41244
|
const parsed = JSON.parse(raw);
|
|
41245
41245
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
41246
41246
|
version: 1,
|
|
@@ -41257,9 +41257,9 @@ function loadExecApprovals() {
|
|
|
41257
41257
|
function saveExecApprovals(file) {
|
|
41258
41258
|
const filePath = resolveExecApprovalsPath();
|
|
41259
41259
|
ensureDir$1(filePath);
|
|
41260
|
-
|
|
41260
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
41261
41261
|
try {
|
|
41262
|
-
|
|
41262
|
+
syncFs.chmodSync(filePath, 384);
|
|
41263
41263
|
} catch {}
|
|
41264
41264
|
}
|
|
41265
41265
|
function ensureExecApprovals() {
|
|
@@ -41848,18 +41848,18 @@ function drainSystemEventEntries(sessionKey) {
|
|
|
41848
41848
|
function resolvePowerShellPath() {
|
|
41849
41849
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
41850
41850
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
41851
|
-
if (
|
|
41851
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
41852
41852
|
const programW6432 = process.env.ProgramW6432;
|
|
41853
41853
|
if (programW6432 && programW6432 !== programFiles) {
|
|
41854
41854
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
41855
|
-
if (
|
|
41855
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
41856
41856
|
}
|
|
41857
41857
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
41858
41858
|
if (pwshInPath) return pwshInPath;
|
|
41859
41859
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
41860
41860
|
if (systemRoot) {
|
|
41861
41861
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
41862
|
-
if (
|
|
41862
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
41863
41863
|
}
|
|
41864
41864
|
return "powershell.exe";
|
|
41865
41865
|
}
|
|
@@ -41897,7 +41897,7 @@ function resolveShellFromPath(name) {
|
|
|
41897
41897
|
for (const entry of entries) {
|
|
41898
41898
|
const candidate = path.join(entry, name);
|
|
41899
41899
|
try {
|
|
41900
|
-
|
|
41900
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
41901
41901
|
return candidate;
|
|
41902
41902
|
} catch {}
|
|
41903
41903
|
}
|
|
@@ -43356,9 +43356,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
43356
43356
|
function loadCatalogEntriesFromPaths(paths) {
|
|
43357
43357
|
const entries = [];
|
|
43358
43358
|
for (const resolved of paths) {
|
|
43359
|
-
if (!
|
|
43359
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
43360
43360
|
try {
|
|
43361
|
-
const payload = JSON.parse(
|
|
43361
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
43362
43362
|
entries.push(...parseCatalogEntries(payload));
|
|
43363
43363
|
} catch {}
|
|
43364
43364
|
}
|
|
@@ -46419,17 +46419,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
46419
46419
|
} catch {
|
|
46420
46420
|
return;
|
|
46421
46421
|
}
|
|
46422
|
-
if (!
|
|
46422
|
+
if (!syncFs.existsSync(logPath)) return;
|
|
46423
46423
|
try {
|
|
46424
46424
|
const TAIL_BYTES = 8192;
|
|
46425
|
-
const stat =
|
|
46425
|
+
const stat = syncFs.statSync(logPath);
|
|
46426
46426
|
const offset = Math.max(0, stat.size - TAIL_BYTES);
|
|
46427
46427
|
const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
|
|
46428
|
-
const fd =
|
|
46428
|
+
const fd = syncFs.openSync(logPath, "r");
|
|
46429
46429
|
try {
|
|
46430
|
-
|
|
46430
|
+
syncFs.readSync(fd, buf, 0, buf.length, offset);
|
|
46431
46431
|
} finally {
|
|
46432
|
-
|
|
46432
|
+
syncFs.closeSync(fd);
|
|
46433
46433
|
}
|
|
46434
46434
|
const tail = buf.toString("utf-8");
|
|
46435
46435
|
const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
|
|
@@ -52867,9 +52867,9 @@ function resolvePatchFileOps(options) {
|
|
|
52867
52867
|
});
|
|
52868
52868
|
assertBoundaryRead(opened, filePath);
|
|
52869
52869
|
try {
|
|
52870
|
-
return
|
|
52870
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
52871
52871
|
} finally {
|
|
52872
|
-
|
|
52872
|
+
syncFs.closeSync(opened.fd);
|
|
52873
52873
|
}
|
|
52874
52874
|
},
|
|
52875
52875
|
writeFile: async (filePath, content) => {
|
|
@@ -53526,7 +53526,7 @@ function isModuleNotFoundError(err) {
|
|
|
53526
53526
|
}
|
|
53527
53527
|
async function loadPwAiModule(mode) {
|
|
53528
53528
|
try {
|
|
53529
|
-
return await import("./pw-ai-
|
|
53529
|
+
return await import("./pw-ai-CM1mw9Kc.js");
|
|
53530
53530
|
} catch (err) {
|
|
53531
53531
|
if (mode === "soft") return null;
|
|
53532
53532
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -53617,11 +53617,11 @@ async function movePathToTrash(targetPath) {
|
|
|
53617
53617
|
return targetPath;
|
|
53618
53618
|
} catch {
|
|
53619
53619
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
53620
|
-
|
|
53620
|
+
syncFs.mkdirSync(trashDir, { recursive: true });
|
|
53621
53621
|
const base = path.basename(targetPath);
|
|
53622
53622
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
53623
|
-
if (
|
|
53624
|
-
|
|
53623
|
+
if (syncFs.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${generateSecureToken(6)}`);
|
|
53624
|
+
syncFs.renameSync(targetPath, dest);
|
|
53625
53625
|
return dest;
|
|
53626
53626
|
}
|
|
53627
53627
|
}
|
|
@@ -53920,13 +53920,13 @@ function createProfileContext(opts, profile) {
|
|
|
53920
53920
|
const userDataDir = resolveFasedAgentUserDataDir(profile.name);
|
|
53921
53921
|
const profileState = getProfileState();
|
|
53922
53922
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
53923
|
-
await (await import("./pw-ai-
|
|
53923
|
+
await (await import("./pw-ai-CM1mw9Kc.js")).closePlaywrightBrowserConnection();
|
|
53924
53924
|
} catch {}
|
|
53925
53925
|
if (profileState.running) await stopRunningBrowser();
|
|
53926
53926
|
try {
|
|
53927
|
-
await (await import("./pw-ai-
|
|
53927
|
+
await (await import("./pw-ai-CM1mw9Kc.js")).closePlaywrightBrowserConnection();
|
|
53928
53928
|
} catch {}
|
|
53929
|
-
if (!
|
|
53929
|
+
if (!syncFs.existsSync(userDataDir)) return {
|
|
53930
53930
|
moved: false,
|
|
53931
53931
|
from: userDataDir
|
|
53932
53932
|
};
|
|
@@ -55631,7 +55631,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
55631
55631
|
} catch {}
|
|
55632
55632
|
const userDataDir = resolveFasedAgentUserDataDir(name);
|
|
55633
55633
|
const profileDir = path.dirname(userDataDir);
|
|
55634
|
-
if (
|
|
55634
|
+
if (syncFs.existsSync(profileDir)) {
|
|
55635
55635
|
await movePathToTrash(profileDir);
|
|
55636
55636
|
deleted = true;
|
|
55637
55637
|
}
|
|
@@ -57280,7 +57280,7 @@ function asBoolean(value) {
|
|
|
57280
57280
|
}
|
|
57281
57281
|
function resolveTempPathParts(opts) {
|
|
57282
57282
|
const tmpDir = opts.tmpDir ?? resolvePreferredFasedAgentTmpDir();
|
|
57283
|
-
if (!opts.tmpDir)
|
|
57283
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
57284
57284
|
recursive: true,
|
|
57285
57285
|
mode: 448
|
|
57286
57286
|
});
|
|
@@ -57346,7 +57346,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
57346
57346
|
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}`);
|
|
57347
57347
|
const body = res.body;
|
|
57348
57348
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
57349
|
-
const fileHandle = await fs$
|
|
57349
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
57350
57350
|
let bytes = 0;
|
|
57351
57351
|
let thrown;
|
|
57352
57352
|
try {
|
|
@@ -57365,7 +57365,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
57365
57365
|
await fileHandle.close();
|
|
57366
57366
|
}
|
|
57367
57367
|
if (thrown) {
|
|
57368
|
-
await fs$
|
|
57368
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
57369
57369
|
throw thrown;
|
|
57370
57370
|
}
|
|
57371
57371
|
return {
|
|
@@ -57375,7 +57375,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
57375
57375
|
}
|
|
57376
57376
|
async function writeBase64ToFile(filePath, base64) {
|
|
57377
57377
|
const buf = Buffer.from(base64, "base64");
|
|
57378
|
-
await fs$
|
|
57378
|
+
await fs$1.writeFile(filePath, buf);
|
|
57379
57379
|
return {
|
|
57380
57380
|
path: filePath,
|
|
57381
57381
|
bytes: buf.length
|
|
@@ -63375,8 +63375,8 @@ function resolveZaiApiKey() {
|
|
|
63375
63375
|
}
|
|
63376
63376
|
try {
|
|
63377
63377
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
63378
|
-
if (!
|
|
63379
|
-
const data = JSON.parse(
|
|
63378
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
63379
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
63380
63380
|
return data["z-ai"]?.access || data.zai?.access;
|
|
63381
63381
|
} catch {
|
|
63382
63382
|
return;
|
|
@@ -70005,7 +70005,7 @@ async function recordLoopOutcome(args) {
|
|
|
70005
70005
|
if (!args.ctx?.sessionKey) return;
|
|
70006
70006
|
try {
|
|
70007
70007
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-CexmAKza.js").then((n) => n.n);
|
|
70008
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
70008
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-6p0-ziTi.js");
|
|
70009
70009
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
70010
70010
|
sessionKey: args.ctx.sessionKey,
|
|
70011
70011
|
sessionId: args.ctx?.agentId
|
|
@@ -70026,8 +70026,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
70026
70026
|
const params = args.params;
|
|
70027
70027
|
if (args.ctx?.sessionKey) {
|
|
70028
70028
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-CexmAKza.js").then((n) => n.n);
|
|
70029
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
70030
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
70029
|
+
const { logToolLoopAction } = await import("./diagnostic-PXNTTbiu.js").then((n) => n.n);
|
|
70030
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-6p0-ziTi.js");
|
|
70031
70031
|
const sessionState = getDiagnosticSessionState({
|
|
70032
70032
|
sessionKey: args.ctx.sessionKey,
|
|
70033
70033
|
sessionId: args.ctx?.agentId
|
|
@@ -71819,7 +71819,7 @@ function resolveRepoRoot(params) {
|
|
|
71819
71819
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
71820
71820
|
if (configured) try {
|
|
71821
71821
|
const resolved = path.resolve(configured);
|
|
71822
|
-
if (
|
|
71822
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
71823
71823
|
} catch {}
|
|
71824
71824
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
71825
71825
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -72677,7 +72677,7 @@ async function buildContextReply(params) {
|
|
|
72677
72677
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
72678
72678
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
72679
72679
|
function loadTemplate(fileName) {
|
|
72680
|
-
return
|
|
72680
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
72681
72681
|
}
|
|
72682
72682
|
function generateHtml(sessionData) {
|
|
72683
72683
|
const template = loadTemplate("template.html");
|
|
@@ -72748,7 +72748,7 @@ function writeNewDefaultExportFile(filePath, html) {
|
|
|
72748
72748
|
for (let suffix = 1; suffix <= 100; suffix++) {
|
|
72749
72749
|
const candidate = suffix === 1 ? filePath : addCollisionSuffix(filePath, suffix);
|
|
72750
72750
|
try {
|
|
72751
|
-
|
|
72751
|
+
syncFs.writeFileSync(candidate, html, {
|
|
72752
72752
|
encoding: "utf-8",
|
|
72753
72753
|
flag: "wx"
|
|
72754
72754
|
});
|
|
@@ -72775,7 +72775,7 @@ async function buildExportSessionReply(params) {
|
|
|
72775
72775
|
} catch (err) {
|
|
72776
72776
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
72777
72777
|
}
|
|
72778
|
-
if (!
|
|
72778
|
+
if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
72779
72779
|
const sessionManager = SessionManager.open(sessionFile);
|
|
72780
72780
|
const entries = sessionManager.getEntries();
|
|
72781
72781
|
const header = sessionManager.getHeader();
|
|
@@ -72796,8 +72796,8 @@ async function buildExportSessionReply(params) {
|
|
|
72796
72796
|
const defaultFileName = `fased-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
72797
72797
|
let outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
72798
72798
|
const outputDir = path.dirname(outputPath);
|
|
72799
|
-
if (!
|
|
72800
|
-
if (args.outputPath)
|
|
72799
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
72800
|
+
if (args.outputPath) syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
72801
72801
|
else outputPath = writeNewDefaultExportFile(outputPath, html);
|
|
72802
72802
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
72803
72803
|
return { text: [
|
|
@@ -73791,7 +73791,7 @@ function shouldPersistAnyBindingState() {
|
|
|
73791
73791
|
}
|
|
73792
73792
|
function shouldPersistBindingMutations() {
|
|
73793
73793
|
if (shouldPersistAnyBindingState()) return true;
|
|
73794
|
-
return
|
|
73794
|
+
return syncFs.existsSync(resolveThreadBindingsPath());
|
|
73795
73795
|
}
|
|
73796
73796
|
function saveBindingsToDisk(params = {}) {
|
|
73797
73797
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -74660,7 +74660,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
74660
74660
|
totals.totalCost += costTotal;
|
|
74661
74661
|
};
|
|
74662
74662
|
async function* readJsonlRecords(filePath) {
|
|
74663
|
-
const fileStream =
|
|
74663
|
+
const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
|
|
74664
74664
|
const rl = readline.createInterface({
|
|
74665
74665
|
input: fileStream,
|
|
74666
74666
|
crlfDelay: Infinity
|
|
@@ -74732,10 +74732,10 @@ async function loadCostUsageSummary(params) {
|
|
|
74732
74732
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
74733
74733
|
const totals = emptyTotals();
|
|
74734
74734
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
74735
|
-
const entries = await
|
|
74735
|
+
const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
74736
74736
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
74737
74737
|
const filePath = path.join(sessionsDir, entry.name);
|
|
74738
|
-
const stats = await
|
|
74738
|
+
const stats = await syncFs.promises.stat(filePath).catch(() => null);
|
|
74739
74739
|
if (!stats) return null;
|
|
74740
74740
|
if (stats.mtimeMs < sinceTime) return null;
|
|
74741
74741
|
return filePath;
|
|
@@ -74768,7 +74768,7 @@ async function loadCostUsageSummary(params) {
|
|
|
74768
74768
|
}
|
|
74769
74769
|
async function loadSessionCostSummary(params) {
|
|
74770
74770
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
74771
|
-
if (!sessionFile || !
|
|
74771
|
+
if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
|
|
74772
74772
|
const totals = emptyTotals();
|
|
74773
74773
|
let firstActivity;
|
|
74774
74774
|
let lastActivity;
|
|
@@ -76540,7 +76540,7 @@ async function createModelSelectionState(params) {
|
|
|
76540
76540
|
}
|
|
76541
76541
|
}
|
|
76542
76542
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
76543
|
-
const { ensureAuthProfileStore } = await import("./agent-scope-
|
|
76543
|
+
const { ensureAuthProfileStore } = await import("./agent-scope-T2X-I1lP.js").then((n) => n.Nr);
|
|
76544
76544
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
76545
76545
|
const providerKey = normalizeProviderId$1(provider);
|
|
76546
76546
|
if (!profile || normalizeProviderId$1(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -79374,7 +79374,7 @@ async function resolveFasedAgentDocsPath(params) {
|
|
|
79374
79374
|
const workspaceDir = params.workspaceDir?.trim();
|
|
79375
79375
|
if (workspaceDir) {
|
|
79376
79376
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
79377
|
-
if (
|
|
79377
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
79378
79378
|
}
|
|
79379
79379
|
const packageRoot = await resolveFasedAgentPackageRoot({
|
|
79380
79380
|
cwd: params.cwd,
|
|
@@ -79383,7 +79383,7 @@ async function resolveFasedAgentDocsPath(params) {
|
|
|
79383
79383
|
});
|
|
79384
79384
|
if (!packageRoot) return null;
|
|
79385
79385
|
const packageDocs = path.join(packageRoot, "docs");
|
|
79386
|
-
return
|
|
79386
|
+
return syncFs.existsSync(packageDocs) ? packageDocs : null;
|
|
79387
79387
|
}
|
|
79388
79388
|
|
|
79389
79389
|
//#endregion
|
|
@@ -80570,7 +80570,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
80570
80570
|
if (corruptedSessionId) {
|
|
80571
80571
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
80572
80572
|
try {
|
|
80573
|
-
|
|
80573
|
+
syncFs.unlinkSync(transcriptPath);
|
|
80574
80574
|
} catch {}
|
|
80575
80575
|
}
|
|
80576
80576
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -81348,9 +81348,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
81348
81348
|
* Returns messages from the last N lines (default 100).
|
|
81349
81349
|
*/
|
|
81350
81350
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
81351
|
-
if (!
|
|
81351
|
+
if (!syncFs.existsSync(sessionFile)) return [];
|
|
81352
81352
|
try {
|
|
81353
|
-
const recentLines =
|
|
81353
|
+
const recentLines = syncFs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
81354
81354
|
const messages = [];
|
|
81355
81355
|
for (const line of recentLines) try {
|
|
81356
81356
|
const entry = JSON.parse(line);
|
|
@@ -81391,8 +81391,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
81391
81391
|
async function readPostCompactionContext(workspaceDir) {
|
|
81392
81392
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
81393
81393
|
try {
|
|
81394
|
-
if (!
|
|
81395
|
-
const sections = extractSections(await
|
|
81394
|
+
if (!syncFs.existsSync(agentsPath)) return null;
|
|
81395
|
+
const sections = extractSections(await syncFs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
81396
81396
|
if (sections.length === 0) return null;
|
|
81397
81397
|
const combined = sections.join("\n\n");
|
|
81398
81398
|
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);
|
|
@@ -81698,7 +81698,7 @@ async function runReplyAgent(params) {
|
|
|
81698
81698
|
if (resolved) transcriptCandidates.add(resolved);
|
|
81699
81699
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
81700
81700
|
for (const candidate of transcriptCandidates) try {
|
|
81701
|
-
|
|
81701
|
+
syncFs.unlinkSync(candidate);
|
|
81702
81702
|
} catch {}
|
|
81703
81703
|
}
|
|
81704
81704
|
return true;
|
|
@@ -82781,7 +82781,7 @@ function forkSessionFromParent(params) {
|
|
|
82781
82781
|
agentId: params.agentId,
|
|
82782
82782
|
sessionsDir: params.sessionsDir
|
|
82783
82783
|
});
|
|
82784
|
-
if (!parentSessionFile || !
|
|
82784
|
+
if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
|
|
82785
82785
|
try {
|
|
82786
82786
|
const manager = SessionManager.open(parentSessionFile);
|
|
82787
82787
|
const leafId = manager.getLeafId();
|
|
@@ -82805,7 +82805,7 @@ function forkSessionFromParent(params) {
|
|
|
82805
82805
|
cwd: manager.getCwd(),
|
|
82806
82806
|
parentSession: parentSessionFile
|
|
82807
82807
|
};
|
|
82808
|
-
|
|
82808
|
+
syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
82809
82809
|
return {
|
|
82810
82810
|
sessionId,
|
|
82811
82811
|
sessionFile
|
|
@@ -87863,7 +87863,7 @@ function createWhatsAppLoginTool() {
|
|
|
87863
87863
|
force: Type.Optional(Type.Boolean())
|
|
87864
87864
|
}),
|
|
87865
87865
|
execute: async (_toolCallId, args) => {
|
|
87866
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
87866
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DMxUP87H.js");
|
|
87867
87867
|
if ((args?.action ?? "start") === "wait") {
|
|
87868
87868
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
87869
87869
|
return {
|
|
@@ -88925,7 +88925,7 @@ function kindFromStats(stat) {
|
|
|
88925
88925
|
async function backupTarget(entry) {
|
|
88926
88926
|
const beforeState = await inspectPath(entry.targetPath);
|
|
88927
88927
|
if (beforeState.kind === "file") {
|
|
88928
|
-
await fs.copyFile(entry.targetPath, entry.snapshotPath,
|
|
88928
|
+
await fs.copyFile(entry.targetPath, entry.snapshotPath, syncFs.constants.COPYFILE_EXCL);
|
|
88929
88929
|
return {
|
|
88930
88930
|
proposalId: entry.proposalId,
|
|
88931
88931
|
action: entry.action,
|
|
@@ -89336,7 +89336,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
89336
89336
|
}
|
|
89337
89337
|
async function checkReadableFile(pathname) {
|
|
89338
89338
|
try {
|
|
89339
|
-
await fs.access(pathname,
|
|
89339
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
89340
89340
|
return { exists: true };
|
|
89341
89341
|
} catch (err) {
|
|
89342
89342
|
const code = err.code;
|
|
@@ -89395,7 +89395,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
89395
89395
|
}
|
|
89396
89396
|
let dirReadable = null;
|
|
89397
89397
|
try {
|
|
89398
|
-
await fs.access(memoryDir,
|
|
89398
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
89399
89399
|
dirReadable = true;
|
|
89400
89400
|
} catch (err) {
|
|
89401
89401
|
const code = err.code;
|
|
@@ -91720,7 +91720,7 @@ async function preflightDiscordMessage(params) {
|
|
|
91720
91720
|
let preflightTranscript;
|
|
91721
91721
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
91722
91722
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
91723
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
91723
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CwheEXYS.js");
|
|
91724
91724
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
91725
91725
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
91726
91726
|
ctx: {
|
|
@@ -99017,7 +99017,7 @@ async function waitForTransportReady(params) {
|
|
|
99017
99017
|
|
|
99018
99018
|
//#endregion
|
|
99019
99019
|
//#region src/brand.ts
|
|
99020
|
-
const FASED_PRODUCT_VERSION = "0.1.
|
|
99020
|
+
const FASED_PRODUCT_VERSION = "0.1.12";
|
|
99021
99021
|
const FASED_DISPLAY_VERSION = `v${FASED_PRODUCT_VERSION}`;
|
|
99022
99022
|
|
|
99023
99023
|
//#endregion
|
|
@@ -99983,7 +99983,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
99983
99983
|
function readFileIfExists(filePath) {
|
|
99984
99984
|
if (!filePath) return;
|
|
99985
99985
|
try {
|
|
99986
|
-
return
|
|
99986
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
99987
99987
|
} catch {
|
|
99988
99988
|
return;
|
|
99989
99989
|
}
|
|
@@ -100575,7 +100575,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
100575
100575
|
prefix: "line-media",
|
|
100576
100576
|
extension: getExtensionForContentType(contentType)
|
|
100577
100577
|
});
|
|
100578
|
-
await
|
|
100578
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
100579
100579
|
logVerbose(`line: downloaded media ${formatLineIdForLog(messageId)} to ${filePath} (${buffer.length} bytes)`);
|
|
100580
100580
|
return {
|
|
100581
100581
|
path: filePath,
|
|
@@ -105719,7 +105719,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
105719
105719
|
}
|
|
105720
105720
|
let commandsRegistry;
|
|
105721
105721
|
async function getCommandsRegistry() {
|
|
105722
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
105722
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CwvSkARW.js").then((n) => n.n);
|
|
105723
105723
|
return commandsRegistry;
|
|
105724
105724
|
}
|
|
105725
105725
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -106043,14 +106043,14 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
106043
106043
|
const channelName = channelInfo?.name;
|
|
106044
106044
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
106045
106045
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
106046
|
-
import("./resolve-route-
|
|
106046
|
+
import("./resolve-route-DyTOJJs4.js").then((n) => n.r),
|
|
106047
106047
|
import("./inbound-context-B0OuvpCZ.js").then((n) => n.n),
|
|
106048
106048
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
106049
106049
|
]);
|
|
106050
106050
|
const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordSessionMetaFromInbound, resolveStorePath }] = await Promise.all([
|
|
106051
106051
|
import("./conversation-label-BNq0hhpR.js").then((n) => n.t),
|
|
106052
|
-
import("./reply-prefix-
|
|
106053
|
-
import("./agent-scope-
|
|
106052
|
+
import("./reply-prefix-BM90m-1s.js").then((n) => n.n),
|
|
106053
|
+
import("./agent-scope-T2X-I1lP.js").then((n) => n.W)
|
|
106054
106054
|
]);
|
|
106055
106055
|
const route = resolveAgentRoute({
|
|
106056
106056
|
cfg,
|
|
@@ -106118,9 +106118,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
106118
106118
|
});
|
|
106119
106119
|
const deliverSlashPayloads = async (replies) => {
|
|
106120
106120
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
106121
|
-
import("./replies-
|
|
106122
|
-
import("./chunk-
|
|
106123
|
-
import("./markdown-tables-
|
|
106121
|
+
import("./replies-lgWzXlwM.js").then((n) => n.r),
|
|
106122
|
+
import("./chunk-Q3WlKwcl.js").then((n) => n.s),
|
|
106123
|
+
import("./markdown-tables-QOHpjP76.js").then((n) => n.t)
|
|
106124
106124
|
]);
|
|
106125
106125
|
await deliverSlackSlashReplies({
|
|
106126
106126
|
replies,
|
|
@@ -106173,7 +106173,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
106173
106173
|
let nativeCommands = [];
|
|
106174
106174
|
if (nativeEnabled) {
|
|
106175
106175
|
reg = await getCommandsRegistry();
|
|
106176
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
106176
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-D_QLBtje.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
106177
106177
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
106178
106178
|
skillCommands,
|
|
106179
106179
|
provider: "slack"
|
|
@@ -108640,7 +108640,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
108640
108640
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
108641
108641
|
let preflightTranscript;
|
|
108642
108642
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
108643
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
108643
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CwheEXYS.js");
|
|
108644
108644
|
preflightTranscript = await transcribeFirstAudio({
|
|
108645
108645
|
ctx: {
|
|
108646
108646
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -111254,23 +111254,23 @@ let webLoginQrPromise = null;
|
|
|
111254
111254
|
let webChannelPromise = null;
|
|
111255
111255
|
let whatsappActionsPromise = null;
|
|
111256
111256
|
function loadWebOutbound() {
|
|
111257
|
-
webOutboundPromise ??= import("./outbound-
|
|
111257
|
+
webOutboundPromise ??= import("./outbound-nrqaUQPn.js").then((n) => n.t);
|
|
111258
111258
|
return webOutboundPromise;
|
|
111259
111259
|
}
|
|
111260
111260
|
function loadWebLogin() {
|
|
111261
|
-
webLoginPromise ??= import("./login-
|
|
111261
|
+
webLoginPromise ??= import("./login-C4KKxuM4.js").then((n) => n.n);
|
|
111262
111262
|
return webLoginPromise;
|
|
111263
111263
|
}
|
|
111264
111264
|
function loadWebLoginQr() {
|
|
111265
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
111265
|
+
webLoginQrPromise ??= import("./login-qr-DMxUP87H.js");
|
|
111266
111266
|
return webLoginQrPromise;
|
|
111267
111267
|
}
|
|
111268
111268
|
function loadWebChannel() {
|
|
111269
|
-
webChannelPromise ??= import("./web-
|
|
111269
|
+
webChannelPromise ??= import("./web-Cp2B8UG5.js");
|
|
111270
111270
|
return webChannelPromise;
|
|
111271
111271
|
}
|
|
111272
111272
|
function loadWhatsAppActions() {
|
|
111273
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
111273
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-BAux9gs7.js");
|
|
111274
111274
|
return whatsappActionsPromise;
|
|
111275
111275
|
}
|
|
111276
111276
|
function createPluginRuntime(options = {}) {
|
|
@@ -111501,7 +111501,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
111501
111501
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
111502
111502
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
111503
111503
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
111504
|
-
for (const candidate of orderedCandidates) if (
|
|
111504
|
+
for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
|
|
111505
111505
|
const parent = path.dirname(cursor);
|
|
111506
111506
|
if (parent === cursor) break;
|
|
111507
111507
|
cursor = parent;
|
|
@@ -111893,7 +111893,7 @@ function loadFasedAgentPlugins(options = {}) {
|
|
|
111893
111893
|
continue;
|
|
111894
111894
|
}
|
|
111895
111895
|
const safeSource = opened.path;
|
|
111896
|
-
|
|
111896
|
+
syncFs.closeSync(opened.fd);
|
|
111897
111897
|
let mod = null;
|
|
111898
111898
|
try {
|
|
111899
111899
|
mod = getJiti()(safeSource);
|
|
@@ -112030,7 +112030,7 @@ function loadFasedAgentPlugins(options = {}) {
|
|
|
112030
112030
|
}
|
|
112031
112031
|
function safeRealpathOrResolve(value) {
|
|
112032
112032
|
try {
|
|
112033
|
-
return
|
|
112033
|
+
return syncFs.realpathSync(value);
|
|
112034
112034
|
} catch {
|
|
112035
112035
|
return path.resolve(value);
|
|
112036
112036
|
}
|
|
@@ -113189,7 +113189,7 @@ const log$7 = createSubsystemLogger("model-catalog");
|
|
|
113189
113189
|
let modelCatalogPromise = null;
|
|
113190
113190
|
let hasLoggedModelCatalogError = false;
|
|
113191
113191
|
let hasLoggedProviderCatalogError = false;
|
|
113192
|
-
const defaultImportPiSdk = () => import("./pi-model-discovery-
|
|
113192
|
+
const defaultImportPiSdk = () => import("./pi-model-discovery-B1-QPAbn.js").then((n) => n.a);
|
|
113193
113193
|
let importPiSdk = defaultImportPiSdk;
|
|
113194
113194
|
const CODEX_PROVIDER = "openai-codex";
|
|
113195
113195
|
const OPENAI_PROVIDER = "openai";
|
|
@@ -116471,7 +116471,7 @@ var SandboxFsBridgeImpl = class {
|
|
|
116471
116471
|
});
|
|
116472
116472
|
if (!guarded.ok) {
|
|
116473
116473
|
if (guarded.reason !== "path" || options.allowMissingTarget === false) throw guarded.error instanceof Error ? guarded.error : /* @__PURE__ */ new Error(`Sandbox boundary checks failed; cannot ${options.action}: ${target.containerPath}`);
|
|
116474
|
-
} else
|
|
116474
|
+
} else syncFs.closeSync(guarded.fd);
|
|
116475
116475
|
const canonicalContainerPath = await this.resolveCanonicalContainerPath({
|
|
116476
116476
|
containerPath: target.containerPath,
|
|
116477
116477
|
allowFinalSymlinkForUnlink: options.aliasPolicy?.allowFinalSymlinkForUnlink === true
|
|
@@ -118010,7 +118010,7 @@ function buildEmbeddedPiSettingsSnapshot(params) {
|
|
|
118010
118010
|
}
|
|
118011
118011
|
function readJsonFile(filePath) {
|
|
118012
118012
|
try {
|
|
118013
|
-
const raw =
|
|
118013
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
118014
118014
|
const parsed = JSON.parse(raw);
|
|
118015
118015
|
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
118016
118016
|
} catch {
|
|
@@ -118028,7 +118028,7 @@ function loadEnabledBundlePiSettingsSnapshot(params) {
|
|
|
118028
118028
|
const servers = mcp.mcpServers && typeof mcp.mcpServers === "object" && !Array.isArray(mcp.mcpServers) ? mcp.mcpServers : void 0;
|
|
118029
118029
|
if (servers) {
|
|
118030
118030
|
const resolvedServers = {};
|
|
118031
|
-
const resolvedRoot =
|
|
118031
|
+
const resolvedRoot = syncFs.realpathSync.native?.(pluginRoot) ?? syncFs.realpathSync(pluginRoot);
|
|
118032
118032
|
for (const [name, server] of Object.entries(servers)) {
|
|
118033
118033
|
if (!server || typeof server !== "object" || Array.isArray(server)) {
|
|
118034
118034
|
resolvedServers[name] = server;
|
|
@@ -119409,8 +119409,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
119409
119409
|
const workspaceDir = process.cwd();
|
|
119410
119410
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
119411
119411
|
try {
|
|
119412
|
-
if (!
|
|
119413
|
-
const sections = extractSections(await
|
|
119412
|
+
if (!syncFs.existsSync(agentsPath)) return "";
|
|
119413
|
+
const sections = extractSections(await syncFs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
119414
119414
|
if (sections.length === 0) return "";
|
|
119415
119415
|
const combined = sections.join("\n\n");
|
|
119416
119416
|
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>`;
|
|
@@ -120786,7 +120786,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
120786
120786
|
});
|
|
120787
120787
|
if (!apiKeyInfo.apiKey) throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
120788
120788
|
else if (model.provider === "github-copilot") {
|
|
120789
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
120789
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-eyrRGmGp.js").then((n) => n.n);
|
|
120790
120790
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
120791
120791
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
120792
120792
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -122130,8 +122130,8 @@ function readBundleMcpFile(params) {
|
|
|
122130
122130
|
const filePath = path.resolve(rootDir, params.fileName);
|
|
122131
122131
|
const relative = path.relative(rootDir, filePath);
|
|
122132
122132
|
if (relative.startsWith("..") || path.isAbsolute(relative)) return {};
|
|
122133
|
-
if (!
|
|
122134
|
-
const servers = extractMcpServerMap(JSON.parse(
|
|
122133
|
+
if (!syncFs.existsSync(filePath)) return {};
|
|
122134
|
+
const servers = extractMcpServerMap(JSON.parse(syncFs.readFileSync(filePath, "utf-8")));
|
|
122135
122135
|
const baseDir = path.dirname(filePath);
|
|
122136
122136
|
return Object.fromEntries(Object.entries(servers).map(([serverName, server]) => [serverName, absolutizeBundleMcpServer({
|
|
122137
122137
|
rootDir,
|
|
@@ -122158,7 +122158,7 @@ function loadEnabledBundleMcpConfig(params) {
|
|
|
122158
122158
|
cfg: params.cfg,
|
|
122159
122159
|
pluginId
|
|
122160
122160
|
})) {
|
|
122161
|
-
if (!
|
|
122161
|
+
if (!syncFs.existsSync(rootDir)) continue;
|
|
122162
122162
|
for (const fileName of BUNDLE_MCP_FILENAMES) try {
|
|
122163
122163
|
Object.assign(mcpServers, readBundleMcpFile({
|
|
122164
122164
|
rootDir,
|
|
@@ -123163,11 +123163,11 @@ function appendRawStream(payload) {
|
|
|
123163
123163
|
if (!rawStreamReady) {
|
|
123164
123164
|
rawStreamReady = true;
|
|
123165
123165
|
try {
|
|
123166
|
-
|
|
123166
|
+
syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
123167
123167
|
} catch {}
|
|
123168
123168
|
}
|
|
123169
123169
|
try {
|
|
123170
|
-
|
|
123170
|
+
syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
123171
123171
|
} catch {}
|
|
123172
123172
|
}
|
|
123173
123173
|
|
|
@@ -126633,7 +126633,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
126633
126633
|
apiKeyInfo = await resolveApiKeyForCandidate(candidate);
|
|
126634
126634
|
if (!apiKeyInfo.apiKey) throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
126635
126635
|
if (model.provider === "github-copilot") {
|
|
126636
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
126636
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-eyrRGmGp.js").then((n) => n.n);
|
|
126637
126637
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
126638
126638
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
126639
126639
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|