squidclaw 3.0.23 → 3.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-KzgPbLHP.js → accounts-B1RxFghM.js} +1 -1
- package/dist/{accounts-BK8I0Svb.js → accounts-BH9Qo1sQ.js} +7 -7
- package/dist/{accounts-s5e9zidf.js → accounts-C7pGQPcS.js} +2 -2
- package/dist/{accounts-DeqNOvBo.js → accounts-Cuwg9Tan.js} +1 -1
- package/dist/{accounts-Bkb-J8V6.js → accounts-DjhBQg_8.js} +2 -2
- package/dist/{accounts-B6F_XCgS.js → accounts-DwGoZKGm.js} +17 -17
- package/dist/{acp-cli-BwG98FYT.js → acp-cli-Ch55Vzud.js} +8 -8
- package/dist/{active-listener-6-Svu8Dx.js → active-listener-DPc_PGsA.js} +2 -2
- package/dist/{agent-scope-Cq4vDGrK.js → agent-scope-nEVgVklg.js} +17 -17
- package/dist/{agents-DXKtU4Il.js → agents-B-ig6ydU.js} +14 -14
- package/dist/{agents.config-BM-2SLCh.js → agents.config-w_Z6Fb4-.js} +2 -2
- package/dist/{api-key-rotation-TRwuCWbu.js → api-key-rotation-DVyYtQxC.js} +2 -2
- package/dist/{api-key-rotation-6i41mEc9.js → api-key-rotation-JPmjv-c0.js} +1 -1
- package/dist/{audio-preflight-1KULThhV.js → audio-preflight-BUCBED7N.js} +32 -32
- package/dist/{audio-preflight-C-JCwUKe.js → audio-preflight-CZ--cSZh.js} +34 -34
- package/dist/{audio-transcription-runner-C3N9eAGM.js → audio-transcription-runner-Cv0Q47cM.js} +12 -12
- package/dist/{audio-transcription-runner-DvQksGUE.js → audio-transcription-runner-D-uxpkbd.js} +23 -23
- package/dist/{audit-DLTgNDFw.js → audit-JLT1FqTt.js} +29 -29
- package/dist/{audit-membership-runtime-w23FnNAN.js → audit-membership-runtime-DyLj-uhz.js} +4 -4
- package/dist/{auth-CuObxnC4.js → auth-BlP9BwaD.js} +1 -1
- package/dist/{auth-choice-BVQQneHM.js → auth-choice-Czu7271G.js} +13 -13
- package/dist/{auth-choice-CXepQc7c.js → auth-choice-ORZHjbsv.js} +11 -11
- package/dist/{auth-choice.apply-helpers-p1y_DmDT.js → auth-choice.apply-helpers-CdoXMtxm.js} +1 -1
- package/dist/{auth-profiles-CX4YYu7Z.js → auth-profiles-9T4j6jMy.js} +16 -16
- package/dist/{auth-token-Dlk7MMsC.js → auth-token-BFc70pes.js} +1 -1
- package/dist/{banner-DMfuBV69.js → banner-CwNmI5G-.js} +2 -2
- package/dist/{bonjour-discovery-BHz2I6_W.js → bonjour-discovery-eqJcK09r.js} +1 -1
- package/dist/{browser-cli-Dvwk4zAD.js → browser-cli-DCDPC5sg.js} +12 -12
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +59 -61
- package/dist/{call-BlWEBz99.js → call-D7jOWSFr.js} +10 -10
- package/dist/{channel-account-context-CQ6rCiGI.js → channel-account-context-DJ3rHgVO.js} +5 -5
- package/dist/{channel-activity-CxJbx4sD.js → channel-activity-CPpt4XaL.js} +3 -3
- package/dist/{channel-activity-BZKeZQH-.js → channel-activity-wuB3-cfR.js} +1 -1
- package/dist/{channel-options-CQ-gER0J.js → channel-options-BS7BSU_5.js} +3 -3
- package/dist/{channel-selection-BqwS1Rlq.js → channel-selection-CFWQq1nS.js} +1 -1
- package/dist/{channel-web-LLzBxZrT.js → channel-web-C1qYz-HK.js} +17 -17
- package/dist/{channels-cli-D4xUEYYC.js → channels-cli-CVNqp5q7.js} +93 -93
- package/dist/{channels-status-issues-Dz1_R7Ah.js → channels-status-issues-Erzzhl2e.js} +1 -1
- package/dist/{chrome-CoRiYsNu.js → chrome-DiktJpMU.js} +4 -4
- package/dist/{chrome-Qbvnl6so.js → chrome-OgCChbC_.js} +18 -18
- package/dist/{clawbot-cli-2Zlim_pH.js → clawbot-cli-C3bt-FEP.js} +11 -11
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-CAID9zkL.js → cli-Jyqv2jm8.js} +73 -73
- package/dist/{client-G9E5HGM2.js → client-COy24r9W.js} +2 -2
- package/dist/{command-registry-AHS8_9da.js → command-registry-DCojicSG.js} +11 -11
- package/dist/{command-secret-targets-DAu5nw-j.js → command-secret-targets-CZjP-Bm5.js} +4 -4
- package/dist/{commands-CnX9I_l4.js → commands-DDHiW-As.js} +1 -1
- package/dist/{commands-registry-_r_JONI4.js → commands-registry--ITOJ-cM.js} +3 -3
- package/dist/{commands-registry-B44COZFz.js → commands-registry-BJjv8_oR.js} +4 -4
- package/dist/{completion-cli-BR1r9_h4.js → completion-cli-DCTv7Ejv.js} +13 -13
- package/dist/{config-cli-D0A8Awoo.js → config-cli-CSPSSP_R.js} +7 -7
- package/dist/{config-guard-BHy2f0hU.js → config-guard-CFauJm79.js} +3 -3
- package/dist/{config-validation-BkvDORAk.js → config-validation-Bt3LfFJ0.js} +3 -3
- package/dist/{configure-XmOqwwy9.js → configure-DAol2gT6.js} +17 -17
- package/dist/{control-ui-assets-BYEy341x.js → control-ui-assets-d6VtDSeo.js} +1 -1
- package/dist/{cron-cli-QwZcnjJc.js → cron-cli-yS1ww1k2.js} +11 -11
- package/dist/{daemon-cli-kJfDhzr8.js → daemon-cli-B-yZvTqZ.js} +15 -15
- package/dist/{daemon-install-Chxlu9Kv.js → daemon-install-CbPLNiIP.js} +4 -4
- package/dist/{daemon-install-helpers-CJtiW2RE.js → daemon-install-helpers-CZDVO_MU.js} +11 -11
- package/dist/{deliver-CL2RW5UB.js → deliver-D-IQEJ52.js} +7 -7
- package/dist/{deliver-BC5egJvm.js → deliver-DMTUTpTM.js} +21 -21
- package/dist/deliver-runtime-B80olQwJ.js +36 -0
- package/dist/deliver-runtime-zICm26tE.js +61 -0
- package/dist/deps-send-discord.runtime-C_9HZQko.js +36 -0
- package/dist/deps-send-discord.runtime-GIuvX7Xw.js +26 -0
- package/dist/deps-send-imessage.runtime-B3TC7G80.js +25 -0
- package/dist/deps-send-imessage.runtime-BMhGsWds.js +35 -0
- package/dist/deps-send-signal.runtime-BGhjYiu6.js +34 -0
- package/dist/deps-send-signal.runtime-CuVJyw7n.js +24 -0
- package/dist/deps-send-slack.runtime-DjBCu-RX.js +32 -0
- package/dist/deps-send-slack.runtime-cbfFoLZ4.js +22 -0
- package/dist/deps-send-telegram.runtime-CRyP-xDQ.js +27 -0
- package/dist/{deps-send-telegram.runtime-BHaZAs2h.js → deps-send-telegram.runtime-Irv0ky5l.js} +16 -16
- package/dist/deps-send-whatsapp.runtime-4aOUBP2J.js +60 -0
- package/dist/deps-send-whatsapp.runtime-CU257URT.js +119 -0
- package/dist/{devices-cli-DlQGTogF.js → devices-cli-CPgutgUT.js} +8 -8
- package/dist/{diagnostic-CLEtu0MC.js → diagnostic-B4w80e4D.js} +1 -1
- package/dist/{diagnostic-C2lklhkn.js → diagnostic-CnVwZNbm.js} +2 -2
- package/dist/{diagnostics--O6mo6KH.js → diagnostics-m7hHHbuE.js} +5 -5
- package/dist/{directory-cli-K9qIwxYa.js → directory-cli-DqObADBL.js} +7 -7
- package/dist/{dns-cli-qtX-WNMF.js → dns-cli-CKbwsWBv.js} +5 -5
- package/dist/{dock-DJJAj46v.js → dock-W3cGg46W.js} +4 -4
- package/dist/{docs-cli--gGxz79Z.js → docs-cli-BpZtes_j.js} +4 -4
- package/dist/{doctor-completion-CZoEdMS-.js → doctor-completion--7PR_Vqz.js} +2 -2
- package/dist/{doctor-config-flow-C-h3yV4z.js → doctor-config-flow-BDF7TR6O.js} +15 -15
- package/dist/{enable-C8FNY18p.js → enable--Q7yLTZm.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{errors-DfgAh2Ml.js → errors-kkRuS2Cs.js} +1 -1
- package/dist/{exec-approvals-allowlist-CtSREgYh.js → exec-approvals-allowlist-B9bcJkGP.js} +1 -1
- package/dist/{exec-approvals-cli-BmM4RpVn.js → exec-approvals-cli-homtziYt.js} +16 -16
- package/dist/{exec-safe-bin-runtime-policy-CfQeDABF.js → exec-safe-bin-runtime-policy-DECo77U6.js} +2 -2
- package/dist/{fetch-b8tSR7_e.js → fetch-DP-JjB6Z.js} +5 -5
- package/dist/{fetch-guard-D16tjNsZ.js → fetch-guard-BDy975wP.js} +2 -2
- package/dist/{fetch-guard-Dvzi3MjK.js → fetch-guard-CbtWqa1E.js} +1 -1
- package/dist/{fetch-CtoC2wgs.js → fetch-lq0SDLLE.js} +3 -3
- package/dist/{frontmatter-CjKtFduT.js → frontmatter-Cq1TcIQ2.js} +3 -3
- package/dist/fs-safe-BPQ-per2.js +352 -0
- package/dist/{fs-safe-CwHbZdFH.js → fs-safe-BoB4X3GD.js} +4 -4
- package/dist/{gateway-cli-BJHBChfI.js → gateway-cli-B3oqskb4.js} +153 -153
- package/dist/{gateway-rpc-D0AmaBzR.js → gateway-rpc-BBBN9ZJk.js} +1 -1
- package/dist/{github-copilot-token-Cw3tAXM9.js → github-copilot-token-B5cPlwaz.js} +7 -7
- package/dist/{health-XFKFZ7ZJ.js → health-CjXrJkCb.js} +11 -11
- package/dist/{hooks-cli-CXsZK8H9.js → hooks-cli--aKmd8c9.js} +81 -81
- package/dist/{hooks-status-DMFBAUq8.js → hooks-status-BlgSVDvN.js} +1 -1
- package/dist/{image-DSWTfuxv.js → image-BcYt63Jx.js} +5 -5
- package/dist/{image-ByqExb8z.js → image-kKMG59st.js} +6 -6
- package/dist/{image-ops-BoN1E_WZ.js → image-ops-Dg8iraUV.js} +2 -2
- package/dist/{image-ops-B2uuLIGD.js → image-ops-LFsSCTyI.js} +10 -10
- package/dist/image-runtime-BqIv7p_K.js +29 -0
- package/dist/image-runtime-Cxoxcx04.js +55 -0
- package/dist/{inspect-4c1uL0x5.js → inspect-CzsXBsew.js} +4 -4
- package/dist/{install-safe-path-3muwy3fu.js → install-safe-path-DqI19VEv.js} +25 -25
- package/dist/{installs-BiQDtPF0.js → installs-P-pYAJm1.js} +9 -9
- package/dist/{ipv4-sHllwvAI.js → ipv4-B95173MB.js} +1 -1
- package/dist/{ir-BukzlgSp.js → ir-C7He5vmn.js} +8 -8
- package/dist/{ir-Dut0zXyS.js → ir-CKK03mBV.js} +8 -8
- package/dist/{issue-format-DCcINW-9.js → issue-format-CbTfB8Hy.js} +1 -1
- package/dist/{json-files-CuJjdF_0.js → json-files-rR19q30D.js} +8 -8
- package/dist/{legacy-names-B0wgIP0Q.js → legacy-names-aGJJuzM_.js} +1 -1
- package/dist/{lifecycle-core-CqFEhwHn.js → lifecycle-core-ChKClWdw.js} +5 -5
- package/dist/llm-slug-generator.js +51 -51
- package/dist/{logger-oGKcCLZ5.js → logger-CnTSBL7T.js} +7 -7
- package/dist/{login-DJ357UQV.js → login-CeKDrz6_.js} +5 -5
- package/dist/{login-zoeewfBu.js → login-CjzRATwO.js} +3 -3
- package/dist/{login-qr-B8P_EAd-.js → login-qr-CX0rs3A6.js} +6 -6
- package/dist/{login-qr-C0fDBnpM.js → login-qr-KbOpR0GQ.js} +10 -10
- package/dist/{logs-cli-D30BUN6y.js → logs-cli-DvHsw1WZ.js} +9 -9
- package/dist/{manager-5OzUkYLf.js → manager-BVfTfggO.js} +14 -14
- package/dist/{manager-BPGhs30n.js → manager-DINhLnMi.js} +13 -13
- package/dist/{manager-runtime-BxXpVt3x.js → manager-runtime-BXJJSlzC.js} +9 -9
- package/dist/manager-runtime-D6ckUNSs.js +18 -0
- package/dist/{manifest-registry-7kwtbCH-.js → manifest-registry-1ACGW3OR.js} +1 -1
- package/dist/{memory-cli-Dj8tyFtt.js → memory-cli-u8eyO3Ec.js} +12 -12
- package/dist/{model-B8p-EsdJ.js → model-D7hZpWTB.js} +2 -2
- package/dist/{model-catalog-BWuvEv1x.js → model-catalog-Drh9Rois.js} +3 -3
- package/dist/{model-picker-CLhaaagi.js → model-picker-DK_vvKCV.js} +4 -4
- package/dist/{model-selection-CHnojCCK.js → model-selection-DuNLFQPR.js} +43 -43
- package/dist/{models-5VXwJBU2.js → models-CFXLX9IF.js} +17 -17
- package/dist/{models-cli-Br56IHfy.js → models-cli-PHQyKESa.js} +78 -78
- package/dist/{models-config-poV-4Xlx.js → models-config-DAastTau.js} +6 -6
- package/dist/{net-CCnbGop3.js → net-CIh5ellr.js} +2 -2
- package/dist/{node-cli-C8hvYquX.js → node-cli-o9qcU9GJ.js} +33 -33
- package/dist/{node-command-policy-B_D5ucTj.js → node-command-policy-BeTSnoyk.js} +1 -1
- package/dist/{node-service-Z0JprJda.js → node-service-OVe0_CIs.js} +1 -1
- package/dist/{nodes-cli-IIc8fTKT.js → nodes-cli-kGx_Qa3c.js} +16 -16
- package/dist/{nodes-screen-DFFmbaXE.js → nodes-screen-BrMJzhot.js} +7 -7
- package/dist/{npm-pack-install-B887us7R.js → npm-pack-install-Dn3FiWXB.js} +18 -18
- package/dist/{npm-resolution-CKtyq4FH.js → npm-resolution-ky_uAlXE.js} +4 -4
- package/dist/{onboard-lFwpCpC3.js → onboard-D1Qy64JK.js} +6 -6
- package/dist/{onboard-channels-_kVo3Apf.js → onboard-channels-oJCC_sJX.js} +21 -21
- package/dist/{onboard-custom-CZtjqrY7.js → onboard-custom-CRpsaM3g.js} +4 -4
- package/dist/{onboard-helpers-BP429__H.js → onboard-helpers-DwEZeaoe.js} +10 -10
- package/dist/{onboard-hooks-CTbjgLDl.js → onboard-hooks-DyxckB2C.js} +4 -4
- package/dist/{onboard-remote-BlZB0AE9.js → onboard-remote-ZgpWNq9Z.js} +4 -4
- package/dist/{onboard-skills-BT2YOXeP.js → onboard-skills-DEijVfCg.js} +4 -4
- package/dist/{onboarding-EEd_g8Zg.js → onboarding-Mxqy4O1E.js} +14 -14
- package/dist/{onboarding.finalize-Cs1ukjFN.js → onboarding.finalize-DiOMx6A5.js} +90 -90
- package/dist/{onboarding.gateway-config-C6N8r5Is.js → onboarding.gateway-config-9wkBCzzO.js} +18 -18
- package/dist/{onboarding.secret-input-BTK1IG-J.js → onboarding.secret-input-DRnoQSlI.js} +1 -1
- package/dist/{openai-model-default-COzeuAI4.js → openai-model-default-DqE4bNtd.js} +2 -2
- package/dist/{outbound-qTioiTJg.js → outbound-C9svt6RH.js} +6 -6
- package/dist/{outbound-B7m9Vcd2.js → outbound-CwzUo-rx.js} +3 -3
- package/dist/{outbound-attachment-fdEhzyl9.js → outbound-attachment-Bedqixj2.js} +2 -2
- package/dist/{outbound-attachment-rlW7G5df.js → outbound-attachment-DwupUxYF.js} +2 -2
- package/dist/{pairing-cli-NhoRKes6.js → pairing-cli-CsYP0at7.js} +8 -8
- package/dist/{pairing-labels-CnTvFrUT.js → pairing-labels-CX4CtqRa.js} +1 -1
- package/dist/{pairing-store-D0eOXyby.js → pairing-store-BC4mnG9S.js} +3 -3
- package/dist/{path-alias-guards-Cpsiv2KL.js → path-alias-guards-DORgbZ1w.js} +1 -1
- package/dist/path-alias-guards-DeOVetT7.js +43 -0
- package/dist/{path-safety-C95DzArw.js → path-safety-D7CjFQvf.js} +1 -1
- package/dist/{paths-DfuVHiHu.js → paths-D6mnO6Ni.js} +9 -9
- package/dist/{paths-CSdAWKDO.js → paths-DA5srn0U.js} +5 -5
- package/dist/{paths-CXClY8zC.js → paths-DSd911Oe.js} +4 -4
- package/dist/{pi-embedded-DUtpCH0X.js → pi-embedded-BiC4tIJ8.js} +162 -162
- package/dist/{pi-embedded-helpers-CYR1UemI.js → pi-embedded-helpers-Di58J7Eh.js} +52 -52
- package/dist/{pi-embedded-helpers-qCAK_a65.js → pi-embedded-helpers-DtCOZSv-.js} +6 -6
- package/dist/{pi-model-discovery-CKUePiDc.js → pi-model-discovery-Cr1q2cJt.js} +1 -1
- package/dist/pi-model-discovery-V-InbjOM.js +134 -0
- package/dist/pi-model-discovery-runtime--t6tAlar.js +11 -0
- package/dist/{pi-model-discovery-runtime-CNLKih0w.js → pi-model-discovery-runtime-BHmdAKBK.js} +5 -5
- package/dist/{pi-tools.before-tool-call.runtime-B_LUttg1.js → pi-tools.before-tool-call.runtime-Bpk4qTgV.js} +9 -9
- package/dist/{pi-tools.before-tool-call.runtime-Bba7rXQq.js → pi-tools.before-tool-call.runtime-duKHqrMc.js} +5 -5
- package/dist/{pi-tools.policy-BwWnFLLV.js → pi-tools.policy-D3RA94WF.js} +5 -5
- package/dist/{plugin-auto-enable-DJkHW_LG.js → plugin-auto-enable-a3TK3OPT.js} +3 -3
- package/dist/{plugin-registry-D3PnPE1D.js → plugin-registry-CFqqDqQV.js} +3 -3
- package/dist/plugin-sdk/accounts-CUEuUR3C.js +46 -0
- package/dist/plugin-sdk/accounts-D0W2pELU.js +288 -0
- package/dist/plugin-sdk/accounts-ucj0odJq.js +35 -0
- package/dist/plugin-sdk/active-listener-BO7eBEG_.js +50 -0
- package/dist/plugin-sdk/api-key-rotation-C4C_mDsg.js +181 -0
- package/dist/plugin-sdk/audio-preflight-Cqdo0JKm.js +69 -0
- package/dist/plugin-sdk/audio-transcription-runner-DnEooIyE.js +2176 -0
- package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +58 -0
- package/dist/plugin-sdk/channel-activity-BMWLw4o2.js +94 -0
- package/dist/plugin-sdk/channel-web-B8bj7MB9.js +2256 -0
- package/dist/plugin-sdk/chrome-CV-q0Lmc.js +2415 -0
- package/dist/plugin-sdk/commands-registry-e7YoqrbP.js +1125 -0
- package/dist/plugin-sdk/config-B2B64aX0.js +17911 -0
- package/dist/plugin-sdk/deliver-BkyBtcLR.js +1694 -0
- package/dist/plugin-sdk/deliver-runtime-O4lwAWMw.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-BAeeBldY.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-EL-CfikZ.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-BeemHeUu.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-DTttkC0N.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-Dsf9Cnka.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-DvdFo6lj.js +57 -0
- package/dist/plugin-sdk/diagnostic-DPRVoKTk.js +319 -0
- package/dist/plugin-sdk/discord.js +6 -6
- package/dist/plugin-sdk/errors-B8oJXuCF.js +54 -0
- package/dist/plugin-sdk/fetch-guard-F0Fnqisy.js +156 -0
- package/dist/{fs-safe-DPYj7h8A.js → plugin-sdk/fs-safe-Dqmpk-Fr.js} +6 -6
- package/dist/plugin-sdk/image-cBW8L8pp.js +2310 -0
- package/dist/plugin-sdk/image-ops-BP8ix1GC.js +584 -0
- package/dist/plugin-sdk/image-runtime-9xkgSlNz.js +25 -0
- package/dist/plugin-sdk/index.js +50 -50
- package/dist/plugin-sdk/ir-DWEc6zOp.js +1296 -0
- package/dist/plugin-sdk/local-roots-BIPT8uAO.js +186 -0
- package/dist/plugin-sdk/logger-DDdrdbDu.js +1163 -0
- package/dist/plugin-sdk/login-BMTiGutN.js +57 -0
- package/dist/plugin-sdk/login-qr-BFxqYUkc.js +320 -0
- package/dist/plugin-sdk/manager-BD-aYaZ8.js +3917 -0
- package/dist/plugin-sdk/manager-runtime-C5bRwUlz.js +15 -0
- package/dist/plugin-sdk/outbound-Bm07xvO6.js +212 -0
- package/dist/plugin-sdk/outbound-attachment-DLsaxDsc.js +19 -0
- package/dist/{path-alias-guards-vfYYQFIg.js → plugin-sdk/path-alias-guards-gBhrAn14.js} +1 -1
- package/dist/plugin-sdk/paths-C6W4VHoa.js +166 -0
- package/dist/plugin-sdk/pi-embedded-helpers-BExwPvTh.js +9627 -0
- package/dist/{pi-model-discovery-o-WX5w2t.js → plugin-sdk/pi-model-discovery-DdctvBeX.js} +2 -2
- package/dist/plugin-sdk/pi-model-discovery-runtime-DrtpLJjk.js +8 -0
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-rgTz3FBl.js +354 -0
- package/dist/plugin-sdk/plugins-BN64HHZA.js +864 -0
- package/dist/{proxy-fetch-C2v-Utgg.js → plugin-sdk/proxy-fetch-ZPEvp58f.js} +1 -1
- package/dist/plugin-sdk/pw-ai-DBm3RdBK.js +1938 -0
- package/dist/{qmd-manager-BkSWV1Q1.js → plugin-sdk/qmd-manager-6bozlfFg.js} +11 -17
- package/dist/plugin-sdk/query-expansion-eeVz_aEm.js +1011 -0
- package/dist/{redact-NmPEVjIo.js → plugin-sdk/redact-BoNEjbpF.js} +1 -1
- package/dist/plugin-sdk/reply-Bp49JV3f.js +98828 -0
- package/dist/plugin-sdk/resolve-outbound-target-DXfjGlZQ.js +40 -0
- package/dist/plugin-sdk/run-with-concurrency-5DMu9szx.js +1994 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-D2hkJBa-.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-C06I4adi.js +19 -0
- package/dist/plugin-sdk/send-B9xnwtQ-.js +540 -0
- package/dist/plugin-sdk/send-BxySs-Cu.js +2587 -0
- package/dist/plugin-sdk/send-D9THKp_J.js +414 -0
- package/dist/plugin-sdk/send-DCuaaP2w.js +503 -0
- package/dist/plugin-sdk/send-Dm_-_xje.js +3135 -0
- package/dist/plugin-sdk/session-DDzIZHxt.js +169 -0
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/skill-commands-DRvqtuFC.js +342 -0
- package/dist/plugin-sdk/skills-BWwlfbVj.js +1428 -0
- package/dist/plugin-sdk/slash-commands.runtime-BzYsaTST.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-Cty8EAD9.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-sg98L8BK.js +16 -0
- package/dist/plugin-sdk/ssrf-DOBwjFow.js +202 -0
- package/dist/plugin-sdk/store-BKDR_-Qk.js +81 -0
- package/dist/plugin-sdk/subagent-registry-runtime-Dz50ieim.js +52 -0
- package/dist/plugin-sdk/tables-GIj79us5.js +55 -0
- package/dist/{target-errors-D0ZJUbbf.js → plugin-sdk/target-errors-jlLHihbX.js} +2 -2
- package/dist/plugin-sdk/thinking-BgdUnMZ2.js +1206 -0
- package/dist/{tokens-D2XhLqIz.js → plugin-sdk/tokens-CTIYTLWu.js} +1 -1
- package/dist/plugin-sdk/tool-images-GSlvf6RP.js +274 -0
- package/dist/plugin-sdk/web-BK9mCTAc.js +56 -0
- package/dist/plugin-sdk/whatsapp-actions-DQpK_5Ds.js +80 -0
- package/dist/{plugins-BDTkSIi7.js → plugins-Bc7YM9X-.js} +2 -2
- package/dist/{plugins-AqsVZZk3.js → plugins-DvejjZnJ.js} +11 -11
- package/dist/{plugins-cli-BA_2daJe.js → plugins-cli-vQi8tFye.js} +83 -83
- package/dist/{ports-Be82TlEg.js → ports-BzfeaNjw.js} +1 -1
- package/dist/{ports-0jLyYbvQ.js → ports-DMeUt80n.js} +2 -2
- package/dist/{program-D_xdLzmM.js → program-Nott_VTb.js} +81 -81
- package/dist/{prompt-select-styled-BsheNEnh.js → prompt-select-styled-7mnlZgrQ.js} +40 -40
- package/dist/{provider-auth-helpers-B5kD4Lt6.js → provider-auth-helpers-_77rN3Zc.js} +5 -5
- package/dist/{proxy-env-CQTuxZoS.js → proxy-env-BiKHVg2h.js} +1 -1
- package/dist/{proxy-env-DXXfs2WL.js → proxy-env-D-fike7s.js} +1 -1
- package/dist/proxy-fetch-lH6RsRTE.js +38 -0
- package/dist/{push-apns-BbenjEX4.js → push-apns-Ce1zzNYB.js} +5 -5
- package/dist/{pw-ai-1NQPuno2.js → pw-ai-B8ymIYub.js} +14 -14
- package/dist/{pw-ai-wo5t_KO_.js → pw-ai-CAhTwexx.js} +18 -18
- package/dist/{qmd-manager-CO-shcLU.js → qmd-manager-BN0siR2Z.js} +10 -10
- package/dist/qmd-manager-BsL_hcOB.js +1454 -0
- package/dist/{qr-cli-DSMYIp-D.js → qr-cli-DzjBpGix.js} +2 -2
- package/dist/{query-expansion-DI9INxTg.js → query-expansion-C0HUJbRn.js} +12 -12
- package/dist/{query-expansion-DlQOkf-g.js → query-expansion-Dzxt6kXo.js} +6 -6
- package/dist/redact-DvzicBMu.js +319 -0
- package/dist/{redact-snapshot-B2YFI3cO.js → redact-snapshot-C0McNGqh.js} +1 -1
- package/dist/{register.agent-Dk_5V5oA.js → register.agent-DtjNdvUh.js} +94 -94
- package/dist/register.configure-BkwbM-hb.js +165 -0
- package/dist/{register.maintenance-CluQOq8b.js → register.maintenance-DERKsSgi.js} +95 -95
- package/dist/{register.message-BCTXT5yK.js → register.message-DkYxt6gZ.js} +74 -74
- package/dist/{register.onboard-C64oXnvq.js → register.onboard-BtfW83M0.js} +18 -18
- package/dist/{register.setup-Dl3nk2Ui.js → register.setup-Ba9gMkRk.js} +21 -21
- package/dist/{register.status-health-sessions-BHtbPeCO.js → register.status-health-sessions-BILdpWJV.js} +88 -88
- package/dist/{register.subclis-CDMFyaKR.js → register.subclis-Dfm_Zu31.js} +31 -31
- package/dist/{rpc-DA9IhLVG.js → rpc-mau2U4RG.js} +1 -1
- package/dist/{run-main-BcA22Ipv.js → run-main-BF7ybLIy.js} +93 -93
- package/dist/{run-with-concurrency-FczpX8ng.js → run-with-concurrency-BFR3ReeF.js} +4 -4
- package/dist/{runtime-BnbzNRr6.js → runtime-Bcmv4Epp.js} +3 -3
- package/dist/{runtime-config-collectors-CXJdhHRo.js → runtime-config-collectors-Bsjz4isf.js} +1 -1
- package/dist/{runtime-whatsapp-login.runtime-DRoK8G8H.js → runtime-whatsapp-login.runtime-COUEKxmy.js} +7 -7
- package/dist/runtime-whatsapp-login.runtime-DxV9iv6l.js +13 -0
- package/dist/{runtime-whatsapp-outbound.runtime-C9OiwkWh.js → runtime-whatsapp-outbound.runtime-BaWH6-ns.js} +15 -15
- package/dist/runtime-whatsapp-outbound.runtime-DQqIlwhS.js +22 -0
- package/dist/{sandbox-cli-BwK2slfh.js → sandbox-cli-DOxm7fjR.js} +25 -25
- package/dist/{sandbox-C3TbYIHd.js → sandbox-ixDhkfHu.js} +18 -18
- package/dist/{secrets-cli-Beu2lcrf.js → secrets-cli-DvXznMUb.js} +11 -11
- package/dist/{security-cli-CcpKH_lC.js → security-cli-3WOXvJR-.js} +42 -42
- package/dist/{send-Bx9CqcZr.js → send-4nRsZJXH.js} +7 -7
- package/dist/{send-D5D0ZGht.js → send-BGlcHjUD.js} +26 -26
- package/dist/{send-EVcbFVqn.js → send-BPgrWmUX.js} +5 -5
- package/dist/{send-DtHQ7_6Z.js → send-BTUU1jWM.js} +8 -8
- package/dist/{send-RDqyJwZx.js → send-BVyLW1cn.js} +8 -8
- package/dist/{send-z-sMjqvX.js → send-BpkluEZ5.js} +4 -4
- package/dist/{send-CLI3CiQv.js → send-BuBTLRMz.js} +6 -6
- package/dist/{send-B9H0BkfO.js → send-DdBbRpTP.js} +6 -6
- package/dist/{send-DEs83M9V.js → send-Do2preUU.js} +11 -11
- package/dist/{send-B5QEmMJ4.js → send-dTQd-IyJ.js} +5 -5
- package/dist/{server-Bm-IxvZZ.js → server-DMAPnkgM.js} +20 -20
- package/dist/{server-context-Dw_4lGoI.js → server-context-Dd8UynDU.js} +12 -12
- package/dist/{server-lifecycle-DYgHYif9.js → server-lifecycle-BEZ2jsQ6.js} +2 -2
- package/dist/{server-middleware-BVAEuQs7.js → server-middleware-B_LyQkOL.js} +1 -1
- package/dist/{server-node-events-Q0cT2ifj.js → server-node-events-dr5CaM3M.js} +74 -74
- package/dist/{service-DSqxS6_D.js → service-B5T42CWZ.js} +15 -15
- package/dist/{session-DLTCuoUD.js → session-CnCwDJke.js} +8 -8
- package/dist/{session-D0jodcgT.js → session-eXSdl5mb.js} +1 -1
- package/dist/{session-utils-XY6JwRhT.js → session-utils-D12gSo5W.js} +6 -6
- package/dist/{sessions-CMqv9JEu.js → sessions-C16G7L5c.js} +4 -4
- package/dist/{sessions-BWptzMw0.js → sessions-DgnXAQCc.js} +15 -15
- package/dist/{shared-BbVxcRzb.js → shared-BYny1RCF.js} +3 -3
- package/dist/{shared-D5DTxBPH.js → shared-By6_qr_R.js} +1 -1
- package/dist/{skill-commands-fU-Mejn9.js → skill-commands-BcigmiOW.js} +5 -5
- package/dist/{skill-commands-BwTLQRR8.js → skill-commands-Cz45_nme.js} +9 -9
- package/dist/{skill-scanner-CvS725eQ.js → skill-scanner--QKHR8U0.js} +6 -6
- package/dist/{skills-B9N2bqKU.js → skills-CdCS1HeL.js} +22 -22
- package/dist/{skills-C85azDXm.js → skills-EwyaIyKC.js} +3 -3
- package/dist/{skills-cli-ZXx6BNar.js → skills-cli-CqEjN0Yj.js} +5 -5
- package/dist/{skills-install-KD6dzNoZ.js → skills-install-CXVKvhIE.js} +6 -6
- package/dist/{skills-status-DkO7rxE8.js → skills-status-Bv8Xt7Lc.js} +1 -1
- package/dist/{slash-commands.runtime-CPlXJtuM.js → slash-commands.runtime-Bi99B_EP.js} +11 -11
- package/dist/slash-commands.runtime-CZz6v6b3.js +16 -0
- package/dist/slash-dispatch.runtime-SO7HOe8q.js +56 -0
- package/dist/slash-dispatch.runtime-reuPLnse.js +114 -0
- package/dist/slash-skill-commands.runtime-Bawt7j0r.js +20 -0
- package/dist/{slash-skill-commands.runtime-Cnfq_5LN.js → slash-skill-commands.runtime-DOXmvOtU.js} +15 -15
- package/dist/{squidclaw-root-BQfLymzj.js → squidclaw-root-JXyRbQLJ.js} +8 -8
- package/dist/{status-cU9cJReo.js → status-Dnl-Um1D.js} +27 -27
- package/dist/{status.update-CiLU9RPF.js → status.update-BGIm6we4.js} +2 -2
- package/dist/{store-BEIcnlgx.js → store-BTkIx401.js} +5 -5
- package/dist/{store-CvQ41zCV.js → store-D9z0dn7D.js} +2 -2
- package/dist/{subagent-registry-CIgFD2oi.js → subagent-registry-CQA6P2FO.js} +149 -149
- package/dist/subagent-registry-runtime-CqgIWcSl.js +114 -0
- package/dist/subagent-registry-runtime-D2rUxU5J.js +56 -0
- package/dist/{subsystem-BaLYRf7D.js → subsystem-6v7sWnAD.js} +14 -14
- package/dist/{system-cli-i1FWZDjn.js → system-cli-CJAQxYHv.js} +9 -9
- package/dist/{system-run-command-COqCNIBg.js → system-run-command-BaSqmSwR.js} +1 -1
- package/dist/{systemd-Cj2cX_ZP.js → systemd-B86VePXs.js} +9 -9
- package/dist/{systemd-hints-46PqJfaq.js → systemd-hints-BmFWZu_j.js} +6 -6
- package/dist/{systemd-linger-6Jd9K5p2.js → systemd-linger-w7fvBU-1.js} +1 -1
- package/dist/{tables-BRYYxYs7.js → tables-BTFiZyRU.js} +1 -1
- package/dist/{tables-CIpKClDV.js → tables-CGh4CW_h.js} +1 -1
- package/dist/{tailnet-CZANZjq6.js → tailnet-DJq7Mi1o.js} +1 -1
- package/dist/target-errors-C_rnMuJ2.js +195 -0
- package/dist/{target-errors-CRQlPF1u.js → target-errors-DgNRx3Nr.js} +2 -2
- package/dist/{thinking-B-A99X3F.js → thinking-B75CXkTT.js} +7 -7
- package/dist/tokens-DfbMVF9y.js +52 -0
- package/dist/{tool-images-CyzWvDUu.js → tool-images-D6mmxuWS.js} +1 -1
- package/dist/{tool-images-Zn6jVmkX.js → tool-images-Dp5OiXeA.js} +2 -2
- package/dist/{tui-CC_AbfZr.js → tui-BbcmzKaA.js} +6 -6
- package/dist/{tui-cli-DiJ7zKUD.js → tui-cli-Dv3jSm3x.js} +32 -32
- package/dist/{update-1JhjCqjy.js → update-BhRrb6BI.js} +3 -3
- package/dist/{update-cli-DM_dUip_.js → update-cli-Oe0fP8x9.js} +104 -104
- package/dist/{update-runner-BBJZmfZ4.js → update-runner-DdA6xBa9.js} +16 -16
- package/dist/{web-CEdWU_u3.js → web-QsxgXbNK.js} +55 -55
- package/dist/web-w04Gvwqi.js +118 -0
- package/dist/{webhooks-cli-CzDd8ikc.js → webhooks-cli-CJLug1QH.js} +6 -6
- package/dist/{whatsapp-actions-Cuy0qeQK.js → whatsapp-actions-CzqsuSGx.js} +21 -21
- package/dist/{whatsapp-actions-MR_bBjXO.js → whatsapp-actions-_ca5OtHq.js} +17 -17
- package/dist/{with-timeout-BZ_Teugb.js → with-timeout-CFfRudNc.js} +3 -3
- package/dist/{workspace-D5vNjk5G.js → workspace-BbO-M3Jv.js} +1 -1
- package/dist/{workspace-dirs-CjMIsQti.js → workspace-dirs-D8D-Ghcl.js} +1 -1
- package/dist/{workspace-TqfVSQuO.js → workspace-kVMIaBrV.js} +20 -20
- package/dist/{wsl-CvQfS6aU.js → wsl-CsGe5QCP.js} +2 -2
- package/package.json +1 -1
- package/dist/deliver-runtime-B6NtHUuv.js +0 -36
- package/dist/deliver-runtime-C08pF1_3.js +0 -61
- package/dist/deps-send-discord.runtime-CUTAK2hy.js +0 -26
- package/dist/deps-send-discord.runtime-r80y9aXF.js +0 -36
- package/dist/deps-send-imessage.runtime-BmocBgPM.js +0 -35
- package/dist/deps-send-imessage.runtime-CQOiEIuA.js +0 -25
- package/dist/deps-send-signal.runtime-ByJt6qz-.js +0 -34
- package/dist/deps-send-signal.runtime-wN7MkzLw.js +0 -24
- package/dist/deps-send-slack.runtime-C3UUEG9J.js +0 -32
- package/dist/deps-send-slack.runtime-HEEwW4uU.js +0 -22
- package/dist/deps-send-telegram.runtime-DHlcnjQO.js +0 -27
- package/dist/deps-send-whatsapp.runtime-C2x2R2Ow.js +0 -60
- package/dist/deps-send-whatsapp.runtime-__ogpmJj.js +0 -119
- package/dist/image-runtime-BSVF52oe.js +0 -29
- package/dist/image-runtime-cza2NTiZ.js +0 -55
- package/dist/manager-runtime-BB9lcoFR.js +0 -18
- package/dist/pi-model-discovery-runtime-DBkQoIJw.js +0 -11
- package/dist/register.configure-C8OFfGln.js +0 -165
- package/dist/runtime-whatsapp-login.runtime-DumUjKRz.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Cgu2MfqR.js +0 -22
- package/dist/slash-commands.runtime-CjBXruwG.js +0 -16
- package/dist/slash-dispatch.runtime-BOMEVFk0.js +0 -114
- package/dist/slash-dispatch.runtime-CGd3HarH.js +0 -56
- package/dist/slash-skill-commands.runtime-DYK20Lxf.js +0 -20
- package/dist/subagent-registry-runtime-DGTjU9Lb.js +0 -114
- package/dist/subagent-registry-runtime-m9bFJFix.js +0 -56
- package/dist/web-CZhZC1EA.js +0 -118
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { n as loadConfig } from "./config-B2B64aX0.js";
|
|
2
|
+
import { E as resolveUserPath, S as normalizeE164 } from "./logger-DDdrdbDu.js";
|
|
3
|
+
import { m as kindFromMime } from "./image-ops-BP8ix1GC.js";
|
|
4
|
+
import { r as resolveIMessageAccount } from "./accounts-ucj0odJq.js";
|
|
5
|
+
import { i as resolveMarkdownTableMode } from "./ir-DWEc6zOp.js";
|
|
6
|
+
import { t as convertMarkdownTables } from "./tables-GIj79us5.js";
|
|
7
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-DLsaxDsc.js";
|
|
8
|
+
import { spawn } from "node:child_process";
|
|
9
|
+
import { createInterface } from "node:readline";
|
|
10
|
+
|
|
11
|
+
//#region src/plugin-sdk/allow-from.ts
|
|
12
|
+
function formatAllowFromLowercase(params) {
|
|
13
|
+
return params.allowFrom.map((entry) => String(entry).trim()).filter(Boolean).map((entry) => params.stripPrefixRe ? entry.replace(params.stripPrefixRe, "") : entry).map((entry) => entry.toLowerCase());
|
|
14
|
+
}
|
|
15
|
+
function isNormalizedSenderAllowed(params) {
|
|
16
|
+
const normalizedAllow = formatAllowFromLowercase({
|
|
17
|
+
allowFrom: params.allowFrom,
|
|
18
|
+
stripPrefixRe: params.stripPrefixRe
|
|
19
|
+
});
|
|
20
|
+
if (normalizedAllow.length === 0) return false;
|
|
21
|
+
if (normalizedAllow.includes("*")) return true;
|
|
22
|
+
const sender = String(params.senderId).trim().toLowerCase();
|
|
23
|
+
return normalizedAllow.includes(sender);
|
|
24
|
+
}
|
|
25
|
+
function isAllowedParsedChatSender(params) {
|
|
26
|
+
const allowFrom = params.allowFrom.map((entry) => String(entry).trim());
|
|
27
|
+
if (allowFrom.length === 0) return false;
|
|
28
|
+
if (allowFrom.includes("*")) return true;
|
|
29
|
+
const senderNormalized = params.normalizeSender(params.sender);
|
|
30
|
+
const chatId = params.chatId ?? void 0;
|
|
31
|
+
const chatGuid = params.chatGuid?.trim();
|
|
32
|
+
const chatIdentifier = params.chatIdentifier?.trim();
|
|
33
|
+
for (const entry of allowFrom) {
|
|
34
|
+
if (!entry) continue;
|
|
35
|
+
const parsed = params.parseAllowTarget(entry);
|
|
36
|
+
if (parsed.kind === "chat_id" && chatId !== void 0) {
|
|
37
|
+
if (parsed.chatId === chatId) return true;
|
|
38
|
+
} else if (parsed.kind === "chat_guid" && chatGuid) {
|
|
39
|
+
if (parsed.chatGuid === chatGuid) return true;
|
|
40
|
+
} else if (parsed.kind === "chat_identifier" && chatIdentifier) {
|
|
41
|
+
if (parsed.chatIdentifier === chatIdentifier) return true;
|
|
42
|
+
} else if (parsed.kind === "handle" && senderNormalized) {
|
|
43
|
+
if (parsed.handle === senderNormalized) return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/imessage/target-parsing-helpers.ts
|
|
51
|
+
function stripPrefix(value, prefix) {
|
|
52
|
+
return value.slice(prefix.length).trim();
|
|
53
|
+
}
|
|
54
|
+
function resolveServicePrefixedTarget(params) {
|
|
55
|
+
for (const { prefix, service } of params.servicePrefixes) {
|
|
56
|
+
if (!params.lower.startsWith(prefix)) continue;
|
|
57
|
+
const remainder = stripPrefix(params.trimmed, prefix);
|
|
58
|
+
if (!remainder) throw new Error(`${prefix} target is required`);
|
|
59
|
+
const remainderLower = remainder.toLowerCase();
|
|
60
|
+
if (params.isChatTarget(remainderLower)) return params.parseTarget(remainder);
|
|
61
|
+
return {
|
|
62
|
+
kind: "handle",
|
|
63
|
+
to: remainder,
|
|
64
|
+
service
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function parseChatTargetPrefixesOrThrow(params) {
|
|
70
|
+
for (const prefix of params.chatIdPrefixes) if (params.lower.startsWith(prefix)) {
|
|
71
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
72
|
+
const chatId = Number.parseInt(value, 10);
|
|
73
|
+
if (!Number.isFinite(chatId)) throw new Error(`Invalid chat_id: ${value}`);
|
|
74
|
+
return {
|
|
75
|
+
kind: "chat_id",
|
|
76
|
+
chatId
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
for (const prefix of params.chatGuidPrefixes) if (params.lower.startsWith(prefix)) {
|
|
80
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
81
|
+
if (!value) throw new Error("chat_guid is required");
|
|
82
|
+
return {
|
|
83
|
+
kind: "chat_guid",
|
|
84
|
+
chatGuid: value
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
for (const prefix of params.chatIdentifierPrefixes) if (params.lower.startsWith(prefix)) {
|
|
88
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
89
|
+
if (!value) throw new Error("chat_identifier is required");
|
|
90
|
+
return {
|
|
91
|
+
kind: "chat_identifier",
|
|
92
|
+
chatIdentifier: value
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
function resolveServicePrefixedAllowTarget(params) {
|
|
98
|
+
for (const { prefix } of params.servicePrefixes) {
|
|
99
|
+
if (!params.lower.startsWith(prefix)) continue;
|
|
100
|
+
const remainder = stripPrefix(params.trimmed, prefix);
|
|
101
|
+
if (!remainder) return {
|
|
102
|
+
kind: "handle",
|
|
103
|
+
handle: ""
|
|
104
|
+
};
|
|
105
|
+
return params.parseAllowTarget(remainder);
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
function parseChatAllowTargetPrefixes(params) {
|
|
110
|
+
for (const prefix of params.chatIdPrefixes) if (params.lower.startsWith(prefix)) {
|
|
111
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
112
|
+
const chatId = Number.parseInt(value, 10);
|
|
113
|
+
if (Number.isFinite(chatId)) return {
|
|
114
|
+
kind: "chat_id",
|
|
115
|
+
chatId
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
for (const prefix of params.chatGuidPrefixes) if (params.lower.startsWith(prefix)) {
|
|
119
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
120
|
+
if (value) return {
|
|
121
|
+
kind: "chat_guid",
|
|
122
|
+
chatGuid: value
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
for (const prefix of params.chatIdentifierPrefixes) if (params.lower.startsWith(prefix)) {
|
|
126
|
+
const value = stripPrefix(params.trimmed, prefix);
|
|
127
|
+
if (value) return {
|
|
128
|
+
kind: "chat_identifier",
|
|
129
|
+
chatIdentifier: value
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/imessage/targets.ts
|
|
137
|
+
const CHAT_ID_PREFIXES = [
|
|
138
|
+
"chat_id:",
|
|
139
|
+
"chatid:",
|
|
140
|
+
"chat:"
|
|
141
|
+
];
|
|
142
|
+
const CHAT_GUID_PREFIXES = [
|
|
143
|
+
"chat_guid:",
|
|
144
|
+
"chatguid:",
|
|
145
|
+
"guid:"
|
|
146
|
+
];
|
|
147
|
+
const CHAT_IDENTIFIER_PREFIXES = [
|
|
148
|
+
"chat_identifier:",
|
|
149
|
+
"chatidentifier:",
|
|
150
|
+
"chatident:"
|
|
151
|
+
];
|
|
152
|
+
const SERVICE_PREFIXES = [
|
|
153
|
+
{
|
|
154
|
+
prefix: "imessage:",
|
|
155
|
+
service: "imessage"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
prefix: "sms:",
|
|
159
|
+
service: "sms"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
prefix: "auto:",
|
|
163
|
+
service: "auto"
|
|
164
|
+
}
|
|
165
|
+
];
|
|
166
|
+
function normalizeIMessageHandle(raw) {
|
|
167
|
+
const trimmed = raw.trim();
|
|
168
|
+
if (!trimmed) return "";
|
|
169
|
+
const lowered = trimmed.toLowerCase();
|
|
170
|
+
if (lowered.startsWith("imessage:")) return normalizeIMessageHandle(trimmed.slice(9));
|
|
171
|
+
if (lowered.startsWith("sms:")) return normalizeIMessageHandle(trimmed.slice(4));
|
|
172
|
+
if (lowered.startsWith("auto:")) return normalizeIMessageHandle(trimmed.slice(5));
|
|
173
|
+
for (const prefix of CHAT_ID_PREFIXES) if (lowered.startsWith(prefix)) return `chat_id:${trimmed.slice(prefix.length).trim()}`;
|
|
174
|
+
for (const prefix of CHAT_GUID_PREFIXES) if (lowered.startsWith(prefix)) return `chat_guid:${trimmed.slice(prefix.length).trim()}`;
|
|
175
|
+
for (const prefix of CHAT_IDENTIFIER_PREFIXES) if (lowered.startsWith(prefix)) return `chat_identifier:${trimmed.slice(prefix.length).trim()}`;
|
|
176
|
+
if (trimmed.includes("@")) return trimmed.toLowerCase();
|
|
177
|
+
const normalized = normalizeE164(trimmed);
|
|
178
|
+
if (normalized) return normalized;
|
|
179
|
+
return trimmed.replace(/\s+/g, "");
|
|
180
|
+
}
|
|
181
|
+
function parseIMessageTarget(raw) {
|
|
182
|
+
const trimmed = raw.trim();
|
|
183
|
+
if (!trimmed) throw new Error("iMessage target is required");
|
|
184
|
+
const lower = trimmed.toLowerCase();
|
|
185
|
+
const servicePrefixed = resolveServicePrefixedTarget({
|
|
186
|
+
trimmed,
|
|
187
|
+
lower,
|
|
188
|
+
servicePrefixes: SERVICE_PREFIXES,
|
|
189
|
+
isChatTarget: (remainderLower) => CHAT_ID_PREFIXES.some((p) => remainderLower.startsWith(p)) || CHAT_GUID_PREFIXES.some((p) => remainderLower.startsWith(p)) || CHAT_IDENTIFIER_PREFIXES.some((p) => remainderLower.startsWith(p)),
|
|
190
|
+
parseTarget: parseIMessageTarget
|
|
191
|
+
});
|
|
192
|
+
if (servicePrefixed) return servicePrefixed;
|
|
193
|
+
const chatTarget = parseChatTargetPrefixesOrThrow({
|
|
194
|
+
trimmed,
|
|
195
|
+
lower,
|
|
196
|
+
chatIdPrefixes: CHAT_ID_PREFIXES,
|
|
197
|
+
chatGuidPrefixes: CHAT_GUID_PREFIXES,
|
|
198
|
+
chatIdentifierPrefixes: CHAT_IDENTIFIER_PREFIXES
|
|
199
|
+
});
|
|
200
|
+
if (chatTarget) return chatTarget;
|
|
201
|
+
return {
|
|
202
|
+
kind: "handle",
|
|
203
|
+
to: trimmed,
|
|
204
|
+
service: "auto"
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function parseIMessageAllowTarget(raw) {
|
|
208
|
+
const trimmed = raw.trim();
|
|
209
|
+
if (!trimmed) return {
|
|
210
|
+
kind: "handle",
|
|
211
|
+
handle: ""
|
|
212
|
+
};
|
|
213
|
+
const lower = trimmed.toLowerCase();
|
|
214
|
+
const servicePrefixed = resolveServicePrefixedAllowTarget({
|
|
215
|
+
trimmed,
|
|
216
|
+
lower,
|
|
217
|
+
servicePrefixes: SERVICE_PREFIXES,
|
|
218
|
+
parseAllowTarget: parseIMessageAllowTarget
|
|
219
|
+
});
|
|
220
|
+
if (servicePrefixed) return servicePrefixed;
|
|
221
|
+
const chatTarget = parseChatAllowTargetPrefixes({
|
|
222
|
+
trimmed,
|
|
223
|
+
lower,
|
|
224
|
+
chatIdPrefixes: CHAT_ID_PREFIXES,
|
|
225
|
+
chatGuidPrefixes: CHAT_GUID_PREFIXES,
|
|
226
|
+
chatIdentifierPrefixes: CHAT_IDENTIFIER_PREFIXES
|
|
227
|
+
});
|
|
228
|
+
if (chatTarget) return chatTarget;
|
|
229
|
+
return {
|
|
230
|
+
kind: "handle",
|
|
231
|
+
handle: normalizeIMessageHandle(trimmed)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function isAllowedIMessageSender(params) {
|
|
235
|
+
return isAllowedParsedChatSender({
|
|
236
|
+
allowFrom: params.allowFrom,
|
|
237
|
+
sender: params.sender,
|
|
238
|
+
chatId: params.chatId,
|
|
239
|
+
chatGuid: params.chatGuid,
|
|
240
|
+
chatIdentifier: params.chatIdentifier,
|
|
241
|
+
normalizeSender: normalizeIMessageHandle,
|
|
242
|
+
parseAllowTarget: parseIMessageAllowTarget
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function formatIMessageChatTarget(chatId) {
|
|
246
|
+
if (!chatId || !Number.isFinite(chatId)) return "";
|
|
247
|
+
return `chat_id:${chatId}`;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/imessage/constants.ts
|
|
252
|
+
/** Default timeout for iMessage probe/RPC operations (10 seconds). */
|
|
253
|
+
const DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS = 1e4;
|
|
254
|
+
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/imessage/client.ts
|
|
257
|
+
function isTestEnv() {
|
|
258
|
+
const vitest = process.env.VITEST?.trim().toLowerCase();
|
|
259
|
+
return Boolean(vitest);
|
|
260
|
+
}
|
|
261
|
+
var IMessageRpcClient = class {
|
|
262
|
+
constructor(opts = {}) {
|
|
263
|
+
this.pending = /* @__PURE__ */ new Map();
|
|
264
|
+
this.closedResolve = null;
|
|
265
|
+
this.child = null;
|
|
266
|
+
this.reader = null;
|
|
267
|
+
this.nextId = 1;
|
|
268
|
+
this.cliPath = opts.cliPath?.trim() || "imsg";
|
|
269
|
+
this.dbPath = opts.dbPath?.trim() ? resolveUserPath(opts.dbPath) : void 0;
|
|
270
|
+
this.runtime = opts.runtime;
|
|
271
|
+
this.onNotification = opts.onNotification;
|
|
272
|
+
this.closed = new Promise((resolve) => {
|
|
273
|
+
this.closedResolve = resolve;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
async start() {
|
|
277
|
+
if (this.child) return;
|
|
278
|
+
if (isTestEnv()) throw new Error("Refusing to start imsg rpc in test environment; mock iMessage RPC client");
|
|
279
|
+
const args = ["rpc"];
|
|
280
|
+
if (this.dbPath) args.push("--db", this.dbPath);
|
|
281
|
+
const child = spawn(this.cliPath, args, { stdio: [
|
|
282
|
+
"pipe",
|
|
283
|
+
"pipe",
|
|
284
|
+
"pipe"
|
|
285
|
+
] });
|
|
286
|
+
this.child = child;
|
|
287
|
+
this.reader = createInterface({ input: child.stdout });
|
|
288
|
+
this.reader.on("line", (line) => {
|
|
289
|
+
const trimmed = line.trim();
|
|
290
|
+
if (!trimmed) return;
|
|
291
|
+
this.handleLine(trimmed);
|
|
292
|
+
});
|
|
293
|
+
child.stderr?.on("data", (chunk) => {
|
|
294
|
+
const lines = chunk.toString().split(/\r?\n/);
|
|
295
|
+
for (const line of lines) {
|
|
296
|
+
if (!line.trim()) continue;
|
|
297
|
+
this.runtime?.error?.(`imsg rpc: ${line.trim()}`);
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
child.on("error", (err) => {
|
|
301
|
+
this.failAll(err instanceof Error ? err : new Error(String(err)));
|
|
302
|
+
this.closedResolve?.();
|
|
303
|
+
});
|
|
304
|
+
child.on("close", (code, signal) => {
|
|
305
|
+
if (code !== 0 && code !== null) {
|
|
306
|
+
const reason = signal ? `signal ${signal}` : `code ${code}`;
|
|
307
|
+
this.failAll(/* @__PURE__ */ new Error(`imsg rpc exited (${reason})`));
|
|
308
|
+
} else this.failAll(/* @__PURE__ */ new Error("imsg rpc closed"));
|
|
309
|
+
this.closedResolve?.();
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
async stop() {
|
|
313
|
+
if (!this.child) return;
|
|
314
|
+
this.reader?.close();
|
|
315
|
+
this.reader = null;
|
|
316
|
+
this.child.stdin?.end();
|
|
317
|
+
const child = this.child;
|
|
318
|
+
this.child = null;
|
|
319
|
+
await Promise.race([this.closed, new Promise((resolve) => {
|
|
320
|
+
setTimeout(() => {
|
|
321
|
+
if (!child.killed) child.kill("SIGTERM");
|
|
322
|
+
resolve();
|
|
323
|
+
}, 500);
|
|
324
|
+
})]);
|
|
325
|
+
}
|
|
326
|
+
async waitForClose() {
|
|
327
|
+
await this.closed;
|
|
328
|
+
}
|
|
329
|
+
async request(method, params, opts) {
|
|
330
|
+
if (!this.child || !this.child.stdin) throw new Error("imsg rpc not running");
|
|
331
|
+
const id = this.nextId++;
|
|
332
|
+
const payload = {
|
|
333
|
+
jsonrpc: "2.0",
|
|
334
|
+
id,
|
|
335
|
+
method,
|
|
336
|
+
params: params ?? {}
|
|
337
|
+
};
|
|
338
|
+
const line = `${JSON.stringify(payload)}\n`;
|
|
339
|
+
const timeoutMs = opts?.timeoutMs ?? DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS;
|
|
340
|
+
const response = new Promise((resolve, reject) => {
|
|
341
|
+
const key = String(id);
|
|
342
|
+
const timer = timeoutMs > 0 ? setTimeout(() => {
|
|
343
|
+
this.pending.delete(key);
|
|
344
|
+
reject(/* @__PURE__ */ new Error(`imsg rpc timeout (${method})`));
|
|
345
|
+
}, timeoutMs) : void 0;
|
|
346
|
+
this.pending.set(key, {
|
|
347
|
+
resolve: (value) => resolve(value),
|
|
348
|
+
reject,
|
|
349
|
+
timer
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
this.child.stdin.write(line);
|
|
353
|
+
return await response;
|
|
354
|
+
}
|
|
355
|
+
handleLine(line) {
|
|
356
|
+
let parsed;
|
|
357
|
+
try {
|
|
358
|
+
parsed = JSON.parse(line);
|
|
359
|
+
} catch (err) {
|
|
360
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
361
|
+
this.runtime?.error?.(`imsg rpc: failed to parse ${line}: ${detail}`);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (parsed.id !== void 0 && parsed.id !== null) {
|
|
365
|
+
const key = String(parsed.id);
|
|
366
|
+
const pending = this.pending.get(key);
|
|
367
|
+
if (!pending) return;
|
|
368
|
+
if (pending.timer) clearTimeout(pending.timer);
|
|
369
|
+
this.pending.delete(key);
|
|
370
|
+
if (parsed.error) {
|
|
371
|
+
const baseMessage = parsed.error.message ?? "imsg rpc error";
|
|
372
|
+
const details = parsed.error.data;
|
|
373
|
+
const code = parsed.error.code;
|
|
374
|
+
const suffixes = [];
|
|
375
|
+
if (typeof code === "number") suffixes.push(`code=${code}`);
|
|
376
|
+
if (details !== void 0) {
|
|
377
|
+
const detailText = typeof details === "string" ? details : JSON.stringify(details, null, 2);
|
|
378
|
+
if (detailText) suffixes.push(detailText);
|
|
379
|
+
}
|
|
380
|
+
const msg = suffixes.length > 0 ? `${baseMessage}: ${suffixes.join(" ")}` : baseMessage;
|
|
381
|
+
pending.reject(new Error(msg));
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
pending.resolve(parsed.result);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
if (parsed.method) this.onNotification?.({
|
|
388
|
+
method: parsed.method,
|
|
389
|
+
params: parsed.params
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
failAll(err) {
|
|
393
|
+
for (const [key, pending] of this.pending.entries()) {
|
|
394
|
+
if (pending.timer) clearTimeout(pending.timer);
|
|
395
|
+
pending.reject(err);
|
|
396
|
+
this.pending.delete(key);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
async function createIMessageRpcClient(opts = {}) {
|
|
401
|
+
const client = new IMessageRpcClient(opts);
|
|
402
|
+
await client.start();
|
|
403
|
+
return client;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/imessage/send.ts
|
|
408
|
+
const LEADING_REPLY_TAG_RE = /^\s*\[\[\s*reply_to\s*:\s*([^\]\n]+)\s*\]\]\s*/i;
|
|
409
|
+
const MAX_REPLY_TO_ID_LENGTH = 256;
|
|
410
|
+
function stripUnsafeReplyTagChars(value) {
|
|
411
|
+
let next = "";
|
|
412
|
+
for (const ch of value) {
|
|
413
|
+
const code = ch.charCodeAt(0);
|
|
414
|
+
if (code >= 0 && code <= 31 || code === 127 || ch === "[" || ch === "]") continue;
|
|
415
|
+
next += ch;
|
|
416
|
+
}
|
|
417
|
+
return next;
|
|
418
|
+
}
|
|
419
|
+
function sanitizeReplyToId(rawReplyToId) {
|
|
420
|
+
const trimmed = rawReplyToId?.trim();
|
|
421
|
+
if (!trimmed) return;
|
|
422
|
+
const sanitized = stripUnsafeReplyTagChars(trimmed).trim();
|
|
423
|
+
if (!sanitized) return;
|
|
424
|
+
if (sanitized.length > MAX_REPLY_TO_ID_LENGTH) return sanitized.slice(0, MAX_REPLY_TO_ID_LENGTH);
|
|
425
|
+
return sanitized;
|
|
426
|
+
}
|
|
427
|
+
function prependReplyTagIfNeeded(message, replyToId) {
|
|
428
|
+
const resolvedReplyToId = sanitizeReplyToId(replyToId);
|
|
429
|
+
if (!resolvedReplyToId) return message;
|
|
430
|
+
const replyTag = `[[reply_to:${resolvedReplyToId}]]`;
|
|
431
|
+
const existingLeadingTag = message.match(LEADING_REPLY_TAG_RE);
|
|
432
|
+
if (existingLeadingTag) {
|
|
433
|
+
const remainder = message.slice(existingLeadingTag[0].length).trimStart();
|
|
434
|
+
return remainder ? `${replyTag} ${remainder}` : replyTag;
|
|
435
|
+
}
|
|
436
|
+
const trimmedMessage = message.trimStart();
|
|
437
|
+
return trimmedMessage ? `${replyTag} ${trimmedMessage}` : replyTag;
|
|
438
|
+
}
|
|
439
|
+
function resolveMessageId(result) {
|
|
440
|
+
if (!result) return null;
|
|
441
|
+
const raw = typeof result.messageId === "string" && result.messageId.trim() || typeof result.message_id === "string" && result.message_id.trim() || typeof result.id === "string" && result.id.trim() || typeof result.guid === "string" && result.guid.trim() || (typeof result.message_id === "number" ? String(result.message_id) : null) || (typeof result.id === "number" ? String(result.id) : null);
|
|
442
|
+
return raw ? String(raw).trim() : null;
|
|
443
|
+
}
|
|
444
|
+
async function sendMessageIMessage(to, text, opts = {}) {
|
|
445
|
+
const cfg = opts.config ?? loadConfig();
|
|
446
|
+
const account = opts.account ?? resolveIMessageAccount({
|
|
447
|
+
cfg,
|
|
448
|
+
accountId: opts.accountId
|
|
449
|
+
});
|
|
450
|
+
const cliPath = opts.cliPath?.trim() || account.config.cliPath?.trim() || "imsg";
|
|
451
|
+
const dbPath = opts.dbPath?.trim() || account.config.dbPath?.trim();
|
|
452
|
+
const target = parseIMessageTarget(opts.chatId ? formatIMessageChatTarget(opts.chatId) : to);
|
|
453
|
+
const service = opts.service ?? (target.kind === "handle" ? target.service : void 0) ?? account.config.service;
|
|
454
|
+
const region = opts.region?.trim() || account.config.region?.trim() || "US";
|
|
455
|
+
const maxBytes = typeof opts.maxBytes === "number" ? opts.maxBytes : typeof account.config.mediaMaxMb === "number" ? account.config.mediaMaxMb * 1024 * 1024 : 16 * 1024 * 1024;
|
|
456
|
+
let message = text ?? "";
|
|
457
|
+
let filePath;
|
|
458
|
+
if (opts.mediaUrl?.trim()) {
|
|
459
|
+
const resolved = await (opts.resolveAttachmentImpl ?? resolveOutboundAttachmentFromUrl)(opts.mediaUrl.trim(), maxBytes, { localRoots: opts.mediaLocalRoots });
|
|
460
|
+
filePath = resolved.path;
|
|
461
|
+
if (!message.trim()) {
|
|
462
|
+
const kind = kindFromMime(resolved.contentType ?? void 0);
|
|
463
|
+
if (kind) message = kind === "image" ? "<media:image>" : `<media:${kind}>`;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (!message.trim() && !filePath) throw new Error("iMessage send requires text or media");
|
|
467
|
+
if (message.trim()) {
|
|
468
|
+
const tableMode = resolveMarkdownTableMode({
|
|
469
|
+
cfg,
|
|
470
|
+
channel: "imessage",
|
|
471
|
+
accountId: account.accountId
|
|
472
|
+
});
|
|
473
|
+
message = convertMarkdownTables(message, tableMode);
|
|
474
|
+
}
|
|
475
|
+
message = prependReplyTagIfNeeded(message, opts.replyToId);
|
|
476
|
+
const params = {
|
|
477
|
+
text: message,
|
|
478
|
+
service: service || "auto",
|
|
479
|
+
region
|
|
480
|
+
};
|
|
481
|
+
if (filePath) params.file = filePath;
|
|
482
|
+
if (target.kind === "chat_id") params.chat_id = target.chatId;
|
|
483
|
+
else if (target.kind === "chat_guid") params.chat_guid = target.chatGuid;
|
|
484
|
+
else if (target.kind === "chat_identifier") params.chat_identifier = target.chatIdentifier;
|
|
485
|
+
else params.to = target.to;
|
|
486
|
+
const client = opts.client ?? (opts.createClient ? await opts.createClient({
|
|
487
|
+
cliPath,
|
|
488
|
+
dbPath
|
|
489
|
+
}) : await createIMessageRpcClient({
|
|
490
|
+
cliPath,
|
|
491
|
+
dbPath
|
|
492
|
+
}));
|
|
493
|
+
const shouldClose = !opts.client;
|
|
494
|
+
try {
|
|
495
|
+
const result = await client.request("send", params, { timeoutMs: opts.timeoutMs });
|
|
496
|
+
return { messageId: resolveMessageId(result) ?? (result?.ok ? "ok" : "unknown") };
|
|
497
|
+
} finally {
|
|
498
|
+
if (shouldClose) await client.stop();
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
//#endregion
|
|
503
|
+
export { isAllowedIMessageSender as a, parseChatAllowTargetPrefixes as c, resolveServicePrefixedTarget as d, formatAllowFromLowercase as f, formatIMessageChatTarget as i, parseChatTargetPrefixesOrThrow as l, isNormalizedSenderAllowed as m, createIMessageRpcClient as n, normalizeIMessageHandle as o, isAllowedParsedChatSender as p, DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS as r, parseIMessageTarget as s, sendMessageIMessage as t, resolveServicePrefixedAllowTarget as u };
|