@fased/fased 0.1.41 → 0.1.43
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/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/cli/daemon-cli/restart-health.js +49 -13
- package/dist/cli/plugins-cli.js +6 -103
- package/dist/cli/plugins-doctor-cli.js +45 -0
- package/dist/cli/plugins-info-cli.js +50 -0
- package/dist/cli/plugins-status-cli.js +4 -0
- package/dist/cli/program/routes.js +38 -0
- package/dist/cli/update-cli/shared.js +1 -29
- package/dist/cli/update-cli/update-command.js +87 -28
- package/dist/config/legacy.migrations.part-3.js +25 -0
- package/dist/gateway/server-plugins.js +12 -0
- package/dist/infra/hosted-runtime-artifact.js +40 -1
- package/dist/infra/update-global.js +1 -0
- package/dist/infra/update-runner.js +318 -38
- package/dist/light-plugin-doctor.js +1 -0
- package/dist/light-plugin-info.js +2 -0
- package/dist/light-update-precheck.js +1 -0
- package/dist/light-update-status.js +12 -0
- package/dist/plugin-sdk/account-id.d.ts +2 -1
- package/dist/plugin-sdk/account-id.js +1 -32
- package/dist/plugin-sdk/accounts-Bz_2QZSt.js +305 -0
- package/dist/plugin-sdk/accounts-CuqIKU8X.js +84 -0
- package/dist/plugin-sdk/accounts-RHZyaB73.js +63 -0
- package/dist/plugin-sdk/actions-CysoQjk1.js +150 -0
- package/dist/plugin-sdk/active-listener-C5ALSs7Y.js +37 -0
- package/dist/plugin-sdk/agent-scope-BbgPlhtw.js +1372 -0
- package/dist/plugin-sdk/allow-list-yqasgPpz.js +479 -0
- package/dist/plugin-sdk/audio-preflight-CzG6BjAn.js +107 -0
- package/dist/plugin-sdk/audit-BFnu5TVB.js +90 -0
- package/dist/plugin-sdk/blocks-input-DdQwSVtP.js +30 -0
- package/dist/plugin-sdk/channel-access-BiWxa3LR.js +68 -0
- package/dist/plugin-sdk/channel-access-configure-gJvqbbXB.js +28 -0
- package/dist/plugin-sdk/channel-adapters.discord-g8Do3f5N.js +35 -0
- package/dist/plugin-sdk/channel-core-CMPoGCik.js +1 -0
- package/dist/plugin-sdk/channel-plugin-common.d.ts +5 -1
- package/dist/plugin-sdk/channel-plugin-common.js +18 -1014
- package/dist/plugin-sdk/chat-type-CK5stkc4.d.ts +4 -0
- package/dist/plugin-sdk/chunk-CuJIMshx.js +341 -0
- package/dist/plugin-sdk/chunk-items-CxRDAM7m.js +34 -0
- package/dist/plugin-sdk/command-status.d.ts +20 -1
- package/dist/plugin-sdk/command-status.js +58 -47
- package/dist/plugin-sdk/commands-registry-DwQIFJmL.js +1337 -0
- package/dist/plugin-sdk/common-C90EHP1w.js +440 -0
- package/dist/plugin-sdk/config-DKNrb8oT.js +23271 -0
- package/dist/plugin-sdk/device-pair.d.ts +3 -1
- package/dist/plugin-sdk/device-pair.js +8 -840
- package/dist/plugin-sdk/device-pairing-J1IH1jFl.js +156 -0
- package/dist/plugin-sdk/diagnostic-C16gioN6.js +282 -0
- package/dist/plugin-sdk/directory-live-DK_83362.js +105 -0
- package/dist/plugin-sdk/directory-live-G7AN8y8N.js +88 -0
- package/dist/plugin-sdk/discord.d.ts +91 -1
- package/dist/plugin-sdk/discord.js +71 -3287
- package/dist/plugin-sdk/draft-stream-controls-DGYBMJYc.js +323 -0
- package/dist/plugin-sdk/exec-DQ8j4Fm3.js +230 -0
- package/dist/plugin-sdk/fetch-RV7QDF43.js +68 -0
- package/dist/plugin-sdk/fetch-guard-CxXvFYq5.js +168 -0
- package/dist/plugin-sdk/filesystem-manager-CeSmCA_A.js +188 -0
- package/dist/plugin-sdk/fs-safe-DztQeyQe.js +192 -0
- package/dist/plugin-sdk/group-mentions-DLOOve8d.d.ts +108 -0
- package/dist/plugin-sdk/guilds-n7MMnX1c.js +13 -0
- package/dist/plugin-sdk/handle-action-DkfMckah.js +1450 -0
- package/dist/plugin-sdk/helpers-C1pcZJsv.js +439 -0
- package/dist/plugin-sdk/image-ops-BSQmb-17.js +510 -0
- package/dist/plugin-sdk/index.d.ts +2575 -1
- package/dist/plugin-sdk/index.js +63 -783
- package/dist/plugin-sdk/ip-BkeyFRJr.js +181 -0
- package/dist/plugin-sdk/links-D5ecKoG9.js +74 -0
- package/dist/plugin-sdk/logger-BbFvCoKk.js +48 -0
- package/dist/plugin-sdk/login-YbYyMkkE.js +61 -0
- package/dist/plugin-sdk/login-qr-DvJw8_2g.js +326 -0
- package/dist/plugin-sdk/manager-DQ1dH8OM.js +3792 -0
- package/dist/plugin-sdk/markdown-tables-DrB-IM8r.js +29 -0
- package/dist/plugin-sdk/media-D8pWjqEt.js +1137 -0
- package/dist/plugin-sdk/memory-search-DHSeU4pJ.js +242 -0
- package/dist/plugin-sdk/monitor-B1PUtkd6.js +4539 -0
- package/dist/plugin-sdk/monitor-BrxWsb7H.js +7739 -0
- package/dist/plugin-sdk/openresponses-http-DJ2lfMja.js +923 -0
- package/dist/plugin-sdk/optional-runtime-dependency-Bt_3Yigu.js +41 -0
- package/dist/plugin-sdk/outbound-B5ukMdUv.js +224 -0
- package/dist/plugin-sdk/outbound-attachment-C9oadpUP.js +95 -0
- package/dist/plugin-sdk/pairing-message-B787pcJI.js +293 -0
- package/dist/plugin-sdk/pairing-message-DWXHX-jt.d.ts +46 -0
- package/dist/plugin-sdk/pairing-store-BdOcH_GA.js +437 -0
- package/dist/plugin-sdk/pairing-token-HQpaqod5.js +91 -0
- package/dist/plugin-sdk/path-alias-guards-BlIJ0AmG.js +43 -0
- package/dist/plugin-sdk/pi-embedded-runner-DMfkIj60.js +95517 -0
- package/dist/plugin-sdk/pi-model-discovery-DQdXL_-F.js +134 -0
- package/dist/plugin-sdk/pi-model-discovery-runtime-IwiWDCQ3.js +14 -0
- package/dist/plugin-sdk/probe-CJ6lN-jD.js +41 -0
- package/dist/plugin-sdk/probe-CvXWxzag.js +68 -0
- package/dist/plugin-sdk/probe-DO4M1Qd1.js +109 -0
- package/dist/plugin-sdk/probe-DbhD54Aw.js +89 -0
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +42 -1
- package/dist/plugin-sdk/pw-ai-BgsJH_P8.js +1931 -0
- package/dist/plugin-sdk/qmd-manager-D2LMB27z.js +1335 -0
- package/dist/plugin-sdk/query-expansion-BM7lmqaP.js +769 -0
- package/dist/plugin-sdk/replies-BPFt4O-j.js +107 -0
- package/dist/plugin-sdk/reply-prefix-CbPHNXlm.js +171 -0
- package/dist/plugin-sdk/resolve-channels-B-dUtZYa.js +4 -0
- package/dist/plugin-sdk/resolve-channels-sscr14hU.js +208 -0
- package/dist/plugin-sdk/resolve-outbound-target-BP_JscKT.js +40 -0
- package/dist/plugin-sdk/resolve-route-wp5xq4Ws.js +249 -0
- package/dist/plugin-sdk/resolve-users-B63RqPIO.js +118 -0
- package/dist/plugin-sdk/resolve-users-C1sjzEsV.js +125 -0
- package/dist/plugin-sdk/retry-policy-BTH89onl.js +70 -0
- package/dist/plugin-sdk/run-command-i_W6EFb1.d.ts +99 -0
- package/dist/plugin-sdk/runtime-BUpqjZNM.js +6821 -0
- package/dist/plugin-sdk/runtime-dependency-pUwxUAJp.js +2110 -0
- package/dist/plugin-sdk/sandbox-paths-fc-HFGJr.js +158 -0
- package/dist/plugin-sdk/sat-runtime.d.ts +932 -1
- package/dist/plugin-sdk/sat-runtime.js +23 -11815
- package/dist/plugin-sdk/send-CRI83FPV.js +1353 -0
- package/dist/plugin-sdk/send-DGUAXb2b.js +518 -0
- package/dist/plugin-sdk/send-DUp9GIX8.js +329 -0
- package/dist/plugin-sdk/send-DWB5HFdb.js +547 -0
- package/dist/plugin-sdk/send-zn5KBXIN.js +2250 -0
- package/dist/plugin-sdk/session-BLyxz03u.js +175 -0
- package/dist/plugin-sdk/session-key--_1zVBRB.d.ts +17 -0
- package/dist/plugin-sdk/shared-V35XNAbz.js +37 -0
- package/dist/plugin-sdk/skill-commands-DCnCOVR_.js +1514 -0
- package/dist/plugin-sdk/slack-B6lIY1Jk.js +3742 -0
- package/dist/plugin-sdk/slack-actions-Dwy-8Zg7.js +254 -0
- package/dist/plugin-sdk/slack.d.ts +73 -1
- package/dist/plugin-sdk/slack.js +28 -2568
- package/dist/plugin-sdk/ssrf-D_4q0mKh.js +209 -0
- package/dist/plugin-sdk/sticker-cache-D4Ljzv1P.js +170 -0
- package/dist/plugin-sdk/tables-DX84FwPB.js +55 -0
- package/dist/plugin-sdk/tailscale-status-BGBRraZW.js +104 -0
- package/dist/plugin-sdk/targets-BgSHco9b.js +101 -0
- package/dist/plugin-sdk/targets-CuTZl1mO.js +79 -0
- package/dist/plugin-sdk/telegram-actions-tOhBd6st.js +319 -0
- package/dist/plugin-sdk/telegram.d.ts +39 -1
- package/dist/plugin-sdk/telegram.js +26 -2530
- package/dist/plugin-sdk/thread-bindings.lifecycle-DjpMLjhY.js +823 -0
- package/dist/plugin-sdk/thread-bindings.state-DYYR9qeT.js +643 -0
- package/dist/plugin-sdk/tmp-fased-dir-Be1wBhVz.d.ts +77 -0
- package/dist/plugin-sdk/tokens-Do_JU4Rh.js +21 -0
- package/dist/plugin-sdk/types-CBCtqtMn.d.ts +54 -0
- package/dist/plugin-sdk/types-CJGVZX6j.d.ts +1795 -0
- package/dist/plugin-sdk/types-CXLEOrJX.d.ts +3359 -0
- package/dist/plugin-sdk/types.plugin-CvUiB3Kh.d.ts +4959 -0
- package/dist/plugin-sdk/ui-KGr1WRXC.js +33 -0
- package/dist/plugin-sdk/wallet-status-CdxTkLWz.js +11880 -0
- package/dist/plugin-sdk/web-CX12Rpz1.js +2238 -0
- package/dist/plugin-sdk/whatsapp-actions-DISRDbu1.js +92 -0
- package/dist/plugin-sdk/whatsapp-heartbeat-KM3lYpt-.js +70 -0
- package/dist/plugin-sdk/whatsapp.d.ts +239 -1
- package/dist/plugin-sdk/whatsapp.js +29 -2474
- package/dist/plugin-sdk/ws-CxmRDbD9.js +114 -0
- package/dist/plugin-sdk/wsl-Cw-xOsqF.js +554 -0
- package/dist/plugin-sdk/zod-schema.providers-core-BEbNizPe.d.ts +1773 -0
- package/dist/plugins/status-cache.js +112 -0
- package/dist/plugins/status-manifest.js +61 -0
- package/dist/plugins/status.js +23 -2
- package/dist/wizard/onboarding.gateway-config.js +0 -21
- 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/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/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 +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -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/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/fased.mjs +29 -1
- package/package.json +6 -4
- package/dist/plugin-sdk/account-helpers-CMvQP0I-.js +0 -38
- package/dist/plugin-sdk/accounts-BJFheJNv.js +0 -62
- package/dist/plugin-sdk/accounts-BRbbLNW_.js +0 -76
- package/dist/plugin-sdk/accounts-BwkH5bTD.js +0 -304
- package/dist/plugin-sdk/accounts-COY-15zJ.js +0 -231
- package/dist/plugin-sdk/accounts-D7_p-Ivb.js +0 -62
- package/dist/plugin-sdk/accounts-DTdM1xcj.js +0 -76
- package/dist/plugin-sdk/accounts-RT6y7n3H.js +0 -304
- package/dist/plugin-sdk/actions-BrU_JMqM.js +0 -149
- package/dist/plugin-sdk/actions-CUdVHzeJ.js +0 -149
- package/dist/plugin-sdk/active-listener-CE8t5g6l.js +0 -37
- package/dist/plugin-sdk/active-listener-Dx1SEGDn.js +0 -37
- package/dist/plugin-sdk/agent-scope-BuTbywla.js +0 -1641
- package/dist/plugin-sdk/agent-scope-kIJqg5PA.js +0 -1641
- package/dist/plugin-sdk/allow-list-C9N6FKeC.js +0 -479
- package/dist/plugin-sdk/allow-list-CBtbuDI8.js +0 -473
- package/dist/plugin-sdk/allow-list-Cgjx0Mc-.js +0 -215
- package/dist/plugin-sdk/audio-preflight-Chxqjwxe.js +0 -96
- package/dist/plugin-sdk/audio-preflight-aupYKWfa.js +0 -96
- package/dist/plugin-sdk/audit-DxB2Kml5.js +0 -78
- package/dist/plugin-sdk/audit-sSeRDwJb.js +0 -78
- package/dist/plugin-sdk/channel-adapters.discord-Chc31YZN.js +0 -35
- package/dist/plugin-sdk/channel-adapters.discord-DXVW1q8n.js +0 -35
- package/dist/plugin-sdk/chat-type-CH3W-zKy.js +0 -11
- package/dist/plugin-sdk/chunk-KCxbJLsV.js +0 -341
- package/dist/plugin-sdk/chunk-M2d7r-Zt.js +0 -341
- package/dist/plugin-sdk/chunk-items-BDhRe_xU.js +0 -34
- package/dist/plugin-sdk/client-DP_eXDIO.js +0 -22
- package/dist/plugin-sdk/client-Dn_01zRN.js +0 -28
- package/dist/plugin-sdk/command-poll-backoff-q0xAK3nQ.js +0 -65
- package/dist/plugin-sdk/commands-registry-CdT-nl7v.js +0 -1337
- package/dist/plugin-sdk/commands-registry-DoWdYAJd.js +0 -1337
- package/dist/plugin-sdk/common-Cpw-vuuM.js +0 -440
- package/dist/plugin-sdk/common-DJWrErdE.js +0 -440
- package/dist/plugin-sdk/config-B6SjJFp-.js +0 -20435
- package/dist/plugin-sdk/config-BULEb5QB.js +0 -19698
- package/dist/plugin-sdk/config-C0qggNKQ.js +0 -20423
- package/dist/plugin-sdk/config-CgwTaper.js +0 -22905
- package/dist/plugin-sdk/config-DLVjQxOu.js +0 -20435
- package/dist/plugin-sdk/config-DgD5T-Ui.js +0 -20656
- package/dist/plugin-sdk/config-DtqAN2L3.js +0 -23249
- package/dist/plugin-sdk/conversation-label-CDH4rKMG.js +0 -36
- package/dist/plugin-sdk/date-time-BtRPVcm7.js +0 -120
- package/dist/plugin-sdk/diagnostic-CuhHqubd.js +0 -282
- package/dist/plugin-sdk/diagnostic-DpyvOvs2.js +0 -275
- package/dist/plugin-sdk/diagnostic-session-state-Zw87xFym.js +0 -59
- package/dist/plugin-sdk/directory-live-8umGGN7a.js +0 -88
- package/dist/plugin-sdk/directory-live-BC7oHcsY.js +0 -105
- package/dist/plugin-sdk/directory-live-BJgud06p.js +0 -105
- package/dist/plugin-sdk/directory-live-BxSH0XXX.js +0 -88
- package/dist/plugin-sdk/draft-stream-controls-Bfbhumzv.js +0 -323
- package/dist/plugin-sdk/draft-stream-controls-v_5gdUYG.js +0 -323
- package/dist/plugin-sdk/draft-stream-loop-B3uUPmuU.js +0 -81
- package/dist/plugin-sdk/extensions/sat-mining/src/config.d.ts +0 -117
- package/dist/plugin-sdk/extensions/sat-mining/src/hash-spec.d.ts +0 -58
- package/dist/plugin-sdk/extensions/sat-mining/src/rpc-read.d.ts +0 -648
- package/dist/plugin-sdk/extensions/sat-mining/src/sat-bond-layout.d.ts +0 -110
- package/dist/plugin-sdk/extensions/sat-mining/src/solana-submit.d.ts +0 -297
- package/dist/plugin-sdk/fetch-D70syO9t.js +0 -68
- package/dist/plugin-sdk/fetch-guard-BLdujDnt.js +0 -163
- package/dist/plugin-sdk/fetch-guard-DTKgMN9f.js +0 -163
- package/dist/plugin-sdk/fetch-headers-my7hgV2G.js +0 -26
- package/dist/plugin-sdk/fetch-timeout-l_6RdoMw.js +0 -43
- package/dist/plugin-sdk/fetch-xfeOsibm.js +0 -68
- package/dist/plugin-sdk/filesystem-manager-BEd8NKL9.js +0 -186
- package/dist/plugin-sdk/filesystem-manager-D-4lQ3Af.js +0 -186
- package/dist/plugin-sdk/fs-safe-BDnJzutp.js +0 -192
- package/dist/plugin-sdk/fs-safe-BPYS6-j1.js +0 -192
- package/dist/plugin-sdk/gateway-registry-w_Z-PHGf.js +0 -58
- package/dist/plugin-sdk/github-copilot-token-Djqpy66R.js +0 -127
- package/dist/plugin-sdk/globals-BtKmaIS3.js +0 -439
- package/dist/plugin-sdk/guilds-BdkvRFue.js +0 -13
- package/dist/plugin-sdk/guilds-DmzO7n0X.js +0 -13
- package/dist/plugin-sdk/guilds-iTYlgBat.js +0 -13
- package/dist/plugin-sdk/handle-action-B61D85yo.js +0 -1445
- package/dist/plugin-sdk/handle-action-CjcxGzQD.js +0 -1445
- package/dist/plugin-sdk/inbound-context-CeJDjLk-.js +0 -68
- package/dist/plugin-sdk/internal-DMTDEiDF.js +0 -247
- package/dist/plugin-sdk/ip-Ddk9SPR-.js +0 -47
- package/dist/plugin-sdk/login-CB_nCjX3.js +0 -61
- package/dist/plugin-sdk/login-CzUuDd1v.js +0 -61
- package/dist/plugin-sdk/login-YveoqEvH.js +0 -268
- package/dist/plugin-sdk/login-qr-D7MEpFza.js +0 -324
- package/dist/plugin-sdk/login-qr-DgxfBFVN.js +0 -324
- package/dist/plugin-sdk/manager-9see0IX5.js +0 -3792
- package/dist/plugin-sdk/manager-D2kZ0Cps.js +0 -3792
- package/dist/plugin-sdk/markdown-tables-CCSD52rA.js +0 -29
- package/dist/plugin-sdk/markdown-tables-DWUNvLrc.js +0 -29
- package/dist/plugin-sdk/media-C7YT4DeU.js +0 -1641
- package/dist/plugin-sdk/media-Cxw-xLGU.js +0 -1641
- package/dist/plugin-sdk/memory-search-B-0Fwnrp.js +0 -242
- package/dist/plugin-sdk/memory-search-J6AYuENR.js +0 -242
- package/dist/plugin-sdk/monitor-38DGeIwS.js +0 -4528
- package/dist/plugin-sdk/monitor-CYCSEVee.js +0 -7743
- package/dist/plugin-sdk/monitor-Ceu-Wayc.js +0 -4528
- package/dist/plugin-sdk/monitor-DCyBaUCs.js +0 -7728
- package/dist/plugin-sdk/openresponses-http-CCfimy89.js +0 -912
- package/dist/plugin-sdk/openresponses-http-DAL_9jE-.js +0 -912
- package/dist/plugin-sdk/optional-runtime-dependency-szS49voX.js +0 -426
- package/dist/plugin-sdk/outbound-BCxOxdi-.js +0 -224
- package/dist/plugin-sdk/outbound-JIwQbpRY.js +0 -224
- package/dist/plugin-sdk/outbound-attachment-C-jSFaEB.js +0 -94
- package/dist/plugin-sdk/outbound-attachment-D6tj5Y5H.js +0 -78
- package/dist/plugin-sdk/path-alias-guards-C76pC928.js +0 -43
- package/dist/plugin-sdk/path-alias-guards-CcQroDXQ.js +0 -43
- package/dist/plugin-sdk/paths-DTurNPnO.js +0 -158
- package/dist/plugin-sdk/paths-GdhK5mV_.js +0 -191
- package/dist/plugin-sdk/pi-embedded-runner-Dum71Tdo.js +0 -107134
- package/dist/plugin-sdk/pi-model-discovery-DadlvsZW.js +0 -134
- package/dist/plugin-sdk/pi-model-discovery-G2L8gMcs.js +0 -22703
- package/dist/plugin-sdk/pi-model-discovery-runtime-BpR1pe7K.js +0 -3
- package/dist/plugin-sdk/pi-model-discovery-runtime-C5ssE6EW.js +0 -127
- package/dist/plugin-sdk/pi-model-discovery-runtime-CQOauapl.js +0 -127
- package/dist/plugin-sdk/pi-model-discovery-runtime-DAaOPt64.js +0 -12
- package/dist/plugin-sdk/pi-model-discovery-runtime-DYfUuqPN.js +0 -127
- package/dist/plugin-sdk/pi-model-discovery-runtime-DyOIGBor.js +0 -127
- package/dist/plugin-sdk/pi-model-discovery-runtime-gd77b0UF.js +0 -12
- package/dist/plugin-sdk/pi-model-discovery-runtime-w4DRRv53.js +0 -128
- package/dist/plugin-sdk/pi-model-discovery-yifTIDIn.js +0 -134
- package/dist/plugin-sdk/polls-D0YNJBfc.js +0 -33
- package/dist/plugin-sdk/probe-0Xt6fbw2.js +0 -109
- package/dist/plugin-sdk/probe-1paqsAk5.js +0 -89
- package/dist/plugin-sdk/probe-BPYqD-cg.js +0 -68
- package/dist/plugin-sdk/probe-Ba4KG8Vi.js +0 -41
- package/dist/plugin-sdk/probe-BfzwvkxZ.js +0 -68
- package/dist/plugin-sdk/probe-CsFmvxbr.js +0 -89
- package/dist/plugin-sdk/probe-Dqx0N4uk.js +0 -109
- package/dist/plugin-sdk/probe-DrTulmwQ.js +0 -41
- package/dist/plugin-sdk/proxy-CV9uL4Wi.js +0 -16
- package/dist/plugin-sdk/pw-ai-SNCI9UXT.js +0 -1926
- package/dist/plugin-sdk/pw-ai-sH1Pi-Fh.js +0 -1926
- package/dist/plugin-sdk/qmd-manager-BfJXNhlO.js +0 -1333
- package/dist/plugin-sdk/qmd-manager-QNVr__Z6.js +0 -1333
- package/dist/plugin-sdk/qmd-scope-Cei2-7Q5.js +0 -78
- package/dist/plugin-sdk/query-expansion-DjJAUtDU.js +0 -769
- package/dist/plugin-sdk/query-expansion-VePrajug.js +0 -769
- package/dist/plugin-sdk/redact-Ck-wgswc.js +0 -188
- package/dist/plugin-sdk/redact-identifier-DdQO7P4_.js +0 -15
- package/dist/plugin-sdk/registry-DNkJsNsz.js +0 -6463
- package/dist/plugin-sdk/replies-fvzN5wnU.js +0 -107
- package/dist/plugin-sdk/replies-zebgZCHX.js +0 -107
- package/dist/plugin-sdk/reply-prefix-DqlCqHXT.js +0 -171
- package/dist/plugin-sdk/reply-prefix-Y14LY6Rn.js +0 -171
- package/dist/plugin-sdk/reply-reference-mUSl_ExV.js +0 -35
- package/dist/plugin-sdk/resolve-channels-CGCkchAo.js +0 -208
- package/dist/plugin-sdk/resolve-channels-CHkzoB7d.js +0 -4
- package/dist/plugin-sdk/resolve-channels-CIoMOUEH.js +0 -88
- package/dist/plugin-sdk/resolve-channels-CU3vZXOG.js +0 -4
- package/dist/plugin-sdk/resolve-channels-J5m_-ZOk.js +0 -208
- package/dist/plugin-sdk/resolve-channels-gIpOj1wt.js +0 -206
- package/dist/plugin-sdk/resolve-route-CNhTJG_2.js +0 -248
- package/dist/plugin-sdk/resolve-route-DO0WR4nB.js +0 -248
- package/dist/plugin-sdk/resolve-users-Bm78yvE3.js +0 -123
- package/dist/plugin-sdk/resolve-users-C0F3LQs2.js +0 -118
- package/dist/plugin-sdk/resolve-users-CTKaESmf.js +0 -116
- package/dist/plugin-sdk/resolve-users-Ct0fO5kP.js +0 -125
- package/dist/plugin-sdk/resolve-users-DlpsBzVS.js +0 -118
- package/dist/plugin-sdk/resolve-users-sv9og6yh.js +0 -125
- package/dist/plugin-sdk/resolve-utils-r6ef8mj8.js +0 -147
- package/dist/plugin-sdk/retry-CB29XXbz.js +0 -780
- package/dist/plugin-sdk/retry-Cq65ROXv.js +0 -77
- package/dist/plugin-sdk/retry-policy-BLYEgIwP.js +0 -70
- package/dist/plugin-sdk/retry-policy-sM01QZT2.js +0 -70
- package/dist/plugin-sdk/run-with-concurrency-CavAFhML.js +0 -42
- package/dist/plugin-sdk/runtime-BPyuAmka.js +0 -6577
- package/dist/plugin-sdk/runtime-dependency-B-1u41Ph.js +0 -2217
- package/dist/plugin-sdk/runtime-dependency-Csswyv5r.js +0 -2217
- package/dist/plugin-sdk/sandbox-paths-CkTERCrj.js +0 -158
- package/dist/plugin-sdk/sandbox-paths-DMnFyOaA.js +0 -158
- package/dist/plugin-sdk/secure-random-DLpYiUzR.js +0 -12
- package/dist/plugin-sdk/send-B09HRfHN.js +0 -1351
- package/dist/plugin-sdk/send-BBYcgXA4.js +0 -546
- package/dist/plugin-sdk/send-BQXQA81e.js +0 -2249
- package/dist/plugin-sdk/send-BzFdvD_i.js +0 -1351
- package/dist/plugin-sdk/send-C3u-F_8s.js +0 -2249
- package/dist/plugin-sdk/send-D3836_UN.js +0 -505
- package/dist/plugin-sdk/send-D7tr-EsH.js +0 -546
- package/dist/plugin-sdk/send-DRGzRdI3.js +0 -518
- package/dist/plugin-sdk/send-DfkPKz_0.js +0 -356
- package/dist/plugin-sdk/send-DsxFXrCO.js +0 -356
- package/dist/plugin-sdk/session-DG_bYisw.js +0 -175
- package/dist/plugin-sdk/session-EIStzK0E.js +0 -175
- package/dist/plugin-sdk/session-key-Bp3qq3bm.js +0 -228
- package/dist/plugin-sdk/skill-commands-CkgGmWBS.js +0 -1600
- package/dist/plugin-sdk/skill-commands-hyZA0LE3.js +0 -1571
- package/dist/plugin-sdk/slack-B0dLDyHM.js +0 -3731
- package/dist/plugin-sdk/slack-Dv4zCw-x.js +0 -3730
- package/dist/plugin-sdk/slack-actions-BQawWGTJ.js +0 -248
- package/dist/plugin-sdk/slack-actions-DDMszx56.js +0 -248
- package/dist/plugin-sdk/src/acp/acpx-mutating-wrapper-policy.d.ts +0 -35
- package/dist/plugin-sdk/src/acp/acpx-push-test-approval-contract.d.ts +0 -62
- package/dist/plugin-sdk/src/acp/acpx-push-test-execution-adapter.d.ts +0 -44
- package/dist/plugin-sdk/src/acp/control-plane/manager.core.d.ts +0 -74
- package/dist/plugin-sdk/src/acp/control-plane/manager.d.ts +0 -7
- package/dist/plugin-sdk/src/acp/control-plane/manager.identity-reconcile.d.ts +0 -23
- package/dist/plugin-sdk/src/acp/control-plane/manager.runtime-controls.d.ts +0 -14
- package/dist/plugin-sdk/src/acp/control-plane/manager.types.d.ts +0 -103
- package/dist/plugin-sdk/src/acp/control-plane/manager.utils.d.ts +0 -14
- package/dist/plugin-sdk/src/acp/control-plane/runtime-cache.d.ts +0 -38
- package/dist/plugin-sdk/src/acp/control-plane/runtime-options.d.ts +0 -23
- package/dist/plugin-sdk/src/acp/control-plane/session-actor-queue.d.ts +0 -8
- package/dist/plugin-sdk/src/acp/control-plane/spawn.d.ts +0 -25
- package/dist/plugin-sdk/src/acp/policy.d.ts +0 -10
- package/dist/plugin-sdk/src/acp/runtime/error-text.d.ts +0 -7
- package/dist/plugin-sdk/src/acp/runtime/errors.d.ts +0 -20
- package/dist/plugin-sdk/src/acp/runtime/registry.d.ts +0 -18
- package/dist/plugin-sdk/src/acp/runtime/session-identifiers.d.ts +0 -17
- package/dist/plugin-sdk/src/acp/runtime/session-identity.d.ts +0 -23
- package/dist/plugin-sdk/src/acp/runtime/session-meta.d.ts +0 -30
- package/dist/plugin-sdk/src/acp/runtime/types.d.ts +0 -102
- package/dist/plugin-sdk/src/acp/status-snapshot.d.ts +0 -54
- package/dist/plugin-sdk/src/agents/acp-spawn-parent-stream.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/acp-spawn.d.ts +0 -39
- package/dist/plugin-sdk/src/agents/agent-model-providers.d.ts +0 -47
- package/dist/plugin-sdk/src/agents/agent-paths.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/agent-scope.d.ts +0 -71
- package/dist/plugin-sdk/src/agents/announce-idempotency.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/anthropic-payload-log.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/api-key-rotation.d.ts +0 -22
- package/dist/plugin-sdk/src/agents/apply-patch-update.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/apply-patch.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/auth-health.d.ts +0 -40
- package/dist/plugin-sdk/src/agents/auth-profiles/constants.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/auth-profiles/display.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/auth-profiles/doctor.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/auth-profiles/external-cli-sync.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/auth-profiles/oauth.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/auth-profiles/order.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/auth-profiles/paths.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/auth-profiles/profiles.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/auth-profiles/repair.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/auth-profiles/session-override.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/auth-profiles/store.d.ts +0 -24
- package/dist/plugin-sdk/src/agents/auth-profiles/types.d.ts +0 -65
- package/dist/plugin-sdk/src/agents/auth-profiles/usage.d.ts +0 -85
- package/dist/plugin-sdk/src/agents/auth-profiles.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/bash-process-registry.d.ts +0 -72
- package/dist/plugin-sdk/src/agents/bash-tools.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/bash-tools.exec-approval-followup.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/bash-tools.exec-approval-request.d.ts +0 -70
- package/dist/plugin-sdk/src/agents/bash-tools.exec-host-gateway.d.ts +0 -34
- package/dist/plugin-sdk/src/agents/bash-tools.exec-host-node.d.ts +0 -26
- package/dist/plugin-sdk/src/agents/bash-tools.exec-host-shared.d.ts +0 -155
- package/dist/plugin-sdk/src/agents/bash-tools.exec-runtime.d.ts +0 -116
- package/dist/plugin-sdk/src/agents/bash-tools.exec-types.d.ts +0 -76
- package/dist/plugin-sdk/src/agents/bash-tools.exec.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/bash-tools.process.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/bash-tools.shared.d.ts +0 -56
- package/dist/plugin-sdk/src/agents/bootstrap-budget.d.ts +0 -87
- package/dist/plugin-sdk/src/agents/bootstrap-cache.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/bootstrap-files.d.ts +0 -32
- package/dist/plugin-sdk/src/agents/bootstrap-hooks.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/byteplus-models.d.ts +0 -128
- package/dist/plugin-sdk/src/agents/cache-trace.d.ts +0 -49
- package/dist/plugin-sdk/src/agents/channel-tools.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/chutes-models.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/chutes-oauth.d.ts +0 -46
- package/dist/plugin-sdk/src/agents/cli-backends.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/cli-credentials.d.ts +0 -72
- package/dist/plugin-sdk/src/agents/cli-runner/helpers.d.ts +0 -72
- package/dist/plugin-sdk/src/agents/cli-runner/reliability.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/cli-runner.d.ts +0 -42
- package/dist/plugin-sdk/src/agents/cli-session.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/cli-watchdog-defaults.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/cloudflare-ai-gateway.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/command-poll-backoff.d.ts +0 -28
- package/dist/plugin-sdk/src/agents/compaction.d.ts +0 -72
- package/dist/plugin-sdk/src/agents/content-blocks.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/context-window-guard.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/context.d.ts +0 -38
- package/dist/plugin-sdk/src/agents/current-model-catalog.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/current-time.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/date-time.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/defaults.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/docs-path.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/doubao-models.d.ts +0 -128
- package/dist/plugin-sdk/src/agents/embedded-pi-mcp.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/exec-approval-result.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/failover-error.d.ts +0 -33
- package/dist/plugin-sdk/src/agents/fased-tools.d.ts +0 -58
- package/dist/plugin-sdk/src/agents/glob-pattern.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/huggingface-models.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/identity-avatar.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/identity-file.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/identity.d.ts +0 -28
- package/dist/plugin-sdk/src/agents/image-sanitization.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/lanes.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/live-auth-keys.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/mcp-config-shared.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/mcp-http.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/mcp-stdio.d.ts +0 -16
- package/dist/plugin-sdk/src/agents/mcp-transport-config.d.ts +0 -23
- package/dist/plugin-sdk/src/agents/mcp-transport.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/memory-search.d.ts +0 -80
- package/dist/plugin-sdk/src/agents/minimax-vlm.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/model-alias-lines.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/model-auth-label.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/model-auth.d.ts +0 -37
- package/dist/plugin-sdk/src/agents/model-catalog-access.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/model-catalog-normalized.d.ts +0 -27
- package/dist/plugin-sdk/src/agents/model-catalog-source.d.ts +0 -41
- package/dist/plugin-sdk/src/agents/model-catalog-status.d.ts +0 -92
- package/dist/plugin-sdk/src/agents/model-catalog.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/model-compat.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/model-fallback.d.ts +0 -54
- package/dist/plugin-sdk/src/agents/model-forward-compat.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/model-metadata.d.ts +0 -49
- package/dist/plugin-sdk/src/agents/model-ref-profile.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/model-selection.d.ts +0 -130
- package/dist/plugin-sdk/src/agents/models-config.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/models-config.providers.d.ts +0 -40
- package/dist/plugin-sdk/src/agents/opencode-zen-models.d.ts +0 -46
- package/dist/plugin-sdk/src/agents/owner-display.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/payload-redaction.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/pi-auth-credentials.d.ts +0 -16
- package/dist/plugin-sdk/src/agents/pi-bundle-mcp-materialize.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/pi-bundle-mcp-names.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-bundle-mcp-runtime.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/pi-bundle-mcp-tools.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/pi-bundle-mcp-types.d.ts +0 -52
- package/dist/plugin-sdk/src/agents/pi-embedded-block-chunker.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/bootstrap.d.ts +0 -33
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/errors.d.ts +0 -70
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/google.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/images.d.ts +0 -22
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/messaging-dedupe.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/openai.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/thinking.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/turns.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers/types.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/pi-embedded-helpers.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/pi-embedded-messaging.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-embedded-payloads.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/abort.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/cache-ttl.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/compact.d.ts +0 -57
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/compaction-safety-timeout.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/extensions.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/extra-params.d.ts +0 -76
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/google.d.ts +0 -42
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/history.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/lanes.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/logger.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/model.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/attempt.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/compaction-timeout.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/history-image-prune.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/images.d.ts +0 -83
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/llm-idle-timeout.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/params.d.ts +0 -128
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/payloads.d.ts +0 -42
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/types.d.ts +0 -67
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/run.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/runs.d.ts +0 -32
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/sandbox-info.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/session-manager-cache.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/session-manager-init.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/system-prompt.d.ts +0 -55
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/thinking.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-name-allowlist.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-result-context-guard.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-result-truncation.d.ts +0 -79
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-split.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/types.d.ts +0 -95
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/utils.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/wait-for-idle-before-flush.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/pi-embedded-runner.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.d.ts +0 -34
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.compaction.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.lifecycle.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.messages.d.ts +0 -16
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.tools.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.types.d.ts +0 -152
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.raw-stream.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.tools.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.types.d.ts +0 -45
- package/dist/plugin-sdk/src/agents/pi-embedded-utils.d.ts +0 -42
- package/dist/plugin-sdk/src/agents/pi-embedded.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/pi-extensions/compaction-safeguard-runtime.d.ts +0 -16
- package/dist/plugin-sdk/src/agents/pi-extensions/compaction-safeguard.d.ts +0 -22
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/extension.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/pruner.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/settings.d.ts +0 -44
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/tools.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/pi-extensions/session-manager-runtime-registry.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/pi-model-discovery-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-model-discovery.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-project-settings.d.ts +0 -28
- package/dist/plugin-sdk/src/agents/pi-settings.d.ts +0 -45
- package/dist/plugin-sdk/src/agents/pi-tool-definition-adapter.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/pi-tools.abort.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/pi-tools.before-tool-call.d.ts +0 -31
- package/dist/plugin-sdk/src/agents/pi-tools.d.ts +0 -84
- package/dist/plugin-sdk/src/agents/pi-tools.policy.d.ts +0 -38
- package/dist/plugin-sdk/src/agents/pi-tools.read.d.ts +0 -61
- package/dist/plugin-sdk/src/agents/pi-tools.schema.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/pi-tools.types.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/prompt-cache-stability.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/provider-attribution.d.ts +0 -70
- package/dist/plugin-sdk/src/agents/provider-auth-aliases.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/provider-extension-catalog-index.d.ts +0 -37
- package/dist/plugin-sdk/src/agents/provider-extension-catalog-manifest.d.ts +0 -29
- package/dist/plugin-sdk/src/agents/provider-id.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/provider-request-config.d.ts +0 -194
- package/dist/plugin-sdk/src/agents/pty-dsr.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/pty-keys.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/queued-file-writer.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/sandbox/backend.d.ts +0 -29
- package/dist/plugin-sdk/src/agents/sandbox/bind-spec.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/sandbox/browser-bridges.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/sandbox/browser.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/sandbox/config-hash.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/sandbox/config.d.ts +0 -32
- package/dist/plugin-sdk/src/agents/sandbox/constants.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/sandbox/context.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/sandbox/docker.d.ts +0 -48
- package/dist/plugin-sdk/src/agents/sandbox/fs-bridge.d.ts +0 -56
- package/dist/plugin-sdk/src/agents/sandbox/fs-paths.d.ts +0 -28
- package/dist/plugin-sdk/src/agents/sandbox/hash.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/sandbox/host-paths.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/sandbox/manage.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/sandbox/network-mode.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/sandbox/novnc-auth.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/sandbox/path-utils.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/sandbox/prune.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/sandbox/registry.d.ts +0 -31
- package/dist/plugin-sdk/src/agents/sandbox/runtime-status.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/sandbox/sanitize-env-vars.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/sandbox/shared.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/sandbox/tool-policy.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/sandbox/types.d.ts +0 -91
- package/dist/plugin-sdk/src/agents/sandbox/types.docker.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/sandbox/validate-sandbox-security.d.ts +0 -68
- package/dist/plugin-sdk/src/agents/sandbox/workspace.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/sandbox-media-paths.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/sandbox-paths.d.ts +0 -24
- package/dist/plugin-sdk/src/agents/sandbox-tool-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/sandbox.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/sanitize-for-prompt.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/schema/clean-for-gemini.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/schema/typebox.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/session-dirs.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/session-file-repair.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/session-slug.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/session-tool-result-guard-wrapper.d.ts +0 -19
- package/dist/plugin-sdk/src/agents/session-tool-result-guard.d.ts +0 -40
- package/dist/plugin-sdk/src/agents/session-transcript-repair.d.ts +0 -34
- package/dist/plugin-sdk/src/agents/session-write-lock.d.ts +0 -54
- package/dist/plugin-sdk/src/agents/shell-utils.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/skills/agent-filter.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills/bundled-context.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills/bundled-dir.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/skills/config.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/skills/env-overrides.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/skills/filter.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/skills/frontmatter.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills/local-loader.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/skills/plugin-skills.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/skills/refresh-state.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/skills/refresh.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/skills/serialize.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/skills/skill-contract.d.ts +0 -27
- package/dist/plugin-sdk/src/agents/skills/source.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/skills/types.d.ts +0 -105
- package/dist/plugin-sdk/src/agents/skills/workspace.d.ts +0 -54
- package/dist/plugin-sdk/src/agents/skills-clawhub.d.ts +0 -150
- package/dist/plugin-sdk/src/agents/skills-install-plan.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/skills-install-trust.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/skills-marketplace-policy.d.ts +0 -29
- package/dist/plugin-sdk/src/agents/skills-marketplace-scan.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/skills-status.d.ts +0 -65
- package/dist/plugin-sdk/src/agents/skills.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/spawned-context.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/stable-stringify.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/subagent-announce-dispatch.d.ts +0 -22
- package/dist/plugin-sdk/src/agents/subagent-announce-output.d.ts +0 -97
- package/dist/plugin-sdk/src/agents/subagent-announce-queue.d.ts +0 -24
- package/dist/plugin-sdk/src/agents/subagent-announce.d.ts +0 -51
- package/dist/plugin-sdk/src/agents/subagent-announce.runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/subagent-depth.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/subagent-lifecycle-events.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/subagent-registry-cleanup.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/subagent-registry-completion.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/subagent-registry-queries.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/subagent-registry-state.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/subagent-registry.d.ts +0 -67
- package/dist/plugin-sdk/src/agents/subagent-registry.store.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/subagent-registry.types.d.ts +0 -62
- package/dist/plugin-sdk/src/agents/subagent-spawn.d.ts +0 -49
- package/dist/plugin-sdk/src/agents/synthetic-models.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/system-prompt-cache-boundary.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/system-prompt-params.d.ts +0 -30
- package/dist/plugin-sdk/src/agents/system-prompt-report.d.ts +0 -22
- package/dist/plugin-sdk/src/agents/system-prompt.d.ts +0 -77
- package/dist/plugin-sdk/src/agents/timeout.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/together-models.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/tool-call-id.d.ts +0 -29
- package/dist/plugin-sdk/src/agents/tool-catalog.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/tool-description-presets.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/tool-description-summary.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tool-display-common.d.ts +0 -70
- package/dist/plugin-sdk/src/agents/tool-display-config.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tool-display-exec-shell.d.ts +0 -17
- package/dist/plugin-sdk/src/agents/tool-display-exec.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/tool-display.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/tool-fs-policy.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/tool-images.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tool-loop-detection.d.ts +0 -55
- package/dist/plugin-sdk/src/agents/tool-mutation.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/tool-policy-match.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/tool-policy-pipeline.d.ts +0 -32
- package/dist/plugin-sdk/src/agents/tool-policy-shared.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tool-policy.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/tool-summaries.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/tools/agent-step.d.ts +0 -23
- package/dist/plugin-sdk/src/agents/tools/agents-list-tool.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/tools/browser-tool.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/tools/browser-tool.schema.d.ts +0 -50
- package/dist/plugin-sdk/src/agents/tools/canvas-tool.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/tools/common.d.ts +0 -86
- package/dist/plugin-sdk/src/agents/tools/cron-tool.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tools/diff-view-tool.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/tools/discord-actions-guild.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/tools/discord-actions-messaging.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/tools/discord-actions-moderation-shared.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/tools/discord-actions-moderation.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/tools/discord-actions-presence.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/tools/discord-actions.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/tools/gateway-tool.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/tools/gateway.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/tools/image-tool.d.ts +0 -37
- package/dist/plugin-sdk/src/agents/tools/image-tool.helpers.d.ts +0 -21
- package/dist/plugin-sdk/src/agents/tools/marketplace-offer-draft-tool.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/tools/memory-tool.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/tools/message-tool.d.ts +0 -26
- package/dist/plugin-sdk/src/agents/tools/mining-tool.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/tools/nodes-tool.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/tools/nodes-utils.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/tools/session-status-tool.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/tools/sessions-access.d.ts +0 -42
- package/dist/plugin-sdk/src/agents/tools/sessions-announce-target.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/tools/sessions-helpers.d.ts +0 -54
- package/dist/plugin-sdk/src/agents/tools/sessions-history-tool.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tools/sessions-list-tool.d.ts +0 -11
- package/dist/plugin-sdk/src/agents/tools/sessions-resolution.d.ts +0 -67
- package/dist/plugin-sdk/src/agents/tools/sessions-send-helpers.d.ts +0 -34
- package/dist/plugin-sdk/src/agents/tools/sessions-send-tool.a2a.d.ts +0 -20
- package/dist/plugin-sdk/src/agents/tools/sessions-send-tool.d.ts +0 -13
- package/dist/plugin-sdk/src/agents/tools/sessions-spawn-tool.d.ts +0 -16
- package/dist/plugin-sdk/src/agents/tools/slack-actions.d.ts +0 -15
- package/dist/plugin-sdk/src/agents/tools/subagents-tool.d.ts +0 -4
- package/dist/plugin-sdk/src/agents/tools/telegram-actions.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/tools/tts-tool.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/tools/wallet-action-tool.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/tools/wallet-skill-policy.d.ts +0 -39
- package/dist/plugin-sdk/src/agents/tools/wallet-tool.d.ts +0 -9
- package/dist/plugin-sdk/src/agents/tools/web-fetch-utils.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/tools/web-fetch-visibility.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/tools/web-fetch.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/tools/web-guarded-fetch.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/tools/web-search.d.ts +0 -148
- package/dist/plugin-sdk/src/agents/tools/web-shared.d.ts +0 -24
- package/dist/plugin-sdk/src/agents/tools/web-tools.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/tools/whatsapp-actions.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/tools/whatsapp-target-auth.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/tools-effective-inventory.d.ts +0 -49
- package/dist/plugin-sdk/src/agents/trace-base.d.ts +0 -10
- package/dist/plugin-sdk/src/agents/transcript-policy.d.ts +0 -25
- package/dist/plugin-sdk/src/agents/usage.d.ts +0 -65
- package/dist/plugin-sdk/src/agents/venice-models.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/volc-models.shared.d.ts +0 -90
- package/dist/plugin-sdk/src/agents/workspace-dir.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/workspace-dirs.d.ts +0 -2
- package/dist/plugin-sdk/src/agents/workspace-run.d.ts +0 -18
- package/dist/plugin-sdk/src/agents/workspace-templates.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/workspace.d.ts +0 -45
- package/dist/plugin-sdk/src/auto-reply/chunk.d.ts +0 -45
- package/dist/plugin-sdk/src/auto-reply/command-auth.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/command-detection.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/commands-args.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/commands-registry.d.ts +0 -55
- package/dist/plugin-sdk/src/auto-reply/commands-registry.data.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/commands-registry.types.d.ts +0 -66
- package/dist/plugin-sdk/src/auto-reply/dispatch.d.ts +0 -32
- package/dist/plugin-sdk/src/auto-reply/envelope.d.ts +0 -58
- package/dist/plugin-sdk/src/auto-reply/fallback-state.d.ts +0 -55
- package/dist/plugin-sdk/src/auto-reply/group-activation.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/heartbeat-reply-payload.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/heartbeat.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/inbound-debounce.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/media-note.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/model-runtime.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/model.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.d.ts +0 -28
- package/dist/plugin-sdk/src/auto-reply/reply/abort.d.ts +0 -33
- package/dist/plugin-sdk/src/auto-reply/reply/acp-projector.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-execution.d.ts +0 -59
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-helpers.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-memory.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-payloads.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-utils.d.ts +0 -148
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.d.ts +0 -38
- package/dist/plugin-sdk/src/auto-reply/reply/bash-command.d.ts +0 -19
- package/dist/plugin-sdk/src/auto-reply/reply/block-reply-coalescer.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/block-reply-pipeline.d.ts +0 -31
- package/dist/plugin-sdk/src/auto-reply/reply/block-streaming.d.ts +0 -36
- package/dist/plugin-sdk/src/auto-reply/reply/body.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/command-gates.d.ts +0 -18
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/context.d.ts +0 -12
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/diagnostics.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/lifecycle.d.ts +0 -5
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/runtime-options.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/shared.d.ts +0 -97
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/targets.d.ts +0 -12
- package/dist/plugin-sdk/src/auto-reply/reply/commands-acp.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-allowlist.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-approve.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-bash.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-compact.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-config.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-context-report.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-context.d.ts +0 -12
- package/dist/plugin-sdk/src/auto-reply/reply/commands-control.d.ts +0 -5
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-export-session.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-info.d.ts +0 -11
- package/dist/plugin-sdk/src/auto-reply/reply/commands-models.d.ts +0 -36
- package/dist/plugin-sdk/src/auto-reply/reply/commands-plugin.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-abort.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-store.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/commands-setunset-standard.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/commands-setunset.d.ts +0 -34
- package/dist/plugin-sdk/src/auto-reply/reply/commands-slash-parse.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/commands-status.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-agents.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-focus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-help.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-info.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-kill.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-list.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-log.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-send.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-spawn.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-unfocus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/shared.d.ts +0 -81
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands-system-prompt.d.ts +0 -14
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tts.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-types.d.ts +0 -63
- package/dist/plugin-sdk/src/auto-reply/reply/commands.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/config-commands.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/config-value.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/debug-commands.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.auth.d.ts +0 -19
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.fast-lane.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.impl.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.levels.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.model-picker.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.model.d.ts +0 -44
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.params.d.ts +0 -51
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.parse.d.ts +0 -62
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.persist.d.ts +0 -37
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.queue-validation.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.shared.d.ts +0 -28
- package/dist/plugin-sdk/src/auto-reply/reply/directive-parsing.d.ts +0 -5
- package/dist/plugin-sdk/src/auto-reply/reply/directives.d.ts +0 -38
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.d.ts +0 -30
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-from-config.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/dispatcher-registry.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/elevated-allowlist-matcher.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/elevated-unavailable.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/exec/directive.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/exec.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/followup-runner.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives-apply.d.ts +0 -64
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives-utils.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives.d.ts +0 -92
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-inline-actions.d.ts +0 -59
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-run.d.ts +0 -69
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/groups.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/history.d.ts +0 -72
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-context.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-dedupe.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-meta.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-text.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/line-directives.d.ts +0 -22
- package/dist/plugin-sdk/src/auto-reply/reply/memory-flush.d.ts +0 -28
- package/dist/plugin-sdk/src/auto-reply/reply/mentions.d.ts +0 -19
- package/dist/plugin-sdk/src/auto-reply/reply/model-selection.d.ts +0 -67
- package/dist/plugin-sdk/src/auto-reply/reply/normalize-reply.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/origin-routing.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/post-compaction-audit.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/post-compaction-context.d.ts +0 -12
- package/dist/plugin-sdk/src/auto-reply/reply/provider-dispatcher.d.ts +0 -19
- package/dist/plugin-sdk/src/auto-reply/reply/queue/cleanup.d.ts +0 -11
- package/dist/plugin-sdk/src/auto-reply/reply/queue/directive.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/queue/drain.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/queue/enqueue.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/queue/normalize.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/queue/settings.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/queue/state.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/queue/types.d.ts +0 -85
- package/dist/plugin-sdk/src/auto-reply/reply/queue-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/queue.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/reply-delivery.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/reply-directives.d.ts +0 -14
- package/dist/plugin-sdk/src/auto-reply/reply/reply-dispatcher.d.ts +0 -54
- package/dist/plugin-sdk/src/auto-reply/reply/reply-elevated.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/reply-inline.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/reply-payloads.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/reply-reference.d.ts +0 -22
- package/dist/plugin-sdk/src/auto-reply/reply/reply-tags.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/reply/reply-threading.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/response-prefix-template.d.ts +0 -51
- package/dist/plugin-sdk/src/auto-reply/reply/route-reply.d.ts +0 -56
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-prompt.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-run-accounting.d.ts +0 -12
- package/dist/plugin-sdk/src/auto-reply/reply/session-updates.d.ts +0 -34
- package/dist/plugin-sdk/src/auto-reply/reply/session-usage.d.ts +0 -21
- package/dist/plugin-sdk/src/auto-reply/reply/session.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/streaming-directives.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/strip-inbound-meta.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/subagents-utils.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/typing-mode.d.ts +0 -30
- package/dist/plugin-sdk/src/auto-reply/reply/typing-policy.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/typing.d.ts +0 -18
- package/dist/plugin-sdk/src/auto-reply/reply/untrusted-context.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/send-policy.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/skill-commands.d.ts +0 -19
- package/dist/plugin-sdk/src/auto-reply/status.d.ts +0 -60
- package/dist/plugin-sdk/src/auto-reply/templating.d.ts +0 -161
- package/dist/plugin-sdk/src/auto-reply/thinking.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/tokens.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/tool-meta.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/types.d.ts +0 -85
- package/dist/plugin-sdk/src/brand.d.ts +0 -6
- package/dist/plugin-sdk/src/browser/bridge-auth-registry.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/bridge-server.d.ts +0 -19
- package/dist/plugin-sdk/src/browser/cdp.d.ts +0 -125
- package/dist/plugin-sdk/src/browser/cdp.helpers.d.ts +0 -13
- package/dist/plugin-sdk/src/browser/chrome.d.ts +0 -20
- package/dist/plugin-sdk/src/browser/chrome.executables.d.ts +0 -9
- package/dist/plugin-sdk/src/browser/chrome.profile-decoration.d.ts +0 -10
- package/dist/plugin-sdk/src/browser/client-actions-core.d.ts +0 -142
- package/dist/plugin-sdk/src/browser/client-actions-observe.d.ts +0 -68
- package/dist/plugin-sdk/src/browser/client-actions-state.d.ts +0 -90
- package/dist/plugin-sdk/src/browser/client-actions-types.d.ts +0 -18
- package/dist/plugin-sdk/src/browser/client-actions-url.d.ts +0 -2
- package/dist/plugin-sdk/src/browser/client-actions.d.ts +0 -4
- package/dist/plugin-sdk/src/browser/client-fetch.d.ts +0 -20
- package/dist/plugin-sdk/src/browser/client.d.ts +0 -147
- package/dist/plugin-sdk/src/browser/config.d.ts +0 -43
- package/dist/plugin-sdk/src/browser/constants.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/control-auth.d.ts +0 -13
- package/dist/plugin-sdk/src/browser/control-service.d.ts +0 -5
- package/dist/plugin-sdk/src/browser/csrf.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/extension-relay-auth.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/extension-relay.d.ts +0 -15
- package/dist/plugin-sdk/src/browser/form-fields.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/http-auth.d.ts +0 -5
- package/dist/plugin-sdk/src/browser/navigation-guard.d.ts +0 -21
- package/dist/plugin-sdk/src/browser/paths.d.ts +0 -61
- package/dist/plugin-sdk/src/browser/profiles-service.d.ts +0 -25
- package/dist/plugin-sdk/src/browser/profiles.d.ts +0 -30
- package/dist/plugin-sdk/src/browser/proxy-files.d.ts +0 -7
- package/dist/plugin-sdk/src/browser/pw-ai-module.d.ts +0 -6
- package/dist/plugin-sdk/src/browser/pw-ai-state.d.ts +0 -2
- package/dist/plugin-sdk/src/browser/pw-ai.d.ts +0 -2
- package/dist/plugin-sdk/src/browser/pw-role-snapshot.d.ts +0 -35
- package/dist/plugin-sdk/src/browser/pw-session.d.ts +0 -162
- package/dist/plugin-sdk/src/browser/pw-tools-core.activity.d.ts +0 -21
- package/dist/plugin-sdk/src/browser/pw-tools-core.d.ts +0 -8
- package/dist/plugin-sdk/src/browser/pw-tools-core.downloads.d.ts +0 -34
- package/dist/plugin-sdk/src/browser/pw-tools-core.interactions.d.ts +0 -114
- package/dist/plugin-sdk/src/browser/pw-tools-core.responses.d.ts +0 -13
- package/dist/plugin-sdk/src/browser/pw-tools-core.shared.d.ts +0 -6
- package/dist/plugin-sdk/src/browser/pw-tools-core.snapshot.d.ts +0 -66
- package/dist/plugin-sdk/src/browser/pw-tools-core.state.d.ts +0 -46
- package/dist/plugin-sdk/src/browser/pw-tools-core.storage.d.ts +0 -47
- package/dist/plugin-sdk/src/browser/pw-tools-core.trace.d.ts +0 -12
- package/dist/plugin-sdk/src/browser/resolved-config-refresh.d.ts +0 -12
- package/dist/plugin-sdk/src/browser/routes/agent.act.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.act.download.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.act.hooks.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.act.shared.d.ts +0 -10
- package/dist/plugin-sdk/src/browser/routes/agent.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.debug.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.shared.d.ts +0 -37
- package/dist/plugin-sdk/src/browser/routes/agent.snapshot.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/agent.storage.d.ts +0 -14
- package/dist/plugin-sdk/src/browser/routes/basic.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/dispatcher.d.ts +0 -16
- package/dist/plugin-sdk/src/browser/routes/index.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/output-paths.d.ts +0 -10
- package/dist/plugin-sdk/src/browser/routes/path-output.d.ts +0 -1
- package/dist/plugin-sdk/src/browser/routes/tabs.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/routes/types.d.ts +0 -20
- package/dist/plugin-sdk/src/browser/routes/utils.d.ts +0 -15
- package/dist/plugin-sdk/src/browser/runtime-dependency.d.ts +0 -3
- package/dist/plugin-sdk/src/browser/screenshot.d.ts +0 -9
- package/dist/plugin-sdk/src/browser/server-context.d.ts +0 -4
- package/dist/plugin-sdk/src/browser/server-context.types.d.ts +0 -65
- package/dist/plugin-sdk/src/browser/server-lifecycle.d.ts +0 -10
- package/dist/plugin-sdk/src/browser/server-middleware.d.ts +0 -6
- package/dist/plugin-sdk/src/browser/target-id.d.ts +0 -11
- package/dist/plugin-sdk/src/browser/trash.d.ts +0 -1
- package/dist/plugin-sdk/src/canvas-host/a2ui.d.ts +0 -6
- package/dist/plugin-sdk/src/canvas-host/file-resolver.d.ts +0 -3
- package/dist/plugin-sdk/src/canvas-host/server.d.ts +0 -36
- package/dist/plugin-sdk/src/channel-web.d.ts +0 -6
- package/dist/plugin-sdk/src/channels/account-snapshot-fields.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/account-summary.d.ts +0 -17
- package/dist/plugin-sdk/src/channels/ack-reactions.d.ts +0 -29
- package/dist/plugin-sdk/src/channels/allow-from.d.ts +0 -16
- package/dist/plugin-sdk/src/channels/allowlist-match.d.ts +0 -16
- package/dist/plugin-sdk/src/channels/allowlists/resolve-utils.d.ts +0 -33
- package/dist/plugin-sdk/src/channels/channel-config.d.ts +0 -39
- package/dist/plugin-sdk/src/channels/chat-type.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/command-gating.d.ts +0 -20
- package/dist/plugin-sdk/src/channels/conversation-label.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/dock.d.ts +0 -25
- package/dist/plugin-sdk/src/channels/draft-stream-controls.d.ts +0 -54
- package/dist/plugin-sdk/src/channels/draft-stream-loop.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/ids.d.ts +0 -9
- package/dist/plugin-sdk/src/channels/location.d.ts +0 -21
- package/dist/plugin-sdk/src/channels/logging.d.ts +0 -20
- package/dist/plugin-sdk/src/channels/mention-gating.d.ts +0 -27
- package/dist/plugin-sdk/src/channels/model-overrides.d.ts +0 -18
- package/dist/plugin-sdk/src/channels/plugins/account-action-gate.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/plugins/account-helpers.d.ts +0 -6
- package/dist/plugin-sdk/src/channels/plugins/actions/discord/handle-action.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +0 -9
- package/dist/plugin-sdk/src/channels/plugins/actions/discord.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/actions/shared.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/actions/signal.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/actions/telegram.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/agent-tools/whatsapp-login.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/allowlist-match.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/bluebubbles-actions.d.ts +0 -48
- package/dist/plugin-sdk/src/channels/plugins/catalog.d.ts +0 -50
- package/dist/plugin-sdk/src/channels/plugins/channel-config.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/config-helpers.d.ts +0 -14
- package/dist/plugin-sdk/src/channels/plugins/config-schema.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/config-writes.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/directory-config.d.ts +0 -16
- package/dist/plugin-sdk/src/channels/plugins/group-mentions.d.ts +0 -18
- package/dist/plugin-sdk/src/channels/plugins/helpers.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/index.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/media-limits.d.ts +0 -9
- package/dist/plugin-sdk/src/channels/plugins/media-payload.d.ts +0 -15
- package/dist/plugin-sdk/src/channels/plugins/message-action-names.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/message-actions.d.ts +0 -15
- package/dist/plugin-sdk/src/channels/plugins/normalize/discord.d.ts +0 -14
- package/dist/plugin-sdk/src/channels/plugins/normalize/imessage.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/normalize/shared.d.ts +0 -6
- package/dist/plugin-sdk/src/channels/plugins/normalize/signal.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/normalize/slack.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/normalize/telegram.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/normalize/whatsapp.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/onboarding/channel-access-configure.d.ts +0 -21
- package/dist/plugin-sdk/src/channels/plugins/onboarding/channel-access.d.ts +0 -31
- package/dist/plugin-sdk/src/channels/plugins/onboarding/discord.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/onboarding/helpers.d.ts +0 -177
- package/dist/plugin-sdk/src/channels/plugins/onboarding/imessage.d.ts +0 -6
- package/dist/plugin-sdk/src/channels/plugins/onboarding/signal.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/onboarding/slack.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/onboarding/telegram.d.ts +0 -4
- package/dist/plugin-sdk/src/channels/plugins/onboarding/whatsapp.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/onboarding-types.d.ts +0 -149
- package/dist/plugin-sdk/src/channels/plugins/outbound/load.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/pairing-message.d.ts +0 -1
- package/dist/plugin-sdk/src/channels/plugins/pairing.d.ts +0 -16
- package/dist/plugin-sdk/src/channels/plugins/registry-loader.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/plugins/setup-helpers.d.ts +0 -21
- package/dist/plugin-sdk/src/channels/plugins/status-issues/bluebubbles.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/status-issues/discord.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/status-issues/shared.d.ts +0 -29
- package/dist/plugin-sdk/src/channels/plugins/status-issues/telegram.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/status-issues/whatsapp.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/types.adapters.d.ts +0 -294
- package/dist/plugin-sdk/src/channels/plugins/types.core.d.ts +0 -357
- package/dist/plugin-sdk/src/channels/plugins/types.d.ts +0 -6
- package/dist/plugin-sdk/src/channels/plugins/types.plugin.d.ts +0 -54
- package/dist/plugin-sdk/src/channels/plugins/whatsapp-heartbeat.d.ts +0 -11
- package/dist/plugin-sdk/src/channels/plugins/whatsapp-shared.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/registry.d.ts +0 -12
- package/dist/plugin-sdk/src/channels/reply-prefix.d.ts +0 -24
- package/dist/plugin-sdk/src/channels/sender-label.d.ts +0 -9
- package/dist/plugin-sdk/src/channels/session.d.ts +0 -18
- package/dist/plugin-sdk/src/channels/status-reactions.d.ts +0 -62
- package/dist/plugin-sdk/src/channels/targets.d.ts +0 -42
- package/dist/plugin-sdk/src/channels/telegram/allow-from.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/telegram/api.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/thread-bindings-messages.d.ts +0 -19
- package/dist/plugin-sdk/src/channels/thread-bindings-policy.d.ts +0 -68
- package/dist/plugin-sdk/src/channels/typing-lifecycle.d.ts +0 -12
- package/dist/plugin-sdk/src/channels/typing-start-guard.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/typing.d.ts +0 -18
- package/dist/plugin-sdk/src/channels/web/index.d.ts +0 -1
- package/dist/plugin-sdk/src/cli/argv.d.ts +0 -17
- package/dist/plugin-sdk/src/cli/banner.d.ts +0 -11
- package/dist/plugin-sdk/src/cli/cli-name.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/cli-utils.d.ts +0 -19
- package/dist/plugin-sdk/src/cli/command-format.d.ts +0 -1
- package/dist/plugin-sdk/src/cli/deps.d.ts +0 -18
- package/dist/plugin-sdk/src/cli/help-format.d.ts +0 -5
- package/dist/plugin-sdk/src/cli/memory-cli.d.ts +0 -21
- package/dist/plugin-sdk/src/cli/nodes-camera.d.ts +0 -38
- package/dist/plugin-sdk/src/cli/nodes-canvas.d.ts +0 -10
- package/dist/plugin-sdk/src/cli/nodes-media-utils.d.ts +0 -13
- package/dist/plugin-sdk/src/cli/nodes-run.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/nodes-screen.d.ts +0 -18
- package/dist/plugin-sdk/src/cli/outbound-send-deps.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/outbound-send-mapping.d.ts +0 -10
- package/dist/plugin-sdk/src/cli/parse-bytes.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/parse-duration.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/parse-timeout.d.ts +0 -1
- package/dist/plugin-sdk/src/cli/profile-utils.d.ts +0 -2
- package/dist/plugin-sdk/src/cli/progress.d.ts +0 -24
- package/dist/plugin-sdk/src/cli/prompt.d.ts +0 -1
- package/dist/plugin-sdk/src/cli/wait.d.ts +0 -1
- package/dist/plugin-sdk/src/commands/agent/attempt.d.ts +0 -39
- package/dist/plugin-sdk/src/commands/agent/delivery.d.ts +0 -21
- package/dist/plugin-sdk/src/commands/agent/lifecycle.d.ts +0 -17
- package/dist/plugin-sdk/src/commands/agent/run-context.d.ts +0 -2
- package/dist/plugin-sdk/src/commands/agent/session-store.d.ts +0 -17
- package/dist/plugin-sdk/src/commands/agent/session.d.ts +0 -33
- package/dist/plugin-sdk/src/commands/agent/strict-agentic-contract.d.ts +0 -44
- package/dist/plugin-sdk/src/commands/agent/types.d.ts +0 -77
- package/dist/plugin-sdk/src/commands/agent.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/agents.config.d.ts +0 -42
- package/dist/plugin-sdk/src/commands/channel-account-context.d.ts +0 -10
- package/dist/plugin-sdk/src/commands/cleanup-utils.d.ts +0 -37
- package/dist/plugin-sdk/src/commands/daemon-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/commands/gateway-presence.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/health.d.ts +0 -74
- package/dist/plugin-sdk/src/commands/hosted-dashboard-probe.d.ts +0 -40
- package/dist/plugin-sdk/src/commands/oauth-flow.d.ts +0 -21
- package/dist/plugin-sdk/src/commands/onboard-helpers.d.ts +0 -84
- package/dist/plugin-sdk/src/commands/onboard-types.d.ts +0 -119
- package/dist/plugin-sdk/src/commands/signal-install.d.ts +0 -30
- package/dist/plugin-sdk/src/commands/status-all/agents.d.ts +0 -16
- package/dist/plugin-sdk/src/commands/status-all/channels.d.ts +0 -19
- package/dist/plugin-sdk/src/commands/status-all/diagnosis.d.ts +0 -62
- package/dist/plugin-sdk/src/commands/status-all/format.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/status-all/gateway.d.ts +0 -5
- package/dist/plugin-sdk/src/commands/status-all/report-lines.d.ts +0 -44
- package/dist/plugin-sdk/src/commands/status-all.d.ts +0 -4
- package/dist/plugin-sdk/src/commands/status.acpx-bridge.d.ts +0 -19
- package/dist/plugin-sdk/src/commands/status.agent-local.d.ts +0 -16
- package/dist/plugin-sdk/src/commands/status.command.d.ts +0 -9
- package/dist/plugin-sdk/src/commands/status.d.ts +0 -3
- package/dist/plugin-sdk/src/commands/status.daemon.d.ts +0 -9
- package/dist/plugin-sdk/src/commands/status.format.d.ts +0 -12
- package/dist/plugin-sdk/src/commands/status.gateway-probe.d.ts +0 -6
- package/dist/plugin-sdk/src/commands/status.link-channel.d.ts +0 -10
- package/dist/plugin-sdk/src/commands/status.scan.d.ts +0 -46
- package/dist/plugin-sdk/src/commands/status.strict-agentic.d.ts +0 -18
- package/dist/plugin-sdk/src/commands/status.summary.d.ts +0 -5
- package/dist/plugin-sdk/src/commands/status.types.d.ts +0 -67
- package/dist/plugin-sdk/src/commands/status.update.d.ts +0 -23
- package/dist/plugin-sdk/src/commands/text-format.d.ts +0 -1
- package/dist/plugin-sdk/src/commands/wallet.d.ts +0 -300
- package/dist/plugin-sdk/src/commands/xai-oauth.d.ts +0 -17
- package/dist/plugin-sdk/src/config/agent-dirs.d.ts +0 -14
- package/dist/plugin-sdk/src/config/agent-limits.d.ts +0 -6
- package/dist/plugin-sdk/src/config/backup-rotation.d.ts +0 -5
- package/dist/plugin-sdk/src/config/cache-utils.d.ts +0 -6
- package/dist/plugin-sdk/src/config/channel-capabilities.d.ts +0 -6
- package/dist/plugin-sdk/src/config/commands.d.ts +0 -25
- package/dist/plugin-sdk/src/config/config-paths.d.ts +0 -10
- package/dist/plugin-sdk/src/config/config.d.ts +0 -7
- package/dist/plugin-sdk/src/config/dangerous-name-matching.d.ts +0 -12
- package/dist/plugin-sdk/src/config/defaults.d.ts +0 -19
- package/dist/plugin-sdk/src/config/discord-preview-streaming.d.ts +0 -25
- package/dist/plugin-sdk/src/config/env-preserve.d.ts +0 -10
- package/dist/plugin-sdk/src/config/env-substitution.d.ts +0 -36
- package/dist/plugin-sdk/src/config/env-vars.d.ts +0 -6
- package/dist/plugin-sdk/src/config/group-policy.d.ts +0 -49
- package/dist/plugin-sdk/src/config/includes-scan.d.ts +0 -4
- package/dist/plugin-sdk/src/config/includes.d.ts +0 -43
- package/dist/plugin-sdk/src/config/io.d.ts +0 -63
- package/dist/plugin-sdk/src/config/legacy-migrate.d.ts +0 -5
- package/dist/plugin-sdk/src/config/legacy.d.ts +0 -6
- package/dist/plugin-sdk/src/config/legacy.migrations.d.ts +0 -1
- package/dist/plugin-sdk/src/config/legacy.migrations.part-1.d.ts +0 -2
- package/dist/plugin-sdk/src/config/legacy.migrations.part-2.d.ts +0 -2
- package/dist/plugin-sdk/src/config/legacy.migrations.part-3.d.ts +0 -2
- package/dist/plugin-sdk/src/config/legacy.rules.d.ts +0 -2
- package/dist/plugin-sdk/src/config/legacy.shared.d.ts +0 -19
- package/dist/plugin-sdk/src/config/markdown-tables.d.ts +0 -7
- package/dist/plugin-sdk/src/config/merge-config.d.ts +0 -7
- package/dist/plugin-sdk/src/config/merge-patch.d.ts +0 -5
- package/dist/plugin-sdk/src/config/model-input.d.ts +0 -11
- package/dist/plugin-sdk/src/config/normalize-exec-safe-bin.d.ts +0 -2
- package/dist/plugin-sdk/src/config/normalize-paths.d.ts +0 -8
- package/dist/plugin-sdk/src/config/paths.d.ts +0 -57
- package/dist/plugin-sdk/src/config/plugin-auto-enable.d.ts +0 -15
- package/dist/plugin-sdk/src/config/plugins-allowlist.d.ts +0 -12
- package/dist/plugin-sdk/src/config/port-defaults.d.ts +0 -13
- package/dist/plugin-sdk/src/config/prototype-keys.d.ts +0 -1
- package/dist/plugin-sdk/src/config/runtime-group-policy.d.ts +0 -56
- package/dist/plugin-sdk/src/config/runtime-overrides.d.ts +0 -15
- package/dist/plugin-sdk/src/config/sat-runtime-ids.d.ts +0 -23
- package/dist/plugin-sdk/src/config/sessions/artifacts.d.ts +0 -6
- package/dist/plugin-sdk/src/config/sessions/delivery-info.d.ts +0 -16
- package/dist/plugin-sdk/src/config/sessions/disk-budget.d.ts +0 -28
- package/dist/plugin-sdk/src/config/sessions/group.d.ts +0 -11
- package/dist/plugin-sdk/src/config/sessions/main-session.d.ts +0 -43
- package/dist/plugin-sdk/src/config/sessions/metadata.d.ts +0 -16
- package/dist/plugin-sdk/src/config/sessions/paths.d.ts +0 -21
- package/dist/plugin-sdk/src/config/sessions/reset.d.ts +0 -43
- package/dist/plugin-sdk/src/config/sessions/session-file.d.ts +0 -15
- package/dist/plugin-sdk/src/config/sessions/session-key.d.ts +0 -8
- package/dist/plugin-sdk/src/config/sessions/store.d.ts +0 -124
- package/dist/plugin-sdk/src/config/sessions/transcript.d.ts +0 -32
- package/dist/plugin-sdk/src/config/sessions/types.d.ts +0 -273
- package/dist/plugin-sdk/src/config/sessions.d.ts +0 -13
- package/dist/plugin-sdk/src/config/talk.d.ts +0 -22
- package/dist/plugin-sdk/src/config/telegram-custom-commands.d.ts +0 -24
- package/dist/plugin-sdk/src/config/types.acp.d.ts +0 -28
- package/dist/plugin-sdk/src/config/types.agent-defaults.d.ts +0 -322
- package/dist/plugin-sdk/src/config/types.agents-shared.d.ts +0 -53
- package/dist/plugin-sdk/src/config/types.agents.d.ts +0 -71
- package/dist/plugin-sdk/src/config/types.approvals.d.ts +0 -26
- package/dist/plugin-sdk/src/config/types.auth.d.ts +0 -34
- package/dist/plugin-sdk/src/config/types.base.d.ts +0 -227
- package/dist/plugin-sdk/src/config/types.browser.d.ts +0 -65
- package/dist/plugin-sdk/src/config/types.channel-messaging-common.d.ts +0 -44
- package/dist/plugin-sdk/src/config/types.channels.d.ts +0 -53
- package/dist/plugin-sdk/src/config/types.cron.d.ts +0 -26
- package/dist/plugin-sdk/src/config/types.d.ts +0 -35
- package/dist/plugin-sdk/src/config/types.discord.d.ts +0 -283
- package/dist/plugin-sdk/src/config/types.fased.d.ts +0 -134
- package/dist/plugin-sdk/src/config/types.federation.d.ts +0 -319
- package/dist/plugin-sdk/src/config/types.gateway.d.ts +0 -313
- package/dist/plugin-sdk/src/config/types.googlechat.d.ts +0 -110
- package/dist/plugin-sdk/src/config/types.hooks.d.ts +0 -141
- package/dist/plugin-sdk/src/config/types.imessage.d.ts +0 -77
- package/dist/plugin-sdk/src/config/types.installs.d.ts +0 -36
- package/dist/plugin-sdk/src/config/types.irc.d.ts +0 -54
- package/dist/plugin-sdk/src/config/types.mcp.d.ts +0 -5
- package/dist/plugin-sdk/src/config/types.memory.d.ts +0 -59
- package/dist/plugin-sdk/src/config/types.messages.d.ts +0 -151
- package/dist/plugin-sdk/src/config/types.models.d.ts +0 -70
- package/dist/plugin-sdk/src/config/types.msteams.d.ts +0 -110
- package/dist/plugin-sdk/src/config/types.node-host.d.ts +0 -10
- package/dist/plugin-sdk/src/config/types.plugins.d.ts +0 -48
- package/dist/plugin-sdk/src/config/types.queue.d.ts +0 -14
- package/dist/plugin-sdk/src/config/types.sandbox.d.ts +0 -97
- package/dist/plugin-sdk/src/config/types.secrets.d.ts +0 -67
- package/dist/plugin-sdk/src/config/types.signal.d.ts +0 -46
- package/dist/plugin-sdk/src/config/types.skills.d.ts +0 -47
- package/dist/plugin-sdk/src/config/types.slack.d.ts +0 -181
- package/dist/plugin-sdk/src/config/types.telegram.d.ts +0 -199
- package/dist/plugin-sdk/src/config/types.tools.d.ts +0 -637
- package/dist/plugin-sdk/src/config/types.tts.d.ts +0 -78
- package/dist/plugin-sdk/src/config/types.wallet.d.ts +0 -88
- package/dist/plugin-sdk/src/config/types.whatsapp.d.ts +0 -101
- package/dist/plugin-sdk/src/config/validation.d.ts +0 -37
- package/dist/plugin-sdk/src/config/version.d.ts +0 -9
- package/dist/plugin-sdk/src/config/zod-schema.agent-defaults.d.ts +0 -308
- package/dist/plugin-sdk/src/config/zod-schema.agent-model.d.ts +0 -24
- package/dist/plugin-sdk/src/config/zod-schema.agent-runtime.d.ts +0 -1439
- package/dist/plugin-sdk/src/config/zod-schema.agents.d.ts +0 -621
- package/dist/plugin-sdk/src/config/zod-schema.allowdeny.d.ts +0 -13
- package/dist/plugin-sdk/src/config/zod-schema.approvals.d.ts +0 -15
- package/dist/plugin-sdk/src/config/zod-schema.channels.d.ts +0 -6
- package/dist/plugin-sdk/src/config/zod-schema.core.d.ts +0 -926
- package/dist/plugin-sdk/src/config/zod-schema.d.ts +0 -4763
- package/dist/plugin-sdk/src/config/zod-schema.hooks.d.ts +0 -83
- package/dist/plugin-sdk/src/config/zod-schema.installs.d.ts +0 -38
- package/dist/plugin-sdk/src/config/zod-schema.providers-core.d.ts +0 -3785
- package/dist/plugin-sdk/src/config/zod-schema.providers-whatsapp.d.ts +0 -235
- package/dist/plugin-sdk/src/config/zod-schema.providers.d.ts +0 -2261
- package/dist/plugin-sdk/src/config/zod-schema.sensitive.d.ts +0 -2
- package/dist/plugin-sdk/src/config/zod-schema.session.d.ts +0 -237
- package/dist/plugin-sdk/src/context-engine/types.d.ts +0 -6
- package/dist/plugin-sdk/src/cron/access-block.d.ts +0 -22
- package/dist/plugin-sdk/src/cron/delivery.d.ts +0 -10
- package/dist/plugin-sdk/src/cron/graph-context.d.ts +0 -45
- package/dist/plugin-sdk/src/cron/legacy-delivery.d.ts +0 -3
- package/dist/plugin-sdk/src/cron/normalize.d.ts +0 -9
- package/dist/plugin-sdk/src/cron/parse.d.ts +0 -1
- package/dist/plugin-sdk/src/cron/payload-migration.d.ts +0 -3
- package/dist/plugin-sdk/src/cron/run-detail-format.d.ts +0 -28
- package/dist/plugin-sdk/src/cron/run-detail.d.ts +0 -95
- package/dist/plugin-sdk/src/cron/run-log.d.ts +0 -65
- package/dist/plugin-sdk/src/cron/schedule.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/jobs.d.ts +0 -23
- package/dist/plugin-sdk/src/cron/service/locked.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/normalize.d.ts +0 -18
- package/dist/plugin-sdk/src/cron/service/ops.d.ts +0 -152
- package/dist/plugin-sdk/src/cron/service/run-lease.d.ts +0 -15
- package/dist/plugin-sdk/src/cron/service/state.d.ts +0 -154
- package/dist/plugin-sdk/src/cron/service/store.d.ts +0 -9
- package/dist/plugin-sdk/src/cron/service/timeout-policy.d.ts +0 -13
- package/dist/plugin-sdk/src/cron/service/timer.d.ts +0 -80
- package/dist/plugin-sdk/src/cron/service.d.ts +0 -122
- package/dist/plugin-sdk/src/cron/session-reaper.d.ts +0 -35
- package/dist/plugin-sdk/src/cron/stagger.d.ts +0 -8
- package/dist/plugin-sdk/src/cron/store.d.ts +0 -6
- package/dist/plugin-sdk/src/cron/task-adaptive-routing.d.ts +0 -21
- package/dist/plugin-sdk/src/cron/task-evaluator.d.ts +0 -28
- package/dist/plugin-sdk/src/cron/task-model-roles.d.ts +0 -21
- package/dist/plugin-sdk/src/cron/task-planner.d.ts +0 -37
- package/dist/plugin-sdk/src/cron/task-run-queue.d.ts +0 -270
- package/dist/plugin-sdk/src/cron/trusted-sources.d.ts +0 -28
- package/dist/plugin-sdk/src/cron/types.d.ts +0 -673
- package/dist/plugin-sdk/src/cron/webhook-url.d.ts +0 -1
- package/dist/plugin-sdk/src/daemon/arg-split.d.ts +0 -4
- package/dist/plugin-sdk/src/daemon/cmd-argv.d.ts +0 -3
- package/dist/plugin-sdk/src/daemon/cmd-set.d.ts +0 -7
- package/dist/plugin-sdk/src/daemon/constants.d.ts +0 -63
- package/dist/plugin-sdk/src/daemon/diagnostics.d.ts +0 -1
- package/dist/plugin-sdk/src/daemon/exec-file.d.ts +0 -7
- package/dist/plugin-sdk/src/daemon/launchd-plist.d.ts +0 -15
- package/dist/plugin-sdk/src/daemon/launchd.d.ts +0 -49
- package/dist/plugin-sdk/src/daemon/node-service.d.ts +0 -2
- package/dist/plugin-sdk/src/daemon/output.d.ts +0 -8
- package/dist/plugin-sdk/src/daemon/paths.d.ts +0 -3
- package/dist/plugin-sdk/src/daemon/runtime-binary.d.ts +0 -2
- package/dist/plugin-sdk/src/daemon/runtime-parse.d.ts +0 -1
- package/dist/plugin-sdk/src/daemon/schtasks-exec.d.ts +0 -5
- package/dist/plugin-sdk/src/daemon/schtasks.d.ts +0 -18
- package/dist/plugin-sdk/src/daemon/service-runtime.d.ts +0 -13
- package/dist/plugin-sdk/src/daemon/service-types.d.ts +0 -32
- package/dist/plugin-sdk/src/daemon/service.d.ts +0 -16
- package/dist/plugin-sdk/src/daemon/systemd-linger.d.ts +0 -15
- package/dist/plugin-sdk/src/daemon/systemd-system.d.ts +0 -28
- package/dist/plugin-sdk/src/daemon/systemd-unit.d.ts +0 -7
- package/dist/plugin-sdk/src/daemon/systemd.d.ts +0 -32
- package/dist/plugin-sdk/src/discord/accounts.d.ts +0 -21
- package/dist/plugin-sdk/src/discord/api.d.ts +0 -11
- package/dist/plugin-sdk/src/discord/audit.d.ts +0 -29
- package/dist/plugin-sdk/src/discord/chunk.d.ts +0 -20
- package/dist/plugin-sdk/src/discord/client.d.ts +0 -21
- package/dist/plugin-sdk/src/discord/components-registry.d.ts +0 -16
- package/dist/plugin-sdk/src/discord/components.d.ts +0 -196
- package/dist/plugin-sdk/src/discord/directory-live.d.ts +0 -4
- package/dist/plugin-sdk/src/discord/draft-chunking.d.ts +0 -6
- package/dist/plugin-sdk/src/discord/draft-stream.d.ts +0 -21
- package/dist/plugin-sdk/src/discord/gateway-logging.d.ts +0 -8
- package/dist/plugin-sdk/src/discord/guilds.d.ts +0 -6
- package/dist/plugin-sdk/src/discord/monitor/agent-components.d.ts +0 -55
- package/dist/plugin-sdk/src/discord/monitor/allow-list.d.ts +0 -176
- package/dist/plugin-sdk/src/discord/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/src/discord/monitor/exec-approvals.d.ts +0 -55
- package/dist/plugin-sdk/src/discord/monitor/format.d.ts +0 -13
- package/dist/plugin-sdk/src/discord/monitor/gateway-error-guard.d.ts +0 -6
- package/dist/plugin-sdk/src/discord/monitor/gateway-plugin.d.ts +0 -8
- package/dist/plugin-sdk/src/discord/monitor/gateway-registry.d.ts +0 -9
- package/dist/plugin-sdk/src/discord/monitor/listeners.d.ts +0 -50
- package/dist/plugin-sdk/src/discord/monitor/message-handler.d.ts +0 -5
- package/dist/plugin-sdk/src/discord/monitor/message-handler.preflight.d.ts +0 -14
- package/dist/plugin-sdk/src/discord/monitor/message-handler.preflight.types.d.ts +0 -96
- package/dist/plugin-sdk/src/discord/monitor/message-handler.process.d.ts +0 -2
- package/dist/plugin-sdk/src/discord/monitor/message-utils.d.ts +0 -44
- package/dist/plugin-sdk/src/discord/monitor/model-picker-preferences.d.ts +0 -18
- package/dist/plugin-sdk/src/discord/monitor/model-picker.d.ts +0 -117
- package/dist/plugin-sdk/src/discord/monitor/native-command.d.ts +0 -26
- package/dist/plugin-sdk/src/discord/monitor/presence-cache.d.ts +0 -9
- package/dist/plugin-sdk/src/discord/monitor/presence.d.ts +0 -5
- package/dist/plugin-sdk/src/discord/monitor/provider.allowlist.d.ts +0 -14
- package/dist/plugin-sdk/src/discord/monitor/provider.d.ts +0 -34
- package/dist/plugin-sdk/src/discord/monitor/provider.lifecycle.d.ts +0 -28
- package/dist/plugin-sdk/src/discord/monitor/reply-context.d.ts +0 -17
- package/dist/plugin-sdk/src/discord/monitor/reply-delivery.d.ts +0 -37
- package/dist/plugin-sdk/src/discord/monitor/rest-fetch.d.ts +0 -2
- package/dist/plugin-sdk/src/discord/monitor/sender-identity.d.ts +0 -31
- package/dist/plugin-sdk/src/discord/monitor/system-events.d.ts +0 -2
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.config.d.ts +0 -11
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.d.ts +0 -8
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.discord-api.d.ts +0 -36
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.lifecycle.d.ts +0 -46
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.manager.d.ts +0 -18
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.messages.d.ts +0 -1
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.persona.d.ts +0 -6
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.state.d.ts +0 -80
- package/dist/plugin-sdk/src/discord/monitor/thread-bindings.types.d.ts +0 -77
- package/dist/plugin-sdk/src/discord/monitor/threading.d.ts +0 -106
- package/dist/plugin-sdk/src/discord/monitor/typing.d.ts +0 -5
- package/dist/plugin-sdk/src/discord/monitor.d.ts +0 -10
- package/dist/plugin-sdk/src/discord/monitor.gateway.d.ts +0 -12
- package/dist/plugin-sdk/src/discord/pluralkit.d.ts +0 -26
- package/dist/plugin-sdk/src/discord/probe.d.ts +0 -28
- package/dist/plugin-sdk/src/discord/resolve-channels.d.ts +0 -15
- package/dist/plugin-sdk/src/discord/resolve-users.d.ts +0 -14
- package/dist/plugin-sdk/src/discord/send.channels.d.ts +0 -17
- package/dist/plugin-sdk/src/discord/send.components.d.ts +0 -17
- package/dist/plugin-sdk/src/discord/send.d.ts +0 -10
- package/dist/plugin-sdk/src/discord/send.emojis-stickers.d.ts +0 -4
- package/dist/plugin-sdk/src/discord/send.guild.d.ts +0 -24
- package/dist/plugin-sdk/src/discord/send.messages.d.ts +0 -20
- package/dist/plugin-sdk/src/discord/send.outbound.d.ts +0 -57
- package/dist/plugin-sdk/src/discord/send.permissions.d.ts +0 -20
- package/dist/plugin-sdk/src/discord/send.reactions.d.ts +0 -15
- package/dist/plugin-sdk/src/discord/send.shared.d.ts +0 -85
- package/dist/plugin-sdk/src/discord/send.types.d.ts +0 -144
- package/dist/plugin-sdk/src/discord/targets.d.ts +0 -18
- package/dist/plugin-sdk/src/discord/token.d.ts +0 -11
- package/dist/plugin-sdk/src/discord/ui.d.ts +0 -19
- package/dist/plugin-sdk/src/discord/voice/command.d.ts +0 -15
- package/dist/plugin-sdk/src/discord/voice/manager.d.ts +0 -52
- package/dist/plugin-sdk/src/discord/voice-message.d.ts +0 -50
- package/dist/plugin-sdk/src/federation/access-token.d.ts +0 -34
- package/dist/plugin-sdk/src/federation/attestation.d.ts +0 -37
- package/dist/plugin-sdk/src/federation/auto-connect.d.ts +0 -103
- package/dist/plugin-sdk/src/federation/marketplace-capability-adapter.d.ts +0 -31
- package/dist/plugin-sdk/src/federation/marketplace-chat-command.d.ts +0 -13
- package/dist/plugin-sdk/src/federation/marketplace-delivery.d.ts +0 -61
- package/dist/plugin-sdk/src/federation/marketplace-direct-payment.d.ts +0 -36
- package/dist/plugin-sdk/src/federation/marketplace-escrow.d.ts +0 -58
- package/dist/plugin-sdk/src/federation/marketplace-service-kinds.d.ts +0 -23
- package/dist/plugin-sdk/src/federation/marketplace-task-ledger.d.ts +0 -12
- package/dist/plugin-sdk/src/federation/offers.d.ts +0 -258
- package/dist/plugin-sdk/src/federation/runtime.d.ts +0 -14
- package/dist/plugin-sdk/src/federation/settlement-evidence.d.ts +0 -27
- package/dist/plugin-sdk/src/gateway/a2a-http.d.ts +0 -25
- package/dist/plugin-sdk/src/gateway/a2a-settlement.d.ts +0 -36
- package/dist/plugin-sdk/src/gateway/agent-event-assistant-text.d.ts +0 -2
- package/dist/plugin-sdk/src/gateway/agent-prompt.d.ts +0 -6
- package/dist/plugin-sdk/src/gateway/assistant-identity.d.ts +0 -13
- package/dist/plugin-sdk/src/gateway/auth-rate-limit.d.ts +0 -67
- package/dist/plugin-sdk/src/gateway/auth.d.ts +0 -63
- package/dist/plugin-sdk/src/gateway/call.d.ts +0 -82
- package/dist/plugin-sdk/src/gateway/canvas-capability.d.ts +0 -14
- package/dist/plugin-sdk/src/gateway/chat-abort.d.ts +0 -70
- package/dist/plugin-sdk/src/gateway/chat-sanitize.d.ts +0 -4
- package/dist/plugin-sdk/src/gateway/client.d.ts +0 -66
- package/dist/plugin-sdk/src/gateway/control-plane-audit.d.ts +0 -10
- package/dist/plugin-sdk/src/gateway/control-ui-boot-check.d.ts +0 -22
- package/dist/plugin-sdk/src/gateway/control-ui-contract.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/control-ui-csp.d.ts +0 -1
- package/dist/plugin-sdk/src/gateway/control-ui-login.d.ts +0 -115
- package/dist/plugin-sdk/src/gateway/control-ui-shared.d.ts +0 -9
- package/dist/plugin-sdk/src/gateway/control-ui.d.ts +0 -36
- package/dist/plugin-sdk/src/gateway/credentials.d.ts +0 -34
- package/dist/plugin-sdk/src/gateway/device-auth.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/exec-approval-manager.d.ts +0 -38
- package/dist/plugin-sdk/src/gateway/federation-http.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/federation-marketplace.d.ts +0 -90
- package/dist/plugin-sdk/src/gateway/fedify-http.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/gateway-identity.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/hooks-mapping.d.ts +0 -80
- package/dist/plugin-sdk/src/gateway/hooks.d.ts +0 -102
- package/dist/plugin-sdk/src/gateway/http-auth-helpers.d.ts +0 -11
- package/dist/plugin-sdk/src/gateway/http-common.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/http-endpoint-helpers.d.ts +0 -13
- package/dist/plugin-sdk/src/gateway/http-utils.d.ts +0 -15
- package/dist/plugin-sdk/src/gateway/internal-call-auth.d.ts +0 -3
- package/dist/plugin-sdk/src/gateway/method-scopes.d.ts +0 -22
- package/dist/plugin-sdk/src/gateway/mutating-admin-rpc-rate-limit.d.ts +0 -29
- package/dist/plugin-sdk/src/gateway/net.d.ts +0 -83
- package/dist/plugin-sdk/src/gateway/node-command-policy.d.ts +0 -14
- package/dist/plugin-sdk/src/gateway/node-registry.d.ts +0 -60
- package/dist/plugin-sdk/src/gateway/open-responses.schema.d.ts +0 -765
- package/dist/plugin-sdk/src/gateway/openai-http.d.ts +0 -12
- package/dist/plugin-sdk/src/gateway/openresponses-http.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/openresponses-prompt.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/probe-auth.d.ts +0 -9
- package/dist/plugin-sdk/src/gateway/probe.d.ts +0 -26
- package/dist/plugin-sdk/src/gateway/protocol/client-info.d.ts +0 -58
- package/dist/plugin-sdk/src/gateway/protocol/index.d.ts +0 -1048
- package/dist/plugin-sdk/src/gateway/protocol/schema/agent.d.ts +0 -91
- package/dist/plugin-sdk/src/gateway/protocol/schema/agents-models-skills.d.ts +0 -1400
- package/dist/plugin-sdk/src/gateway/protocol/schema/channels.d.ts +0 -158
- package/dist/plugin-sdk/src/gateway/protocol/schema/commands.d.ts +0 -68
- package/dist/plugin-sdk/src/gateway/protocol/schema/config.d.ts +0 -115
- package/dist/plugin-sdk/src/gateway/protocol/schema/cron.d.ts +0 -1551
- package/dist/plugin-sdk/src/gateway/protocol/schema/devices.d.ts +0 -42
- package/dist/plugin-sdk/src/gateway/protocol/schema/error-codes.d.ts +0 -15
- package/dist/plugin-sdk/src/gateway/protocol/schema/exec-approvals.d.ts +0 -182
- package/dist/plugin-sdk/src/gateway/protocol/schema/frames.d.ts +0 -168
- package/dist/plugin-sdk/src/gateway/protocol/schema/logs-chat.d.ts +0 -45
- package/dist/plugin-sdk/src/gateway/protocol/schema/nodes.d.ts +0 -85
- package/dist/plugin-sdk/src/gateway/protocol/schema/primitives.d.ts +0 -4
- package/dist/plugin-sdk/src/gateway/protocol/schema/protocol-schemas.d.ts +0 -3
- package/dist/plugin-sdk/src/gateway/protocol/schema/push.d.ts +0 -15
- package/dist/plugin-sdk/src/gateway/protocol/schema/sessions.d.ts +0 -134
- package/dist/plugin-sdk/src/gateway/protocol/schema/snapshot.d.ts +0 -69
- package/dist/plugin-sdk/src/gateway/protocol/schema/types.d.ts +0 -245
- package/dist/plugin-sdk/src/gateway/protocol/schema/wizard.d.ts +0 -86
- package/dist/plugin-sdk/src/gateway/protocol/schema.d.ts +0 -18
- package/dist/plugin-sdk/src/gateway/security-path.d.ts +0 -15
- package/dist/plugin-sdk/src/gateway/server/readiness.d.ts +0 -6
- package/dist/plugin-sdk/src/gateway/server/ws-types.d.ts +0 -12
- package/dist/plugin-sdk/src/gateway/server-broadcast.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/server-channels.d.ts +0 -26
- package/dist/plugin-sdk/src/gateway/server-constants.d.ts +0 -10
- package/dist/plugin-sdk/src/gateway/server-http.d.ts +0 -131
- package/dist/plugin-sdk/src/gateway/server-methods/commands.d.ts +0 -11
- package/dist/plugin-sdk/src/gateway/server-methods/mutating-admin-rpc-audit.d.ts +0 -41
- package/dist/plugin-sdk/src/gateway/server-methods/nodes.helpers.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-methods/push.d.ts +0 -2
- package/dist/plugin-sdk/src/gateway/server-methods/types.d.ts +0 -106
- package/dist/plugin-sdk/src/gateway/server-model-catalog.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/server-shared.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/server-startup-readiness.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/server-startup-trace.d.ts +0 -29
- package/dist/plugin-sdk/src/gateway/session-compaction-checkpoints.d.ts +0 -24
- package/dist/plugin-sdk/src/gateway/session-utils.d.ts +0 -80
- package/dist/plugin-sdk/src/gateway/session-utils.fs.d.ts +0 -48
- package/dist/plugin-sdk/src/gateway/session-utils.types.d.ts +0 -106
- package/dist/plugin-sdk/src/gateway/tools-invoke-http.d.ts +0 -10
- package/dist/plugin-sdk/src/gateway/update-status.d.ts +0 -27
- package/dist/plugin-sdk/src/gateway/ws-log.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/ws-logging.d.ts +0 -4
- package/dist/plugin-sdk/src/globals.d.ts +0 -11
- package/dist/plugin-sdk/src/hooks/config.d.ts +0 -11
- package/dist/plugin-sdk/src/hooks/frontmatter.d.ts +0 -5
- package/dist/plugin-sdk/src/hooks/internal-hooks.d.ts +0 -155
- package/dist/plugin-sdk/src/hooks/module-loader.d.ts +0 -18
- package/dist/plugin-sdk/src/hooks/types.d.ts +0 -62
- package/dist/plugin-sdk/src/image-generation/types.d.ts +0 -74
- package/dist/plugin-sdk/src/imessage/accounts.d.ts +0 -16
- package/dist/plugin-sdk/src/imessage/client.d.ts +0 -46
- package/dist/plugin-sdk/src/imessage/constants.d.ts +0 -2
- package/dist/plugin-sdk/src/imessage/monitor/abort-handler.d.ts +0 -9
- package/dist/plugin-sdk/src/imessage/monitor/deliver.d.ts +0 -14
- package/dist/plugin-sdk/src/imessage/monitor/echo-cache.d.ts +0 -9
- package/dist/plugin-sdk/src/imessage/monitor/inbound-processing.d.ts +0 -96
- package/dist/plugin-sdk/src/imessage/monitor/monitor-provider.d.ts +0 -7
- package/dist/plugin-sdk/src/imessage/monitor/parse-notification.d.ts +0 -2
- package/dist/plugin-sdk/src/imessage/monitor/runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/imessage/monitor/types.d.ts +0 -37
- package/dist/plugin-sdk/src/imessage/monitor.d.ts +0 -2
- package/dist/plugin-sdk/src/imessage/probe.d.ts +0 -17
- package/dist/plugin-sdk/src/imessage/send.d.ts +0 -34
- package/dist/plugin-sdk/src/imessage/target-parsing-helpers.d.ts +0 -45
- package/dist/plugin-sdk/src/imessage/targets.d.ts +0 -40
- package/dist/plugin-sdk/src/infra/abort-signal.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/agent-events.d.ts +0 -24
- package/dist/plugin-sdk/src/infra/archive-path.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/archive.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/backoff.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/binaries.d.ts +0 -3
- package/dist/plugin-sdk/src/infra/boundary-file-read.d.ts +0 -33
- package/dist/plugin-sdk/src/infra/boundary-path.d.ts +0 -38
- package/dist/plugin-sdk/src/infra/brew.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/channel-activity.d.ts +0 -18
- package/dist/plugin-sdk/src/infra/channel-summary.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/channels-status-issues.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/clawhub.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/control-ui-assets.d.ts +0 -32
- package/dist/plugin-sdk/src/infra/dedupe.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/detect-package-manager.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/device-auth-store.d.ts +0 -19
- package/dist/plugin-sdk/src/infra/device-identity.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/device-pairing.d.ts +0 -103
- package/dist/plugin-sdk/src/infra/diagnostic-events.d.ts +0 -140
- package/dist/plugin-sdk/src/infra/diagnostic-flags.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/dotenv.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/env.d.ts +0 -11
- package/dist/plugin-sdk/src/infra/errors.d.ts +0 -11
- package/dist/plugin-sdk/src/infra/exec-approval-reply.d.ts +0 -11
- package/dist/plugin-sdk/src/infra/exec-approval-surface.d.ts +0 -38
- package/dist/plugin-sdk/src/infra/exec-approvals-allowlist.d.ts +0 -69
- package/dist/plugin-sdk/src/infra/exec-approvals-analysis.d.ts +0 -78
- package/dist/plugin-sdk/src/infra/exec-approvals.d.ts +0 -147
- package/dist/plugin-sdk/src/infra/exec-command-resolution.d.ts +0 -45
- package/dist/plugin-sdk/src/infra/exec-obfuscation-detect.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/exec-safe-bin-policy-profiles.d.ts +0 -24
- package/dist/plugin-sdk/src/infra/exec-safe-bin-policy-validator.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/exec-safe-bin-policy.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/exec-safe-bin-runtime-policy.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/exec-safe-bin-trust.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/exec-safety.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/exec-wrapper-resolution.d.ts +0 -48
- package/dist/plugin-sdk/src/infra/fased-exec-env.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/fased-root.d.ts +0 -10
- package/dist/plugin-sdk/src/infra/fasedhub.d.ts +0 -114
- package/dist/plugin-sdk/src/infra/fetch-headers.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/fetch.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/file-identity.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/file-lock.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/format-time/format-datetime.d.ts +0 -35
- package/dist/plugin-sdk/src/infra/format-time/format-duration.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/format-time/format-relative.d.ts +0 -39
- package/dist/plugin-sdk/src/infra/fs-safe.d.ts +0 -43
- package/dist/plugin-sdk/src/infra/gemini-auth.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/git-commit.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/git-root.d.ts +0 -7
- package/dist/plugin-sdk/src/infra/hardlink-guards.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/heartbeat-active-hours.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/heartbeat-events-filter.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/heartbeat-events.d.ts +0 -21
- package/dist/plugin-sdk/src/infra/heartbeat-reason.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/heartbeat-runner.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/heartbeat-visibility.d.ts +0 -17
- package/dist/plugin-sdk/src/infra/heartbeat-wake.d.ts +0 -32
- package/dist/plugin-sdk/src/infra/home-dir.d.ts +0 -7
- package/dist/plugin-sdk/src/infra/host-env-security.d.ts +0 -26
- package/dist/plugin-sdk/src/infra/http-body.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/install-flow.d.ts +0 -24
- package/dist/plugin-sdk/src/infra/install-mode-options.d.ts +0 -20
- package/dist/plugin-sdk/src/infra/install-package-dir.d.ts +0 -19
- package/dist/plugin-sdk/src/infra/install-safe-path.d.ts +0 -14
- package/dist/plugin-sdk/src/infra/install-source-utils.d.ts +0 -32
- package/dist/plugin-sdk/src/infra/json-file.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/json-files.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/jsonl-socket.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/machine-name.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/map-size.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/net/fetch-guard.d.ts +0 -28
- package/dist/plugin-sdk/src/infra/net/hostname.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/net/ssrf.d.ts +0 -35
- package/dist/plugin-sdk/src/infra/node-commands.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/node-pairing.d.ts +0 -65
- package/dist/plugin-sdk/src/infra/node-shell.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/npm-integrity.d.ts +0 -38
- package/dist/plugin-sdk/src/infra/npm-pack-install.d.ts +0 -56
- package/dist/plugin-sdk/src/infra/npm-registry-spec.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/optional-runtime-dependency.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/os-summary.d.ts +0 -7
- package/dist/plugin-sdk/src/infra/outbound/abort.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/outbound/agent-delivery.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/outbound/best-effort-delivery.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/outbound/bound-delivery-router.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/outbound/channel-adapters.d.ts +0 -15
- package/dist/plugin-sdk/src/infra/outbound/channel-adapters.discord.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/outbound/channel-resolution.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/outbound/channel-selection.d.ts +0 -11
- package/dist/plugin-sdk/src/infra/outbound/channel-target.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/outbound/conversation-id.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/outbound/deliver.d.ts +0 -80
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue.d.ts +0 -85
- package/dist/plugin-sdk/src/infra/outbound/directory-cache.d.ts +0 -24
- package/dist/plugin-sdk/src/infra/outbound/envelope.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/outbound/format.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/outbound/identity.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/outbound/message-action-params.d.ts +0 -54
- package/dist/plugin-sdk/src/infra/outbound/message-action-runner.d.ts +0 -81
- package/dist/plugin-sdk/src/infra/outbound/message-action-spec.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/outbound/message.d.ts +0 -87
- package/dist/plugin-sdk/src/infra/outbound/outbound-policy.d.ts +0 -32
- package/dist/plugin-sdk/src/infra/outbound/outbound-send-service.d.ts +0 -74
- package/dist/plugin-sdk/src/infra/outbound/outbound-session.d.ts +0 -31
- package/dist/plugin-sdk/src/infra/outbound/payloads.d.ts +0 -18
- package/dist/plugin-sdk/src/infra/outbound/session-binding-service.d.ts +0 -89
- package/dist/plugin-sdk/src/infra/outbound/session-context.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/outbound/target-errors.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/outbound/target-normalization.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/outbound/target-resolver.d.ts +0 -53
- package/dist/plugin-sdk/src/infra/outbound/targets.d.ts +0 -87
- package/dist/plugin-sdk/src/infra/outbound/tool-payload.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/pairing-files.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/pairing-pending.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/pairing-token.d.ts +0 -3
- package/dist/plugin-sdk/src/infra/path-alias-guards.d.ts +0 -18
- package/dist/plugin-sdk/src/infra/path-guards.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/path-prepend.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/path-safety.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/plain-object.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/ports-format.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/ports-inspect.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/ports-lsof.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/ports-probe.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/ports-types.d.ts +0 -18
- package/dist/plugin-sdk/src/infra/ports.d.ts +0 -14
- package/dist/plugin-sdk/src/infra/prototype-keys.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/provider-usage.auth.d.ts +0 -11
- package/dist/plugin-sdk/src/infra/provider-usage.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.claude.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.codex.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.copilot.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.d.ts +0 -6
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.gemini.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.minimax.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.shared.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/provider-usage.fetch.zai.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/provider-usage.format.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/provider-usage.load.d.ts +0 -12
- package/dist/plugin-sdk/src/infra/provider-usage.shared.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/provider-usage.types.d.ts +0 -17
- package/dist/plugin-sdk/src/infra/push-apns.d.ts +0 -83
- package/dist/plugin-sdk/src/infra/restart-sentinel.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/restart-stale-pids.d.ts +0 -13
- package/dist/plugin-sdk/src/infra/restart.d.ts +0 -72
- package/dist/plugin-sdk/src/infra/retry-policy.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/retry.d.ts +0 -21
- package/dist/plugin-sdk/src/infra/runtime-guard.d.ts +0 -21
- package/dist/plugin-sdk/src/infra/runtime-status.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/safe-open-sync.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/scp-host.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/secure-random.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/session-cost-usage.d.ts +0 -45
- package/dist/plugin-sdk/src/infra/session-cost-usage.types.d.ts +0 -153
- package/dist/plugin-sdk/src/infra/session-maintenance-warning.d.ts +0 -10
- package/dist/plugin-sdk/src/infra/shell-env.d.ts +0 -34
- package/dist/plugin-sdk/src/infra/skills-remote.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/system-events.d.ts +0 -20
- package/dist/plugin-sdk/src/infra/system-message.d.ts +0 -3
- package/dist/plugin-sdk/src/infra/system-presence.d.ts +0 -45
- package/dist/plugin-sdk/src/infra/system-run-command.d.ts +0 -30
- package/dist/plugin-sdk/src/infra/tailnet.d.ts +0 -7
- package/dist/plugin-sdk/src/infra/tailscale.d.ts +0 -34
- package/dist/plugin-sdk/src/infra/tls/fingerprint.d.ts +0 -1
- package/dist/plugin-sdk/src/infra/tls/gateway.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/tmp-fased-dir.d.ts +0 -20
- package/dist/plugin-sdk/src/infra/transport-ready.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/unhandled-rejections.d.ts +0 -15
- package/dist/plugin-sdk/src/infra/update-channels.d.ts +0 -36
- package/dist/plugin-sdk/src/infra/update-check.d.ts +0 -69
- package/dist/plugin-sdk/src/infra/update-global.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/warning-filter.d.ts +0 -7
- package/dist/plugin-sdk/src/infra/ws.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/wsl.d.ts +0 -11
- package/dist/plugin-sdk/src/line/accounts.d.ts +0 -10
- package/dist/plugin-sdk/src/line/actions.d.ts +0 -22
- package/dist/plugin-sdk/src/line/auto-reply-delivery.d.ts +0 -38
- package/dist/plugin-sdk/src/line/bot-access.d.ts +0 -17
- package/dist/plugin-sdk/src/line/bot-handlers.d.ts +0 -13
- package/dist/plugin-sdk/src/line/bot-message-context.d.ts +0 -118
- package/dist/plugin-sdk/src/line/bot.d.ts +0 -24
- package/dist/plugin-sdk/src/line/channel-access-token.d.ts +0 -4
- package/dist/plugin-sdk/src/line/config-schema.d.ts +0 -64
- package/dist/plugin-sdk/src/line/download.d.ts +0 -7
- package/dist/plugin-sdk/src/line/flex-templates/basic-cards.d.ts +0 -46
- package/dist/plugin-sdk/src/line/flex-templates/common.d.ts +0 -2
- package/dist/plugin-sdk/src/line/flex-templates/media-control-cards.d.ts +0 -73
- package/dist/plugin-sdk/src/line/flex-templates/message.d.ts +0 -6
- package/dist/plugin-sdk/src/line/flex-templates/schedule-cards.d.ts +0 -55
- package/dist/plugin-sdk/src/line/flex-templates/types.d.ts +0 -19
- package/dist/plugin-sdk/src/line/flex-templates.d.ts +0 -5
- package/dist/plugin-sdk/src/line/logging.d.ts +0 -2
- package/dist/plugin-sdk/src/line/markdown-to-line.d.ts +0 -72
- package/dist/plugin-sdk/src/line/monitor.d.ts +0 -28
- package/dist/plugin-sdk/src/line/probe.d.ts +0 -2
- package/dist/plugin-sdk/src/line/reply-chunks.d.ts +0 -24
- package/dist/plugin-sdk/src/line/send.d.ts +0 -91
- package/dist/plugin-sdk/src/line/signature.d.ts +0 -1
- package/dist/plugin-sdk/src/line/template-messages.d.ts +0 -100
- package/dist/plugin-sdk/src/line/types.d.ts +0 -113
- package/dist/plugin-sdk/src/line/webhook-node.d.ts +0 -15
- package/dist/plugin-sdk/src/line/webhook-utils.d.ts +0 -3
- package/dist/plugin-sdk/src/line/webhook.d.ts +0 -19
- package/dist/plugin-sdk/src/link-understanding/apply.d.ts +0 -10
- package/dist/plugin-sdk/src/link-understanding/defaults.d.ts +0 -2
- package/dist/plugin-sdk/src/link-understanding/detect.d.ts +0 -3
- package/dist/plugin-sdk/src/link-understanding/format.d.ts +0 -4
- package/dist/plugin-sdk/src/link-understanding/runner.d.ts +0 -13
- package/dist/plugin-sdk/src/logger.d.ts +0 -6
- package/dist/plugin-sdk/src/logging/config.d.ts +0 -4
- package/dist/plugin-sdk/src/logging/console.d.ts +0 -23
- package/dist/plugin-sdk/src/logging/diagnostic-session-state.d.ts +0 -30
- package/dist/plugin-sdk/src/logging/diagnostic-stability.d.ts +0 -85
- package/dist/plugin-sdk/src/logging/diagnostic.d.ts +0 -65
- package/dist/plugin-sdk/src/logging/env-log-level.d.ts +0 -2
- package/dist/plugin-sdk/src/logging/levels.d.ts +0 -5
- package/dist/plugin-sdk/src/logging/logger.d.ts +0 -44
- package/dist/plugin-sdk/src/logging/node-require.d.ts +0 -1
- package/dist/plugin-sdk/src/logging/redact-identifier.d.ts +0 -4
- package/dist/plugin-sdk/src/logging/redact.d.ts +0 -9
- package/dist/plugin-sdk/src/logging/state.d.ts +0 -19
- package/dist/plugin-sdk/src/logging/subsystem.d.ts +0 -18
- package/dist/plugin-sdk/src/logging/timestamps.d.ts +0 -1
- package/dist/plugin-sdk/src/logging.d.ts +0 -10
- package/dist/plugin-sdk/src/managed/federation.d.ts +0 -16
- package/dist/plugin-sdk/src/markdown/code-spans.d.ts +0 -10
- package/dist/plugin-sdk/src/markdown/fences.d.ts +0 -10
- package/dist/plugin-sdk/src/markdown/frontmatter.d.ts +0 -2
- package/dist/plugin-sdk/src/markdown/ir.d.ts +0 -32
- package/dist/plugin-sdk/src/markdown/render.d.ts +0 -18
- package/dist/plugin-sdk/src/markdown/tables.d.ts +0 -2
- package/dist/plugin-sdk/src/markdown/whatsapp.d.ts +0 -14
- package/dist/plugin-sdk/src/media/audio-tags.d.ts +0 -10
- package/dist/plugin-sdk/src/media/audio.d.ts +0 -19
- package/dist/plugin-sdk/src/media/base64.d.ts +0 -6
- package/dist/plugin-sdk/src/media/constants.d.ts +0 -7
- package/dist/plugin-sdk/src/media/fetch.d.ts +0 -24
- package/dist/plugin-sdk/src/media/image-ops.d.ts +0 -41
- package/dist/plugin-sdk/src/media/inbound-path-policy.d.ts +0 -18
- package/dist/plugin-sdk/src/media/input-files.d.ts +0 -95
- package/dist/plugin-sdk/src/media/local-roots.d.ts +0 -3
- package/dist/plugin-sdk/src/media/mime.d.ts +0 -16
- package/dist/plugin-sdk/src/media/outbound-attachment.d.ts +0 -6
- package/dist/plugin-sdk/src/media/parse.d.ts +0 -8
- package/dist/plugin-sdk/src/media/png-encode.d.ts +0 -8
- package/dist/plugin-sdk/src/media/read-response-with-limit.d.ts +0 -7
- package/dist/plugin-sdk/src/media/sniff-mime-from-base64.d.ts +0 -1
- package/dist/plugin-sdk/src/media/store.d.ts +0 -33
- package/dist/plugin-sdk/src/media-understanding/apply.d.ts +0 -19
- package/dist/plugin-sdk/src/media-understanding/attachments.d.ts +0 -49
- package/dist/plugin-sdk/src/media-understanding/audio-preflight.d.ts +0 -16
- package/dist/plugin-sdk/src/media-understanding/concurrency.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/defaults.d.ts +0 -14
- package/dist/plugin-sdk/src/media-understanding/errors.d.ts +0 -6
- package/dist/plugin-sdk/src/media-understanding/format.d.ts +0 -7
- package/dist/plugin-sdk/src/media-understanding/fs.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/output-extract.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/anthropic/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/deepgram/audio.d.ts +0 -4
- package/dist/plugin-sdk/src/media-understanding/providers/deepgram/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/google/audio.d.ts +0 -3
- package/dist/plugin-sdk/src/media-understanding/providers/google/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/google/inline-data.d.ts +0 -20
- package/dist/plugin-sdk/src/media-understanding/providers/google/video.d.ts +0 -3
- package/dist/plugin-sdk/src/media-understanding/providers/groq/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/image.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/index.d.ts +0 -4
- package/dist/plugin-sdk/src/media-understanding/providers/minimax/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/mistral/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/moonshot/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/providers/moonshot/video.d.ts +0 -3
- package/dist/plugin-sdk/src/media-understanding/providers/openai/audio.d.ts +0 -3
- package/dist/plugin-sdk/src/media-understanding/providers/openai/index.d.ts +0 -3
- package/dist/plugin-sdk/src/media-understanding/providers/shared.d.ts +0 -20
- package/dist/plugin-sdk/src/media-understanding/providers/zai/index.d.ts +0 -2
- package/dist/plugin-sdk/src/media-understanding/resolve.d.ts +0 -44
- package/dist/plugin-sdk/src/media-understanding/runner.d.ts +0 -39
- package/dist/plugin-sdk/src/media-understanding/runner.entries.d.ts +0 -33
- package/dist/plugin-sdk/src/media-understanding/scope.d.ts +0 -9
- package/dist/plugin-sdk/src/media-understanding/types.d.ts +0 -93
- package/dist/plugin-sdk/src/media-understanding/video.d.ts +0 -2
- package/dist/plugin-sdk/src/memory/backend-config.d.ts +0 -55
- package/dist/plugin-sdk/src/memory/batch-error-utils.d.ts +0 -15
- package/dist/plugin-sdk/src/memory/batch-gemini.d.ts +0 -51
- package/dist/plugin-sdk/src/memory/batch-http.d.ts +0 -8
- package/dist/plugin-sdk/src/memory/batch-openai.d.ts +0 -20
- package/dist/plugin-sdk/src/memory/batch-output.d.ts +0 -23
- package/dist/plugin-sdk/src/memory/batch-provider-common.d.ts +0 -9
- package/dist/plugin-sdk/src/memory/batch-runner.d.ts +0 -38
- package/dist/plugin-sdk/src/memory/batch-upload.d.ts +0 -6
- package/dist/plugin-sdk/src/memory/batch-utils.d.ts +0 -11
- package/dist/plugin-sdk/src/memory/batch-voyage.d.ts +0 -21
- package/dist/plugin-sdk/src/memory/embedding-chunk-limits.d.ts +0 -3
- package/dist/plugin-sdk/src/memory/embedding-input-limits.d.ts +0 -2
- package/dist/plugin-sdk/src/memory/embedding-model-limits.d.ts +0 -2
- package/dist/plugin-sdk/src/memory/embeddings-debug.d.ts +0 -1
- package/dist/plugin-sdk/src/memory/embeddings-gemini.d.ts +0 -16
- package/dist/plugin-sdk/src/memory/embeddings-mistral.d.ts +0 -15
- package/dist/plugin-sdk/src/memory/embeddings-openai.d.ts +0 -15
- package/dist/plugin-sdk/src/memory/embeddings-remote-client.d.ts +0 -12
- package/dist/plugin-sdk/src/memory/embeddings-remote-fetch.d.ts +0 -8
- package/dist/plugin-sdk/src/memory/embeddings-remote-provider.d.ts +0 -21
- package/dist/plugin-sdk/src/memory/embeddings-voyage.d.ts +0 -15
- package/dist/plugin-sdk/src/memory/embeddings.d.ts +0 -48
- package/dist/plugin-sdk/src/memory/filesystem-manager.d.ts +0 -38
- package/dist/plugin-sdk/src/memory/fs-utils.d.ts +0 -11
- package/dist/plugin-sdk/src/memory/hybrid.d.ts +0 -45
- package/dist/plugin-sdk/src/memory/index.d.ts +0 -4
- package/dist/plugin-sdk/src/memory/internal.d.ts +0 -38
- package/dist/plugin-sdk/src/memory/inventory.d.ts +0 -150
- package/dist/plugin-sdk/src/memory/manager-embedding-ops.d.ts +0 -42
- package/dist/plugin-sdk/src/memory/manager-search.d.ts +0 -60
- package/dist/plugin-sdk/src/memory/manager-sync-ops.d.ts +0 -137
- package/dist/plugin-sdk/src/memory/manager.d.ts +0 -111
- package/dist/plugin-sdk/src/memory/memory-schema.d.ts +0 -10
- package/dist/plugin-sdk/src/memory/mmr.d.ts +0 -62
- package/dist/plugin-sdk/src/memory/node-llama.d.ts +0 -8
- package/dist/plugin-sdk/src/memory/post-json.d.ts +0 -10
- package/dist/plugin-sdk/src/memory/qmd-manager.d.ts +0 -134
- package/dist/plugin-sdk/src/memory/qmd-query-parser.d.ts +0 -9
- package/dist/plugin-sdk/src/memory/qmd-scope.d.ts +0 -5
- package/dist/plugin-sdk/src/memory/query-expansion.d.ts +0 -40
- package/dist/plugin-sdk/src/memory/remote-http.d.ts +0 -9
- package/dist/plugin-sdk/src/memory/repair-audit-plan.d.ts +0 -68
- package/dist/plugin-sdk/src/memory/repair-cli-preview-contract.d.ts +0 -22
- package/dist/plugin-sdk/src/memory/repair-contracts.d.ts +0 -80
- package/dist/plugin-sdk/src/memory/repair-dashboard-preview-contract.d.ts +0 -65
- package/dist/plugin-sdk/src/memory/repair-execution-policy.d.ts +0 -36
- package/dist/plugin-sdk/src/memory/repair-execution-request-contract.d.ts +0 -43
- package/dist/plugin-sdk/src/memory/repair-executor-fs-safety-contract.d.ts +0 -33
- package/dist/plugin-sdk/src/memory/repair-executor-gate.d.ts +0 -27
- package/dist/plugin-sdk/src/memory/repair-executor-lock-contract.d.ts +0 -40
- package/dist/plugin-sdk/src/memory/repair-executor-result-contract.d.ts +0 -72
- package/dist/plugin-sdk/src/memory/repair-executor.d.ts +0 -60
- package/dist/plugin-sdk/src/memory/repair-preflight-cli-preview-contract.d.ts +0 -15
- package/dist/plugin-sdk/src/memory/repair-preflight-dashboard-preview-contract.d.ts +0 -50
- package/dist/plugin-sdk/src/memory/repair-preflight-pipeline-contract.d.ts +0 -35
- package/dist/plugin-sdk/src/memory/search-manager.d.ts +0 -11
- package/dist/plugin-sdk/src/memory/session-files.d.ts +0 -14
- package/dist/plugin-sdk/src/memory/sqlite-vec.d.ts +0 -9
- package/dist/plugin-sdk/src/memory/sqlite.d.ts +0 -1
- package/dist/plugin-sdk/src/memory/status-format.d.ts +0 -28
- package/dist/plugin-sdk/src/memory/temporal-decay.d.ts +0 -25
- package/dist/plugin-sdk/src/memory/types.d.ts +0 -94
- package/dist/plugin-sdk/src/mining/chat-command.d.ts +0 -19
- package/dist/plugin-sdk/src/mining/mainnet-sync.d.ts +0 -32
- package/dist/plugin-sdk/src/pairing/pairing-challenge.d.ts +0 -32
- package/dist/plugin-sdk/src/pairing/pairing-labels.d.ts +0 -2
- package/dist/plugin-sdk/src/pairing/pairing-messages.d.ts +0 -6
- package/dist/plugin-sdk/src/pairing/pairing-store.d.ts +0 -50
- package/dist/plugin-sdk/src/plugin-sdk/account-id.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/agent-media-payload.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/allow-from.d.ts +0 -32
- package/dist/plugin-sdk/src/plugin-sdk/channel-core.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/command-auth.d.ts +0 -27
- package/dist/plugin-sdk/src/plugin-sdk/config-paths.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/device-pair.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/discord.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/fetch-auth.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/file-lock.d.ts +0 -16
- package/dist/plugin-sdk/src/plugin-sdk/group-access.d.ts +0 -16
- package/dist/plugin-sdk/src/plugin-sdk/image-generation.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/index.d.ts +0 -163
- package/dist/plugin-sdk/src/plugin-sdk/json-store.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/onboarding.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/pairing-access.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/persistent-dedupe.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-result.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/realtime-transcription.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/realtime-voice.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/reply-payload.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/run-command.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/runtime.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/sat-runtime.d.ts +0 -32
- package/dist/plugin-sdk/src/plugin-sdk/slack-message-actions.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/slack.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/ssrf-policy.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/status-helpers.d.ts +0 -88
- package/dist/plugin-sdk/src/plugin-sdk/telegram.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/temp-path.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/text-chunking.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/tool-send.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/video-generation.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/webhook-path.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/webhook-targets.d.ts +0 -23
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp.d.ts +0 -11
- package/dist/plugin-sdk/src/plugins/bundled-dir.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/capability-provider-runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/plugins/commands.d.ts +0 -85
- package/dist/plugin-sdk/src/plugins/config-schema.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/config-state.d.ts +0 -86
- package/dist/plugin-sdk/src/plugins/discovery.d.ts +0 -25
- package/dist/plugin-sdk/src/plugins/hook-runner-global.d.ts +0 -37
- package/dist/plugin-sdk/src/plugins/hooks.d.ts +0 -55
- package/dist/plugin-sdk/src/plugins/http-path.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/http-registry.d.ts +0 -13
- package/dist/plugin-sdk/src/plugins/install.d.ts +0 -93
- package/dist/plugin-sdk/src/plugins/loader.d.ts +0 -35
- package/dist/plugin-sdk/src/plugins/logger.d.ts +0 -9
- package/dist/plugin-sdk/src/plugins/manifest-registry.d.ts +0 -53
- package/dist/plugin-sdk/src/plugins/manifest.d.ts +0 -136
- package/dist/plugin-sdk/src/plugins/memory-embedding-providers.d.ts +0 -15
- package/dist/plugin-sdk/src/plugins/min-host-version.d.ts +0 -28
- package/dist/plugin-sdk/src/plugins/package-extensions.d.ts +0 -23
- package/dist/plugin-sdk/src/plugins/path-safety.d.ts +0 -5
- package/dist/plugin-sdk/src/plugins/provider-discovery.d.ts +0 -13
- package/dist/plugin-sdk/src/plugins/provider-runtime.runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/plugins/providers.d.ts +0 -28
- package/dist/plugin-sdk/src/plugins/registry.d.ts +0 -171
- package/dist/plugin-sdk/src/plugins/runtime/admin-rpc-helper.d.ts +0 -71
- package/dist/plugin-sdk/src/plugins/runtime/index.d.ts +0 -4
- package/dist/plugin-sdk/src/plugins/runtime/native-deps.d.ts +0 -8
- package/dist/plugin-sdk/src/plugins/runtime/scoped.d.ts +0 -6
- package/dist/plugin-sdk/src/plugins/runtime/session-read-helper.d.ts +0 -115
- package/dist/plugin-sdk/src/plugins/runtime/types.d.ts +0 -370
- package/dist/plugin-sdk/src/plugins/runtime.d.ts +0 -6
- package/dist/plugin-sdk/src/plugins/schema-validator.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/slots.d.ts +0 -24
- package/dist/plugin-sdk/src/plugins/tools.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/types.d.ts +0 -684
- package/dist/plugin-sdk/src/plugins/uninstall.d.ts +0 -45
- package/dist/plugin-sdk/src/polls.d.ts +0 -31
- package/dist/plugin-sdk/src/process/command-queue.d.ts +0 -63
- package/dist/plugin-sdk/src/process/exec.d.ts +0 -31
- package/dist/plugin-sdk/src/process/kill-tree.d.ts +0 -12
- package/dist/plugin-sdk/src/process/lanes.d.ts +0 -6
- package/dist/plugin-sdk/src/process/spawn-utils.d.ts +0 -26
- package/dist/plugin-sdk/src/process/supervisor/adapters/child.d.ts +0 -10
- package/dist/plugin-sdk/src/process/supervisor/adapters/env.d.ts +0 -1
- package/dist/plugin-sdk/src/process/supervisor/adapters/pty.d.ts +0 -11
- package/dist/plugin-sdk/src/process/supervisor/index.d.ts +0 -4
- package/dist/plugin-sdk/src/process/supervisor/registry.d.ts +0 -21
- package/dist/plugin-sdk/src/process/supervisor/supervisor.d.ts +0 -2
- package/dist/plugin-sdk/src/process/supervisor/types.d.ts +0 -92
- package/dist/plugin-sdk/src/project.d.ts +0 -3
- package/dist/plugin-sdk/src/providers/cloudflare-ai-gateway-shared.d.ts +0 -84
- package/dist/plugin-sdk/src/providers/github-copilot-models.d.ts +0 -5
- package/dist/plugin-sdk/src/providers/github-copilot-token.d.ts +0 -22
- package/dist/plugin-sdk/src/providers/health.d.ts +0 -15
- package/dist/plugin-sdk/src/providers/huggingface-models.d.ts +0 -47
- package/dist/plugin-sdk/src/providers/litellm-models.d.ts +0 -30
- package/dist/plugin-sdk/src/providers/opencode-zen-shared.d.ts +0 -7
- package/dist/plugin-sdk/src/providers/refreshed-model-capabilities.d.ts +0 -14
- package/dist/plugin-sdk/src/providers/registry.d.ts +0 -204
- package/dist/plugin-sdk/src/providers/synthetic-models.d.ts +0 -31
- package/dist/plugin-sdk/src/providers/together-models.d.ts +0 -38
- package/dist/plugin-sdk/src/providers/venice-models.d.ts +0 -175
- package/dist/plugin-sdk/src/providers/vercel-ai-gateway-models.d.ts +0 -113
- package/dist/plugin-sdk/src/providers/xiaomi-models.d.ts +0 -21
- package/dist/plugin-sdk/src/realtime-transcription/provider-registry.d.ts +0 -7
- package/dist/plugin-sdk/src/realtime-transcription/provider-types.d.ts +0 -26
- package/dist/plugin-sdk/src/realtime-voice/provider-registry.d.ts +0 -7
- package/dist/plugin-sdk/src/realtime-voice/provider-types.d.ts +0 -55
- package/dist/plugin-sdk/src/routing/account-id.d.ts +0 -3
- package/dist/plugin-sdk/src/routing/account-lookup.d.ts +0 -1
- package/dist/plugin-sdk/src/routing/bindings.d.ts +0 -11
- package/dist/plugin-sdk/src/routing/resolve-route.d.ts +0 -42
- package/dist/plugin-sdk/src/routing/session-key.d.ts +0 -48
- package/dist/plugin-sdk/src/runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/secrets/json-pointer.d.ts +0 -6
- package/dist/plugin-sdk/src/secrets/ref-contract.d.ts +0 -19
- package/dist/plugin-sdk/src/secrets/resolve.d.ts +0 -15
- package/dist/plugin-sdk/src/secrets/runtime-web-tools.types.d.ts +0 -26
- package/dist/plugin-sdk/src/secrets/shared.d.ts +0 -7
- package/dist/plugin-sdk/src/security/audit-channel.d.ts +0 -7
- package/dist/plugin-sdk/src/security/audit-extra.async.d.ts +0 -47
- package/dist/plugin-sdk/src/security/audit-extra.d.ts +0 -10
- package/dist/plugin-sdk/src/security/audit-extra.sync.d.ts +0 -25
- package/dist/plugin-sdk/src/security/audit-fs.d.ts +0 -44
- package/dist/plugin-sdk/src/security/audit-tool-policy.d.ts +0 -1
- package/dist/plugin-sdk/src/security/audit.d.ts +0 -57
- package/dist/plugin-sdk/src/security/channel-metadata.d.ts +0 -6
- package/dist/plugin-sdk/src/security/dangerous-config-flags.d.ts +0 -2
- package/dist/plugin-sdk/src/security/dangerous-tools.d.ts +0 -12
- package/dist/plugin-sdk/src/security/dm-policy-shared.d.ts +0 -93
- package/dist/plugin-sdk/src/security/external-content.d.ts +0 -58
- package/dist/plugin-sdk/src/security/mutable-allowlist-detectors.d.ts +0 -6
- package/dist/plugin-sdk/src/security/safe-regex.d.ts +0 -2
- package/dist/plugin-sdk/src/security/scan-paths.d.ts +0 -5
- package/dist/plugin-sdk/src/security/secret-equal.d.ts +0 -1
- package/dist/plugin-sdk/src/security/skill-scanner.d.ts +0 -25
- package/dist/plugin-sdk/src/security/windows-acl.d.ts +0 -37
- package/dist/plugin-sdk/src/sessions/input-provenance.d.ts +0 -16
- package/dist/plugin-sdk/src/sessions/level-overrides.d.ts +0 -10
- package/dist/plugin-sdk/src/sessions/model-overrides.d.ts +0 -16
- package/dist/plugin-sdk/src/sessions/send-policy.d.ts +0 -11
- package/dist/plugin-sdk/src/sessions/session-key-utils.d.ts +0 -20
- package/dist/plugin-sdk/src/sessions/session-label.d.ts +0 -9
- package/dist/plugin-sdk/src/sessions/transcript-events.d.ts +0 -9
- package/dist/plugin-sdk/src/shared/avatar-policy.d.ts +0 -16
- package/dist/plugin-sdk/src/shared/chat-content.d.ts +0 -5
- package/dist/plugin-sdk/src/shared/chat-envelope.d.ts +0 -2
- package/dist/plugin-sdk/src/shared/config-eval.d.ts +0 -27
- package/dist/plugin-sdk/src/shared/device-auth.d.ts +0 -13
- package/dist/plugin-sdk/src/shared/entry-metadata.d.ts +0 -15
- package/dist/plugin-sdk/src/shared/entry-status.d.ts +0 -47
- package/dist/plugin-sdk/src/shared/frontmatter.d.ts +0 -24
- package/dist/plugin-sdk/src/shared/gateway-bind-url.d.ts +0 -14
- package/dist/plugin-sdk/src/shared/gateway-method-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/shared/model-param-b.d.ts +0 -1
- package/dist/plugin-sdk/src/shared/model-thinking.d.ts +0 -31
- package/dist/plugin-sdk/src/shared/net/ip.d.ts +0 -20
- package/dist/plugin-sdk/src/shared/net/redact-sensitive-url.d.ts +0 -2
- package/dist/plugin-sdk/src/shared/node-list-parse.d.ts +0 -3
- package/dist/plugin-sdk/src/shared/node-list-types.d.ts +0 -48
- package/dist/plugin-sdk/src/shared/node-match.d.ts +0 -9
- package/dist/plugin-sdk/src/shared/operator-scope-compat.d.ts +0 -5
- package/dist/plugin-sdk/src/shared/pid-alive.d.ts +0 -1
- package/dist/plugin-sdk/src/shared/process-scoped-map.d.ts +0 -1
- package/dist/plugin-sdk/src/shared/requirements.d.ts +0 -80
- package/dist/plugin-sdk/src/shared/string-normalization.d.ts +0 -4
- package/dist/plugin-sdk/src/shared/subagents-format.d.ts +0 -15
- package/dist/plugin-sdk/src/shared/tailscale-status.d.ts +0 -8
- package/dist/plugin-sdk/src/shared/text/code-regions.d.ts +0 -6
- package/dist/plugin-sdk/src/shared/text/reasoning-tags.d.ts +0 -6
- package/dist/plugin-sdk/src/shared/text-chunking.d.ts +0 -1
- package/dist/plugin-sdk/src/signal/accounts.d.ts +0 -17
- package/dist/plugin-sdk/src/signal/client.d.ts +0 -32
- package/dist/plugin-sdk/src/signal/daemon.d.ts +0 -26
- package/dist/plugin-sdk/src/signal/format.d.ts +0 -17
- package/dist/plugin-sdk/src/signal/identity.d.ts +0 -24
- package/dist/plugin-sdk/src/signal/index.d.ts +0 -5
- package/dist/plugin-sdk/src/signal/monitor/access-policy.d.ts +0 -40
- package/dist/plugin-sdk/src/signal/monitor/event-handler.d.ts +0 -5
- package/dist/plugin-sdk/src/signal/monitor/event-handler.types.d.ts +0 -125
- package/dist/plugin-sdk/src/signal/monitor/mentions.d.ts +0 -2
- package/dist/plugin-sdk/src/signal/monitor.d.ts +0 -25
- package/dist/plugin-sdk/src/signal/probe.d.ts +0 -7
- package/dist/plugin-sdk/src/signal/reaction-level.d.ts +0 -17
- package/dist/plugin-sdk/src/signal/rpc-context.d.ts +0 -9
- package/dist/plugin-sdk/src/signal/send-reactions.d.ts +0 -32
- package/dist/plugin-sdk/src/signal/send.d.ts +0 -25
- package/dist/plugin-sdk/src/signal/sse-reconnect.d.ts +0 -13
- package/dist/plugin-sdk/src/slack/accounts.d.ts +0 -32
- package/dist/plugin-sdk/src/slack/actions.d.ts +0 -56
- package/dist/plugin-sdk/src/slack/blocks-fallback.d.ts +0 -2
- package/dist/plugin-sdk/src/slack/blocks-input.d.ts +0 -3
- package/dist/plugin-sdk/src/slack/channel-migration.d.ts +0 -20
- package/dist/plugin-sdk/src/slack/client.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/directory-live.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/draft-stream.d.ts +0 -25
- package/dist/plugin-sdk/src/slack/format.d.ts +0 -7
- package/dist/plugin-sdk/src/slack/http/index.d.ts +0 -1
- package/dist/plugin-sdk/src/slack/http/registry.d.ts +0 -12
- package/dist/plugin-sdk/src/slack/index.d.ts +0 -6
- package/dist/plugin-sdk/src/slack/message-actions.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/modal-metadata.d.ts +0 -8
- package/dist/plugin-sdk/src/slack/monitor/allow-list.d.ts +0 -23
- package/dist/plugin-sdk/src/slack/monitor/auth.d.ts +0 -26
- package/dist/plugin-sdk/src/slack/monitor/channel-config.d.ts +0 -43
- package/dist/plugin-sdk/src/slack/monitor/commands.d.ts +0 -9
- package/dist/plugin-sdk/src/slack/monitor/context.d.ts +0 -104
- package/dist/plugin-sdk/src/slack/monitor/dm-auth.d.ts +0 -17
- package/dist/plugin-sdk/src/slack/monitor/events/channels.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/monitor/events/interactions.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/monitor/events/members.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/monitor/events/messages.d.ts +0 -6
- package/dist/plugin-sdk/src/slack/monitor/events/pins.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/monitor/events/reactions.d.ts +0 -4
- package/dist/plugin-sdk/src/slack/monitor/events/system-event-context.d.ts +0 -12
- package/dist/plugin-sdk/src/slack/monitor/events.d.ts +0 -8
- package/dist/plugin-sdk/src/slack/monitor/external-arg-menu-store.d.ts +0 -18
- package/dist/plugin-sdk/src/slack/monitor/media.d.ts +0 -66
- package/dist/plugin-sdk/src/slack/monitor/message-handler/dispatch.d.ts +0 -12
- package/dist/plugin-sdk/src/slack/monitor/message-handler/prepare.d.ts +0 -13
- package/dist/plugin-sdk/src/slack/monitor/message-handler/types.d.ts +0 -22
- package/dist/plugin-sdk/src/slack/monitor/message-handler.d.ts +0 -11
- package/dist/plugin-sdk/src/slack/monitor/mrkdwn.d.ts +0 -1
- package/dist/plugin-sdk/src/slack/monitor/policy.d.ts +0 -5
- package/dist/plugin-sdk/src/slack/monitor/provider.d.ts +0 -7
- package/dist/plugin-sdk/src/slack/monitor/replies.d.ts +0 -54
- package/dist/plugin-sdk/src/slack/monitor/room-context.d.ts +0 -14
- package/dist/plugin-sdk/src/slack/monitor/slash.d.ts +0 -6
- package/dist/plugin-sdk/src/slack/monitor/thread-resolution.d.ts +0 -12
- package/dist/plugin-sdk/src/slack/monitor/types.d.ts +0 -109
- package/dist/plugin-sdk/src/slack/monitor.d.ts +0 -5
- package/dist/plugin-sdk/src/slack/probe.d.ts +0 -14
- package/dist/plugin-sdk/src/slack/resolve-channels.d.ts +0 -19
- package/dist/plugin-sdk/src/slack/resolve-users.d.ts +0 -26
- package/dist/plugin-sdk/src/slack/send.d.ts +0 -22
- package/dist/plugin-sdk/src/slack/stream-mode.d.ts +0 -23
- package/dist/plugin-sdk/src/slack/streaming.d.ts +0 -72
- package/dist/plugin-sdk/src/slack/targets.d.ts +0 -7
- package/dist/plugin-sdk/src/slack/threading-tool-context.d.ts +0 -10
- package/dist/plugin-sdk/src/slack/threading.d.ts +0 -29
- package/dist/plugin-sdk/src/slack/token.d.ts +0 -3
- package/dist/plugin-sdk/src/slack/types.d.ts +0 -58
- package/dist/plugin-sdk/src/tasks/channel-task-ledger.d.ts +0 -9
- package/dist/plugin-sdk/src/tasks/task-executor.d.ts +0 -86
- package/dist/plugin-sdk/src/tasks/task-owner-access.d.ts +0 -12
- package/dist/plugin-sdk/src/tasks/task-registry.d.ts +0 -35
- package/dist/plugin-sdk/src/tasks/task-registry.types.d.ts +0 -114
- package/dist/plugin-sdk/src/tasks/task-status.d.ts +0 -11
- package/dist/plugin-sdk/src/telegram/accounts.d.ts +0 -21
- package/dist/plugin-sdk/src/telegram/allowed-updates.d.ts +0 -4
- package/dist/plugin-sdk/src/telegram/api-logging.d.ts +0 -11
- package/dist/plugin-sdk/src/telegram/audit.d.ts +0 -29
- package/dist/plugin-sdk/src/telegram/bot/delivery.d.ts +0 -35
- package/dist/plugin-sdk/src/telegram/bot/helpers.d.ts +0 -127
- package/dist/plugin-sdk/src/telegram/bot/types.d.ts +0 -28
- package/dist/plugin-sdk/src/telegram/bot-access.d.ts +0 -26
- package/dist/plugin-sdk/src/telegram/bot-handlers.d.ts +0 -2
- package/dist/plugin-sdk/src/telegram/bot-message-context.d.ts +0 -149
- package/dist/plugin-sdk/src/telegram/bot-message-dispatch.d.ts +0 -29
- package/dist/plugin-sdk/src/telegram/bot-message.d.ts +0 -20
- package/dist/plugin-sdk/src/telegram/bot-native-command-menu.d.ts +0 -33
- package/dist/plugin-sdk/src/telegram/bot-native-commands.d.ts +0 -58
- package/dist/plugin-sdk/src/telegram/bot-updates.d.ts +0 -31
- package/dist/plugin-sdk/src/telegram/bot.d.ts +0 -62
- package/dist/plugin-sdk/src/telegram/button-types.d.ts +0 -7
- package/dist/plugin-sdk/src/telegram/caption.d.ts +0 -5
- package/dist/plugin-sdk/src/telegram/dm-access.d.ts +0 -18
- package/dist/plugin-sdk/src/telegram/draft-stream.d.ts +0 -37
- package/dist/plugin-sdk/src/telegram/fetch.d.ts +0 -5
- package/dist/plugin-sdk/src/telegram/format.d.ts +0 -18
- package/dist/plugin-sdk/src/telegram/group-access.d.ts +0 -54
- package/dist/plugin-sdk/src/telegram/group-config-helpers.d.ts +0 -8
- package/dist/plugin-sdk/src/telegram/group-migration.d.ts +0 -20
- package/dist/plugin-sdk/src/telegram/inline-buttons.d.ts +0 -11
- package/dist/plugin-sdk/src/telegram/lane-delivery.d.ts +0 -56
- package/dist/plugin-sdk/src/telegram/model-buttons.d.ts +0 -63
- package/dist/plugin-sdk/src/telegram/monitor.d.ts +0 -19
- package/dist/plugin-sdk/src/telegram/network-config.d.ts +0 -33
- package/dist/plugin-sdk/src/telegram/network-errors.d.ts +0 -5
- package/dist/plugin-sdk/src/telegram/outbound-params.d.ts +0 -2
- package/dist/plugin-sdk/src/telegram/probe.d.ts +0 -17
- package/dist/plugin-sdk/src/telegram/proxy.d.ts +0 -1
- package/dist/plugin-sdk/src/telegram/reaction-level.d.ts +0 -11
- package/dist/plugin-sdk/src/telegram/reasoning-lane-coordinator.d.ts +0 -18
- package/dist/plugin-sdk/src/telegram/send.d.ts +0 -153
- package/dist/plugin-sdk/src/telegram/sendchataction-401-backoff.d.ts +0 -28
- package/dist/plugin-sdk/src/telegram/sent-message-cache.d.ts +0 -16
- package/dist/plugin-sdk/src/telegram/status-reaction-variants.d.ts +0 -21
- package/dist/plugin-sdk/src/telegram/sticker-cache.d.ts +0 -46
- package/dist/plugin-sdk/src/telegram/target-writeback.d.ts +0 -7
- package/dist/plugin-sdk/src/telegram/targets.d.ts +0 -11
- package/dist/plugin-sdk/src/telegram/token.d.ts +0 -13
- package/dist/plugin-sdk/src/telegram/update-offset-store.d.ts +0 -15
- package/dist/plugin-sdk/src/telegram/voice.d.ts +0 -16
- package/dist/plugin-sdk/src/telegram/webhook.d.ts +0 -20
- package/dist/plugin-sdk/src/terminal/ansi.d.ts +0 -2
- package/dist/plugin-sdk/src/terminal/health-style.d.ts +0 -1
- package/dist/plugin-sdk/src/terminal/links.d.ts +0 -6
- package/dist/plugin-sdk/src/terminal/palette.d.ts +0 -10
- package/dist/plugin-sdk/src/terminal/progress-line.d.ts +0 -3
- package/dist/plugin-sdk/src/terminal/prompt-style.d.ts +0 -6
- package/dist/plugin-sdk/src/terminal/restore.d.ts +0 -17
- package/dist/plugin-sdk/src/terminal/table.d.ts +0 -18
- package/dist/plugin-sdk/src/terminal/theme.d.ts +0 -18
- package/dist/plugin-sdk/src/tts/tts-core.d.ts +0 -52
- package/dist/plugin-sdk/src/tts/tts.d.ts +0 -194
- package/dist/plugin-sdk/src/utils/account-id.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/boolean.d.ts +0 -5
- package/dist/plugin-sdk/src/utils/chunk-items.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/delivery-context.d.ts +0 -29
- package/dist/plugin-sdk/src/utils/directive-tags.d.ts +0 -29
- package/dist/plugin-sdk/src/utils/fetch-timeout.d.ts +0 -13
- package/dist/plugin-sdk/src/utils/mask-api-key.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/message-channel.d.ts +0 -27
- package/dist/plugin-sdk/src/utils/normalize-secret-input.d.ts +0 -11
- package/dist/plugin-sdk/src/utils/private-network-url.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/provider-utils.d.ts +0 -9
- package/dist/plugin-sdk/src/utils/queue-helpers.d.ts +0 -80
- package/dist/plugin-sdk/src/utils/reaction-level.d.ts +0 -15
- package/dist/plugin-sdk/src/utils/run-with-concurrency.d.ts +0 -11
- package/dist/plugin-sdk/src/utils/safe-json.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/shell-argv.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/transcript-tools.d.ts +0 -8
- package/dist/plugin-sdk/src/utils/usage-format.d.ts +0 -26
- package/dist/plugin-sdk/src/utils/with-timeout.d.ts +0 -1
- package/dist/plugin-sdk/src/utils.d.ts +0 -63
- package/dist/plugin-sdk/src/version.d.ts +0 -8
- package/dist/plugin-sdk/src/video-generation/dashscope-compatible.d.ts +0 -45
- package/dist/plugin-sdk/src/video-generation/types.d.ts +0 -79
- package/dist/plugin-sdk/src/wallet/chat-command.d.ts +0 -17
- package/dist/plugin-sdk/src/wallet/local-socket-signer-broker.d.ts +0 -13
- package/dist/plugin-sdk/src/wallet/local-socket-signer-custody.d.ts +0 -35
- package/dist/plugin-sdk/src/wallet/local-socket-signer-protocol.d.ts +0 -191
- package/dist/plugin-sdk/src/wallet/providers/alchemy-adapter.d.ts +0 -29
- package/dist/plugin-sdk/src/wallet/providers/embedded-keystore-adapter.d.ts +0 -37
- package/dist/plugin-sdk/src/wallet/providers/local-socket-signer-adapter.d.ts +0 -44
- package/dist/plugin-sdk/src/wallet/providers/privy-adapter.d.ts +0 -31
- package/dist/plugin-sdk/src/wallet/providers/turnkey-adapter.d.ts +0 -33
- package/dist/plugin-sdk/src/wallet/solana-address.d.ts +0 -2
- package/dist/plugin-sdk/src/wallet/solana-assets.d.ts +0 -80
- package/dist/plugin-sdk/src/wallet/solana-bond-signing.d.ts +0 -20
- package/dist/plugin-sdk/src/wallet/solana-spl-transfer.d.ts +0 -33
- package/dist/plugin-sdk/src/wallet/solana-swap.d.ts +0 -93
- package/dist/plugin-sdk/src/wallet/solana-token-resolver.d.ts +0 -36
- package/dist/plugin-sdk/src/wallet/solana-transaction-inspection.d.ts +0 -16
- package/dist/plugin-sdk/src/wallet/solana-trigger.d.ts +0 -74
- package/dist/plugin-sdk/src/wallet/trade-chat-command.d.ts +0 -18
- package/dist/plugin-sdk/src/wallet/wallet-agent-selection.d.ts +0 -43
- package/dist/plugin-sdk/src/wallet/wallet-approval-auth.d.ts +0 -212
- package/dist/plugin-sdk/src/wallet/wallet-audit-log.d.ts +0 -18
- package/dist/plugin-sdk/src/wallet/wallet-canary.d.ts +0 -47
- package/dist/plugin-sdk/src/wallet/wallet-custody.d.ts +0 -313
- package/dist/plugin-sdk/src/wallet/wallet-inbound-events.d.ts +0 -88
- package/dist/plugin-sdk/src/wallet/wallet-observability.d.ts +0 -16
- package/dist/plugin-sdk/src/wallet/wallet-policy-simulation.d.ts +0 -61
- package/dist/plugin-sdk/src/wallet/wallet-policy.d.ts +0 -144
- package/dist/plugin-sdk/src/wallet/wallet-provider-adapter.d.ts +0 -111
- package/dist/plugin-sdk/src/wallet/wallet-provider-capabilities.d.ts +0 -51
- package/dist/plugin-sdk/src/wallet/wallet-provider-registry.d.ts +0 -128
- package/dist/plugin-sdk/src/wallet/wallet-provider-resolver.d.ts +0 -17
- package/dist/plugin-sdk/src/wallet/wallet-redaction.d.ts +0 -3
- package/dist/plugin-sdk/src/wallet/wallet-runtime-config.d.ts +0 -93
- package/dist/plugin-sdk/src/wallet/wallet-secrets-store.d.ts +0 -63
- package/dist/plugin-sdk/src/wallet/wallet-send-approvals.d.ts +0 -165
- package/dist/plugin-sdk/src/wallet/wallet-settlement-links.d.ts +0 -57
- package/dist/plugin-sdk/src/wallet/wallet-status.d.ts +0 -106
- package/dist/plugin-sdk/src/wallet/wallet-task-ledger.d.ts +0 -7
- package/dist/plugin-sdk/src/web/accounts.d.ts +0 -39
- package/dist/plugin-sdk/src/web/active-listener.d.ts +0 -26
- package/dist/plugin-sdk/src/web/auth-store.d.ts +0 -26
- package/dist/plugin-sdk/src/web/auto-reply/constants.d.ts +0 -1
- package/dist/plugin-sdk/src/web/auto-reply/deliver-reply.d.ts +0 -19
- package/dist/plugin-sdk/src/web/auto-reply/heartbeat-runner.d.ts +0 -20
- package/dist/plugin-sdk/src/web/auto-reply/loggers.d.ts +0 -4
- package/dist/plugin-sdk/src/web/auto-reply/mentions.d.ts +0 -19
- package/dist/plugin-sdk/src/web/auto-reply/monitor/ack-reaction.d.ts +0 -13
- package/dist/plugin-sdk/src/web/auto-reply/monitor/broadcast.d.ts +0 -16
- package/dist/plugin-sdk/src/web/auto-reply/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/src/web/auto-reply/monitor/echo.d.ts +0 -17
- package/dist/plugin-sdk/src/web/auto-reply/monitor/group-activation.d.ts +0 -9
- package/dist/plugin-sdk/src/web/auto-reply/monitor/group-gating.d.ts +0 -33
- package/dist/plugin-sdk/src/web/auto-reply/monitor/group-members.d.ts +0 -6
- package/dist/plugin-sdk/src/web/auto-reply/monitor/last-route.d.ts +0 -15
- package/dist/plugin-sdk/src/web/auto-reply/monitor/message-line.d.ts +0 -11
- package/dist/plugin-sdk/src/web/auto-reply/monitor/on-message.d.ts +0 -24
- package/dist/plugin-sdk/src/web/auto-reply/monitor/peer.d.ts +0 -2
- package/dist/plugin-sdk/src/web/auto-reply/monitor/process-message.d.ts +0 -40
- package/dist/plugin-sdk/src/web/auto-reply/monitor.d.ts +0 -5
- package/dist/plugin-sdk/src/web/auto-reply/session-snapshot.d.ts +0 -17
- package/dist/plugin-sdk/src/web/auto-reply/types.d.ts +0 -30
- package/dist/plugin-sdk/src/web/auto-reply/util.d.ts +0 -2
- package/dist/plugin-sdk/src/web/auto-reply.d.ts +0 -1
- package/dist/plugin-sdk/src/web/auto-reply.impl.d.ts +0 -6
- package/dist/plugin-sdk/src/web/inbound/access-control.d.ts +0 -36
- package/dist/plugin-sdk/src/web/inbound/dedupe.d.ts +0 -2
- package/dist/plugin-sdk/src/web/inbound/extract.d.ts +0 -13
- package/dist/plugin-sdk/src/web/inbound/media.d.ts +0 -7
- package/dist/plugin-sdk/src/web/inbound/monitor.d.ts +0 -30
- package/dist/plugin-sdk/src/web/inbound/send-api.d.ts +0 -22
- package/dist/plugin-sdk/src/web/inbound/types.d.ts +0 -41
- package/dist/plugin-sdk/src/web/inbound.d.ts +0 -4
- package/dist/plugin-sdk/src/web/login-qr.d.ts +0 -19
- package/dist/plugin-sdk/src/web/login.d.ts +0 -3
- package/dist/plugin-sdk/src/web/media.d.ts +0 -43
- package/dist/plugin-sdk/src/web/outbound.d.ts +0 -25
- package/dist/plugin-sdk/src/web/qr-image.d.ts +0 -4
- package/dist/plugin-sdk/src/web/reconnect.d.ts +0 -12
- package/dist/plugin-sdk/src/web/session.d.ts +0 -14
- package/dist/plugin-sdk/src/web/vcard.d.ts +0 -6
- package/dist/plugin-sdk/src/whatsapp/normalize.d.ts +0 -6
- package/dist/plugin-sdk/src/whatsapp/resolve-outbound-target.d.ts +0 -12
- package/dist/plugin-sdk/src/wizard/onboarding.types.d.ts +0 -31
- package/dist/plugin-sdk/src/wizard/onboarding.wallet.d.ts +0 -45
- package/dist/plugin-sdk/src/wizard/prompts.d.ts +0 -45
- package/dist/plugin-sdk/src/wizard/session.d.ts +0 -42
- package/dist/plugin-sdk/ssrf-Cce6LubA.js +0 -421
- package/dist/plugin-sdk/ssrf-Cg5wg0v3.js +0 -4
- package/dist/plugin-sdk/status-B2vb7zNW.js +0 -106417
- package/dist/plugin-sdk/sticker-cache-C1vOWkzA.js +0 -170
- package/dist/plugin-sdk/sticker-cache-CJDzqowL.js +0 -170
- package/dist/plugin-sdk/subsystem-BmpnSVOu.js +0 -358
- package/dist/plugin-sdk/tables-BD7H5ug-.js +0 -55
- package/dist/plugin-sdk/tables-CJE8kB35.js +0 -55
- package/dist/plugin-sdk/target-errors-kz4lDpCF.js +0 -26
- package/dist/plugin-sdk/targets-4QTk4tTz.js +0 -45
- package/dist/plugin-sdk/targets-DmSpDM4F.js +0 -45
- package/dist/plugin-sdk/targets-cA134MEE.js +0 -101
- package/dist/plugin-sdk/targets-t1hbjHdJ.js +0 -101
- package/dist/plugin-sdk/telegram-actions-BoiC9J7L.js +0 -307
- package/dist/plugin-sdk/telegram-actions-CwAsKaNz.js +0 -307
- package/dist/plugin-sdk/thread-bindings.lifecycle-Djem8FWF.js +0 -737
- package/dist/plugin-sdk/thread-bindings.lifecycle-gmHv3hc7.js +0 -737
- package/dist/plugin-sdk/thread-bindings.state-CNT2vxm3.js +0 -643
- package/dist/plugin-sdk/thread-bindings.state-D8kN2X6H.js +0 -643
- package/dist/plugin-sdk/token-BWZYO8QR.js +0 -36
- package/dist/plugin-sdk/tokens-BK5rrwBB.js +0 -72
- package/dist/plugin-sdk/tokens-CQRTq-NN.js +0 -72
- package/dist/plugin-sdk/tool-loop-detection-Ci_YYA7P.js +0 -352
- package/dist/plugin-sdk/transcript-events-BJQWUdmU.js +0 -24
- package/dist/plugin-sdk/ui-7sxJ-x37.js +0 -33
- package/dist/plugin-sdk/ui-BQ-Vvq_c.js +0 -33
- package/dist/plugin-sdk/utils-LGKVujSU.js +0 -237
- package/dist/plugin-sdk/web-BjV7ROeA.js +0 -2226
- package/dist/plugin-sdk/web-DjTSgU98.js +0 -2226
- package/dist/plugin-sdk/whatsapp-actions-68Mfs2dJ.js +0 -123
- package/dist/plugin-sdk/whatsapp-actions-DRqtzvTO.js +0 -123
- package/dist/plugin-sdk/wsl-DcM2PgSS.js +0 -1016
- package/dist/plugin-sdk/wsl-PXrdWitE.js +0 -1016
- /package/dist/plugin-sdk/{channel-activity-Cf5sKkfd.js → channel-activity-B7MIaDei.js} +0 -0
- /package/dist/plugin-sdk/{client-DWTXscox.js → client-BTUzO_8g.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-C2vOB38t.js → command-poll-backoff-CBq0jVRw.js} +0 -0
- /package/dist/plugin-sdk/{date-time-Bo5FVB7G.js → date-time-Bbp5JvNw.js} +0 -0
- /package/dist/plugin-sdk/{diagnostic-session-state-CT36_PCE.js → diagnostic-session-state-B-9PL5r7.js} +0 -0
- /package/dist/plugin-sdk/{draft-stream-loop-2KC6-8CG.js → draft-stream-loop-DZ1OAyye.js} +0 -0
- /package/dist/plugin-sdk/{fetch-headers-BTcaUCW6.js → fetch-headers-DvXyXtoI.js} +0 -0
- /package/dist/plugin-sdk/{fetch-timeout-Dyj5Y_Ss.js → fetch-timeout-jOIu9Xud.js} +0 -0
- /package/dist/plugin-sdk/{gateway-registry-CtUjFG3Q.js → gateway-registry-C-MTEdvG.js} +0 -0
- /package/dist/plugin-sdk/{inbound-context-Daf9i2Me.js → inbound-context-BNCTzgjG.js} +0 -0
- /package/dist/plugin-sdk/{internal-DFhCtnuk.js → internal-CC6TMTtc.js} +0 -0
- /package/dist/plugin-sdk/{media-payload-CcW51vQj.js → media-payload-DpYEcV-X.js} +0 -0
- /package/dist/plugin-sdk/{polls-B4cMiwMo.js → polls-Dy1NsYKT.js} +0 -0
- /package/dist/plugin-sdk/{proxy-CKQOQYAl.js → proxy-R5TjOIFS.js} +0 -0
- /package/dist/plugin-sdk/{qmd-scope-ubzoBMhc.js → qmd-scope-C9tRnohc.js} +0 -0
- /package/dist/plugin-sdk/{redact-identifier-BAD7jXcr.js → redact-identifier-CDvAeiFm.js} +0 -0
- /package/dist/plugin-sdk/{redact-sensitive-url-DK8OUExz.js → redact-sensitive-url-B0RJQqO7.js} +0 -0
- /package/dist/plugin-sdk/{render-C9LkRUhd.js → render-K7NwXvVu.js} +0 -0
- /package/dist/plugin-sdk/{reply-reference-DxIu2vr0.js → reply-reference-CWEIswqw.js} +0 -0
- /package/dist/plugin-sdk/{secure-random-CO1VkMEt.js → secure-random-C2EhANj2.js} +0 -0
- /package/dist/plugin-sdk/{target-errors-Dn4aykSV.js → target-errors-C0yNDbGS.js} +0 -0
- /package/dist/plugin-sdk/{tool-loop-detection-D6OX2-I9.js → tool-loop-detection-P5u2k0_f.js} +0 -0
- /package/dist/plugin-sdk/{with-timeout-DqkblR98.js → with-timeout-Dl513q34.js} +0 -0
|
@@ -1,2217 +0,0 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
2
|
-
import { w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
|
|
3
|
-
import { t as CONFIG_DIR } from "./utils-CYk9EKoq.js";
|
|
4
|
-
import { n as loadConfig, ur as isErrno } from "./config-DtqAN2L3.js";
|
|
5
|
-
import { H as isNotFoundPathError, U as isPathInside } from "./agent-scope-kIJqg5PA.js";
|
|
6
|
-
import { c as resolvePinnedHostnameWithPolicy, d as isLoopbackIpAddress, f as normalizeIpAddress, t as importOptionalRuntimeDependency, u as isIpInCidr } from "./optional-runtime-dependency-szS49voX.js";
|
|
7
|
-
import { n as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-BPYS6-j1.js";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
import fs from "node:fs";
|
|
10
|
-
import os from "node:os";
|
|
11
|
-
import fs$1 from "node:fs/promises";
|
|
12
|
-
import { execFileSync, spawn } from "node:child_process";
|
|
13
|
-
import { createHmac } from "node:crypto";
|
|
14
|
-
import { createServer } from "node:http";
|
|
15
|
-
import net from "node:net";
|
|
16
|
-
import WebSocket, { WebSocketServer } from "ws";
|
|
17
|
-
import { Buffer as Buffer$1 } from "node:buffer";
|
|
18
|
-
|
|
19
|
-
//#region src/browser/constants.ts
|
|
20
|
-
const DEFAULT_FASED_BROWSER_ENABLED = true;
|
|
21
|
-
const DEFAULT_BROWSER_EVALUATE_ENABLED = true;
|
|
22
|
-
const DEFAULT_FASED_BROWSER_COLOR = "#FF4500";
|
|
23
|
-
const DEFAULT_FASED_BROWSER_PROFILE_NAME = "fased";
|
|
24
|
-
const DEFAULT_BROWSER_DEFAULT_PROFILE_NAME = "chrome";
|
|
25
|
-
const DEFAULT_AI_SNAPSHOT_MAX_CHARS = 8e4;
|
|
26
|
-
const DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS = 1e4;
|
|
27
|
-
const DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH = 6;
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/gateway/net.ts
|
|
31
|
-
function isLoopbackAddress(ip) {
|
|
32
|
-
return isLoopbackIpAddress(ip);
|
|
33
|
-
}
|
|
34
|
-
function normalizeIp(ip) {
|
|
35
|
-
return normalizeIpAddress(ip);
|
|
36
|
-
}
|
|
37
|
-
function stripOptionalPort(ip) {
|
|
38
|
-
if (ip.startsWith("[")) {
|
|
39
|
-
const end = ip.indexOf("]");
|
|
40
|
-
if (end !== -1) return ip.slice(1, end);
|
|
41
|
-
}
|
|
42
|
-
if (net.isIP(ip)) return ip;
|
|
43
|
-
const lastColon = ip.lastIndexOf(":");
|
|
44
|
-
if (lastColon > -1 && ip.includes(".") && ip.indexOf(":") === lastColon) {
|
|
45
|
-
const candidate = ip.slice(0, lastColon);
|
|
46
|
-
if (net.isIP(candidate) === 4) return candidate;
|
|
47
|
-
}
|
|
48
|
-
return ip;
|
|
49
|
-
}
|
|
50
|
-
function parseIpLiteral(raw) {
|
|
51
|
-
const trimmed = raw?.trim();
|
|
52
|
-
if (!trimmed) return;
|
|
53
|
-
const normalized = normalizeIp(stripOptionalPort(trimmed));
|
|
54
|
-
if (!normalized || net.isIP(normalized) === 0) return;
|
|
55
|
-
return normalized;
|
|
56
|
-
}
|
|
57
|
-
function parseRealIp(realIp) {
|
|
58
|
-
return parseIpLiteral(realIp);
|
|
59
|
-
}
|
|
60
|
-
function resolveForwardedClientIp(params) {
|
|
61
|
-
const { forwardedFor, trustedProxies } = params;
|
|
62
|
-
if (!trustedProxies?.length) return;
|
|
63
|
-
const forwardedChain = [];
|
|
64
|
-
for (const entry of forwardedFor?.split(",") ?? []) {
|
|
65
|
-
const normalized = parseIpLiteral(entry);
|
|
66
|
-
if (normalized) forwardedChain.push(normalized);
|
|
67
|
-
}
|
|
68
|
-
if (forwardedChain.length === 0) return;
|
|
69
|
-
for (let index = forwardedChain.length - 1; index >= 0; index -= 1) {
|
|
70
|
-
const hop = forwardedChain[index];
|
|
71
|
-
if (!isTrustedProxyAddress(hop, trustedProxies)) return hop;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function isTrustedProxyAddress(ip, trustedProxies) {
|
|
75
|
-
const normalized = normalizeIp(ip);
|
|
76
|
-
if (!normalized || !trustedProxies || trustedProxies.length === 0) return false;
|
|
77
|
-
return trustedProxies.some((proxy) => {
|
|
78
|
-
const candidate = proxy.trim();
|
|
79
|
-
if (!candidate) return false;
|
|
80
|
-
return isIpInCidr(normalized, candidate);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function resolveClientIp(params) {
|
|
84
|
-
const remote = normalizeIp(params.remoteAddr);
|
|
85
|
-
if (!remote) return;
|
|
86
|
-
if (!isTrustedProxyAddress(remote, params.trustedProxies)) return remote;
|
|
87
|
-
const forwardedIp = resolveForwardedClientIp({
|
|
88
|
-
forwardedFor: params.forwardedFor,
|
|
89
|
-
trustedProxies: params.trustedProxies
|
|
90
|
-
});
|
|
91
|
-
if (forwardedIp) return forwardedIp;
|
|
92
|
-
if (params.allowRealIpFallback) return parseRealIp(params.realIp);
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Check if a hostname or IP refers to the local machine.
|
|
96
|
-
* Handles: localhost, 127.x.x.x, ::1, [::1], ::ffff:127.x.x.x
|
|
97
|
-
* Note: 0.0.0.0 and :: are NOT loopback - they bind to all interfaces.
|
|
98
|
-
*/
|
|
99
|
-
function isLoopbackHost(host) {
|
|
100
|
-
if (!host) return false;
|
|
101
|
-
const h = host.trim().toLowerCase();
|
|
102
|
-
if (h === "localhost") return true;
|
|
103
|
-
return isLoopbackAddress(h.startsWith("[") && h.endsWith("]") ? h.slice(1, -1) : h);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Security check for WebSocket URLs (CWE-319: Cleartext Transmission of Sensitive Information).
|
|
107
|
-
*
|
|
108
|
-
* Returns true if the URL is secure for transmitting data:
|
|
109
|
-
* - wss:// (TLS) is always secure
|
|
110
|
-
* - ws:// is only secure for loopback addresses (localhost, 127.x.x.x, ::1)
|
|
111
|
-
*
|
|
112
|
-
* All other ws:// URLs are considered insecure because both credentials
|
|
113
|
-
* AND chat/conversation data would be exposed to network interception.
|
|
114
|
-
*/
|
|
115
|
-
function isSecureWebSocketUrl(url) {
|
|
116
|
-
let parsed;
|
|
117
|
-
try {
|
|
118
|
-
parsed = new URL(url);
|
|
119
|
-
} catch {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
if (parsed.protocol === "wss:") return true;
|
|
123
|
-
if (parsed.protocol !== "ws:") return false;
|
|
124
|
-
return isLoopbackHost(parsed.hostname);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/infra/ws.ts
|
|
129
|
-
function rawDataToString(data, encoding = "utf8") {
|
|
130
|
-
if (typeof data === "string") return data;
|
|
131
|
-
if (Buffer$1.isBuffer(data)) return data.toString(encoding);
|
|
132
|
-
if (Array.isArray(data)) return Buffer$1.concat(data).toString(encoding);
|
|
133
|
-
if (data instanceof ArrayBuffer) return Buffer$1.from(data).toString(encoding);
|
|
134
|
-
return Buffer$1.from(String(data)).toString(encoding);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/browser/extension-relay-auth.ts
|
|
139
|
-
const RELAY_TOKEN_CONTEXT = "fased-extension-relay-v1";
|
|
140
|
-
const DEFAULT_RELAY_PROBE_TIMEOUT_MS = 500;
|
|
141
|
-
const FASED_RELAY_BROWSER = "FasedAgent/extension-relay";
|
|
142
|
-
function resolveGatewayAuthToken() {
|
|
143
|
-
const envToken = process.env.FASED_GATEWAY_TOKEN?.trim();
|
|
144
|
-
if (envToken) return envToken;
|
|
145
|
-
try {
|
|
146
|
-
const configToken = loadConfig().gateway?.auth?.token?.trim();
|
|
147
|
-
if (configToken) return configToken;
|
|
148
|
-
} catch {}
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
function deriveRelayAuthToken(gatewayToken, port) {
|
|
152
|
-
return createHmac("sha256", gatewayToken).update(`${RELAY_TOKEN_CONTEXT}:${port}`).digest("hex");
|
|
153
|
-
}
|
|
154
|
-
function resolveRelayAcceptedTokensForPort(port) {
|
|
155
|
-
const gatewayToken = resolveGatewayAuthToken();
|
|
156
|
-
if (!gatewayToken) throw new Error("extension relay requires gateway auth token (set gateway.auth.token or FASED_GATEWAY_TOKEN)");
|
|
157
|
-
const relayToken = deriveRelayAuthToken(gatewayToken, port);
|
|
158
|
-
if (relayToken === gatewayToken) return [relayToken];
|
|
159
|
-
return [relayToken, gatewayToken];
|
|
160
|
-
}
|
|
161
|
-
function resolveRelayAuthTokenForPort(port) {
|
|
162
|
-
return resolveRelayAcceptedTokensForPort(port)[0];
|
|
163
|
-
}
|
|
164
|
-
async function probeAuthenticatedFasedAgentRelay(params) {
|
|
165
|
-
const ctrl = new AbortController();
|
|
166
|
-
const timer = setTimeout(() => ctrl.abort(), params.timeoutMs ?? DEFAULT_RELAY_PROBE_TIMEOUT_MS);
|
|
167
|
-
try {
|
|
168
|
-
const versionUrl = new URL("/json/version", `${params.baseUrl}/`).toString();
|
|
169
|
-
const res = await fetch(versionUrl, {
|
|
170
|
-
signal: ctrl.signal,
|
|
171
|
-
headers: { [params.relayAuthHeader]: params.relayAuthToken }
|
|
172
|
-
});
|
|
173
|
-
if (!res.ok) return false;
|
|
174
|
-
const body = await res.json();
|
|
175
|
-
return (typeof body?.Browser === "string" ? body.Browser.trim() : "") === FASED_RELAY_BROWSER;
|
|
176
|
-
} catch {
|
|
177
|
-
return false;
|
|
178
|
-
} finally {
|
|
179
|
-
clearTimeout(timer);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region src/browser/extension-relay.ts
|
|
185
|
-
const RELAY_AUTH_HEADER = "x-fased-relay-token";
|
|
186
|
-
const DEFAULT_EXTENSION_RECONNECT_GRACE_MS = 5e3;
|
|
187
|
-
const DEFAULT_EXTENSION_COMMAND_RECONNECT_WAIT_MS = 3e3;
|
|
188
|
-
function headerValue(value) {
|
|
189
|
-
if (!value) return;
|
|
190
|
-
if (Array.isArray(value)) return value[0];
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
function getHeader(req, name) {
|
|
194
|
-
return headerValue(req.headers[name.toLowerCase()]);
|
|
195
|
-
}
|
|
196
|
-
function getRelayAuthTokenFromRequest(req, url) {
|
|
197
|
-
const headerToken = getHeader(req, RELAY_AUTH_HEADER)?.trim();
|
|
198
|
-
if (headerToken) return headerToken;
|
|
199
|
-
const queryToken = url?.searchParams.get("token")?.trim();
|
|
200
|
-
if (queryToken) return queryToken;
|
|
201
|
-
}
|
|
202
|
-
function parseUrlPort(parsed) {
|
|
203
|
-
const port = parsed.port?.trim() !== "" ? Number(parsed.port) : parsed.protocol === "https:" ? 443 : 80;
|
|
204
|
-
if (!Number.isFinite(port) || port <= 0 || port > 65535) return null;
|
|
205
|
-
return port;
|
|
206
|
-
}
|
|
207
|
-
function parseBaseUrl(raw) {
|
|
208
|
-
const parsed = new URL(raw.trim().replace(/\/$/, ""));
|
|
209
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new Error(`extension relay cdpUrl must be http(s), got ${parsed.protocol}`);
|
|
210
|
-
const host = parsed.hostname;
|
|
211
|
-
const port = parseUrlPort(parsed);
|
|
212
|
-
if (!port) throw new Error(`extension relay cdpUrl has invalid port: ${parsed.port || "(empty)"}`);
|
|
213
|
-
return {
|
|
214
|
-
host,
|
|
215
|
-
port,
|
|
216
|
-
baseUrl: parsed.toString().replace(/\/$/, "")
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function text(res, status, bodyText) {
|
|
220
|
-
const body = Buffer.from(bodyText);
|
|
221
|
-
res.write(`HTTP/1.1 ${status} ${status === 200 ? "OK" : "ERR"}\r\nContent-Type: text/plain; charset=utf-8\r
|
|
222
|
-
Content-Length: ${body.length}\r\nConnection: close\r
|
|
223
|
-
\r
|
|
224
|
-
`);
|
|
225
|
-
res.write(body);
|
|
226
|
-
res.end();
|
|
227
|
-
}
|
|
228
|
-
function rejectUpgrade(socket, status, bodyText) {
|
|
229
|
-
text(socket, status, bodyText);
|
|
230
|
-
try {
|
|
231
|
-
socket.destroy();
|
|
232
|
-
} catch {}
|
|
233
|
-
}
|
|
234
|
-
function envMsOrDefault(name, fallback) {
|
|
235
|
-
const raw = process.env[name];
|
|
236
|
-
if (!raw || raw.trim() === "") return fallback;
|
|
237
|
-
const parsed = Number.parseInt(raw, 10);
|
|
238
|
-
if (!Number.isFinite(parsed) || parsed <= 0) return fallback;
|
|
239
|
-
return parsed;
|
|
240
|
-
}
|
|
241
|
-
const relayRuntimeByPort = /* @__PURE__ */ new Map();
|
|
242
|
-
const relayInitByPort = /* @__PURE__ */ new Map();
|
|
243
|
-
function isAddrInUseError(err) {
|
|
244
|
-
return typeof err === "object" && err !== null && "code" in err && err.code === "EADDRINUSE";
|
|
245
|
-
}
|
|
246
|
-
function relayAuthTokenForUrl(url) {
|
|
247
|
-
try {
|
|
248
|
-
const parsed = new URL(url);
|
|
249
|
-
if (!isLoopbackHost(parsed.hostname)) return null;
|
|
250
|
-
const port = parseUrlPort(parsed);
|
|
251
|
-
if (!port) return null;
|
|
252
|
-
return relayRuntimeByPort.get(port)?.relayAuthToken ?? null;
|
|
253
|
-
} catch {
|
|
254
|
-
return null;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
function getChromeExtensionRelayAuthHeaders(url) {
|
|
258
|
-
const token = relayAuthTokenForUrl(url);
|
|
259
|
-
if (!token) return {};
|
|
260
|
-
return { [RELAY_AUTH_HEADER]: token };
|
|
261
|
-
}
|
|
262
|
-
async function ensureChromeExtensionRelayServer(opts) {
|
|
263
|
-
const info = parseBaseUrl(opts.cdpUrl);
|
|
264
|
-
if (!isLoopbackHost(info.host)) throw new Error(`extension relay requires loopback cdpUrl host (got ${info.host})`);
|
|
265
|
-
const existing = relayRuntimeByPort.get(info.port);
|
|
266
|
-
if (existing) return existing.server;
|
|
267
|
-
const inFlight = relayInitByPort.get(info.port);
|
|
268
|
-
if (inFlight) return await inFlight;
|
|
269
|
-
const extensionReconnectGraceMs = envMsOrDefault("FASED_EXTENSION_RELAY_RECONNECT_GRACE_MS", DEFAULT_EXTENSION_RECONNECT_GRACE_MS);
|
|
270
|
-
const extensionCommandReconnectWaitMs = envMsOrDefault("FASED_EXTENSION_RELAY_COMMAND_RECONNECT_WAIT_MS", DEFAULT_EXTENSION_COMMAND_RECONNECT_WAIT_MS);
|
|
271
|
-
const initPromise = (async () => {
|
|
272
|
-
const relayAuthToken = resolveRelayAuthTokenForPort(info.port);
|
|
273
|
-
const relayAuthTokens = new Set(resolveRelayAcceptedTokensForPort(info.port));
|
|
274
|
-
let extensionWs = null;
|
|
275
|
-
const cdpClients = /* @__PURE__ */ new Set();
|
|
276
|
-
const connectedTargets = /* @__PURE__ */ new Map();
|
|
277
|
-
const extensionConnected = () => extensionWs?.readyState === WebSocket.OPEN;
|
|
278
|
-
let extensionDisconnectCleanupTimer = null;
|
|
279
|
-
const extensionReconnectWaiters = /* @__PURE__ */ new Set();
|
|
280
|
-
const flushExtensionReconnectWaiters = (connected) => {
|
|
281
|
-
if (extensionReconnectWaiters.size === 0) return;
|
|
282
|
-
const waiters = Array.from(extensionReconnectWaiters);
|
|
283
|
-
extensionReconnectWaiters.clear();
|
|
284
|
-
for (const waiter of waiters) waiter(connected);
|
|
285
|
-
};
|
|
286
|
-
const clearExtensionDisconnectCleanupTimer = () => {
|
|
287
|
-
if (!extensionDisconnectCleanupTimer) return;
|
|
288
|
-
clearTimeout(extensionDisconnectCleanupTimer);
|
|
289
|
-
extensionDisconnectCleanupTimer = null;
|
|
290
|
-
};
|
|
291
|
-
const closeCdpClientsAfterExtensionDisconnect = () => {
|
|
292
|
-
connectedTargets.clear();
|
|
293
|
-
for (const client of cdpClients) try {
|
|
294
|
-
client.close(1011, "extension disconnected");
|
|
295
|
-
} catch {}
|
|
296
|
-
cdpClients.clear();
|
|
297
|
-
flushExtensionReconnectWaiters(false);
|
|
298
|
-
};
|
|
299
|
-
const scheduleExtensionDisconnectCleanup = () => {
|
|
300
|
-
clearExtensionDisconnectCleanupTimer();
|
|
301
|
-
extensionDisconnectCleanupTimer = setTimeout(() => {
|
|
302
|
-
extensionDisconnectCleanupTimer = null;
|
|
303
|
-
if (extensionConnected()) return;
|
|
304
|
-
closeCdpClientsAfterExtensionDisconnect();
|
|
305
|
-
}, extensionReconnectGraceMs);
|
|
306
|
-
};
|
|
307
|
-
const waitForExtensionReconnect = async (timeoutMs) => {
|
|
308
|
-
if (extensionConnected()) return true;
|
|
309
|
-
return await new Promise((resolve) => {
|
|
310
|
-
let settled = false;
|
|
311
|
-
const waiter = (connected) => {
|
|
312
|
-
if (settled) return;
|
|
313
|
-
settled = true;
|
|
314
|
-
clearTimeout(timer);
|
|
315
|
-
extensionReconnectWaiters.delete(waiter);
|
|
316
|
-
resolve(connected);
|
|
317
|
-
};
|
|
318
|
-
const timer = setTimeout(() => {
|
|
319
|
-
waiter(false);
|
|
320
|
-
}, timeoutMs);
|
|
321
|
-
extensionReconnectWaiters.add(waiter);
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
|
-
const pendingExtension = /* @__PURE__ */ new Map();
|
|
325
|
-
let nextExtensionId = 1;
|
|
326
|
-
const sendToExtension = async (payload) => {
|
|
327
|
-
const ws = extensionWs;
|
|
328
|
-
if (!ws || ws.readyState !== WebSocket.OPEN) throw new Error("Chrome extension not connected");
|
|
329
|
-
ws.send(JSON.stringify(payload));
|
|
330
|
-
return await new Promise((resolve, reject) => {
|
|
331
|
-
const timer = setTimeout(() => {
|
|
332
|
-
pendingExtension.delete(payload.id);
|
|
333
|
-
reject(/* @__PURE__ */ new Error(`extension request timeout: ${payload.params.method}`));
|
|
334
|
-
}, 3e4);
|
|
335
|
-
pendingExtension.set(payload.id, {
|
|
336
|
-
resolve,
|
|
337
|
-
reject,
|
|
338
|
-
timer
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
};
|
|
342
|
-
const broadcastToCdpClients = (evt) => {
|
|
343
|
-
const msg = JSON.stringify(evt);
|
|
344
|
-
for (const ws of cdpClients) {
|
|
345
|
-
if (ws.readyState !== WebSocket.OPEN) continue;
|
|
346
|
-
ws.send(msg);
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
const sendResponseToCdp = (ws, res) => {
|
|
350
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
351
|
-
ws.send(JSON.stringify(res));
|
|
352
|
-
};
|
|
353
|
-
const ensureTargetEventsForClient = (ws, mode) => {
|
|
354
|
-
for (const target of connectedTargets.values()) if (mode === "autoAttach") ws.send(JSON.stringify({
|
|
355
|
-
method: "Target.attachedToTarget",
|
|
356
|
-
params: {
|
|
357
|
-
sessionId: target.sessionId,
|
|
358
|
-
targetInfo: {
|
|
359
|
-
...target.targetInfo,
|
|
360
|
-
attached: true
|
|
361
|
-
},
|
|
362
|
-
waitingForDebugger: false
|
|
363
|
-
}
|
|
364
|
-
}));
|
|
365
|
-
else ws.send(JSON.stringify({
|
|
366
|
-
method: "Target.targetCreated",
|
|
367
|
-
params: { targetInfo: {
|
|
368
|
-
...target.targetInfo,
|
|
369
|
-
attached: true
|
|
370
|
-
} }
|
|
371
|
-
}));
|
|
372
|
-
};
|
|
373
|
-
const routeCdpCommand = async (cmd) => {
|
|
374
|
-
switch (cmd.method) {
|
|
375
|
-
case "Browser.getVersion": return {
|
|
376
|
-
protocolVersion: "1.3",
|
|
377
|
-
product: "Chrome/FasedAgent-Extension-Relay",
|
|
378
|
-
revision: "0",
|
|
379
|
-
userAgent: "FasedAgent-Extension-Relay",
|
|
380
|
-
jsVersion: "V8"
|
|
381
|
-
};
|
|
382
|
-
case "Browser.setDownloadBehavior": return {};
|
|
383
|
-
case "Target.setAutoAttach":
|
|
384
|
-
case "Target.setDiscoverTargets": return {};
|
|
385
|
-
case "Target.getTargets": return { targetInfos: Array.from(connectedTargets.values()).map((t) => ({
|
|
386
|
-
...t.targetInfo,
|
|
387
|
-
attached: true
|
|
388
|
-
})) };
|
|
389
|
-
case "Target.getTargetInfo": {
|
|
390
|
-
const params = cmd.params ?? {};
|
|
391
|
-
const targetId = typeof params.targetId === "string" ? params.targetId : void 0;
|
|
392
|
-
if (targetId) {
|
|
393
|
-
for (const t of connectedTargets.values()) if (t.targetId === targetId) return { targetInfo: t.targetInfo };
|
|
394
|
-
}
|
|
395
|
-
if (cmd.sessionId && connectedTargets.has(cmd.sessionId)) {
|
|
396
|
-
const t = connectedTargets.get(cmd.sessionId);
|
|
397
|
-
if (t) return { targetInfo: t.targetInfo };
|
|
398
|
-
}
|
|
399
|
-
return { targetInfo: Array.from(connectedTargets.values())[0]?.targetInfo };
|
|
400
|
-
}
|
|
401
|
-
case "Target.attachToTarget": {
|
|
402
|
-
const params = cmd.params ?? {};
|
|
403
|
-
const targetId = typeof params.targetId === "string" ? params.targetId : void 0;
|
|
404
|
-
if (!targetId) throw new Error("targetId required");
|
|
405
|
-
for (const t of connectedTargets.values()) if (t.targetId === targetId) return { sessionId: t.sessionId };
|
|
406
|
-
throw new Error("target not found");
|
|
407
|
-
}
|
|
408
|
-
default: return await sendToExtension({
|
|
409
|
-
id: nextExtensionId++,
|
|
410
|
-
method: "forwardCDPCommand",
|
|
411
|
-
params: {
|
|
412
|
-
method: cmd.method,
|
|
413
|
-
sessionId: cmd.sessionId,
|
|
414
|
-
params: cmd.params
|
|
415
|
-
}
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
const server = createServer((req, res) => {
|
|
420
|
-
const url = new URL(req.url ?? "/", info.baseUrl);
|
|
421
|
-
const path = url.pathname;
|
|
422
|
-
const origin = getHeader(req, "origin");
|
|
423
|
-
const isChromeExtensionOrigin = typeof origin === "string" && origin.startsWith("chrome-extension://");
|
|
424
|
-
if (isChromeExtensionOrigin && origin) {
|
|
425
|
-
res.setHeader("Access-Control-Allow-Origin", origin);
|
|
426
|
-
res.setHeader("Vary", "Origin");
|
|
427
|
-
}
|
|
428
|
-
if (req.method === "OPTIONS") {
|
|
429
|
-
if (origin && !isChromeExtensionOrigin) {
|
|
430
|
-
res.writeHead(403);
|
|
431
|
-
res.end("Forbidden");
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
const requestedHeaders = (getHeader(req, "access-control-request-headers") ?? "").split(",").map((header) => header.trim().toLowerCase()).filter((header) => header.length > 0);
|
|
435
|
-
const allowedHeaders = new Set([
|
|
436
|
-
"content-type",
|
|
437
|
-
RELAY_AUTH_HEADER,
|
|
438
|
-
...requestedHeaders
|
|
439
|
-
]);
|
|
440
|
-
res.writeHead(204, {
|
|
441
|
-
"Access-Control-Allow-Origin": origin ?? "*",
|
|
442
|
-
"Access-Control-Allow-Methods": "GET, PUT, POST, OPTIONS",
|
|
443
|
-
"Access-Control-Allow-Headers": Array.from(allowedHeaders).join(", "),
|
|
444
|
-
"Access-Control-Max-Age": "86400",
|
|
445
|
-
Vary: "Origin, Access-Control-Request-Headers"
|
|
446
|
-
});
|
|
447
|
-
res.end();
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
if (path.startsWith("/json")) {
|
|
451
|
-
const token = getRelayAuthTokenFromRequest(req, url);
|
|
452
|
-
if (!token || !relayAuthTokens.has(token)) {
|
|
453
|
-
res.writeHead(401);
|
|
454
|
-
res.end("Unauthorized");
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
if (req.method === "HEAD" && path === "/") {
|
|
459
|
-
res.writeHead(200);
|
|
460
|
-
res.end();
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
if (path === "/") {
|
|
464
|
-
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
|
|
465
|
-
res.end("OK");
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
if (path === "/extension/status") {
|
|
469
|
-
res.writeHead(200, { "Content-Type": "application/json" });
|
|
470
|
-
res.end(JSON.stringify({ connected: extensionConnected() }));
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
const cdpWsUrl = `${`ws://${req.headers.host?.trim() || `${info.host}:${info.port}`}`}/cdp`;
|
|
474
|
-
if ((path === "/json/version" || path === "/json/version/") && (req.method === "GET" || req.method === "PUT")) {
|
|
475
|
-
const payload = {
|
|
476
|
-
Browser: "FasedAgent/extension-relay",
|
|
477
|
-
"Protocol-Version": "1.3"
|
|
478
|
-
};
|
|
479
|
-
if (extensionConnected()) payload.webSocketDebuggerUrl = cdpWsUrl;
|
|
480
|
-
res.writeHead(200, { "Content-Type": "application/json" });
|
|
481
|
-
res.end(JSON.stringify(payload));
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
if (new Set([
|
|
485
|
-
"/json",
|
|
486
|
-
"/json/",
|
|
487
|
-
"/json/list",
|
|
488
|
-
"/json/list/"
|
|
489
|
-
]).has(path) && (req.method === "GET" || req.method === "PUT")) {
|
|
490
|
-
const list = Array.from(connectedTargets.values()).map((t) => ({
|
|
491
|
-
id: t.targetId,
|
|
492
|
-
type: t.targetInfo.type ?? "page",
|
|
493
|
-
title: t.targetInfo.title ?? "",
|
|
494
|
-
description: t.targetInfo.title ?? "",
|
|
495
|
-
url: t.targetInfo.url ?? "",
|
|
496
|
-
webSocketDebuggerUrl: cdpWsUrl,
|
|
497
|
-
devtoolsFrontendUrl: `/devtools/inspector.html?ws=${cdpWsUrl.replace("ws://", "")}`
|
|
498
|
-
}));
|
|
499
|
-
res.writeHead(200, { "Content-Type": "application/json" });
|
|
500
|
-
res.end(JSON.stringify(list));
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
const handleTargetActionRoute = (match, cdpMethod) => {
|
|
504
|
-
if (!match || req.method !== "GET" && req.method !== "PUT") return false;
|
|
505
|
-
let targetId = "";
|
|
506
|
-
try {
|
|
507
|
-
targetId = decodeURIComponent(match[1] ?? "").trim();
|
|
508
|
-
} catch {
|
|
509
|
-
res.writeHead(400);
|
|
510
|
-
res.end("invalid targetId encoding");
|
|
511
|
-
return true;
|
|
512
|
-
}
|
|
513
|
-
if (!targetId) {
|
|
514
|
-
res.writeHead(400);
|
|
515
|
-
res.end("targetId required");
|
|
516
|
-
return true;
|
|
517
|
-
}
|
|
518
|
-
(async () => {
|
|
519
|
-
try {
|
|
520
|
-
await sendToExtension({
|
|
521
|
-
id: nextExtensionId++,
|
|
522
|
-
method: "forwardCDPCommand",
|
|
523
|
-
params: {
|
|
524
|
-
method: cdpMethod,
|
|
525
|
-
params: { targetId }
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
} catch {}
|
|
529
|
-
})();
|
|
530
|
-
res.writeHead(200);
|
|
531
|
-
res.end("OK");
|
|
532
|
-
return true;
|
|
533
|
-
};
|
|
534
|
-
if (handleTargetActionRoute(path.match(/^\/json\/activate\/(.+)$/), "Target.activateTarget")) return;
|
|
535
|
-
if (handleTargetActionRoute(path.match(/^\/json\/close\/(.+)$/), "Target.closeTarget")) return;
|
|
536
|
-
res.writeHead(404);
|
|
537
|
-
res.end("not found");
|
|
538
|
-
});
|
|
539
|
-
const wssExtension = new WebSocketServer({ noServer: true });
|
|
540
|
-
const wssCdp = new WebSocketServer({ noServer: true });
|
|
541
|
-
server.on("upgrade", (req, socket, head) => {
|
|
542
|
-
const url = new URL(req.url ?? "/", info.baseUrl);
|
|
543
|
-
const pathname = url.pathname;
|
|
544
|
-
const remote = req.socket.remoteAddress;
|
|
545
|
-
if (!isLoopbackAddress(remote)) {
|
|
546
|
-
rejectUpgrade(socket, 403, "Forbidden");
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
const origin = headerValue(req.headers.origin);
|
|
550
|
-
if (origin && !origin.startsWith("chrome-extension://")) {
|
|
551
|
-
rejectUpgrade(socket, 403, "Forbidden: invalid origin");
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
if (pathname === "/extension") {
|
|
555
|
-
const token = getRelayAuthTokenFromRequest(req, url);
|
|
556
|
-
if (!token || !relayAuthTokens.has(token)) {
|
|
557
|
-
rejectUpgrade(socket, 401, "Unauthorized");
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
if (extensionWs && extensionWs.readyState !== WebSocket.OPEN) {
|
|
561
|
-
try {
|
|
562
|
-
extensionWs.terminate();
|
|
563
|
-
} catch {}
|
|
564
|
-
extensionWs = null;
|
|
565
|
-
}
|
|
566
|
-
if (extensionConnected()) {
|
|
567
|
-
rejectUpgrade(socket, 409, "Extension already connected");
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
wssExtension.handleUpgrade(req, socket, head, (ws) => {
|
|
571
|
-
wssExtension.emit("connection", ws, req);
|
|
572
|
-
});
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
if (pathname === "/cdp") {
|
|
576
|
-
const token = getRelayAuthTokenFromRequest(req, url);
|
|
577
|
-
if (!token || !relayAuthTokens.has(token)) {
|
|
578
|
-
rejectUpgrade(socket, 401, "Unauthorized");
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
if (!extensionConnected()) {
|
|
582
|
-
rejectUpgrade(socket, 503, "Extension not connected");
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
wssCdp.handleUpgrade(req, socket, head, (ws) => {
|
|
586
|
-
wssCdp.emit("connection", ws, req);
|
|
587
|
-
});
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
rejectUpgrade(socket, 404, "Not Found");
|
|
591
|
-
});
|
|
592
|
-
wssExtension.on("connection", (ws) => {
|
|
593
|
-
extensionWs = ws;
|
|
594
|
-
clearExtensionDisconnectCleanupTimer();
|
|
595
|
-
flushExtensionReconnectWaiters(true);
|
|
596
|
-
const ping = setInterval(() => {
|
|
597
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
598
|
-
ws.send(JSON.stringify({ method: "ping" }));
|
|
599
|
-
}, 5e3);
|
|
600
|
-
ws.on("message", (data) => {
|
|
601
|
-
if (extensionWs !== ws) return;
|
|
602
|
-
let parsed = null;
|
|
603
|
-
try {
|
|
604
|
-
parsed = JSON.parse(rawDataToString(data));
|
|
605
|
-
} catch {
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
608
|
-
if (parsed && typeof parsed === "object" && "id" in parsed && typeof parsed.id === "number") {
|
|
609
|
-
const pending = pendingExtension.get(parsed.id);
|
|
610
|
-
if (!pending) return;
|
|
611
|
-
pendingExtension.delete(parsed.id);
|
|
612
|
-
clearTimeout(pending.timer);
|
|
613
|
-
if ("error" in parsed && typeof parsed.error === "string" && parsed.error.trim()) pending.reject(new Error(parsed.error));
|
|
614
|
-
else pending.resolve(parsed.result);
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
if (parsed && typeof parsed === "object" && "method" in parsed) {
|
|
618
|
-
if (parsed.method === "pong") return;
|
|
619
|
-
if (parsed.method !== "forwardCDPEvent") return;
|
|
620
|
-
const evt = parsed;
|
|
621
|
-
const method = evt.params?.method;
|
|
622
|
-
const params = evt.params?.params;
|
|
623
|
-
const sessionId = evt.params?.sessionId;
|
|
624
|
-
if (!method || typeof method !== "string") return;
|
|
625
|
-
if (method === "Target.attachedToTarget") {
|
|
626
|
-
const attached = params ?? {};
|
|
627
|
-
if ((attached?.targetInfo?.type ?? "page") !== "page") return;
|
|
628
|
-
if (attached?.sessionId && attached?.targetInfo?.targetId) {
|
|
629
|
-
const prev = connectedTargets.get(attached.sessionId);
|
|
630
|
-
const nextTargetId = attached.targetInfo.targetId;
|
|
631
|
-
const prevTargetId = prev?.targetId;
|
|
632
|
-
const changedTarget = Boolean(prev && prevTargetId && prevTargetId !== nextTargetId);
|
|
633
|
-
connectedTargets.set(attached.sessionId, {
|
|
634
|
-
sessionId: attached.sessionId,
|
|
635
|
-
targetId: nextTargetId,
|
|
636
|
-
targetInfo: attached.targetInfo
|
|
637
|
-
});
|
|
638
|
-
if (changedTarget && prevTargetId) broadcastToCdpClients({
|
|
639
|
-
method: "Target.detachedFromTarget",
|
|
640
|
-
params: {
|
|
641
|
-
sessionId: attached.sessionId,
|
|
642
|
-
targetId: prevTargetId
|
|
643
|
-
},
|
|
644
|
-
sessionId: attached.sessionId
|
|
645
|
-
});
|
|
646
|
-
if (!prev || changedTarget) broadcastToCdpClients({
|
|
647
|
-
method,
|
|
648
|
-
params,
|
|
649
|
-
sessionId
|
|
650
|
-
});
|
|
651
|
-
return;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
if (method === "Target.detachedFromTarget") {
|
|
655
|
-
const detached = params ?? {};
|
|
656
|
-
if (detached?.sessionId) connectedTargets.delete(detached.sessionId);
|
|
657
|
-
broadcastToCdpClients({
|
|
658
|
-
method,
|
|
659
|
-
params,
|
|
660
|
-
sessionId
|
|
661
|
-
});
|
|
662
|
-
return;
|
|
663
|
-
}
|
|
664
|
-
if (method === "Target.targetInfoChanged") {
|
|
665
|
-
const targetInfo = (params ?? {})?.targetInfo;
|
|
666
|
-
const targetId = targetInfo?.targetId;
|
|
667
|
-
if (targetId && (targetInfo?.type ?? "page") === "page") for (const [sid, target] of connectedTargets) {
|
|
668
|
-
if (target.targetId !== targetId) continue;
|
|
669
|
-
connectedTargets.set(sid, {
|
|
670
|
-
...target,
|
|
671
|
-
targetInfo: {
|
|
672
|
-
...target.targetInfo,
|
|
673
|
-
...targetInfo
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
broadcastToCdpClients({
|
|
679
|
-
method,
|
|
680
|
-
params,
|
|
681
|
-
sessionId
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
ws.on("close", () => {
|
|
686
|
-
clearInterval(ping);
|
|
687
|
-
if (extensionWs !== ws) return;
|
|
688
|
-
extensionWs = null;
|
|
689
|
-
for (const [, pending] of pendingExtension) {
|
|
690
|
-
clearTimeout(pending.timer);
|
|
691
|
-
pending.reject(/* @__PURE__ */ new Error("extension disconnected"));
|
|
692
|
-
}
|
|
693
|
-
pendingExtension.clear();
|
|
694
|
-
scheduleExtensionDisconnectCleanup();
|
|
695
|
-
});
|
|
696
|
-
});
|
|
697
|
-
wssCdp.on("connection", (ws) => {
|
|
698
|
-
cdpClients.add(ws);
|
|
699
|
-
ws.on("message", async (data) => {
|
|
700
|
-
let cmd = null;
|
|
701
|
-
try {
|
|
702
|
-
cmd = JSON.parse(rawDataToString(data));
|
|
703
|
-
} catch {
|
|
704
|
-
return;
|
|
705
|
-
}
|
|
706
|
-
if (!cmd || typeof cmd !== "object") return;
|
|
707
|
-
if (typeof cmd.id !== "number" || typeof cmd.method !== "string") return;
|
|
708
|
-
if (!extensionConnected()) {
|
|
709
|
-
if (!await waitForExtensionReconnect(extensionCommandReconnectWaitMs) || !extensionConnected()) {
|
|
710
|
-
sendResponseToCdp(ws, {
|
|
711
|
-
id: cmd.id,
|
|
712
|
-
sessionId: cmd.sessionId,
|
|
713
|
-
error: { message: "Extension not connected" }
|
|
714
|
-
});
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
try {
|
|
719
|
-
const result = await routeCdpCommand(cmd);
|
|
720
|
-
if (cmd.method === "Target.setAutoAttach" && !cmd.sessionId) ensureTargetEventsForClient(ws, "autoAttach");
|
|
721
|
-
if (cmd.method === "Target.setDiscoverTargets") {
|
|
722
|
-
if ((cmd.params ?? {}).discover === true) ensureTargetEventsForClient(ws, "discover");
|
|
723
|
-
}
|
|
724
|
-
if (cmd.method === "Target.attachToTarget") {
|
|
725
|
-
const params = cmd.params ?? {};
|
|
726
|
-
const targetId = typeof params.targetId === "string" ? params.targetId : void 0;
|
|
727
|
-
if (targetId) {
|
|
728
|
-
const target = Array.from(connectedTargets.values()).find((t) => t.targetId === targetId);
|
|
729
|
-
if (target) ws.send(JSON.stringify({
|
|
730
|
-
method: "Target.attachedToTarget",
|
|
731
|
-
params: {
|
|
732
|
-
sessionId: target.sessionId,
|
|
733
|
-
targetInfo: {
|
|
734
|
-
...target.targetInfo,
|
|
735
|
-
attached: true
|
|
736
|
-
},
|
|
737
|
-
waitingForDebugger: false
|
|
738
|
-
}
|
|
739
|
-
}));
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
sendResponseToCdp(ws, {
|
|
743
|
-
id: cmd.id,
|
|
744
|
-
sessionId: cmd.sessionId,
|
|
745
|
-
result
|
|
746
|
-
});
|
|
747
|
-
} catch (err) {
|
|
748
|
-
sendResponseToCdp(ws, {
|
|
749
|
-
id: cmd.id,
|
|
750
|
-
sessionId: cmd.sessionId,
|
|
751
|
-
error: { message: err instanceof Error ? err.message : String(err) }
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
ws.on("close", () => {
|
|
756
|
-
cdpClients.delete(ws);
|
|
757
|
-
});
|
|
758
|
-
});
|
|
759
|
-
try {
|
|
760
|
-
await new Promise((resolve, reject) => {
|
|
761
|
-
server.listen(info.port, info.host, () => resolve());
|
|
762
|
-
server.once("error", reject);
|
|
763
|
-
});
|
|
764
|
-
} catch (err) {
|
|
765
|
-
if (isAddrInUseError(err) && await probeAuthenticatedFasedAgentRelay({
|
|
766
|
-
baseUrl: info.baseUrl,
|
|
767
|
-
relayAuthHeader: RELAY_AUTH_HEADER,
|
|
768
|
-
relayAuthToken
|
|
769
|
-
})) {
|
|
770
|
-
const existingRelay = {
|
|
771
|
-
host: info.host,
|
|
772
|
-
port: info.port,
|
|
773
|
-
baseUrl: info.baseUrl,
|
|
774
|
-
cdpWsUrl: `ws://${info.host}:${info.port}/cdp`,
|
|
775
|
-
extensionConnected: () => false,
|
|
776
|
-
stop: async () => {
|
|
777
|
-
relayRuntimeByPort.delete(info.port);
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
relayRuntimeByPort.set(info.port, {
|
|
781
|
-
server: existingRelay,
|
|
782
|
-
relayAuthToken
|
|
783
|
-
});
|
|
784
|
-
return existingRelay;
|
|
785
|
-
}
|
|
786
|
-
throw err;
|
|
787
|
-
}
|
|
788
|
-
const port = server.address()?.port ?? info.port;
|
|
789
|
-
const host = info.host;
|
|
790
|
-
const relay = {
|
|
791
|
-
host,
|
|
792
|
-
port,
|
|
793
|
-
baseUrl: `${new URL(info.baseUrl).protocol}//${host}:${port}`,
|
|
794
|
-
cdpWsUrl: `ws://${host}:${port}/cdp`,
|
|
795
|
-
extensionConnected,
|
|
796
|
-
stop: async () => {
|
|
797
|
-
relayRuntimeByPort.delete(port);
|
|
798
|
-
clearExtensionDisconnectCleanupTimer();
|
|
799
|
-
flushExtensionReconnectWaiters(false);
|
|
800
|
-
for (const [, pending] of pendingExtension) {
|
|
801
|
-
clearTimeout(pending.timer);
|
|
802
|
-
pending.reject(/* @__PURE__ */ new Error("server stopping"));
|
|
803
|
-
}
|
|
804
|
-
pendingExtension.clear();
|
|
805
|
-
try {
|
|
806
|
-
extensionWs?.close(1001, "server stopping");
|
|
807
|
-
} catch {}
|
|
808
|
-
for (const ws of cdpClients) try {
|
|
809
|
-
ws.close(1001, "server stopping");
|
|
810
|
-
} catch {}
|
|
811
|
-
await new Promise((resolve) => {
|
|
812
|
-
server.close(() => resolve());
|
|
813
|
-
});
|
|
814
|
-
wssExtension.close();
|
|
815
|
-
wssCdp.close();
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
relayRuntimeByPort.set(port, {
|
|
819
|
-
server: relay,
|
|
820
|
-
relayAuthToken
|
|
821
|
-
});
|
|
822
|
-
return relay;
|
|
823
|
-
})();
|
|
824
|
-
relayInitByPort.set(info.port, initPromise);
|
|
825
|
-
try {
|
|
826
|
-
return await initPromise;
|
|
827
|
-
} finally {
|
|
828
|
-
relayInitByPort.delete(info.port);
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
async function stopChromeExtensionRelayServer(opts) {
|
|
832
|
-
const info = parseBaseUrl(opts.cdpUrl);
|
|
833
|
-
const existing = relayRuntimeByPort.get(info.port);
|
|
834
|
-
if (!existing) return false;
|
|
835
|
-
await existing.server.stop();
|
|
836
|
-
return true;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
//#endregion
|
|
840
|
-
//#region src/browser/cdp.helpers.ts
|
|
841
|
-
function getHeadersWithAuth(url, headers = {}) {
|
|
842
|
-
const mergedHeaders = {
|
|
843
|
-
...getChromeExtensionRelayAuthHeaders(url),
|
|
844
|
-
...headers
|
|
845
|
-
};
|
|
846
|
-
try {
|
|
847
|
-
const parsed = new URL(url);
|
|
848
|
-
if (Object.keys(mergedHeaders).some((key) => key.toLowerCase() === "authorization")) return mergedHeaders;
|
|
849
|
-
if (parsed.username || parsed.password) {
|
|
850
|
-
const auth = Buffer.from(`${parsed.username}:${parsed.password}`).toString("base64");
|
|
851
|
-
return {
|
|
852
|
-
...mergedHeaders,
|
|
853
|
-
Authorization: `Basic ${auth}`
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
} catch {}
|
|
857
|
-
return mergedHeaders;
|
|
858
|
-
}
|
|
859
|
-
function appendCdpPath(cdpUrl, path) {
|
|
860
|
-
const url = new URL(cdpUrl);
|
|
861
|
-
url.pathname = `${url.pathname.replace(/\/$/, "")}${path.startsWith("/") ? path : `/${path}`}`;
|
|
862
|
-
return url.toString();
|
|
863
|
-
}
|
|
864
|
-
function createCdpSender(ws) {
|
|
865
|
-
let nextId = 1;
|
|
866
|
-
const pending = /* @__PURE__ */ new Map();
|
|
867
|
-
const send = (method, params, sessionId) => {
|
|
868
|
-
const id = nextId++;
|
|
869
|
-
const msg = {
|
|
870
|
-
id,
|
|
871
|
-
method,
|
|
872
|
-
params,
|
|
873
|
-
sessionId
|
|
874
|
-
};
|
|
875
|
-
ws.send(JSON.stringify(msg));
|
|
876
|
-
return new Promise((resolve, reject) => {
|
|
877
|
-
pending.set(id, {
|
|
878
|
-
resolve,
|
|
879
|
-
reject
|
|
880
|
-
});
|
|
881
|
-
});
|
|
882
|
-
};
|
|
883
|
-
const closeWithError = (err) => {
|
|
884
|
-
for (const [, p] of pending) p.reject(err);
|
|
885
|
-
pending.clear();
|
|
886
|
-
try {
|
|
887
|
-
ws.close();
|
|
888
|
-
} catch {}
|
|
889
|
-
};
|
|
890
|
-
ws.on("error", (err) => {
|
|
891
|
-
closeWithError(err instanceof Error ? err : new Error(String(err)));
|
|
892
|
-
});
|
|
893
|
-
ws.on("message", (data) => {
|
|
894
|
-
try {
|
|
895
|
-
const parsed = JSON.parse(rawDataToString(data));
|
|
896
|
-
if (typeof parsed.id !== "number") return;
|
|
897
|
-
const p = pending.get(parsed.id);
|
|
898
|
-
if (!p) return;
|
|
899
|
-
pending.delete(parsed.id);
|
|
900
|
-
if (parsed.error?.message) {
|
|
901
|
-
p.reject(new Error(parsed.error.message));
|
|
902
|
-
return;
|
|
903
|
-
}
|
|
904
|
-
p.resolve(parsed.result);
|
|
905
|
-
} catch {}
|
|
906
|
-
});
|
|
907
|
-
ws.on("close", () => {
|
|
908
|
-
closeWithError(/* @__PURE__ */ new Error("CDP socket closed"));
|
|
909
|
-
});
|
|
910
|
-
return {
|
|
911
|
-
send,
|
|
912
|
-
closeWithError
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
async function fetchJson(url, timeoutMs = 1500, init) {
|
|
916
|
-
return await (await fetchChecked(url, timeoutMs, init)).json();
|
|
917
|
-
}
|
|
918
|
-
async function fetchChecked(url, timeoutMs = 1500, init) {
|
|
919
|
-
const ctrl = new AbortController();
|
|
920
|
-
const t = setTimeout(ctrl.abort.bind(ctrl), timeoutMs);
|
|
921
|
-
try {
|
|
922
|
-
const headers = getHeadersWithAuth(url, init?.headers || {});
|
|
923
|
-
const res = await fetch(url, {
|
|
924
|
-
...init,
|
|
925
|
-
headers,
|
|
926
|
-
signal: ctrl.signal
|
|
927
|
-
});
|
|
928
|
-
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
929
|
-
return res;
|
|
930
|
-
} finally {
|
|
931
|
-
clearTimeout(t);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
async function fetchOk(url, timeoutMs = 1500, init) {
|
|
935
|
-
await fetchChecked(url, timeoutMs, init);
|
|
936
|
-
}
|
|
937
|
-
async function withCdpSocket(wsUrl, fn, opts) {
|
|
938
|
-
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
939
|
-
const ws = new WebSocket(wsUrl, {
|
|
940
|
-
handshakeTimeout: typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : 5e3,
|
|
941
|
-
...Object.keys(headers).length ? { headers } : {}
|
|
942
|
-
});
|
|
943
|
-
const { send, closeWithError } = createCdpSender(ws);
|
|
944
|
-
const openPromise = new Promise((resolve, reject) => {
|
|
945
|
-
ws.once("open", () => resolve());
|
|
946
|
-
ws.once("error", (err) => reject(err));
|
|
947
|
-
ws.once("close", () => reject(/* @__PURE__ */ new Error("CDP socket closed")));
|
|
948
|
-
});
|
|
949
|
-
try {
|
|
950
|
-
await openPromise;
|
|
951
|
-
} catch (err) {
|
|
952
|
-
closeWithError(err instanceof Error ? err : new Error(String(err)));
|
|
953
|
-
throw err;
|
|
954
|
-
}
|
|
955
|
-
try {
|
|
956
|
-
return await fn(send);
|
|
957
|
-
} catch (err) {
|
|
958
|
-
closeWithError(err instanceof Error ? err : new Error(String(err)));
|
|
959
|
-
throw err;
|
|
960
|
-
} finally {
|
|
961
|
-
try {
|
|
962
|
-
ws.close();
|
|
963
|
-
} catch {}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
//#endregion
|
|
968
|
-
//#region src/browser/navigation-guard.ts
|
|
969
|
-
const NETWORK_NAVIGATION_PROTOCOLS = new Set(["http:", "https:"]);
|
|
970
|
-
const SAFE_NON_NETWORK_URLS = new Set(["about:blank"]);
|
|
971
|
-
function isAllowedNonNetworkNavigationUrl(parsed) {
|
|
972
|
-
return SAFE_NON_NETWORK_URLS.has(parsed.href);
|
|
973
|
-
}
|
|
974
|
-
var InvalidBrowserNavigationUrlError = class extends Error {
|
|
975
|
-
constructor(message) {
|
|
976
|
-
super(message);
|
|
977
|
-
this.name = "InvalidBrowserNavigationUrlError";
|
|
978
|
-
}
|
|
979
|
-
};
|
|
980
|
-
function withBrowserNavigationPolicy(ssrfPolicy) {
|
|
981
|
-
return ssrfPolicy ? { ssrfPolicy } : {};
|
|
982
|
-
}
|
|
983
|
-
async function assertBrowserNavigationAllowed(opts) {
|
|
984
|
-
const rawUrl = String(opts.url ?? "").trim();
|
|
985
|
-
if (!rawUrl) throw new InvalidBrowserNavigationUrlError("url is required");
|
|
986
|
-
let parsed;
|
|
987
|
-
try {
|
|
988
|
-
parsed = new URL(rawUrl);
|
|
989
|
-
} catch {
|
|
990
|
-
throw new InvalidBrowserNavigationUrlError(`Invalid URL: ${rawUrl}`);
|
|
991
|
-
}
|
|
992
|
-
if (!NETWORK_NAVIGATION_PROTOCOLS.has(parsed.protocol)) {
|
|
993
|
-
if (isAllowedNonNetworkNavigationUrl(parsed)) return;
|
|
994
|
-
throw new InvalidBrowserNavigationUrlError(`Navigation blocked: unsupported protocol "${parsed.protocol}"`);
|
|
995
|
-
}
|
|
996
|
-
await resolvePinnedHostnameWithPolicy(parsed.hostname, {
|
|
997
|
-
lookupFn: opts.lookupFn,
|
|
998
|
-
policy: opts.ssrfPolicy
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
/**
|
|
1002
|
-
* Best-effort post-navigation guard for final page URLs.
|
|
1003
|
-
* Only validates network URLs (http/https) and about:blank to avoid false
|
|
1004
|
-
* positives on browser-internal error pages (e.g. chrome-error://).
|
|
1005
|
-
*/
|
|
1006
|
-
async function assertBrowserNavigationResultAllowed(opts) {
|
|
1007
|
-
const rawUrl = String(opts.url ?? "").trim();
|
|
1008
|
-
if (!rawUrl) return;
|
|
1009
|
-
let parsed;
|
|
1010
|
-
try {
|
|
1011
|
-
parsed = new URL(rawUrl);
|
|
1012
|
-
} catch {
|
|
1013
|
-
return;
|
|
1014
|
-
}
|
|
1015
|
-
if (NETWORK_NAVIGATION_PROTOCOLS.has(parsed.protocol) || isAllowedNonNetworkNavigationUrl(parsed)) await assertBrowserNavigationAllowed(opts);
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
//#endregion
|
|
1019
|
-
//#region src/browser/cdp.ts
|
|
1020
|
-
function normalizeCdpWsUrl(wsUrl, cdpUrl) {
|
|
1021
|
-
const ws = new URL(wsUrl);
|
|
1022
|
-
const cdp = new URL(cdpUrl);
|
|
1023
|
-
if (isLoopbackHost(ws.hostname) && !isLoopbackHost(cdp.hostname)) {
|
|
1024
|
-
ws.hostname = cdp.hostname;
|
|
1025
|
-
const cdpPort = cdp.port || (cdp.protocol === "https:" ? "443" : "80");
|
|
1026
|
-
if (cdpPort) ws.port = cdpPort;
|
|
1027
|
-
ws.protocol = cdp.protocol === "https:" ? "wss:" : "ws:";
|
|
1028
|
-
}
|
|
1029
|
-
if (cdp.protocol === "https:" && ws.protocol === "ws:") ws.protocol = "wss:";
|
|
1030
|
-
if (!ws.username && !ws.password && (cdp.username || cdp.password)) {
|
|
1031
|
-
ws.username = cdp.username;
|
|
1032
|
-
ws.password = cdp.password;
|
|
1033
|
-
}
|
|
1034
|
-
for (const [key, value] of cdp.searchParams.entries()) if (!ws.searchParams.has(key)) ws.searchParams.append(key, value);
|
|
1035
|
-
return ws.toString();
|
|
1036
|
-
}
|
|
1037
|
-
async function captureScreenshot(opts) {
|
|
1038
|
-
return await withCdpSocket(opts.wsUrl, async (send) => {
|
|
1039
|
-
await send("Page.enable");
|
|
1040
|
-
let clip;
|
|
1041
|
-
if (opts.fullPage) {
|
|
1042
|
-
const metrics = await send("Page.getLayoutMetrics");
|
|
1043
|
-
const size = metrics?.cssContentSize ?? metrics?.contentSize;
|
|
1044
|
-
const width = Number(size?.width ?? 0);
|
|
1045
|
-
const height = Number(size?.height ?? 0);
|
|
1046
|
-
if (width > 0 && height > 0) clip = {
|
|
1047
|
-
x: 0,
|
|
1048
|
-
y: 0,
|
|
1049
|
-
width,
|
|
1050
|
-
height,
|
|
1051
|
-
scale: 1
|
|
1052
|
-
};
|
|
1053
|
-
}
|
|
1054
|
-
const format = opts.format ?? "png";
|
|
1055
|
-
const quality = format === "jpeg" ? Math.max(0, Math.min(100, Math.round(opts.quality ?? 85))) : void 0;
|
|
1056
|
-
const base64 = (await send("Page.captureScreenshot", {
|
|
1057
|
-
format,
|
|
1058
|
-
...quality !== void 0 ? { quality } : {},
|
|
1059
|
-
fromSurface: true,
|
|
1060
|
-
captureBeyondViewport: true,
|
|
1061
|
-
...clip ? { clip } : {}
|
|
1062
|
-
}))?.data;
|
|
1063
|
-
if (!base64) throw new Error("Screenshot failed: missing data");
|
|
1064
|
-
return Buffer.from(base64, "base64");
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
async function createTargetViaCdp(opts) {
|
|
1068
|
-
await assertBrowserNavigationAllowed({
|
|
1069
|
-
url: opts.url,
|
|
1070
|
-
...withBrowserNavigationPolicy(opts.ssrfPolicy)
|
|
1071
|
-
});
|
|
1072
|
-
const version = await fetchJson(appendCdpPath(opts.cdpUrl, "/json/version"), 1500);
|
|
1073
|
-
const wsUrlRaw = String(version?.webSocketDebuggerUrl ?? "").trim();
|
|
1074
|
-
const wsUrl = wsUrlRaw ? normalizeCdpWsUrl(wsUrlRaw, opts.cdpUrl) : "";
|
|
1075
|
-
if (!wsUrl) throw new Error("CDP /json/version missing webSocketDebuggerUrl");
|
|
1076
|
-
return await withCdpSocket(wsUrl, async (send) => {
|
|
1077
|
-
const created = await send("Target.createTarget", { url: opts.url });
|
|
1078
|
-
const targetId = String(created?.targetId ?? "").trim();
|
|
1079
|
-
if (!targetId) throw new Error("CDP Target.createTarget returned no targetId");
|
|
1080
|
-
return { targetId };
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
function axValue(v) {
|
|
1084
|
-
if (!v || typeof v !== "object") return "";
|
|
1085
|
-
const value = v.value;
|
|
1086
|
-
if (typeof value === "string") return value;
|
|
1087
|
-
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
1088
|
-
return "";
|
|
1089
|
-
}
|
|
1090
|
-
function formatAriaSnapshot(nodes, limit) {
|
|
1091
|
-
const byId = /* @__PURE__ */ new Map();
|
|
1092
|
-
for (const n of nodes) if (n.nodeId) byId.set(n.nodeId, n);
|
|
1093
|
-
const referenced = /* @__PURE__ */ new Set();
|
|
1094
|
-
for (const n of nodes) for (const c of n.childIds ?? []) referenced.add(c);
|
|
1095
|
-
const root = nodes.find((n) => n.nodeId && !referenced.has(n.nodeId)) ?? nodes[0];
|
|
1096
|
-
if (!root?.nodeId) return [];
|
|
1097
|
-
const out = [];
|
|
1098
|
-
const stack = [{
|
|
1099
|
-
id: root.nodeId,
|
|
1100
|
-
depth: 0
|
|
1101
|
-
}];
|
|
1102
|
-
while (stack.length && out.length < limit) {
|
|
1103
|
-
const popped = stack.pop();
|
|
1104
|
-
if (!popped) break;
|
|
1105
|
-
const { id, depth } = popped;
|
|
1106
|
-
const n = byId.get(id);
|
|
1107
|
-
if (!n) continue;
|
|
1108
|
-
const role = axValue(n.role);
|
|
1109
|
-
const name = axValue(n.name);
|
|
1110
|
-
const value = axValue(n.value);
|
|
1111
|
-
const description = axValue(n.description);
|
|
1112
|
-
const ref = `ax${out.length + 1}`;
|
|
1113
|
-
out.push({
|
|
1114
|
-
ref,
|
|
1115
|
-
role: role || "unknown",
|
|
1116
|
-
name: name || "",
|
|
1117
|
-
...value ? { value } : {},
|
|
1118
|
-
...description ? { description } : {},
|
|
1119
|
-
...typeof n.backendDOMNodeId === "number" ? { backendDOMNodeId: n.backendDOMNodeId } : {},
|
|
1120
|
-
depth
|
|
1121
|
-
});
|
|
1122
|
-
const children = (n.childIds ?? []).filter((c) => byId.has(c));
|
|
1123
|
-
for (let i = children.length - 1; i >= 0; i--) {
|
|
1124
|
-
const child = children[i];
|
|
1125
|
-
if (child) stack.push({
|
|
1126
|
-
id: child,
|
|
1127
|
-
depth: depth + 1
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
return out;
|
|
1132
|
-
}
|
|
1133
|
-
async function snapshotAria(opts) {
|
|
1134
|
-
const limit = Math.max(1, Math.min(2e3, Math.floor(opts.limit ?? 500)));
|
|
1135
|
-
return await withCdpSocket(opts.wsUrl, async (send) => {
|
|
1136
|
-
await send("Accessibility.enable").catch(() => {});
|
|
1137
|
-
const res = await send("Accessibility.getFullAXTree");
|
|
1138
|
-
return { nodes: formatAriaSnapshot(Array.isArray(res?.nodes) ? res.nodes : [], limit) };
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
//#endregion
|
|
1143
|
-
//#region src/infra/ports-lsof.ts
|
|
1144
|
-
const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
|
|
1145
|
-
function resolveLsofCommandSync() {
|
|
1146
|
-
for (const candidate of LSOF_CANDIDATES) try {
|
|
1147
|
-
fs.accessSync(candidate, fs.constants.X_OK);
|
|
1148
|
-
return candidate;
|
|
1149
|
-
} catch {}
|
|
1150
|
-
return "lsof";
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
//#endregion
|
|
1154
|
-
//#region src/infra/ports-probe.ts
|
|
1155
|
-
async function tryListenOnPort(params) {
|
|
1156
|
-
const listenOptions = { port: params.port };
|
|
1157
|
-
if (params.host) listenOptions.host = params.host;
|
|
1158
|
-
if (typeof params.exclusive === "boolean") listenOptions.exclusive = params.exclusive;
|
|
1159
|
-
await new Promise((resolve, reject) => {
|
|
1160
|
-
const tester = net.createServer().once("error", (err) => reject(err)).once("listening", () => {
|
|
1161
|
-
tester.close(() => resolve());
|
|
1162
|
-
}).listen(listenOptions);
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
//#endregion
|
|
1167
|
-
//#region src/infra/ports.ts
|
|
1168
|
-
var PortInUseError = class extends Error {
|
|
1169
|
-
constructor(port, details) {
|
|
1170
|
-
super(`Port ${port} is already in use.`);
|
|
1171
|
-
this.name = "PortInUseError";
|
|
1172
|
-
this.port = port;
|
|
1173
|
-
this.details = details;
|
|
1174
|
-
}
|
|
1175
|
-
};
|
|
1176
|
-
async function ensurePortAvailable(port) {
|
|
1177
|
-
try {
|
|
1178
|
-
await tryListenOnPort({ port });
|
|
1179
|
-
} catch (err) {
|
|
1180
|
-
if (isErrno(err) && err.code === "EADDRINUSE") throw new PortInUseError(port);
|
|
1181
|
-
throw err;
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
//#endregion
|
|
1186
|
-
//#region src/browser/chrome.executables.ts
|
|
1187
|
-
const CHROMIUM_BUNDLE_IDS = new Set([
|
|
1188
|
-
"com.google.Chrome",
|
|
1189
|
-
"com.google.Chrome.beta",
|
|
1190
|
-
"com.google.Chrome.canary",
|
|
1191
|
-
"com.google.Chrome.dev",
|
|
1192
|
-
"com.brave.Browser",
|
|
1193
|
-
"com.brave.Browser.beta",
|
|
1194
|
-
"com.brave.Browser.nightly",
|
|
1195
|
-
"com.microsoft.Edge",
|
|
1196
|
-
"com.microsoft.EdgeBeta",
|
|
1197
|
-
"com.microsoft.EdgeDev",
|
|
1198
|
-
"com.microsoft.EdgeCanary",
|
|
1199
|
-
"org.chromium.Chromium",
|
|
1200
|
-
"com.vivaldi.Vivaldi",
|
|
1201
|
-
"com.operasoftware.Opera",
|
|
1202
|
-
"com.operasoftware.OperaGX",
|
|
1203
|
-
"com.yandex.desktop.yandex-browser",
|
|
1204
|
-
"company.thebrowser.Browser"
|
|
1205
|
-
]);
|
|
1206
|
-
const CHROMIUM_DESKTOP_IDS = new Set([
|
|
1207
|
-
"google-chrome.desktop",
|
|
1208
|
-
"google-chrome-beta.desktop",
|
|
1209
|
-
"google-chrome-unstable.desktop",
|
|
1210
|
-
"brave-browser.desktop",
|
|
1211
|
-
"microsoft-edge.desktop",
|
|
1212
|
-
"microsoft-edge-beta.desktop",
|
|
1213
|
-
"microsoft-edge-dev.desktop",
|
|
1214
|
-
"microsoft-edge-canary.desktop",
|
|
1215
|
-
"chromium.desktop",
|
|
1216
|
-
"chromium-browser.desktop",
|
|
1217
|
-
"vivaldi.desktop",
|
|
1218
|
-
"vivaldi-stable.desktop",
|
|
1219
|
-
"opera.desktop",
|
|
1220
|
-
"opera-gx.desktop",
|
|
1221
|
-
"yandex-browser.desktop",
|
|
1222
|
-
"org.chromium.Chromium.desktop"
|
|
1223
|
-
]);
|
|
1224
|
-
const CHROMIUM_EXE_NAMES = new Set([
|
|
1225
|
-
"chrome.exe",
|
|
1226
|
-
"msedge.exe",
|
|
1227
|
-
"brave.exe",
|
|
1228
|
-
"brave-browser.exe",
|
|
1229
|
-
"chromium.exe",
|
|
1230
|
-
"vivaldi.exe",
|
|
1231
|
-
"opera.exe",
|
|
1232
|
-
"launcher.exe",
|
|
1233
|
-
"yandex.exe",
|
|
1234
|
-
"yandexbrowser.exe",
|
|
1235
|
-
"google chrome",
|
|
1236
|
-
"google chrome canary",
|
|
1237
|
-
"brave browser",
|
|
1238
|
-
"microsoft edge",
|
|
1239
|
-
"chromium",
|
|
1240
|
-
"chrome",
|
|
1241
|
-
"brave",
|
|
1242
|
-
"msedge",
|
|
1243
|
-
"brave-browser",
|
|
1244
|
-
"google-chrome",
|
|
1245
|
-
"google-chrome-stable",
|
|
1246
|
-
"google-chrome-beta",
|
|
1247
|
-
"google-chrome-unstable",
|
|
1248
|
-
"microsoft-edge",
|
|
1249
|
-
"microsoft-edge-beta",
|
|
1250
|
-
"microsoft-edge-dev",
|
|
1251
|
-
"microsoft-edge-canary",
|
|
1252
|
-
"chromium-browser",
|
|
1253
|
-
"vivaldi",
|
|
1254
|
-
"vivaldi-stable",
|
|
1255
|
-
"opera",
|
|
1256
|
-
"opera-stable",
|
|
1257
|
-
"opera-gx",
|
|
1258
|
-
"yandex-browser"
|
|
1259
|
-
]);
|
|
1260
|
-
function exists$1(filePath) {
|
|
1261
|
-
try {
|
|
1262
|
-
return fs.existsSync(filePath);
|
|
1263
|
-
} catch {
|
|
1264
|
-
return false;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
function execText(command, args, timeoutMs = 1200, maxBuffer = 1024 * 1024) {
|
|
1268
|
-
try {
|
|
1269
|
-
const output = execFileSync(command, args, {
|
|
1270
|
-
timeout: timeoutMs,
|
|
1271
|
-
encoding: "utf8",
|
|
1272
|
-
maxBuffer
|
|
1273
|
-
});
|
|
1274
|
-
return String(output ?? "").trim() || null;
|
|
1275
|
-
} catch {
|
|
1276
|
-
return null;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
function inferKindFromIdentifier(identifier) {
|
|
1280
|
-
const id = identifier.toLowerCase();
|
|
1281
|
-
if (id.includes("brave")) return "brave";
|
|
1282
|
-
if (id.includes("edge")) return "edge";
|
|
1283
|
-
if (id.includes("chromium")) return "chromium";
|
|
1284
|
-
if (id.includes("canary")) return "canary";
|
|
1285
|
-
if (id.includes("opera") || id.includes("vivaldi") || id.includes("yandex") || id.includes("thebrowser")) return "chromium";
|
|
1286
|
-
return "chrome";
|
|
1287
|
-
}
|
|
1288
|
-
function inferKindFromExecutableName(name) {
|
|
1289
|
-
const lower = name.toLowerCase();
|
|
1290
|
-
if (lower.includes("brave")) return "brave";
|
|
1291
|
-
if (lower.includes("edge") || lower.includes("msedge")) return "edge";
|
|
1292
|
-
if (lower.includes("chromium")) return "chromium";
|
|
1293
|
-
if (lower.includes("canary") || lower.includes("sxs")) return "canary";
|
|
1294
|
-
if (lower.includes("opera") || lower.includes("vivaldi") || lower.includes("yandex")) return "chromium";
|
|
1295
|
-
return "chrome";
|
|
1296
|
-
}
|
|
1297
|
-
function detectDefaultChromiumExecutable(platform) {
|
|
1298
|
-
if (platform === "darwin") return detectDefaultChromiumExecutableMac();
|
|
1299
|
-
if (platform === "linux") return detectDefaultChromiumExecutableLinux();
|
|
1300
|
-
if (platform === "win32") return detectDefaultChromiumExecutableWindows();
|
|
1301
|
-
return null;
|
|
1302
|
-
}
|
|
1303
|
-
function detectDefaultChromiumExecutableMac() {
|
|
1304
|
-
const bundleId = detectDefaultBrowserBundleIdMac();
|
|
1305
|
-
if (!bundleId || !CHROMIUM_BUNDLE_IDS.has(bundleId)) return null;
|
|
1306
|
-
const appPathRaw = execText("/usr/bin/osascript", ["-e", `POSIX path of (path to application id "${bundleId}")`]);
|
|
1307
|
-
if (!appPathRaw) return null;
|
|
1308
|
-
const appPath = appPathRaw.trim().replace(/\/$/, "");
|
|
1309
|
-
const exeName = execText("/usr/bin/defaults", [
|
|
1310
|
-
"read",
|
|
1311
|
-
path.join(appPath, "Contents", "Info"),
|
|
1312
|
-
"CFBundleExecutable"
|
|
1313
|
-
]);
|
|
1314
|
-
if (!exeName) return null;
|
|
1315
|
-
const exePath = path.join(appPath, "Contents", "MacOS", exeName.trim());
|
|
1316
|
-
if (!exists$1(exePath)) return null;
|
|
1317
|
-
return {
|
|
1318
|
-
kind: inferKindFromIdentifier(bundleId),
|
|
1319
|
-
path: exePath
|
|
1320
|
-
};
|
|
1321
|
-
}
|
|
1322
|
-
function detectDefaultBrowserBundleIdMac() {
|
|
1323
|
-
const plistPath = path.join(os.homedir(), "Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist");
|
|
1324
|
-
if (!exists$1(plistPath)) return null;
|
|
1325
|
-
const handlersRaw = execText("/usr/bin/plutil", [
|
|
1326
|
-
"-extract",
|
|
1327
|
-
"LSHandlers",
|
|
1328
|
-
"json",
|
|
1329
|
-
"-o",
|
|
1330
|
-
"-",
|
|
1331
|
-
"--",
|
|
1332
|
-
plistPath
|
|
1333
|
-
], 2e3, 5 * 1024 * 1024);
|
|
1334
|
-
if (!handlersRaw) return null;
|
|
1335
|
-
let handlers;
|
|
1336
|
-
try {
|
|
1337
|
-
handlers = JSON.parse(handlersRaw);
|
|
1338
|
-
} catch {
|
|
1339
|
-
return null;
|
|
1340
|
-
}
|
|
1341
|
-
if (!Array.isArray(handlers)) return null;
|
|
1342
|
-
const resolveScheme = (scheme) => {
|
|
1343
|
-
let candidate = null;
|
|
1344
|
-
for (const entry of handlers) {
|
|
1345
|
-
if (!entry || typeof entry !== "object") continue;
|
|
1346
|
-
const record = entry;
|
|
1347
|
-
if (record.LSHandlerURLScheme !== scheme) continue;
|
|
1348
|
-
const role = typeof record.LSHandlerRoleAll === "string" && record.LSHandlerRoleAll || typeof record.LSHandlerRoleViewer === "string" && record.LSHandlerRoleViewer || null;
|
|
1349
|
-
if (role) candidate = role;
|
|
1350
|
-
}
|
|
1351
|
-
return candidate;
|
|
1352
|
-
};
|
|
1353
|
-
return resolveScheme("http") ?? resolveScheme("https");
|
|
1354
|
-
}
|
|
1355
|
-
function detectDefaultChromiumExecutableLinux() {
|
|
1356
|
-
const desktopId = execText("xdg-settings", ["get", "default-web-browser"]) || execText("xdg-mime", [
|
|
1357
|
-
"query",
|
|
1358
|
-
"default",
|
|
1359
|
-
"x-scheme-handler/http"
|
|
1360
|
-
]);
|
|
1361
|
-
if (!desktopId) return null;
|
|
1362
|
-
const trimmed = desktopId.trim();
|
|
1363
|
-
if (!CHROMIUM_DESKTOP_IDS.has(trimmed)) return null;
|
|
1364
|
-
const desktopPath = findDesktopFilePath(trimmed);
|
|
1365
|
-
if (!desktopPath) return null;
|
|
1366
|
-
const execLine = readDesktopExecLine(desktopPath);
|
|
1367
|
-
if (!execLine) return null;
|
|
1368
|
-
const command = extractExecutableFromExecLine(execLine);
|
|
1369
|
-
if (!command) return null;
|
|
1370
|
-
const resolved = resolveLinuxExecutablePath(command);
|
|
1371
|
-
if (!resolved) return null;
|
|
1372
|
-
const exeName = path.posix.basename(resolved).toLowerCase();
|
|
1373
|
-
if (!CHROMIUM_EXE_NAMES.has(exeName)) return null;
|
|
1374
|
-
return {
|
|
1375
|
-
kind: inferKindFromExecutableName(exeName),
|
|
1376
|
-
path: resolved
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
function detectDefaultChromiumExecutableWindows() {
|
|
1380
|
-
const progId = readWindowsProgId();
|
|
1381
|
-
const command = (progId ? readWindowsCommandForProgId(progId) : null) || readWindowsCommandForProgId("http");
|
|
1382
|
-
if (!command) return null;
|
|
1383
|
-
const exePath = extractWindowsExecutablePath(expandWindowsEnvVars(command));
|
|
1384
|
-
if (!exePath) return null;
|
|
1385
|
-
if (!exists$1(exePath)) return null;
|
|
1386
|
-
const exeName = path.win32.basename(exePath).toLowerCase();
|
|
1387
|
-
if (!CHROMIUM_EXE_NAMES.has(exeName)) return null;
|
|
1388
|
-
return {
|
|
1389
|
-
kind: inferKindFromExecutableName(exeName),
|
|
1390
|
-
path: exePath
|
|
1391
|
-
};
|
|
1392
|
-
}
|
|
1393
|
-
function findDesktopFilePath(desktopId) {
|
|
1394
|
-
const candidates = [
|
|
1395
|
-
path.join(os.homedir(), ".local", "share", "applications", desktopId),
|
|
1396
|
-
path.join("/usr/local/share/applications", desktopId),
|
|
1397
|
-
path.join("/usr/share/applications", desktopId),
|
|
1398
|
-
path.join("/var/lib/snapd/desktop/applications", desktopId)
|
|
1399
|
-
];
|
|
1400
|
-
for (const candidate of candidates) if (exists$1(candidate)) return candidate;
|
|
1401
|
-
return null;
|
|
1402
|
-
}
|
|
1403
|
-
function readDesktopExecLine(desktopPath) {
|
|
1404
|
-
try {
|
|
1405
|
-
const lines = fs.readFileSync(desktopPath, "utf8").split(/\r?\n/);
|
|
1406
|
-
for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
|
|
1407
|
-
} catch {}
|
|
1408
|
-
return null;
|
|
1409
|
-
}
|
|
1410
|
-
function extractExecutableFromExecLine(execLine) {
|
|
1411
|
-
const tokens = splitExecLine(execLine);
|
|
1412
|
-
for (const token of tokens) {
|
|
1413
|
-
if (!token) continue;
|
|
1414
|
-
if (token === "env") continue;
|
|
1415
|
-
if (token.includes("=") && !token.startsWith("/") && !token.includes("\\")) continue;
|
|
1416
|
-
return token.replace(/^["']|["']$/g, "");
|
|
1417
|
-
}
|
|
1418
|
-
return null;
|
|
1419
|
-
}
|
|
1420
|
-
function splitExecLine(line) {
|
|
1421
|
-
const tokens = [];
|
|
1422
|
-
let current = "";
|
|
1423
|
-
let inQuotes = false;
|
|
1424
|
-
let quoteChar = "";
|
|
1425
|
-
for (let i = 0; i < line.length; i += 1) {
|
|
1426
|
-
const ch = line[i];
|
|
1427
|
-
if ((ch === "\"" || ch === "'") && (!inQuotes || ch === quoteChar)) {
|
|
1428
|
-
if (inQuotes) {
|
|
1429
|
-
inQuotes = false;
|
|
1430
|
-
quoteChar = "";
|
|
1431
|
-
} else {
|
|
1432
|
-
inQuotes = true;
|
|
1433
|
-
quoteChar = ch;
|
|
1434
|
-
}
|
|
1435
|
-
continue;
|
|
1436
|
-
}
|
|
1437
|
-
if (!inQuotes && /\s/.test(ch)) {
|
|
1438
|
-
if (current) {
|
|
1439
|
-
tokens.push(current);
|
|
1440
|
-
current = "";
|
|
1441
|
-
}
|
|
1442
|
-
continue;
|
|
1443
|
-
}
|
|
1444
|
-
current += ch;
|
|
1445
|
-
}
|
|
1446
|
-
if (current) tokens.push(current);
|
|
1447
|
-
return tokens;
|
|
1448
|
-
}
|
|
1449
|
-
function resolveLinuxExecutablePath(command) {
|
|
1450
|
-
const cleaned = command.trim().replace(/%[a-zA-Z]/g, "");
|
|
1451
|
-
if (!cleaned) return null;
|
|
1452
|
-
if (cleaned.startsWith("/")) return cleaned;
|
|
1453
|
-
const resolved = execText("which", [cleaned], 800);
|
|
1454
|
-
return resolved ? resolved.trim() : null;
|
|
1455
|
-
}
|
|
1456
|
-
function readWindowsProgId() {
|
|
1457
|
-
const output = execText("reg", [
|
|
1458
|
-
"query",
|
|
1459
|
-
"HKCU\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
1460
|
-
"/v",
|
|
1461
|
-
"ProgId"
|
|
1462
|
-
]);
|
|
1463
|
-
if (!output) return null;
|
|
1464
|
-
return output.match(/ProgId\s+REG_\w+\s+(.+)$/im)?.[1]?.trim() || null;
|
|
1465
|
-
}
|
|
1466
|
-
function readWindowsCommandForProgId(progId) {
|
|
1467
|
-
const output = execText("reg", [
|
|
1468
|
-
"query",
|
|
1469
|
-
progId === "http" ? "HKCR\\http\\shell\\open\\command" : `HKCR\\${progId}\\shell\\open\\command`,
|
|
1470
|
-
"/ve"
|
|
1471
|
-
]);
|
|
1472
|
-
if (!output) return null;
|
|
1473
|
-
return output.match(/REG_\w+\s+(.+)$/im)?.[1]?.trim() || null;
|
|
1474
|
-
}
|
|
1475
|
-
function expandWindowsEnvVars(value) {
|
|
1476
|
-
return value.replace(/%([^%]+)%/g, (_match, name) => {
|
|
1477
|
-
const key = String(name ?? "").trim();
|
|
1478
|
-
return key ? process.env[key] ?? `%${key}%` : _match;
|
|
1479
|
-
});
|
|
1480
|
-
}
|
|
1481
|
-
function extractWindowsExecutablePath(command) {
|
|
1482
|
-
const quoted = command.match(/"([^"]+\\.exe)"/i);
|
|
1483
|
-
if (quoted?.[1]) return quoted[1];
|
|
1484
|
-
const unquoted = command.match(/([^\\s]+\\.exe)/i);
|
|
1485
|
-
if (unquoted?.[1]) return unquoted[1];
|
|
1486
|
-
return null;
|
|
1487
|
-
}
|
|
1488
|
-
function findFirstExecutable(candidates) {
|
|
1489
|
-
for (const candidate of candidates) if (exists$1(candidate.path)) return candidate;
|
|
1490
|
-
return null;
|
|
1491
|
-
}
|
|
1492
|
-
function findChromeExecutableMac() {
|
|
1493
|
-
return findFirstExecutable([
|
|
1494
|
-
{
|
|
1495
|
-
kind: "chrome",
|
|
1496
|
-
path: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
1497
|
-
},
|
|
1498
|
-
{
|
|
1499
|
-
kind: "chrome",
|
|
1500
|
-
path: path.join(os.homedir(), "Applications/Google Chrome.app/Contents/MacOS/Google Chrome")
|
|
1501
|
-
},
|
|
1502
|
-
{
|
|
1503
|
-
kind: "brave",
|
|
1504
|
-
path: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
kind: "brave",
|
|
1508
|
-
path: path.join(os.homedir(), "Applications/Brave Browser.app/Contents/MacOS/Brave Browser")
|
|
1509
|
-
},
|
|
1510
|
-
{
|
|
1511
|
-
kind: "edge",
|
|
1512
|
-
path: "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"
|
|
1513
|
-
},
|
|
1514
|
-
{
|
|
1515
|
-
kind: "edge",
|
|
1516
|
-
path: path.join(os.homedir(), "Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge")
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
kind: "chromium",
|
|
1520
|
-
path: "/Applications/Chromium.app/Contents/MacOS/Chromium"
|
|
1521
|
-
},
|
|
1522
|
-
{
|
|
1523
|
-
kind: "chromium",
|
|
1524
|
-
path: path.join(os.homedir(), "Applications/Chromium.app/Contents/MacOS/Chromium")
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
kind: "canary",
|
|
1528
|
-
path: "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
|
|
1529
|
-
},
|
|
1530
|
-
{
|
|
1531
|
-
kind: "canary",
|
|
1532
|
-
path: path.join(os.homedir(), "Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary")
|
|
1533
|
-
}
|
|
1534
|
-
]);
|
|
1535
|
-
}
|
|
1536
|
-
function findChromeExecutableLinux() {
|
|
1537
|
-
return findFirstExecutable([
|
|
1538
|
-
{
|
|
1539
|
-
kind: "chrome",
|
|
1540
|
-
path: "/usr/bin/google-chrome"
|
|
1541
|
-
},
|
|
1542
|
-
{
|
|
1543
|
-
kind: "chrome",
|
|
1544
|
-
path: "/usr/bin/google-chrome-stable"
|
|
1545
|
-
},
|
|
1546
|
-
{
|
|
1547
|
-
kind: "chrome",
|
|
1548
|
-
path: "/usr/bin/chrome"
|
|
1549
|
-
},
|
|
1550
|
-
{
|
|
1551
|
-
kind: "brave",
|
|
1552
|
-
path: "/usr/bin/brave-browser"
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
kind: "brave",
|
|
1556
|
-
path: "/usr/bin/brave-browser-stable"
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
kind: "brave",
|
|
1560
|
-
path: "/usr/bin/brave"
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
kind: "brave",
|
|
1564
|
-
path: "/snap/bin/brave"
|
|
1565
|
-
},
|
|
1566
|
-
{
|
|
1567
|
-
kind: "edge",
|
|
1568
|
-
path: "/usr/bin/microsoft-edge"
|
|
1569
|
-
},
|
|
1570
|
-
{
|
|
1571
|
-
kind: "edge",
|
|
1572
|
-
path: "/usr/bin/microsoft-edge-stable"
|
|
1573
|
-
},
|
|
1574
|
-
{
|
|
1575
|
-
kind: "chromium",
|
|
1576
|
-
path: "/usr/bin/chromium"
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
kind: "chromium",
|
|
1580
|
-
path: "/usr/bin/chromium-browser"
|
|
1581
|
-
},
|
|
1582
|
-
{
|
|
1583
|
-
kind: "chromium",
|
|
1584
|
-
path: "/snap/bin/chromium"
|
|
1585
|
-
}
|
|
1586
|
-
]);
|
|
1587
|
-
}
|
|
1588
|
-
function findChromeExecutableWindows() {
|
|
1589
|
-
const localAppData = process.env.LOCALAPPDATA ?? "";
|
|
1590
|
-
const programFiles = process.env.ProgramFiles ?? "C:\\Program Files";
|
|
1591
|
-
const programFilesX86 = process.env["ProgramFiles(x86)"] ?? "C:\\Program Files (x86)";
|
|
1592
|
-
const joinWin = path.win32.join;
|
|
1593
|
-
const candidates = [];
|
|
1594
|
-
if (localAppData) {
|
|
1595
|
-
candidates.push({
|
|
1596
|
-
kind: "chrome",
|
|
1597
|
-
path: joinWin(localAppData, "Google", "Chrome", "Application", "chrome.exe")
|
|
1598
|
-
});
|
|
1599
|
-
candidates.push({
|
|
1600
|
-
kind: "brave",
|
|
1601
|
-
path: joinWin(localAppData, "BraveSoftware", "Brave-Browser", "Application", "brave.exe")
|
|
1602
|
-
});
|
|
1603
|
-
candidates.push({
|
|
1604
|
-
kind: "edge",
|
|
1605
|
-
path: joinWin(localAppData, "Microsoft", "Edge", "Application", "msedge.exe")
|
|
1606
|
-
});
|
|
1607
|
-
candidates.push({
|
|
1608
|
-
kind: "chromium",
|
|
1609
|
-
path: joinWin(localAppData, "Chromium", "Application", "chrome.exe")
|
|
1610
|
-
});
|
|
1611
|
-
candidates.push({
|
|
1612
|
-
kind: "canary",
|
|
1613
|
-
path: joinWin(localAppData, "Google", "Chrome SxS", "Application", "chrome.exe")
|
|
1614
|
-
});
|
|
1615
|
-
}
|
|
1616
|
-
candidates.push({
|
|
1617
|
-
kind: "chrome",
|
|
1618
|
-
path: joinWin(programFiles, "Google", "Chrome", "Application", "chrome.exe")
|
|
1619
|
-
});
|
|
1620
|
-
candidates.push({
|
|
1621
|
-
kind: "chrome",
|
|
1622
|
-
path: joinWin(programFilesX86, "Google", "Chrome", "Application", "chrome.exe")
|
|
1623
|
-
});
|
|
1624
|
-
candidates.push({
|
|
1625
|
-
kind: "brave",
|
|
1626
|
-
path: joinWin(programFiles, "BraveSoftware", "Brave-Browser", "Application", "brave.exe")
|
|
1627
|
-
});
|
|
1628
|
-
candidates.push({
|
|
1629
|
-
kind: "brave",
|
|
1630
|
-
path: joinWin(programFilesX86, "BraveSoftware", "Brave-Browser", "Application", "brave.exe")
|
|
1631
|
-
});
|
|
1632
|
-
candidates.push({
|
|
1633
|
-
kind: "edge",
|
|
1634
|
-
path: joinWin(programFiles, "Microsoft", "Edge", "Application", "msedge.exe")
|
|
1635
|
-
});
|
|
1636
|
-
candidates.push({
|
|
1637
|
-
kind: "edge",
|
|
1638
|
-
path: joinWin(programFilesX86, "Microsoft", "Edge", "Application", "msedge.exe")
|
|
1639
|
-
});
|
|
1640
|
-
return findFirstExecutable(candidates);
|
|
1641
|
-
}
|
|
1642
|
-
function resolveBrowserExecutableForPlatform(resolved, platform) {
|
|
1643
|
-
if (resolved.executablePath) {
|
|
1644
|
-
if (!exists$1(resolved.executablePath)) throw new Error(`browser.executablePath not found: ${resolved.executablePath}`);
|
|
1645
|
-
return {
|
|
1646
|
-
kind: "custom",
|
|
1647
|
-
path: resolved.executablePath
|
|
1648
|
-
};
|
|
1649
|
-
}
|
|
1650
|
-
const detected = detectDefaultChromiumExecutable(platform);
|
|
1651
|
-
if (detected) return detected;
|
|
1652
|
-
if (platform === "darwin") return findChromeExecutableMac();
|
|
1653
|
-
if (platform === "linux") return findChromeExecutableLinux();
|
|
1654
|
-
if (platform === "win32") return findChromeExecutableWindows();
|
|
1655
|
-
return null;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
//#endregion
|
|
1659
|
-
//#region src/browser/chrome.profile-decoration.ts
|
|
1660
|
-
function decoratedMarkerPath(userDataDir) {
|
|
1661
|
-
return path.join(userDataDir, ".fased-profile-decorated");
|
|
1662
|
-
}
|
|
1663
|
-
function safeReadJson(filePath) {
|
|
1664
|
-
try {
|
|
1665
|
-
if (!fs.existsSync(filePath)) return null;
|
|
1666
|
-
const raw = fs.readFileSync(filePath, "utf-8");
|
|
1667
|
-
const parsed = JSON.parse(raw);
|
|
1668
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
1669
|
-
return parsed;
|
|
1670
|
-
} catch {
|
|
1671
|
-
return null;
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
function safeWriteJson(filePath, data) {
|
|
1675
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
1676
|
-
fs.writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
1677
|
-
}
|
|
1678
|
-
function setDeep(obj, keys, value) {
|
|
1679
|
-
let node = obj;
|
|
1680
|
-
for (const key of keys.slice(0, -1)) {
|
|
1681
|
-
const next = node[key];
|
|
1682
|
-
if (typeof next !== "object" || next === null || Array.isArray(next)) node[key] = {};
|
|
1683
|
-
node = node[key];
|
|
1684
|
-
}
|
|
1685
|
-
node[keys[keys.length - 1] ?? ""] = value;
|
|
1686
|
-
}
|
|
1687
|
-
function parseHexRgbToSignedArgbInt(hex) {
|
|
1688
|
-
const cleaned = hex.trim().replace(/^#/, "");
|
|
1689
|
-
if (!/^[0-9a-fA-F]{6}$/.test(cleaned)) return null;
|
|
1690
|
-
const argbUnsigned = 255 << 24 | Number.parseInt(cleaned, 16);
|
|
1691
|
-
return argbUnsigned > 2147483647 ? argbUnsigned - 4294967296 : argbUnsigned;
|
|
1692
|
-
}
|
|
1693
|
-
function isProfileDecorated(userDataDir, desiredName, desiredColorHex) {
|
|
1694
|
-
const desiredColorInt = parseHexRgbToSignedArgbInt(desiredColorHex);
|
|
1695
|
-
const localStatePath = path.join(userDataDir, "Local State");
|
|
1696
|
-
const preferencesPath = path.join(userDataDir, "Default", "Preferences");
|
|
1697
|
-
const profile = safeReadJson(localStatePath)?.profile;
|
|
1698
|
-
const infoCache = typeof profile === "object" && profile !== null && !Array.isArray(profile) ? profile.info_cache : null;
|
|
1699
|
-
const info = typeof infoCache === "object" && infoCache !== null && !Array.isArray(infoCache) && typeof infoCache.Default === "object" && infoCache.Default !== null && !Array.isArray(infoCache.Default) ? infoCache.Default : null;
|
|
1700
|
-
const prefs = safeReadJson(preferencesPath);
|
|
1701
|
-
const browserTheme = (() => {
|
|
1702
|
-
const browser = prefs?.browser;
|
|
1703
|
-
const theme = typeof browser === "object" && browser !== null && !Array.isArray(browser) ? browser.theme : null;
|
|
1704
|
-
return typeof theme === "object" && theme !== null && !Array.isArray(theme) ? theme : null;
|
|
1705
|
-
})();
|
|
1706
|
-
const autogeneratedTheme = (() => {
|
|
1707
|
-
const autogenerated = prefs?.autogenerated;
|
|
1708
|
-
const theme = typeof autogenerated === "object" && autogenerated !== null && !Array.isArray(autogenerated) ? autogenerated.theme : null;
|
|
1709
|
-
return typeof theme === "object" && theme !== null && !Array.isArray(theme) ? theme : null;
|
|
1710
|
-
})();
|
|
1711
|
-
const nameOk = typeof info?.name === "string" ? info.name === desiredName : true;
|
|
1712
|
-
if (desiredColorInt == null) return nameOk;
|
|
1713
|
-
const localSeedOk = typeof info?.profile_color_seed === "number" ? info.profile_color_seed === desiredColorInt : false;
|
|
1714
|
-
const prefOk = typeof browserTheme?.user_color2 === "number" && browserTheme.user_color2 === desiredColorInt || typeof autogeneratedTheme?.color === "number" && autogeneratedTheme.color === desiredColorInt;
|
|
1715
|
-
return nameOk && localSeedOk && prefOk;
|
|
1716
|
-
}
|
|
1717
|
-
/**
|
|
1718
|
-
* Best-effort profile decoration (name + fased-orange). Chrome preference keys
|
|
1719
|
-
* vary by version; we keep this conservative and idempotent.
|
|
1720
|
-
*/
|
|
1721
|
-
function decorateFasedAgentProfile(userDataDir, opts) {
|
|
1722
|
-
const desiredName = opts?.name ?? DEFAULT_FASED_BROWSER_PROFILE_NAME;
|
|
1723
|
-
const desiredColor = (opts?.color ?? DEFAULT_FASED_BROWSER_COLOR).toUpperCase();
|
|
1724
|
-
const desiredColorInt = parseHexRgbToSignedArgbInt(desiredColor);
|
|
1725
|
-
const localStatePath = path.join(userDataDir, "Local State");
|
|
1726
|
-
const preferencesPath = path.join(userDataDir, "Default", "Preferences");
|
|
1727
|
-
const localState = safeReadJson(localStatePath) ?? {};
|
|
1728
|
-
setDeep(localState, [
|
|
1729
|
-
"profile",
|
|
1730
|
-
"info_cache",
|
|
1731
|
-
"Default",
|
|
1732
|
-
"name"
|
|
1733
|
-
], desiredName);
|
|
1734
|
-
setDeep(localState, [
|
|
1735
|
-
"profile",
|
|
1736
|
-
"info_cache",
|
|
1737
|
-
"Default",
|
|
1738
|
-
"shortcut_name"
|
|
1739
|
-
], desiredName);
|
|
1740
|
-
setDeep(localState, [
|
|
1741
|
-
"profile",
|
|
1742
|
-
"info_cache",
|
|
1743
|
-
"Default",
|
|
1744
|
-
"user_name"
|
|
1745
|
-
], desiredName);
|
|
1746
|
-
setDeep(localState, [
|
|
1747
|
-
"profile",
|
|
1748
|
-
"info_cache",
|
|
1749
|
-
"Default",
|
|
1750
|
-
"profile_color"
|
|
1751
|
-
], desiredColor);
|
|
1752
|
-
setDeep(localState, [
|
|
1753
|
-
"profile",
|
|
1754
|
-
"info_cache",
|
|
1755
|
-
"Default",
|
|
1756
|
-
"user_color"
|
|
1757
|
-
], desiredColor);
|
|
1758
|
-
if (desiredColorInt != null) {
|
|
1759
|
-
setDeep(localState, [
|
|
1760
|
-
"profile",
|
|
1761
|
-
"info_cache",
|
|
1762
|
-
"Default",
|
|
1763
|
-
"profile_color_seed"
|
|
1764
|
-
], desiredColorInt);
|
|
1765
|
-
setDeep(localState, [
|
|
1766
|
-
"profile",
|
|
1767
|
-
"info_cache",
|
|
1768
|
-
"Default",
|
|
1769
|
-
"profile_highlight_color"
|
|
1770
|
-
], desiredColorInt);
|
|
1771
|
-
setDeep(localState, [
|
|
1772
|
-
"profile",
|
|
1773
|
-
"info_cache",
|
|
1774
|
-
"Default",
|
|
1775
|
-
"default_avatar_fill_color"
|
|
1776
|
-
], desiredColorInt);
|
|
1777
|
-
setDeep(localState, [
|
|
1778
|
-
"profile",
|
|
1779
|
-
"info_cache",
|
|
1780
|
-
"Default",
|
|
1781
|
-
"default_avatar_stroke_color"
|
|
1782
|
-
], desiredColorInt);
|
|
1783
|
-
}
|
|
1784
|
-
safeWriteJson(localStatePath, localState);
|
|
1785
|
-
const prefs = safeReadJson(preferencesPath) ?? {};
|
|
1786
|
-
setDeep(prefs, ["profile", "name"], desiredName);
|
|
1787
|
-
setDeep(prefs, ["profile", "profile_color"], desiredColor);
|
|
1788
|
-
setDeep(prefs, ["profile", "user_color"], desiredColor);
|
|
1789
|
-
if (desiredColorInt != null) {
|
|
1790
|
-
setDeep(prefs, [
|
|
1791
|
-
"autogenerated",
|
|
1792
|
-
"theme",
|
|
1793
|
-
"color"
|
|
1794
|
-
], desiredColorInt);
|
|
1795
|
-
setDeep(prefs, [
|
|
1796
|
-
"browser",
|
|
1797
|
-
"theme",
|
|
1798
|
-
"user_color2"
|
|
1799
|
-
], desiredColorInt);
|
|
1800
|
-
}
|
|
1801
|
-
safeWriteJson(preferencesPath, prefs);
|
|
1802
|
-
try {
|
|
1803
|
-
fs.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
|
|
1804
|
-
} catch {}
|
|
1805
|
-
}
|
|
1806
|
-
function ensureProfileCleanExit(userDataDir) {
|
|
1807
|
-
const preferencesPath = path.join(userDataDir, "Default", "Preferences");
|
|
1808
|
-
const prefs = safeReadJson(preferencesPath) ?? {};
|
|
1809
|
-
setDeep(prefs, ["exit_type"], "Normal");
|
|
1810
|
-
setDeep(prefs, ["exited_cleanly"], true);
|
|
1811
|
-
safeWriteJson(preferencesPath, prefs);
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
//#endregion
|
|
1815
|
-
//#region src/browser/chrome.ts
|
|
1816
|
-
const log = createSubsystemLogger("browser").child("chrome");
|
|
1817
|
-
function exists(filePath) {
|
|
1818
|
-
try {
|
|
1819
|
-
return fs.existsSync(filePath);
|
|
1820
|
-
} catch {
|
|
1821
|
-
return false;
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
function resolveBrowserExecutable(resolved) {
|
|
1825
|
-
return resolveBrowserExecutableForPlatform(resolved, process.platform);
|
|
1826
|
-
}
|
|
1827
|
-
function resolveFasedAgentUserDataDir(profileName = DEFAULT_FASED_BROWSER_PROFILE_NAME) {
|
|
1828
|
-
return path.join(CONFIG_DIR, "browser", profileName, "user-data");
|
|
1829
|
-
}
|
|
1830
|
-
function cdpUrlForPort(cdpPort) {
|
|
1831
|
-
return `http://127.0.0.1:${cdpPort}`;
|
|
1832
|
-
}
|
|
1833
|
-
async function isChromeReachable(cdpUrl, timeoutMs = 500) {
|
|
1834
|
-
const version = await fetchChromeVersion(cdpUrl, timeoutMs);
|
|
1835
|
-
return Boolean(version);
|
|
1836
|
-
}
|
|
1837
|
-
async function fetchChromeVersion(cdpUrl, timeoutMs = 500) {
|
|
1838
|
-
const ctrl = new AbortController();
|
|
1839
|
-
const t = setTimeout(ctrl.abort.bind(ctrl), timeoutMs);
|
|
1840
|
-
try {
|
|
1841
|
-
const versionUrl = appendCdpPath(cdpUrl, "/json/version");
|
|
1842
|
-
const res = await fetch(versionUrl, {
|
|
1843
|
-
signal: ctrl.signal,
|
|
1844
|
-
headers: getHeadersWithAuth(versionUrl)
|
|
1845
|
-
});
|
|
1846
|
-
if (!res.ok) return null;
|
|
1847
|
-
const data = await res.json();
|
|
1848
|
-
if (!data || typeof data !== "object") return null;
|
|
1849
|
-
return data;
|
|
1850
|
-
} catch {
|
|
1851
|
-
return null;
|
|
1852
|
-
} finally {
|
|
1853
|
-
clearTimeout(t);
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
async function getChromeWebSocketUrl(cdpUrl, timeoutMs = 500) {
|
|
1857
|
-
const version = await fetchChromeVersion(cdpUrl, timeoutMs);
|
|
1858
|
-
const wsUrl = String(version?.webSocketDebuggerUrl ?? "").trim();
|
|
1859
|
-
if (!wsUrl) return null;
|
|
1860
|
-
return normalizeCdpWsUrl(wsUrl, cdpUrl);
|
|
1861
|
-
}
|
|
1862
|
-
async function canOpenWebSocket(wsUrl, timeoutMs = 800) {
|
|
1863
|
-
return await new Promise((resolve) => {
|
|
1864
|
-
const headers = getHeadersWithAuth(wsUrl);
|
|
1865
|
-
const ws = new WebSocket(wsUrl, {
|
|
1866
|
-
handshakeTimeout: timeoutMs,
|
|
1867
|
-
...Object.keys(headers).length ? { headers } : {}
|
|
1868
|
-
});
|
|
1869
|
-
const timer = setTimeout(() => {
|
|
1870
|
-
try {
|
|
1871
|
-
ws.terminate();
|
|
1872
|
-
} catch {}
|
|
1873
|
-
resolve(false);
|
|
1874
|
-
}, Math.max(50, timeoutMs + 25));
|
|
1875
|
-
ws.once("open", () => {
|
|
1876
|
-
clearTimeout(timer);
|
|
1877
|
-
try {
|
|
1878
|
-
ws.close();
|
|
1879
|
-
} catch {}
|
|
1880
|
-
resolve(true);
|
|
1881
|
-
});
|
|
1882
|
-
ws.once("error", () => {
|
|
1883
|
-
clearTimeout(timer);
|
|
1884
|
-
resolve(false);
|
|
1885
|
-
});
|
|
1886
|
-
});
|
|
1887
|
-
}
|
|
1888
|
-
async function isChromeCdpReady(cdpUrl, timeoutMs = 500, handshakeTimeoutMs = 800) {
|
|
1889
|
-
const wsUrl = await getChromeWebSocketUrl(cdpUrl, timeoutMs);
|
|
1890
|
-
if (!wsUrl) return false;
|
|
1891
|
-
return await canOpenWebSocket(wsUrl, handshakeTimeoutMs);
|
|
1892
|
-
}
|
|
1893
|
-
async function launchFasedAgentChrome(resolved, profile) {
|
|
1894
|
-
if (!profile.cdpIsLoopback) throw new Error(`Profile "${profile.name}" is remote; cannot launch local Chrome.`);
|
|
1895
|
-
await ensurePortAvailable(profile.cdpPort);
|
|
1896
|
-
const exe = resolveBrowserExecutable(resolved);
|
|
1897
|
-
if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
|
|
1898
|
-
const userDataDir = resolveFasedAgentUserDataDir(profile.name);
|
|
1899
|
-
fs.mkdirSync(userDataDir, { recursive: true });
|
|
1900
|
-
const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? DEFAULT_FASED_BROWSER_COLOR).toUpperCase());
|
|
1901
|
-
const spawnOnce = () => {
|
|
1902
|
-
const args = [
|
|
1903
|
-
`--remote-debugging-port=${profile.cdpPort}`,
|
|
1904
|
-
`--user-data-dir=${userDataDir}`,
|
|
1905
|
-
"--no-first-run",
|
|
1906
|
-
"--no-default-browser-check",
|
|
1907
|
-
"--disable-sync",
|
|
1908
|
-
"--disable-background-networking",
|
|
1909
|
-
"--disable-component-update",
|
|
1910
|
-
"--disable-features=Translate,MediaRouter",
|
|
1911
|
-
"--disable-session-crashed-bubble",
|
|
1912
|
-
"--hide-crash-restore-bubble",
|
|
1913
|
-
"--password-store=basic"
|
|
1914
|
-
];
|
|
1915
|
-
if (resolved.headless) {
|
|
1916
|
-
args.push("--headless=new");
|
|
1917
|
-
args.push("--disable-gpu");
|
|
1918
|
-
}
|
|
1919
|
-
if (resolved.noSandbox) {
|
|
1920
|
-
args.push("--no-sandbox");
|
|
1921
|
-
args.push("--disable-setuid-sandbox");
|
|
1922
|
-
}
|
|
1923
|
-
if (process.platform === "linux") args.push("--disable-dev-shm-usage");
|
|
1924
|
-
args.push("--disable-blink-features=AutomationControlled");
|
|
1925
|
-
if (resolved.extraArgs.length > 0) args.push(...resolved.extraArgs);
|
|
1926
|
-
args.push("about:blank");
|
|
1927
|
-
return spawn(exe.path, args, {
|
|
1928
|
-
stdio: "pipe",
|
|
1929
|
-
env: {
|
|
1930
|
-
...process.env,
|
|
1931
|
-
HOME: os.homedir()
|
|
1932
|
-
}
|
|
1933
|
-
});
|
|
1934
|
-
};
|
|
1935
|
-
const startedAt = Date.now();
|
|
1936
|
-
const localStatePath = path.join(userDataDir, "Local State");
|
|
1937
|
-
const preferencesPath = path.join(userDataDir, "Default", "Preferences");
|
|
1938
|
-
if (!exists(localStatePath) || !exists(preferencesPath)) {
|
|
1939
|
-
const bootstrap = spawnOnce();
|
|
1940
|
-
const deadline = Date.now() + 1e4;
|
|
1941
|
-
while (Date.now() < deadline) {
|
|
1942
|
-
if (exists(localStatePath) && exists(preferencesPath)) break;
|
|
1943
|
-
await new Promise((r) => setTimeout(r, 100));
|
|
1944
|
-
}
|
|
1945
|
-
try {
|
|
1946
|
-
bootstrap.kill("SIGTERM");
|
|
1947
|
-
} catch {}
|
|
1948
|
-
const exitDeadline = Date.now() + 5e3;
|
|
1949
|
-
while (Date.now() < exitDeadline) {
|
|
1950
|
-
if (bootstrap.exitCode != null) break;
|
|
1951
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
if (needsDecorate) try {
|
|
1955
|
-
decorateFasedAgentProfile(userDataDir, {
|
|
1956
|
-
name: profile.name,
|
|
1957
|
-
color: profile.color
|
|
1958
|
-
});
|
|
1959
|
-
log.info(`browser profile decorated (${profile.color})`);
|
|
1960
|
-
} catch (err) {
|
|
1961
|
-
log.warn(`fased browser profile decoration failed: ${String(err)}`);
|
|
1962
|
-
}
|
|
1963
|
-
try {
|
|
1964
|
-
ensureProfileCleanExit(userDataDir);
|
|
1965
|
-
} catch (err) {
|
|
1966
|
-
log.warn(`fased browser clean-exit prefs failed: ${String(err)}`);
|
|
1967
|
-
}
|
|
1968
|
-
const proc = spawnOnce();
|
|
1969
|
-
const readyDeadline = Date.now() + 15e3;
|
|
1970
|
-
while (Date.now() < readyDeadline) {
|
|
1971
|
-
if (await isChromeReachable(profile.cdpUrl, 500)) break;
|
|
1972
|
-
await new Promise((r) => setTimeout(r, 200));
|
|
1973
|
-
}
|
|
1974
|
-
if (!await isChromeReachable(profile.cdpUrl, 500)) {
|
|
1975
|
-
try {
|
|
1976
|
-
proc.kill("SIGKILL");
|
|
1977
|
-
} catch {}
|
|
1978
|
-
throw new Error(`Failed to start Chrome CDP on port ${profile.cdpPort} for profile "${profile.name}".`);
|
|
1979
|
-
}
|
|
1980
|
-
const pid = proc.pid ?? -1;
|
|
1981
|
-
log.info(`fased browser started (${exe.kind}) profile "${profile.name}" on 127.0.0.1:${profile.cdpPort} (pid ${pid})`);
|
|
1982
|
-
return {
|
|
1983
|
-
pid,
|
|
1984
|
-
exe,
|
|
1985
|
-
userDataDir,
|
|
1986
|
-
cdpPort: profile.cdpPort,
|
|
1987
|
-
startedAt,
|
|
1988
|
-
proc
|
|
1989
|
-
};
|
|
1990
|
-
}
|
|
1991
|
-
async function stopFasedAgentChrome(running, timeoutMs = 2500) {
|
|
1992
|
-
const proc = running.proc;
|
|
1993
|
-
if (proc.killed) return;
|
|
1994
|
-
try {
|
|
1995
|
-
proc.kill("SIGTERM");
|
|
1996
|
-
} catch {}
|
|
1997
|
-
const start = Date.now();
|
|
1998
|
-
while (Date.now() - start < timeoutMs) {
|
|
1999
|
-
if (!proc.exitCode && proc.killed) break;
|
|
2000
|
-
if (!await isChromeReachable(cdpUrlForPort(running.cdpPort), 200)) return;
|
|
2001
|
-
await new Promise((r) => setTimeout(r, 100));
|
|
2002
|
-
}
|
|
2003
|
-
try {
|
|
2004
|
-
proc.kill("SIGKILL");
|
|
2005
|
-
} catch {}
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
//#endregion
|
|
2009
|
-
//#region src/browser/form-fields.ts
|
|
2010
|
-
const DEFAULT_FILL_FIELD_TYPE = "text";
|
|
2011
|
-
function normalizeBrowserFormFieldRef(value) {
|
|
2012
|
-
return typeof value === "string" ? value.trim() : "";
|
|
2013
|
-
}
|
|
2014
|
-
function normalizeBrowserFormFieldType(value) {
|
|
2015
|
-
return (typeof value === "string" ? value.trim() : "") || DEFAULT_FILL_FIELD_TYPE;
|
|
2016
|
-
}
|
|
2017
|
-
function normalizeBrowserFormFieldValue(value) {
|
|
2018
|
-
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? value : void 0;
|
|
2019
|
-
}
|
|
2020
|
-
function normalizeBrowserFormField(record) {
|
|
2021
|
-
const ref = normalizeBrowserFormFieldRef(record.ref);
|
|
2022
|
-
if (!ref) return null;
|
|
2023
|
-
const type = normalizeBrowserFormFieldType(record.type);
|
|
2024
|
-
const value = normalizeBrowserFormFieldValue(record.value);
|
|
2025
|
-
return value === void 0 ? {
|
|
2026
|
-
ref,
|
|
2027
|
-
type
|
|
2028
|
-
} : {
|
|
2029
|
-
ref,
|
|
2030
|
-
type,
|
|
2031
|
-
value
|
|
2032
|
-
};
|
|
2033
|
-
}
|
|
2034
|
-
|
|
2035
|
-
//#endregion
|
|
2036
|
-
//#region src/browser/paths.ts
|
|
2037
|
-
const DEFAULT_BROWSER_TMP_DIR = resolvePreferredFasedAgentTmpDir();
|
|
2038
|
-
const DEFAULT_TRACE_DIR = DEFAULT_BROWSER_TMP_DIR;
|
|
2039
|
-
const DEFAULT_DOWNLOAD_DIR = path.join(DEFAULT_BROWSER_TMP_DIR, "downloads");
|
|
2040
|
-
const DEFAULT_UPLOAD_DIR = path.join(DEFAULT_BROWSER_TMP_DIR, "uploads");
|
|
2041
|
-
function invalidPath(scopeLabel) {
|
|
2042
|
-
return {
|
|
2043
|
-
ok: false,
|
|
2044
|
-
error: `Invalid path: must stay within ${scopeLabel}`
|
|
2045
|
-
};
|
|
2046
|
-
}
|
|
2047
|
-
async function resolveRealPathIfExists(targetPath) {
|
|
2048
|
-
try {
|
|
2049
|
-
return await fs$1.realpath(targetPath);
|
|
2050
|
-
} catch {
|
|
2051
|
-
return;
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
async function resolveTrustedRootRealPath(rootDir) {
|
|
2055
|
-
try {
|
|
2056
|
-
const rootLstat = await fs$1.lstat(rootDir);
|
|
2057
|
-
if (!rootLstat.isDirectory() || rootLstat.isSymbolicLink()) return;
|
|
2058
|
-
return await fs$1.realpath(rootDir);
|
|
2059
|
-
} catch {
|
|
2060
|
-
return;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
async function validateCanonicalPathWithinRoot(params) {
|
|
2064
|
-
try {
|
|
2065
|
-
const candidateLstat = await fs$1.lstat(params.candidatePath);
|
|
2066
|
-
if (candidateLstat.isSymbolicLink()) return "invalid";
|
|
2067
|
-
if (params.expect === "directory" && !candidateLstat.isDirectory()) return "invalid";
|
|
2068
|
-
if (params.expect === "file" && !candidateLstat.isFile()) return "invalid";
|
|
2069
|
-
const candidateRealPath = await fs$1.realpath(params.candidatePath);
|
|
2070
|
-
return isPathInside(params.rootRealPath, candidateRealPath) ? "ok" : "invalid";
|
|
2071
|
-
} catch (err) {
|
|
2072
|
-
return isNotFoundPathError(err) ? "not-found" : "invalid";
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
function resolvePathWithinRoot(params) {
|
|
2076
|
-
const root = path.resolve(params.rootDir);
|
|
2077
|
-
const raw = params.requestedPath.trim();
|
|
2078
|
-
if (!raw) {
|
|
2079
|
-
if (!params.defaultFileName) return {
|
|
2080
|
-
ok: false,
|
|
2081
|
-
error: "path is required"
|
|
2082
|
-
};
|
|
2083
|
-
return {
|
|
2084
|
-
ok: true,
|
|
2085
|
-
path: path.join(root, params.defaultFileName)
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
const resolved = path.resolve(root, raw);
|
|
2089
|
-
const rel = path.relative(root, resolved);
|
|
2090
|
-
if (!rel || rel.startsWith("..") || path.isAbsolute(rel)) return {
|
|
2091
|
-
ok: false,
|
|
2092
|
-
error: `Invalid path: must stay within ${params.scopeLabel}`
|
|
2093
|
-
};
|
|
2094
|
-
return {
|
|
2095
|
-
ok: true,
|
|
2096
|
-
path: resolved
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
async function resolveWritablePathWithinRoot(params) {
|
|
2100
|
-
const lexical = resolvePathWithinRoot(params);
|
|
2101
|
-
if (!lexical.ok) return lexical;
|
|
2102
|
-
const rootRealPath = await resolveTrustedRootRealPath(path.resolve(params.rootDir));
|
|
2103
|
-
if (!rootRealPath) return invalidPath(params.scopeLabel);
|
|
2104
|
-
const requestedPath = lexical.path;
|
|
2105
|
-
if (await validateCanonicalPathWithinRoot({
|
|
2106
|
-
rootRealPath,
|
|
2107
|
-
candidatePath: path.dirname(requestedPath),
|
|
2108
|
-
expect: "directory"
|
|
2109
|
-
}) !== "ok") return invalidPath(params.scopeLabel);
|
|
2110
|
-
if (await validateCanonicalPathWithinRoot({
|
|
2111
|
-
rootRealPath,
|
|
2112
|
-
candidatePath: requestedPath,
|
|
2113
|
-
expect: "file"
|
|
2114
|
-
}) === "invalid") return invalidPath(params.scopeLabel);
|
|
2115
|
-
return lexical;
|
|
2116
|
-
}
|
|
2117
|
-
async function resolveExistingPathsWithinRoot(params) {
|
|
2118
|
-
return await resolveCheckedPathsWithinRoot({
|
|
2119
|
-
...params,
|
|
2120
|
-
allowMissingFallback: true
|
|
2121
|
-
});
|
|
2122
|
-
}
|
|
2123
|
-
async function resolveStrictExistingPathsWithinRoot(params) {
|
|
2124
|
-
return await resolveCheckedPathsWithinRoot({
|
|
2125
|
-
...params,
|
|
2126
|
-
allowMissingFallback: false
|
|
2127
|
-
});
|
|
2128
|
-
}
|
|
2129
|
-
async function resolveCheckedPathsWithinRoot(params) {
|
|
2130
|
-
const rootDir = path.resolve(params.rootDir);
|
|
2131
|
-
const rootRealPath = await resolveRealPathIfExists(rootDir);
|
|
2132
|
-
const isInRoot = (relativePath) => Boolean(relativePath) && !relativePath.startsWith("..") && !path.isAbsolute(relativePath);
|
|
2133
|
-
const resolveExistingRelativePath = async (requestedPath) => {
|
|
2134
|
-
const raw = requestedPath.trim();
|
|
2135
|
-
const lexicalPathResult = resolvePathWithinRoot({
|
|
2136
|
-
rootDir,
|
|
2137
|
-
requestedPath,
|
|
2138
|
-
scopeLabel: params.scopeLabel
|
|
2139
|
-
});
|
|
2140
|
-
if (lexicalPathResult.ok) return {
|
|
2141
|
-
ok: true,
|
|
2142
|
-
relativePath: path.relative(rootDir, lexicalPathResult.path),
|
|
2143
|
-
fallbackPath: lexicalPathResult.path
|
|
2144
|
-
};
|
|
2145
|
-
if (!rootRealPath || !raw || !path.isAbsolute(raw)) return lexicalPathResult;
|
|
2146
|
-
try {
|
|
2147
|
-
const resolvedExistingPath = await fs$1.realpath(raw);
|
|
2148
|
-
const relativePath = path.relative(rootRealPath, resolvedExistingPath);
|
|
2149
|
-
if (!isInRoot(relativePath)) return lexicalPathResult;
|
|
2150
|
-
return {
|
|
2151
|
-
ok: true,
|
|
2152
|
-
relativePath,
|
|
2153
|
-
fallbackPath: resolvedExistingPath
|
|
2154
|
-
};
|
|
2155
|
-
} catch {
|
|
2156
|
-
return lexicalPathResult;
|
|
2157
|
-
}
|
|
2158
|
-
};
|
|
2159
|
-
const resolvedPaths = [];
|
|
2160
|
-
for (const raw of params.requestedPaths) {
|
|
2161
|
-
const pathResult = await resolveExistingRelativePath(raw);
|
|
2162
|
-
if (!pathResult.ok) return {
|
|
2163
|
-
ok: false,
|
|
2164
|
-
error: pathResult.error
|
|
2165
|
-
};
|
|
2166
|
-
let opened;
|
|
2167
|
-
try {
|
|
2168
|
-
opened = await openFileWithinRoot({
|
|
2169
|
-
rootDir,
|
|
2170
|
-
relativePath: pathResult.relativePath
|
|
2171
|
-
});
|
|
2172
|
-
resolvedPaths.push(opened.realPath);
|
|
2173
|
-
} catch (err) {
|
|
2174
|
-
if (params.allowMissingFallback && err instanceof SafeOpenError && err.code === "not-found") {
|
|
2175
|
-
resolvedPaths.push(pathResult.fallbackPath);
|
|
2176
|
-
continue;
|
|
2177
|
-
}
|
|
2178
|
-
return {
|
|
2179
|
-
ok: false,
|
|
2180
|
-
error: `Invalid path: must stay within ${params.scopeLabel} and be a regular non-symlink file`
|
|
2181
|
-
};
|
|
2182
|
-
} finally {
|
|
2183
|
-
await opened?.handle.close().catch(() => {});
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
return {
|
|
2187
|
-
ok: true,
|
|
2188
|
-
paths: resolvedPaths
|
|
2189
|
-
};
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
//#endregion
|
|
2193
|
-
//#region src/browser/runtime-dependency.ts
|
|
2194
|
-
async function loadPlaywrightCore() {
|
|
2195
|
-
return await importOptionalRuntimeDependency({
|
|
2196
|
-
componentId: "browser-runtime",
|
|
2197
|
-
packageName: "@fased/browser-runtime",
|
|
2198
|
-
dependency: "playwright-core"
|
|
2199
|
-
});
|
|
2200
|
-
}
|
|
2201
|
-
async function loadReadability() {
|
|
2202
|
-
return await importOptionalRuntimeDependency({
|
|
2203
|
-
componentId: "browser-runtime",
|
|
2204
|
-
packageName: "@fased/browser-runtime",
|
|
2205
|
-
dependency: "@mozilla/readability"
|
|
2206
|
-
});
|
|
2207
|
-
}
|
|
2208
|
-
async function loadLinkedom() {
|
|
2209
|
-
return await importOptionalRuntimeDependency({
|
|
2210
|
-
componentId: "browser-runtime",
|
|
2211
|
-
packageName: "@fased/browser-runtime",
|
|
2212
|
-
dependency: "linkedom"
|
|
2213
|
-
});
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
//#endregion
|
|
2217
|
-
export { fetchJson as A, isTrustedProxyAddress as B, normalizeCdpWsUrl as C, assertBrowserNavigationResultAllowed as D, assertBrowserNavigationAllowed as E, stopChromeExtensionRelayServer as F, DEFAULT_AI_SNAPSHOT_MAX_CHARS as G, resolveForwardedClientIp as H, rawDataToString as I, DEFAULT_FASED_BROWSER_COLOR as J, DEFAULT_BROWSER_DEFAULT_PROFILE_NAME as K, isLoopbackAddress as L, getHeadersWithAuth as M, withCdpSocket as N, withBrowserNavigationPolicy as O, ensureChromeExtensionRelayServer as P, isLoopbackHost as R, formatAriaSnapshot as S, InvalidBrowserNavigationUrlError as T, DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH as U, resolveClientIp as V, DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS as W, DEFAULT_FASED_BROWSER_PROFILE_NAME as X, DEFAULT_FASED_BROWSER_ENABLED as Y, stopFasedAgentChrome as _, DEFAULT_TRACE_DIR as a, captureScreenshot as b, resolveStrictExistingPathsWithinRoot as c, normalizeBrowserFormField as d, getChromeWebSocketUrl as f, resolveFasedAgentUserDataDir as g, launchFasedAgentChrome as h, DEFAULT_DOWNLOAD_DIR as i, fetchOk as j, appendCdpPath as k, resolveWritablePathWithinRoot as l, isChromeReachable as m, loadPlaywrightCore as n, DEFAULT_UPLOAD_DIR as o, isChromeCdpReady as p, DEFAULT_BROWSER_EVALUATE_ENABLED as q, loadReadability as r, resolveExistingPathsWithinRoot as s, loadLinkedom as t, DEFAULT_FILL_FIELD_TYPE as u, resolveBrowserExecutableForPlatform as v, snapshotAria as w, createTargetViaCdp as x, resolveLsofCommandSync as y, isSecureWebSocketUrl as z };
|