stableclaw 2026.4.6 → 2026.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -290
- package/package.json +1 -73
- package/dist/.buildstamp +0 -1
- package/dist/abort-C9luPDzM.js +0 -192
- package/dist/abort-cutoff-B1ws4nOb.js +0 -56
- package/dist/abort-cutoff.runtime-DyRUNN6p.js +0 -20
- package/dist/abort-cutoff.runtime.js +0 -1
- package/dist/abort-primitives-CGyFwJ93.js +0 -92
- package/dist/abort-signal-CrrraMAi.js +0 -13
- package/dist/abort.runtime-oBiooAFx.js +0 -2
- package/dist/abort.runtime.js +0 -1
- package/dist/access-DIqrGWVo.js +0 -81
- package/dist/access-control-DfV6HWO9.js +0 -152
- package/dist/account-action-gate-eHi2MB4J.js +0 -12
- package/dist/account-core-DOelA7Wl.js +0 -26
- package/dist/account-helpers-CafpxP7V.js +0 -1
- package/dist/account-helpers-jJOgsae3.js +0 -102
- package/dist/account-id-DXal1kRJ.js +0 -1
- package/dist/account-inspect-CfagweUE.js +0 -158
- package/dist/account-inspect-DOt4IDX6.js +0 -92
- package/dist/account-inspect-pnXre-7b.js +0 -81
- package/dist/account-lookup-CLJxpfHr.js +0 -17
- package/dist/account-resolution-CbKUJkzG.js +0 -30
- package/dist/account-selection-B8a_DqXo.js +0 -222
- package/dist/account-snapshot-fields-mr-1u321.js +0 -130
- package/dist/account-summary-DA6ds0Hk.js +0 -36
- package/dist/accounts-CO-lK8jJ.js +0 -150
- package/dist/accounts-D419O6Gq.js +0 -2
- package/dist/accounts-DKMLcV4g.js +0 -132
- package/dist/accounts-DdiZwn14.js +0 -57
- package/dist/accounts-SWhOQhoA.js +0 -58
- package/dist/accounts-iR2U_Vs4.js +0 -41
- package/dist/accounts-jsSym1md.js +0 -102
- package/dist/accounts-p4Eir-wB.js +0 -107
- package/dist/accounts-uAWNlC7q.js +0 -94
- package/dist/accounts-x23pAGjm.js +0 -137
- package/dist/accounts.runtime-PJOhs60R.js +0 -2
- package/dist/accounts.runtime.js +0 -1
- package/dist/ack-reactions-fcKs7CQ_.js +0 -43
- package/dist/acp-cli-ByWTIhFx.js +0 -2207
- package/dist/acp-runtime-D7wrReOP.js +0 -8
- package/dist/acp-stateful-target-driver-DY2EfkQt.js +0 -60
- package/dist/action-runtime-BdRtmydq.js +0 -318
- package/dist/action-runtime-DvNB5A61.js +0 -72
- package/dist/action-runtime-api-BnVs42oX.js +0 -1028
- package/dist/actions-CUYHtUqe.js +0 -531
- package/dist/actions.runtime-BBrSlYkH.js +0 -18
- package/dist/actions.runtime-DB4aKmBO.js +0 -5
- package/dist/actions.runtime-bdKprwSE.js +0 -2
- package/dist/actions.runtime.js +0 -1
- package/dist/active-listener-SB9ihcaC.js +0 -46
- package/dist/agent-command-C_MGil8o.js +0 -1457
- package/dist/agent-list-MRXQwyo0.js +0 -52
- package/dist/agent-media-payload-DDTSvr-n.js +0 -17
- package/dist/agent-paths-D711oayD.js +0 -12
- package/dist/agent-runner-utils-DEYzwZHa.js +0 -182
- package/dist/agent-runner.runtime-v2uIsAVy.js +0 -2218
- package/dist/agent-runner.runtime.js +0 -1
- package/dist/agent-runtime-Cz19IsmJ.js +0 -142
- package/dist/agent-s4m0Xp6V.js +0 -2
- package/dist/agent-scope-rWWUivuC.js +0 -215
- package/dist/agent-tools-login-DU1gQC9-.js +0 -57
- package/dist/agents/auth-profiles.runtime.js +0 -7
- package/dist/agents/pi-model-discovery-runtime.js +0 -2
- package/dist/agents-B2W3IoEe.js +0 -888
- package/dist/agents-DmE3LRim.js +0 -5
- package/dist/agents.config-D6XoJFQ-.js +0 -3
- package/dist/agents.config-Ui_tQc3C.js +0 -121
- package/dist/allow-from-Bj0HDNYh.js +0 -20
- package/dist/allow-from-CJwSUt_K.js +0 -9
- package/dist/allow-from-xOap1t02.js +0 -62
- package/dist/allow-list-DeRUbyj4.js +0 -319
- package/dist/allowed-updates-aOgPxM0g.js +0 -31
- package/dist/allowlist-config-edit-Ch2EvAYo.js +0 -279
- package/dist/allowlist-match-Dm6AqFEs.js +0 -63
- package/dist/ansi-B_0KjIJj.js +0 -54
- package/dist/anthropic-vertex-Stff_3_3.js +0 -21
- package/dist/anthropic-vertex-stream-DgR8-m-G.js +0 -653
- package/dist/api-7Pf2fGBp.js +0 -11
- package/dist/api-B80kCRiV.js +0 -11
- package/dist/api-B8_Wwelx.js +0 -2
- package/dist/api-BLI24uxW.js +0 -2
- package/dist/api-BLSg8PM8.js +0 -2
- package/dist/api-BRy2h4ZA.js +0 -2
- package/dist/api-BU_YBaOK.js +0 -3
- package/dist/api-BXQjqvPC.js +0 -2
- package/dist/api-BY9iT-AK.js +0 -106
- package/dist/api-BipiQQoS.js +0 -2
- package/dist/api-Bk5mFOju.js +0 -10
- package/dist/api-BrsLZRXn.js +0 -3
- package/dist/api-C16j1Xno.js +0 -2
- package/dist/api-CGtiPyfv.js +0 -8358
- package/dist/api-CHIsf5Wl.js +0 -21
- package/dist/api-CP9q4gi6.js +0 -19
- package/dist/api-CWPDpJCM.js +0 -2
- package/dist/api-CaMdAP9T.js +0 -2
- package/dist/api-CftMlodx.js +0 -5
- package/dist/api-Cpj_QQAF.js +0 -5
- package/dist/api-D13mhDzE.js +0 -33
- package/dist/api-DGcbqpSh.js +0 -2
- package/dist/api-DIGFhGqm.js +0 -30
- package/dist/api-DNxTJAiA.js +0 -5
- package/dist/api-DasNTWRo.js +0 -2
- package/dist/api-Dn7n2sWC.js +0 -74
- package/dist/api-Drq06O1M2.js +0 -6
- package/dist/api-OOJHubHS.js +0 -77
- package/dist/api-XH46JouJ.js +0 -2
- package/dist/api-builder-uuKvRs_O.js +0 -66
- package/dist/api-e3cIcFaV.js +0 -1
- package/dist/api-fetch-CvBBI8q8.js +0 -35
- package/dist/api-key-rotation-BCssmYGp.js +0 -150
- package/dist/api-rPpH8518.js +0 -322
- package/dist/api-w-46PN0B.js +0 -2
- package/dist/apply-DfjUTAkv.js +0 -485
- package/dist/apply.runtime-B-srtEUl.js +0 -2
- package/dist/apply.runtime-DOG87kW8.js +0 -166
- package/dist/apply.runtime.js +0 -1
- package/dist/approval-native-CI9-iVJa.js +0 -79
- package/dist/approval-native-runtime-2AVlvrdL.js +0 -399
- package/dist/approval-renderers-BTKeDNRo.js +0 -87
- package/dist/approval-runtime-DIA8ohXa.js +0 -262
- package/dist/archive-BaCqqQP1.js +0 -537
- package/dist/arg-split-get0R_Yr.js +0 -38
- package/dist/artifacts-DXKlQp1z.js +0 -52
- package/dist/assistant-error-format-CFSPB8qt.js +0 -109
- package/dist/async-lock-QqhPYwhW.js +0 -19
- package/dist/attachment-normalize-CMMyswNa.js +0 -921
- package/dist/audio-BxqNDSFq.js +0 -53
- package/dist/audio-DZWA6M9B.js +0 -41
- package/dist/audit-86J-sIQq.js +0 -54
- package/dist/audit-D9O3O-41.js +0 -86
- package/dist/audit-DwAT-Kzg.js +0 -892
- package/dist/audit-channel.allow-from.runtime-DmuUvr2f.js +0 -5
- package/dist/audit-channel.allow-from.runtime.js +0 -1
- package/dist/audit-channel.collect.runtime-B76LAkrF.js +0 -528
- package/dist/audit-channel.collect.runtime.js +0 -1
- package/dist/audit-channel.discord.runtime-qM5u1Hnl.js +0 -5
- package/dist/audit-channel.discord.runtime.js +0 -1
- package/dist/audit-channel.telegram.runtime-DpwmRUPy.js +0 -8
- package/dist/audit-channel.telegram.runtime.js +0 -1
- package/dist/audit-channel.zalouser.runtime-CzlFZYsv.js +0 -5
- package/dist/audit-channel.zalouser.runtime.js +0 -1
- package/dist/audit-extra.async-BupKW2BB.js +0 -820
- package/dist/audit-fs-B3GdTjId.js +0 -375
- package/dist/audit-membership-runtime-n195y1jy.js +0 -55
- package/dist/audit.deep.runtime-2gZPpwj8.js +0 -2
- package/dist/audit.deep.runtime.js +0 -1
- package/dist/audit.nondeep.runtime-6MT8p_25.js +0 -831
- package/dist/audit.nondeep.runtime.js +0 -1
- package/dist/audit.runtime-jdG0-1Bq.js +0 -7
- package/dist/audit.runtime.js +0 -1
- package/dist/auth-CmL8nlqP.js +0 -371
- package/dist/auth-Zya_1BCc.js +0 -181
- package/dist/auth-choice-CSSk-2VN.js +0 -69
- package/dist/auth-choice-Uyll2O8p.js +0 -341
- package/dist/auth-choice-legacy-5XgU4yCZ.js +0 -44
- package/dist/auth-choice-options-DTRb6fq4.js +0 -98
- package/dist/auth-choice-prompt-BAQTSD2R.js +0 -36
- package/dist/auth-choice-prompt-D6qkTw8h.js +0 -2
- package/dist/auth-choice-x5Cm9EXp.js +0 -3
- package/dist/auth-choice.apply-helpers-CtKCiOT4.js +0 -2
- package/dist/auth-choice.plugin-providers.runtime-BVH7Kq_W.js +0 -11
- package/dist/auth-choice.plugin-providers.runtime.js +0 -1
- package/dist/auth-health-BBleirOY.js +0 -165
- package/dist/auth-mode-policy-BD7_M2AG.js +0 -18
- package/dist/auth-profiles-B0SpzBJv.js +0 -440
- package/dist/auth-rate-limit-OkMcM1wH.js +0 -119
- package/dist/auth-store-Bro-SY1-.js +0 -242
- package/dist/avatar-policy-pho6U35i.js +0 -67
- package/dist/backend-config-CNAjcjho.js +0 -311
- package/dist/backoff-nvVV-tHk.js +0 -18
- package/dist/backup-create-CkkM1HNg.js +0 -462
- package/dist/backup-health-BWSliymu.js +0 -59
- package/dist/banner-DPWatUan.js +0 -370
- package/dist/banner-lDKgB6uE.js +0 -2
- package/dist/base-session-key-CRSigEPk.js +0 -14
- package/dist/binaries-CWBYavgU.js +0 -2
- package/dist/binaries-sPf-9aLM.js +0 -11
- package/dist/binding-registry-BkSvI4jO.js +0 -520
- package/dist/binding-targets-CdIq3brX.js +0 -99
- package/dist/bindings-AuReyzvX.js +0 -21
- package/dist/bindings-CYhLRcr8.js +0 -69
- package/dist/block-reply-pipeline-GSCCinHx.js +0 -266
- package/dist/block-streaming-4outFa6R.js +0 -107
- package/dist/bluebubbles-CorTCHc9.js +0 -64
- package/dist/bluebubbles-D2WymlOg.js +0 -235
- package/dist/bluebubbles-policy-C3d8eqhQ.js +0 -13
- package/dist/bonjour-cache-cleanup-BZJ-GrdX.js +0 -126
- package/dist/boolean-BEhDlAk_.js +0 -29
- package/dist/boolean-param-B807dWHx.js +0 -13
- package/dist/bot-BM1bybV7.js +0 -4268
- package/dist/bot-message-context-CdedyAq_.js +0 -2
- package/dist/bot-message-context-DKGx6N8p.js +0 -1175
- package/dist/bot-message-context.runtime-ClW1x1V5.js +0 -7
- package/dist/bot-message-context.runtime.js +0 -1
- package/dist/bot-message-context.session.runtime-BWjdkRuf.js +0 -12
- package/dist/bot-message-context.session.runtime.js +0 -1
- package/dist/bot-native-commands.delivery.runtime-CgfbR-Nj.js +0 -3
- package/dist/bot-native-commands.delivery.runtime.js +0 -1
- package/dist/bot-native-commands.runtime-DCz7w0aK.js +0 -11
- package/dist/bot-native-commands.runtime.js +0 -1
- package/dist/boundary-file-read-DB4ibbUg.js +0 -192
- package/dist/brave-web-search-provider-B7m_Mprt.js +0 -441
- package/dist/brew-B9JEV5Jj.js +0 -44
- package/dist/browser-config-D_OlwMzh.js +0 -226
- package/dist/browser-open-C9FOO4U_.js +0 -94
- package/dist/browser-runtime-CnWZ_eLQ.js +0 -185
- package/dist/browser-support-Cdp2Gr_6.js +0 -34
- package/dist/btw-command-CPUGSdlD.js +0 -16
- package/dist/build-info.json +0 -5
- package/dist/bundle-lsp-CCIAK1od.js +0 -93
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/boot-md/handler.js +0 -180
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +0 -42
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/command-logger/handler.js +0 -56
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/session-memory/handler.js +0 -196
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- package/dist/bundled/workflow-summary/handler.js +0 -115
- package/dist/bundled-capability-metadata-BpPgIy_5.js +0 -40
- package/dist/bundled-compat-BLlVmkDi.js +0 -64
- package/dist/bundled-sources-BQTCt2mJ.js +0 -53
- package/dist/button-types-B3_mzf8P.js +0 -54
- package/dist/cache-controls-DBdT4I-H.js +0 -40
- package/dist/call-dy-GwrXS.js +0 -649
- package/dist/call-ti-nPnzT.js +0 -2
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
- package/dist/canvas-host/a2ui/index.html +0 -307
- package/dist/capability-provider-runtime-CFUC5NbJ.js +0 -40
- package/dist/catalog-5PPtilI5.js +0 -274
- package/dist/channel-2EW4xzvV.js +0 -788
- package/dist/channel-BiRtGLF8.js +0 -1135
- package/dist/channel-C3AVw0Nl.js +0 -883
- package/dist/channel-CPe2XmyD.js +0 -1217
- package/dist/channel-CVFWRvjf.js +0 -337
- package/dist/channel-Cs0onQ6d.js +0 -4976
- package/dist/channel-D18v9r53.js +0 -1661
- package/dist/channel-D2n2s8Le.js +0 -208
- package/dist/channel-DWKApPW2.js +0 -454
- package/dist/channel-Depm5C-f.js +0 -800
- package/dist/channel-DwTcZxFU.js +0 -1129
- package/dist/channel-LT5vI3EK.js +0 -361
- package/dist/channel-XgThIGmf.js +0 -698
- package/dist/channel-account-context-CWd3uN_m.js +0 -104
- package/dist/channel-actions-DSvaYD1T.js +0 -39
- package/dist/channel-bQKtZIt6.js +0 -599
- package/dist/channel-catalog.json +0 -3
- package/dist/channel-config-D0eO5f5m.js +0 -115
- package/dist/channel-config-helpers-CLFL8FLU.js +0 -482
- package/dist/channel-config-primitives-DwsP66Ak.js +0 -3
- package/dist/channel-config-schema-DsguzRfd.js +0 -6
- package/dist/channel-config-writes-DQZOOZZ8.js +0 -1
- package/dist/channel-configured-B6WgvouH.js +0 -108
- package/dist/channel-feedback-DiLm9hqS.js +0 -257
- package/dist/channel-inbound-CXD3aSAK.js +0 -30
- package/dist/channel-issues-C-49e607.js +0 -13
- package/dist/channel-lifecycle-BnjeZxB6.js +0 -286
- package/dist/channel-lifecycle.core-Cn3zeU0h.js +0 -69
- package/dist/channel-options-DXJ7b7Ye.js +0 -39
- package/dist/channel-pairing-Byr3MFbN.js +0 -68
- package/dist/channel-plugin-common-D2EFcTg8.js +0 -4
- package/dist/channel-plugin-ids-DiOSWlnO.js +0 -56
- package/dist/channel-plugin-resolution-SMHmHx5v.js +0 -144
- package/dist/channel-policy-B-XKjrjK.js +0 -32
- package/dist/channel-reply-pipeline-BtBcBCNu.js +0 -16
- package/dist/channel-resolution-Du3EtWh1.js +0 -60
- package/dist/channel-runtime-F8_51GPp.js +0 -9
- package/dist/channel-selection-Bz3pl14y.js +0 -125
- package/dist/channel-send-result-CyfDCXJG.js +0 -40
- package/dist/channel-setup-yWpuHwhm.js +0 -51
- package/dist/channel-shared-gHcJ8n-f.js +0 -58
- package/dist/channel-status-CyoeLEnj.js +0 -2
- package/dist/channel-summary-5zHt-z1E.js +0 -139
- package/dist/channel-summary-B_fbXZ3l.js +0 -2
- package/dist/channel-target-DHO43h-I.js +0 -157
- package/dist/channel-targets-C8ZPfJmV.js +0 -18
- package/dist/channel-y-bXwYi3.js +0 -783
- package/dist/channel.runtime-B2SEUCf0.js +0 -14
- package/dist/channel.runtime-BF5qdBeA.js +0 -5
- package/dist/channel.runtime-BPaq6EO_.js +0 -108
- package/dist/channel.runtime-BV8FGxyb.js +0 -373
- package/dist/channel.runtime-CGnamSTC.js +0 -125
- package/dist/channel.runtime-CRNf20Ct.js +0 -80
- package/dist/channel.runtime-CRSWVexY.js +0 -335
- package/dist/channel.runtime-Cg6DmoTp.js +0 -783
- package/dist/channel.runtime-CpHTHeFR.js +0 -309
- package/dist/channel.runtime-ZdhCn8XI.js +0 -3315
- package/dist/channel.runtime-cXufT2kW.js +0 -61
- package/dist/channel.runtime.js +0 -1
- package/dist/channel.setup-Bq1vgxXZ.js +0 -279
- package/dist/channels-BZC2kp_G.js +0 -409
- package/dist/channels-CMeYB3bY.js +0 -1134
- package/dist/channels-cli-BIzqRmuu.js +0 -246
- package/dist/channels-status-issues-DqTdy1lq.js +0 -17
- package/dist/chat-envelope-DlGbh8k2.js +0 -158
- package/dist/chat-meta-wVbKo1sw.js +0 -700
- package/dist/chat-target-prefixes-DCF8a_Lp.js +0 -156
- package/dist/chat-type-DXjGtE-S.js +0 -10
- package/dist/chunk-CW-a7Cfh.js +0 -334
- package/dist/chunk-CrysgU_F.js +0 -36
- package/dist/chutes-oauth-Bh3BTMMG.js +0 -127
- package/dist/cjk-chars-Dl_Ko7yI.js +0 -50
- package/dist/clack-prompter-C5PtKpUH.js +0 -112
- package/dist/clawbot-cli-CgHyabtp.js +0 -9
- package/dist/clawhub-CDs2LE11.js +0 -263
- package/dist/clawhub-CO6YnoQZ.js +0 -163
- package/dist/cli/daemon-cli.js +0 -9
- package/dist/cli-CoOwN-V4.js +0 -164
- package/dist/cli-CpOL_jWZ.js +0 -152
- package/dist/cli-DCp06hI2.js +0 -2
- package/dist/cli-DVSDSUQm.js +0 -695
- package/dist/cli-backend-B20k67rv.js +0 -44
- package/dist/cli-backend-CcuyEMrq.js +0 -1
- package/dist/cli-backend-DMTxL8mq.js +0 -40
- package/dist/cli-backend-M4CTb3mq.js +0 -49
- package/dist/cli-migration-BwqQvUer.js +0 -100
- package/dist/cli-name-C3PA6Rhs.js +0 -21
- package/dist/cli-runner-8SNo1pKS.js +0 -1014
- package/dist/cli-runtime-ChUqI2f-.js +0 -3
- package/dist/cli-shared-01J1LZRE.js +0 -72
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/cli-utils-eYXt_xAg.js +0 -40
- package/dist/cli-watchdog-defaults-Dff-MFUz.js +0 -14
- package/dist/cli.runtime-WWGaX6X6.js +0 -547
- package/dist/cli.runtime.js +0 -1
- package/dist/client-BFxjGELJ.js +0 -5
- package/dist/client-C8_DsF-r.js +0 -7
- package/dist/client-bootstrap-BiVps8T6.js +0 -2
- package/dist/client-bootstrap-CFGCltAu.js +0 -121
- package/dist/client-lEilgam1.js +0 -87
- package/dist/cmd-argv-BbyQhzAC.js +0 -68
- package/dist/code-execution-CPcuE0sX.js +0 -142
- package/dist/codex-native-web-search-CyrsDBZ2.js +0 -155
- package/dist/codex-native-web-search-PFJu8fcM.js +0 -2
- package/dist/collection-runtime-DJjFReXJ.js +0 -1
- package/dist/command-auth-BAkZv3cP.js +0 -356
- package/dist/command-auth-native-Bsp5Doyd.js +0 -3
- package/dist/command-auth-tqFmaIaJ.js +0 -64
- package/dist/command-detection-BV7Ipg_0.js +0 -49
- package/dist/command-detection-DyqWl5Nq.js +0 -2
- package/dist/command-format-CX1xXtgB.js +0 -22
- package/dist/command-format-DwYoemR9.js +0 -2
- package/dist/command-gating-NyDk7t84.js +0 -40
- package/dist/command-options-BUoAEXAi.js +0 -25
- package/dist/command-poll-backoff-B7RiSvcV.js +0 -56
- package/dist/command-poll-backoff.runtime-DX9gobB0.js +0 -7
- package/dist/command-poll-backoff.runtime.js +0 -1
- package/dist/command-queue-CxEmvSGT.js +0 -253
- package/dist/command-registry-CaJXKNoO.js +0 -3
- package/dist/command-registry-Ct0qor9d.js +0 -199
- package/dist/command-secret-gateway-43O-1Hnf.js +0 -2
- package/dist/command-secret-gateway-C39SFGHd.js +0 -442
- package/dist/command-secret-targets-Bns-l1xV.js +0 -2
- package/dist/command-secret-targets-CTrFghcj.js +0 -87
- package/dist/command-surface-CfP1vask.js +0 -2
- package/dist/commands/status.summary.runtime.js +0 -146
- package/dist/commands-BxWe27p0.js +0 -42
- package/dist/commands-CiyPyNRY.js +0 -194
- package/dist/commands-acp-BeCm2Wnq.js +0 -990
- package/dist/commands-context-DbfMrVv4.js +0 -33
- package/dist/commands-core-CEmQydIV.js +0 -241
- package/dist/commands-core.runtime-BYooAQbc.js +0 -2
- package/dist/commands-core.runtime.js +0 -1
- package/dist/commands-handlers.runtime-CEAP4Yv2.js +0 -3707
- package/dist/commands-handlers.runtime.js +0 -1
- package/dist/commands-info-COwAtIWb.js +0 -651
- package/dist/commands-models-B4EJh5Fy.js +0 -395
- package/dist/commands-o21Y9Xck.js +0 -4
- package/dist/commands-registry-DgMc5_jk.js +0 -295
- package/dist/commands-registry.data-5O2FOeZl.js +0 -935
- package/dist/commands-registry.runtime-CT_YXpwM.js +0 -2
- package/dist/commands-registry.runtime.js +0 -1
- package/dist/commands-status.runtime-D4F4iVUh.js +0 -2
- package/dist/commands-status.runtime.js +0 -1
- package/dist/commands.runtime-_ALsMFcS.js +0 -4
- package/dist/commands.runtime.js +0 -1
- package/dist/common-Dbmo0I1E.js +0 -206
- package/dist/compact.runtime-CBfyBJbR.js +0 -7
- package/dist/compact.runtime.js +0 -1
- package/dist/completion-cli-COhEd9CF.js +0 -2
- package/dist/completion-cli-DHe4Rit5.js +0 -466
- package/dist/components-CamLdbbq.js +0 -797
- package/dist/components-DPbtLC3x.js +0 -2
- package/dist/config-CKJA2kAO.js +0 -53
- package/dist/config-D7-9dK3i.js +0 -138
- package/dist/config-DJ29sg5U.js +0 -475
- package/dist/config-DJNI2tTK.js +0 -136
- package/dist/config-Dr2GRT3y.js +0 -135
- package/dist/config-DsqKYjeo.js +0 -421
- package/dist/config-Q9kc32gz.js +0 -41
- package/dist/config-RUefx-_1.js +0 -8
- package/dist/config-cli-BqlYHmPA.js +0 -945
- package/dist/config-error-handler-BKRR0_j_.js +0 -197
- package/dist/config-error-handler-CT1igiX6.js +0 -2
- package/dist/config-eval-hTWq4IVy.js +0 -100
- package/dist/config-guard-Bk3_wSTH.js +0 -113
- package/dist/config-helpers-DLVbtn1B.js +0 -117
- package/dist/config-paths-BKYh__Ga.js +0 -8
- package/dist/config-paths-DP5yXXo2.js +0 -102
- package/dist/config-presence-omlqvhAQ.js +0 -79
- package/dist/config-regex-CvZFnWkO.js +0 -39
- package/dist/config-runtime-ngoccXmP.js +0 -13
- package/dist/config-schema-B3sQY5B_.js +0 -133
- package/dist/config-schema-B_2MhEQY.js +0 -71
- package/dist/config-schema-BpIXBNbc.js +0 -202
- package/dist/config-schema-BtfQOmdV.js +0 -115
- package/dist/config-schema-Bw-Xbo_T.js +0 -85
- package/dist/config-schema-Cqj-Mugi.js +0 -105
- package/dist/config-schema-DQSj_ZL_.js +0 -29
- package/dist/config-schema-Pe1Vn9kb.js +0 -17
- package/dist/config-schema-f7nntJMh.js +0 -25
- package/dist/config-schema-lBqODOnr.js +0 -25
- package/dist/config-schema-mfJ91WLf.js +0 -65
- package/dist/config-secret-input.runtime-B_HyRtgE.js +0 -3
- package/dist/config-secret-input.runtime.js +0 -1
- package/dist/config-state-DfIk9ME6.js +0 -289
- package/dist/config-status-Bnobp1-p.js +0 -2
- package/dist/config-status-Db93sFQB.js +0 -109
- package/dist/config-update-B_S0YQ_Y.js +0 -3
- package/dist/config-update-CK4EDDeD.js +0 -127
- package/dist/config-validation-Bh_sg7RW.js +0 -276
- package/dist/config-value-CMTdBw5q.js +0 -25
- package/dist/configure-CGDY1YR7.js +0 -1140
- package/dist/configure-V8jejRHr.js +0 -2
- package/dist/configured-provider-fallback-DWYDg0L7.js +0 -15
- package/dist/connection-auth-CKM60o55.js +0 -30
- package/dist/connection-details-DyVOoGG6.js +0 -56
- package/dist/constants-Bq55qi82.js +0 -71
- package/dist/constants-CimYBSye.js +0 -4
- package/dist/content-blocks-DuKJNUtm.js +0 -785
- package/dist/context-D-9a98Zk.js +0 -227
- package/dist/context-visibility-DTMZdcAH.js +0 -14
- package/dist/context-visibility-vOvLMUrZ.js +0 -35
- package/dist/context-window-guard-WE0ENAeQ.js +0 -46
- package/dist/control-ui-assets-DVYAF-2p.js +0 -240
- package/dist/control-ui-shared-BKXkFsA7.js +0 -29
- package/dist/conversation-binding-C2nuZ3Eg.js +0 -520
- package/dist/conversation-binding-input-CBwdWDC4.js +0 -250
- package/dist/conversation-bindings-Cq4z4vhr.js +0 -210
- package/dist/conversation-id-4JeHag0a.js +0 -168
- package/dist/conversation-id-CXuzm-Ub.js +0 -116
- package/dist/conversation-id-DCTwJCZF.js +0 -43
- package/dist/conversation-label-C2xTELop.js +0 -32
- package/dist/conversation-runtime-bArk0IjJ.js +0 -85
- package/dist/core-DaMVvavf.js +0 -195
- package/dist/core-api-D0U2iGRK.js +0 -670
- package/dist/core-command-descriptors-DxRm2H1p.js +0 -91
- package/dist/create-client-BOKOxyiu.js +0 -58
- package/dist/create-client-Bzn467Jo.js +0 -2
- package/dist/credentials-BGPs1gIX.js +0 -242
- package/dist/credentials-DUoYFiLk.js +0 -22
- package/dist/credentials-read-CDYtvkBt.js +0 -74
- package/dist/credentials-read-KB395CbD.js +0 -2
- package/dist/credentials-write.runtime-Bx7mKj4E.js +0 -9
- package/dist/credentials-write.runtime.js +0 -1
- package/dist/creds-files-CTtTs6zG.js +0 -19
- package/dist/cron-cli-Di3TakVa.js +0 -644
- package/dist/crypto-node.runtime-DI0fQ6wI.js +0 -5
- package/dist/crypto-node.runtime.js +0 -1
- package/dist/crypto-runtime-Bc-jKPlv.js +0 -1036
- package/dist/current-time--aIDbABZ.js +0 -20
- package/dist/daemon-cli-Cnry1ft1.js +0 -370
- package/dist/daemon-install-de_bWPuS.js +0 -63
- package/dist/daemon-install-plan.shared-u00bwv47.js +0 -222
- package/dist/daemon-runtime-DPejcJWG.js +0 -12
- package/dist/dangerous-name-matching-DnCDaXzP.js +0 -48
- package/dist/dangerous-name-runtime-Dinw00TZ.js +0 -1
- package/dist/dangerous-tools-C3RlQe7u.js +0 -38
- package/dist/date-time-DRQ0-oaw.js +0 -118
- package/dist/ddg-search-provider-B0zLjcDN.js +0 -182
- package/dist/dedupe-DZbQYOSD.js +0 -59
- package/dist/default-account-warnings-BCrmijcz.js +0 -15
- package/dist/default-models-Br0v8QOH.js +0 -35
- package/dist/defaults-DAt--D9n.js +0 -6
- package/dist/defaults-D_Y_lvUP.js +0 -7
- package/dist/defaults-MkMfnGzi.js +0 -7
- package/dist/delegate-CLP7zDS_.js +0 -43
- package/dist/deliver-CIUEKe4q.js +0 -954
- package/dist/deliver-LN-Yg8wS.js +0 -3
- package/dist/deliver-reply-DL-CSF43.js +0 -238
- package/dist/deliver-runtime-CoqXhxlS.js +0 -2
- package/dist/delivery-CL_3vFSl.js +0 -834
- package/dist/delivery-context-CoAL-jTI.js +0 -106
- package/dist/delivery-info-DTAUApso.js +0 -40
- package/dist/delivery-queue-DBW69jH4.js +0 -2
- package/dist/delivery-queue-DMubgaLa.js +0 -289
- package/dist/deps-34N0Nmbl.js +0 -67
- package/dist/deps-BVogrCia.js +0 -2
- package/dist/deps-DZJpA4XG.js +0 -153
- package/dist/detect-Zrcrs8SP.js +0 -12
- package/dist/detect-binary-CEX186X6.js +0 -30
- package/dist/device-auth-D_0GUMYY.js +0 -19
- package/dist/device-bootstrap-Bnn4K3fQ.js +0 -3
- package/dist/device-bootstrap-bwpHYQhY.js +0 -176
- package/dist/device-health-B3q7Cmqn.js +0 -2
- package/dist/device-health-DhmPD0gq.js +0 -16
- package/dist/device-identity-Cak311si.js +0 -2
- package/dist/device-identity-Doxo0HJx.js +0 -140
- package/dist/device-metadata-normalization-B5_zplC_.js +0 -21
- package/dist/device-pairing-BCpR-Vtb.js +0 -520
- package/dist/devices-cli-DYPkfzsG.js +0 -328
- package/dist/diagnostic-DfKz60Xk.js +0 -311
- package/dist/diagnostic-events-CUSmY-rn.js +0 -48
- package/dist/diagnostic-flags-DLDDycUv.js +0 -64
- package/dist/diagnostic-runtime-ZQC4AswI.js +0 -1
- package/dist/diagnostics-Cxl1bFGj.js +0 -33
- package/dist/diagnostics-GjF7wpY9.js +0 -2
- package/dist/diagnostics-otel-C2RQUlQT.js +0 -3
- package/dist/diffs-DsHt689X.js +0 -2
- package/dist/direct-dm-ByuWacLn.js +0 -139
- package/dist/direct-management-DEtuCcDL.js +0 -2
- package/dist/direct-management-DMp7MOnt.js +0 -300
- package/dist/direct-room-ARYWsCbX.js +0 -2
- package/dist/direct-room-DYlSJOU_.js +0 -67
- package/dist/directive-handling.defaults-BMh2DXTA.js +0 -19
- package/dist/directive-handling.fast-lane-CBX4jbax.js +0 -2
- package/dist/directive-handling.fast-lane-DRvycpgg.js +0 -64
- package/dist/directive-handling.impl-BKJf5Ltu.js +0 -672
- package/dist/directive-handling.impl-BkdGnm-T.js +0 -2
- package/dist/directive-handling.levels-BHOBnnn8.js +0 -2
- package/dist/directive-handling.levels-CecoBNlK.js +0 -12
- package/dist/directive-handling.parse-BuTiWmrT.js +0 -375
- package/dist/directive-handling.persist-D9RYevoA.js +0 -133
- package/dist/directive-handling.persist.runtime-Cb_unTVH.js +0 -2
- package/dist/directive-handling.persist.runtime.js +0 -1
- package/dist/directive-handling.shared-_Zvt3-ej.js +0 -158
- package/dist/directive-tags-Cm0H6Dn_.js +0 -109
- package/dist/directives-f-UxcP8D.js +0 -209
- package/dist/directory-cache-CM_EUchr.js +0 -62
- package/dist/directory-cli-D6N59tzr.js +0 -238
- package/dist/directory-config-helpers-BCrssKbI.js +0 -141
- package/dist/directory-runtime-CAabZ_XW.js +0 -20
- package/dist/directory.static-TKo2MeNR.js +0 -45
- package/dist/discord-BOpl5w4U.js +0 -5
- package/dist/discord-account-wyFuLDq_.js +0 -11
- package/dist/discord-core-BpzKxDZ7.js +0 -5
- package/dist/discord-lOPvIxp4.js +0 -11
- package/dist/discord-runtime-surface-Dm5WUtCV.js +0 -67
- package/dist/discord-session-key-DaPto1yr.js +0 -11
- package/dist/discord-surface-Cg_Mu9MI.js +0 -30
- package/dist/discord-thread-bindings-zIOp1Tj4.js +0 -29
- package/dist/discord-timeouts-Di5n5LAU.js +0 -12
- package/dist/discovery-DLbFJLD_.js +0 -171
- package/dist/dispatch-C4gGGYZt.js +0 -858
- package/dist/dispatch-acp.runtime-DUHj6bP-.js +0 -884
- package/dist/dispatch-acp.runtime.js +0 -1
- package/dist/dist-7JNqoGV7.js +0 -3
- package/dist/dist-BqJPEiV8.js +0 -14245
- package/dist/dist-DdE56Pmi.js +0 -503
- package/dist/dist-shQCTuJB.js +0 -1239
- package/dist/dm-policy-shared-C99GNVxp.js +0 -188
- package/dist/dns-cli-vQBAzTmg.js +0 -192
- package/dist/docker-BN7sQKCb.js +0 -789
- package/dist/docs-cli-Br6cfKoS.js +0 -156
- package/dist/doctor-completion-Cf0GcTXR.js +0 -90
- package/dist/doctor-config-preflight-C2cKYiKe.js +0 -2
- package/dist/doctor-config-preflight-DNbO-_N8.js +0 -148
- package/dist/doctor-state-migrations-BXkbeSFy.js +0 -2
- package/dist/doctor-state-migrations-G3shZ-W_.js +0 -3
- package/dist/dotenv-CelghjA4.js +0 -11
- package/dist/dotenv-Csg1Xj8n.js +0 -113
- package/dist/embedding-provider-Aey9VsDb.js +0 -129
- package/dist/enable-BgSxsKp_.js +0 -57
- package/dist/encryption-guidance-62xAQFP4.js +0 -33
- package/dist/entry-status-3ymZYX2l.js +0 -172
- package/dist/entry.js +0 -209
- package/dist/env-CK3eZNIX.js +0 -40
- package/dist/env-overrides-CcDOWo0Y.js +0 -346
- package/dist/env-overrides.runtime-CKb7-Q72.js +0 -7
- package/dist/env-overrides.runtime.js +0 -1
- package/dist/env-substitution-UhJwb0ys.js +0 -136
- package/dist/envelope-CrC9AdBL.js +0 -137
- package/dist/error-runtime-D-gKufd_.js +0 -2
- package/dist/error-text-BC9WfvfX.js +0 -24
- package/dist/errors-Bs2h5H8p.js +0 -71
- package/dist/errors-CjFsF-QY.js +0 -9
- package/dist/exa-web-search-provider-DUUlmDcV.js +0 -355
- package/dist/exec-BO6vYjRf.js +0 -368
- package/dist/exec-CD7C9g-b.js +0 -2
- package/dist/exec-approval-reply-CFOEcmIv.js +0 -189
- package/dist/exec-approval-session-target-BbsAlD1Q.js +0 -159
- package/dist/exec-approvals-3UDrE7Q9.js +0 -1565
- package/dist/exec-approvals-CW5axvaY.js +0 -121
- package/dist/exec-approvals-cli-BPYvtJv-.js +0 -483
- package/dist/exec-approvals-effective-DbLJfkpe.js +0 -140
- package/dist/exec-safe-bin-runtime-policy-218hHVyc.js +0 -90
- package/dist/exec-safety-XzKkUSvE.js +0 -24
- package/dist/export-html/template.css +0 -1060
- package/dist/export-html/template.html +0 -88
- package/dist/export-html/template.js +0 -1875
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/extension-shared-V_4IXpRU.js +0 -74
- package/dist/extensionAPI.js +0 -17
- package/dist/extensions/acpx/index.js +0 -1855
- package/dist/extensions/acpx/mcp-proxy.mjs +0 -151
- package/dist/extensions/acpx/openclaw.plugin.json +0 -132
- package/dist/extensions/acpx/package.json +0 -14
- package/dist/extensions/acpx/runtime-api.js +0 -5
- package/dist/extensions/acpx/skills/acp-router/SKILL.md +0 -245
- package/dist/extensions/aicq-chat/index.js +0 -284
- package/dist/extensions/aicq-chat/openclaw.plugin.json +0 -30
- package/dist/extensions/amazon-bedrock/api.js +0 -3
- package/dist/extensions/amazon-bedrock/discovery.js +0 -2
- package/dist/extensions/amazon-bedrock/index.js +0 -65
- package/dist/extensions/amazon-bedrock/openclaw.plugin.json +0 -44
- package/dist/extensions/amazon-bedrock/package.json +0 -23
- package/dist/extensions/anthropic/api.js +0 -3
- package/dist/extensions/anthropic/cli-backend.js +0 -2
- package/dist/extensions/anthropic/cli-migration.js +0 -2
- package/dist/extensions/anthropic/cli-shared.js +0 -2
- package/dist/extensions/anthropic/index.js +0 -357
- package/dist/extensions/anthropic/media-understanding-provider.js +0 -2
- package/dist/extensions/anthropic/openclaw.plugin.json +0 -64
- package/dist/extensions/anthropic/package.json +0 -12
- package/dist/extensions/anthropic/stream-wrappers.js +0 -2
- package/dist/extensions/anthropic/test-api.js +0 -2
- package/dist/extensions/anthropic-vertex/api.js +0 -4
- package/dist/extensions/anthropic-vertex/index.js +0 -36
- package/dist/extensions/anthropic-vertex/openclaw.plugin.json +0 -12
- package/dist/extensions/anthropic-vertex/package.json +0 -12
- package/dist/extensions/anthropic-vertex/provider-catalog.js +0 -2
- package/dist/extensions/anthropic-vertex/region.js +0 -2
- package/dist/extensions/bluebubbles/api.js +0 -5
- package/dist/extensions/bluebubbles/channel-config-api.js +0 -2
- package/dist/extensions/bluebubbles/index.js +0 -13
- package/dist/extensions/bluebubbles/openclaw.plugin.json +0 -11
- package/dist/extensions/bluebubbles/package.json +0 -48
- package/dist/extensions/bluebubbles/runtime-api.js +0 -2
- package/dist/extensions/bluebubbles/setup-entry.js +0 -26
- package/dist/extensions/brave/index.js +0 -13
- package/dist/extensions/brave/openclaw.plugin.json +0 -50
- package/dist/extensions/brave/package.json +0 -12
- package/dist/extensions/brave/test-api.js +0 -2
- package/dist/extensions/brave/web-search-provider.js +0 -2
- package/dist/extensions/browser/browser-runtime-api.js +0 -4
- package/dist/extensions/browser/index.js +0 -20
- package/dist/extensions/browser/openclaw.plugin.json +0 -9
- package/dist/extensions/browser/package.json +0 -12
- package/dist/extensions/browser/runtime-api.js +0 -6
- package/dist/extensions/browser/test-support.js +0 -50
- package/dist/extensions/byteplus/api.js +0 -3
- package/dist/extensions/byteplus/index.js +0 -63
- package/dist/extensions/byteplus/models.js +0 -2
- package/dist/extensions/byteplus/openclaw.plugin.json +0 -33
- package/dist/extensions/byteplus/package.json +0 -12
- package/dist/extensions/byteplus/provider-catalog.js +0 -2
- package/dist/extensions/chutes/api.js +0 -3
- package/dist/extensions/chutes/index.js +0 -143
- package/dist/extensions/chutes/models.js +0 -2
- package/dist/extensions/chutes/onboard.js +0 -3
- package/dist/extensions/chutes/openclaw.plugin.json +0 -44
- package/dist/extensions/chutes/package.json +0 -12
- package/dist/extensions/chutes/provider-catalog.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/api.js +0 -3
- package/dist/extensions/cloudflare-ai-gateway/index.js +0 -188
- package/dist/extensions/cloudflare-ai-gateway/models.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/onboard.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/openclaw.plugin.json +0 -33
- package/dist/extensions/cloudflare-ai-gateway/package.json +0 -12
- package/dist/extensions/copilot-proxy/index.js +0 -125
- package/dist/extensions/copilot-proxy/openclaw.plugin.json +0 -27
- package/dist/extensions/copilot-proxy/package.json +0 -12
- package/dist/extensions/copilot-proxy/runtime-api.js +0 -3
- package/dist/extensions/deepgram/audio.js +0 -2
- package/dist/extensions/deepgram/index.js +0 -13
- package/dist/extensions/deepgram/media-understanding-provider.js +0 -2
- package/dist/extensions/deepgram/openclaw.plugin.json +0 -13
- package/dist/extensions/deepgram/package.json +0 -12
- package/dist/extensions/deepseek/api.js +0 -3
- package/dist/extensions/deepseek/index.js +0 -33
- package/dist/extensions/deepseek/models.js +0 -2
- package/dist/extensions/deepseek/onboard.js +0 -2
- package/dist/extensions/deepseek/openclaw.plugin.json +0 -32
- package/dist/extensions/deepseek/package.json +0 -12
- package/dist/extensions/deepseek/provider-catalog.js +0 -2
- package/dist/extensions/device-pair/api.js +0 -10
- package/dist/extensions/device-pair/index.js +0 -483
- package/dist/extensions/device-pair/notify.js +0 -2
- package/dist/extensions/device-pair/openclaw.plugin.json +0 -21
- package/dist/extensions/device-pair/qr-image.js +0 -3
- package/dist/extensions/diagnostics-otel/api.js +0 -6
- package/dist/extensions/diagnostics-otel/index.js +0 -485
- package/dist/extensions/diagnostics-otel/openclaw.plugin.json +0 -8
- package/dist/extensions/diagnostics-otel/package.json +0 -27
- package/dist/extensions/diffs/api.js +0 -4
- package/dist/extensions/diffs/assets/viewer-runtime.js +0 -1888
- package/dist/extensions/diffs/index.js +0 -2058
- package/dist/extensions/diffs/openclaw.plugin.json +0 -226
- package/dist/extensions/diffs/package.json +0 -24
- package/dist/extensions/diffs/runtime-api.js +0 -3
- package/dist/extensions/diffs/skills/diffs/SKILL.md +0 -23
- package/dist/extensions/discord/action-runtime-api.js +0 -2
- package/dist/extensions/discord/api.js +0 -14
- package/dist/extensions/discord/channel-config-api.js +0 -2
- package/dist/extensions/discord/index.js +0 -612
- package/dist/extensions/discord/openclaw.plugin.json +0 -11
- package/dist/extensions/discord/package.json +0 -52
- package/dist/extensions/discord/runtime-api.js +0 -230
- package/dist/extensions/discord/session-key-api.js +0 -2
- package/dist/extensions/discord/setup-entry.js +0 -10
- package/dist/extensions/discord/test-api.js +0 -45
- package/dist/extensions/discord/timeouts.js +0 -2
- package/dist/extensions/duckduckgo/index.js +0 -13
- package/dist/extensions/duckduckgo/openclaw.plugin.json +0 -41
- package/dist/extensions/duckduckgo/package.json +0 -12
- package/dist/extensions/duckduckgo/web-search-provider.js +0 -2
- package/dist/extensions/elevenlabs/index.js +0 -13
- package/dist/extensions/elevenlabs/openclaw.plugin.json +0 -13
- package/dist/extensions/elevenlabs/package.json +0 -12
- package/dist/extensions/elevenlabs/speech-provider.js +0 -2
- package/dist/extensions/elevenlabs/test-api.js +0 -2
- package/dist/extensions/elevenlabs/tts.js +0 -2
- package/dist/extensions/exa/index.js +0 -13
- package/dist/extensions/exa/openclaw.plugin.json +0 -39
- package/dist/extensions/exa/package.json +0 -12
- package/dist/extensions/exa/web-search-provider.js +0 -2
- package/dist/extensions/fal/image-generation-provider.js +0 -2
- package/dist/extensions/fal/index.js +0 -45
- package/dist/extensions/fal/onboard.js +0 -2
- package/dist/extensions/fal/openclaw.plugin.json +0 -40
- package/dist/extensions/fal/package.json +0 -12
- package/dist/extensions/feishu/api.js +0 -7
- package/dist/extensions/feishu/index.js +0 -2531
- package/dist/extensions/feishu/openclaw.plugin.json +0 -14
- package/dist/extensions/feishu/package.json +0 -52
- package/dist/extensions/feishu/runtime-api.js +0 -34
- package/dist/extensions/feishu/session-key-api.js +0 -2
- package/dist/extensions/feishu/setup-api.js +0 -2
- package/dist/extensions/feishu/setup-entry.js +0 -6
- package/dist/extensions/feishu/skills/feishu-doc/SKILL.md +0 -211
- package/dist/extensions/feishu/skills/feishu-doc/references/block-types.md +0 -103
- package/dist/extensions/feishu/skills/feishu-drive/SKILL.md +0 -97
- package/dist/extensions/feishu/skills/feishu-perm/SKILL.md +0 -119
- package/dist/extensions/feishu/skills/feishu-wiki/SKILL.md +0 -111
- package/dist/extensions/firecrawl/api.js +0 -33
- package/dist/extensions/firecrawl/index.js +0 -184
- package/dist/extensions/firecrawl/openclaw.plugin.json +0 -87
- package/dist/extensions/firecrawl/package.json +0 -12
- package/dist/extensions/firecrawl/web-search-provider.js +0 -2
- package/dist/extensions/github-copilot/api.js +0 -2
- package/dist/extensions/github-copilot/index.js +0 -138
- package/dist/extensions/github-copilot/login.js +0 -2
- package/dist/extensions/github-copilot/models-defaults.js +0 -38
- package/dist/extensions/github-copilot/models.js +0 -2
- package/dist/extensions/github-copilot/openclaw.plugin.json +0 -31
- package/dist/extensions/github-copilot/package.json +0 -12
- package/dist/extensions/github-copilot/token.js +0 -3
- package/dist/extensions/github-copilot/usage.js +0 -2
- package/dist/extensions/google/api.js +0 -3
- package/dist/extensions/google/cli-backend.js +0 -2
- package/dist/extensions/google/gemini-cli-provider.js +0 -110
- package/dist/extensions/google/google-shared.test-helpers.js +0 -92
- package/dist/extensions/google/image-generation-provider.js +0 -162
- package/dist/extensions/google/index.js +0 -213
- package/dist/extensions/google/media-understanding-provider.js +0 -104
- package/dist/extensions/google/model-id.js +0 -2
- package/dist/extensions/google/oauth.credentials.js +0 -2
- package/dist/extensions/google/oauth.flow.js +0 -2
- package/dist/extensions/google/oauth.http.js +0 -2
- package/dist/extensions/google/oauth.js +0 -3
- package/dist/extensions/google/oauth.project.js +0 -2
- package/dist/extensions/google/oauth.runtime.js +0 -2
- package/dist/extensions/google/oauth.shared.js +0 -2
- package/dist/extensions/google/oauth.token.js +0 -2
- package/dist/extensions/google/openclaw.plugin.json +0 -89
- package/dist/extensions/google/package.json +0 -12
- package/dist/extensions/google/provider-models.js +0 -2
- package/dist/extensions/google/runtime-api.js +0 -4
- package/dist/extensions/google/test-api.js +0 -2
- package/dist/extensions/google/web-search-provider.js +0 -2
- package/dist/extensions/googlechat/api.js +0 -2
- package/dist/extensions/googlechat/channel-config-api.js +0 -7
- package/dist/extensions/googlechat/index.js +0 -13
- package/dist/extensions/googlechat/openclaw.plugin.json +0 -11
- package/dist/extensions/googlechat/package.json +0 -48
- package/dist/extensions/googlechat/runtime-api.js +0 -39
- package/dist/extensions/googlechat/setup-entry.js +0 -6
- package/dist/extensions/googlechat/test-api.js +0 -3
- package/dist/extensions/groq/index.js +0 -13
- package/dist/extensions/groq/media-understanding-provider.js +0 -2
- package/dist/extensions/groq/openclaw.plugin.json +0 -13
- package/dist/extensions/groq/package.json +0 -12
- package/dist/extensions/huggingface/api.js +0 -4
- package/dist/extensions/huggingface/index.js +0 -54
- package/dist/extensions/huggingface/models.js +0 -2
- package/dist/extensions/huggingface/onboard.js +0 -2
- package/dist/extensions/huggingface/openclaw.plugin.json +0 -34
- package/dist/extensions/huggingface/package.json +0 -12
- package/dist/extensions/huggingface/provider-catalog.js +0 -3
- package/dist/extensions/imessage/api.js +0 -4
- package/dist/extensions/imessage/channel-config-api.js +0 -2
- package/dist/extensions/imessage/index.js +0 -211
- package/dist/extensions/imessage/openclaw.plugin.json +0 -11
- package/dist/extensions/imessage/package.json +0 -26
- package/dist/extensions/imessage/runtime-api.js +0 -11
- package/dist/extensions/imessage/setup-entry.js +0 -13
- package/dist/extensions/irc/api.js +0 -2
- package/dist/extensions/irc/channel-config-api.js +0 -2
- package/dist/extensions/irc/index.js +0 -12
- package/dist/extensions/irc/openclaw.plugin.json +0 -11
- package/dist/extensions/irc/package.json +0 -28
- package/dist/extensions/irc/setup-entry.js +0 -6
- package/dist/extensions/kilocode/api.js +0 -3
- package/dist/extensions/kilocode/index.js +0 -37
- package/dist/extensions/kilocode/onboard.js +0 -3
- package/dist/extensions/kilocode/openclaw.plugin.json +0 -33
- package/dist/extensions/kilocode/package.json +0 -12
- package/dist/extensions/kilocode/provider-catalog.js +0 -2
- package/dist/extensions/kilocode/provider-models.js +0 -2
- package/dist/extensions/kilocode/shared.js +0 -2
- package/dist/extensions/kimi-coding/api.js +0 -3
- package/dist/extensions/kimi-coding/index.js +0 -81
- package/dist/extensions/kimi-coding/onboard.js +0 -2
- package/dist/extensions/kimi-coding/openclaw.plugin.json +0 -38
- package/dist/extensions/kimi-coding/package.json +0 -12
- package/dist/extensions/kimi-coding/provider-catalog.js +0 -2
- package/dist/extensions/kimi-coding/stream.js +0 -2
- package/dist/extensions/line/api.js +0 -13
- package/dist/extensions/line/index.js +0 -815
- package/dist/extensions/line/openclaw.plugin.json +0 -11
- package/dist/extensions/line/package.json +0 -41
- package/dist/extensions/line/runtime-api.js +0 -11
- package/dist/extensions/line/setup-api.js +0 -3
- package/dist/extensions/line/setup-entry.js +0 -15
- package/dist/extensions/litellm/api.js +0 -2
- package/dist/extensions/litellm/index.js +0 -36
- package/dist/extensions/litellm/onboard.js +0 -2
- package/dist/extensions/litellm/openclaw.plugin.json +0 -33
- package/dist/extensions/litellm/package.json +0 -12
- package/dist/extensions/litellm/provider-catalog.js +0 -2
- package/dist/extensions/llm-task/api.js +0 -6
- package/dist/extensions/llm-task/index.js +0 -156
- package/dist/extensions/llm-task/openclaw.plugin.json +0 -33
- package/dist/extensions/llm-task/package.json +0 -16
- package/dist/extensions/lobster/index.js +0 -232
- package/dist/extensions/lobster/openclaw.plugin.json +0 -10
- package/dist/extensions/lobster/package.json +0 -17
- package/dist/extensions/lobster/runtime-api.js +0 -4
- package/dist/extensions/matrix/api.js +0 -10
- package/dist/extensions/matrix/helper-api.js +0 -3
- package/dist/extensions/matrix/index.js +0 -44
- package/dist/extensions/matrix/legacy-crypto-inspector.js +0 -41
- package/dist/extensions/matrix/openclaw.plugin.json +0 -11
- package/dist/extensions/matrix/package.json +0 -53
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +0 -48
- package/dist/extensions/matrix/runtime-api.js +0 -25
- package/dist/extensions/matrix/setup-entry.js +0 -6
- package/dist/extensions/matrix/test-api.js +0 -3
- package/dist/extensions/matrix/thread-bindings-runtime.js +0 -2
- package/dist/extensions/mattermost/api.js +0 -2
- package/dist/extensions/mattermost/index.js +0 -15
- package/dist/extensions/mattermost/openclaw.plugin.json +0 -11
- package/dist/extensions/mattermost/package.json +0 -41
- package/dist/extensions/mattermost/runtime-api.js +0 -41
- package/dist/extensions/mattermost/setup-entry.js +0 -6
- package/dist/extensions/memory-core/api.js +0 -1
- package/dist/extensions/memory-core/index.js +0 -440
- package/dist/extensions/memory-core/openclaw.plugin.json +0 -9
- package/dist/extensions/memory-core/package.json +0 -23
- package/dist/extensions/memory-core/runtime-api.js +0 -3
- package/dist/extensions/memory-lancedb/api.js +0 -4
- package/dist/extensions/memory-lancedb/config.js +0 -2
- package/dist/extensions/memory-lancedb/index.js +0 -7037
- package/dist/extensions/memory-lancedb/lancedb-runtime.js +0 -2
- package/dist/extensions/memory-lancedb/openclaw.plugin.json +0 -92
- package/dist/extensions/memory-lancedb/package.json +0 -24
- package/dist/extensions/microsoft/index.js +0 -13
- package/dist/extensions/microsoft/openclaw.plugin.json +0 -13
- package/dist/extensions/microsoft/package.json +0 -15
- package/dist/extensions/microsoft/speech-provider.js +0 -2
- package/dist/extensions/microsoft/test-api.js +0 -2
- package/dist/extensions/microsoft/tts.js +0 -2
- package/dist/extensions/microsoft-foundry/auth.js +0 -2
- package/dist/extensions/microsoft-foundry/cli.js +0 -2
- package/dist/extensions/microsoft-foundry/index.js +0 -13
- package/dist/extensions/microsoft-foundry/onboard.js +0 -3
- package/dist/extensions/microsoft-foundry/openclaw.plugin.json +0 -39
- package/dist/extensions/microsoft-foundry/package.json +0 -12
- package/dist/extensions/microsoft-foundry/provider.js +0 -2
- package/dist/extensions/microsoft-foundry/runtime.js +0 -2
- package/dist/extensions/microsoft-foundry/shared-runtime.js +0 -3
- package/dist/extensions/microsoft-foundry/shared.js +0 -2
- package/dist/extensions/minimax/api.js +0 -6
- package/dist/extensions/minimax/image-generation-provider.js +0 -2
- package/dist/extensions/minimax/index.js +0 -219
- package/dist/extensions/minimax/media-understanding-provider.js +0 -2
- package/dist/extensions/minimax/model-definitions.js +0 -2
- package/dist/extensions/minimax/oauth.js +0 -2
- package/dist/extensions/minimax/oauth.runtime.js +0 -2
- package/dist/extensions/minimax/onboard.js +0 -2
- package/dist/extensions/minimax/openclaw.plugin.json +0 -98
- package/dist/extensions/minimax/package.json +0 -12
- package/dist/extensions/minimax/provider-catalog.js +0 -2
- package/dist/extensions/minimax/provider-models.js +0 -2
- package/dist/extensions/mistral/api.js +0 -5
- package/dist/extensions/mistral/index.js +0 -79
- package/dist/extensions/mistral/media-understanding-provider.js +0 -2
- package/dist/extensions/mistral/model-definitions.js +0 -2
- package/dist/extensions/mistral/onboard.js +0 -2
- package/dist/extensions/mistral/openclaw.plugin.json +0 -37
- package/dist/extensions/mistral/package.json +0 -12
- package/dist/extensions/mistral/provider-catalog.js +0 -2
- package/dist/extensions/modelstudio/api.js +0 -4
- package/dist/extensions/modelstudio/index.js +0 -111
- package/dist/extensions/modelstudio/model-definitions.js +0 -2
- package/dist/extensions/modelstudio/models.js +0 -2
- package/dist/extensions/modelstudio/onboard.js +0 -3
- package/dist/extensions/modelstudio/openclaw.plugin.json +0 -75
- package/dist/extensions/modelstudio/package.json +0 -12
- package/dist/extensions/modelstudio/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/api.js +0 -4
- package/dist/extensions/moonshot/index.js +0 -58
- package/dist/extensions/moonshot/media-understanding-provider.js +0 -2
- package/dist/extensions/moonshot/onboard.js +0 -2
- package/dist/extensions/moonshot/openclaw.plugin.json +0 -87
- package/dist/extensions/moonshot/package.json +0 -12
- package/dist/extensions/moonshot/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/test-api.js +0 -2
- package/dist/extensions/moonshot/web-search-provider.js +0 -2
- package/dist/extensions/msteams/api.js +0 -2
- package/dist/extensions/msteams/channel-config-api.js +0 -2
- package/dist/extensions/msteams/index.js +0 -13
- package/dist/extensions/msteams/openclaw.plugin.json +0 -11
- package/dist/extensions/msteams/package.json +0 -48
- package/dist/extensions/msteams/runtime-api.js +0 -47
- package/dist/extensions/msteams/setup-entry.js +0 -6
- package/dist/extensions/msteams/test-api.js +0 -2
- package/dist/extensions/nextcloud-talk/api.js +0 -2
- package/dist/extensions/nextcloud-talk/index.js +0 -12
- package/dist/extensions/nextcloud-talk/openclaw.plugin.json +0 -11
- package/dist/extensions/nextcloud-talk/package.json +0 -45
- package/dist/extensions/nextcloud-talk/runtime-api.js +0 -35
- package/dist/extensions/nextcloud-talk/setup-entry.js +0 -6
- package/dist/extensions/nostr/api.js +0 -15
- package/dist/extensions/nostr/index.js +0 -559
- package/dist/extensions/nostr/openclaw.plugin.json +0 -11
- package/dist/extensions/nostr/package.json +0 -44
- package/dist/extensions/nostr/runtime-api.js +0 -15
- package/dist/extensions/nostr/setup-api.js +0 -2
- package/dist/extensions/nostr/setup-entry.js +0 -6
- package/dist/extensions/nostr/test-api.js +0 -2
- package/dist/extensions/nvidia/api.js +0 -2
- package/dist/extensions/nvidia/index.js +0 -16
- package/dist/extensions/nvidia/openclaw.plugin.json +0 -17
- package/dist/extensions/nvidia/package.json +0 -12
- package/dist/extensions/nvidia/provider-catalog.js +0 -2
- package/dist/extensions/ollama/api.js +0 -3
- package/dist/extensions/ollama/index.js +0 -139
- package/dist/extensions/ollama/openclaw.plugin.json +0 -29
- package/dist/extensions/ollama/package.json +0 -12
- package/dist/extensions/ollama/runtime-api.js +0 -3
- package/dist/extensions/open-prose/index.js +0 -10
- package/dist/extensions/open-prose/openclaw.plugin.json +0 -13
- package/dist/extensions/open-prose/package.json +0 -12
- package/dist/extensions/open-prose/runtime-api.js +0 -3
- package/dist/extensions/open-prose/skills/prose/LICENSE +0 -21
- package/dist/extensions/open-prose/skills/prose/SKILL.md +0 -323
- package/dist/extensions/open-prose/skills/prose/alt-borges.md +0 -141
- package/dist/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -229
- package/dist/extensions/open-prose/skills/prose/alts/borges.md +0 -360
- package/dist/extensions/open-prose/skills/prose/alts/folk.md +0 -322
- package/dist/extensions/open-prose/skills/prose/alts/homer.md +0 -217
- package/dist/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
- package/dist/extensions/open-prose/skills/prose/alts/shared-appendix.md +0 -35
- package/dist/extensions/open-prose/skills/prose/compiler.md +0 -2971
- package/dist/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
- package/dist/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
- package/dist/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
- package/dist/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
- package/dist/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
- package/dist/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
- package/dist/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
- package/dist/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
- package/dist/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
- package/dist/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
- package/dist/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
- package/dist/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
- package/dist/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
- package/dist/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
- package/dist/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
- package/dist/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
- package/dist/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
- package/dist/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
- package/dist/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
- package/dist/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
- package/dist/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
- package/dist/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
- package/dist/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
- package/dist/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
- package/dist/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
- package/dist/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
- package/dist/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
- package/dist/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
- package/dist/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
- package/dist/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
- package/dist/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
- package/dist/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
- package/dist/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
- package/dist/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
- package/dist/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
- package/dist/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
- package/dist/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
- package/dist/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
- package/dist/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
- package/dist/extensions/open-prose/skills/prose/examples/README.md +0 -391
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
- package/dist/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
- package/dist/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
- package/dist/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
- package/dist/extensions/open-prose/skills/prose/help.md +0 -144
- package/dist/extensions/open-prose/skills/prose/lib/README.md +0 -108
- package/dist/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
- package/dist/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
- package/dist/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
- package/dist/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
- package/dist/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
- package/dist/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
- package/dist/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
- package/dist/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
- package/dist/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
- package/dist/extensions/open-prose/skills/prose/primitives/session.md +0 -593
- package/dist/extensions/open-prose/skills/prose/prose.md +0 -1237
- package/dist/extensions/open-prose/skills/prose/state/filesystem.md +0 -498
- package/dist/extensions/open-prose/skills/prose/state/in-context.md +0 -384
- package/dist/extensions/open-prose/skills/prose/state/postgres.md +0 -880
- package/dist/extensions/open-prose/skills/prose/state/sqlite.md +0 -531
- package/dist/extensions/openai/api.js +0 -4
- package/dist/extensions/openai/cli-backend.js +0 -2
- package/dist/extensions/openai/default-models.js +0 -2
- package/dist/extensions/openai/image-generation-provider.js +0 -2
- package/dist/extensions/openai/index.js +0 -24
- package/dist/extensions/openai/media-understanding-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-auth-identity.js +0 -2
- package/dist/extensions/openai/openai-codex-catalog.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.runtime.js +0 -14
- package/dist/extensions/openai/openai-provider.js +0 -2
- package/dist/extensions/openai/openclaw.plugin.json +0 -61
- package/dist/extensions/openai/package.json +0 -12
- package/dist/extensions/openai/shared.js +0 -4
- package/dist/extensions/openai/speech-provider.js +0 -2
- package/dist/extensions/openai/test-api.js +0 -5
- package/dist/extensions/openai/tts.js +0 -2
- package/dist/extensions/opencode/api.js +0 -3
- package/dist/extensions/opencode/index.js +0 -63
- package/dist/extensions/opencode/onboard.js +0 -2
- package/dist/extensions/opencode/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode/package.json +0 -12
- package/dist/extensions/opencode-go/api.js +0 -3
- package/dist/extensions/opencode-go/index.js +0 -54
- package/dist/extensions/opencode-go/onboard.js +0 -2
- package/dist/extensions/opencode-go/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode-go/package.json +0 -12
- package/dist/extensions/openrouter/api.js +0 -3
- package/dist/extensions/openrouter/index.js +0 -121
- package/dist/extensions/openrouter/media-understanding-provider.js +0 -2
- package/dist/extensions/openrouter/onboard.js +0 -2
- package/dist/extensions/openrouter/openclaw.plugin.json +0 -37
- package/dist/extensions/openrouter/package.json +0 -12
- package/dist/extensions/openrouter/provider-catalog.js +0 -2
- package/dist/extensions/openshell/index.js +0 -919
- package/dist/extensions/openshell/openclaw.plugin.json +0 -118
- package/dist/extensions/openshell/package.json +0 -12
- package/dist/extensions/perplexity/index.js +0 -13
- package/dist/extensions/perplexity/openclaw.plugin.json +0 -54
- package/dist/extensions/perplexity/package.json +0 -12
- package/dist/extensions/perplexity/test-api.js +0 -2
- package/dist/extensions/perplexity/web-search-provider.js +0 -2
- package/dist/extensions/phone-control/index.js +0 -283
- package/dist/extensions/phone-control/openclaw.plugin.json +0 -11
- package/dist/extensions/phone-control/runtime-api.js +0 -3
- package/dist/extensions/qianfan/api.js +0 -3
- package/dist/extensions/qianfan/index.js +0 -26
- package/dist/extensions/qianfan/onboard.js +0 -2
- package/dist/extensions/qianfan/openclaw.plugin.json +0 -32
- package/dist/extensions/qianfan/package.json +0 -12
- package/dist/extensions/qianfan/provider-catalog.js +0 -2
- package/dist/extensions/qqbot/api.js +0 -173
- package/dist/extensions/qqbot/index.js +0 -445
- package/dist/extensions/qqbot/openclaw.plugin.json +0 -257
- package/dist/extensions/qqbot/package.json +0 -52
- package/dist/extensions/qqbot/runtime-api.js +0 -2
- package/dist/extensions/qqbot/setup-entry.js +0 -6
- package/dist/extensions/qqbot/skills/qqbot-channel/SKILL.md +0 -262
- package/dist/extensions/qqbot/skills/qqbot-channel/references/api_references.md +0 -521
- package/dist/extensions/qqbot/skills/qqbot-media/SKILL.md +0 -36
- package/dist/extensions/qqbot/skills/qqbot-remind/SKILL.md +0 -149
- package/dist/extensions/searxng/index.js +0 -13
- package/dist/extensions/searxng/openclaw.plugin.json +0 -46
- package/dist/extensions/searxng/package.json +0 -12
- package/dist/extensions/searxng/web-search-provider.js +0 -2
- package/dist/extensions/sglang/api.js +0 -4
- package/dist/extensions/sglang/defaults.js +0 -2
- package/dist/extensions/sglang/index.js +0 -77
- package/dist/extensions/sglang/models.js +0 -2
- package/dist/extensions/sglang/openclaw.plugin.json +0 -29
- package/dist/extensions/sglang/package.json +0 -12
- package/dist/extensions/signal/api.js +0 -7
- package/dist/extensions/signal/channel-config-api.js +0 -2
- package/dist/extensions/signal/index.js +0 -319
- package/dist/extensions/signal/openclaw.plugin.json +0 -11
- package/dist/extensions/signal/package.json +0 -24
- package/dist/extensions/signal/reaction-runtime-api.js +0 -2
- package/dist/extensions/signal/runtime-api.js +0 -24
- package/dist/extensions/signal/setup-entry.js +0 -13
- package/dist/extensions/signal/test-api.js +0 -111
- package/dist/extensions/slack/api.js +0 -10
- package/dist/extensions/slack/channel-config-api.js +0 -2
- package/dist/extensions/slack/index.js +0 -12
- package/dist/extensions/slack/openclaw.plugin.json +0 -11
- package/dist/extensions/slack/package.json +0 -31
- package/dist/extensions/slack/runtime-api.js +0 -110
- package/dist/extensions/slack/setup-entry.js +0 -12
- package/dist/extensions/slack/test-api.js +0 -47
- package/dist/extensions/stepfun/index.js +0 -163
- package/dist/extensions/stepfun/onboard.js +0 -3
- package/dist/extensions/stepfun/openclaw.plugin.json +0 -83
- package/dist/extensions/stepfun/package.json +0 -12
- package/dist/extensions/stepfun/provider-catalog.js +0 -2
- package/dist/extensions/synology-chat/index.js +0 -12
- package/dist/extensions/synology-chat/openclaw.plugin.json +0 -11
- package/dist/extensions/synology-chat/package.json +0 -26
- package/dist/extensions/synology-chat/setup-api.js +0 -2
- package/dist/extensions/synology-chat/setup-entry.js +0 -6
- package/dist/extensions/synthetic/api.js +0 -4
- package/dist/extensions/synthetic/index.js +0 -27
- package/dist/extensions/synthetic/models.js +0 -2
- package/dist/extensions/synthetic/onboard.js +0 -3
- package/dist/extensions/synthetic/openclaw.plugin.json +0 -32
- package/dist/extensions/synthetic/package.json +0 -12
- package/dist/extensions/synthetic/provider-catalog.js +0 -2
- package/dist/extensions/talk-voice/api.js +0 -3
- package/dist/extensions/talk-voice/index.js +0 -160
- package/dist/extensions/talk-voice/openclaw.plugin.json +0 -11
- package/dist/extensions/tavily/index.js +0 -128
- package/dist/extensions/tavily/openclaw.plugin.json +0 -53
- package/dist/extensions/tavily/package.json +0 -12
- package/dist/extensions/tavily/skills/tavily/SKILL.md +0 -94
- package/dist/extensions/tavily/web-search-provider.js +0 -2
- package/dist/extensions/telegram/allow-from.js +0 -2
- package/dist/extensions/telegram/api.js +0 -14
- package/dist/extensions/telegram/channel-config-api.js +0 -2
- package/dist/extensions/telegram/index.js +0 -12
- package/dist/extensions/telegram/openclaw.plugin.json +0 -11
- package/dist/extensions/telegram/package.json +0 -37
- package/dist/extensions/telegram/runtime-api.js +0 -25
- package/dist/extensions/telegram/session-key-api.js +0 -2
- package/dist/extensions/telegram/setup-entry.js +0 -13
- package/dist/extensions/telegram/test-api.js +0 -88
- package/dist/extensions/telegram/test-support.js +0 -46
- package/dist/extensions/telegram/update-offset-runtime-api.js +0 -2
- package/dist/extensions/thread-ownership/api.js +0 -5
- package/dist/extensions/thread-ownership/index.js +0 -82
- package/dist/extensions/thread-ownership/openclaw.plugin.json +0 -30
- package/dist/extensions/tlon/api.js +0 -14
- package/dist/extensions/tlon/index.js +0 -150
- package/dist/extensions/tlon/openclaw.plugin.json +0 -12
- package/dist/extensions/tlon/package.json +0 -44
- package/dist/extensions/tlon/runtime-api.js +0 -14
- package/dist/extensions/tlon/setup-api.js +0 -3
- package/dist/extensions/tlon/setup-entry.js +0 -6
- package/dist/extensions/tlon/test-api.js +0 -2
- package/dist/extensions/together/api.js +0 -3
- package/dist/extensions/together/index.js +0 -26
- package/dist/extensions/together/models.js +0 -2
- package/dist/extensions/together/onboard.js +0 -2
- package/dist/extensions/together/openclaw.plugin.json +0 -32
- package/dist/extensions/together/package.json +0 -12
- package/dist/extensions/together/provider-catalog.js +0 -2
- package/dist/extensions/twitch/api.js +0 -9
- package/dist/extensions/twitch/index.js +0 -1090
- package/dist/extensions/twitch/openclaw.plugin.json +0 -11
- package/dist/extensions/twitch/package.json +0 -29
- package/dist/extensions/twitch/runtime-api.js +0 -9
- package/dist/extensions/venice/api.js +0 -3
- package/dist/extensions/venice/index.js +0 -55
- package/dist/extensions/venice/models.js +0 -2
- package/dist/extensions/venice/onboard.js +0 -3
- package/dist/extensions/venice/openclaw.plugin.json +0 -32
- package/dist/extensions/venice/package.json +0 -12
- package/dist/extensions/venice/provider-catalog.js +0 -2
- package/dist/extensions/vercel-ai-gateway/api.js +0 -4
- package/dist/extensions/vercel-ai-gateway/index.js +0 -30
- package/dist/extensions/vercel-ai-gateway/models.js +0 -2
- package/dist/extensions/vercel-ai-gateway/onboard.js +0 -2
- package/dist/extensions/vercel-ai-gateway/openclaw.plugin.json +0 -32
- package/dist/extensions/vercel-ai-gateway/package.json +0 -12
- package/dist/extensions/vercel-ai-gateway/provider-catalog.js +0 -2
- package/dist/extensions/vllm/api.js +0 -4
- package/dist/extensions/vllm/defaults.js +0 -2
- package/dist/extensions/vllm/index.js +0 -78
- package/dist/extensions/vllm/models.js +0 -2
- package/dist/extensions/vllm/openclaw.plugin.json +0 -29
- package/dist/extensions/vllm/package.json +0 -12
- package/dist/extensions/voice-call/api.js +0 -7
- package/dist/extensions/voice-call/index.js +0 -698
- package/dist/extensions/voice-call/openclaw.plugin.json +0 -700
- package/dist/extensions/voice-call/package.json +0 -33
- package/dist/extensions/voice-call/runtime-api.js +0 -7
- package/dist/extensions/voice-call/runtime-entry.js +0 -2
- package/dist/extensions/volcengine/api.js +0 -3
- package/dist/extensions/volcengine/index.js +0 -63
- package/dist/extensions/volcengine/models.js +0 -2
- package/dist/extensions/volcengine/openclaw.plugin.json +0 -33
- package/dist/extensions/volcengine/package.json +0 -12
- package/dist/extensions/volcengine/provider-catalog.js +0 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +0 -2
- package/dist/extensions/whatsapp/action-runtime.runtime.js +0 -2
- package/dist/extensions/whatsapp/api.js +0 -8
- package/dist/extensions/whatsapp/auth-presence.js +0 -2
- package/dist/extensions/whatsapp/channel-config-api.js +0 -2
- package/dist/extensions/whatsapp/constants.js +0 -2
- package/dist/extensions/whatsapp/index.js +0 -12
- package/dist/extensions/whatsapp/light-runtime-api.js +0 -5
- package/dist/extensions/whatsapp/login-qr-api.js +0 -2
- package/dist/extensions/whatsapp/openclaw.plugin.json +0 -11
- package/dist/extensions/whatsapp/package.json +0 -45
- package/dist/extensions/whatsapp/runtime-api.js +0 -334
- package/dist/extensions/whatsapp/setup-entry.js +0 -23
- package/dist/extensions/whatsapp/test-api.js +0 -76
- package/dist/extensions/xai/api.js +0 -6
- package/dist/extensions/xai/code-execution.js +0 -2
- package/dist/extensions/xai/index.js +0 -122
- package/dist/extensions/xai/model-definitions.js +0 -2
- package/dist/extensions/xai/model-id.js +0 -2
- package/dist/extensions/xai/onboard.js +0 -2
- package/dist/extensions/xai/openclaw.plugin.json +0 -157
- package/dist/extensions/xai/package.json +0 -12
- package/dist/extensions/xai/provider-catalog.js +0 -2
- package/dist/extensions/xai/provider-models.js +0 -2
- package/dist/extensions/xai/stream.js +0 -2
- package/dist/extensions/xai/web-search.js +0 -2
- package/dist/extensions/xai/x-search.js +0 -2
- package/dist/extensions/xiaomi/api.js +0 -3
- package/dist/extensions/xiaomi/index.js +0 -37
- package/dist/extensions/xiaomi/onboard.js +0 -2
- package/dist/extensions/xiaomi/openclaw.plugin.json +0 -32
- package/dist/extensions/xiaomi/package.json +0 -12
- package/dist/extensions/xiaomi/provider-catalog.js +0 -2
- package/dist/extensions/zai/api.js +0 -3
- package/dist/extensions/zai/detect.js +0 -2
- package/dist/extensions/zai/index.js +0 -239
- package/dist/extensions/zai/media-understanding-provider.js +0 -2
- package/dist/extensions/zai/model-definitions.js +0 -2
- package/dist/extensions/zai/onboard.js +0 -2
- package/dist/extensions/zai/openclaw.plugin.json +0 -94
- package/dist/extensions/zai/package.json +0 -12
- package/dist/extensions/zai/runtime-api.js +0 -3
- package/dist/extensions/zalo/api.js +0 -3
- package/dist/extensions/zalo/index.js +0 -13
- package/dist/extensions/zalo/openclaw.plugin.json +0 -11
- package/dist/extensions/zalo/package.json +0 -47
- package/dist/extensions/zalo/runtime-api.js +0 -38
- package/dist/extensions/zalo/setup-entry.js +0 -6
- package/dist/extensions/zalo/test-api.js +0 -2
- package/dist/extensions/zalouser/api.js +0 -2
- package/dist/extensions/zalouser/index.js +0 -599
- package/dist/extensions/zalouser/openclaw.plugin.json +0 -11
- package/dist/extensions/zalouser/package.json +0 -48
- package/dist/extensions/zalouser/runtime-api.js +0 -30
- package/dist/extensions/zalouser/setup-entry.js +0 -13
- package/dist/extensions/zalouser/test-api.js +0 -5
- package/dist/external-content-DtoRY-d1.js +0 -242
- package/dist/facade-runtime-Bpi4Gy-u.js +0 -263
- package/dist/failover-error-BrdBIFg2.js +0 -180
- package/dist/feishu-81Iv8tqF.js +0 -18
- package/dist/feishu-conversation-NmEqAxSA.js +0 -17
- package/dist/feishu-setup-DXAK6GqE.js +0 -12
- package/dist/fetch-7dbKQPT5.js +0 -256
- package/dist/fetch-BjiGl865.js +0 -418
- package/dist/fetch-Bp23aO5S.js +0 -65
- package/dist/fetch-guard-BnhVFBtf.js +0 -150
- package/dist/fetch-mock-WghRRNpK.js +0 -6
- package/dist/fetch-runtime-DfFmkkZH.js +0 -4
- package/dist/fetch-timeout-BKMGkHu9.js +0 -58
- package/dist/file-identity-DPm-6kp0.js +0 -567
- package/dist/file-lock-CH0V9dhL.js +0 -141
- package/dist/file-lock-D292sbfa.js +0 -2
- package/dist/firecrawl-client-GOGPuEeg.js +0 -338
- package/dist/firecrawl-search-provider-ptp7GNAt.js +0 -47
- package/dist/format-BwzSM9vY.js +0 -24
- package/dist/format-D38w0aKT.js +0 -817
- package/dist/format-DCFsK8oa.js +0 -19
- package/dist/format-datetime-Bl6-b7G1.js +0 -73
- package/dist/format-duration-DqcpDYkZ.js +0 -57
- package/dist/format-relative-CYrRyrT7.js +0 -54
- package/dist/frontmatter-Ba2Hn11b.js +0 -45
- package/dist/frontmatter-Cjxy4vX8.js +0 -210
- package/dist/fs-safe-BQ59ttjX.js +0 -999
- package/dist/gateway-CWPyH-P7.js +0 -2575
- package/dist/gateway-cli-BmPBPCcJ.js +0 -1572
- package/dist/gateway-discovery-targets--oNzWOVw.js +0 -430
- package/dist/gateway-install-token-tyQyR2ED.js +0 -230
- package/dist/gateway-lock-BbUQuUet.js +0 -292
- package/dist/gateway-presence-BVCIm1hy.js +0 -15
- package/dist/gateway-registry-tQcIThkV.js +0 -74
- package/dist/gateway-rpc-BXdoSPN7.js +0 -26
- package/dist/gateway-runtime-C7EhkU_c.js +0 -12
- package/dist/gaxios-fetch-compat-D4gl5582.js +0 -180
- package/dist/gemini-auth-Dlpcd9MB.js +0 -29
- package/dist/gemini-web-search-provider-CkNEl2du.js +0 -162
- package/dist/get-reply-from-config.runtime-vBmBttxw.js +0 -2
- package/dist/get-reply-from-config.runtime.js +0 -1
- package/dist/git-commit-BS28SZVT.js +0 -2
- package/dist/git-commit-ChiOoWyK.js +0 -177
- package/dist/github-copilot-login-B8s4OVQ4.js +0 -11
- package/dist/github-copilot-token-BwXtH-ZJ.js +0 -2
- package/dist/github-copilot-token-D81Wvm8b.js +0 -2
- package/dist/github-copilot-token-beHjQGOp.js +0 -91
- package/dist/global-singleton-54zT3rCn.js +0 -13
- package/dist/global-singleton-iOq2_-p8.js +0 -1
- package/dist/global-state-DUuMGgts.js +0 -17
- package/dist/globals-CDtV0ht8.js +0 -25
- package/dist/gmail-setup-utils-CxXfU7cy.js +0 -421
- package/dist/google-Cx1_z3Q3.js +0 -24
- package/dist/googlechat-CoiMNDC2.js +0 -37
- package/dist/graph-users-BmZWavVH.js +0 -917
- package/dist/group-access-BZZ3FNmb.js +0 -32
- package/dist/group-access-BjveEAjz.js +0 -113
- package/dist/group-access-owHLoCWX.js +0 -119
- package/dist/group-activation-ClEb7qwj.js +0 -22
- package/dist/group-id-CcsUNOct.js +0 -11
- package/dist/group-policy-Bb8dxOpM.js +0 -25
- package/dist/group-policy-G9GcSyph.js +0 -201
- package/dist/group-policy-wS9F8Y_i.js +0 -51
- package/dist/group-policy-warnings-CL2gHsXM.js +0 -196
- package/dist/groups.runtime-K758xQFV.js +0 -6
- package/dist/groups.runtime.js +0 -1
- package/dist/handle-action-CE4vpa7G.js +0 -500
- package/dist/health-D_KQbqQY.js +0 -577
- package/dist/health-a1VPtSyV.js +0 -2
- package/dist/health-format-COR93f8W.js +0 -26
- package/dist/heartbeat-C_TrErgd.js +0 -122
- package/dist/heartbeat-reply-payload-C7Ac3fOZ.js +0 -13
- package/dist/heartbeat-summary-v5gPj5bd.js +0 -57
- package/dist/heartbeat-visibility-CHMO4pmJ.js +0 -102
- package/dist/help-CyR1Oo4X.js +0 -81
- package/dist/help-format-l1phKNA8.js +0 -15
- package/dist/helpers-COHnQbWX.js +0 -32
- package/dist/helpers-DNpD7VMo.js +0 -24
- package/dist/history-B4mW8GfY.js +0 -102
- package/dist/home-dir-n9onX5PG.js +0 -83
- package/dist/hook-runner-global-C9GhdBtf.js +0 -632
- package/dist/hook-runner-global-Cr_Pthp4.js +0 -2
- package/dist/hook-runtime-DK8QF-2x.js +0 -3
- package/dist/hooks-cli-XCo-7nz9.js +0 -353
- package/dist/hooks-policy-BmULXBcp.js +0 -20
- package/dist/hooks-status-D_ZxRD0H.js +0 -86
- package/dist/host-env-security-SlXI58bc.js +0 -290
- package/dist/host-runtime-BGHb06HN.js +0 -1
- package/dist/hostname-BRYLr_mh.js +0 -8
- package/dist/http-body-CfdQSEp0.js +0 -238
- package/dist/http-client-_3i4-nw5.js +0 -294
- package/dist/http-registry-ZGSBfYSe.js +0 -54
- package/dist/http-route-overlap-C8lbolN5.js +0 -101
- package/dist/identity-BoQQh6Y8.js +0 -26
- package/dist/identity-D64Wfv_s.js +0 -29
- package/dist/identity-DvwF6Yix.js +0 -84
- package/dist/identity-avatar-DPBgVwpU.js +0 -86
- package/dist/identity-file-BtIJI4dn.js +0 -60
- package/dist/image-C4V19x9x.js +0 -152
- package/dist/image-generation-BbOnazXi.js +0 -1
- package/dist/image-generation-provider-CQK8HA0O.js +0 -136
- package/dist/image-generation-provider-CWUvRxmv.js +0 -131
- package/dist/image-generation-provider-F2sfNjcr.js +0 -281
- package/dist/image-ops-BJKjhMAu.js +0 -476
- package/dist/image-runtime-DodXcK2e.js +0 -7
- package/dist/imessage-2ukkzufG.js +0 -19
- package/dist/inbound-context-Cxvd3JHZ.js +0 -59
- package/dist/inbound-context-Czd3FdNb.js +0 -52
- package/dist/inbound-debounce-CI7l3R36.js +0 -159
- package/dist/inbound-envelope-LyHTUTue.js +0 -61
- package/dist/inbound-reply-dispatch-BdeY6N-k.js +0 -73
- package/dist/inbound-text-CacimZtw.js +0 -14
- package/dist/inbound.runtime-CqX3n132.js +0 -3
- package/dist/inbound.runtime.js +0 -1
- package/dist/includes-Ccr-Q5DB.js +0 -188
- package/dist/includes-scan-DVvYLj4S.js +0 -55
- package/dist/index.js +0 -56
- package/dist/infra/warning-filter.js +0 -2
- package/dist/infra-runtime-Cl0iZpRS.js +0 -22
- package/dist/input-files-PZC6ZR4W.js +0 -251
- package/dist/input-provenance-8GBFuk0Q.js +0 -44
- package/dist/inspect-B8dw6NVJ.js +0 -286
- package/dist/install-Bk7XyvtC.js +0 -590
- package/dist/install-package-dir-C2ba2toB.js +0 -284
- package/dist/install-safe-path-CkCd0rWS.js +0 -69
- package/dist/install-security-scan-C02VaEU9.js +0 -22
- package/dist/install-security-scan.runtime-CDUuS6Dl.js +0 -299
- package/dist/install-security-scan.runtime.js +0 -1
- package/dist/install-source-utils-2tdWQmwI.js +0 -167
- package/dist/install-target-CBNysuiP.js +0 -175
- package/dist/install.runtime-D_zKCpnB.js +0 -11
- package/dist/install.runtime-DjQozvMe.js +0 -27
- package/dist/install.runtime.js +0 -1
- package/dist/installs-BnAbQ70v.js +0 -28
- package/dist/interactive-CEnsu1RT.js +0 -8
- package/dist/interactive-runtime-Bxq5ztle.js +0 -1
- package/dist/internal-Lk0wFTNq.js +0 -411
- package/dist/internal-hooks-C3ziA7w_.js +0 -155
- package/dist/io-BUxKr33U.js +0 -2236
- package/dist/io-BuMkfjp3.js +0 -4
- package/dist/ip-BZP18dDl.js +0 -208
- package/dist/ipv4-Xiyu1rvD.js +0 -82
- package/dist/irc-DXfYh-Sd.js +0 -14
- package/dist/irc-surface-Di-joPuc.js +0 -15
- package/dist/is-main-Bv5ej4lF.js +0 -27
- package/dist/issue-format-8Eylt-2O.js +0 -2
- package/dist/issue-format-DLZczJ0U.js +0 -31
- package/dist/json-file-5xJqyXrK.js +0 -23
- package/dist/json-files-C4lsZ_HR.js +0 -72
- package/dist/json-mode-4O1xL2fT.js +0 -34
- package/dist/json-pointer-C30cknnZ.js +0 -43
- package/dist/json-store-FUgu1pyj.js +0 -37
- package/dist/keyed-async-queue-BTOTBE8n.js +0 -32
- package/dist/kill-tree-CIfAbzdN.js +0 -2
- package/dist/kill-tree-CUPpLbeq.js +0 -82
- package/dist/kimi-web-search-provider-Cb3F9_Da.js +0 -224
- package/dist/known-users-DjerpGCB.js +0 -167
- package/dist/lancedb-runtime-DTb_mDUG.js +0 -201
- package/dist/launchd-cp98MUhz.js +0 -517
- package/dist/lazy-runtime-C6LCAM-L.js +0 -29
- package/dist/lazy-runtime-yh_WT4on.js +0 -1
- package/dist/lazy-service-module-CeifO9oo.js +0 -24
- package/dist/legacy-crypto-restore-CsHmLVjY.js +0 -85
- package/dist/legacy-names-CFo8Oe-2.js +0 -9
- package/dist/legacy-web-search-Bn8F2jrN.js +0 -140
- package/dist/legacy.shared-oZM32end.js +0 -45
- package/dist/level-overrides-gqc8xfh2.js +0 -36
- package/dist/library-ChjjeniJ.js +0 -44
- package/dist/lifecycle-core-Ce_ZEvjl.js +0 -402
- package/dist/line-Be0jY3CU.js +0 -4
- package/dist/line-runtime-B0ZGTK81.js +0 -60
- package/dist/line-surface-BTopinac.js +0 -27
- package/dist/links-D7o22Ygt.js +0 -17
- package/dist/listeners-_47QWN8-.js +0 -14
- package/dist/llm-slug-generator-Dv-sLOW9.js +0 -68
- package/dist/llm-slug-generator.js +0 -2
- package/dist/llm-task-BDA3i86A.js +0 -3
- package/dist/load-BXSzQ8YA.js +0 -28
- package/dist/load-options-BqszWkkN.js +0 -36
- package/dist/loader-DsZDoLQ6.js +0 -2519
- package/dist/local-file-access-PajXzDdK.js +0 -49
- package/dist/local-roots-DrpNBv4b.js +0 -46
- package/dist/location-CtMHXE-d.js +0 -42
- package/dist/logger-Bc2lC3X3.js +0 -79
- package/dist/logger-CIV9WBoa.js +0 -11
- package/dist/logger-DdGvppaE.js +0 -75
- package/dist/logger-MWEZrHUL.js +0 -582
- package/dist/logging-B1QD0DRq.js +0 -2
- package/dist/logging-CAfgK7sj.js +0 -3
- package/dist/logging-ColPHIDT.js +0 -16
- package/dist/logging-D4xyCEzZ.js +0 -85
- package/dist/logging-Dt_aiHur.js +0 -13
- package/dist/logging-Dywye6yZ.js +0 -2
- package/dist/logging-core-hw7Df6Hl.js +0 -3
- package/dist/login-BrqdQcNh.js +0 -108
- package/dist/login-DSqrZNW-.js +0 -2333
- package/dist/login-qr-Dm3iC25_.js +0 -212
- package/dist/login-qr-api-BxRDJKkp.js +0 -16
- package/dist/logs-cli-CxjV80As.js +0 -221
- package/dist/magic-string.es-CVHNyqW1.js +0 -1011
- package/dist/main-session-BbO0A-No.js +0 -38
- package/dist/manager-c_fEco8X.js +0 -2773
- package/dist/manager-runtime-Vy_F8ORR.js +0 -2
- package/dist/manager.runtime-Bm1Knq-3.js +0 -670
- package/dist/manager.runtime.js +0 -1
- package/dist/manifest-f_gihArl.js +0 -237
- package/dist/manifest-registry-Kx5Z2lJL.js +0 -1069
- package/dist/map-size-BBQq2RPq.js +0 -15
- package/dist/markdown-table-runtime-Dx12DQTq.js +0 -2
- package/dist/markdown-tables-CSlyhQVP.js +0 -31
- package/dist/mask-api-key-BYVFDQdo.js +0 -10
- package/dist/matrix-NDa-FoaE.js +0 -351
- package/dist/matrix-config-helpers-D0D-oL7I.js +0 -153
- package/dist/matrix-helper-DioFIiaO.js +0 -20
- package/dist/matrix-migration-snapshot-DAOFFSgM.js +0 -714
- package/dist/matrix-ouiFsVI1.js +0 -39
- package/dist/matrix-runtime-heavy-KUEg_MfD.js +0 -4
- package/dist/matrix-runtime-shared-B6aE5Uu6.js +0 -1
- package/dist/matrix-runtime-surface-R78Hde6Q.js +0 -12
- package/dist/matrix-surface-B-nU-e0B.js +0 -13
- package/dist/matrix-thread-bindings-B77Krs8r.js +0 -12
- package/dist/mattermost-Cg2PI71s.js +0 -18
- package/dist/mcp/plugin-tools-serve.js +0 -105
- package/dist/mcp-cli-BMNT4RIm.js +0 -768
- package/dist/mcp-config-3y1z3N2x.js +0 -118
- package/dist/media-CUdiVhEt.js +0 -1691
- package/dist/media-limits-DmcT5KnO.js +0 -14
- package/dist/media-runtime-8QR_uTs0.js +0 -295
- package/dist/media-understanding-CpMkSmKj.js +0 -51
- package/dist/media-understanding-provider-C0xVBaas.js +0 -11
- package/dist/media-understanding-provider-C8RSrdEy.js +0 -16
- package/dist/media-understanding-provider-CCB6_bwc2.js +0 -9
- package/dist/media-understanding-provider-CZ83ep6L.js +0 -16
- package/dist/media-understanding-provider-Cmcg82YY.js +0 -28
- package/dist/media-understanding-provider-D1_z5Kwx.js +0 -11
- package/dist/media-understanding-provider-DC9bhcFj.js +0 -11
- package/dist/media-understanding-provider-DbMV-bHu.js +0 -17
- package/dist/media-understanding-provider-Drg3Vyoe.js +0 -86
- package/dist/media-understanding-runtime-JIhXSD7e.js +0 -15
- package/dist/media-understanding.runtime-2Muvvak4.js +0 -7
- package/dist/media-understanding.runtime.js +0 -1
- package/dist/memory-DPYsR3Cn.js +0 -228
- package/dist/memory-core-engine-runtime-DP_nzKMm.js +0 -14
- package/dist/memory-core-host-engine-embeddings-BhsmnP-6.js +0 -1370
- package/dist/memory-core-host-engine-foundation-CtFD8jpc.js +0 -10
- package/dist/memory-core-host-engine-qmd-DCvmid82.js +0 -375
- package/dist/memory-core-host-engine-storage-N3YflxjF.js +0 -109
- package/dist/memory-core-host-multimodal-BVd6eEE3.js +0 -1
- package/dist/memory-core-host-query-Bxzu0mAD.js +0 -2
- package/dist/memory-core-host-runtime-cli-nz5fxbbn.js +0 -10
- package/dist/memory-core-host-runtime-core-BcGQFQUw.js +0 -8
- package/dist/memory-core-host-runtime-files-DO5A0pY5.js +0 -3
- package/dist/memory-core-host-secret-CQAiTACg.js +0 -1
- package/dist/memory-core-host-status-0g2XexDn.js +0 -44
- package/dist/memory-embedding-providers-BOMS0u3X.js +0 -34
- package/dist/memory-lancedb-kZBcB07O.js +0 -2
- package/dist/memory-runtime-BIGGpmaC.js +0 -2
- package/dist/memory-runtime-XyiDon5w.js +0 -34
- package/dist/memory-search-CQFSugEg.js +0 -2
- package/dist/memory-search-DpAYXyjc.js +0 -202
- package/dist/memory-state-DDJh6L4-.js +0 -41
- package/dist/mention-gating-_kzByrvM.js +0 -25
- package/dist/mentions-BCBF5Klg.js +0 -65
- package/dist/mentions-BKYgZd-C.js +0 -155
- package/dist/merge-patch-CtvE2OP0.js +0 -65
- package/dist/message-Dna6Vsdg.js +0 -205
- package/dist/message-action-discovery-CPTCAl8K.js +0 -133
- package/dist/message-action-runner-Byldnjex.js +0 -1703
- package/dist/message-channel-bEWdw4ul.js +0 -105
- package/dist/message-handler-C9TRy9hy.js +0 -1771
- package/dist/message-hook-mappers-CzwFvq_c.js +0 -255
- package/dist/messages-CQT2FDZ3.js +0 -270
- package/dist/method-scopes-B6e_KuRU.js +0 -2663
- package/dist/migrate-cli-C_iDle77.js +0 -500
- package/dist/migration-snapshot.runtime-DAzTUgU-.js +0 -3
- package/dist/migration-snapshot.runtime.js +0 -1
- package/dist/mime-DkaKoCVP.js +0 -156
- package/dist/min-host-version-CIhgRq0c.js +0 -349
- package/dist/minimax-vlm-Dh6g-MLh.js +0 -512
- package/dist/model-auth-DcCyGs_6.js +0 -377
- package/dist/model-auth-env-OT6ucjoP.js +0 -63
- package/dist/model-auth-label-fGtOs2u-.js +0 -45
- package/dist/model-auth-markers-D2z_AIuC.js +0 -70
- package/dist/model-auth-runtime-shared-DnhseQ_3.js +0 -18
- package/dist/model-buttons-zQ-cRhqo.js +0 -187
- package/dist/model-catalog-f9zO4b6C.js +0 -208
- package/dist/model-catalog.runtime-iRu_OMJS.js +0 -2
- package/dist/model-catalog.runtime.js +0 -1
- package/dist/model-definitions-BGWurJeM.js +0 -49
- package/dist/model-definitions-C-e07VgA.js +0 -255
- package/dist/model-definitions-DUANiLUG.js +0 -126
- package/dist/model-definitions-DrxdjAkB.js +0 -202
- package/dist/model-id-9W_sHLHy.js +0 -12
- package/dist/model-id-DEv7HEyl.js +0 -20
- package/dist/model-input-DwbpFRYm.js +0 -20
- package/dist/model-overrides-BaecXmMv.js +0 -84
- package/dist/model-overrides-UUODi1G1.js +0 -91
- package/dist/model-param-b-BHlbSl5R.js +0 -15
- package/dist/model-picker-BgVMnja3.js +0 -439
- package/dist/model-picker-D8elZqN_.js +0 -3
- package/dist/model-picker.runtime-BUfgRpvT.js +0 -15
- package/dist/model-picker.runtime.js +0 -1
- package/dist/model-runtime-CkjgxQmB.js +0 -1772
- package/dist/model-selection-DXY5nwui.js +0 -407
- package/dist/model-selection-Dx6Ag-ZE.js +0 -505
- package/dist/model-suppression-C8XSEnsv.js +0 -24
- package/dist/model-suppression.runtime-Dqra9AAF.js +0 -7
- package/dist/model-suppression.runtime.js +0 -1
- package/dist/models--Ze_o5z6.js +0 -193
- package/dist/models-7_w_ynp7.js +0 -35
- package/dist/models-BMmB_oQc.js +0 -130
- package/dist/models-B_TKM4gG.js +0 -18
- package/dist/models-B_UROL5b.js +0 -3
- package/dist/models-BmDGSZCK.js +0 -31
- package/dist/models-BywIyTzh.js +0 -126
- package/dist/models-C5GB-E7D.js +0 -154
- package/dist/models-DU3Lv10g.js +0 -754
- package/dist/models-VgpjMiqM.js +0 -138
- package/dist/models-_DZVZ2Na.js +0 -18
- package/dist/models-bBe0FFJe.js +0 -2550
- package/dist/models-cli-kZR11PgM.js +0 -197
- package/dist/models-config-D6j7jkCN.js +0 -2
- package/dist/models-config-lYKxSxLo.js +0 -1106
- package/dist/models-config.runtime-D2tdVUsi.js +0 -2
- package/dist/models-config.runtime.js +0 -1
- package/dist/models-emJUoDsF.js +0 -40
- package/dist/models-gPCm0Fco.js +0 -122
- package/dist/models-mi7nu17U.js +0 -99
- package/dist/models-nUP9ZPV8.js +0 -552
- package/dist/models-provider-runtime-DfIZ0cvV.js +0 -2
- package/dist/monitor-BEjwRY59.js +0 -3622
- package/dist/monitor-BiwufaF7.js +0 -718
- package/dist/monitor-BqwlHm94.js +0 -3660
- package/dist/monitor-Cj6Atk8I.js +0 -676
- package/dist/monitor-D2qBnOYz.js +0 -666
- package/dist/monitor-DZmBV1Nj2.js +0 -2
- package/dist/monitor-RMoB6sGQ.js +0 -4067
- package/dist/monitor-auth-EvlH1zbN.js +0 -192
- package/dist/monitor-lbUydC5_.js +0 -1525
- package/dist/monitor-polling.runtime-O6ZG6yYv.js +0 -307
- package/dist/monitor-polling.runtime.js +0 -1
- package/dist/monitor-provider-x4TUmYNN.js +0 -1782
- package/dist/monitor-vE0skDM1.js +0 -687
- package/dist/monitor-webhook.runtime-DoTv_oZv.js +0 -297
- package/dist/monitor-webhook.runtime.js +0 -1
- package/dist/moonshot-stream-wrappers-Csssd6kW.js +0 -24
- package/dist/moonshot-thinking-stream-wrappers-D3j6Q9Yk.js +0 -69
- package/dist/msteams-DsFLaFEV.js +0 -33
- package/dist/multimodal-DoXQtvBl.js +0 -66
- package/dist/mutable-allowlist-detectors-CbFK2eTK.js +0 -62
- package/dist/native-command-registry-B4BAqmAW.js +0 -2
- package/dist/native-command-session-targets-DfUCBY63.js +0 -10
- package/dist/net-DjzoSxQo.js +0 -265
- package/dist/network-discovery-display-h8MqTMCI.js +0 -48
- package/dist/network-mode-QjJNOXMa.js +0 -17
- package/dist/nextcloud-talk-COZ5YrPY.js +0 -18
- package/dist/node-cli-z8LHYl1w.js +0 -2323
- package/dist/node-command-policy-DoeXKD1V.js +0 -205
- package/dist/node-commands-ycnRypMq.js +0 -11
- package/dist/node-require-BgDD9bTi.js +0 -14
- package/dist/node-resolve-Drr1RIcN.js +0 -110
- package/dist/node-service-Nyf8eLc4.js +0 -68
- package/dist/node-startup-env-CVMjxAUF.js +0 -50
- package/dist/nodes-cli-BMyafV_R.js +0 -1044
- package/dist/nodes-screen-oyGHNlY5.js +0 -219
- package/dist/nodes.helpers-DKBA9twS.js +0 -203
- package/dist/normalize-C46CugdT.js +0 -35
- package/dist/normalize-reply-VrMa_PA2.js +0 -500
- package/dist/normalize-secret-input-CC9iFcnK.js +0 -32
- package/dist/nostr-DGfd-Skj.js +0 -19
- package/dist/note-B5R9zt2K.js +0 -109
- package/dist/notify-CKEt6MKY.js +0 -298
- package/dist/npm-registry-spec-dWUFCqDk.js +0 -100
- package/dist/oauth-BBIy_OBl.js +0 -152
- package/dist/oauth-DzMUt9ZO.js +0 -56
- package/dist/oauth.credentials-CKrXIXPf.js +0 -119
- package/dist/oauth.flow-Dd6MZcHS.js +0 -122
- package/dist/oauth.http-CZlbXoZD.js +0 -23
- package/dist/oauth.project-DAVNbct7.js +0 -125
- package/dist/oauth.shared-D1_wwlyt.js +0 -26
- package/dist/oauth.token-CnB-w_v2.js +0 -42
- package/dist/ollama-EE_SvO8P.js +0 -26
- package/dist/onboard-2otvb4-n.js +0 -307
- package/dist/onboard-72nGEzpd.js +0 -25
- package/dist/onboard-B14oDS4M.js +0 -23
- package/dist/onboard-BH5hcOyK.js +0 -39
- package/dist/onboard-BRkQIFt_.js +0 -25
- package/dist/onboard-BSArlkkq.js +0 -73
- package/dist/onboard-Bau_HSmO.js +0 -36
- package/dist/onboard-BsqpQhXj.js +0 -591
- package/dist/onboard-CBa7u1iZ.js +0 -25
- package/dist/onboard-CLKZrJow.js +0 -29
- package/dist/onboard-COaMJ5wS.js +0 -28
- package/dist/onboard-CbTQZti9.js +0 -48
- package/dist/onboard-Ce3rcBNR.js +0 -29
- package/dist/onboard-CiMzgSvO.js +0 -67
- package/dist/onboard-DNuWjUOg.js +0 -17
- package/dist/onboard-DY3JtOcX.js +0 -47
- package/dist/onboard-Dd_eFJ7g.js +0 -25
- package/dist/onboard-DgMI-C3P.js +0 -24
- package/dist/onboard-Dj3Kkl9C.js +0 -49
- package/dist/onboard-Djne8OY8.js +0 -34
- package/dist/onboard-DnNU28xK.js +0 -48
- package/dist/onboard-MFS79j1I.js +0 -23
- package/dist/onboard-REHqRyQm.js +0 -26
- package/dist/onboard-VVnzyvuh.js +0 -46
- package/dist/onboard-channels-B8UocRdo.js +0 -705
- package/dist/onboard-channels-Ci5QQyQ0.js +0 -2
- package/dist/onboard-config-7edS4yYd.js +0 -2
- package/dist/onboard-config-C-6p2HNL.js +0 -29
- package/dist/onboard-custom-BREC7K0s.js +0 -2
- package/dist/onboard-custom-D7oXiV6u.js +0 -646
- package/dist/onboard-helpers-BCIfy96O.js +0 -4
- package/dist/onboard-helpers-CLedS83g.js +0 -227
- package/dist/onboard-hooks-DW0gav3i.js +0 -52
- package/dist/onboard-lh38uUOa.js +0 -25
- package/dist/onboard-rH_HA9v-.js +0 -34
- package/dist/onboard-remote-DG5Rb2y7.js +0 -2
- package/dist/onboard-remote-DgDwHLCW.js +0 -193
- package/dist/onboard-search-Bz78SAON.js +0 -339
- package/dist/onboard-skills-BK1iF6NI.js +0 -2
- package/dist/onboard-skills-Cfs4Gz-d.js +0 -134
- package/dist/openai-B3atWWiZ.js +0 -21
- package/dist/openai-codex-auth-identity-blYgqX5I.js +0 -40
- package/dist/openai-codex-catalog-DQoW5ntP.js +0 -11
- package/dist/openai-codex-provider-BeX3_fQL.js +0 -254
- package/dist/openai-provider-DfSRc815.js +0 -272
- package/dist/openai-stream-wrappers-Cmn9nSYj.js +0 -338
- package/dist/openclaw-exec-env-DnTrPIdx.js +0 -17
- package/dist/openclaw-root-F1SOdmJ0.js +0 -88
- package/dist/openclaw-tools.runtime-Dx73yE1V.js +0 -2
- package/dist/openclaw-tools.runtime.js +0 -1
- package/dist/operator-approvals-client-NQtGN5k_.js +0 -33
- package/dist/order-DNBhjW6F.js +0 -744
- package/dist/origin-routing-BC2EzQqM.js +0 -15
- package/dist/origin-routing-BVUTLJGu.js +0 -2
- package/dist/os-summary-CdlXkpL1.js +0 -26
- package/dist/outbound-adapter-D6WGzS7P.js +0 -183
- package/dist/outbound-ek4CqhT2.js +0 -2
- package/dist/outbound-hgMEZIU9.js +0 -2739
- package/dist/outbound-media-B2ZrkOxl.js +0 -15
- package/dist/outbound-runtime-CtDmQy3z.js +0 -2
- package/dist/outbound-send-deps-COPf3lwV.js +0 -7
- package/dist/outbound-session-DHKvttsz.js +0 -41
- package/dist/pairing-challenge-O7jo1Q5R.js +0 -33
- package/dist/pairing-cli-BEUxC5EH.js +0 -116
- package/dist/pairing-labels-Cj1fFxG9.js +0 -7
- package/dist/pairing-message-FaqHPEFk.js +0 -4
- package/dist/pairing-messages-DxLpe0GE.js +0 -23
- package/dist/pairing-pending-DGyUpmjC.js +0 -14
- package/dist/pairing-store-B171dUVa.js +0 -617
- package/dist/pairing-token-CnyXOU__.js +0 -88
- package/dist/param-readers-CqAoT2n2.js +0 -2
- package/dist/parse-duration-D9q1V0xx.js +0 -41
- package/dist/parse-finite-number-CzdLC_gQ.js +0 -30
- package/dist/parse-json-compat-DfjRYtKX.js +0 -11
- package/dist/parse-log-line-Cd0JHPGg.js +0 -43
- package/dist/parse-port-BFmNhrtE.js +0 -8
- package/dist/parse-timeout-bktz0495.js +0 -27
- package/dist/path-alias-guards-BeOn9PZR.js +0 -40
- package/dist/path-env-C2F1kvna.js +0 -87
- package/dist/path-safety-2mfHCe0n.js +0 -12
- package/dist/paths-Bw8Ci57u.js +0 -2
- package/dist/paths-GWMNxnBn.js +0 -201
- package/dist/paths-xpks599B.js +0 -180
- package/dist/payload-S8niBCaz.js +0 -90
- package/dist/pdf-extract-Cm83kt2M.js +0 -73
- package/dist/perplexity-web-search-provider-Cgr2BYVk.js +0 -423
- package/dist/persistent-bindings.lifecycle-CAOm8v8I.js +0 -159
- package/dist/persistent-dedupe-DoNHVMWs.js +0 -116
- package/dist/pi-embedded-DEAtCIdT.js +0 -40616
- package/dist/pi-embedded-helpers-BVjvCsor.js +0 -1733
- package/dist/pi-embedded.runtime-Ctj3QFs-.js +0 -4
- package/dist/pi-embedded.runtime.js +0 -1
- package/dist/pi-model-discovery-KjI5xf8m.js +0 -188
- package/dist/pi-settings-BJzoHYF9.js +0 -57
- package/dist/pi-tools.before-tool-call.runtime-DJ6s0GDV.js +0 -354
- package/dist/pi-tools.before-tool-call.runtime.js +0 -1
- package/dist/plugin-auto-enable-BZvicayR.js +0 -400
- package/dist/plugin-entry-D0vhddM4.js +0 -25
- package/dist/plugin-entry.runtime-Xd644UDA.js +0 -112
- package/dist/plugin-entry.runtime.js +0 -1
- package/dist/plugin-error-boundary-RI4ByQoA.js +0 -55
- package/dist/plugin-error-handler-DWUTf_UF.js +0 -109
- package/dist/plugin-health-checker-2c6LyJwr.js +0 -125
- package/dist/plugin-hot-reload-CA3__dZN.js +0 -215
- package/dist/plugin-install-BjVLwj7-.js +0 -230
- package/dist/plugin-install-CjwMt13j.js +0 -2
- package/dist/plugin-install-config-policy-MApev-w-.js +0 -93
- package/dist/plugin-install-path-warnings-BkBH-k4n.js +0 -40
- package/dist/plugin-install-plan-0fWhyVBN.js +0 -50
- package/dist/plugin-registry-CORVyKHv.js +0 -74
- package/dist/plugin-registry-Dl1iIh7W.js +0 -2
- package/dist/plugin-runtime-Dd1YN95W.js +0 -6
- package/dist/plugin-sdk/account-core.js +0 -8
- package/dist/plugin-sdk/account-helpers.js +0 -4
- package/dist/plugin-sdk/account-id.js +0 -3
- package/dist/plugin-sdk/account-resolution.js +0 -12
- package/dist/plugin-sdk/acp-runtime.js +0 -3
- package/dist/plugin-sdk/agent-config-primitives.js +0 -3
- package/dist/plugin-sdk/agent-runtime.js +0 -29
- package/dist/plugin-sdk/allow-from.js +0 -5
- package/dist/plugin-sdk/allowlist-config-edit.js +0 -2
- package/dist/plugin-sdk/amazon-bedrock.js +0 -15
- package/dist/plugin-sdk/anthropic-vertex.js +0 -2
- package/dist/plugin-sdk/approval-runtime.js +0 -8
- package/dist/plugin-sdk/bluebubbles-policy.js +0 -2
- package/dist/plugin-sdk/bluebubbles.js +0 -39
- package/dist/plugin-sdk/boolean-param.js +0 -2
- package/dist/plugin-sdk/browser-runtime.js +0 -3
- package/dist/plugin-sdk/browser-support.js +0 -44
- package/dist/plugin-sdk/browser.js +0 -15
- package/dist/plugin-sdk/byteplus.js +0 -17
- package/dist/plugin-sdk/channel-actions.js +0 -3
- package/dist/plugin-sdk/channel-config-helpers.js +0 -2
- package/dist/plugin-sdk/channel-config-primitives.js +0 -4
- package/dist/plugin-sdk/channel-config-schema.js +0 -7
- package/dist/plugin-sdk/channel-config-writes.js +0 -3
- package/dist/plugin-sdk/channel-contract.js +0 -1
- package/dist/plugin-sdk/channel-feedback.js +0 -5
- package/dist/plugin-sdk/channel-inbound.js +0 -10
- package/dist/plugin-sdk/channel-lifecycle.js +0 -3
- package/dist/plugin-sdk/channel-pairing.js +0 -2
- package/dist/plugin-sdk/channel-policy.js +0 -6
- package/dist/plugin-sdk/channel-reply-pipeline.js +0 -2
- package/dist/plugin-sdk/channel-runtime.js +0 -16
- package/dist/plugin-sdk/channel-send-result.js +0 -2
- package/dist/plugin-sdk/channel-setup.js +0 -5
- package/dist/plugin-sdk/channel-status.js +0 -5
- package/dist/plugin-sdk/channel-targets.js +0 -5
- package/dist/plugin-sdk/chutes.js +0 -20
- package/dist/plugin-sdk/cli-backend.js +0 -3
- package/dist/plugin-sdk/cli-runtime.js +0 -7
- package/dist/plugin-sdk/cloudflare-ai-gateway.js +0 -18
- package/dist/plugin-sdk/collection-runtime.js +0 -3
- package/dist/plugin-sdk/command-auth-native.js +0 -6
- package/dist/plugin-sdk/command-auth.js +0 -14
- package/dist/plugin-sdk/command-detection.js +0 -3
- package/dist/plugin-sdk/command-surface.js +0 -3
- package/dist/plugin-sdk/compat.js +0 -35
- package/dist/plugin-sdk/config-runtime.js +0 -25
- package/dist/plugin-sdk/conversation-runtime.js +0 -15
- package/dist/plugin-sdk/core.js +0 -22
- package/dist/plugin-sdk/dangerous-name-runtime.js +0 -3
- package/dist/plugin-sdk/deepseek.js +0 -14
- package/dist/plugin-sdk/device-bootstrap.js +0 -4
- package/dist/plugin-sdk/diagnostic-runtime.js +0 -4
- package/dist/plugin-sdk/diagnostics-otel.js +0 -6
- package/dist/plugin-sdk/diffs.js +0 -4
- package/dist/plugin-sdk/direct-dm.js +0 -2
- package/dist/plugin-sdk/directory-runtime.js +0 -5
- package/dist/plugin-sdk/discord-account.js +0 -2
- package/dist/plugin-sdk/discord-core.js +0 -9
- package/dist/plugin-sdk/discord-runtime-surface.js +0 -2
- package/dist/plugin-sdk/discord-session-key.js +0 -2
- package/dist/plugin-sdk/discord-surface.js +0 -2
- package/dist/plugin-sdk/discord-thread-bindings.js +0 -2
- package/dist/plugin-sdk/discord-timeouts.js +0 -2
- package/dist/plugin-sdk/discord.js +0 -21
- package/dist/plugin-sdk/error-runtime.js +0 -3
- package/dist/plugin-sdk/extension-shared.js +0 -3
- package/dist/plugin-sdk/feishu-conversation.js +0 -2
- package/dist/plugin-sdk/feishu-setup.js +0 -2
- package/dist/plugin-sdk/feishu.js +0 -34
- package/dist/plugin-sdk/fetch-runtime.js +0 -7
- package/dist/plugin-sdk/file-lock.js +0 -2
- package/dist/plugin-sdk/gateway-runtime.js +0 -4
- package/dist/plugin-sdk/github-copilot-login.js +0 -2
- package/dist/plugin-sdk/github-copilot-token.js +0 -3
- package/dist/plugin-sdk/global-singleton.js +0 -4
- package/dist/plugin-sdk/google.js +0 -2
- package/dist/plugin-sdk/googlechat.js +0 -38
- package/dist/plugin-sdk/group-access.js +0 -2
- package/dist/plugin-sdk/hook-runtime.js +0 -4
- package/dist/plugin-sdk/host-runtime.js +0 -4
- package/dist/plugin-sdk/huggingface.js +0 -18
- package/dist/plugin-sdk/image-generation-core.js +0 -63
- package/dist/plugin-sdk/image-generation.js +0 -2
- package/dist/plugin-sdk/index.js +0 -5
- package/dist/plugin-sdk/infra-runtime.js +0 -45
- package/dist/plugin-sdk/interactive-runtime.js +0 -4
- package/dist/plugin-sdk/irc-surface.js +0 -2
- package/dist/plugin-sdk/irc.js +0 -30
- package/dist/plugin-sdk/json-store.js +0 -3
- package/dist/plugin-sdk/keyed-async-queue.js +0 -2
- package/dist/plugin-sdk/kilocode.js +0 -23
- package/dist/plugin-sdk/kimi-coding.js +0 -11
- package/dist/plugin-sdk/lazy-runtime.js +0 -3
- package/dist/plugin-sdk/line-core.js +0 -6
- package/dist/plugin-sdk/line-runtime.js +0 -2
- package/dist/plugin-sdk/line-surface.js +0 -2
- package/dist/plugin-sdk/line.js +0 -9
- package/dist/plugin-sdk/llm-task.js +0 -6
- package/dist/plugin-sdk/logging-core.js +0 -5
- package/dist/plugin-sdk/markdown-table-runtime.js +0 -3
- package/dist/plugin-sdk/matrix-helper.js +0 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +0 -5
- package/dist/plugin-sdk/matrix-runtime-shared.js +0 -3
- package/dist/plugin-sdk/matrix-runtime-surface.js +0 -2
- package/dist/plugin-sdk/matrix-surface.js +0 -2
- package/dist/plugin-sdk/matrix-thread-bindings.js +0 -2
- package/dist/plugin-sdk/matrix.js +0 -53
- package/dist/plugin-sdk/mattermost-policy.js +0 -11
- package/dist/plugin-sdk/mattermost.js +0 -41
- package/dist/plugin-sdk/media-runtime.js +0 -17
- package/dist/plugin-sdk/media-understanding-runtime.js +0 -2
- package/dist/plugin-sdk/media-understanding.js +0 -3
- package/dist/plugin-sdk/memory-core-engine-runtime.js +0 -2
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +0 -6
- package/dist/plugin-sdk/memory-core-host-engine-foundation.js +0 -17
- package/dist/plugin-sdk/memory-core-host-engine-qmd.js +0 -3
- package/dist/plugin-sdk/memory-core-host-engine-storage.js +0 -4
- package/dist/plugin-sdk/memory-core-host-multimodal.js +0 -3
- package/dist/plugin-sdk/memory-core-host-query.js +0 -3
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +0 -12
- package/dist/plugin-sdk/memory-core-host-runtime-core.js +0 -14
- package/dist/plugin-sdk/memory-core-host-runtime-files.js +0 -4
- package/dist/plugin-sdk/memory-core-host-secret.js +0 -3
- package/dist/plugin-sdk/memory-core-host-status.js +0 -2
- package/dist/plugin-sdk/memory-core.js +0 -29
- package/dist/plugin-sdk/memory-lancedb.js +0 -4
- package/dist/plugin-sdk/minimax.js +0 -24
- package/dist/plugin-sdk/mistral.js +0 -17
- package/dist/plugin-sdk/models-provider-runtime.js +0 -3
- package/dist/plugin-sdk/modelstudio-definitions.js +0 -19
- package/dist/plugin-sdk/modelstudio.js +0 -24
- package/dist/plugin-sdk/moonshot.js +0 -17
- package/dist/plugin-sdk/msteams.js +0 -46
- package/dist/plugin-sdk/native-command-registry.js +0 -3
- package/dist/plugin-sdk/nextcloud-talk.js +0 -35
- package/dist/plugin-sdk/nostr.js +0 -14
- package/dist/plugin-sdk/nvidia.js +0 -11
- package/dist/plugin-sdk/ollama-surface.js +0 -24
- package/dist/plugin-sdk/ollama.js +0 -2
- package/dist/plugin-sdk/openai.js +0 -2
- package/dist/plugin-sdk/opencode-go.js +0 -14
- package/dist/plugin-sdk/opencode.js +0 -15
- package/dist/plugin-sdk/outbound-runtime.js +0 -5
- package/dist/plugin-sdk/param-readers.js +0 -3
- package/dist/plugin-sdk/plugin-entry.js +0 -3
- package/dist/plugin-sdk/plugin-runtime.js +0 -8
- package/dist/plugin-sdk/process-runtime.js +0 -3
- package/dist/plugin-sdk/provider-auth-api-key.js +0 -9
- package/dist/plugin-sdk/provider-auth-login.js +0 -2
- package/dist/plugin-sdk/provider-auth-result.js +0 -2
- package/dist/plugin-sdk/provider-auth-runtime.js +0 -5
- package/dist/plugin-sdk/provider-auth.js +0 -17
- package/dist/plugin-sdk/provider-catalog-shared.js +0 -2
- package/dist/plugin-sdk/provider-entry.js +0 -2
- package/dist/plugin-sdk/provider-env-vars.js +0 -3
- package/dist/plugin-sdk/provider-http.js +0 -6
- package/dist/plugin-sdk/provider-model-shared.js +0 -5
- package/dist/plugin-sdk/provider-moonshot.js +0 -3
- package/dist/plugin-sdk/provider-onboard.js +0 -3
- package/dist/plugin-sdk/provider-setup.js +0 -3
- package/dist/plugin-sdk/provider-stream.js +0 -4
- package/dist/plugin-sdk/provider-tools.js +0 -2
- package/dist/plugin-sdk/provider-usage.js +0 -3
- package/dist/plugin-sdk/provider-web-fetch.js +0 -6
- package/dist/plugin-sdk/provider-web-search.js +0 -7
- package/dist/plugin-sdk/provider-zai-endpoint.js +0 -2
- package/dist/plugin-sdk/qianfan.js +0 -13
- package/dist/plugin-sdk/reply-chunking.js +0 -4
- package/dist/plugin-sdk/reply-dispatch-runtime.js +0 -5
- package/dist/plugin-sdk/reply-history.js +0 -3
- package/dist/plugin-sdk/reply-payload.js +0 -2
- package/dist/plugin-sdk/reply-runtime.js +0 -14
- package/dist/plugin-sdk/request-url.js +0 -2
- package/dist/plugin-sdk/retry-runtime.js +0 -4
- package/dist/plugin-sdk/root-alias.cjs +0 -347
- package/dist/plugin-sdk/routing.js +0 -9
- package/dist/plugin-sdk/runtime-config-snapshot.js +0 -3
- package/dist/plugin-sdk/runtime-env.js +0 -17
- package/dist/plugin-sdk/runtime-group-policy.js +0 -3
- package/dist/plugin-sdk/runtime-store.js +0 -2
- package/dist/plugin-sdk/runtime.js +0 -9
- package/dist/plugin-sdk/sandbox.js +0 -6
- package/dist/plugin-sdk/secret-input.js +0 -4
- package/dist/plugin-sdk/security-runtime.js +0 -6
- package/dist/plugin-sdk/self-hosted-provider-setup.js +0 -2
- package/dist/plugin-sdk/session-store-runtime.js +0 -4
- package/dist/plugin-sdk/setup-adapter-runtime.js +0 -3
- package/dist/plugin-sdk/setup-runtime.js +0 -6
- package/dist/plugin-sdk/setup-tools.js +0 -6
- package/dist/plugin-sdk/setup.js +0 -13
- package/dist/plugin-sdk/sglang.js +0 -15
- package/dist/plugin-sdk/signal-account.js +0 -2
- package/dist/plugin-sdk/signal-surface.js +0 -2
- package/dist/plugin-sdk/signal.js +0 -24
- package/dist/plugin-sdk/skill-commands-runtime.js +0 -3
- package/dist/plugin-sdk/slack-account.js +0 -2
- package/dist/plugin-sdk/slack-core.js +0 -7
- package/dist/plugin-sdk/slack-runtime-surface.js +0 -2
- package/dist/plugin-sdk/slack-surface.js +0 -2
- package/dist/plugin-sdk/slack-target-parser.js +0 -2
- package/dist/plugin-sdk/slack-targets.js +0 -3
- package/dist/plugin-sdk/slack.js +0 -20
- package/dist/plugin-sdk/speech-core.js +0 -4
- package/dist/plugin-sdk/speech-runtime.js +0 -2
- package/dist/plugin-sdk/speech.js +0 -5
- package/dist/plugin-sdk/ssrf-runtime.js +0 -6
- package/dist/plugin-sdk/state-paths.js +0 -3
- package/dist/plugin-sdk/status-helpers.js +0 -4
- package/dist/plugin-sdk/string-normalization-runtime.js +0 -3
- package/dist/plugin-sdk/synthetic.js +0 -17
- package/dist/plugin-sdk/telegram-account.js +0 -2
- package/dist/plugin-sdk/telegram-allow-from.js +0 -12
- package/dist/plugin-sdk/telegram-command-config.js +0 -3
- package/dist/plugin-sdk/telegram-core.js +0 -18
- package/dist/plugin-sdk/telegram-surface.js +0 -42
- package/dist/plugin-sdk/temp-path.js +0 -4
- package/dist/plugin-sdk/testing.js +0 -11
- package/dist/plugin-sdk/text-runtime.js +0 -19
- package/dist/plugin-sdk/thread-bindings-runtime.js +0 -4
- package/dist/plugin-sdk/thread-ownership.js +0 -5
- package/dist/plugin-sdk/tlon.js +0 -13
- package/dist/plugin-sdk/together.js +0 -16
- package/dist/plugin-sdk/tool-send.js +0 -2
- package/dist/plugin-sdk/twitch.js +0 -8
- package/dist/plugin-sdk/venice.js +0 -16
- package/dist/plugin-sdk/vllm.js +0 -15
- package/dist/plugin-sdk/voice-call.js +0 -7
- package/dist/plugin-sdk/volcengine.js +0 -17
- package/dist/plugin-sdk/web-media.js +0 -4
- package/dist/plugin-sdk/webhook-ingress.js +0 -9
- package/dist/plugin-sdk/webhook-path.js +0 -2
- package/dist/plugin-sdk/webhook-request-guards.js +0 -3
- package/dist/plugin-sdk/whatsapp-auth-presence.js +0 -2
- package/dist/plugin-sdk/whatsapp-core.js +0 -11
- package/dist/plugin-sdk/whatsapp-shared.js +0 -5
- package/dist/plugin-sdk/whatsapp-surface.js +0 -2
- package/dist/plugin-sdk/whatsapp-targets.js +0 -2
- package/dist/plugin-sdk/windows-spawn.js +0 -2
- package/dist/plugin-sdk/xai.js +0 -27
- package/dist/plugin-sdk/zalo-setup.js +0 -2
- package/dist/plugin-sdk/zalo.js +0 -38
- package/dist/plugin-sdk/zalouser.js +0 -29
- package/dist/plugin-sdk/zod.js +0 -3
- package/dist/plugins/build-smoke-entry.js +0 -4
- package/dist/plugins/provider-runtime.runtime.js +0 -2
- package/dist/plugins/runtime/index.js +0 -2
- package/dist/plugins/runtime/runtime-line.contract.js +0 -23
- package/dist/plugins-DcjzAZWt.js +0 -5
- package/dist/plugins-allowlist-DoZlIC4p.js +0 -14
- package/dist/plugins-cli-G6GhHHD0.js +0 -561
- package/dist/plugins-command-helpers-CIYzoC65.js +0 -116
- package/dist/plugins-install-persist-C5-bJdRb.js +0 -121
- package/dist/plugins-update-command-CsT_saJm.js +0 -974
- package/dist/plugins-w6xUzHby.js +0 -40
- package/dist/pluralkit-B_DWQnc5.js +0 -21
- package/dist/pluralkit-Bez5QVFC.js +0 -2
- package/dist/policy-D6OQdw73.js +0 -173
- package/dist/policy-DXeeH8B2.js +0 -147
- package/dist/poll-params-DTVSSuok.js +0 -52
- package/dist/polls-CMmT0F_y.js +0 -35
- package/dist/port-defaults-Dajs4Obu.js +0 -30
- package/dist/ports-DuU-A86K.js +0 -262
- package/dist/ports-ZA1n2It7.js +0 -432
- package/dist/ports-lsof-Cw_6T7ru.js +0 -25
- package/dist/ports-probe-DeuK48Pq.js +0 -14
- package/dist/preflight-audio-DTSBExi8.js +0 -48
- package/dist/preflight-audio.runtime-BJRLyBvf.js +0 -7
- package/dist/preflight-audio.runtime.js +0 -1
- package/dist/prepare-BQBndJUC.js +0 -1301
- package/dist/probe-BO4hbHvs.js +0 -435
- package/dist/probe-DPv2pfj5.js +0 -1868
- package/dist/probe-DlO2Q9rN.js +0 -170
- package/dist/probe-RbbTQOHx.js +0 -178
- package/dist/probe-auth-Bl9MHtlP.js +0 -2
- package/dist/probe-auth-CUfEH7di.js +0 -63
- package/dist/probe-eYLpFww_.js +0 -137
- package/dist/probe-kfBMuOWF.js +0 -2
- package/dist/probe-wktb4WTP.js +0 -349
- package/dist/probe.runtime-BhbUesak.js +0 -2
- package/dist/probe.runtime.js +0 -1
- package/dist/process-runtime-CBFMzhIk.js +0 -2
- package/dist/process-scoped-map-C7IoOrV-.js +0 -61
- package/dist/profile-B5n9yLlB.js +0 -2
- package/dist/profile-CmsqnPsu.js +0 -107
- package/dist/profile-update-D6f10CZk.js +0 -67
- package/dist/profile-utils-C7uzTwgJ.js +0 -15
- package/dist/profiles-BoNergZo.js +0 -79
- package/dist/program-BuKG0Ntx.js +0 -158
- package/dist/program-context-DDmlbmbl.js +0 -2
- package/dist/program-context-DQOnR5c_.js +0 -10
- package/dist/progress-DQvXYKne.js +0 -132
- package/dist/prompt-COzf5LIJ.js +0 -2
- package/dist/prompt-OSmU-o7R.js +0 -20
- package/dist/prompt-select-styled-yYL3el77.js +0 -6432
- package/dist/prompt-style-DekFM6h7.js +0 -7
- package/dist/prompts-MtRTsZpw.js +0 -9
- package/dist/prototype-keys-DrjhYNcz.js +0 -11
- package/dist/provider-BWTXmDq3.js +0 -3685
- package/dist/provider-BrmcrkEe.js +0 -70
- package/dist/provider-ByBRbhW5.js +0 -7216
- package/dist/provider-api-key-auth-BcyipSdy.js +0 -109
- package/dist/provider-api-key-auth.runtime-BRu_8L4m.js +0 -14
- package/dist/provider-api-key-auth.runtime.js +0 -1
- package/dist/provider-attribution-DMVujx9B.js +0 -285
- package/dist/provider-auth-DK2UmYsZ.js +0 -43
- package/dist/provider-auth-api-key-99KxscjW.js +0 -5
- package/dist/provider-auth-choice-GbHta8Bp.js +0 -134
- package/dist/provider-auth-choice-helpers-CO2MnSGR.js +0 -58
- package/dist/provider-auth-choice-preference-DvAqSMGK.js +0 -44
- package/dist/provider-auth-choice.runtime-B8R63sLq.js +0 -14
- package/dist/provider-auth-choice.runtime-DypTKgMQ.js +0 -2
- package/dist/provider-auth-choice.runtime.js +0 -1
- package/dist/provider-auth-choices-n-JV1XgU.js +0 -65
- package/dist/provider-auth-guidance-DAB9sGGR.js +0 -35
- package/dist/provider-auth-helpers-gmTAji1W.js +0 -92
- package/dist/provider-auth-input-GgY_tjJh.js +0 -116
- package/dist/provider-auth-login-BYbccnB1.js +0 -8
- package/dist/provider-auth-login.runtime-DnSxCwqU.js +0 -196
- package/dist/provider-auth-login.runtime.js +0 -1
- package/dist/provider-auth-mode-Dbja5LLX.js +0 -20
- package/dist/provider-auth-ref-BErMfwCd.js +0 -171
- package/dist/provider-auth-ref-DEF_hE2R.js +0 -2
- package/dist/provider-auth-result-DiUxDF1G.js +0 -31
- package/dist/provider-auth-runtime-BwMq9oMD.js +0 -32
- package/dist/provider-catalog--Qc0q0I-.js +0 -26
- package/dist/provider-catalog-A_s8JQaq.js +0 -18
- package/dist/provider-catalog-B-EcLvBI.js +0 -11
- package/dist/provider-catalog-Bte-HucL.js +0 -44
- package/dist/provider-catalog-C63Rfat7.js +0 -11
- package/dist/provider-catalog-C7q0Vb3S.js +0 -95
- package/dist/provider-catalog-CCnuf8d3.js +0 -49
- package/dist/provider-catalog-CYQ7k_Db.js +0 -48
- package/dist/provider-catalog-CnlB2mMZ.js +0 -11
- package/dist/provider-catalog-CoyAbDZX.js +0 -56
- package/dist/provider-catalog-CtqhFopw.js +0 -48
- package/dist/provider-catalog-CyGxB_aR.js +0 -18
- package/dist/provider-catalog-D1pmWiDQ.js +0 -48
- package/dist/provider-catalog-DGgsalJv.js +0 -12
- package/dist/provider-catalog-DLdTTMmW.js +0 -11
- package/dist/provider-catalog-DZzX7Vwk.js +0 -54
- package/dist/provider-catalog-J2dZciKS.js +0 -11
- package/dist/provider-catalog-LVrcrz-W.js +0 -36
- package/dist/provider-catalog-aIN0QojF.js +0 -11
- package/dist/provider-catalog-shared-Db9nbr1B.js +0 -28
- package/dist/provider-discovery.runtime-BCUAsMMz.js +0 -10
- package/dist/provider-discovery.runtime.js +0 -1
- package/dist/provider-dispatcher-COxXbow_.js +0 -22
- package/dist/provider-entry-CT_YeII_.js +0 -86
- package/dist/provider-env-vars-4Bon7Y2X.js +0 -121
- package/dist/provider-env-vars-Np7qkDjC.js +0 -2
- package/dist/provider-flow-Dlg1GcXQ.js +0 -93
- package/dist/provider-http-DQQ317hc.js +0 -3
- package/dist/provider-id-CHzLB538.js +0 -30
- package/dist/provider-model-defaults-dSPzPas0.js +0 -5
- package/dist/provider-model-primary-D8SgLcOd.js +0 -26
- package/dist/provider-model-shared-GO1WT2fY.js +0 -104
- package/dist/provider-models-BG8YwJaY.js +0 -117
- package/dist/provider-models-BVVCdM8F.js +0 -22
- package/dist/provider-models-D2UZvTo3.js +0 -46
- package/dist/provider-moonshot-Cl8urWHL.js +0 -2
- package/dist/provider-oauth-flow-Bu2gIeX6.js +0 -33
- package/dist/provider-onboard-CTEHTjfw.js +0 -264
- package/dist/provider-openai-codex-oauth-tls-DdLUDuIM.js +0 -101
- package/dist/provider-registry-Ljtt6CKE.js +0 -49
- package/dist/provider-request-config-CIrbwAnR.js +0 -209
- package/dist/provider-runtime-BBFXlsU0.js +0 -2
- package/dist/provider-runtime-D_itmv9t.js +0 -291
- package/dist/provider-runtime.runtime-B_oC992d.js +0 -26
- package/dist/provider-runtime.runtime.js +0 -1
- package/dist/provider-self-hosted-setup-BlNrSREL.js +0 -272
- package/dist/provider-session.runtime-DQyRV-t3.js +0 -7
- package/dist/provider-session.runtime.js +0 -1
- package/dist/provider-setup-CSrOyU04.js +0 -2
- package/dist/provider-stream-m5D8QZPz.js +0 -289
- package/dist/provider-tools-NuJzTqa1.js +0 -37
- package/dist/provider-usage-BB5mQ8Fg.js +0 -3
- package/dist/provider-usage-CbPs3eFQ.js +0 -2
- package/dist/provider-usage-DG1gff_M.js +0 -375
- package/dist/provider-usage.fetch-DHWQ4YZu.js +0 -633
- package/dist/provider-web-fetch-QzED2vth.js +0 -5
- package/dist/provider-web-search-CVMEZcl8.js +0 -306
- package/dist/provider-wizard-B0ocsg3q.js +0 -209
- package/dist/provider-zai-endpoint-DoIy5HQf.js +0 -116
- package/dist/provider.runtime-jHt6447e.js +0 -2
- package/dist/provider.runtime.js +0 -1
- package/dist/providers-DUy2TaM-.js +0 -59
- package/dist/providers.runtime-Bz0X8DZ2.js +0 -60
- package/dist/providers.runtime.js +0 -1
- package/dist/proxy-env-D4H9qI5l.js +0 -40
- package/dist/proxy-fetch-DiyTLcAR.js +0 -55
- package/dist/proxy-hcRRmsDd.js +0 -121
- package/dist/pw-ai-Cp64-UGh.js +0 -2037
- package/dist/qmd-manager-D2rMomsU.js +0 -1740
- package/dist/qr-cli-DuANCi-n.js +0 -2
- package/dist/qr-cli-lr5CcLr8.js +0 -367
- package/dist/qr-image-DOcoqAUw.js +0 -2
- package/dist/query-expansion-85HlYbKD.js +0 -633
- package/dist/queue-CtO0M_P1.js +0 -663
- package/dist/reaction-runtime-api-B4KmfKtJ.js +0 -114
- package/dist/reactions-5N2KSGJ2.js +0 -258
- package/dist/read-only-account-inspect-Y_ijOKJ3.js +0 -9
- package/dist/read-only-account-inspect.telegram-BSjjDWnM.js +0 -202
- package/dist/reasoning-tags-CAmbBXLr.js +0 -77
- package/dist/recovery-key-store-DqgdfMc7.js +0 -283
- package/dist/redact-BDinS1q9.js +0 -102
- package/dist/redact-identifier-S69DDJn1.js +0 -13
- package/dist/redact-sensitive-url-CAJSZ_7g.js +0 -50
- package/dist/redirect-headers-CGxONG_L.js +0 -25
- package/dist/ref-contract-CC5BLDoS.js +0 -53
- package/dist/region-BFGEM88n.js +0 -62
- package/dist/register-lazy-command-D6EEI-zz.js +0 -43
- package/dist/register.agent-D1eKwVU7.js +0 -239
- package/dist/register.backup-S8hwHpZL.js +0 -236
- package/dist/register.configure-CJrQ3u9y.js +0 -15
- package/dist/register.maintenance-BrKWl7_D.js +0 -449
- package/dist/register.message-BCWJfH2h.js +0 -642
- package/dist/register.onboard-zzNq0pJS.js +0 -79
- package/dist/register.setup-BLQwDKzc.js +0 -104
- package/dist/register.status-health-sessions-B4TUEudf.js +0 -1206
- package/dist/register.subclis-B0pG22H2.js +0 -295
- package/dist/register.subclis-BEM0mzJb.js +0 -3
- package/dist/registry-ByjnKj3u.js +0 -219
- package/dist/registry-CuFNdbH5.js +0 -60
- package/dist/registry-DvqOrcbF.js +0 -675
- package/dist/registry-mVzzlPf7.js +0 -50
- package/dist/repair-IMBZnz-L.js +0 -112
- package/dist/replies-BCoZ2HxY.js +0 -118
- package/dist/reply-D8bUQd-Q.js +0 -3176
- package/dist/reply-blocks-CjCUTZru.js +0 -103
- package/dist/reply-chunking-CxFd5izq.js +0 -3
- package/dist/reply-dispatch-runtime-Bk9RDzB9.js +0 -3
- package/dist/reply-history-DtTaPEgt.js +0 -2
- package/dist/reply-payload-CRYI4jIB.js +0 -232
- package/dist/reply-payloads-CQXH7ury.js +0 -116
- package/dist/reply-payloads-dedupe-BKObDjVe.js +0 -135
- package/dist/reply-payloads-dedupe.runtime-SbVNMvEs.js +0 -2
- package/dist/reply-payloads-dedupe.runtime.js +0 -1
- package/dist/reply-prefix-Eema_xXG.js +0 -39
- package/dist/reply-runtime-DUrpJTzu.js +0 -123
- package/dist/reply.runtime-Cdb_6NI1.js +0 -2
- package/dist/reply.runtime.js +0 -1
- package/dist/request-url-B8k-YRRH.js +0 -10
- package/dist/resolve-C3pJ2gj_.js +0 -174
- package/dist/resolve-C_pCWwC0.js +0 -619
- package/dist/resolve-allowlist-HrJ_3icS.js +0 -147
- package/dist/resolve-cbCi7mbs.js +0 -2
- package/dist/resolve-channels-BTyErRev.js +0 -226
- package/dist/resolve-channels-DvV-fUQv.js +0 -263
- package/dist/resolve-configured-secret-input-string-BasQGOd9.js +0 -112
- package/dist/resolve-route-EE8E7OAF.js +0 -486
- package/dist/resolve-system-bin-TC907QYo.js +0 -120
- package/dist/resolve-targets-B1MvBWpT.js +0 -280
- package/dist/resolve-users-BfVoBZG_.js +0 -145
- package/dist/resolve-utils-ClmKSkEQ.js +0 -102
- package/dist/response-generator-ACP21F1j.js +0 -153
- package/dist/response-prefix-template-Cp4tg6Qw.js +0 -50
- package/dist/restart-sentinel-B3EigRIb.js +0 -70
- package/dist/restart-stale-pids-dsB3eE6_.js +0 -187
- package/dist/retry-CIAqcw7C.js +0 -76
- package/dist/retry-policy-BJ5Q68It.js +0 -58
- package/dist/retry-runtime-Cbu5zDnX.js +0 -3
- package/dist/rooms-B1IyUfuR.js +0 -325
- package/dist/root-help-Bwa-vlhy.js +0 -53
- package/dist/route-reply-bC07YRDb.js +0 -133
- package/dist/route-reply.runtime-dS2XMwkv.js +0 -2
- package/dist/route-reply.runtime.js +0 -1
- package/dist/route-resolution-DQHmIfWN.js +0 -461
- package/dist/routes-CWXihJFR.js +0 -6884
- package/dist/routing-BVt9nMN-.js +0 -16
- package/dist/rpc-5eaI-FsF.js +0 -67
- package/dist/rpc-context-Dimdo4io.js +0 -155
- package/dist/run-command-2jxKF1a6.js +0 -32
- package/dist/run-main-BKeNUaXq.js +0 -425
- package/dist/run-with-concurrency-DGLkItan.js +0 -41
- package/dist/runner-COmi-bB0.js +0 -1479
- package/dist/runs-CX-70k4f.js +0 -616
- package/dist/runtime-1phb9iVo.js +0 -6
- package/dist/runtime-B8hqEtu6.js +0 -181
- package/dist/runtime-BpHrcXgA.js +0 -5
- package/dist/runtime-BscSIjIL.js +0 -126
- package/dist/runtime-C8qvwPYG.js +0 -286
- package/dist/runtime-CBX_rq4O.js +0 -18
- package/dist/runtime-CC1YDOst.js +0 -5
- package/dist/runtime-CIE7xJwu.js +0 -5
- package/dist/runtime-CNZi_czi.js +0 -42
- package/dist/runtime-CPw-0dWW.js +0 -5
- package/dist/runtime-DXdxDbJm.js +0 -102
- package/dist/runtime-DofOSZ5U.js +0 -2153
- package/dist/runtime-api-B4Zb5p1_.js +0 -2
- package/dist/runtime-api-BB2RZPnq.js +0 -2
- package/dist/runtime-api-BJnw1_pK.js +0 -2
- package/dist/runtime-api-BTf2rLCn.js +0 -2
- package/dist/runtime-api-BTgAUySz.js +0 -2
- package/dist/runtime-api-BVftCkYc.js +0 -2484
- package/dist/runtime-api-BWaVsvsK.js +0 -14
- package/dist/runtime-api-BXlE282E.js +0 -2
- package/dist/runtime-api-Ba7wWBWO.js +0 -1
- package/dist/runtime-api-BfZqvwkY.js +0 -2
- package/dist/runtime-api-Bja3afzd.js +0 -3676
- package/dist/runtime-api-C7cX3f2r.js +0 -2
- package/dist/runtime-api-CCKblcQO.js +0 -81
- package/dist/runtime-api-CEmQSooZ.js +0 -2
- package/dist/runtime-api-CWQMIahu.js +0 -241
- package/dist/runtime-api-Ch1E1gvT.js +0 -2
- package/dist/runtime-api-CjgyJEjn.js +0 -2
- package/dist/runtime-api-CuqnElJG.js +0 -3
- package/dist/runtime-api-DOyNJNHi.js +0 -2
- package/dist/runtime-api-DUbp7oPz.js +0 -2
- package/dist/runtime-api-DZDDizAj.js +0 -1
- package/dist/runtime-api-DZcQIyI0.js +0 -1
- package/dist/runtime-api-Di-XE7J4.js +0 -3
- package/dist/runtime-api-Dq7rdsm6.js +0 -2
- package/dist/runtime-api-DxO7sIvA.js +0 -120
- package/dist/runtime-api-Dzz1aWyq.js +0 -29
- package/dist/runtime-api-_dg5Me1l.js +0 -2
- package/dist/runtime-config-snapshot-DqWNFIej.js +0 -2
- package/dist/runtime-d8L2hZ57.js +0 -5
- package/dist/runtime-discord-ops.runtime-C2o0995d.js +0 -25
- package/dist/runtime-discord-ops.runtime.js +0 -1
- package/dist/runtime-embedded-pi.runtime-Bk8vHdbc.js +0 -2
- package/dist/runtime-embedded-pi.runtime.js +0 -1
- package/dist/runtime-entry-BypP0hpR.js +0 -4925
- package/dist/runtime-env-SHKgcATc.js +0 -9
- package/dist/runtime-forwarders-ev8FdVyV.js +0 -44
- package/dist/runtime-group-policy-DXJJCWpk.js +0 -1
- package/dist/runtime-group-policy-zTp8fKRK.js +0 -59
- package/dist/runtime-guard-78ESz4Qy.js +0 -70
- package/dist/runtime-kS8e4c6-.js +0 -125
- package/dist/runtime-media-understanding.runtime-CpPWzWdQ.js +0 -2
- package/dist/runtime-media-understanding.runtime.js +0 -1
- package/dist/runtime-model-auth.runtime-1Gsp1j1n.js +0 -2
- package/dist/runtime-model-auth.runtime.js +0 -1
- package/dist/runtime-parse-vvG9x7Ps.js +0 -83
- package/dist/runtime-paths-NiQSNveu.js +0 -305
- package/dist/runtime-plugin-boundary-CzRNh2jW.js +0 -65
- package/dist/runtime-schema-uKXWjWrD.js +0 -14440
- package/dist/runtime-slack-ops.runtime-MQwSRdp3.js +0 -15
- package/dist/runtime-slack-ops.runtime.js +0 -1
- package/dist/runtime-status-2omGgKaM.js +0 -109
- package/dist/runtime-status-Cc383GkB.js +0 -15
- package/dist/runtime-store-CT3yRBe_.js +0 -22
- package/dist/runtime-tts.runtime-DTfPYn3H.js +0 -2
- package/dist/runtime-tts.runtime.js +0 -1
- package/dist/runtime-uvckmk15.js +0 -68
- package/dist/runtime-web-tools-Cf6BXnCm.js +0 -2042
- package/dist/runtime-whatsapp-boundary-Bs8RrKxP.js +0 -139
- package/dist/runtime-whatsapp-boundary-C5mx67ac.js +0 -2
- package/dist/safe-regex-tLlDZYfM.js +0 -244
- package/dist/safe-text-DhIQbZid.js +0 -16
- package/dist/sandbox-DkZ4-LBj.js +0 -4
- package/dist/sandbox-cli-Cho_k3dA.js +0 -443
- package/dist/sandbox-f4-hZNCj.js +0 -2710
- package/dist/sandbox-paths-Br54mtAJ.js +0 -146
- package/dist/sanitize-env-vars-BpNLWkzd.js +0 -82
- package/dist/scan-paths-Bln7l19-.js +0 -28
- package/dist/schema-validator-DofqBvJi.js +0 -176
- package/dist/scoped-expiring-id-cache-C8wyKEV-.js +0 -35
- package/dist/scp-host-B9NPcVwn.js +0 -62
- package/dist/sdk-Ba91_ru8.js +0 -1108
- package/dist/searxng-search-provider-CUEJoeaQ.js +0 -220
- package/dist/secret-equal-fMR1DjSl.js +0 -9
- package/dist/secret-file-BNKBIds0.js +0 -11
- package/dist/secret-file-DwDmPLSX.js +0 -92
- package/dist/secret-input-4MqmO__N.js +0 -13
- package/dist/secret-input-Bqf5ho4v.js +0 -38
- package/dist/secret-input-DyzcNLLY.js +0 -2
- package/dist/secrets-cli-DAP4hi4r.js +0 -2112
- package/dist/secure-random-Diy9rj1m.js +0 -20
- package/dist/security-cli-2WQVKZ3w.js +0 -477
- package/dist/security-runtime-BSQDlFPi.js +0 -55
- package/dist/semver-compare-DkYCMcwG.js +0 -53
- package/dist/send--GwzHbbI.js +0 -100
- package/dist/send-4ZItW1GB.js +0 -3
- package/dist/send-B1YVZR_q.js +0 -1076
- package/dist/send-B6AgLKhw.js +0 -178
- package/dist/send-CAosrV3E.js +0 -2
- package/dist/send-CTHiX-WN.js +0 -442
- package/dist/send-CywIIzow.js +0 -318
- package/dist/send-DZ2VaVTD.js +0 -856
- package/dist/send-deps-Cuc-dTy5.js +0 -19
- package/dist/send-policy-Dz5lteoO.js +0 -60
- package/dist/send-q09VUMe3.js +0 -532
- package/dist/send.components-Cbi5ixnJ.js +0 -844
- package/dist/send.components-dLe6ppiS.js +0 -2
- package/dist/server-BRW1HQ2M.js +0 -67
- package/dist/server-Clq20rV8.js +0 -27990
- package/dist/server-middleware-Ubw3OFd1.js +0 -108
- package/dist/server-node-events-kgWhdE2I.js +0 -454
- package/dist/server-startup-matrix-migration-DJZgJiUa.js +0 -1348
- package/dist/service-2O78fADl.js +0 -867
- package/dist/service-BCUDr0mF.js +0 -2
- package/dist/session-BIwHn1FL.js +0 -137
- package/dist/session-BJudz6Rb.js +0 -50
- package/dist/session-archive.runtime-8FrIp7MP.js +0 -2
- package/dist/session-archive.runtime.js +0 -1
- package/dist/session-binding-service-D7bUc7mS.js +0 -421
- package/dist/session-context-DbS6R7x0.js +0 -23
- package/dist/session-conversation-5Z-WApq_.js +0 -15
- package/dist/session-conversation-BC-SPGma.js +0 -135
- package/dist/session-conversation-D-Olnomz.js +0 -27
- package/dist/session-cost-usage-5iS5N1Rs.js +0 -651
- package/dist/session-cost-usage-ibiGeH7Z.js +0 -2
- package/dist/session-envelope-RE_1D3fZ.js +0 -18
- package/dist/session-errors-CoC2qhLC.js +0 -63
- package/dist/session-file-CnTnoAyl.js +0 -120
- package/dist/session-fork.runtime-Bb9nNLwX.js +0 -50
- package/dist/session-fork.runtime.js +0 -1
- package/dist/session-hooks-D4zcaOKV.js +0 -109
- package/dist/session-key-CQMUjsSp.js +0 -52
- package/dist/session-key-Do__tq1E.js +0 -279
- package/dist/session-key-normalization-BamCBtxj.js +0 -22
- package/dist/session-override-CHm5auQy.js +0 -100
- package/dist/session-reset-model.runtime-DD5SooaH.js +0 -119
- package/dist/session-reset-model.runtime.js +0 -1
- package/dist/session-route-O1Pb7Oid.js +0 -91
- package/dist/session-store-runtime-ePmbOWO1.js +0 -2
- package/dist/session-subagent-reactivation.runtime-BwUDVflj.js +0 -2
- package/dist/session-subagent-reactivation.runtime.js +0 -1
- package/dist/session-transcript-files.fs-CyBs2u56.js +0 -149
- package/dist/session-updates-C33bkLCm.js +0 -222
- package/dist/session-updates.runtime-BHLQJ71D.js +0 -2
- package/dist/session-updates.runtime.js +0 -1
- package/dist/session-utils-C0HJP9m_.js +0 -1743
- package/dist/session-write-lock-C7svKLqX.js +0 -343
- package/dist/sessions-CkaONOVi.js +0 -224
- package/dist/sessions-Dqj9fL_x.js +0 -2
- package/dist/sessions-j2hbBGOS.js +0 -443
- package/dist/setup-0GrDtpRN.js +0 -427
- package/dist/setup-BrOJEPVN.js +0 -15
- package/dist/setup-adapter-runtime-CyIIvoms.js +0 -2
- package/dist/setup-api-1P88M5pV.js +0 -2
- package/dist/setup-binary-CXmsVXWb.js +0 -2
- package/dist/setup-bootstrap-QdrIAyis.js +0 -54
- package/dist/setup-core-BqPbreVF.js +0 -256
- package/dist/setup-core-CFzSqpD7.js +0 -256
- package/dist/setup-core-DJHWTJKX.js +0 -383
- package/dist/setup-core-DT1fK9yD.js +0 -146
- package/dist/setup-core-kjYyNYvv.js +0 -48
- package/dist/setup-core-t03VZdcn.js +0 -160
- package/dist/setup-group-access-BQbnTk8B.js +0 -70
- package/dist/setup-helpers-0yWIq2cW.js +0 -390
- package/dist/setup-runtime-BChXvJOO.js +0 -4
- package/dist/setup-surface-B8loJ-nJ.js +0 -272
- package/dist/setup-surface-BKizDP2g.js +0 -237
- package/dist/setup-surface-BOd4V0w5.js +0 -261
- package/dist/setup-surface-BaLQtvFW.js +0 -353
- package/dist/setup-surface-Bha7U86Z.js +0 -72
- package/dist/setup-surface-BkHkduRm.js +0 -450
- package/dist/setup-surface-CDfudYpT2.js +0 -261
- package/dist/setup-surface-CT-Erp53.js +0 -346
- package/dist/setup-surface-Co1jSLDk.js +0 -656
- package/dist/setup-surface-D0joW4q1.js +0 -333
- package/dist/setup-surface-D9rWJb4Z.js +0 -1447
- package/dist/setup-surface-D_CJfyJ1.js +0 -381
- package/dist/setup-surface-DbVJ8CAj.js +0 -484
- package/dist/setup-surface-Di1q12ha.js +0 -97
- package/dist/setup-surface-LWupQ_eL.js +0 -304
- package/dist/setup-tools-Cb6PLN3L.js +0 -4
- package/dist/setup-wizard-helpers-CA5yiprq.js +0 -841
- package/dist/setup-wizard-proxy-bmMo6OPA.js +0 -127
- package/dist/setup.finalize-DvGlwfbU.js +0 -443
- package/dist/setup.gateway-config-D_eSo_Jz.js +0 -246
- package/dist/setup.secret-input-BAQnay16.js +0 -25
- package/dist/shared-1nXP7RAM.js +0 -78
- package/dist/shared-6u4-kP5J.js +0 -221
- package/dist/shared-BnSR7joQ.js +0 -144
- package/dist/shared-BsLpgVLV.js +0 -37
- package/dist/shared-C-PSF7Rv.js +0 -64
- package/dist/shared-C1MrVu4M.js +0 -180
- package/dist/shared-CA8QQ_O5.js +0 -94
- package/dist/shared-CCV62W5K.js +0 -2
- package/dist/shared-CHJjz6Zz.js +0 -72
- package/dist/shared-CK49TKED.js +0 -50
- package/dist/shared-CL7I4ij0.js +0 -160
- package/dist/shared-Cr7ijuS4.js +0 -198
- package/dist/shared-D61IX915.js +0 -10
- package/dist/shared-Dr9OQu4c.js +0 -64
- package/dist/shared-DwxV-O-g.js +0 -136
- package/dist/shared-dWHdeoyy.js +0 -126
- package/dist/shared-runtime-yV5uP0IO.js +0 -7
- package/dist/shell-argv-B9p91CMW.js +0 -72
- package/dist/shell-env-BTztt4a1.js +0 -181
- package/dist/signal-B1kD3iF3.js +0 -46
- package/dist/signal-DP8FUJOa.js +0 -6
- package/dist/signal-Dvmeol77.js +0 -13
- package/dist/signal-account-CYKnyxZK.js +0 -11
- package/dist/signal-cli-install-DcmsRDbB.js +0 -188
- package/dist/signal-surface-AbofIH7s.js +0 -21
- package/dist/simple-completion-transport-Dl5DzRWP.js +0 -24
- package/dist/skill-commands-CH4lfyW8.js +0 -77
- package/dist/skill-commands-base-CvVjZByy.js +0 -60
- package/dist/skill-commands-runtime-zpWkVBay.js +0 -2
- package/dist/skill-commands.runtime-BKa5oyH-.js +0 -2
- package/dist/skill-commands.runtime.js +0 -1
- package/dist/skill-scanner-bqroDZTs.js +0 -354
- package/dist/skills-D0K7gu2V.js +0 -972
- package/dist/skills-DFTLIGCd.js +0 -4
- package/dist/skills-clawhub-KJGw0uGT.js +0 -274
- package/dist/skills-cli-DziAPxba.js +0 -369
- package/dist/skills-install-CQeO3Sll.js +0 -819
- package/dist/skills-remote-BojLLDxp.js +0 -584
- package/dist/skills-status-BINZ_svK.js +0 -2
- package/dist/skills-status-CdQUttuP.js +0 -170
- package/dist/slack-BuMSbx3k.js +0 -6
- package/dist/slack-DMg3O5YT.js +0 -9
- package/dist/slack-account-LEbfbXys.js +0 -11
- package/dist/slack-core-oqCiyGw8.js +0 -4
- package/dist/slack-runtime-surface-CyaeT7yk.js +0 -18
- package/dist/slack-surface-1yTIS5Q8.js +0 -44
- package/dist/slack-target-parser-CruIJ5w5.js +0 -12
- package/dist/slack-targets-ukxuKR1I.js +0 -45
- package/dist/slash-commands-CRuXC74L.js +0 -672
- package/dist/slash-commands.runtime-F6b9KUnh.js +0 -20
- package/dist/slash-commands.runtime.js +0 -1
- package/dist/slash-dispatch.runtime-CItGyoBF.js +0 -38
- package/dist/slash-dispatch.runtime.js +0 -1
- package/dist/slash-skill-commands.runtime-Caw0oNvV.js +0 -8
- package/dist/slash-skill-commands.runtime.js +0 -1
- package/dist/slots-Dq-2eIRb.js +0 -93
- package/dist/speech-Ceb4ISD4.js +0 -46
- package/dist/speech-provider-BHjDbut-.js +0 -190
- package/dist/speech-provider-D45m9grJ.js +0 -154
- package/dist/speech-provider-DM1ZXsz2.js +0 -385
- package/dist/speech-runtime-CNvOkPw4.js +0 -34
- package/dist/src-Dn1TYXp6.js +0 -2739
- package/dist/ssh-config-C1ipLHgq.js +0 -77
- package/dist/ssh-tunnel-BwMCLc2e.js +0 -159
- package/dist/ssh-tunnel-D5YdH2SQ.js +0 -2
- package/dist/ssrf-Duye12M_.js +0 -246
- package/dist/ssrf-policy-5L7qS2kK.js +0 -69
- package/dist/ssrf-runtime-bpDM5Bgo.js +0 -5
- package/dist/stable-node-path-n7TARbHZ.js +0 -32
- package/dist/stage-sandbox-media.runtime-Tlgx4F6M.js +0 -229
- package/dist/stage-sandbox-media.runtime.js +0 -1
- package/dist/stagger-Cs-6sySM.js +0 -54
- package/dist/startup-verification-DS8Rlwfj.js +0 -131
- package/dist/state-migrations-ssGF0Trg.js +0 -845
- package/dist/state-paths-LoYjHd5L.js +0 -2
- package/dist/status-B7yRr4OV.js +0 -3
- package/dist/status-BM1Lyqo6.js +0 -261
- package/dist/status-BekOC_tW.js +0 -650
- package/dist/status-CxodlqzZ.js +0 -2
- package/dist/status-DHbl5eIj.js +0 -608
- package/dist/status-PsQV2sfU.js +0 -44
- package/dist/status-all-C53a3881.js +0 -798
- package/dist/status-helpers-CCJSSrVJ.js +0 -170
- package/dist/status-issues-M-RUxHvm.js +0 -336
- package/dist/status-issues-qWKbW6r2.js +0 -187
- package/dist/status-json-B66tF12J.js +0 -86
- package/dist/status.agent-local-B8Sw_p6M.js +0 -59
- package/dist/status.command.text-runtime-csZS5yHm.js +0 -18
- package/dist/status.daemon-D0GzvHft.js +0 -25
- package/dist/status.format-C1VNrTBi.js +0 -44
- package/dist/status.gateway-probe-4INUEsUo.js +0 -15
- package/dist/status.link-channel-CJtR5UX6.js +0 -35
- package/dist/status.node-mode-Bva3wbBI.js +0 -2
- package/dist/status.node-mode-CneoXHPW.js +0 -32
- package/dist/status.scan-t1kfm4e0.js +0 -264
- package/dist/status.scan.deps.runtime-CCaTJlzV.js +0 -18
- package/dist/status.scan.deps.runtime.js +0 -1
- package/dist/status.scan.fast-json-DmzN3HuU.js +0 -97
- package/dist/status.scan.fast-json-gu6uL_BR.js +0 -2
- package/dist/status.scan.json-core-JjMIy9YZ.js +0 -254
- package/dist/status.scan.runtime-r_5mTC8f.js +0 -9
- package/dist/status.scan.runtime.js +0 -1
- package/dist/status.service-summary-DnbDBXMs.js +0 -32
- package/dist/status.summary-CbEhZE0h.js +0 -210
- package/dist/status.summary-SLm6uT22.js +0 -2
- package/dist/status.update-Bw9CvcCc.js +0 -2
- package/dist/status.update-CLnevxJb.js +0 -79
- package/dist/sticker-cache-C_FrWgaA.js +0 -1573
- package/dist/sticker-vision.runtime-DR7e08nD.js +0 -16
- package/dist/sticker-vision.runtime.js +0 -1
- package/dist/storage-CPQLpmgN.js +0 -234
- package/dist/storage-paths-DvC4vQo1.js +0 -51
- package/dist/store-8ONMiMTI.js +0 -365
- package/dist/store-DQJZr0Yf.js +0 -767
- package/dist/store-Dxcm2vsw.js +0 -140
- package/dist/store-_OZh8RrM.js +0 -1343
- package/dist/store-read-JHUhrL0Z.js +0 -16
- package/dist/store.runtime-Dmqv-8M7.js +0 -2
- package/dist/store.runtime.js +0 -1
- package/dist/stream-CGrFe0j0.js +0 -123
- package/dist/stream-D9HOuZmn.js +0 -633
- package/dist/stream-Di_JOWoE.js +0 -180
- package/dist/stream-wrappers-D-DlMIYG.js +0 -136
- package/dist/string-normalization-Ddc4JXRe.js +0 -19
- package/dist/string-normalization-runtime-CCsvs1ds.js +0 -1
- package/dist/string-sample-BIWt11jp.js +0 -11
- package/dist/strip-inbound-meta-DvHTlpJG.js +0 -155
- package/dist/subagent-orphan-recovery-Do8Az2RD.js +0 -206
- package/dist/subagent-registry-runtime-D5PNyCsh.js +0 -2
- package/dist/subcli-descriptors-Dasenv4J.js +0 -151
- package/dist/subsystem-C9VSlEcV.js +0 -582
- package/dist/supervisor-log.runtime-CZe76kAj.js +0 -8
- package/dist/supervisor-log.runtime.js +0 -1
- package/dist/system-cli-2-HDh_Ev.js +0 -58
- package/dist/system-events-5SDw3lix.js +0 -93
- package/dist/system-events-BuGmSpuG.js +0 -34
- package/dist/system-message-0oem5MWV.js +0 -16
- package/dist/system-run-command-BmlO5dn2.js +0 -301
- package/dist/systemd-B2HBHMpF.js +0 -588
- package/dist/systemd-hints-DkRlAuPR.js +0 -325
- package/dist/systemd-linger-BBPBJSm0.js +0 -68
- package/dist/systemd-linger-DiWO9n2E.js +0 -2
- package/dist/table-CY2XIg3l.js +0 -305
- package/dist/tables-D6qL6k4d.js +0 -832
- package/dist/tailnet-CZMxMuGK.js +0 -76
- package/dist/tailscale-mpS_cTve.js +0 -238
- package/dist/tailscale-status-Dg2Iov5f.js +0 -71
- package/dist/target-errors-ThNFqo8X.js +0 -26
- package/dist/target-ids-O3O6piTN.js +0 -76
- package/dist/target-parsing-Boyj_2v0.js +0 -41
- package/dist/target-registry-BHJcVSo1.js +0 -1269
- package/dist/targets-C7I_wjs2.js +0 -283
- package/dist/targets-CZA632lq.js +0 -39
- package/dist/targets-Dz1dx4G8.js +0 -78
- package/dist/targets-Zd0-pJu7.js +0 -748
- package/dist/targets-krmeAAxz.js +0 -70
- package/dist/task-registry-delivery-runtime-BnkUa6Mp.js +0 -2
- package/dist/task-registry.audit-DbCRt5MR.js +0 -320
- package/dist/task-registry.audit.shared-SH4MOLKM.js +0 -18
- package/dist/task-registry.maintenance-DfZmDWog.js +0 -2
- package/dist/task-registry.summary-SoFiECCc.js +0 -44
- package/dist/tavily-search-provider-BCY1kfQB.js +0 -227
- package/dist/telegram/audit.js +0 -2
- package/dist/telegram/token.js +0 -2
- package/dist/telegram-Cq20PSxw.js +0 -23
- package/dist/telegram-account-vRRwyfuA.js +0 -11
- package/dist/telegram-command-config-BiHhXScJ.js +0 -1
- package/dist/telegram-core-DTJayyAj.js +0 -6
- package/dist/telegram-custom-commands-C-nv8yoB.js +0 -75
- package/dist/temp-download-Ccatr7zI.js +0 -62
- package/dist/temp-path-JU2kkd64.js +0 -2
- package/dist/templating-Bu436Euy.js +0 -24
- package/dist/testing-BrrgubIp.js +0 -690
- package/dist/text-chunking-BTs2yTSd.js +0 -12
- package/dist/text-chunking-ByXwyFNP.js +0 -20
- package/dist/text-format-lEYRGxj5.js +0 -8
- package/dist/text-runtime-D9ApM_8O.js +0 -398
- package/dist/theme-Bb-qluq6.js +0 -2
- package/dist/theme-wBMZmJzz.js +0 -34
- package/dist/thinking-Dga2zdtd.js +0 -68
- package/dist/thinking.shared-D6IkoLJU.js +0 -243
- package/dist/thread-bindings-BMnz7w-V.js +0 -219
- package/dist/thread-bindings-BbQWOcMr.js +0 -352
- package/dist/thread-bindings-Bv0I9sBY.js +0 -534
- package/dist/thread-bindings-C3jMrVvp.js +0 -778
- package/dist/thread-bindings-policy-Br8s4hQ6.js +0 -172
- package/dist/thread-bindings-runtime-CbG63N4N.js +0 -2
- package/dist/thread-bindings-shared-DjSYaoHi.js +0 -95
- package/dist/thread-bindings.discord-api-NFR5qsWt.js +0 -487
- package/dist/thread-ownership-DG810AQi.js +0 -3
- package/dist/threading-1Z_3y_Dp.js +0 -2
- package/dist/threading-Hl8nWez6.js +0 -832
- package/dist/threading-helpers-BpqyeyAU.js +0 -14
- package/dist/threading-tool-context-DxV30qIW.js +0 -157
- package/dist/timeouts-B1NiHSGi.js +0 -74
- package/dist/tlon-C54Qojl0.js +0 -20
- package/dist/tmp-openclaw-dir-B44_vmJv.js +0 -102
- package/dist/token-BlUJQi_X.js +0 -2
- package/dist/token-CDYFJvj8.js +0 -82
- package/dist/token-kCjtGElJ.js +0 -45
- package/dist/tokens-C2f9Klbt.js +0 -66
- package/dist/tool-actions.runtime-aB0DgLk7.js +0 -532
- package/dist/tool-actions.runtime.js +0 -1
- package/dist/tool-display-C7h9IZa_.js +0 -1607
- package/dist/tool-images-BDUvc_pd.js +0 -270
- package/dist/tool-mutation-DIBpIegg.js +0 -140
- package/dist/tool-policy-FUm_F19C.js +0 -515
- package/dist/tool-policy-match-CCFHTsu9.js +0 -49
- package/dist/tool-send-DClM4vsZ.js +0 -16
- package/dist/tools-54j1hYBv.js +0 -123
- package/dist/tools-effective-inventory-C09suj6-.js +0 -148
- package/dist/tools.runtime-VBFxIXC8.js +0 -4
- package/dist/tools.runtime.js +0 -1
- package/dist/transcript-events-Dc7U5QmQ.js +0 -29
- package/dist/transport-ready-Cje3USX4.js +0 -36
- package/dist/tts-CTM9C09A.js +0 -2
- package/dist/tts-Ck_K3tIi.js +0 -84
- package/dist/tts-auto-mode-bD-u2biE.js +0 -14
- package/dist/tts-bTuorllO.js +0 -102
- package/dist/tts-eOLiJF6d.js +0 -29
- package/dist/tts.runtime-ChTwy0yH.js +0 -3
- package/dist/tts.runtime.js +0 -1
- package/dist/tui-CrM-Bz3i.js +0 -3899
- package/dist/tui-cli-aVL5aPGw.js +0 -31
- package/dist/twitch-CFFlkhYG.js +0 -15
- package/dist/typebox-DmerPHaM.js +0 -22
- package/dist/types-BzNSmNk3.js +0 -12
- package/dist/types-DAzqpvqD.js +0 -83
- package/dist/types-DVJVELY7.js +0 -471
- package/dist/types-DqNppUoh.js +0 -15
- package/dist/types.secrets-BpcqHPAv.js +0 -80
- package/dist/types.tools-BTQL6INB.js +0 -22
- package/dist/typing-BnCchGtL.js +0 -8
- package/dist/typing-Bugg5LPP.js +0 -68
- package/dist/typing-J_ktpWeA.js +0 -2
- package/dist/typing-mode-DDYL_0TG.js +0 -75
- package/dist/typing-policy-CaZhrM-F.js +0 -11
- package/dist/typing-start-guard-Cgjgzy5e.js +0 -73
- package/dist/ui-BLDY9-7R.js +0 -212
- package/dist/undici-global-dispatcher-CcNdQ7Dt.js +0 -99
- package/dist/unhandled-rejections-CA_e1R-O.js +0 -2
- package/dist/unhandled-rejections-V7U9keRG.js +0 -241
- package/dist/update-CcALvtl_.js +0 -1253
- package/dist/update-channels-Dn1F57Kf.js +0 -78
- package/dist/update-check-CoDVxy35.js +0 -354
- package/dist/update-cli-BWOYy_Mp.js +0 -1447
- package/dist/update-offset-store-BLZmshZE.js +0 -75
- package/dist/usage-CC7-wLUi.js +0 -39
- package/dist/usage-format-C7nMV1jc.js +0 -513
- package/dist/utils-CN_F_3Qg.js +0 -243
- package/dist/utils-Cgw9Y0-Q.js +0 -2
- package/dist/validation-BNNAUmDO.js +0 -18521
- package/dist/verification-B4ogZ29M.js +0 -130
- package/dist/verification-B99uVIxo.js +0 -2
- package/dist/version-BNzJ37Re.js +0 -79
- package/dist/version-Dw0eJ-1F.js +0 -2
- package/dist/voice-call-Dt6m6oA3.js +0 -4
- package/dist/wait-YXJvtMmp.js +0 -7
- package/dist/warning-filter-GX8LpGKz.js +0 -57
- package/dist/web-fetch-utils-CoVia2ez.js +0 -413
- package/dist/web-media-D9opLz21.js +0 -2
- package/dist/web-media-DHlguFej.js +0 -339
- package/dist/web-search-BcSDWJK9.js +0 -169
- package/dist/web-search-providers-CqY6CVp3.js +0 -21
- package/dist/web-search-providers.runtime-BHjzPQW-.js +0 -113
- package/dist/web-search-providers.runtime.js +0 -1
- package/dist/web-search-providers.shared-CMeQec8y.js +0 -421
- package/dist/web-search-shared-B5mHm7QD.js +0 -87
- package/dist/webhook-ingress-CTl81NUR.js +0 -164
- package/dist/webhook-memory-guards-B6k3g-po.js +0 -129
- package/dist/webhook-path-CklCw5kp.js +0 -22
- package/dist/webhook-request-guards-CxDPmU9e.js +0 -178
- package/dist/webhook-shared-Bw9wLe6L.js +0 -370
- package/dist/webhooks-cli-DPRITERU.js +0 -326
- package/dist/whatsapp-CSzf1Nu0.js +0 -5
- package/dist/whatsapp-D18Otn45.js +0 -30
- package/dist/whatsapp-auth-presence-B5GZUgTA.js +0 -41
- package/dist/whatsapp-core-Be0P_p4R.js +0 -7
- package/dist/whatsapp-heartbeat-a2-OB01n.js +0 -85
- package/dist/whatsapp-shared-ChjLiMDw.js +0 -56
- package/dist/whatsapp-shared-FR_Jw-NH.js +0 -4
- package/dist/whatsapp-surface-Dwrfi_SD.js +0 -26
- package/dist/whatsapp-targets-59A3BDBi.js +0 -13
- package/dist/widearea-dns-CfQt6b3q.js +0 -125
- package/dist/windows-argv-DDAf3waz.js +0 -345
- package/dist/windows-install-roots-XI3CvO9O.js +0 -149
- package/dist/windows-spawn-DKvkg_66.js +0 -154
- package/dist/with-timeout-B2smrGj0.js +0 -214
- package/dist/with-timeout-BmJKiOMd.js +0 -13
- package/dist/workflow-summary-BMvffn8D.js +0 -2
- package/dist/workflow-summary-NvN5lUvK.js +0 -167
- package/dist/workspace-D5P9nuJd.js +0 -479
- package/dist/workspace-D5UiPYKk.js +0 -306
- package/dist/workspace-dirs-CRv8Jwfz.js +0 -13
- package/dist/ws-97FEIc7w.js +0 -11
- package/dist/ws-log-BaAOgG9m.js +0 -281
- package/dist/ws-logging-M92fgmyp.js +0 -10
- package/dist/wsl-ytdRZp54.js +0 -57
- package/dist/x-search-FsMNZ7d0.js +0 -166
- package/dist/x-search-shared-D0tVMJk9.js +0 -124
- package/dist/zalo-CNoa7XH7.js +0 -13
- package/dist/zalo-js-HktBGDbg.js +0 -1156
- package/dist/zalo-setup-BT-xGElf.js +0 -14
- package/dist/zalouser-TwyfhIYz.js +0 -22
- package/dist/zod-1Wegy5nx.js +0 -7
- package/dist/zod-parse-HlGwTZP3.js +0 -14
- package/dist/zod-schema.agent-runtime-DFC7a3eV.js +0 -602
- package/dist/zod-schema.core-C1Ewlj9j.js +0 -520
- package/dist/zod-schema.providers-core-Bmbs-R4l.js +0 -1541
- package/dist/zod-schema.providers-whatsapp-CanJPkvb.js +0 -132
- package/dist/zod-schema.sensitive-DEzKzMxI.js +0 -5
|
@@ -1,3315 +0,0 @@
|
|
|
1
|
-
import { t as createDedupeCache } from "./dedupe-DZbQYOSD.js";
|
|
2
|
-
import { d as MAX_IMAGE_BYTES } from "./mime-DkaKoCVP.js";
|
|
3
|
-
import { n as fetchWithSsrFGuard } from "./fetch-guard-BnhVFBtf.js";
|
|
4
|
-
import { l as saveMediaBuffer } from "./store-8ONMiMTI.js";
|
|
5
|
-
import { n as fetchRemoteMedia } from "./fetch-7dbKQPT5.js";
|
|
6
|
-
import { t as createLoggerBackedRuntime } from "./runtime-CNZi_czi.js";
|
|
7
|
-
import { a as ssrfPolicyFromAllowPrivateNetwork } from "./ssrf-policy-5L7qS2kK.js";
|
|
8
|
-
import "./ssrf-runtime-bpDM5Bgo.js";
|
|
9
|
-
import "./media-runtime-8QR_uTs0.js";
|
|
10
|
-
import { d as normalizeShip, f as parseChannelNest, l as resolveTlonAccount, m as resolveTlonOutboundTarget, p as parseTlonTarget, s as validateUrbitBaseUrl, u as formatTargetHint } from "./setup-core-DJHWTJKX.js";
|
|
11
|
-
import { t as getTlonRuntime } from "./runtime-CPw-0dWW.js";
|
|
12
|
-
import "./runtime-api-BJnw1_pK.js";
|
|
13
|
-
import "./api-DasNTWRo.js";
|
|
14
|
-
import { t as tlonSetupWizard } from "./setup-surface-Bha7U86Z.js";
|
|
15
|
-
import * as path$1 from "node:path";
|
|
16
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
17
|
-
import crypto, { randomBytes, randomUUID } from "node:crypto";
|
|
18
|
-
import { Readable } from "node:stream";
|
|
19
|
-
import { da, scot } from "@urbit/aura";
|
|
20
|
-
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
21
|
-
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
22
|
-
//#region extensions/tlon/src/settings.ts
|
|
23
|
-
const SETTINGS_DESK = "moltbot";
|
|
24
|
-
const SETTINGS_BUCKET = "tlon";
|
|
25
|
-
/**
|
|
26
|
-
* Parse channelRules - handles both JSON string and object formats.
|
|
27
|
-
* Settings-store doesn't support nested objects, so we store as JSON string.
|
|
28
|
-
*/
|
|
29
|
-
function parseChannelRules(value) {
|
|
30
|
-
if (!value) return;
|
|
31
|
-
if (typeof value === "string") try {
|
|
32
|
-
const parsed = JSON.parse(value);
|
|
33
|
-
if (isChannelRulesObject(parsed)) return parsed;
|
|
34
|
-
} catch {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (isChannelRulesObject(value)) return value;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Parse settings from the raw Urbit settings-store response.
|
|
41
|
-
* The response shape is: { [bucket]: { [key]: value } }
|
|
42
|
-
*/
|
|
43
|
-
function parseSettingsResponse(raw) {
|
|
44
|
-
if (!raw || typeof raw !== "object") return {};
|
|
45
|
-
const bucket = raw[SETTINGS_BUCKET];
|
|
46
|
-
if (!bucket || typeof bucket !== "object") return {};
|
|
47
|
-
const settings = bucket;
|
|
48
|
-
return {
|
|
49
|
-
groupChannels: Array.isArray(settings.groupChannels) ? settings.groupChannels.filter((x) => typeof x === "string") : void 0,
|
|
50
|
-
dmAllowlist: Array.isArray(settings.dmAllowlist) ? settings.dmAllowlist.filter((x) => typeof x === "string") : void 0,
|
|
51
|
-
autoDiscover: typeof settings.autoDiscover === "boolean" ? settings.autoDiscover : void 0,
|
|
52
|
-
showModelSig: typeof settings.showModelSig === "boolean" ? settings.showModelSig : void 0,
|
|
53
|
-
autoAcceptDmInvites: typeof settings.autoAcceptDmInvites === "boolean" ? settings.autoAcceptDmInvites : void 0,
|
|
54
|
-
autoAcceptGroupInvites: typeof settings.autoAcceptGroupInvites === "boolean" ? settings.autoAcceptGroupInvites : void 0,
|
|
55
|
-
groupInviteAllowlist: Array.isArray(settings.groupInviteAllowlist) ? settings.groupInviteAllowlist.filter((x) => typeof x === "string") : void 0,
|
|
56
|
-
channelRules: parseChannelRules(settings.channelRules),
|
|
57
|
-
defaultAuthorizedShips: Array.isArray(settings.defaultAuthorizedShips) ? settings.defaultAuthorizedShips.filter((x) => typeof x === "string") : void 0,
|
|
58
|
-
ownerShip: typeof settings.ownerShip === "string" ? settings.ownerShip : void 0,
|
|
59
|
-
pendingApprovals: parsePendingApprovals(settings.pendingApprovals)
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function isChannelRulesObject(val) {
|
|
63
|
-
if (!val || typeof val !== "object" || Array.isArray(val)) return false;
|
|
64
|
-
for (const [, rule] of Object.entries(val)) if (!rule || typeof rule !== "object") return false;
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Parse pendingApprovals - handles both JSON string and array formats.
|
|
69
|
-
* Settings-store stores complex objects as JSON strings.
|
|
70
|
-
*/
|
|
71
|
-
function parsePendingApprovals(value) {
|
|
72
|
-
if (!value) return;
|
|
73
|
-
let parsed = value;
|
|
74
|
-
if (typeof value === "string") try {
|
|
75
|
-
parsed = JSON.parse(value);
|
|
76
|
-
} catch {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (!Array.isArray(parsed)) return;
|
|
80
|
-
return parsed.filter((item) => {
|
|
81
|
-
if (!item || typeof item !== "object") return false;
|
|
82
|
-
const obj = item;
|
|
83
|
-
return typeof obj.id === "string" && (obj.type === "dm" || obj.type === "channel" || obj.type === "group") && typeof obj.requestingShip === "string" && typeof obj.timestamp === "number";
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Parse a single settings entry update event.
|
|
88
|
-
*/
|
|
89
|
-
function parseSettingsEvent(event) {
|
|
90
|
-
if (!event || typeof event !== "object") return null;
|
|
91
|
-
const evt = event;
|
|
92
|
-
if (evt["put-entry"]) {
|
|
93
|
-
const put = evt["put-entry"];
|
|
94
|
-
if (put.desk !== SETTINGS_DESK || put["bucket-key"] !== SETTINGS_BUCKET) return null;
|
|
95
|
-
return {
|
|
96
|
-
key: String(put["entry-key"] ?? ""),
|
|
97
|
-
value: put.value
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (evt["del-entry"]) {
|
|
101
|
-
const del = evt["del-entry"];
|
|
102
|
-
if (del.desk !== SETTINGS_DESK || del["bucket-key"] !== SETTINGS_BUCKET) return null;
|
|
103
|
-
return {
|
|
104
|
-
key: String(del["entry-key"] ?? ""),
|
|
105
|
-
value: void 0
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Apply a single settings update to the current state.
|
|
112
|
-
*/
|
|
113
|
-
function applySettingsUpdate(current, key, value) {
|
|
114
|
-
const next = { ...current };
|
|
115
|
-
switch (key) {
|
|
116
|
-
case "groupChannels":
|
|
117
|
-
next.groupChannels = Array.isArray(value) ? value.filter((x) => typeof x === "string") : void 0;
|
|
118
|
-
break;
|
|
119
|
-
case "dmAllowlist":
|
|
120
|
-
next.dmAllowlist = Array.isArray(value) ? value.filter((x) => typeof x === "string") : void 0;
|
|
121
|
-
break;
|
|
122
|
-
case "autoDiscover":
|
|
123
|
-
next.autoDiscover = typeof value === "boolean" ? value : void 0;
|
|
124
|
-
break;
|
|
125
|
-
case "showModelSig":
|
|
126
|
-
next.showModelSig = typeof value === "boolean" ? value : void 0;
|
|
127
|
-
break;
|
|
128
|
-
case "autoAcceptDmInvites":
|
|
129
|
-
next.autoAcceptDmInvites = typeof value === "boolean" ? value : void 0;
|
|
130
|
-
break;
|
|
131
|
-
case "autoAcceptGroupInvites":
|
|
132
|
-
next.autoAcceptGroupInvites = typeof value === "boolean" ? value : void 0;
|
|
133
|
-
break;
|
|
134
|
-
case "groupInviteAllowlist":
|
|
135
|
-
next.groupInviteAllowlist = Array.isArray(value) ? value.filter((x) => typeof x === "string") : void 0;
|
|
136
|
-
break;
|
|
137
|
-
case "channelRules":
|
|
138
|
-
next.channelRules = parseChannelRules(value);
|
|
139
|
-
break;
|
|
140
|
-
case "defaultAuthorizedShips":
|
|
141
|
-
next.defaultAuthorizedShips = Array.isArray(value) ? value.filter((x) => typeof x === "string") : void 0;
|
|
142
|
-
break;
|
|
143
|
-
case "ownerShip":
|
|
144
|
-
next.ownerShip = typeof value === "string" ? value : void 0;
|
|
145
|
-
break;
|
|
146
|
-
case "pendingApprovals":
|
|
147
|
-
next.pendingApprovals = parsePendingApprovals(value);
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
return next;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Create a settings store subscription manager.
|
|
154
|
-
*
|
|
155
|
-
* Usage:
|
|
156
|
-
* const settings = createSettingsManager(api, logger);
|
|
157
|
-
* await settings.load();
|
|
158
|
-
* settings.subscribe((newSettings) => { ... });
|
|
159
|
-
*/
|
|
160
|
-
function createSettingsManager(api, logger) {
|
|
161
|
-
let state = {
|
|
162
|
-
current: {},
|
|
163
|
-
loaded: false
|
|
164
|
-
};
|
|
165
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
166
|
-
const notify = () => {
|
|
167
|
-
for (const listener of listeners) try {
|
|
168
|
-
listener(state.current);
|
|
169
|
-
} catch (err) {
|
|
170
|
-
logger?.error?.(`[settings] Listener error: ${String(err)}`);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
return {
|
|
174
|
-
get current() {
|
|
175
|
-
return state.current;
|
|
176
|
-
},
|
|
177
|
-
get loaded() {
|
|
178
|
-
return state.loaded;
|
|
179
|
-
},
|
|
180
|
-
async load() {
|
|
181
|
-
try {
|
|
182
|
-
const deskData = (await api.scry("/settings/all.json"))?.all?.[SETTINGS_DESK];
|
|
183
|
-
state.current = parseSettingsResponse(deskData ?? {});
|
|
184
|
-
state.loaded = true;
|
|
185
|
-
logger?.log?.(`[settings] Loaded: ${JSON.stringify(state.current)}`);
|
|
186
|
-
return state.current;
|
|
187
|
-
} catch (err) {
|
|
188
|
-
logger?.log?.(`[settings] No settings found (using defaults): ${String(err)}`);
|
|
189
|
-
state.current = {};
|
|
190
|
-
state.loaded = true;
|
|
191
|
-
return state.current;
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
async startSubscription() {
|
|
195
|
-
await api.subscribe({
|
|
196
|
-
app: "settings",
|
|
197
|
-
path: "/desk/" + SETTINGS_DESK,
|
|
198
|
-
event: (event) => {
|
|
199
|
-
const update = parseSettingsEvent(event);
|
|
200
|
-
if (!update) return;
|
|
201
|
-
logger?.log?.(`[settings] Update: ${update.key} = ${JSON.stringify(update.value)}`);
|
|
202
|
-
state.current = applySettingsUpdate(state.current, update.key, update.value);
|
|
203
|
-
notify();
|
|
204
|
-
},
|
|
205
|
-
err: (error) => {
|
|
206
|
-
logger?.error?.(`[settings] Subscription error: ${String(error)}`);
|
|
207
|
-
},
|
|
208
|
-
quit: () => {
|
|
209
|
-
logger?.log?.("[settings] Subscription ended");
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
logger?.log?.("[settings] Subscribed to settings updates");
|
|
213
|
-
},
|
|
214
|
-
onChange(listener) {
|
|
215
|
-
listeners.add(listener);
|
|
216
|
-
return () => listeners.delete(listener);
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region extensions/tlon/src/urbit/errors.ts
|
|
222
|
-
var UrbitError = class extends Error {
|
|
223
|
-
constructor(code, message, options) {
|
|
224
|
-
super(message, options);
|
|
225
|
-
this.name = "UrbitError";
|
|
226
|
-
this.code = code;
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
var UrbitUrlError = class extends UrbitError {
|
|
230
|
-
constructor(message, options) {
|
|
231
|
-
super("invalid_url", message, options);
|
|
232
|
-
this.name = "UrbitUrlError";
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
var UrbitHttpError = class extends UrbitError {
|
|
236
|
-
constructor(params) {
|
|
237
|
-
const suffix = params.bodyText ? ` - ${params.bodyText}` : "";
|
|
238
|
-
super("http_error", `${params.operation} failed: ${params.status}${suffix}`, { cause: params.cause });
|
|
239
|
-
this.name = "UrbitHttpError";
|
|
240
|
-
this.status = params.status;
|
|
241
|
-
this.operation = params.operation;
|
|
242
|
-
this.bodyText = params.bodyText;
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
var UrbitAuthError = class extends UrbitError {
|
|
246
|
-
constructor(code, message, options) {
|
|
247
|
-
super(code, message, options);
|
|
248
|
-
this.name = "UrbitAuthError";
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
//#endregion
|
|
252
|
-
//#region extensions/tlon/src/urbit/fetch.ts
|
|
253
|
-
async function urbitFetch(params) {
|
|
254
|
-
const validated = validateUrbitBaseUrl(params.baseUrl);
|
|
255
|
-
if (!validated.ok) throw new UrbitUrlError(validated.error);
|
|
256
|
-
return await fetchWithSsrFGuard({
|
|
257
|
-
url: new URL(params.path, validated.baseUrl).toString(),
|
|
258
|
-
fetchImpl: params.fetchImpl,
|
|
259
|
-
init: params.init,
|
|
260
|
-
timeoutMs: params.timeoutMs,
|
|
261
|
-
maxRedirects: params.maxRedirects,
|
|
262
|
-
signal: params.signal,
|
|
263
|
-
policy: params.ssrfPolicy,
|
|
264
|
-
lookupFn: params.lookupFn,
|
|
265
|
-
auditContext: params.auditContext,
|
|
266
|
-
pinDns: params.pinDns
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region extensions/tlon/src/urbit/auth.ts
|
|
271
|
-
async function authenticate(url, code, options = {}) {
|
|
272
|
-
const { response, release } = await urbitFetch({
|
|
273
|
-
baseUrl: url,
|
|
274
|
-
path: "/~/login",
|
|
275
|
-
init: {
|
|
276
|
-
method: "POST",
|
|
277
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
278
|
-
body: new URLSearchParams({ password: code }).toString()
|
|
279
|
-
},
|
|
280
|
-
ssrfPolicy: options.ssrfPolicy,
|
|
281
|
-
lookupFn: options.lookupFn,
|
|
282
|
-
fetchImpl: options.fetchImpl,
|
|
283
|
-
timeoutMs: options.timeoutMs ?? 15e3,
|
|
284
|
-
maxRedirects: 3,
|
|
285
|
-
auditContext: "tlon-urbit-login"
|
|
286
|
-
});
|
|
287
|
-
try {
|
|
288
|
-
if (!response.ok) throw new UrbitAuthError("auth_failed", `Login failed with status ${response.status}`);
|
|
289
|
-
await response.text().catch(() => {});
|
|
290
|
-
const cookie = response.headers.get("set-cookie");
|
|
291
|
-
if (!cookie) throw new UrbitAuthError("missing_cookie", "No authentication cookie received");
|
|
292
|
-
return cookie;
|
|
293
|
-
} finally {
|
|
294
|
-
await release();
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region extensions/tlon/src/urbit/context.ts
|
|
299
|
-
function resolveShipFromHostname(hostname) {
|
|
300
|
-
const trimmed = hostname.trim().toLowerCase().replace(/\.$/, "");
|
|
301
|
-
if (!trimmed) return "";
|
|
302
|
-
if (trimmed.includes(".")) return trimmed.split(".")[0] ?? trimmed;
|
|
303
|
-
return trimmed;
|
|
304
|
-
}
|
|
305
|
-
function normalizeUrbitShip(ship, hostname) {
|
|
306
|
-
return (ship?.replace(/^~/, "") ?? resolveShipFromHostname(hostname)).trim();
|
|
307
|
-
}
|
|
308
|
-
function normalizeUrbitCookie(cookie) {
|
|
309
|
-
return cookie.split(";")[0] ?? cookie;
|
|
310
|
-
}
|
|
311
|
-
function getUrbitContext(url, ship) {
|
|
312
|
-
const validated = validateUrbitBaseUrl(url);
|
|
313
|
-
if (!validated.ok) throw new UrbitUrlError(validated.error);
|
|
314
|
-
return {
|
|
315
|
-
baseUrl: validated.baseUrl,
|
|
316
|
-
hostname: validated.hostname,
|
|
317
|
-
ship: normalizeUrbitShip(ship, validated.hostname)
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Get the default SSRF policy for image uploads.
|
|
322
|
-
* Uses a restrictive policy that blocks private networks by default.
|
|
323
|
-
*/
|
|
324
|
-
function getDefaultSsrFPolicy() {}
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region extensions/tlon/src/urbit/story.ts
|
|
327
|
-
/**
|
|
328
|
-
* Parse inline markdown formatting (bold, italic, code, links, mentions)
|
|
329
|
-
*/
|
|
330
|
-
function parseInlineMarkdown(text) {
|
|
331
|
-
const result = [];
|
|
332
|
-
let remaining = text;
|
|
333
|
-
while (remaining.length > 0) {
|
|
334
|
-
const shipMatch = remaining.match(/^(~[a-z][-a-z0-9]*)/);
|
|
335
|
-
if (shipMatch) {
|
|
336
|
-
result.push({ ship: shipMatch[1] });
|
|
337
|
-
remaining = remaining.slice(shipMatch[0].length);
|
|
338
|
-
continue;
|
|
339
|
-
}
|
|
340
|
-
const boldMatch = remaining.match(/^\*\*(.+?)\*\*|^__(.+?)__/);
|
|
341
|
-
if (boldMatch) {
|
|
342
|
-
const content = boldMatch[1] || boldMatch[2];
|
|
343
|
-
result.push({ bold: parseInlineMarkdown(content) });
|
|
344
|
-
remaining = remaining.slice(boldMatch[0].length);
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
const italicsMatch = remaining.match(/^\*([^*]+?)\*|^_([^_]+?)_(?![a-zA-Z0-9])/);
|
|
348
|
-
if (italicsMatch) {
|
|
349
|
-
const content = italicsMatch[1] || italicsMatch[2];
|
|
350
|
-
result.push({ italics: parseInlineMarkdown(content) });
|
|
351
|
-
remaining = remaining.slice(italicsMatch[0].length);
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
const strikeMatch = remaining.match(/^~~(.+?)~~/);
|
|
355
|
-
if (strikeMatch) {
|
|
356
|
-
result.push({ strike: parseInlineMarkdown(strikeMatch[1]) });
|
|
357
|
-
remaining = remaining.slice(strikeMatch[0].length);
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
const codeMatch = remaining.match(/^`([^`]+)`/);
|
|
361
|
-
if (codeMatch) {
|
|
362
|
-
result.push({ "inline-code": codeMatch[1] });
|
|
363
|
-
remaining = remaining.slice(codeMatch[0].length);
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
const linkMatch = remaining.match(/^\[([^\]]+)\]\(([^)]+)\)/);
|
|
367
|
-
if (linkMatch) {
|
|
368
|
-
result.push({ link: {
|
|
369
|
-
href: linkMatch[2],
|
|
370
|
-
content: linkMatch[1]
|
|
371
|
-
} });
|
|
372
|
-
remaining = remaining.slice(linkMatch[0].length);
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
const imageMatch = remaining.match(/^!\[([^\]]*)\]\(([^)]+)\)/);
|
|
376
|
-
if (imageMatch) {
|
|
377
|
-
result.push({ __image: {
|
|
378
|
-
src: imageMatch[2],
|
|
379
|
-
alt: imageMatch[1]
|
|
380
|
-
} });
|
|
381
|
-
remaining = remaining.slice(imageMatch[0].length);
|
|
382
|
-
continue;
|
|
383
|
-
}
|
|
384
|
-
const urlMatch = remaining.match(/^(https?:\/\/[^\s<>"\]]+)/);
|
|
385
|
-
if (urlMatch) {
|
|
386
|
-
result.push({ link: {
|
|
387
|
-
href: urlMatch[1],
|
|
388
|
-
content: urlMatch[1]
|
|
389
|
-
} });
|
|
390
|
-
remaining = remaining.slice(urlMatch[0].length);
|
|
391
|
-
continue;
|
|
392
|
-
}
|
|
393
|
-
const plainMatch = remaining.match(/^[^*_`~[#~\n:/]+/);
|
|
394
|
-
if (plainMatch) {
|
|
395
|
-
result.push(plainMatch[0]);
|
|
396
|
-
remaining = remaining.slice(plainMatch[0].length);
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
result.push(remaining[0]);
|
|
400
|
-
remaining = remaining.slice(1);
|
|
401
|
-
}
|
|
402
|
-
return mergeAdjacentStrings(result);
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Merge adjacent string elements in an inline array
|
|
406
|
-
*/
|
|
407
|
-
function mergeAdjacentStrings(inlines) {
|
|
408
|
-
const result = [];
|
|
409
|
-
for (const item of inlines) if (typeof item === "string" && typeof result[result.length - 1] === "string") result[result.length - 1] = result[result.length - 1] + item;
|
|
410
|
-
else result.push(item);
|
|
411
|
-
return result;
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Create an image block
|
|
415
|
-
*/
|
|
416
|
-
function createImageBlock(src, alt = "", height = 0, width = 0) {
|
|
417
|
-
return { block: { image: {
|
|
418
|
-
src,
|
|
419
|
-
height,
|
|
420
|
-
width,
|
|
421
|
-
alt
|
|
422
|
-
} } };
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Check if URL looks like an image
|
|
426
|
-
*/
|
|
427
|
-
function isImageUrl(url) {
|
|
428
|
-
return /\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(url);
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Process inlines and extract any image markers into blocks
|
|
432
|
-
*/
|
|
433
|
-
function processInlinesForImages(inlines) {
|
|
434
|
-
const cleanInlines = [];
|
|
435
|
-
const imageBlocks = [];
|
|
436
|
-
for (const inline of inlines) if (typeof inline === "object" && "__image" in inline) {
|
|
437
|
-
const img = inline.__image;
|
|
438
|
-
imageBlocks.push(createImageBlock(img.src, img.alt));
|
|
439
|
-
} else cleanInlines.push(inline);
|
|
440
|
-
return {
|
|
441
|
-
inlines: cleanInlines,
|
|
442
|
-
imageBlocks
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* Convert markdown text to Tlon story format
|
|
447
|
-
*/
|
|
448
|
-
function markdownToStory(markdown) {
|
|
449
|
-
const story = [];
|
|
450
|
-
const lines = markdown.split("\n");
|
|
451
|
-
let i = 0;
|
|
452
|
-
while (i < lines.length) {
|
|
453
|
-
const line = lines[i];
|
|
454
|
-
if (line.startsWith("```")) {
|
|
455
|
-
const lang = line.slice(3).trim() || "plaintext";
|
|
456
|
-
const codeLines = [];
|
|
457
|
-
i++;
|
|
458
|
-
while (i < lines.length && !lines[i].startsWith("```")) {
|
|
459
|
-
codeLines.push(lines[i]);
|
|
460
|
-
i++;
|
|
461
|
-
}
|
|
462
|
-
story.push({ block: { code: {
|
|
463
|
-
code: codeLines.join("\n"),
|
|
464
|
-
lang
|
|
465
|
-
} } });
|
|
466
|
-
i++;
|
|
467
|
-
continue;
|
|
468
|
-
}
|
|
469
|
-
const headerMatch = line.match(/^(#{1,6})\s+(.+)$/);
|
|
470
|
-
if (headerMatch) {
|
|
471
|
-
const tag = `h${headerMatch[1].length}`;
|
|
472
|
-
story.push({ block: { header: {
|
|
473
|
-
tag,
|
|
474
|
-
content: parseInlineMarkdown(headerMatch[2])
|
|
475
|
-
} } });
|
|
476
|
-
i++;
|
|
477
|
-
continue;
|
|
478
|
-
}
|
|
479
|
-
if (/^(-{3,}|\*{3,})$/.test(line.trim())) {
|
|
480
|
-
story.push({ block: { rule: null } });
|
|
481
|
-
i++;
|
|
482
|
-
continue;
|
|
483
|
-
}
|
|
484
|
-
if (line.startsWith("> ")) {
|
|
485
|
-
const quoteLines = [];
|
|
486
|
-
while (i < lines.length && lines[i].startsWith("> ")) {
|
|
487
|
-
quoteLines.push(lines[i].slice(2));
|
|
488
|
-
i++;
|
|
489
|
-
}
|
|
490
|
-
const quoteText = quoteLines.join("\n");
|
|
491
|
-
story.push({ inline: [{ blockquote: parseInlineMarkdown(quoteText) }] });
|
|
492
|
-
continue;
|
|
493
|
-
}
|
|
494
|
-
if (line.trim() === "") {
|
|
495
|
-
i++;
|
|
496
|
-
continue;
|
|
497
|
-
}
|
|
498
|
-
const paragraphLines = [];
|
|
499
|
-
while (i < lines.length && lines[i].trim() !== "" && !lines[i].startsWith("#") && !lines[i].startsWith("```") && !lines[i].startsWith("> ") && !/^(-{3,}|\*{3,})$/.test(lines[i].trim())) {
|
|
500
|
-
paragraphLines.push(lines[i]);
|
|
501
|
-
i++;
|
|
502
|
-
}
|
|
503
|
-
if (paragraphLines.length > 0) {
|
|
504
|
-
const inlines = parseInlineMarkdown(paragraphLines.join("\n"));
|
|
505
|
-
const withBreaks = [];
|
|
506
|
-
for (const inline of inlines) if (typeof inline === "string" && inline.includes("\n")) {
|
|
507
|
-
const parts = inline.split("\n");
|
|
508
|
-
for (let j = 0; j < parts.length; j++) {
|
|
509
|
-
if (parts[j]) withBreaks.push(parts[j]);
|
|
510
|
-
if (j < parts.length - 1) withBreaks.push({ break: null });
|
|
511
|
-
}
|
|
512
|
-
} else withBreaks.push(inline);
|
|
513
|
-
const { inlines: cleanInlines, imageBlocks } = processInlinesForImages(withBreaks);
|
|
514
|
-
if (cleanInlines.length > 0) story.push({ inline: cleanInlines });
|
|
515
|
-
story.push(...imageBlocks);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
return story;
|
|
519
|
-
}
|
|
520
|
-
//#endregion
|
|
521
|
-
//#region extensions/tlon/src/urbit/send.ts
|
|
522
|
-
async function sendDm({ api, fromShip, toShip, text }) {
|
|
523
|
-
return sendDmWithStory({
|
|
524
|
-
api,
|
|
525
|
-
fromShip,
|
|
526
|
-
toShip,
|
|
527
|
-
story: markdownToStory(text)
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
async function sendDmWithStory({ api, fromShip, toShip, story }) {
|
|
531
|
-
const sentAt = Date.now();
|
|
532
|
-
const id = `${fromShip}/${scot("ud", da.fromUnix(sentAt))}`;
|
|
533
|
-
const action = {
|
|
534
|
-
ship: toShip,
|
|
535
|
-
diff: {
|
|
536
|
-
id,
|
|
537
|
-
delta: { add: {
|
|
538
|
-
memo: {
|
|
539
|
-
content: story,
|
|
540
|
-
author: fromShip,
|
|
541
|
-
sent: sentAt
|
|
542
|
-
},
|
|
543
|
-
kind: null,
|
|
544
|
-
time: null
|
|
545
|
-
} }
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
await api.poke({
|
|
549
|
-
app: "chat",
|
|
550
|
-
mark: "chat-dm-action",
|
|
551
|
-
json: action
|
|
552
|
-
});
|
|
553
|
-
return {
|
|
554
|
-
channel: "tlon",
|
|
555
|
-
messageId: id
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
async function sendGroupMessage({ api, fromShip, hostShip, channelName, text, replyToId }) {
|
|
559
|
-
return sendGroupMessageWithStory({
|
|
560
|
-
api,
|
|
561
|
-
fromShip,
|
|
562
|
-
hostShip,
|
|
563
|
-
channelName,
|
|
564
|
-
story: markdownToStory(text),
|
|
565
|
-
replyToId
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
async function sendGroupMessageWithStory({ api, fromShip, hostShip, channelName, story, replyToId }) {
|
|
569
|
-
const sentAt = Date.now();
|
|
570
|
-
let formattedReplyId = replyToId;
|
|
571
|
-
if (replyToId && /^\d+$/.test(replyToId)) try {
|
|
572
|
-
formattedReplyId = scot("ud", BigInt(replyToId));
|
|
573
|
-
} catch {}
|
|
574
|
-
const action = { channel: {
|
|
575
|
-
nest: `chat/${hostShip}/${channelName}`,
|
|
576
|
-
action: formattedReplyId ? { post: { reply: {
|
|
577
|
-
id: formattedReplyId,
|
|
578
|
-
action: { add: {
|
|
579
|
-
content: story,
|
|
580
|
-
author: fromShip,
|
|
581
|
-
sent: sentAt
|
|
582
|
-
} }
|
|
583
|
-
} } } : { post: { add: {
|
|
584
|
-
content: story,
|
|
585
|
-
author: fromShip,
|
|
586
|
-
sent: sentAt,
|
|
587
|
-
kind: "/chat",
|
|
588
|
-
blob: null,
|
|
589
|
-
meta: null
|
|
590
|
-
} } }
|
|
591
|
-
} };
|
|
592
|
-
await api.poke({
|
|
593
|
-
app: "channels",
|
|
594
|
-
mark: "channel-action-1",
|
|
595
|
-
json: action
|
|
596
|
-
});
|
|
597
|
-
return {
|
|
598
|
-
channel: "tlon",
|
|
599
|
-
messageId: `${fromShip}/${sentAt}`
|
|
600
|
-
};
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* Build a story with text and optional media (image)
|
|
604
|
-
*/
|
|
605
|
-
function buildMediaStory(text, mediaUrl) {
|
|
606
|
-
const story = [];
|
|
607
|
-
const cleanText = text?.trim() ?? "";
|
|
608
|
-
const cleanUrl = mediaUrl?.trim() ?? "";
|
|
609
|
-
if (cleanText) story.push(...markdownToStory(cleanText));
|
|
610
|
-
if (cleanUrl && isImageUrl(cleanUrl)) story.push(createImageBlock(cleanUrl, ""));
|
|
611
|
-
else if (cleanUrl) story.push({ inline: [{ link: {
|
|
612
|
-
href: cleanUrl,
|
|
613
|
-
content: cleanUrl
|
|
614
|
-
} }] });
|
|
615
|
-
return story.length > 0 ? story : [{ inline: [""] }];
|
|
616
|
-
}
|
|
617
|
-
//#endregion
|
|
618
|
-
//#region extensions/tlon/src/urbit/channel-ops.ts
|
|
619
|
-
async function putUrbitChannel(deps, params) {
|
|
620
|
-
return await urbitFetch({
|
|
621
|
-
baseUrl: deps.baseUrl,
|
|
622
|
-
path: `/~/channel/${deps.channelId}`,
|
|
623
|
-
init: {
|
|
624
|
-
method: "PUT",
|
|
625
|
-
headers: {
|
|
626
|
-
"Content-Type": "application/json",
|
|
627
|
-
Cookie: deps.cookie
|
|
628
|
-
},
|
|
629
|
-
body: JSON.stringify(params.body)
|
|
630
|
-
},
|
|
631
|
-
ssrfPolicy: deps.ssrfPolicy,
|
|
632
|
-
lookupFn: deps.lookupFn,
|
|
633
|
-
fetchImpl: deps.fetchImpl,
|
|
634
|
-
timeoutMs: 3e4,
|
|
635
|
-
auditContext: params.auditContext
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
async function pokeUrbitChannel(deps, params) {
|
|
639
|
-
const pokeId = Date.now();
|
|
640
|
-
const { response, release } = await putUrbitChannel(deps, {
|
|
641
|
-
body: [{
|
|
642
|
-
id: pokeId,
|
|
643
|
-
action: "poke",
|
|
644
|
-
ship: deps.ship,
|
|
645
|
-
app: params.app,
|
|
646
|
-
mark: params.mark,
|
|
647
|
-
json: params.json
|
|
648
|
-
}],
|
|
649
|
-
auditContext: params.auditContext
|
|
650
|
-
});
|
|
651
|
-
try {
|
|
652
|
-
if (!response.ok && response.status !== 204) {
|
|
653
|
-
const errorText = await response.text().catch(() => "");
|
|
654
|
-
throw new Error(`Poke failed: ${response.status}${errorText ? ` - ${errorText}` : ""}`);
|
|
655
|
-
}
|
|
656
|
-
return pokeId;
|
|
657
|
-
} finally {
|
|
658
|
-
await release();
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
async function scryUrbitPath(deps, params) {
|
|
662
|
-
const scryPath = `/~/scry${params.path}`;
|
|
663
|
-
const { response, release } = await urbitFetch({
|
|
664
|
-
baseUrl: deps.baseUrl,
|
|
665
|
-
path: scryPath,
|
|
666
|
-
init: {
|
|
667
|
-
method: "GET",
|
|
668
|
-
headers: { Cookie: deps.cookie }
|
|
669
|
-
},
|
|
670
|
-
ssrfPolicy: deps.ssrfPolicy,
|
|
671
|
-
lookupFn: deps.lookupFn,
|
|
672
|
-
fetchImpl: deps.fetchImpl,
|
|
673
|
-
timeoutMs: 3e4,
|
|
674
|
-
auditContext: params.auditContext
|
|
675
|
-
});
|
|
676
|
-
try {
|
|
677
|
-
if (!response.ok) throw new Error(`Scry failed: ${response.status} for path ${params.path}`);
|
|
678
|
-
return await response.json();
|
|
679
|
-
} finally {
|
|
680
|
-
await release();
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
async function createUrbitChannel(deps, params) {
|
|
684
|
-
const { response, release } = await putUrbitChannel(deps, params);
|
|
685
|
-
try {
|
|
686
|
-
if (!response.ok && response.status !== 204) throw new UrbitHttpError({
|
|
687
|
-
operation: "Channel creation",
|
|
688
|
-
status: response.status
|
|
689
|
-
});
|
|
690
|
-
} finally {
|
|
691
|
-
await release();
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
async function wakeUrbitChannel(deps) {
|
|
695
|
-
const { response, release } = await putUrbitChannel(deps, {
|
|
696
|
-
body: [{
|
|
697
|
-
id: Date.now(),
|
|
698
|
-
action: "poke",
|
|
699
|
-
ship: deps.ship,
|
|
700
|
-
app: "hood",
|
|
701
|
-
mark: "helm-hi",
|
|
702
|
-
json: "Opening API channel"
|
|
703
|
-
}],
|
|
704
|
-
auditContext: "tlon-urbit-channel-wake"
|
|
705
|
-
});
|
|
706
|
-
try {
|
|
707
|
-
if (!response.ok && response.status !== 204) throw new UrbitHttpError({
|
|
708
|
-
operation: "Channel activation",
|
|
709
|
-
status: response.status
|
|
710
|
-
});
|
|
711
|
-
} finally {
|
|
712
|
-
await release();
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
async function ensureUrbitChannelOpen(deps, params) {
|
|
716
|
-
await createUrbitChannel(deps, {
|
|
717
|
-
body: params.createBody,
|
|
718
|
-
auditContext: params.createAuditContext
|
|
719
|
-
});
|
|
720
|
-
await wakeUrbitChannel(deps);
|
|
721
|
-
}
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region extensions/tlon/src/urbit/sse-client.ts
|
|
724
|
-
var UrbitSSEClient = class {
|
|
725
|
-
constructor(url, cookie, options = {}) {
|
|
726
|
-
this.subscriptions = [];
|
|
727
|
-
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
728
|
-
this.aborted = false;
|
|
729
|
-
this.streamController = null;
|
|
730
|
-
this.reconnectAttempts = 0;
|
|
731
|
-
this.isConnected = false;
|
|
732
|
-
this.streamRelease = null;
|
|
733
|
-
this.lastHeardEventId = -1;
|
|
734
|
-
this.lastAcknowledgedEventId = -1;
|
|
735
|
-
this.ackThreshold = 20;
|
|
736
|
-
const ctx = getUrbitContext(url, options.ship);
|
|
737
|
-
this.url = ctx.baseUrl;
|
|
738
|
-
this.cookie = normalizeUrbitCookie(cookie);
|
|
739
|
-
this.ship = ctx.ship;
|
|
740
|
-
this.channelId = `${Math.floor(Date.now() / 1e3)}-${randomUUID()}`;
|
|
741
|
-
this.channelUrl = new URL(`/~/channel/${this.channelId}`, this.url).toString();
|
|
742
|
-
this.onReconnect = options.onReconnect ?? null;
|
|
743
|
-
this.autoReconnect = options.autoReconnect !== false;
|
|
744
|
-
this.maxReconnectAttempts = options.maxReconnectAttempts ?? 10;
|
|
745
|
-
this.reconnectDelay = options.reconnectDelay ?? 1e3;
|
|
746
|
-
this.maxReconnectDelay = options.maxReconnectDelay ?? 3e4;
|
|
747
|
-
this.logger = options.logger ?? {};
|
|
748
|
-
this.ssrfPolicy = options.ssrfPolicy;
|
|
749
|
-
this.lookupFn = options.lookupFn;
|
|
750
|
-
this.fetchImpl = options.fetchImpl;
|
|
751
|
-
}
|
|
752
|
-
async subscribe(params) {
|
|
753
|
-
const subId = this.subscriptions.length + 1;
|
|
754
|
-
const subscription = {
|
|
755
|
-
id: subId,
|
|
756
|
-
action: "subscribe",
|
|
757
|
-
ship: this.ship,
|
|
758
|
-
app: params.app,
|
|
759
|
-
path: params.path
|
|
760
|
-
};
|
|
761
|
-
this.subscriptions.push(subscription);
|
|
762
|
-
this.eventHandlers.set(subId, {
|
|
763
|
-
event: params.event,
|
|
764
|
-
err: params.err,
|
|
765
|
-
quit: params.quit
|
|
766
|
-
});
|
|
767
|
-
if (this.isConnected) try {
|
|
768
|
-
await this.sendSubscription(subscription);
|
|
769
|
-
} catch (error) {
|
|
770
|
-
this.eventHandlers.get(subId)?.err?.(error);
|
|
771
|
-
}
|
|
772
|
-
return subId;
|
|
773
|
-
}
|
|
774
|
-
async sendSubscription(subscription) {
|
|
775
|
-
const { response, release } = await this.putChannelPayload([subscription], {
|
|
776
|
-
timeoutMs: 3e4,
|
|
777
|
-
auditContext: "tlon-urbit-subscribe"
|
|
778
|
-
});
|
|
779
|
-
try {
|
|
780
|
-
if (!response.ok && response.status !== 204) {
|
|
781
|
-
const errorText = await response.text().catch(() => "");
|
|
782
|
-
throw new Error(`Subscribe failed: ${response.status}${errorText ? ` - ${errorText}` : ""}`);
|
|
783
|
-
}
|
|
784
|
-
} finally {
|
|
785
|
-
await release();
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
async connect() {
|
|
789
|
-
await ensureUrbitChannelOpen({
|
|
790
|
-
baseUrl: this.url,
|
|
791
|
-
cookie: this.cookie,
|
|
792
|
-
ship: this.ship,
|
|
793
|
-
channelId: this.channelId,
|
|
794
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
795
|
-
lookupFn: this.lookupFn,
|
|
796
|
-
fetchImpl: this.fetchImpl
|
|
797
|
-
}, {
|
|
798
|
-
createBody: this.subscriptions,
|
|
799
|
-
createAuditContext: "tlon-urbit-channel-create"
|
|
800
|
-
});
|
|
801
|
-
await this.openStream();
|
|
802
|
-
this.isConnected = true;
|
|
803
|
-
this.reconnectAttempts = 0;
|
|
804
|
-
}
|
|
805
|
-
async openStream() {
|
|
806
|
-
const controller = new AbortController();
|
|
807
|
-
const timeoutId = setTimeout(() => controller.abort(), 6e4);
|
|
808
|
-
this.streamController = controller;
|
|
809
|
-
const { response, release } = await urbitFetch({
|
|
810
|
-
baseUrl: this.url,
|
|
811
|
-
path: `/~/channel/${this.channelId}`,
|
|
812
|
-
init: {
|
|
813
|
-
method: "GET",
|
|
814
|
-
headers: {
|
|
815
|
-
Accept: "text/event-stream",
|
|
816
|
-
Cookie: this.cookie
|
|
817
|
-
}
|
|
818
|
-
},
|
|
819
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
820
|
-
lookupFn: this.lookupFn,
|
|
821
|
-
fetchImpl: this.fetchImpl,
|
|
822
|
-
signal: controller.signal,
|
|
823
|
-
auditContext: "tlon-urbit-sse-stream"
|
|
824
|
-
});
|
|
825
|
-
this.streamRelease = release;
|
|
826
|
-
clearTimeout(timeoutId);
|
|
827
|
-
if (!response.ok) {
|
|
828
|
-
await release();
|
|
829
|
-
this.streamRelease = null;
|
|
830
|
-
throw new Error(`Stream connection failed: ${response.status}`);
|
|
831
|
-
}
|
|
832
|
-
this.processStream(response.body).catch((error) => {
|
|
833
|
-
if (!this.aborted) {
|
|
834
|
-
this.logger.error?.(`Stream error: ${String(error)}`);
|
|
835
|
-
for (const { err } of this.eventHandlers.values()) if (err) err(error);
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
async processStream(body) {
|
|
840
|
-
if (!body) return;
|
|
841
|
-
const stream = body instanceof ReadableStream ? Readable.fromWeb(body) : body;
|
|
842
|
-
let buffer = "";
|
|
843
|
-
try {
|
|
844
|
-
for await (const chunk of stream) {
|
|
845
|
-
if (this.aborted) break;
|
|
846
|
-
buffer += chunk.toString();
|
|
847
|
-
let eventEnd;
|
|
848
|
-
while ((eventEnd = buffer.indexOf("\n\n")) !== -1) {
|
|
849
|
-
const eventData = buffer.substring(0, eventEnd);
|
|
850
|
-
buffer = buffer.substring(eventEnd + 2);
|
|
851
|
-
this.processEvent(eventData);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
} finally {
|
|
855
|
-
if (this.streamRelease) {
|
|
856
|
-
const release = this.streamRelease;
|
|
857
|
-
this.streamRelease = null;
|
|
858
|
-
await release();
|
|
859
|
-
}
|
|
860
|
-
this.streamController = null;
|
|
861
|
-
if (!this.aborted && this.autoReconnect) {
|
|
862
|
-
this.isConnected = false;
|
|
863
|
-
this.logger.log?.("[SSE] Stream ended, attempting reconnection...");
|
|
864
|
-
await this.attemptReconnect();
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
processEvent(eventData) {
|
|
869
|
-
const lines = eventData.split("\n");
|
|
870
|
-
let data = null;
|
|
871
|
-
let eventId = null;
|
|
872
|
-
for (const line of lines) {
|
|
873
|
-
if (line.startsWith("id: ")) eventId = parseInt(line.substring(4), 10);
|
|
874
|
-
if (line.startsWith("data: ")) data = line.substring(6);
|
|
875
|
-
}
|
|
876
|
-
if (!data) return;
|
|
877
|
-
if (eventId !== null && !isNaN(eventId)) {
|
|
878
|
-
if (eventId > this.lastHeardEventId) {
|
|
879
|
-
this.lastHeardEventId = eventId;
|
|
880
|
-
if (eventId - this.lastAcknowledgedEventId > this.ackThreshold) {
|
|
881
|
-
this.logger.log?.(`[SSE] Acking event ${eventId} (last acked: ${this.lastAcknowledgedEventId})`);
|
|
882
|
-
this.ack(eventId).catch((err) => {
|
|
883
|
-
this.logger.error?.(`Failed to ack event ${eventId}: ${String(err)}`);
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
try {
|
|
889
|
-
const parsed = JSON.parse(data);
|
|
890
|
-
if (parsed.response === "quit") {
|
|
891
|
-
if (parsed.id) {
|
|
892
|
-
const handlers = this.eventHandlers.get(parsed.id);
|
|
893
|
-
if (handlers?.quit) handlers.quit();
|
|
894
|
-
}
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
if (parsed.id && this.eventHandlers.has(parsed.id)) {
|
|
898
|
-
const { event } = this.eventHandlers.get(parsed.id) ?? {};
|
|
899
|
-
if (event && parsed.json) event(parsed.json);
|
|
900
|
-
} else if (parsed.json) {
|
|
901
|
-
for (const { event } of this.eventHandlers.values()) if (event) event(parsed.json);
|
|
902
|
-
}
|
|
903
|
-
} catch (error) {
|
|
904
|
-
this.logger.error?.(`Error parsing SSE event: ${String(error)}`);
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
async poke(params) {
|
|
908
|
-
return await pokeUrbitChannel({
|
|
909
|
-
baseUrl: this.url,
|
|
910
|
-
cookie: this.cookie,
|
|
911
|
-
ship: this.ship,
|
|
912
|
-
channelId: this.channelId,
|
|
913
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
914
|
-
lookupFn: this.lookupFn,
|
|
915
|
-
fetchImpl: this.fetchImpl
|
|
916
|
-
}, {
|
|
917
|
-
...params,
|
|
918
|
-
auditContext: "tlon-urbit-poke"
|
|
919
|
-
});
|
|
920
|
-
}
|
|
921
|
-
async scry(path) {
|
|
922
|
-
return await scryUrbitPath({
|
|
923
|
-
baseUrl: this.url,
|
|
924
|
-
cookie: this.cookie,
|
|
925
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
926
|
-
lookupFn: this.lookupFn,
|
|
927
|
-
fetchImpl: this.fetchImpl
|
|
928
|
-
}, {
|
|
929
|
-
path,
|
|
930
|
-
auditContext: "tlon-urbit-scry"
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
/**
|
|
934
|
-
* Update the cookie used for authentication.
|
|
935
|
-
* Call this when re-authenticating after session expiry.
|
|
936
|
-
*/
|
|
937
|
-
updateCookie(newCookie) {
|
|
938
|
-
this.cookie = normalizeUrbitCookie(newCookie);
|
|
939
|
-
}
|
|
940
|
-
async ack(eventId) {
|
|
941
|
-
this.lastAcknowledgedEventId = eventId;
|
|
942
|
-
const ackData = {
|
|
943
|
-
id: Date.now(),
|
|
944
|
-
action: "ack",
|
|
945
|
-
"event-id": eventId
|
|
946
|
-
};
|
|
947
|
-
const { response, release } = await this.putChannelPayload([ackData], {
|
|
948
|
-
timeoutMs: 1e4,
|
|
949
|
-
auditContext: "tlon-urbit-ack"
|
|
950
|
-
});
|
|
951
|
-
try {
|
|
952
|
-
if (!response.ok) throw new Error(`Ack failed with status ${response.status}`);
|
|
953
|
-
} finally {
|
|
954
|
-
await release();
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
async attemptReconnect() {
|
|
958
|
-
if (this.aborted || !this.autoReconnect) {
|
|
959
|
-
this.logger.log?.("[SSE] Reconnection aborted or disabled");
|
|
960
|
-
return;
|
|
961
|
-
}
|
|
962
|
-
if (this.reconnectAttempts >= this.maxReconnectAttempts) {
|
|
963
|
-
this.logger.log?.(`[SSE] Max reconnection attempts (${this.maxReconnectAttempts}) reached. Waiting 10s before resetting...`);
|
|
964
|
-
const extendedBackoff = 1e4;
|
|
965
|
-
await new Promise((resolve) => setTimeout(resolve, extendedBackoff));
|
|
966
|
-
this.reconnectAttempts = 0;
|
|
967
|
-
this.logger.log?.("[SSE] Reconnection attempts reset, resuming reconnection...");
|
|
968
|
-
}
|
|
969
|
-
this.reconnectAttempts += 1;
|
|
970
|
-
const delay = Math.min(this.reconnectDelay * Math.pow(2, this.reconnectAttempts - 1), this.maxReconnectDelay);
|
|
971
|
-
this.logger.log?.(`[SSE] Reconnection attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts} in ${delay}ms...`);
|
|
972
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
973
|
-
try {
|
|
974
|
-
this.channelId = `${Math.floor(Date.now() / 1e3)}-${randomUUID()}`;
|
|
975
|
-
this.channelUrl = new URL(`/~/channel/${this.channelId}`, this.url).toString();
|
|
976
|
-
if (this.onReconnect) await this.onReconnect(this);
|
|
977
|
-
await this.connect();
|
|
978
|
-
this.logger.log?.("[SSE] Reconnection successful!");
|
|
979
|
-
} catch (error) {
|
|
980
|
-
this.logger.error?.(`[SSE] Reconnection failed: ${String(error)}`);
|
|
981
|
-
await this.attemptReconnect();
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
async close() {
|
|
985
|
-
this.aborted = true;
|
|
986
|
-
this.isConnected = false;
|
|
987
|
-
this.streamController?.abort();
|
|
988
|
-
try {
|
|
989
|
-
const unsubscribes = this.subscriptions.map((sub) => ({
|
|
990
|
-
id: sub.id,
|
|
991
|
-
action: "unsubscribe",
|
|
992
|
-
subscription: sub.id
|
|
993
|
-
}));
|
|
994
|
-
{
|
|
995
|
-
const { response, release } = await this.putChannelPayload(unsubscribes, {
|
|
996
|
-
timeoutMs: 3e4,
|
|
997
|
-
auditContext: "tlon-urbit-unsubscribe"
|
|
998
|
-
});
|
|
999
|
-
try {
|
|
1000
|
-
response.body?.cancel();
|
|
1001
|
-
} finally {
|
|
1002
|
-
await release();
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
{
|
|
1006
|
-
const { response, release } = await urbitFetch({
|
|
1007
|
-
baseUrl: this.url,
|
|
1008
|
-
path: `/~/channel/${this.channelId}`,
|
|
1009
|
-
init: {
|
|
1010
|
-
method: "DELETE",
|
|
1011
|
-
headers: { Cookie: this.cookie }
|
|
1012
|
-
},
|
|
1013
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
1014
|
-
lookupFn: this.lookupFn,
|
|
1015
|
-
fetchImpl: this.fetchImpl,
|
|
1016
|
-
timeoutMs: 3e4,
|
|
1017
|
-
auditContext: "tlon-urbit-channel-close"
|
|
1018
|
-
});
|
|
1019
|
-
try {
|
|
1020
|
-
response.body?.cancel();
|
|
1021
|
-
} finally {
|
|
1022
|
-
await release();
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
} catch (error) {
|
|
1026
|
-
this.logger.error?.(`Error closing channel: ${String(error)}`);
|
|
1027
|
-
}
|
|
1028
|
-
if (this.streamRelease) {
|
|
1029
|
-
const release = this.streamRelease;
|
|
1030
|
-
this.streamRelease = null;
|
|
1031
|
-
await release();
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
async putChannelPayload(payload, params) {
|
|
1035
|
-
return await urbitFetch({
|
|
1036
|
-
baseUrl: this.url,
|
|
1037
|
-
path: `/~/channel/${this.channelId}`,
|
|
1038
|
-
init: {
|
|
1039
|
-
method: "PUT",
|
|
1040
|
-
headers: {
|
|
1041
|
-
"Content-Type": "application/json",
|
|
1042
|
-
Cookie: this.cookie
|
|
1043
|
-
},
|
|
1044
|
-
body: JSON.stringify(payload)
|
|
1045
|
-
},
|
|
1046
|
-
ssrfPolicy: this.ssrfPolicy,
|
|
1047
|
-
lookupFn: this.lookupFn,
|
|
1048
|
-
fetchImpl: this.fetchImpl,
|
|
1049
|
-
timeoutMs: params.timeoutMs,
|
|
1050
|
-
auditContext: params.auditContext
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
};
|
|
1054
|
-
//#endregion
|
|
1055
|
-
//#region extensions/tlon/src/monitor/approval.ts
|
|
1056
|
-
/**
|
|
1057
|
-
* Approval system for managing DM, channel mention, and group invite approvals.
|
|
1058
|
-
*
|
|
1059
|
-
* When an unknown ship tries to interact with the bot, the owner receives
|
|
1060
|
-
* a notification and can approve or deny the request.
|
|
1061
|
-
*/
|
|
1062
|
-
/**
|
|
1063
|
-
* Generate a unique approval ID in the format: {type}-{timestamp}-{shortHash}
|
|
1064
|
-
*/
|
|
1065
|
-
function generateApprovalId(type) {
|
|
1066
|
-
return `${type}-${Date.now()}-${randomBytes(3).toString("hex")}`;
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* Create a pending approval object.
|
|
1070
|
-
*/
|
|
1071
|
-
function createPendingApproval(params) {
|
|
1072
|
-
return {
|
|
1073
|
-
id: generateApprovalId(params.type),
|
|
1074
|
-
type: params.type,
|
|
1075
|
-
requestingShip: params.requestingShip,
|
|
1076
|
-
channelNest: params.channelNest,
|
|
1077
|
-
groupFlag: params.groupFlag,
|
|
1078
|
-
messagePreview: params.messagePreview,
|
|
1079
|
-
originalMessage: params.originalMessage,
|
|
1080
|
-
timestamp: Date.now()
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
/**
|
|
1084
|
-
* Truncate text to a maximum length with ellipsis.
|
|
1085
|
-
*/
|
|
1086
|
-
function truncate(text, maxLength) {
|
|
1087
|
-
if (text.length <= maxLength) return text;
|
|
1088
|
-
return text.substring(0, maxLength - 3) + "...";
|
|
1089
|
-
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Format a notification message for the owner about a pending approval.
|
|
1092
|
-
*/
|
|
1093
|
-
function formatApprovalRequest(approval) {
|
|
1094
|
-
const preview = approval.messagePreview ? `\n"${truncate(approval.messagePreview, 100)}"` : "";
|
|
1095
|
-
switch (approval.type) {
|
|
1096
|
-
case "dm": return `New DM request from ${approval.requestingShip}:${preview}\n\nReply "approve", "deny", or "block" (ID: ${approval.id})`;
|
|
1097
|
-
case "channel": return `${approval.requestingShip} mentioned you in ${approval.channelNest}:${preview}\n\nReply "approve", "deny", or "block"\n(ID: ${approval.id})`;
|
|
1098
|
-
case "group": return `Group invite from ${approval.requestingShip} to join ${approval.groupFlag}\n\nReply "approve", "deny", or "block"\n(ID: ${approval.id})`;
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
/**
|
|
1102
|
-
* Parse an owner's response to an approval request.
|
|
1103
|
-
* Supports formats:
|
|
1104
|
-
* - "approve" / "deny" / "block" (applies to most recent pending)
|
|
1105
|
-
* - "approve dm-1234567890-abc" / "deny dm-1234567890-abc" (specific ID)
|
|
1106
|
-
* - "block" permanently blocks the ship via Tlon's native blocking
|
|
1107
|
-
*/
|
|
1108
|
-
function parseApprovalResponse(text) {
|
|
1109
|
-
const match = text.trim().toLowerCase().match(/^(approve|deny|block)(?:\s+(.+))?$/);
|
|
1110
|
-
if (!match) return null;
|
|
1111
|
-
return {
|
|
1112
|
-
action: match[1],
|
|
1113
|
-
id: match[2]?.trim()
|
|
1114
|
-
};
|
|
1115
|
-
}
|
|
1116
|
-
/**
|
|
1117
|
-
* Check if a message text looks like an approval response.
|
|
1118
|
-
* Used to determine if we should intercept the message before normal processing.
|
|
1119
|
-
*/
|
|
1120
|
-
function isApprovalResponse(text) {
|
|
1121
|
-
const trimmed = text.trim().toLowerCase();
|
|
1122
|
-
return trimmed.startsWith("approve") || trimmed.startsWith("deny") || trimmed.startsWith("block");
|
|
1123
|
-
}
|
|
1124
|
-
/**
|
|
1125
|
-
* Find a pending approval by ID, or return the most recent if no ID specified.
|
|
1126
|
-
*/
|
|
1127
|
-
function findPendingApproval(pendingApprovals, id) {
|
|
1128
|
-
if (id) return pendingApprovals.find((a) => a.id === id);
|
|
1129
|
-
return pendingApprovals[pendingApprovals.length - 1];
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* Remove a pending approval from the list by ID.
|
|
1133
|
-
*/
|
|
1134
|
-
function removePendingApproval(pendingApprovals, id) {
|
|
1135
|
-
return pendingApprovals.filter((a) => a.id !== id);
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* Format a confirmation message after an approval action.
|
|
1139
|
-
*/
|
|
1140
|
-
function formatApprovalConfirmation(approval, action) {
|
|
1141
|
-
if (action === "block") return `Blocked ${approval.requestingShip}. They will no longer be able to contact the bot.`;
|
|
1142
|
-
const actionText = action === "approve" ? "Approved" : "Denied";
|
|
1143
|
-
switch (approval.type) {
|
|
1144
|
-
case "dm":
|
|
1145
|
-
if (action === "approve") return `${actionText} DM access for ${approval.requestingShip}. They can now message the bot.`;
|
|
1146
|
-
return `${actionText} DM request from ${approval.requestingShip}.`;
|
|
1147
|
-
case "channel":
|
|
1148
|
-
if (action === "approve") return `${actionText} ${approval.requestingShip} for ${approval.channelNest}. They can now interact in this channel.`;
|
|
1149
|
-
return `${actionText} ${approval.requestingShip} for ${approval.channelNest}.`;
|
|
1150
|
-
case "group":
|
|
1151
|
-
if (action === "approve") return `${actionText} group invite from ${approval.requestingShip} to ${approval.groupFlag}. Joining group...`;
|
|
1152
|
-
return `${actionText} group invite from ${approval.requestingShip} to ${approval.groupFlag}.`;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
/**
|
|
1156
|
-
* Parse an admin command from owner message.
|
|
1157
|
-
* Supports:
|
|
1158
|
-
* - "unblock ~ship" - unblock a specific ship
|
|
1159
|
-
* - "blocked" - list all blocked ships
|
|
1160
|
-
* - "pending" - list all pending approvals
|
|
1161
|
-
*/
|
|
1162
|
-
function parseAdminCommand(text) {
|
|
1163
|
-
const trimmed = text.trim().toLowerCase();
|
|
1164
|
-
if (trimmed === "blocked") return { type: "blocked" };
|
|
1165
|
-
if (trimmed === "pending") return { type: "pending" };
|
|
1166
|
-
const unblockMatch = trimmed.match(/^unblock\s+(~[\w-]+)$/);
|
|
1167
|
-
if (unblockMatch) return {
|
|
1168
|
-
type: "unblock",
|
|
1169
|
-
ship: unblockMatch[1]
|
|
1170
|
-
};
|
|
1171
|
-
return null;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Check if a message text looks like an admin command.
|
|
1175
|
-
*/
|
|
1176
|
-
function isAdminCommand(text) {
|
|
1177
|
-
return parseAdminCommand(text) !== null;
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Format the list of blocked ships for display to owner.
|
|
1181
|
-
*/
|
|
1182
|
-
function formatBlockedList(ships) {
|
|
1183
|
-
if (ships.length === 0) return "No ships are currently blocked.";
|
|
1184
|
-
return `Blocked ships (${ships.length}):\n${ships.map((s) => `• ${s}`).join("\n")}`;
|
|
1185
|
-
}
|
|
1186
|
-
/**
|
|
1187
|
-
* Format the list of pending approvals for display to owner.
|
|
1188
|
-
*/
|
|
1189
|
-
function formatPendingList(approvals) {
|
|
1190
|
-
if (approvals.length === 0) return "No pending approval requests.";
|
|
1191
|
-
return `Pending approvals (${approvals.length}):\n${approvals.map((a) => `• ${a.id}: ${a.type} from ${a.requestingShip}`).join("\n")}`;
|
|
1192
|
-
}
|
|
1193
|
-
//#endregion
|
|
1194
|
-
//#region extensions/tlon/src/monitor/approval-runtime.ts
|
|
1195
|
-
function createTlonApprovalRuntime(params) {
|
|
1196
|
-
const { api, runtime, botShipName, getPendingApprovals, setPendingApprovals, getCurrentSettings, setCurrentSettings, getEffectiveDmAllowlist, setEffectiveDmAllowlist, getEffectiveOwnerShip, processApprovedMessage, refreshWatchedChannels } = params;
|
|
1197
|
-
const savePendingApprovals = async () => {
|
|
1198
|
-
try {
|
|
1199
|
-
await api.poke({
|
|
1200
|
-
app: "settings",
|
|
1201
|
-
mark: "settings-event",
|
|
1202
|
-
json: { "put-entry": {
|
|
1203
|
-
desk: "moltbot",
|
|
1204
|
-
"bucket-key": "tlon",
|
|
1205
|
-
"entry-key": "pendingApprovals",
|
|
1206
|
-
value: JSON.stringify(getPendingApprovals())
|
|
1207
|
-
} }
|
|
1208
|
-
});
|
|
1209
|
-
} catch (err) {
|
|
1210
|
-
runtime.error?.(`[tlon] Failed to save pending approvals: ${String(err)}`);
|
|
1211
|
-
}
|
|
1212
|
-
};
|
|
1213
|
-
const addToDmAllowlist = async (ship) => {
|
|
1214
|
-
const normalizedShip = normalizeShip(ship);
|
|
1215
|
-
const nextAllowlist = getEffectiveDmAllowlist().includes(normalizedShip) ? getEffectiveDmAllowlist() : [...getEffectiveDmAllowlist(), normalizedShip];
|
|
1216
|
-
setEffectiveDmAllowlist(nextAllowlist);
|
|
1217
|
-
try {
|
|
1218
|
-
await api.poke({
|
|
1219
|
-
app: "settings",
|
|
1220
|
-
mark: "settings-event",
|
|
1221
|
-
json: { "put-entry": {
|
|
1222
|
-
desk: "moltbot",
|
|
1223
|
-
"bucket-key": "tlon",
|
|
1224
|
-
"entry-key": "dmAllowlist",
|
|
1225
|
-
value: nextAllowlist
|
|
1226
|
-
} }
|
|
1227
|
-
});
|
|
1228
|
-
runtime.log?.(`[tlon] Added ${normalizedShip} to dmAllowlist`);
|
|
1229
|
-
} catch (err) {
|
|
1230
|
-
runtime.error?.(`[tlon] Failed to update dmAllowlist: ${String(err)}`);
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
const addToChannelAllowlist = async (ship, channelNest) => {
|
|
1234
|
-
const normalizedShip = normalizeShip(ship);
|
|
1235
|
-
const currentSettings = getCurrentSettings();
|
|
1236
|
-
const channelRules = currentSettings.channelRules ?? {};
|
|
1237
|
-
const rule = channelRules[channelNest] ?? {
|
|
1238
|
-
mode: "restricted",
|
|
1239
|
-
allowedShips: []
|
|
1240
|
-
};
|
|
1241
|
-
const allowedShips = [...rule.allowedShips ?? []];
|
|
1242
|
-
if (!allowedShips.includes(normalizedShip)) allowedShips.push(normalizedShip);
|
|
1243
|
-
const updatedRules = {
|
|
1244
|
-
...channelRules,
|
|
1245
|
-
[channelNest]: {
|
|
1246
|
-
...rule,
|
|
1247
|
-
allowedShips
|
|
1248
|
-
}
|
|
1249
|
-
};
|
|
1250
|
-
setCurrentSettings({
|
|
1251
|
-
...currentSettings,
|
|
1252
|
-
channelRules: updatedRules
|
|
1253
|
-
});
|
|
1254
|
-
try {
|
|
1255
|
-
await api.poke({
|
|
1256
|
-
app: "settings",
|
|
1257
|
-
mark: "settings-event",
|
|
1258
|
-
json: { "put-entry": {
|
|
1259
|
-
desk: "moltbot",
|
|
1260
|
-
"bucket-key": "tlon",
|
|
1261
|
-
"entry-key": "channelRules",
|
|
1262
|
-
value: JSON.stringify(updatedRules)
|
|
1263
|
-
} }
|
|
1264
|
-
});
|
|
1265
|
-
runtime.log?.(`[tlon] Added ${normalizedShip} to ${channelNest} allowlist`);
|
|
1266
|
-
} catch (err) {
|
|
1267
|
-
runtime.error?.(`[tlon] Failed to update channelRules: ${String(err)}`);
|
|
1268
|
-
}
|
|
1269
|
-
};
|
|
1270
|
-
const blockShip = async (ship) => {
|
|
1271
|
-
const normalizedShip = normalizeShip(ship);
|
|
1272
|
-
try {
|
|
1273
|
-
await api.poke({
|
|
1274
|
-
app: "chat",
|
|
1275
|
-
mark: "chat-block-ship",
|
|
1276
|
-
json: { ship: normalizedShip }
|
|
1277
|
-
});
|
|
1278
|
-
runtime.log?.(`[tlon] Blocked ship ${normalizedShip}`);
|
|
1279
|
-
} catch (err) {
|
|
1280
|
-
runtime.error?.(`[tlon] Failed to block ship ${normalizedShip}: ${String(err)}`);
|
|
1281
|
-
}
|
|
1282
|
-
};
|
|
1283
|
-
const isShipBlocked = async (ship) => {
|
|
1284
|
-
const normalizedShip = normalizeShip(ship);
|
|
1285
|
-
try {
|
|
1286
|
-
const blocked = await api.scry("/chat/blocked.json");
|
|
1287
|
-
return Array.isArray(blocked) && blocked.some((item) => normalizeShip(item) === normalizedShip);
|
|
1288
|
-
} catch (err) {
|
|
1289
|
-
runtime.log?.(`[tlon] Failed to check blocked list: ${String(err)}`);
|
|
1290
|
-
return false;
|
|
1291
|
-
}
|
|
1292
|
-
};
|
|
1293
|
-
const getBlockedShips = async () => {
|
|
1294
|
-
try {
|
|
1295
|
-
const blocked = await api.scry("/chat/blocked.json");
|
|
1296
|
-
return Array.isArray(blocked) ? blocked : [];
|
|
1297
|
-
} catch (err) {
|
|
1298
|
-
runtime.log?.(`[tlon] Failed to get blocked list: ${String(err)}`);
|
|
1299
|
-
return [];
|
|
1300
|
-
}
|
|
1301
|
-
};
|
|
1302
|
-
const unblockShip = async (ship) => {
|
|
1303
|
-
const normalizedShip = normalizeShip(ship);
|
|
1304
|
-
try {
|
|
1305
|
-
await api.poke({
|
|
1306
|
-
app: "chat",
|
|
1307
|
-
mark: "chat-unblock-ship",
|
|
1308
|
-
json: { ship: normalizedShip }
|
|
1309
|
-
});
|
|
1310
|
-
runtime.log?.(`[tlon] Unblocked ship ${normalizedShip}`);
|
|
1311
|
-
return true;
|
|
1312
|
-
} catch (err) {
|
|
1313
|
-
runtime.error?.(`[tlon] Failed to unblock ship ${normalizedShip}: ${String(err)}`);
|
|
1314
|
-
return false;
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
const sendOwnerNotification = async (message) => {
|
|
1318
|
-
const ownerShip = getEffectiveOwnerShip();
|
|
1319
|
-
if (!ownerShip) {
|
|
1320
|
-
runtime.log?.("[tlon] No ownerShip configured, cannot send notification");
|
|
1321
|
-
return;
|
|
1322
|
-
}
|
|
1323
|
-
try {
|
|
1324
|
-
await sendDm({
|
|
1325
|
-
api,
|
|
1326
|
-
fromShip: botShipName,
|
|
1327
|
-
toShip: ownerShip,
|
|
1328
|
-
text: message
|
|
1329
|
-
});
|
|
1330
|
-
runtime.log?.(`[tlon] Sent notification to owner ${ownerShip}`);
|
|
1331
|
-
} catch (err) {
|
|
1332
|
-
runtime.error?.(`[tlon] Failed to send notification to owner: ${String(err)}`);
|
|
1333
|
-
}
|
|
1334
|
-
};
|
|
1335
|
-
const queueApprovalRequest = async (approval) => {
|
|
1336
|
-
if (await isShipBlocked(approval.requestingShip)) {
|
|
1337
|
-
runtime.log?.(`[tlon] Ignoring request from blocked ship ${approval.requestingShip}`);
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
const approvals = getPendingApprovals();
|
|
1341
|
-
const existingIndex = approvals.findIndex((item) => item.type === approval.type && item.requestingShip === approval.requestingShip && (approval.type !== "channel" || item.channelNest === approval.channelNest) && (approval.type !== "group" || item.groupFlag === approval.groupFlag));
|
|
1342
|
-
if (existingIndex !== -1) {
|
|
1343
|
-
const existing = approvals[existingIndex];
|
|
1344
|
-
if (approval.originalMessage) {
|
|
1345
|
-
existing.originalMessage = approval.originalMessage;
|
|
1346
|
-
existing.messagePreview = approval.messagePreview;
|
|
1347
|
-
}
|
|
1348
|
-
runtime.log?.(`[tlon] Updated existing approval for ${approval.requestingShip} (${approval.type}) - re-sending notification`);
|
|
1349
|
-
await savePendingApprovals();
|
|
1350
|
-
await sendOwnerNotification(formatApprovalRequest(existing));
|
|
1351
|
-
return;
|
|
1352
|
-
}
|
|
1353
|
-
setPendingApprovals([...approvals, approval]);
|
|
1354
|
-
await savePendingApprovals();
|
|
1355
|
-
await sendOwnerNotification(formatApprovalRequest(approval));
|
|
1356
|
-
runtime.log?.(`[tlon] Queued approval request: ${approval.id} (${approval.type} from ${approval.requestingShip})`);
|
|
1357
|
-
};
|
|
1358
|
-
const handleApprovalResponse = async (text) => {
|
|
1359
|
-
const parsed = parseApprovalResponse(text);
|
|
1360
|
-
if (!parsed) return false;
|
|
1361
|
-
const approval = findPendingApproval(getPendingApprovals(), parsed.id);
|
|
1362
|
-
if (!approval) {
|
|
1363
|
-
await sendOwnerNotification(`No pending approval found${parsed.id ? ` for ID: ${parsed.id}` : ""}`);
|
|
1364
|
-
return true;
|
|
1365
|
-
}
|
|
1366
|
-
if (parsed.action === "approve") {
|
|
1367
|
-
switch (approval.type) {
|
|
1368
|
-
case "dm":
|
|
1369
|
-
await addToDmAllowlist(approval.requestingShip);
|
|
1370
|
-
if (approval.originalMessage) {
|
|
1371
|
-
runtime.log?.(`[tlon] Processing original message from ${approval.requestingShip} after approval`);
|
|
1372
|
-
await processApprovedMessage(approval);
|
|
1373
|
-
}
|
|
1374
|
-
break;
|
|
1375
|
-
case "channel":
|
|
1376
|
-
if (approval.channelNest) {
|
|
1377
|
-
await addToChannelAllowlist(approval.requestingShip, approval.channelNest);
|
|
1378
|
-
if (approval.originalMessage) {
|
|
1379
|
-
runtime.log?.(`[tlon] Processing original message from ${approval.requestingShip} in ${approval.channelNest} after approval`);
|
|
1380
|
-
await processApprovedMessage(approval);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
break;
|
|
1384
|
-
case "group":
|
|
1385
|
-
if (approval.groupFlag) try {
|
|
1386
|
-
await api.poke({
|
|
1387
|
-
app: "groups",
|
|
1388
|
-
mark: "group-join",
|
|
1389
|
-
json: {
|
|
1390
|
-
flag: approval.groupFlag,
|
|
1391
|
-
"join-all": true
|
|
1392
|
-
}
|
|
1393
|
-
});
|
|
1394
|
-
runtime.log?.(`[tlon] Joined group ${approval.groupFlag} after approval`);
|
|
1395
|
-
setTimeout(() => {
|
|
1396
|
-
(async () => {
|
|
1397
|
-
try {
|
|
1398
|
-
const newCount = await refreshWatchedChannels();
|
|
1399
|
-
if (newCount > 0) runtime.log?.(`[tlon] Discovered ${newCount} new channel(s) after joining group`);
|
|
1400
|
-
} catch (err) {
|
|
1401
|
-
runtime.log?.(`[tlon] Channel discovery after group join failed: ${String(err)}`);
|
|
1402
|
-
}
|
|
1403
|
-
})();
|
|
1404
|
-
}, 2e3);
|
|
1405
|
-
} catch (err) {
|
|
1406
|
-
runtime.error?.(`[tlon] Failed to join group ${approval.groupFlag}: ${String(err)}`);
|
|
1407
|
-
}
|
|
1408
|
-
break;
|
|
1409
|
-
}
|
|
1410
|
-
await sendOwnerNotification(formatApprovalConfirmation(approval, "approve"));
|
|
1411
|
-
} else if (parsed.action === "block") {
|
|
1412
|
-
await blockShip(approval.requestingShip);
|
|
1413
|
-
await sendOwnerNotification(formatApprovalConfirmation(approval, "block"));
|
|
1414
|
-
} else await sendOwnerNotification(formatApprovalConfirmation(approval, "deny"));
|
|
1415
|
-
setPendingApprovals(removePendingApproval(getPendingApprovals(), approval.id));
|
|
1416
|
-
await savePendingApprovals();
|
|
1417
|
-
return true;
|
|
1418
|
-
};
|
|
1419
|
-
const handleAdminCommand = async (text) => {
|
|
1420
|
-
const command = parseAdminCommand(text);
|
|
1421
|
-
if (!command) return false;
|
|
1422
|
-
switch (command.type) {
|
|
1423
|
-
case "blocked": {
|
|
1424
|
-
const blockedShips = await getBlockedShips();
|
|
1425
|
-
await sendOwnerNotification(formatBlockedList(blockedShips));
|
|
1426
|
-
runtime.log?.(`[tlon] Owner requested blocked ships list (${blockedShips.length} ships)`);
|
|
1427
|
-
return true;
|
|
1428
|
-
}
|
|
1429
|
-
case "pending":
|
|
1430
|
-
await sendOwnerNotification(formatPendingList(getPendingApprovals()));
|
|
1431
|
-
runtime.log?.(`[tlon] Owner requested pending approvals list (${getPendingApprovals().length} pending)`);
|
|
1432
|
-
return true;
|
|
1433
|
-
case "unblock": {
|
|
1434
|
-
const shipToUnblock = command.ship;
|
|
1435
|
-
if (!await isShipBlocked(shipToUnblock)) {
|
|
1436
|
-
await sendOwnerNotification(`${shipToUnblock} is not blocked.`);
|
|
1437
|
-
return true;
|
|
1438
|
-
}
|
|
1439
|
-
await sendOwnerNotification(await unblockShip(shipToUnblock) ? `Unblocked ${shipToUnblock}.` : `Failed to unblock ${shipToUnblock}.`);
|
|
1440
|
-
return true;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
};
|
|
1444
|
-
return {
|
|
1445
|
-
queueApprovalRequest,
|
|
1446
|
-
handleApprovalResponse,
|
|
1447
|
-
handleAdminCommand
|
|
1448
|
-
};
|
|
1449
|
-
}
|
|
1450
|
-
//#endregion
|
|
1451
|
-
//#region extensions/tlon/src/monitor/authorization.ts
|
|
1452
|
-
function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
1453
|
-
const tlonConfig = cfg.channels?.tlon;
|
|
1454
|
-
const fileRules = tlonConfig?.authorization?.channelRules ?? {};
|
|
1455
|
-
const rule = (settings?.channelRules ?? {})[channelNest] ?? fileRules[channelNest];
|
|
1456
|
-
const defaultShips = settings?.defaultAuthorizedShips ?? tlonConfig?.defaultAuthorizedShips ?? [];
|
|
1457
|
-
return {
|
|
1458
|
-
mode: rule?.mode ?? "restricted",
|
|
1459
|
-
allowedShips: rule?.allowedShips ?? defaultShips
|
|
1460
|
-
};
|
|
1461
|
-
}
|
|
1462
|
-
//#endregion
|
|
1463
|
-
//#region extensions/tlon/src/monitor/utils.ts
|
|
1464
|
-
function extractCites(content) {
|
|
1465
|
-
if (!content || !Array.isArray(content)) return [];
|
|
1466
|
-
const cites = [];
|
|
1467
|
-
for (const verse of content) if (verse?.block?.cite && typeof verse.block.cite === "object") {
|
|
1468
|
-
const cite = verse.block.cite;
|
|
1469
|
-
if (cite.chan && typeof cite.chan === "object") {
|
|
1470
|
-
const { nest, where } = cite.chan;
|
|
1471
|
-
const whereMatch = where?.match(/\/msg\/(~[a-z-]+)\/(.+)/);
|
|
1472
|
-
cites.push({
|
|
1473
|
-
type: "chan",
|
|
1474
|
-
nest,
|
|
1475
|
-
where,
|
|
1476
|
-
author: whereMatch?.[1],
|
|
1477
|
-
postId: whereMatch?.[2]
|
|
1478
|
-
});
|
|
1479
|
-
} else if (cite.group && typeof cite.group === "string") cites.push({
|
|
1480
|
-
type: "group",
|
|
1481
|
-
group: cite.group
|
|
1482
|
-
});
|
|
1483
|
-
else if (cite.desk && typeof cite.desk === "object") cites.push({
|
|
1484
|
-
type: "desk",
|
|
1485
|
-
flag: cite.desk.flag,
|
|
1486
|
-
where: cite.desk.where
|
|
1487
|
-
});
|
|
1488
|
-
else if (cite.bait && typeof cite.bait === "object") cites.push({
|
|
1489
|
-
type: "bait",
|
|
1490
|
-
group: cite.bait.group,
|
|
1491
|
-
nest: cite.bait.graph,
|
|
1492
|
-
where: cite.bait.where
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
return cites;
|
|
1496
|
-
}
|
|
1497
|
-
function formatModelName(modelString) {
|
|
1498
|
-
if (!modelString) return "AI";
|
|
1499
|
-
const modelName = modelString.includes("/") ? modelString.split("/")[1] : modelString;
|
|
1500
|
-
const modelMappings = {
|
|
1501
|
-
"claude-opus-4-5": "Claude Opus 4.5",
|
|
1502
|
-
"claude-sonnet-4-5": "Claude Sonnet 4.5",
|
|
1503
|
-
"claude-sonnet-3-5": "Claude Sonnet 3.5",
|
|
1504
|
-
"gpt-4o": "GPT-4o",
|
|
1505
|
-
"gpt-4-turbo": "GPT-4 Turbo",
|
|
1506
|
-
"gpt-4": "GPT-4",
|
|
1507
|
-
"gemini-2.0-flash": "Gemini 2.0 Flash",
|
|
1508
|
-
"gemini-pro": "Gemini Pro"
|
|
1509
|
-
};
|
|
1510
|
-
if (modelMappings[modelName]) return modelMappings[modelName];
|
|
1511
|
-
return modelName.replace(/-/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
1512
|
-
}
|
|
1513
|
-
function isBotMentioned(messageText, botShipName, nickname) {
|
|
1514
|
-
if (!messageText || !botShipName) return false;
|
|
1515
|
-
if (/@all\b/i.test(messageText)) return true;
|
|
1516
|
-
const escapedShip = normalizeShip(botShipName).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1517
|
-
if (new RegExp(`(^|\\s)${escapedShip}(?=\\s|$)`, "i").test(messageText)) return true;
|
|
1518
|
-
if (nickname) {
|
|
1519
|
-
const escapedNickname = nickname.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1520
|
-
if (new RegExp(`(^|\\s)${escapedNickname}(?=\\s|$|[,!?.])`, "i").test(messageText)) return true;
|
|
1521
|
-
}
|
|
1522
|
-
return false;
|
|
1523
|
-
}
|
|
1524
|
-
/**
|
|
1525
|
-
* Strip bot ship mention from message text for command detection.
|
|
1526
|
-
* "~bot-ship /status" → "/status"
|
|
1527
|
-
*/
|
|
1528
|
-
function stripBotMention(messageText, botShipName) {
|
|
1529
|
-
if (!messageText || !botShipName) return messageText;
|
|
1530
|
-
return messageText.replace(normalizeShip(botShipName), "").trim();
|
|
1531
|
-
}
|
|
1532
|
-
function isDmAllowed(senderShip, allowlist) {
|
|
1533
|
-
if (!allowlist || allowlist.length === 0) return false;
|
|
1534
|
-
const normalizedSender = normalizeShip(senderShip);
|
|
1535
|
-
return allowlist.map((ship) => normalizeShip(ship)).some((ship) => ship === normalizedSender);
|
|
1536
|
-
}
|
|
1537
|
-
/**
|
|
1538
|
-
* Check if a group invite from a ship should be auto-accepted.
|
|
1539
|
-
*
|
|
1540
|
-
* SECURITY: Fail-safe to deny. If allowlist is empty or undefined,
|
|
1541
|
-
* ALL invites are rejected - even if autoAcceptGroupInvites is enabled.
|
|
1542
|
-
* This prevents misconfigured bots from accepting malicious invites.
|
|
1543
|
-
*/
|
|
1544
|
-
function isGroupInviteAllowed(inviterShip, allowlist) {
|
|
1545
|
-
if (!allowlist || allowlist.length === 0) return false;
|
|
1546
|
-
const normalizedInviter = normalizeShip(inviterShip);
|
|
1547
|
-
return allowlist.map((ship) => normalizeShip(ship)).some((ship) => ship === normalizedInviter);
|
|
1548
|
-
}
|
|
1549
|
-
/**
|
|
1550
|
-
* Resolve quoted/cited content only after the caller has passed authorization.
|
|
1551
|
-
* Unauthorized paths must keep raw text and must not trigger cross-channel cite fetches.
|
|
1552
|
-
*/
|
|
1553
|
-
async function resolveAuthorizedMessageText(params) {
|
|
1554
|
-
const { rawText, content, authorizedForCites, resolveAllCites } = params;
|
|
1555
|
-
if (!authorizedForCites) return rawText;
|
|
1556
|
-
return await resolveAllCites(content) + rawText;
|
|
1557
|
-
}
|
|
1558
|
-
function renderInlineItem(item, options) {
|
|
1559
|
-
if (typeof item === "string") return item;
|
|
1560
|
-
if (!item || typeof item !== "object") return "";
|
|
1561
|
-
if (item.ship) return item.ship;
|
|
1562
|
-
if ("sect" in item) return `@${item.sect || "all"}`;
|
|
1563
|
-
if (options?.allowBreak && item.break !== void 0) return "\n";
|
|
1564
|
-
if (item["inline-code"]) return `\`${item["inline-code"]}\``;
|
|
1565
|
-
if (item.code) return `\`${item.code}\``;
|
|
1566
|
-
if (item.link && item.link.href) return options?.linkMode === "href" ? item.link.href : item.link.content || item.link.href;
|
|
1567
|
-
if (item.bold && Array.isArray(item.bold)) return `**${extractInlineText(item.bold)}**`;
|
|
1568
|
-
if (item.italics && Array.isArray(item.italics)) return `*${extractInlineText(item.italics)}*`;
|
|
1569
|
-
if (item.strike && Array.isArray(item.strike)) return `~~${extractInlineText(item.strike)}~~`;
|
|
1570
|
-
if (options?.allowBlockquote && item.blockquote && Array.isArray(item.blockquote)) return `> ${extractInlineText(item.blockquote)}`;
|
|
1571
|
-
return "";
|
|
1572
|
-
}
|
|
1573
|
-
function extractInlineText(items) {
|
|
1574
|
-
return items.map((item) => renderInlineItem(item)).join("");
|
|
1575
|
-
}
|
|
1576
|
-
function extractMessageText(content) {
|
|
1577
|
-
if (!content || !Array.isArray(content)) return "";
|
|
1578
|
-
return content.map((verse) => {
|
|
1579
|
-
if (verse.inline && Array.isArray(verse.inline)) return verse.inline.map((item) => renderInlineItem(item, {
|
|
1580
|
-
linkMode: "href",
|
|
1581
|
-
allowBreak: true,
|
|
1582
|
-
allowBlockquote: true
|
|
1583
|
-
})).join("");
|
|
1584
|
-
if (verse.block && typeof verse.block === "object") {
|
|
1585
|
-
const block = verse.block;
|
|
1586
|
-
if (block.image && block.image.src) {
|
|
1587
|
-
const alt = block.image.alt ? ` (${block.image.alt})` : "";
|
|
1588
|
-
return `\n${block.image.src}${alt}\n`;
|
|
1589
|
-
}
|
|
1590
|
-
if (block.code && typeof block.code === "object") return `\n\`\`\`${block.code.lang || ""}\n${block.code.code || ""}\n\`\`\`\n`;
|
|
1591
|
-
if (block.header && typeof block.header === "object") return `\n## ${block.header.content?.map((item) => typeof item === "string" ? item : "").join("") || ""}\n`;
|
|
1592
|
-
if (block.cite && typeof block.cite === "object") {
|
|
1593
|
-
const cite = block.cite;
|
|
1594
|
-
if (cite.chan && typeof cite.chan === "object") {
|
|
1595
|
-
const { nest, where } = cite.chan;
|
|
1596
|
-
const whereMatch = where?.match(/\/msg\/(~[a-z-]+)\/(.+)/);
|
|
1597
|
-
if (whereMatch) {
|
|
1598
|
-
const [, author, _postId] = whereMatch;
|
|
1599
|
-
return `\n> [quoted: ${author} in ${nest}]\n`;
|
|
1600
|
-
}
|
|
1601
|
-
return `\n> [quoted from ${nest}]\n`;
|
|
1602
|
-
}
|
|
1603
|
-
if (cite.group && typeof cite.group === "string") return `\n> [ref: group ${cite.group}]\n`;
|
|
1604
|
-
if (cite.desk && typeof cite.desk === "object") return `\n> [ref: ${cite.desk.flag}]\n`;
|
|
1605
|
-
if (cite.bait && typeof cite.bait === "object") return `\n> [ref: ${cite.bait.graph} in ${cite.bait.group}]\n`;
|
|
1606
|
-
return `\n> [quoted message]\n`;
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
return "";
|
|
1610
|
-
}).join("\n").trim();
|
|
1611
|
-
}
|
|
1612
|
-
function isSummarizationRequest(messageText) {
|
|
1613
|
-
return [
|
|
1614
|
-
/summarize\s+(this\s+)?(channel|chat|conversation)/i,
|
|
1615
|
-
/what\s+did\s+i\s+miss/i,
|
|
1616
|
-
/catch\s+me\s+up/i,
|
|
1617
|
-
/channel\s+summary/i,
|
|
1618
|
-
/tldr/i
|
|
1619
|
-
].some((pattern) => pattern.test(messageText));
|
|
1620
|
-
}
|
|
1621
|
-
//#endregion
|
|
1622
|
-
//#region extensions/tlon/src/monitor/cites.ts
|
|
1623
|
-
function createTlonCitationResolver(params) {
|
|
1624
|
-
const { api, runtime } = params;
|
|
1625
|
-
const resolveCiteContent = async (cite) => {
|
|
1626
|
-
if (cite.type !== "chan" || !cite.nest || !cite.postId) return null;
|
|
1627
|
-
try {
|
|
1628
|
-
const scryPath = `/channels/v4/${cite.nest}/posts/post/${cite.postId}.json`;
|
|
1629
|
-
runtime.log?.(`[tlon] Fetching cited post: ${scryPath}`);
|
|
1630
|
-
const data = await api.scry(scryPath);
|
|
1631
|
-
if (data?.essay?.content) return extractMessageText(data.essay.content) || null;
|
|
1632
|
-
return null;
|
|
1633
|
-
} catch (err) {
|
|
1634
|
-
runtime.log?.(`[tlon] Failed to fetch cited post: ${String(err)}`);
|
|
1635
|
-
return null;
|
|
1636
|
-
}
|
|
1637
|
-
};
|
|
1638
|
-
const resolveAllCites = async (content) => {
|
|
1639
|
-
const cites = extractCites(content);
|
|
1640
|
-
if (cites.length === 0) return "";
|
|
1641
|
-
const resolved = [];
|
|
1642
|
-
for (const cite of cites) {
|
|
1643
|
-
const text = await resolveCiteContent(cite);
|
|
1644
|
-
if (text) resolved.push(`> ${cite.author || "unknown"} wrote: ${text}`);
|
|
1645
|
-
}
|
|
1646
|
-
return resolved.length > 0 ? `${resolved.join("\n")}\n\n` : "";
|
|
1647
|
-
};
|
|
1648
|
-
return {
|
|
1649
|
-
resolveCiteContent,
|
|
1650
|
-
resolveAllCites
|
|
1651
|
-
};
|
|
1652
|
-
}
|
|
1653
|
-
//#endregion
|
|
1654
|
-
//#region extensions/tlon/src/monitor/discovery.ts
|
|
1655
|
-
/**
|
|
1656
|
-
* Fetch groups-ui init data, returning channels and foreigns.
|
|
1657
|
-
* This is a single scry that provides both channel discovery and pending invites.
|
|
1658
|
-
*/
|
|
1659
|
-
async function fetchInitData(api, runtime) {
|
|
1660
|
-
try {
|
|
1661
|
-
runtime.log?.("[tlon] Fetching groups-ui init data...");
|
|
1662
|
-
const initData = await api.scry("/groups-ui/v6/init.json");
|
|
1663
|
-
const channels = [];
|
|
1664
|
-
if (initData?.groups) {
|
|
1665
|
-
for (const groupData of Object.values(initData.groups)) if (groupData && typeof groupData === "object" && groupData.channels) {
|
|
1666
|
-
for (const channelNest of Object.keys(groupData.channels)) if (channelNest.startsWith("chat/")) channels.push(channelNest);
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
if (channels.length > 0) runtime.log?.(`[tlon] Auto-discovered ${channels.length} chat channel(s)`);
|
|
1670
|
-
else runtime.log?.("[tlon] No chat channels found via auto-discovery");
|
|
1671
|
-
const foreigns = initData?.foreigns || null;
|
|
1672
|
-
if (foreigns) {
|
|
1673
|
-
const pendingCount = Object.values(foreigns).filter((f) => f.invites?.some((i) => i.valid)).length;
|
|
1674
|
-
if (pendingCount > 0) runtime.log?.(`[tlon] Found ${pendingCount} pending group invite(s)`);
|
|
1675
|
-
}
|
|
1676
|
-
return {
|
|
1677
|
-
channels,
|
|
1678
|
-
foreigns
|
|
1679
|
-
};
|
|
1680
|
-
} catch (error) {
|
|
1681
|
-
runtime.log?.(`[tlon] Init data fetch failed: ${error?.message ?? String(error)}`);
|
|
1682
|
-
return {
|
|
1683
|
-
channels: [],
|
|
1684
|
-
foreigns: null
|
|
1685
|
-
};
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
async function fetchAllChannels(api, runtime) {
|
|
1689
|
-
const { channels } = await fetchInitData(api, runtime);
|
|
1690
|
-
return channels;
|
|
1691
|
-
}
|
|
1692
|
-
//#endregion
|
|
1693
|
-
//#region extensions/tlon/src/monitor/history.ts
|
|
1694
|
-
/**
|
|
1695
|
-
* Format a number as @ud (with dots every 3 digits from the right)
|
|
1696
|
-
* e.g., 170141184507799509469114119040828178432 -> 170.141.184.507.799.509.469.114.119.040.828.178.432
|
|
1697
|
-
*/
|
|
1698
|
-
function formatUd(id) {
|
|
1699
|
-
const reversed = String(id).replace(/\./g, "").split("").toReversed();
|
|
1700
|
-
const chunks = [];
|
|
1701
|
-
for (let i = 0; i < reversed.length; i += 3) chunks.push(reversed.slice(i, i + 3).toReversed().join(""));
|
|
1702
|
-
return chunks.toReversed().join(".");
|
|
1703
|
-
}
|
|
1704
|
-
const messageCache = /* @__PURE__ */ new Map();
|
|
1705
|
-
const MAX_CACHED_MESSAGES = 100;
|
|
1706
|
-
function cacheMessage(channelNest, message) {
|
|
1707
|
-
if (!messageCache.has(channelNest)) messageCache.set(channelNest, []);
|
|
1708
|
-
const cache = messageCache.get(channelNest);
|
|
1709
|
-
if (!cache) return;
|
|
1710
|
-
cache.unshift(message);
|
|
1711
|
-
if (cache.length > MAX_CACHED_MESSAGES) cache.pop();
|
|
1712
|
-
}
|
|
1713
|
-
async function fetchChannelHistory(api, channelNest, count = 50, runtime) {
|
|
1714
|
-
try {
|
|
1715
|
-
const scryPath = `/channels/v4/${channelNest}/posts/newest/${count}/outline.json`;
|
|
1716
|
-
runtime?.log?.(`[tlon] Fetching history: ${scryPath}`);
|
|
1717
|
-
const data = await api.scry(scryPath);
|
|
1718
|
-
if (!data) return [];
|
|
1719
|
-
let posts = [];
|
|
1720
|
-
if (Array.isArray(data)) posts = data;
|
|
1721
|
-
else if (data.posts && typeof data.posts === "object") posts = Object.values(data.posts);
|
|
1722
|
-
else if (typeof data === "object") posts = Object.values(data);
|
|
1723
|
-
const messages = posts.map((item) => {
|
|
1724
|
-
const essay = item.essay || item["r-post"]?.set?.essay;
|
|
1725
|
-
const seal = item.seal || item["r-post"]?.set?.seal;
|
|
1726
|
-
return {
|
|
1727
|
-
author: essay?.author || "unknown",
|
|
1728
|
-
content: extractMessageText(essay?.content || []),
|
|
1729
|
-
timestamp: essay?.sent || Date.now(),
|
|
1730
|
-
id: seal?.id
|
|
1731
|
-
};
|
|
1732
|
-
}).filter((msg) => msg.content);
|
|
1733
|
-
runtime?.log?.(`[tlon] Extracted ${messages.length} messages from history`);
|
|
1734
|
-
return messages;
|
|
1735
|
-
} catch (error) {
|
|
1736
|
-
runtime?.log?.(`[tlon] Error fetching channel history: ${error?.message ?? String(error)}`);
|
|
1737
|
-
return [];
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
async function getChannelHistory(api, channelNest, count = 50, runtime) {
|
|
1741
|
-
const cache = messageCache.get(channelNest) ?? [];
|
|
1742
|
-
if (cache.length >= count) {
|
|
1743
|
-
runtime?.log?.(`[tlon] Using cached messages (${cache.length} available)`);
|
|
1744
|
-
return cache.slice(0, count);
|
|
1745
|
-
}
|
|
1746
|
-
runtime?.log?.(`[tlon] Cache has ${cache.length} messages, need ${count}, fetching from scry...`);
|
|
1747
|
-
return await fetchChannelHistory(api, channelNest, count, runtime);
|
|
1748
|
-
}
|
|
1749
|
-
/**
|
|
1750
|
-
* Fetch thread/reply history for a specific parent post.
|
|
1751
|
-
* Used to get context when entering a thread conversation.
|
|
1752
|
-
*/
|
|
1753
|
-
async function fetchThreadHistory(api, channelNest, parentId, count = 50, runtime) {
|
|
1754
|
-
try {
|
|
1755
|
-
const formattedParentId = formatUd(parentId);
|
|
1756
|
-
runtime?.log?.(`[tlon] Thread history - parentId: ${parentId} -> formatted: ${formattedParentId}`);
|
|
1757
|
-
const scryPath = `/channels/v4/${channelNest}/posts/post/id/${formattedParentId}/replies/newest/${count}.json`;
|
|
1758
|
-
runtime?.log?.(`[tlon] Fetching thread history: ${scryPath}`);
|
|
1759
|
-
const data = await api.scry(scryPath);
|
|
1760
|
-
if (!data) {
|
|
1761
|
-
runtime?.log?.(`[tlon] No thread history data returned`);
|
|
1762
|
-
return [];
|
|
1763
|
-
}
|
|
1764
|
-
let replies = [];
|
|
1765
|
-
if (Array.isArray(data)) replies = data;
|
|
1766
|
-
else if (data.replies && Array.isArray(data.replies)) replies = data.replies;
|
|
1767
|
-
else if (typeof data === "object") replies = Object.values(data);
|
|
1768
|
-
const messages = replies.map((item) => {
|
|
1769
|
-
const memo = item.memo || item["r-reply"]?.set?.memo || item;
|
|
1770
|
-
const seal = item.seal || item["r-reply"]?.set?.seal;
|
|
1771
|
-
return {
|
|
1772
|
-
author: memo?.author || "unknown",
|
|
1773
|
-
content: extractMessageText(memo?.content || []),
|
|
1774
|
-
timestamp: memo?.sent || Date.now(),
|
|
1775
|
-
id: seal?.id || item.id
|
|
1776
|
-
};
|
|
1777
|
-
}).filter((msg) => msg.content);
|
|
1778
|
-
runtime?.log?.(`[tlon] Extracted ${messages.length} thread replies from history`);
|
|
1779
|
-
return messages;
|
|
1780
|
-
} catch (error) {
|
|
1781
|
-
runtime?.log?.(`[tlon] Error fetching thread history: ${error?.message ?? String(error)}`);
|
|
1782
|
-
try {
|
|
1783
|
-
const altPath = `/channels/v4/${channelNest}/posts/post/id/${formatUd(parentId)}.json`;
|
|
1784
|
-
runtime?.log?.(`[tlon] Trying alternate path: ${altPath}`);
|
|
1785
|
-
const data = await api.scry(altPath);
|
|
1786
|
-
if (data?.seal?.meta?.replyCount > 0 && data?.replies) {
|
|
1787
|
-
const messages = (Array.isArray(data.replies) ? data.replies : Object.values(data.replies)).map((reply) => ({
|
|
1788
|
-
author: reply.memo?.author || "unknown",
|
|
1789
|
-
content: extractMessageText(reply.memo?.content || []),
|
|
1790
|
-
timestamp: reply.memo?.sent || Date.now(),
|
|
1791
|
-
id: reply.seal?.id
|
|
1792
|
-
})).filter((msg) => msg.content);
|
|
1793
|
-
runtime?.log?.(`[tlon] Extracted ${messages.length} replies from post data`);
|
|
1794
|
-
return messages;
|
|
1795
|
-
}
|
|
1796
|
-
} catch (altError) {
|
|
1797
|
-
runtime?.log?.(`[tlon] Alternate path also failed: ${altError?.message ?? String(altError)}`);
|
|
1798
|
-
}
|
|
1799
|
-
return [];
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
//#endregion
|
|
1803
|
-
//#region extensions/tlon/src/monitor/media.ts
|
|
1804
|
-
const MAX_IMAGES_PER_MESSAGE = 8;
|
|
1805
|
-
const TLON_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS = 3e4;
|
|
1806
|
-
/**
|
|
1807
|
-
* Extract image blocks from Tlon message content.
|
|
1808
|
-
* Returns array of image URLs found in the message.
|
|
1809
|
-
*/
|
|
1810
|
-
function extractImageBlocks(content) {
|
|
1811
|
-
if (!content || !Array.isArray(content)) return [];
|
|
1812
|
-
const images = [];
|
|
1813
|
-
for (const verse of content) if (verse?.block?.image?.src) {
|
|
1814
|
-
images.push({
|
|
1815
|
-
url: verse.block.image.src,
|
|
1816
|
-
alt: verse.block.image.alt
|
|
1817
|
-
});
|
|
1818
|
-
if (images.length >= MAX_IMAGES_PER_MESSAGE) break;
|
|
1819
|
-
}
|
|
1820
|
-
return images;
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* Download a media file from URL to local storage.
|
|
1824
|
-
* Returns the local path where the file was saved.
|
|
1825
|
-
*/
|
|
1826
|
-
async function downloadMedia(url, mediaDir) {
|
|
1827
|
-
try {
|
|
1828
|
-
const parsedUrl = new URL(url);
|
|
1829
|
-
if (parsedUrl.protocol !== "http:" && parsedUrl.protocol !== "https:") {
|
|
1830
|
-
console.warn(`[tlon-media] Rejected non-http(s) URL: ${url}`);
|
|
1831
|
-
return null;
|
|
1832
|
-
}
|
|
1833
|
-
const fetched = await fetchRemoteMedia({
|
|
1834
|
-
url,
|
|
1835
|
-
maxBytes: MAX_IMAGE_BYTES,
|
|
1836
|
-
readIdleTimeoutMs: TLON_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS,
|
|
1837
|
-
ssrfPolicy: /* @__PURE__ */ getDefaultSsrFPolicy(),
|
|
1838
|
-
requestInit: { method: "GET" }
|
|
1839
|
-
});
|
|
1840
|
-
if (!mediaDir) {
|
|
1841
|
-
const saved = await saveMediaBuffer(fetched.buffer, fetched.contentType, "inbound", MAX_IMAGE_BYTES, fetched.fileName);
|
|
1842
|
-
return {
|
|
1843
|
-
localPath: saved.path,
|
|
1844
|
-
contentType: saved.contentType ?? fetched.contentType ?? "application/octet-stream",
|
|
1845
|
-
originalUrl: url
|
|
1846
|
-
};
|
|
1847
|
-
}
|
|
1848
|
-
await mkdir(mediaDir, { recursive: true });
|
|
1849
|
-
const ext = getExtensionFromFileName(fetched.fileName) || getExtensionFromContentType(fetched.contentType ?? "") || getExtensionFromUrl(url) || "bin";
|
|
1850
|
-
const localPath = path$1.join(mediaDir, `${randomUUID()}.${ext}`);
|
|
1851
|
-
await writeFile(localPath, fetched.buffer);
|
|
1852
|
-
return {
|
|
1853
|
-
localPath,
|
|
1854
|
-
contentType: fetched.contentType ?? "application/octet-stream",
|
|
1855
|
-
originalUrl: url
|
|
1856
|
-
};
|
|
1857
|
-
} catch (error) {
|
|
1858
|
-
console.error(`[tlon-media] Error downloading ${url}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1859
|
-
return null;
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
function getExtensionFromFileName(fileName) {
|
|
1863
|
-
if (!fileName) return null;
|
|
1864
|
-
return path$1.extname(fileName).replace(/^\./, "") || null;
|
|
1865
|
-
}
|
|
1866
|
-
function getExtensionFromContentType(contentType) {
|
|
1867
|
-
return {
|
|
1868
|
-
"image/jpeg": "jpg",
|
|
1869
|
-
"image/jpg": "jpg",
|
|
1870
|
-
"image/png": "png",
|
|
1871
|
-
"image/gif": "gif",
|
|
1872
|
-
"image/webp": "webp",
|
|
1873
|
-
"image/svg+xml": "svg",
|
|
1874
|
-
"video/mp4": "mp4",
|
|
1875
|
-
"video/webm": "webm",
|
|
1876
|
-
"audio/mpeg": "mp3",
|
|
1877
|
-
"audio/ogg": "ogg"
|
|
1878
|
-
}[contentType.split(";")[0].trim()] ?? null;
|
|
1879
|
-
}
|
|
1880
|
-
function getExtensionFromUrl(url) {
|
|
1881
|
-
try {
|
|
1882
|
-
const match = new URL(url).pathname.match(/\.([a-z0-9]+)$/i);
|
|
1883
|
-
return match ? match[1].toLowerCase() : null;
|
|
1884
|
-
} catch {
|
|
1885
|
-
return null;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
/**
|
|
1889
|
-
* Download all images from a message and return attachment metadata.
|
|
1890
|
-
* Format matches OpenClaw's expected attachment structure.
|
|
1891
|
-
*/
|
|
1892
|
-
async function downloadMessageImages(content, mediaDir) {
|
|
1893
|
-
const images = extractImageBlocks(content);
|
|
1894
|
-
if (images.length === 0) return [];
|
|
1895
|
-
const attachments = [];
|
|
1896
|
-
for (const image of images) {
|
|
1897
|
-
const downloaded = await downloadMedia(image.url, mediaDir);
|
|
1898
|
-
if (downloaded) attachments.push({
|
|
1899
|
-
path: downloaded.localPath,
|
|
1900
|
-
contentType: downloaded.contentType
|
|
1901
|
-
});
|
|
1902
|
-
}
|
|
1903
|
-
return attachments;
|
|
1904
|
-
}
|
|
1905
|
-
//#endregion
|
|
1906
|
-
//#region extensions/tlon/src/monitor/processed-messages.ts
|
|
1907
|
-
function createProcessedMessageTracker(limit = 2e3) {
|
|
1908
|
-
const dedupe = createDedupeCache({
|
|
1909
|
-
ttlMs: 0,
|
|
1910
|
-
maxSize: limit
|
|
1911
|
-
});
|
|
1912
|
-
const mark = (id) => {
|
|
1913
|
-
const trimmed = id?.trim();
|
|
1914
|
-
if (!trimmed) return true;
|
|
1915
|
-
return !dedupe.check(trimmed);
|
|
1916
|
-
};
|
|
1917
|
-
const has = (id) => {
|
|
1918
|
-
const trimmed = id?.trim();
|
|
1919
|
-
if (!trimmed) return false;
|
|
1920
|
-
return dedupe.peek(trimmed);
|
|
1921
|
-
};
|
|
1922
|
-
return {
|
|
1923
|
-
mark,
|
|
1924
|
-
has,
|
|
1925
|
-
size: () => dedupe.size()
|
|
1926
|
-
};
|
|
1927
|
-
}
|
|
1928
|
-
//#endregion
|
|
1929
|
-
//#region extensions/tlon/src/monitor/settings-helpers.ts
|
|
1930
|
-
function buildTlonSettingsMigrations(account, currentSettings) {
|
|
1931
|
-
return [
|
|
1932
|
-
{
|
|
1933
|
-
key: "dmAllowlist",
|
|
1934
|
-
fileValue: account.dmAllowlist,
|
|
1935
|
-
settingsValue: currentSettings.dmAllowlist
|
|
1936
|
-
},
|
|
1937
|
-
{
|
|
1938
|
-
key: "groupInviteAllowlist",
|
|
1939
|
-
fileValue: account.groupInviteAllowlist,
|
|
1940
|
-
settingsValue: currentSettings.groupInviteAllowlist
|
|
1941
|
-
},
|
|
1942
|
-
{
|
|
1943
|
-
key: "groupChannels",
|
|
1944
|
-
fileValue: account.groupChannels,
|
|
1945
|
-
settingsValue: currentSettings.groupChannels
|
|
1946
|
-
},
|
|
1947
|
-
{
|
|
1948
|
-
key: "defaultAuthorizedShips",
|
|
1949
|
-
fileValue: account.defaultAuthorizedShips,
|
|
1950
|
-
settingsValue: currentSettings.defaultAuthorizedShips
|
|
1951
|
-
},
|
|
1952
|
-
{
|
|
1953
|
-
key: "autoDiscoverChannels",
|
|
1954
|
-
fileValue: account.autoDiscoverChannels,
|
|
1955
|
-
settingsValue: currentSettings.autoDiscoverChannels
|
|
1956
|
-
},
|
|
1957
|
-
{
|
|
1958
|
-
key: "autoAcceptDmInvites",
|
|
1959
|
-
fileValue: account.autoAcceptDmInvites,
|
|
1960
|
-
settingsValue: currentSettings.autoAcceptDmInvites
|
|
1961
|
-
},
|
|
1962
|
-
{
|
|
1963
|
-
key: "autoAcceptGroupInvites",
|
|
1964
|
-
fileValue: account.autoAcceptGroupInvites,
|
|
1965
|
-
settingsValue: currentSettings.autoAcceptGroupInvites
|
|
1966
|
-
},
|
|
1967
|
-
{
|
|
1968
|
-
key: "showModelSig",
|
|
1969
|
-
fileValue: account.showModelSignature,
|
|
1970
|
-
settingsValue: currentSettings.showModelSig
|
|
1971
|
-
}
|
|
1972
|
-
];
|
|
1973
|
-
}
|
|
1974
|
-
function shouldMigrateTlonSetting(fileValue, settingsValue) {
|
|
1975
|
-
return (Array.isArray(fileValue) ? fileValue.length > 0 : fileValue != null) && !(settingsValue != null);
|
|
1976
|
-
}
|
|
1977
|
-
function applyTlonSettingsOverrides(params) {
|
|
1978
|
-
let effectiveDmAllowlist = params.account.dmAllowlist;
|
|
1979
|
-
let effectiveShowModelSig = params.account.showModelSignature ?? false;
|
|
1980
|
-
let effectiveAutoAcceptDmInvites = params.account.autoAcceptDmInvites ?? false;
|
|
1981
|
-
let effectiveAutoAcceptGroupInvites = params.account.autoAcceptGroupInvites ?? false;
|
|
1982
|
-
let effectiveGroupInviteAllowlist = params.account.groupInviteAllowlist;
|
|
1983
|
-
let effectiveAutoDiscoverChannels = params.account.autoDiscoverChannels ?? false;
|
|
1984
|
-
let effectiveOwnerShip = params.account.ownerShip ? normalizeShip(params.account.ownerShip) : null;
|
|
1985
|
-
let pendingApprovals = [];
|
|
1986
|
-
if (params.currentSettings.defaultAuthorizedShips?.length) params.log?.(`[tlon] Using defaultAuthorizedShips from settings store: ${params.currentSettings.defaultAuthorizedShips.join(", ")}`);
|
|
1987
|
-
if (params.currentSettings.autoDiscoverChannels !== void 0) {
|
|
1988
|
-
effectiveAutoDiscoverChannels = params.currentSettings.autoDiscoverChannels;
|
|
1989
|
-
params.log?.(`[tlon] Using autoDiscoverChannels from settings store: ${effectiveAutoDiscoverChannels}`);
|
|
1990
|
-
}
|
|
1991
|
-
if (params.currentSettings.dmAllowlist !== void 0) {
|
|
1992
|
-
effectiveDmAllowlist = params.currentSettings.dmAllowlist;
|
|
1993
|
-
params.log?.(`[tlon] Using dmAllowlist from settings store: ${effectiveDmAllowlist.join(", ")}`);
|
|
1994
|
-
}
|
|
1995
|
-
if (params.currentSettings.showModelSig !== void 0) effectiveShowModelSig = params.currentSettings.showModelSig;
|
|
1996
|
-
if (params.currentSettings.autoAcceptDmInvites !== void 0) {
|
|
1997
|
-
effectiveAutoAcceptDmInvites = params.currentSettings.autoAcceptDmInvites;
|
|
1998
|
-
params.log?.(`[tlon] Using autoAcceptDmInvites from settings store: ${effectiveAutoAcceptDmInvites}`);
|
|
1999
|
-
}
|
|
2000
|
-
if (params.currentSettings.autoAcceptGroupInvites !== void 0) {
|
|
2001
|
-
effectiveAutoAcceptGroupInvites = params.currentSettings.autoAcceptGroupInvites;
|
|
2002
|
-
params.log?.(`[tlon] Using autoAcceptGroupInvites from settings store: ${effectiveAutoAcceptGroupInvites}`);
|
|
2003
|
-
}
|
|
2004
|
-
if (params.currentSettings.groupInviteAllowlist !== void 0) {
|
|
2005
|
-
effectiveGroupInviteAllowlist = params.currentSettings.groupInviteAllowlist;
|
|
2006
|
-
params.log?.(`[tlon] Using groupInviteAllowlist from settings store: ${effectiveGroupInviteAllowlist.join(", ")}`);
|
|
2007
|
-
}
|
|
2008
|
-
if (params.currentSettings.ownerShip) {
|
|
2009
|
-
effectiveOwnerShip = normalizeShip(params.currentSettings.ownerShip);
|
|
2010
|
-
params.log?.(`[tlon] Using ownerShip from settings store: ${effectiveOwnerShip}`);
|
|
2011
|
-
}
|
|
2012
|
-
if (params.currentSettings.pendingApprovals?.length) {
|
|
2013
|
-
pendingApprovals = params.currentSettings.pendingApprovals;
|
|
2014
|
-
params.log?.(`[tlon] Loaded ${pendingApprovals.length} pending approval(s) from settings`);
|
|
2015
|
-
}
|
|
2016
|
-
return {
|
|
2017
|
-
effectiveDmAllowlist,
|
|
2018
|
-
effectiveShowModelSig,
|
|
2019
|
-
effectiveAutoAcceptDmInvites,
|
|
2020
|
-
effectiveAutoAcceptGroupInvites,
|
|
2021
|
-
effectiveGroupInviteAllowlist,
|
|
2022
|
-
effectiveAutoDiscoverChannels,
|
|
2023
|
-
effectiveOwnerShip,
|
|
2024
|
-
pendingApprovals,
|
|
2025
|
-
currentSettings: params.currentSettings
|
|
2026
|
-
};
|
|
2027
|
-
}
|
|
2028
|
-
function mergeUniqueStrings(base, next) {
|
|
2029
|
-
if (!next?.length) return [...base];
|
|
2030
|
-
const merged = [...base];
|
|
2031
|
-
for (const value of next) if (!merged.includes(value)) merged.push(value);
|
|
2032
|
-
return merged;
|
|
2033
|
-
}
|
|
2034
|
-
//#endregion
|
|
2035
|
-
//#region extensions/tlon/src/monitor/index.ts
|
|
2036
|
-
async function monitorTlonProvider(opts = {}) {
|
|
2037
|
-
const core = getTlonRuntime();
|
|
2038
|
-
const cfg = core.config.loadConfig();
|
|
2039
|
-
if (cfg.channels?.tlon?.enabled === false) return;
|
|
2040
|
-
const logger = core.logging.getChildLogger({ module: "tlon-auto-reply" });
|
|
2041
|
-
const runtime = opts.runtime ?? createLoggerBackedRuntime({ logger });
|
|
2042
|
-
const account = resolveTlonAccount(cfg, opts.accountId ?? void 0);
|
|
2043
|
-
if (!account.enabled) return;
|
|
2044
|
-
if (!account.configured || !account.ship || !account.url || !account.code) throw new Error("Tlon account not configured (ship/url/code required)");
|
|
2045
|
-
const botShipName = normalizeShip(account.ship);
|
|
2046
|
-
runtime.log?.(`[tlon] Starting monitor for ${botShipName}`);
|
|
2047
|
-
const ssrfPolicy = ssrfPolicyFromAllowPrivateNetwork(account.allowPrivateNetwork);
|
|
2048
|
-
const accountUrl = account.url;
|
|
2049
|
-
const accountCode = account.code;
|
|
2050
|
-
async function authenticateWithRetry(maxAttempts = 10) {
|
|
2051
|
-
for (let attempt = 1;; attempt++) {
|
|
2052
|
-
if (opts.abortSignal?.aborted) throw new Error("Aborted while waiting to authenticate");
|
|
2053
|
-
try {
|
|
2054
|
-
runtime.log?.(`[tlon] Attempting authentication to ${accountUrl}...`);
|
|
2055
|
-
return await authenticate(accountUrl, accountCode, { ssrfPolicy });
|
|
2056
|
-
} catch (error) {
|
|
2057
|
-
runtime.error?.(`[tlon] Failed to authenticate (attempt ${attempt}): ${error?.message ?? String(error)}`);
|
|
2058
|
-
if (attempt >= maxAttempts) throw error;
|
|
2059
|
-
const delay = Math.min(3e4, 1e3 * Math.pow(2, attempt - 1));
|
|
2060
|
-
runtime.log?.(`[tlon] Retrying authentication in ${delay}ms...`);
|
|
2061
|
-
await new Promise((resolve, reject) => {
|
|
2062
|
-
const timer = setTimeout(resolve, delay);
|
|
2063
|
-
if (opts.abortSignal) {
|
|
2064
|
-
const onAbort = () => {
|
|
2065
|
-
clearTimeout(timer);
|
|
2066
|
-
reject(/* @__PURE__ */ new Error("Aborted"));
|
|
2067
|
-
};
|
|
2068
|
-
opts.abortSignal.addEventListener("abort", onAbort, { once: true });
|
|
2069
|
-
}
|
|
2070
|
-
});
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
let api = null;
|
|
2075
|
-
const cookie = await authenticateWithRetry();
|
|
2076
|
-
api = new UrbitSSEClient(account.url, cookie, {
|
|
2077
|
-
ship: botShipName,
|
|
2078
|
-
ssrfPolicy,
|
|
2079
|
-
logger: {
|
|
2080
|
-
log: (message) => runtime.log?.(message),
|
|
2081
|
-
error: (message) => runtime.error?.(message)
|
|
2082
|
-
},
|
|
2083
|
-
onReconnect: async (client) => {
|
|
2084
|
-
runtime.log?.("[tlon] Re-authenticating on SSE reconnect...");
|
|
2085
|
-
const newCookie = await authenticateWithRetry(5);
|
|
2086
|
-
client.updateCookie(newCookie);
|
|
2087
|
-
runtime.log?.("[tlon] Re-authentication successful");
|
|
2088
|
-
}
|
|
2089
|
-
});
|
|
2090
|
-
const processedTracker = createProcessedMessageTracker(2e3);
|
|
2091
|
-
let groupChannels = [];
|
|
2092
|
-
let botNickname = null;
|
|
2093
|
-
const settingsManager = createSettingsManager(api, {
|
|
2094
|
-
log: (msg) => runtime.log?.(msg),
|
|
2095
|
-
error: (msg) => runtime.error?.(msg)
|
|
2096
|
-
});
|
|
2097
|
-
let effectiveDmAllowlist = account.dmAllowlist;
|
|
2098
|
-
let effectiveShowModelSig = account.showModelSignature ?? false;
|
|
2099
|
-
let effectiveAutoAcceptDmInvites = account.autoAcceptDmInvites ?? false;
|
|
2100
|
-
let effectiveAutoAcceptGroupInvites = account.autoAcceptGroupInvites ?? false;
|
|
2101
|
-
let effectiveGroupInviteAllowlist = account.groupInviteAllowlist;
|
|
2102
|
-
let effectiveAutoDiscoverChannels = account.autoDiscoverChannels ?? false;
|
|
2103
|
-
let effectiveOwnerShip = account.ownerShip ? normalizeShip(account.ownerShip) : null;
|
|
2104
|
-
let pendingApprovals = [];
|
|
2105
|
-
let currentSettings = {};
|
|
2106
|
-
const participatedThreads = /* @__PURE__ */ new Set();
|
|
2107
|
-
const dmSendersBySession = /* @__PURE__ */ new Map();
|
|
2108
|
-
let sharedSessionWarningSent = false;
|
|
2109
|
-
try {
|
|
2110
|
-
const selfProfile = await api.scry("/contacts/v1/self.json");
|
|
2111
|
-
if (selfProfile && typeof selfProfile === "object") {
|
|
2112
|
-
botNickname = selfProfile.nickname?.value || null;
|
|
2113
|
-
if (botNickname) runtime.log?.(`[tlon] Bot nickname: ${botNickname}`);
|
|
2114
|
-
}
|
|
2115
|
-
} catch (error) {
|
|
2116
|
-
runtime.log?.(`[tlon] Could not fetch nickname: ${error?.message ?? String(error)}`);
|
|
2117
|
-
}
|
|
2118
|
-
let initForeigns = null;
|
|
2119
|
-
async function migrateConfigToSettings() {
|
|
2120
|
-
const migrations = buildTlonSettingsMigrations(account, currentSettings);
|
|
2121
|
-
for (const { key, fileValue, settingsValue } of migrations) if (shouldMigrateTlonSetting(fileValue, settingsValue)) try {
|
|
2122
|
-
await api.poke({
|
|
2123
|
-
app: "settings",
|
|
2124
|
-
mark: "settings-event",
|
|
2125
|
-
json: { "put-entry": {
|
|
2126
|
-
"bucket-key": "tlon",
|
|
2127
|
-
"entry-key": key,
|
|
2128
|
-
value: fileValue,
|
|
2129
|
-
desk: "moltbot"
|
|
2130
|
-
} }
|
|
2131
|
-
});
|
|
2132
|
-
runtime.log?.(`[tlon] Migrated ${key} from config to settings store`);
|
|
2133
|
-
} catch (err) {
|
|
2134
|
-
runtime.log?.(`[tlon] Failed to migrate ${key}: ${String(err)}`);
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
|
-
try {
|
|
2138
|
-
currentSettings = await settingsManager.load();
|
|
2139
|
-
await migrateConfigToSettings();
|
|
2140
|
-
({effectiveDmAllowlist, effectiveShowModelSig, effectiveAutoAcceptDmInvites, effectiveAutoAcceptGroupInvites, effectiveGroupInviteAllowlist, effectiveAutoDiscoverChannels, effectiveOwnerShip, pendingApprovals, currentSettings} = applyTlonSettingsOverrides({
|
|
2141
|
-
account,
|
|
2142
|
-
currentSettings,
|
|
2143
|
-
log: (message) => runtime.log?.(message)
|
|
2144
|
-
}));
|
|
2145
|
-
} catch (err) {
|
|
2146
|
-
runtime.log?.(`[tlon] Settings store not available, using file config: ${String(err)}`);
|
|
2147
|
-
}
|
|
2148
|
-
if (effectiveAutoDiscoverChannels) try {
|
|
2149
|
-
const initData = await fetchInitData(api, runtime);
|
|
2150
|
-
if (initData.channels.length > 0) groupChannels = initData.channels;
|
|
2151
|
-
initForeigns = initData.foreigns;
|
|
2152
|
-
} catch (error) {
|
|
2153
|
-
runtime.error?.(`[tlon] Auto-discovery failed: ${error?.message ?? String(error)}`);
|
|
2154
|
-
}
|
|
2155
|
-
if (account.groupChannels.length > 0) {
|
|
2156
|
-
groupChannels = mergeUniqueStrings(groupChannels, account.groupChannels);
|
|
2157
|
-
runtime.log?.(`[tlon] Added ${account.groupChannels.length} manual groupChannels to monitoring`);
|
|
2158
|
-
}
|
|
2159
|
-
groupChannels = mergeUniqueStrings(groupChannels, currentSettings.groupChannels);
|
|
2160
|
-
if (groupChannels.length > 0) runtime.log?.(`[tlon] Monitoring ${groupChannels.length} group channel(s): ${groupChannels.join(", ")}`);
|
|
2161
|
-
else runtime.log?.("[tlon] No group channels to monitor (DMs only)");
|
|
2162
|
-
function isOwner(ship) {
|
|
2163
|
-
if (!effectiveOwnerShip) return false;
|
|
2164
|
-
return normalizeShip(ship) === effectiveOwnerShip;
|
|
2165
|
-
}
|
|
2166
|
-
/**
|
|
2167
|
-
* Extract the DM partner ship from the 'whom' field.
|
|
2168
|
-
* This is the canonical source for DM routing (more reliable than essay.author).
|
|
2169
|
-
* Returns empty string if whom doesn't contain a valid patp-like value.
|
|
2170
|
-
*/
|
|
2171
|
-
function extractDmPartnerShip(whom) {
|
|
2172
|
-
const normalized = normalizeShip(typeof whom === "string" ? whom : whom && typeof whom === "object" && "ship" in whom && typeof whom.ship === "string" ? whom.ship : "");
|
|
2173
|
-
return /^~?[a-z-]+$/i.test(normalized) ? normalized : "";
|
|
2174
|
-
}
|
|
2175
|
-
const processMessage = async (params) => {
|
|
2176
|
-
const { messageId, senderShip, isGroup, channelNest, hostShip, channelName, timestamp, parentId, isThreadReply, messageContent } = params;
|
|
2177
|
-
const groupChannel = channelNest;
|
|
2178
|
-
let messageText = params.messageText;
|
|
2179
|
-
let attachments = [];
|
|
2180
|
-
if (messageContent) try {
|
|
2181
|
-
attachments = await downloadMessageImages(messageContent);
|
|
2182
|
-
if (attachments.length > 0) runtime.log?.(`[tlon] Downloaded ${attachments.length} image(s) from message`);
|
|
2183
|
-
} catch (error) {
|
|
2184
|
-
runtime.log?.(`[tlon] Failed to download images: ${error?.message ?? String(error)}`);
|
|
2185
|
-
}
|
|
2186
|
-
if (isThreadReply && parentId && groupChannel) try {
|
|
2187
|
-
const threadHistory = await fetchThreadHistory(api, groupChannel, parentId, 20, runtime);
|
|
2188
|
-
if (threadHistory.length > 0) {
|
|
2189
|
-
const threadContext = threadHistory.slice(-10).map((msg) => `${msg.author}: ${msg.content}`).join("\n");
|
|
2190
|
-
messageText = `${`[Thread conversation - ${threadHistory.length} previous replies. You are participating in this thread. Only respond if relevant or helpful - you don't need to reply to every message.]`}\n\n[Previous messages]\n${threadContext}\n\n[Current message]\n${messageText}`;
|
|
2191
|
-
runtime?.log?.(`[tlon] Added thread context (${threadHistory.length} replies) to message`);
|
|
2192
|
-
}
|
|
2193
|
-
} catch (error) {
|
|
2194
|
-
runtime?.log?.(`[tlon] Could not fetch thread context: ${error?.message ?? String(error)}`);
|
|
2195
|
-
}
|
|
2196
|
-
if (isGroup && groupChannel && isSummarizationRequest(messageText)) try {
|
|
2197
|
-
const history = await getChannelHistory(api, groupChannel, 50, runtime);
|
|
2198
|
-
if (history.length === 0) {
|
|
2199
|
-
const noHistoryMsg = "I couldn't fetch any messages for this channel. It might be empty or there might be a permissions issue.";
|
|
2200
|
-
if (isGroup) {
|
|
2201
|
-
const parsed = parseChannelNest(groupChannel);
|
|
2202
|
-
if (parsed) await sendGroupMessage({
|
|
2203
|
-
api,
|
|
2204
|
-
fromShip: botShipName,
|
|
2205
|
-
hostShip: parsed.hostShip,
|
|
2206
|
-
channelName: parsed.channelName,
|
|
2207
|
-
text: noHistoryMsg
|
|
2208
|
-
});
|
|
2209
|
-
} else await sendDm({
|
|
2210
|
-
api,
|
|
2211
|
-
fromShip: botShipName,
|
|
2212
|
-
toShip: senderShip,
|
|
2213
|
-
text: noHistoryMsg
|
|
2214
|
-
});
|
|
2215
|
-
return;
|
|
2216
|
-
}
|
|
2217
|
-
const historyText = history.map((msg) => `[${new Date(msg.timestamp).toLocaleString()}] ${msg.author}: ${msg.content}`).join("\n");
|
|
2218
|
-
messageText = `Please summarize this channel conversation (${history.length} recent messages):\n\n${historyText}\n\nProvide a concise summary highlighting:
|
|
2219
|
-
1. Main topics discussed
|
|
2220
|
-
2. Key decisions or conclusions
|
|
2221
|
-
3. Action items if any
|
|
2222
|
-
4. Notable participants`;
|
|
2223
|
-
} catch (error) {
|
|
2224
|
-
const errorMsg = `Sorry, I encountered an error while fetching the channel history: ${error?.message ?? String(error)}`;
|
|
2225
|
-
if (isGroup && groupChannel) {
|
|
2226
|
-
const parsed = parseChannelNest(groupChannel);
|
|
2227
|
-
if (parsed) await sendGroupMessage({
|
|
2228
|
-
api,
|
|
2229
|
-
fromShip: botShipName,
|
|
2230
|
-
hostShip: parsed.hostShip,
|
|
2231
|
-
channelName: parsed.channelName,
|
|
2232
|
-
text: errorMsg
|
|
2233
|
-
});
|
|
2234
|
-
} else await sendDm({
|
|
2235
|
-
api,
|
|
2236
|
-
fromShip: botShipName,
|
|
2237
|
-
toShip: senderShip,
|
|
2238
|
-
text: errorMsg
|
|
2239
|
-
});
|
|
2240
|
-
return;
|
|
2241
|
-
}
|
|
2242
|
-
const route = core.channel.routing.resolveAgentRoute({
|
|
2243
|
-
cfg,
|
|
2244
|
-
channel: "tlon",
|
|
2245
|
-
accountId: opts.accountId ?? void 0,
|
|
2246
|
-
peer: {
|
|
2247
|
-
kind: isGroup ? "group" : "direct",
|
|
2248
|
-
id: isGroup ? groupChannel ?? senderShip : senderShip
|
|
2249
|
-
}
|
|
2250
|
-
});
|
|
2251
|
-
if (!isGroup) {
|
|
2252
|
-
const sessionKey = route.sessionKey;
|
|
2253
|
-
if (!dmSendersBySession.has(sessionKey)) dmSendersBySession.set(sessionKey, /* @__PURE__ */ new Set());
|
|
2254
|
-
const senders = dmSendersBySession.get(sessionKey);
|
|
2255
|
-
if (senders.size > 0 && !senders.has(senderShip)) {
|
|
2256
|
-
runtime.log?.("[tlon] ⚠️ SECURITY: Multiple users sharing DM session. Configure \"session.dmScope: per-channel-peer\" in OpenClaw config.");
|
|
2257
|
-
if (!sharedSessionWarningSent && effectiveOwnerShip) {
|
|
2258
|
-
sharedSessionWarningSent = true;
|
|
2259
|
-
sendDm({
|
|
2260
|
-
api,
|
|
2261
|
-
fromShip: botShipName,
|
|
2262
|
-
toShip: effectiveOwnerShip,
|
|
2263
|
-
text: "⚠️ Security Warning: Multiple users are sharing a DM session with this bot. This can leak conversation context between users.\n\nFix: Add to your OpenClaw config:\nsession:\n dmScope: \"per-channel-peer\"\n\nDocs: https://docs.openclaw.ai/concepts/session#secure-dm-mode"
|
|
2264
|
-
}).catch((err) => runtime.error?.(`[tlon] Failed to send security warning to owner: ${err}`));
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
senders.add(senderShip);
|
|
2268
|
-
}
|
|
2269
|
-
const senderRole = isOwner(senderShip) ? "owner" : "user";
|
|
2270
|
-
const fromLabel = isGroup ? `${senderShip} [${senderRole}] in ${channelNest}` : `${senderShip} [${senderRole}]`;
|
|
2271
|
-
const shouldComputeAuth = core.channel.commands.shouldComputeCommandAuthorized(messageText, cfg);
|
|
2272
|
-
let commandAuthorized = false;
|
|
2273
|
-
if (shouldComputeAuth) {
|
|
2274
|
-
const useAccessGroups = cfg.commands?.useAccessGroups !== false;
|
|
2275
|
-
const senderIsOwner = isOwner(senderShip);
|
|
2276
|
-
commandAuthorized = core.channel.commands.resolveCommandAuthorizedFromAuthorizers({
|
|
2277
|
-
useAccessGroups,
|
|
2278
|
-
authorizers: [{
|
|
2279
|
-
configured: Boolean(effectiveOwnerShip),
|
|
2280
|
-
allowed: senderIsOwner
|
|
2281
|
-
}]
|
|
2282
|
-
});
|
|
2283
|
-
if (!commandAuthorized) console.log(`[tlon] Command attempt denied: ${senderShip} is not owner (owner=${effectiveOwnerShip ?? "not configured"})`);
|
|
2284
|
-
}
|
|
2285
|
-
let bodyWithAttachments = messageText;
|
|
2286
|
-
if (attachments.length > 0) bodyWithAttachments = attachments.map((a) => `[media attached: ${a.path} (${a.contentType}) | ${a.path}]`).join("\n") + "\n" + messageText;
|
|
2287
|
-
const body = core.channel.reply.formatAgentEnvelope({
|
|
2288
|
-
channel: "Tlon",
|
|
2289
|
-
from: fromLabel,
|
|
2290
|
-
timestamp,
|
|
2291
|
-
body: bodyWithAttachments
|
|
2292
|
-
});
|
|
2293
|
-
const commandBody = isGroup ? stripBotMention(messageText, botShipName) : messageText;
|
|
2294
|
-
const ctxPayload = core.channel.reply.finalizeInboundContext({
|
|
2295
|
-
Body: body,
|
|
2296
|
-
RawBody: messageText,
|
|
2297
|
-
CommandBody: commandBody,
|
|
2298
|
-
From: isGroup ? `tlon:group:${groupChannel}` : `tlon:${senderShip}`,
|
|
2299
|
-
To: `tlon:${botShipName}`,
|
|
2300
|
-
SessionKey: route.sessionKey,
|
|
2301
|
-
AccountId: route.accountId,
|
|
2302
|
-
ChatType: isGroup ? "group" : "direct",
|
|
2303
|
-
ConversationLabel: fromLabel,
|
|
2304
|
-
SenderName: senderShip,
|
|
2305
|
-
SenderId: senderShip,
|
|
2306
|
-
SenderRole: senderRole,
|
|
2307
|
-
CommandAuthorized: commandAuthorized,
|
|
2308
|
-
CommandSource: "text",
|
|
2309
|
-
Provider: "tlon",
|
|
2310
|
-
Surface: "tlon",
|
|
2311
|
-
MessageSid: messageId,
|
|
2312
|
-
...attachments.length > 0 && { Attachments: attachments },
|
|
2313
|
-
OriginatingChannel: "tlon",
|
|
2314
|
-
OriginatingTo: `tlon:${isGroup ? groupChannel : botShipName}`,
|
|
2315
|
-
...parentId && {
|
|
2316
|
-
ThreadId: String(parentId),
|
|
2317
|
-
ReplyToId: String(parentId)
|
|
2318
|
-
}
|
|
2319
|
-
});
|
|
2320
|
-
const dispatchStartTime = Date.now();
|
|
2321
|
-
const responsePrefix = core.channel.reply.resolveEffectiveMessagesConfig(cfg, route.agentId).responsePrefix;
|
|
2322
|
-
const humanDelay = core.channel.reply.resolveHumanDelayConfig(cfg, route.agentId);
|
|
2323
|
-
await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
2324
|
-
ctx: ctxPayload,
|
|
2325
|
-
cfg,
|
|
2326
|
-
dispatcherOptions: {
|
|
2327
|
-
responsePrefix,
|
|
2328
|
-
humanDelay,
|
|
2329
|
-
deliver: async (payload) => {
|
|
2330
|
-
let replyText = payload.text;
|
|
2331
|
-
if (!replyText) return;
|
|
2332
|
-
if (effectiveShowModelSig) {
|
|
2333
|
-
const extPayload = payload;
|
|
2334
|
-
const extRoute = route;
|
|
2335
|
-
const defaultModel = cfg.agents?.defaults?.model;
|
|
2336
|
-
const modelInfo = extPayload.metadata?.model || extPayload.model || extRoute.model || (typeof defaultModel === "string" ? defaultModel : defaultModel?.primary);
|
|
2337
|
-
extPayload.metadata?.model || extPayload.model || extRoute.model || typeof defaultModel === "string" || defaultModel?.primary;
|
|
2338
|
-
replyText = `${replyText}\n\n_[Generated by ${formatModelName(modelInfo)}]_`;
|
|
2339
|
-
}
|
|
2340
|
-
if (isGroup && groupChannel) {
|
|
2341
|
-
const parsed = parseChannelNest(groupChannel);
|
|
2342
|
-
if (!parsed) return;
|
|
2343
|
-
await sendGroupMessage({
|
|
2344
|
-
api,
|
|
2345
|
-
fromShip: botShipName,
|
|
2346
|
-
hostShip: parsed.hostShip,
|
|
2347
|
-
channelName: parsed.channelName,
|
|
2348
|
-
text: replyText,
|
|
2349
|
-
replyToId: parentId ?? void 0
|
|
2350
|
-
});
|
|
2351
|
-
if (parentId) {
|
|
2352
|
-
participatedThreads.add(String(parentId));
|
|
2353
|
-
runtime.log?.(`[tlon] Now tracking thread for future replies: ${parentId}`);
|
|
2354
|
-
}
|
|
2355
|
-
} else await sendDm({
|
|
2356
|
-
api,
|
|
2357
|
-
fromShip: botShipName,
|
|
2358
|
-
toShip: senderShip,
|
|
2359
|
-
text: replyText
|
|
2360
|
-
});
|
|
2361
|
-
},
|
|
2362
|
-
onError: (err, info) => {
|
|
2363
|
-
const dispatchDuration = Date.now() - dispatchStartTime;
|
|
2364
|
-
runtime.error?.(`[tlon] ${info.kind} reply failed after ${dispatchDuration}ms: ${String(err)}`);
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
});
|
|
2368
|
-
};
|
|
2369
|
-
const watchedChannels = new Set(groupChannels);
|
|
2370
|
-
const refreshWatchedChannels = async () => {
|
|
2371
|
-
const discoveredChannels = await fetchAllChannels(api, runtime);
|
|
2372
|
-
let newCount = 0;
|
|
2373
|
-
for (const channelNest of discoveredChannels) if (!watchedChannels.has(channelNest)) {
|
|
2374
|
-
watchedChannels.add(channelNest);
|
|
2375
|
-
newCount++;
|
|
2376
|
-
}
|
|
2377
|
-
return newCount;
|
|
2378
|
-
};
|
|
2379
|
-
const { resolveAllCites } = createTlonCitationResolver({
|
|
2380
|
-
api: { scry: (path) => api.scry(path) },
|
|
2381
|
-
runtime
|
|
2382
|
-
});
|
|
2383
|
-
const { queueApprovalRequest, handleApprovalResponse, handleAdminCommand } = createTlonApprovalRuntime({
|
|
2384
|
-
api: {
|
|
2385
|
-
poke: (payload) => api.poke(payload),
|
|
2386
|
-
scry: (path) => api.scry(path)
|
|
2387
|
-
},
|
|
2388
|
-
runtime,
|
|
2389
|
-
botShipName,
|
|
2390
|
-
getPendingApprovals: () => pendingApprovals,
|
|
2391
|
-
setPendingApprovals: (approvals) => {
|
|
2392
|
-
pendingApprovals = approvals;
|
|
2393
|
-
},
|
|
2394
|
-
getCurrentSettings: () => currentSettings,
|
|
2395
|
-
setCurrentSettings: (settings) => {
|
|
2396
|
-
currentSettings = settings;
|
|
2397
|
-
},
|
|
2398
|
-
getEffectiveDmAllowlist: () => effectiveDmAllowlist,
|
|
2399
|
-
setEffectiveDmAllowlist: (ships) => {
|
|
2400
|
-
effectiveDmAllowlist = ships;
|
|
2401
|
-
},
|
|
2402
|
-
getEffectiveOwnerShip: () => effectiveOwnerShip,
|
|
2403
|
-
processApprovedMessage: async (approval) => {
|
|
2404
|
-
if (!approval.originalMessage) return;
|
|
2405
|
-
if (approval.type === "dm") {
|
|
2406
|
-
await processMessage({
|
|
2407
|
-
messageId: approval.originalMessage.messageId,
|
|
2408
|
-
senderShip: approval.requestingShip,
|
|
2409
|
-
messageText: approval.originalMessage.messageText,
|
|
2410
|
-
messageContent: approval.originalMessage.messageContent,
|
|
2411
|
-
isGroup: false,
|
|
2412
|
-
timestamp: approval.originalMessage.timestamp
|
|
2413
|
-
});
|
|
2414
|
-
return;
|
|
2415
|
-
}
|
|
2416
|
-
if (approval.type === "channel" && approval.channelNest) {
|
|
2417
|
-
const parsedChannel = parseChannelNest(approval.channelNest);
|
|
2418
|
-
await processMessage({
|
|
2419
|
-
messageId: approval.originalMessage.messageId,
|
|
2420
|
-
senderShip: approval.requestingShip,
|
|
2421
|
-
messageText: approval.originalMessage.messageText,
|
|
2422
|
-
messageContent: approval.originalMessage.messageContent,
|
|
2423
|
-
isGroup: true,
|
|
2424
|
-
channelNest: approval.channelNest,
|
|
2425
|
-
hostShip: parsedChannel?.hostShip,
|
|
2426
|
-
channelName: parsedChannel?.channelName,
|
|
2427
|
-
timestamp: approval.originalMessage.timestamp,
|
|
2428
|
-
parentId: approval.originalMessage.parentId,
|
|
2429
|
-
isThreadReply: approval.originalMessage.isThreadReply
|
|
2430
|
-
});
|
|
2431
|
-
}
|
|
2432
|
-
},
|
|
2433
|
-
refreshWatchedChannels
|
|
2434
|
-
});
|
|
2435
|
-
const handleChannelsFirehose = async (event) => {
|
|
2436
|
-
try {
|
|
2437
|
-
const nest = event?.nest;
|
|
2438
|
-
if (!nest) return;
|
|
2439
|
-
if (!watchedChannels.has(nest)) return;
|
|
2440
|
-
const response = event?.response;
|
|
2441
|
-
if (!response) return;
|
|
2442
|
-
const essay = response?.post?.["r-post"]?.set?.essay;
|
|
2443
|
-
const memo = response?.post?.["r-post"]?.reply?.["r-reply"]?.set?.memo;
|
|
2444
|
-
if (!essay && !memo) return;
|
|
2445
|
-
const content = memo || essay;
|
|
2446
|
-
const isThreadReply = Boolean(memo);
|
|
2447
|
-
const messageId = isThreadReply ? response?.post?.["r-post"]?.reply?.id : response?.post?.id;
|
|
2448
|
-
if (!processedTracker.mark(messageId)) return;
|
|
2449
|
-
const senderShip = normalizeShip(content.author ?? "");
|
|
2450
|
-
if (!senderShip || senderShip === botShipName) return;
|
|
2451
|
-
const rawText = extractMessageText(content.content);
|
|
2452
|
-
if (!rawText.trim()) return;
|
|
2453
|
-
cacheMessage(nest, {
|
|
2454
|
-
author: senderShip,
|
|
2455
|
-
content: rawText,
|
|
2456
|
-
timestamp: content.sent || Date.now(),
|
|
2457
|
-
id: messageId
|
|
2458
|
-
});
|
|
2459
|
-
const seal = isThreadReply ? response?.post?.["r-post"]?.reply?.["r-reply"]?.set?.seal : response?.post?.["r-post"]?.set?.seal;
|
|
2460
|
-
const parentId = seal?.["parent-id"] || seal?.parent || null;
|
|
2461
|
-
const mentioned = isBotMentioned(rawText, botShipName, botNickname ?? void 0);
|
|
2462
|
-
const inParticipatedThread = isThreadReply && parentId && participatedThreads.has(String(parentId));
|
|
2463
|
-
if (!mentioned && !inParticipatedThread) return;
|
|
2464
|
-
if (inParticipatedThread && !mentioned) runtime.log?.(`[tlon] Responding to thread we participated in (no mention): ${parentId}`);
|
|
2465
|
-
if (isOwner(senderShip)) runtime.log?.(`[tlon] Owner ${senderShip} is always allowed in channels`);
|
|
2466
|
-
else {
|
|
2467
|
-
const { mode, allowedShips } = resolveChannelAuthorization(cfg, nest, currentSettings);
|
|
2468
|
-
if (mode === "restricted") {
|
|
2469
|
-
if (!allowedShips.map(normalizeShip).includes(senderShip)) {
|
|
2470
|
-
if (effectiveOwnerShip) await queueApprovalRequest(createPendingApproval({
|
|
2471
|
-
type: "channel",
|
|
2472
|
-
requestingShip: senderShip,
|
|
2473
|
-
channelNest: nest,
|
|
2474
|
-
messagePreview: rawText.substring(0, 100),
|
|
2475
|
-
originalMessage: {
|
|
2476
|
-
messageId: messageId ?? "",
|
|
2477
|
-
messageText: rawText,
|
|
2478
|
-
messageContent: content.content,
|
|
2479
|
-
timestamp: content.sent || Date.now(),
|
|
2480
|
-
parentId: parentId ?? void 0,
|
|
2481
|
-
isThreadReply
|
|
2482
|
-
}
|
|
2483
|
-
}));
|
|
2484
|
-
else runtime.log?.(`[tlon] Access denied: ${senderShip} in ${nest} (allowed: ${allowedShips.join(", ")})`);
|
|
2485
|
-
return;
|
|
2486
|
-
}
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
const messageText = await resolveAuthorizedMessageText({
|
|
2490
|
-
rawText,
|
|
2491
|
-
content: content.content,
|
|
2492
|
-
authorizedForCites: true,
|
|
2493
|
-
resolveAllCites
|
|
2494
|
-
});
|
|
2495
|
-
const parsed = parseChannelNest(nest);
|
|
2496
|
-
await processMessage({
|
|
2497
|
-
messageId: messageId ?? "",
|
|
2498
|
-
senderShip,
|
|
2499
|
-
messageText,
|
|
2500
|
-
messageContent: content.content,
|
|
2501
|
-
isGroup: true,
|
|
2502
|
-
channelNest: nest,
|
|
2503
|
-
hostShip: parsed?.hostShip,
|
|
2504
|
-
channelName: parsed?.channelName,
|
|
2505
|
-
timestamp: content.sent || Date.now(),
|
|
2506
|
-
parentId,
|
|
2507
|
-
isThreadReply
|
|
2508
|
-
});
|
|
2509
|
-
} catch (error) {
|
|
2510
|
-
runtime.error?.(`[tlon] Error handling channel firehose event: ${error?.message ?? String(error)}`);
|
|
2511
|
-
}
|
|
2512
|
-
};
|
|
2513
|
-
const processedDmInvites = /* @__PURE__ */ new Set();
|
|
2514
|
-
const handleChatFirehose = async (event) => {
|
|
2515
|
-
try {
|
|
2516
|
-
if (Array.isArray(event)) {
|
|
2517
|
-
for (const invite of event) {
|
|
2518
|
-
const ship = normalizeShip(invite.ship || "");
|
|
2519
|
-
if (!ship || processedDmInvites.has(ship)) continue;
|
|
2520
|
-
if (isOwner(ship)) {
|
|
2521
|
-
try {
|
|
2522
|
-
await api.poke({
|
|
2523
|
-
app: "chat",
|
|
2524
|
-
mark: "chat-dm-rsvp",
|
|
2525
|
-
json: {
|
|
2526
|
-
ship,
|
|
2527
|
-
ok: true
|
|
2528
|
-
}
|
|
2529
|
-
});
|
|
2530
|
-
processedDmInvites.add(ship);
|
|
2531
|
-
runtime.log?.(`[tlon] Auto-accepted DM invite from owner ${ship}`);
|
|
2532
|
-
} catch (err) {
|
|
2533
|
-
runtime.error?.(`[tlon] Failed to auto-accept DM from owner: ${String(err)}`);
|
|
2534
|
-
}
|
|
2535
|
-
continue;
|
|
2536
|
-
}
|
|
2537
|
-
if (effectiveAutoAcceptDmInvites && isDmAllowed(ship, effectiveDmAllowlist)) {
|
|
2538
|
-
try {
|
|
2539
|
-
await api.poke({
|
|
2540
|
-
app: "chat",
|
|
2541
|
-
mark: "chat-dm-rsvp",
|
|
2542
|
-
json: {
|
|
2543
|
-
ship,
|
|
2544
|
-
ok: true
|
|
2545
|
-
}
|
|
2546
|
-
});
|
|
2547
|
-
processedDmInvites.add(ship);
|
|
2548
|
-
runtime.log?.(`[tlon] Auto-accepted DM invite from ${ship}`);
|
|
2549
|
-
} catch (err) {
|
|
2550
|
-
runtime.error?.(`[tlon] Failed to auto-accept DM from ${ship}: ${String(err)}`);
|
|
2551
|
-
}
|
|
2552
|
-
continue;
|
|
2553
|
-
}
|
|
2554
|
-
if (effectiveOwnerShip && !isDmAllowed(ship, effectiveDmAllowlist)) {
|
|
2555
|
-
await queueApprovalRequest(createPendingApproval({
|
|
2556
|
-
type: "dm",
|
|
2557
|
-
requestingShip: ship,
|
|
2558
|
-
messagePreview: "(DM invite - no message yet)"
|
|
2559
|
-
}));
|
|
2560
|
-
processedDmInvites.add(ship);
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
return;
|
|
2564
|
-
}
|
|
2565
|
-
if (!("whom" in event) || !("response" in event)) return;
|
|
2566
|
-
const whom = event.whom;
|
|
2567
|
-
const messageId = event.id;
|
|
2568
|
-
const essay = event.response?.add?.essay;
|
|
2569
|
-
if (!essay) return;
|
|
2570
|
-
if (!processedTracker.mark(messageId)) return;
|
|
2571
|
-
const authorShip = normalizeShip(essay.author ?? "");
|
|
2572
|
-
const partnerShip = extractDmPartnerShip(whom);
|
|
2573
|
-
const senderShip = partnerShip || authorShip;
|
|
2574
|
-
if (authorShip === botShipName) return;
|
|
2575
|
-
if (!senderShip || senderShip === botShipName) return;
|
|
2576
|
-
if (authorShip && partnerShip && authorShip !== partnerShip) runtime.log?.(`[tlon] DM ship mismatch (author=${authorShip}, partner=${partnerShip}) - routing to partner`);
|
|
2577
|
-
const rawText = extractMessageText(essay.content);
|
|
2578
|
-
if (!rawText.trim()) return;
|
|
2579
|
-
const messageText = rawText;
|
|
2580
|
-
if (isOwner(senderShip) && isApprovalResponse(messageText)) {
|
|
2581
|
-
if (await handleApprovalResponse(messageText)) {
|
|
2582
|
-
runtime.log?.(`[tlon] Processed approval response from owner: ${messageText}`);
|
|
2583
|
-
return;
|
|
2584
|
-
}
|
|
2585
|
-
}
|
|
2586
|
-
if (isOwner(senderShip) && isAdminCommand(messageText)) {
|
|
2587
|
-
if (await handleAdminCommand(messageText)) {
|
|
2588
|
-
runtime.log?.(`[tlon] Processed admin command from owner: ${messageText}`);
|
|
2589
|
-
return;
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
if (isOwner(senderShip)) {
|
|
2593
|
-
const resolvedMessageText = await resolveAuthorizedMessageText({
|
|
2594
|
-
rawText,
|
|
2595
|
-
content: essay.content,
|
|
2596
|
-
authorizedForCites: true,
|
|
2597
|
-
resolveAllCites
|
|
2598
|
-
});
|
|
2599
|
-
runtime.log?.(`[tlon] Processing DM from owner ${senderShip}`);
|
|
2600
|
-
await processMessage({
|
|
2601
|
-
messageId: messageId ?? "",
|
|
2602
|
-
senderShip,
|
|
2603
|
-
messageText: resolvedMessageText,
|
|
2604
|
-
messageContent: essay.content,
|
|
2605
|
-
isGroup: false,
|
|
2606
|
-
timestamp: essay.sent || Date.now()
|
|
2607
|
-
});
|
|
2608
|
-
return;
|
|
2609
|
-
}
|
|
2610
|
-
if (!isDmAllowed(senderShip, effectiveDmAllowlist)) {
|
|
2611
|
-
if (effectiveOwnerShip) await queueApprovalRequest(createPendingApproval({
|
|
2612
|
-
type: "dm",
|
|
2613
|
-
requestingShip: senderShip,
|
|
2614
|
-
messagePreview: messageText.substring(0, 100),
|
|
2615
|
-
originalMessage: {
|
|
2616
|
-
messageId: messageId ?? "",
|
|
2617
|
-
messageText,
|
|
2618
|
-
messageContent: essay.content,
|
|
2619
|
-
timestamp: essay.sent || Date.now()
|
|
2620
|
-
}
|
|
2621
|
-
}));
|
|
2622
|
-
else runtime.log?.(`[tlon] Blocked DM from ${senderShip}: not in allowlist`);
|
|
2623
|
-
return;
|
|
2624
|
-
}
|
|
2625
|
-
await processMessage({
|
|
2626
|
-
messageText: await resolveAuthorizedMessageText({
|
|
2627
|
-
rawText,
|
|
2628
|
-
content: essay.content,
|
|
2629
|
-
authorizedForCites: true,
|
|
2630
|
-
resolveAllCites
|
|
2631
|
-
}),
|
|
2632
|
-
messageId: messageId ?? "",
|
|
2633
|
-
senderShip,
|
|
2634
|
-
messageContent: essay.content,
|
|
2635
|
-
isGroup: false,
|
|
2636
|
-
timestamp: essay.sent || Date.now()
|
|
2637
|
-
});
|
|
2638
|
-
} catch (error) {
|
|
2639
|
-
runtime.error?.(`[tlon] Error handling chat firehose event: ${error?.message ?? String(error)}`);
|
|
2640
|
-
}
|
|
2641
|
-
};
|
|
2642
|
-
try {
|
|
2643
|
-
runtime.log?.("[tlon] Subscribing to firehose updates...");
|
|
2644
|
-
await api.subscribe({
|
|
2645
|
-
app: "channels",
|
|
2646
|
-
path: "/v2",
|
|
2647
|
-
event: handleChannelsFirehose,
|
|
2648
|
-
err: (error) => {
|
|
2649
|
-
runtime.error?.(`[tlon] Channels firehose error: ${String(error)}`);
|
|
2650
|
-
},
|
|
2651
|
-
quit: () => {
|
|
2652
|
-
runtime.log?.("[tlon] Channels firehose subscription ended");
|
|
2653
|
-
}
|
|
2654
|
-
});
|
|
2655
|
-
runtime.log?.("[tlon] Subscribed to channels firehose (/v2)");
|
|
2656
|
-
await api.subscribe({
|
|
2657
|
-
app: "chat",
|
|
2658
|
-
path: "/v3",
|
|
2659
|
-
event: handleChatFirehose,
|
|
2660
|
-
err: (error) => {
|
|
2661
|
-
runtime.error?.(`[tlon] Chat firehose error: ${String(error)}`);
|
|
2662
|
-
},
|
|
2663
|
-
quit: () => {
|
|
2664
|
-
runtime.log?.("[tlon] Chat firehose subscription ended");
|
|
2665
|
-
}
|
|
2666
|
-
});
|
|
2667
|
-
runtime.log?.("[tlon] Subscribed to chat firehose (/v3)");
|
|
2668
|
-
await api.subscribe({
|
|
2669
|
-
app: "contacts",
|
|
2670
|
-
path: "/v1/news",
|
|
2671
|
-
event: (event) => {
|
|
2672
|
-
try {
|
|
2673
|
-
if (event?.self) {
|
|
2674
|
-
const selfUpdate = event.self;
|
|
2675
|
-
if (selfUpdate?.contact?.nickname?.value !== void 0) {
|
|
2676
|
-
const newNickname = selfUpdate.contact.nickname.value || null;
|
|
2677
|
-
if (newNickname !== botNickname) {
|
|
2678
|
-
botNickname = newNickname;
|
|
2679
|
-
runtime.log?.(`[tlon] Nickname updated: ${botNickname}`);
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
} catch (error) {
|
|
2684
|
-
runtime.error?.(`[tlon] Error handling contacts event: ${error?.message ?? String(error)}`);
|
|
2685
|
-
}
|
|
2686
|
-
},
|
|
2687
|
-
err: (error) => {
|
|
2688
|
-
runtime.error?.(`[tlon] Contacts subscription error: ${String(error)}`);
|
|
2689
|
-
},
|
|
2690
|
-
quit: () => {
|
|
2691
|
-
runtime.log?.("[tlon] Contacts subscription ended");
|
|
2692
|
-
}
|
|
2693
|
-
});
|
|
2694
|
-
runtime.log?.("[tlon] Subscribed to contacts updates (/v1/news)");
|
|
2695
|
-
settingsManager.onChange((newSettings) => {
|
|
2696
|
-
currentSettings = newSettings;
|
|
2697
|
-
if (newSettings.groupChannels?.length) {
|
|
2698
|
-
const newChannels = newSettings.groupChannels;
|
|
2699
|
-
for (const ch of newChannels) if (!watchedChannels.has(ch)) {
|
|
2700
|
-
watchedChannels.add(ch);
|
|
2701
|
-
runtime.log?.(`[tlon] Settings: now watching channel ${ch}`);
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
({effectiveDmAllowlist, effectiveShowModelSig, effectiveAutoAcceptDmInvites, effectiveAutoAcceptGroupInvites, effectiveGroupInviteAllowlist, effectiveAutoDiscoverChannels, effectiveOwnerShip, pendingApprovals} = applyTlonSettingsOverrides({
|
|
2705
|
-
account,
|
|
2706
|
-
currentSettings: newSettings,
|
|
2707
|
-
log: (message) => runtime.log?.(message)
|
|
2708
|
-
}));
|
|
2709
|
-
});
|
|
2710
|
-
try {
|
|
2711
|
-
await settingsManager.startSubscription();
|
|
2712
|
-
} catch (err) {
|
|
2713
|
-
runtime.log?.(`[tlon] Settings subscription not available: ${String(err)}`);
|
|
2714
|
-
}
|
|
2715
|
-
try {
|
|
2716
|
-
await api.subscribe({
|
|
2717
|
-
app: "groups",
|
|
2718
|
-
path: "/groups/ui",
|
|
2719
|
-
event: async (event) => {
|
|
2720
|
-
try {
|
|
2721
|
-
if (event && typeof event === "object") {
|
|
2722
|
-
if (event.channels && typeof event.channels === "object") {
|
|
2723
|
-
const channels = event.channels;
|
|
2724
|
-
for (const [channelNest, _channelData] of Object.entries(channels)) {
|
|
2725
|
-
if (!channelNest.startsWith("chat/")) continue;
|
|
2726
|
-
if (!watchedChannels.has(channelNest)) {
|
|
2727
|
-
watchedChannels.add(channelNest);
|
|
2728
|
-
runtime.log?.(`[tlon] Auto-detected new channel (invite accepted): ${channelNest}`);
|
|
2729
|
-
if (effectiveAutoAcceptGroupInvites) try {
|
|
2730
|
-
const currentChannels = currentSettings.groupChannels || [];
|
|
2731
|
-
if (!currentChannels.includes(channelNest)) {
|
|
2732
|
-
const updatedChannels = [...currentChannels, channelNest];
|
|
2733
|
-
await api.poke({
|
|
2734
|
-
app: "settings",
|
|
2735
|
-
mark: "settings-event",
|
|
2736
|
-
json: { "put-entry": {
|
|
2737
|
-
"bucket-key": "tlon",
|
|
2738
|
-
"entry-key": "groupChannels",
|
|
2739
|
-
value: updatedChannels,
|
|
2740
|
-
desk: "moltbot"
|
|
2741
|
-
} }
|
|
2742
|
-
});
|
|
2743
|
-
runtime.log?.(`[tlon] Persisted ${channelNest} to settings store`);
|
|
2744
|
-
}
|
|
2745
|
-
} catch (err) {
|
|
2746
|
-
runtime.error?.(`[tlon] Failed to persist channel to settings: ${String(err)}`);
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
}
|
|
2750
|
-
}
|
|
2751
|
-
if (event.join && typeof event.join === "object") {
|
|
2752
|
-
const join = event.join;
|
|
2753
|
-
if (join.channels) for (const channelNest of join.channels) {
|
|
2754
|
-
if (!channelNest.startsWith("chat/")) continue;
|
|
2755
|
-
if (!watchedChannels.has(channelNest)) {
|
|
2756
|
-
watchedChannels.add(channelNest);
|
|
2757
|
-
runtime.log?.(`[tlon] Auto-detected joined channel: ${channelNest}`);
|
|
2758
|
-
if (effectiveAutoAcceptGroupInvites) try {
|
|
2759
|
-
const currentChannels = currentSettings.groupChannels || [];
|
|
2760
|
-
if (!currentChannels.includes(channelNest)) {
|
|
2761
|
-
const updatedChannels = [...currentChannels, channelNest];
|
|
2762
|
-
await api.poke({
|
|
2763
|
-
app: "settings",
|
|
2764
|
-
mark: "settings-event",
|
|
2765
|
-
json: { "put-entry": {
|
|
2766
|
-
"bucket-key": "tlon",
|
|
2767
|
-
"entry-key": "groupChannels",
|
|
2768
|
-
value: updatedChannels,
|
|
2769
|
-
desk: "moltbot"
|
|
2770
|
-
} }
|
|
2771
|
-
});
|
|
2772
|
-
runtime.log?.(`[tlon] Persisted ${channelNest} to settings store`);
|
|
2773
|
-
}
|
|
2774
|
-
} catch (err) {
|
|
2775
|
-
runtime.error?.(`[tlon] Failed to persist channel to settings: ${String(err)}`);
|
|
2776
|
-
}
|
|
2777
|
-
}
|
|
2778
|
-
}
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
} catch (error) {
|
|
2782
|
-
runtime.error?.(`[tlon] Error handling groups-ui event: ${error?.message ?? String(error)}`);
|
|
2783
|
-
}
|
|
2784
|
-
},
|
|
2785
|
-
err: (error) => {
|
|
2786
|
-
runtime.error?.(`[tlon] Groups-ui subscription error: ${String(error)}`);
|
|
2787
|
-
},
|
|
2788
|
-
quit: () => {
|
|
2789
|
-
runtime.log?.("[tlon] Groups-ui subscription ended");
|
|
2790
|
-
}
|
|
2791
|
-
});
|
|
2792
|
-
runtime.log?.("[tlon] Subscribed to groups-ui for real-time channel detection");
|
|
2793
|
-
} catch (err) {
|
|
2794
|
-
runtime.log?.(`[tlon] Groups-ui subscription failed (will rely on polling): ${String(err)}`);
|
|
2795
|
-
}
|
|
2796
|
-
{
|
|
2797
|
-
const processedGroupInvites = /* @__PURE__ */ new Set();
|
|
2798
|
-
const processPendingInvites = async (foreigns) => {
|
|
2799
|
-
if (!foreigns || typeof foreigns !== "object") return;
|
|
2800
|
-
for (const [groupFlag, foreign] of Object.entries(foreigns)) {
|
|
2801
|
-
if (processedGroupInvites.has(groupFlag)) continue;
|
|
2802
|
-
if (!foreign.invites || foreign.invites.length === 0) continue;
|
|
2803
|
-
const validInvite = foreign.invites.find((inv) => inv.valid);
|
|
2804
|
-
if (!validInvite) continue;
|
|
2805
|
-
const inviterShip = validInvite.from;
|
|
2806
|
-
if (isOwner(inviterShip)) {
|
|
2807
|
-
try {
|
|
2808
|
-
await api.poke({
|
|
2809
|
-
app: "groups",
|
|
2810
|
-
mark: "group-join",
|
|
2811
|
-
json: {
|
|
2812
|
-
flag: groupFlag,
|
|
2813
|
-
"join-all": true
|
|
2814
|
-
}
|
|
2815
|
-
});
|
|
2816
|
-
processedGroupInvites.add(groupFlag);
|
|
2817
|
-
runtime.log?.(`[tlon] Auto-accepted group invite from owner: ${groupFlag}`);
|
|
2818
|
-
} catch (err) {
|
|
2819
|
-
runtime.error?.(`[tlon] Failed to accept group invite from owner: ${String(err)}`);
|
|
2820
|
-
}
|
|
2821
|
-
continue;
|
|
2822
|
-
}
|
|
2823
|
-
if (!effectiveAutoAcceptGroupInvites) {
|
|
2824
|
-
if (effectiveOwnerShip) {
|
|
2825
|
-
await queueApprovalRequest(createPendingApproval({
|
|
2826
|
-
type: "group",
|
|
2827
|
-
requestingShip: inviterShip,
|
|
2828
|
-
groupFlag
|
|
2829
|
-
}));
|
|
2830
|
-
processedGroupInvites.add(groupFlag);
|
|
2831
|
-
}
|
|
2832
|
-
continue;
|
|
2833
|
-
}
|
|
2834
|
-
if (!isGroupInviteAllowed(inviterShip, effectiveGroupInviteAllowlist)) {
|
|
2835
|
-
if (effectiveOwnerShip) {
|
|
2836
|
-
await queueApprovalRequest(createPendingApproval({
|
|
2837
|
-
type: "group",
|
|
2838
|
-
requestingShip: inviterShip,
|
|
2839
|
-
groupFlag
|
|
2840
|
-
}));
|
|
2841
|
-
processedGroupInvites.add(groupFlag);
|
|
2842
|
-
} else {
|
|
2843
|
-
runtime.log?.(`[tlon] Rejected group invite from ${inviterShip} (not in groupInviteAllowlist): ${groupFlag}`);
|
|
2844
|
-
processedGroupInvites.add(groupFlag);
|
|
2845
|
-
}
|
|
2846
|
-
continue;
|
|
2847
|
-
}
|
|
2848
|
-
try {
|
|
2849
|
-
await api.poke({
|
|
2850
|
-
app: "groups",
|
|
2851
|
-
mark: "group-join",
|
|
2852
|
-
json: {
|
|
2853
|
-
flag: groupFlag,
|
|
2854
|
-
"join-all": true
|
|
2855
|
-
}
|
|
2856
|
-
});
|
|
2857
|
-
processedGroupInvites.add(groupFlag);
|
|
2858
|
-
runtime.log?.(`[tlon] Auto-accepted group invite: ${groupFlag} (from ${validInvite.from})`);
|
|
2859
|
-
} catch (err) {
|
|
2860
|
-
runtime.error?.(`[tlon] Failed to auto-accept group ${groupFlag}: ${String(err)}`);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
};
|
|
2864
|
-
if (initForeigns) await processPendingInvites(initForeigns);
|
|
2865
|
-
try {
|
|
2866
|
-
await api.subscribe({
|
|
2867
|
-
app: "groups",
|
|
2868
|
-
path: "/v1/foreigns",
|
|
2869
|
-
event: (data) => {
|
|
2870
|
-
(async () => {
|
|
2871
|
-
try {
|
|
2872
|
-
await processPendingInvites(data);
|
|
2873
|
-
} catch (error) {
|
|
2874
|
-
runtime.error?.(`[tlon] Error handling foreigns event: ${error?.message ?? String(error)}`);
|
|
2875
|
-
}
|
|
2876
|
-
})();
|
|
2877
|
-
},
|
|
2878
|
-
err: (error) => {
|
|
2879
|
-
runtime.error?.(`[tlon] Foreigns subscription error: ${String(error)}`);
|
|
2880
|
-
},
|
|
2881
|
-
quit: () => {
|
|
2882
|
-
runtime.log?.("[tlon] Foreigns subscription ended");
|
|
2883
|
-
}
|
|
2884
|
-
});
|
|
2885
|
-
runtime.log?.("[tlon] Subscribed to foreigns (/v1/foreigns) for auto-accepting group invites");
|
|
2886
|
-
} catch (err) {
|
|
2887
|
-
runtime.log?.(`[tlon] Foreigns subscription failed: ${String(err)}`);
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
if (effectiveAutoDiscoverChannels) {
|
|
2891
|
-
const discoveredChannels = await fetchAllChannels(api, runtime);
|
|
2892
|
-
for (const channelNest of discoveredChannels) watchedChannels.add(channelNest);
|
|
2893
|
-
runtime.log?.(`[tlon] Watching ${watchedChannels.size} channel(s)`);
|
|
2894
|
-
}
|
|
2895
|
-
for (const channelNest of watchedChannels) runtime.log?.(`[tlon] Watching channel: ${channelNest}`);
|
|
2896
|
-
runtime.log?.("[tlon] All subscriptions registered, connecting to SSE stream...");
|
|
2897
|
-
await api.connect();
|
|
2898
|
-
runtime.log?.("[tlon] Connected! Firehose subscriptions active");
|
|
2899
|
-
const pollInterval = setInterval(async () => {
|
|
2900
|
-
if (!opts.abortSignal?.aborted) try {
|
|
2901
|
-
if (effectiveAutoDiscoverChannels) {
|
|
2902
|
-
const discoveredChannels = await fetchAllChannels(api, runtime);
|
|
2903
|
-
for (const channelNest of discoveredChannels) if (!watchedChannels.has(channelNest)) {
|
|
2904
|
-
watchedChannels.add(channelNest);
|
|
2905
|
-
runtime.log?.(`[tlon] Now watching new channel: ${channelNest}`);
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
} catch (error) {
|
|
2909
|
-
runtime.error?.(`[tlon] Channel refresh error: ${error?.message ?? String(error)}`);
|
|
2910
|
-
}
|
|
2911
|
-
}, 120 * 1e3);
|
|
2912
|
-
if (opts.abortSignal) {
|
|
2913
|
-
const signal = opts.abortSignal;
|
|
2914
|
-
await new Promise((resolve) => {
|
|
2915
|
-
signal.addEventListener("abort", () => {
|
|
2916
|
-
clearInterval(pollInterval);
|
|
2917
|
-
resolve(null);
|
|
2918
|
-
}, { once: true });
|
|
2919
|
-
});
|
|
2920
|
-
} else await new Promise(() => {});
|
|
2921
|
-
} finally {
|
|
2922
|
-
try {
|
|
2923
|
-
await api?.close();
|
|
2924
|
-
} catch (error) {
|
|
2925
|
-
runtime.error?.(`[tlon] Cleanup error: ${error?.message ?? String(error)}`);
|
|
2926
|
-
}
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
|
-
//#endregion
|
|
2930
|
-
//#region extensions/tlon/src/tlon-api.ts
|
|
2931
|
-
const MEMEX_BASE_URL = "https://memex.tlon.network";
|
|
2932
|
-
const mimeToExt = {
|
|
2933
|
-
"image/gif": ".gif",
|
|
2934
|
-
"image/heic": ".heic",
|
|
2935
|
-
"image/heif": ".heif",
|
|
2936
|
-
"image/jpeg": ".jpg",
|
|
2937
|
-
"image/jpg": ".jpg",
|
|
2938
|
-
"image/png": ".png",
|
|
2939
|
-
"image/webp": ".webp"
|
|
2940
|
-
};
|
|
2941
|
-
let currentClientConfig = null;
|
|
2942
|
-
function configureClient(params) {
|
|
2943
|
-
currentClientConfig = {
|
|
2944
|
-
...params,
|
|
2945
|
-
shipName: params.shipName.replace(/^~/, "")
|
|
2946
|
-
};
|
|
2947
|
-
}
|
|
2948
|
-
function requireClientConfig() {
|
|
2949
|
-
if (!currentClientConfig) throw new Error("Tlon client not configured");
|
|
2950
|
-
return currentClientConfig;
|
|
2951
|
-
}
|
|
2952
|
-
function getExtensionFromMimeType(mimeType) {
|
|
2953
|
-
if (!mimeType) return ".jpg";
|
|
2954
|
-
return mimeToExt[mimeType.toLowerCase()] || ".jpg";
|
|
2955
|
-
}
|
|
2956
|
-
function hasCustomS3Creds(credentials) {
|
|
2957
|
-
return Boolean(credentials?.accessKeyId && credentials?.endpoint && credentials?.secretAccessKey);
|
|
2958
|
-
}
|
|
2959
|
-
function isStorageCredentials(value) {
|
|
2960
|
-
if (!value || typeof value !== "object") return false;
|
|
2961
|
-
const record = value;
|
|
2962
|
-
return typeof record.endpoint === "string" && typeof record.accessKeyId === "string" && typeof record.secretAccessKey === "string";
|
|
2963
|
-
}
|
|
2964
|
-
function isHostedShipUrl(shipUrl) {
|
|
2965
|
-
try {
|
|
2966
|
-
const { hostname } = new URL(shipUrl);
|
|
2967
|
-
return hostname.endsWith("tlon.network") || hostname.endsWith(".test.tlon.systems");
|
|
2968
|
-
} catch {
|
|
2969
|
-
return shipUrl.endsWith("tlon.network") || shipUrl.endsWith(".test.tlon.systems");
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
function prefixEndpoint(endpoint) {
|
|
2973
|
-
return endpoint.match(/https?:\/\//) ? endpoint : `https://${endpoint}`;
|
|
2974
|
-
}
|
|
2975
|
-
function sanitizeFileName(fileName) {
|
|
2976
|
-
return fileName.split(/[/\\]/).pop() || fileName;
|
|
2977
|
-
}
|
|
2978
|
-
async function getAuthCookie(config) {
|
|
2979
|
-
return await authenticate(config.shipUrl, await config.getCode(), { ssrfPolicy: ssrfPolicyFromAllowPrivateNetwork(config.allowPrivateNetwork) });
|
|
2980
|
-
}
|
|
2981
|
-
async function scryJson(config, cookie, path) {
|
|
2982
|
-
return await scryUrbitPath({
|
|
2983
|
-
baseUrl: config.shipUrl,
|
|
2984
|
-
cookie,
|
|
2985
|
-
ssrfPolicy: ssrfPolicyFromAllowPrivateNetwork(config.allowPrivateNetwork)
|
|
2986
|
-
}, {
|
|
2987
|
-
path,
|
|
2988
|
-
auditContext: "tlon-storage-scry"
|
|
2989
|
-
});
|
|
2990
|
-
}
|
|
2991
|
-
async function getStorageConfiguration(config, cookie) {
|
|
2992
|
-
const result = await scryJson(config, cookie, "/storage/configuration.json");
|
|
2993
|
-
if ("storage-update" in result && result["storage-update"]?.configuration) return result["storage-update"].configuration;
|
|
2994
|
-
if ("currentBucket" in result) return result;
|
|
2995
|
-
throw new Error("Invalid storage configuration response");
|
|
2996
|
-
}
|
|
2997
|
-
async function getStorageCredentials(config, cookie) {
|
|
2998
|
-
const result = await scryJson(config, cookie, "/storage/credentials.json");
|
|
2999
|
-
if ("storage-update" in result) return result["storage-update"]?.credentials ?? null;
|
|
3000
|
-
if (isStorageCredentials(result)) return result;
|
|
3001
|
-
return null;
|
|
3002
|
-
}
|
|
3003
|
-
async function getMemexUploadUrl(params) {
|
|
3004
|
-
const token = await scryJson(params.config, params.cookie, "/genuine/secret.json");
|
|
3005
|
-
const resolvedToken = typeof token === "string" ? token : token.secret;
|
|
3006
|
-
if (!resolvedToken) throw new Error("Missing genuine secret");
|
|
3007
|
-
const endpoint = `${MEMEX_BASE_URL}/v1/${params.config.shipName}/upload`;
|
|
3008
|
-
const response = await fetch(endpoint, {
|
|
3009
|
-
method: "PUT",
|
|
3010
|
-
headers: { "Content-Type": "application/json" },
|
|
3011
|
-
body: JSON.stringify({
|
|
3012
|
-
token: resolvedToken,
|
|
3013
|
-
contentLength: params.contentLength,
|
|
3014
|
-
contentType: params.contentType,
|
|
3015
|
-
fileName: params.fileName
|
|
3016
|
-
})
|
|
3017
|
-
});
|
|
3018
|
-
if (!response.ok) throw new Error(`Memex upload request failed: ${response.status}`);
|
|
3019
|
-
const data = await response.json();
|
|
3020
|
-
if (!data?.url || !data.filePath) throw new Error("Invalid response from Memex");
|
|
3021
|
-
return {
|
|
3022
|
-
hostedUrl: data.filePath,
|
|
3023
|
-
uploadUrl: data.url
|
|
3024
|
-
};
|
|
3025
|
-
}
|
|
3026
|
-
async function uploadFile(params) {
|
|
3027
|
-
const config = requireClientConfig();
|
|
3028
|
-
const cookie = await getAuthCookie(config);
|
|
3029
|
-
const [storageConfig, credentials] = await Promise.all([getStorageConfiguration(config, cookie), getStorageCredentials(config, cookie)]);
|
|
3030
|
-
const contentType = params.contentType || params.blob.type || "application/octet-stream";
|
|
3031
|
-
const extension = getExtensionFromMimeType(contentType);
|
|
3032
|
-
const fileName = sanitizeFileName(params.fileName || `upload${extension}`);
|
|
3033
|
-
const fileKey = `${config.shipName}/${Date.now()}-${crypto.randomUUID()}-${fileName}`;
|
|
3034
|
-
if (isHostedShipUrl(config.shipUrl) && (storageConfig.service === "presigned-url" || !hasCustomS3Creds(credentials))) {
|
|
3035
|
-
const { hostedUrl, uploadUrl } = await getMemexUploadUrl({
|
|
3036
|
-
config,
|
|
3037
|
-
cookie,
|
|
3038
|
-
contentLength: params.blob.size,
|
|
3039
|
-
contentType,
|
|
3040
|
-
fileName: fileKey
|
|
3041
|
-
});
|
|
3042
|
-
const response = await fetch(uploadUrl, {
|
|
3043
|
-
method: "PUT",
|
|
3044
|
-
body: params.blob,
|
|
3045
|
-
headers: {
|
|
3046
|
-
"Cache-Control": "public, max-age=3600",
|
|
3047
|
-
"Content-Type": contentType
|
|
3048
|
-
}
|
|
3049
|
-
});
|
|
3050
|
-
if (!response.ok) throw new Error(`Upload failed: ${response.status}`);
|
|
3051
|
-
return { url: hostedUrl };
|
|
3052
|
-
}
|
|
3053
|
-
if (!hasCustomS3Creds(credentials)) throw new Error("No storage credentials configured");
|
|
3054
|
-
const endpoint = new URL(prefixEndpoint(credentials.endpoint));
|
|
3055
|
-
const client = new S3Client({
|
|
3056
|
-
endpoint: {
|
|
3057
|
-
protocol: endpoint.protocol.slice(0, -1),
|
|
3058
|
-
hostname: endpoint.host,
|
|
3059
|
-
path: endpoint.pathname || "/"
|
|
3060
|
-
},
|
|
3061
|
-
region: storageConfig.region || "us-east-1",
|
|
3062
|
-
credentials: {
|
|
3063
|
-
accessKeyId: credentials.accessKeyId,
|
|
3064
|
-
secretAccessKey: credentials.secretAccessKey
|
|
3065
|
-
},
|
|
3066
|
-
forcePathStyle: true
|
|
3067
|
-
});
|
|
3068
|
-
const headers = {
|
|
3069
|
-
"Cache-Control": "public, max-age=3600",
|
|
3070
|
-
"Content-Type": contentType,
|
|
3071
|
-
"x-amz-acl": "public-read"
|
|
3072
|
-
};
|
|
3073
|
-
const signedUrl = await getSignedUrl(client, new PutObjectCommand({
|
|
3074
|
-
Bucket: storageConfig.currentBucket,
|
|
3075
|
-
Key: fileKey,
|
|
3076
|
-
ContentType: headers["Content-Type"],
|
|
3077
|
-
CacheControl: headers["Cache-Control"],
|
|
3078
|
-
ACL: "public-read"
|
|
3079
|
-
}), {
|
|
3080
|
-
expiresIn: 3600,
|
|
3081
|
-
signableHeaders: new Set(Object.keys(headers))
|
|
3082
|
-
});
|
|
3083
|
-
const response = await fetch(signedUrl, {
|
|
3084
|
-
method: "PUT",
|
|
3085
|
-
body: params.blob,
|
|
3086
|
-
headers: signedUrl.includes("digitaloceanspaces.com") ? headers : void 0
|
|
3087
|
-
});
|
|
3088
|
-
if (!response.ok) throw new Error(`Upload failed: ${response.status}`);
|
|
3089
|
-
return { url: storageConfig.publicUrlBase ? new URL(fileKey, storageConfig.publicUrlBase).toString() : signedUrl.split("?")[0] };
|
|
3090
|
-
}
|
|
3091
|
-
//#endregion
|
|
3092
|
-
//#region extensions/tlon/src/urbit/upload.ts
|
|
3093
|
-
/**
|
|
3094
|
-
* Upload an image from a URL to Tlon storage.
|
|
3095
|
-
*/
|
|
3096
|
-
/**
|
|
3097
|
-
* Fetch an image from a URL and upload it to Tlon storage.
|
|
3098
|
-
* Returns the uploaded URL, or falls back to the original URL on error.
|
|
3099
|
-
*
|
|
3100
|
-
* Note: configureClient must be called before using this function.
|
|
3101
|
-
*/
|
|
3102
|
-
async function uploadImageFromUrl(imageUrl) {
|
|
3103
|
-
try {
|
|
3104
|
-
const url = new URL(imageUrl);
|
|
3105
|
-
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
3106
|
-
console.warn(`[tlon] Rejected non-http(s) URL: ${imageUrl}`);
|
|
3107
|
-
return imageUrl;
|
|
3108
|
-
}
|
|
3109
|
-
const { response, release } = await fetchWithSsrFGuard({
|
|
3110
|
-
url: imageUrl,
|
|
3111
|
-
init: { method: "GET" },
|
|
3112
|
-
policy: /* @__PURE__ */ getDefaultSsrFPolicy(),
|
|
3113
|
-
auditContext: "tlon-upload-image"
|
|
3114
|
-
});
|
|
3115
|
-
try {
|
|
3116
|
-
if (!response.ok) {
|
|
3117
|
-
console.warn(`[tlon] Failed to fetch image from ${imageUrl}: ${response.status}`);
|
|
3118
|
-
return imageUrl;
|
|
3119
|
-
}
|
|
3120
|
-
const contentType = response.headers.get("content-type") || "image/png";
|
|
3121
|
-
return (await uploadFile({
|
|
3122
|
-
blob: await response.blob(),
|
|
3123
|
-
fileName: new URL(imageUrl).pathname.split("/").pop() || `upload-${Date.now()}.png`,
|
|
3124
|
-
contentType
|
|
3125
|
-
})).url;
|
|
3126
|
-
} finally {
|
|
3127
|
-
await release();
|
|
3128
|
-
}
|
|
3129
|
-
} catch (err) {
|
|
3130
|
-
console.warn(`[tlon] Failed to upload image, using original URL: ${err}`);
|
|
3131
|
-
return imageUrl;
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
//#endregion
|
|
3135
|
-
//#region extensions/tlon/src/channel.runtime.ts
|
|
3136
|
-
async function createHttpPokeApi(params) {
|
|
3137
|
-
const ssrfPolicy = ssrfPolicyFromAllowPrivateNetwork(params.allowPrivateNetwork);
|
|
3138
|
-
const cookie = await authenticate(params.url, params.code, { ssrfPolicy });
|
|
3139
|
-
const channelPath = `/~/channel/${`${Math.floor(Date.now() / 1e3)}-${crypto.randomUUID()}`}`;
|
|
3140
|
-
const shipName = params.ship.replace(/^~/, "");
|
|
3141
|
-
return {
|
|
3142
|
-
poke: async (pokeParams) => {
|
|
3143
|
-
const pokeId = Date.now();
|
|
3144
|
-
const pokeData = {
|
|
3145
|
-
id: pokeId,
|
|
3146
|
-
action: "poke",
|
|
3147
|
-
ship: shipName,
|
|
3148
|
-
app: pokeParams.app,
|
|
3149
|
-
mark: pokeParams.mark,
|
|
3150
|
-
json: pokeParams.json
|
|
3151
|
-
};
|
|
3152
|
-
const { response, release } = await urbitFetch({
|
|
3153
|
-
baseUrl: params.url,
|
|
3154
|
-
path: channelPath,
|
|
3155
|
-
init: {
|
|
3156
|
-
method: "PUT",
|
|
3157
|
-
headers: {
|
|
3158
|
-
"Content-Type": "application/json",
|
|
3159
|
-
Cookie: cookie.split(";")[0]
|
|
3160
|
-
},
|
|
3161
|
-
body: JSON.stringify([pokeData])
|
|
3162
|
-
},
|
|
3163
|
-
ssrfPolicy,
|
|
3164
|
-
auditContext: "tlon-poke"
|
|
3165
|
-
});
|
|
3166
|
-
try {
|
|
3167
|
-
if (!response.ok && response.status !== 204) {
|
|
3168
|
-
const errorText = await response.text();
|
|
3169
|
-
throw new Error(`Poke failed: ${response.status} - ${errorText}`);
|
|
3170
|
-
}
|
|
3171
|
-
return pokeId;
|
|
3172
|
-
} finally {
|
|
3173
|
-
await release();
|
|
3174
|
-
}
|
|
3175
|
-
},
|
|
3176
|
-
delete: async () => {}
|
|
3177
|
-
};
|
|
3178
|
-
}
|
|
3179
|
-
function resolveOutboundContext(params) {
|
|
3180
|
-
const account = resolveTlonAccount(params.cfg, params.accountId ?? void 0);
|
|
3181
|
-
if (!account.configured || !account.ship || !account.url || !account.code) throw new Error("Tlon account not configured");
|
|
3182
|
-
const parsed = parseTlonTarget(params.to);
|
|
3183
|
-
if (!parsed) throw new Error(`Invalid Tlon target. Use ${formatTargetHint()}`);
|
|
3184
|
-
return {
|
|
3185
|
-
account,
|
|
3186
|
-
parsed
|
|
3187
|
-
};
|
|
3188
|
-
}
|
|
3189
|
-
function resolveReplyId(replyToId, threadId) {
|
|
3190
|
-
return replyToId ?? threadId ? String(replyToId ?? threadId) : void 0;
|
|
3191
|
-
}
|
|
3192
|
-
async function withHttpPokeAccountApi(account, run) {
|
|
3193
|
-
const api = await createHttpPokeApi({
|
|
3194
|
-
url: account.url,
|
|
3195
|
-
ship: account.ship,
|
|
3196
|
-
code: account.code,
|
|
3197
|
-
allowPrivateNetwork: account.allowPrivateNetwork ?? void 0
|
|
3198
|
-
});
|
|
3199
|
-
try {
|
|
3200
|
-
return await run(api);
|
|
3201
|
-
} finally {
|
|
3202
|
-
try {
|
|
3203
|
-
await api.delete();
|
|
3204
|
-
} catch {}
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
const tlonRuntimeOutbound = {
|
|
3208
|
-
deliveryMode: "direct",
|
|
3209
|
-
textChunkLimit: 1e4,
|
|
3210
|
-
resolveTarget: ({ to }) => resolveTlonOutboundTarget(to),
|
|
3211
|
-
sendText: async ({ cfg, to, text, accountId, replyToId, threadId }) => {
|
|
3212
|
-
const { account, parsed } = resolveOutboundContext({
|
|
3213
|
-
cfg,
|
|
3214
|
-
accountId,
|
|
3215
|
-
to
|
|
3216
|
-
});
|
|
3217
|
-
return withHttpPokeAccountApi(account, async (api) => {
|
|
3218
|
-
const fromShip = normalizeShip(account.ship);
|
|
3219
|
-
if (parsed.kind === "dm") return await sendDm({
|
|
3220
|
-
api,
|
|
3221
|
-
fromShip,
|
|
3222
|
-
toShip: parsed.ship,
|
|
3223
|
-
text
|
|
3224
|
-
});
|
|
3225
|
-
return await sendGroupMessage({
|
|
3226
|
-
api,
|
|
3227
|
-
fromShip,
|
|
3228
|
-
hostShip: parsed.hostShip,
|
|
3229
|
-
channelName: parsed.channelName,
|
|
3230
|
-
text,
|
|
3231
|
-
replyToId: resolveReplyId(replyToId, threadId)
|
|
3232
|
-
});
|
|
3233
|
-
});
|
|
3234
|
-
},
|
|
3235
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, accountId, replyToId, threadId }) => {
|
|
3236
|
-
const { account, parsed } = resolveOutboundContext({
|
|
3237
|
-
cfg,
|
|
3238
|
-
accountId,
|
|
3239
|
-
to
|
|
3240
|
-
});
|
|
3241
|
-
configureClient({
|
|
3242
|
-
shipUrl: account.url,
|
|
3243
|
-
shipName: account.ship.replace(/^~/, ""),
|
|
3244
|
-
verbose: false,
|
|
3245
|
-
getCode: async () => account.code,
|
|
3246
|
-
allowPrivateNetwork: account.allowPrivateNetwork ?? void 0
|
|
3247
|
-
});
|
|
3248
|
-
const uploadedUrl = mediaUrl ? await uploadImageFromUrl(mediaUrl) : void 0;
|
|
3249
|
-
return withHttpPokeAccountApi(account, async (api) => {
|
|
3250
|
-
const fromShip = normalizeShip(account.ship);
|
|
3251
|
-
const story = buildMediaStory(text, uploadedUrl);
|
|
3252
|
-
if (parsed.kind === "dm") return await sendDmWithStory({
|
|
3253
|
-
api,
|
|
3254
|
-
fromShip,
|
|
3255
|
-
toShip: parsed.ship,
|
|
3256
|
-
story
|
|
3257
|
-
});
|
|
3258
|
-
return await sendGroupMessageWithStory({
|
|
3259
|
-
api,
|
|
3260
|
-
fromShip,
|
|
3261
|
-
hostShip: parsed.hostShip,
|
|
3262
|
-
channelName: parsed.channelName,
|
|
3263
|
-
story,
|
|
3264
|
-
replyToId: resolveReplyId(replyToId, threadId)
|
|
3265
|
-
});
|
|
3266
|
-
});
|
|
3267
|
-
}
|
|
3268
|
-
};
|
|
3269
|
-
async function probeTlonAccount(account) {
|
|
3270
|
-
try {
|
|
3271
|
-
const ssrfPolicy = ssrfPolicyFromAllowPrivateNetwork(account.allowPrivateNetwork);
|
|
3272
|
-
const cookie = await authenticate(account.url, account.code, { ssrfPolicy });
|
|
3273
|
-
const { response, release } = await urbitFetch({
|
|
3274
|
-
baseUrl: account.url,
|
|
3275
|
-
path: "/~/name",
|
|
3276
|
-
init: {
|
|
3277
|
-
method: "GET",
|
|
3278
|
-
headers: { Cookie: cookie }
|
|
3279
|
-
},
|
|
3280
|
-
ssrfPolicy,
|
|
3281
|
-
timeoutMs: 3e4,
|
|
3282
|
-
auditContext: "tlon-probe-account"
|
|
3283
|
-
});
|
|
3284
|
-
try {
|
|
3285
|
-
if (!response.ok) return {
|
|
3286
|
-
ok: false,
|
|
3287
|
-
error: `Name request failed: ${response.status}`
|
|
3288
|
-
};
|
|
3289
|
-
return { ok: true };
|
|
3290
|
-
} finally {
|
|
3291
|
-
await release();
|
|
3292
|
-
}
|
|
3293
|
-
} catch (error) {
|
|
3294
|
-
return {
|
|
3295
|
-
ok: false,
|
|
3296
|
-
error: error?.message ?? String(error)
|
|
3297
|
-
};
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
async function startTlonGatewayAccount(ctx) {
|
|
3301
|
-
const account = ctx.account;
|
|
3302
|
-
ctx.setStatus({
|
|
3303
|
-
accountId: account.accountId,
|
|
3304
|
-
ship: account.ship,
|
|
3305
|
-
url: account.url
|
|
3306
|
-
});
|
|
3307
|
-
ctx.log?.info(`[${account.accountId}] starting Tlon provider for ${account.ship ?? "tlon"}`);
|
|
3308
|
-
return monitorTlonProvider({
|
|
3309
|
-
runtime: ctx.runtime,
|
|
3310
|
-
abortSignal: ctx.abortSignal,
|
|
3311
|
-
accountId: account.accountId
|
|
3312
|
-
});
|
|
3313
|
-
}
|
|
3314
|
-
//#endregion
|
|
3315
|
-
export { probeTlonAccount, startTlonGatewayAccount, tlonRuntimeOutbound, tlonSetupWizard };
|