@botharness/im-provider 4.32.0-botharness.3
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/LICENSE +21 -0
- package/PROVENANCE.json +25 -0
- package/README.en.md +445 -0
- package/README.md +448 -0
- package/THIRD_PARTY_NOTICES.md +93 -0
- package/assets/dingtalk-menu-template.json +6 -0
- package/assets/logo-dsh-im-chinese-readme-3x2.png +0 -0
- package/assets/logo-dsh-im-connecting-readme-3x2.png +0 -0
- package/assets/logo-dsh-im-connecting-square-v4.png +0 -0
- package/assets/logo-icon.png +0 -0
- package/assets/logo-plugin-message-link-gradient.webp +0 -0
- package/assets/logo-plugin-phone.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo_cn.png +0 -0
- package/assets/screenshot-menu-card.png +0 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +20330 -0
- package/lib/index.js +602 -0
- package/locale/en.json +5 -0
- package/locale/zh.json +5 -0
- package/package.json +181 -0
- package/plugin-src/client/access-policy-settings.js +362 -0
- package/plugin-src/client/agent-preset.js +119 -0
- package/plugin-src/client/bot-alias.js +169 -0
- package/plugin-src/client/build.mjs +38 -0
- package/plugin-src/client/channel-card-meta.js +132 -0
- package/plugin-src/client/channel-logos.js +190 -0
- package/plugin-src/client/channels/dingtalk/api.js +267 -0
- package/plugin-src/client/channels/dingtalk/index.js +954 -0
- package/plugin-src/client/channels/dingtalk/styles.js +136 -0
- package/plugin-src/client/channels/discord/api.js +11 -0
- package/plugin-src/client/channels/discord/index.js +25 -0
- package/plugin-src/client/channels/discord/styles.js +19 -0
- package/plugin-src/client/channels/email/api.js +52 -0
- package/plugin-src/client/channels/email/index.js +728 -0
- package/plugin-src/client/channels/email/styles.js +51 -0
- package/plugin-src/client/channels/feishu/api.js +405 -0
- package/plugin-src/client/channels/feishu/group-settings.js +581 -0
- package/plugin-src/client/channels/feishu/index.js +1583 -0
- package/plugin-src/client/channels/feishu/slash-panel-settings.js +322 -0
- package/plugin-src/client/channels/feishu/styles.js +573 -0
- package/plugin-src/client/channels/feishu/voice-editor.js +115 -0
- package/plugin-src/client/channels/feishu/voice-settings.js +71 -0
- package/plugin-src/client/channels/imessage/api.js +12 -0
- package/plugin-src/client/channels/imessage/index.js +46 -0
- package/plugin-src/client/channels/imessage/styles.js +19 -0
- package/plugin-src/client/channels/matrix/api.js +11 -0
- package/plugin-src/client/channels/matrix/index.js +151 -0
- package/plugin-src/client/channels/matrix/styles.js +36 -0
- package/plugin-src/client/channels/office/api.js +46 -0
- package/plugin-src/client/channels/office/index.js +153 -0
- package/plugin-src/client/channels/office/styles.js +50 -0
- package/plugin-src/client/channels/qq/api.js +171 -0
- package/plugin-src/client/channels/qq/index.js +593 -0
- package/plugin-src/client/channels/qq/styles.js +19 -0
- package/plugin-src/client/channels/shared/collapsible-account.js +103 -0
- package/plugin-src/client/channels/shared/token-api.js +124 -0
- package/plugin-src/client/channels/shared/token-channel.js +495 -0
- package/plugin-src/client/channels/slack/api.js +11 -0
- package/plugin-src/client/channels/slack/index.js +131 -0
- package/plugin-src/client/channels/slack/styles.js +34 -0
- package/plugin-src/client/channels/telegram/api.js +11 -0
- package/plugin-src/client/channels/telegram/index.js +28 -0
- package/plugin-src/client/channels/telegram/styles.js +31 -0
- package/plugin-src/client/channels/telegram/thinking-traces.js +25 -0
- package/plugin-src/client/channels/wecom/api.js +160 -0
- package/plugin-src/client/channels/wecom/index.js +625 -0
- package/plugin-src/client/channels/wecom/styles.js +19 -0
- package/plugin-src/client/channels/wecom-app/api.js +132 -0
- package/plugin-src/client/channels/wecom-app/index.js +634 -0
- package/plugin-src/client/channels/wecom-app/styles.js +25 -0
- package/plugin-src/client/channels/weixin/api.js +211 -0
- package/plugin-src/client/channels/weixin/connection-error.js +1 -0
- package/plugin-src/client/channels/weixin/index.js +801 -0
- package/plugin-src/client/channels/weixin/styles.js +115 -0
- package/plugin-src/client/channels/whatsapp/api.js +152 -0
- package/plugin-src/client/channels/whatsapp/index.js +609 -0
- package/plugin-src/client/channels/whatsapp/styles.js +19 -0
- package/plugin-src/client/connection-error.js +87 -0
- package/plugin-src/client/context-enhancement.js +415 -0
- package/plugin-src/client/credential-binding.js +118 -0
- package/plugin-src/client/delivery-settings.js +905 -0
- package/plugin-src/client/global-settings.js +433 -0
- package/plugin-src/client/i18n.js +1314 -0
- package/plugin-src/client/index.js +624 -0
- package/plugin-src/client/interface-language.js +89 -0
- package/plugin-src/client/last-message-error.js +18 -0
- package/plugin-src/client/lifecycle.js +86 -0
- package/plugin-src/client/loopback-recovery.js +75 -0
- package/plugin-src/client/model-setting.js +172 -0
- package/plugin-src/client/panel-error-boundary.js +21 -0
- package/plugin-src/client/plugin-page.js +51 -0
- package/plugin-src/client/session-channel-logos.js +243 -0
- package/plugin-src/client/styles.js +770 -0
- package/plugin-src/client/update-panel.js +14 -0
- package/plugin-src/client/workspace-directory-picker.js +280 -0
- package/plugin-src/client/workspace-editor.js +69 -0
- package/plugin-src/client/workspace-snapshot-fence.js +28 -0
- package/plugin-src/host/build.mjs +52 -0
- package/plugin-src/host/channels/dingtalk/connection-supervisor.mjs +130 -0
- package/plugin-src/host/channels/dingtalk/index.mjs +35 -0
- package/plugin-src/host/channels/dingtalk/production.mjs +193 -0
- package/plugin-src/host/channels/dingtalk/rpc.mjs +359 -0
- package/plugin-src/host/channels/discord/index.mjs +33 -0
- package/plugin-src/host/channels/discord/production.mjs +17 -0
- package/plugin-src/host/channels/discord/rpc.mjs +21 -0
- package/plugin-src/host/channels/email/availability.mjs +60 -0
- package/plugin-src/host/channels/email/index.mjs +36 -0
- package/plugin-src/host/channels/email/production.mjs +58 -0
- package/plugin-src/host/channels/email/rpc.mjs +163 -0
- package/plugin-src/host/channels/feishu/connection-supervisor.mjs +167 -0
- package/plugin-src/host/channels/feishu/controller.mjs +172 -0
- package/plugin-src/host/channels/feishu/credential-store.mjs +84 -0
- package/plugin-src/host/channels/feishu/index.mjs +69 -0
- package/plugin-src/host/channels/feishu/production.mjs +318 -0
- package/plugin-src/host/channels/feishu/rpc.mjs +863 -0
- package/plugin-src/host/channels/imessage/index.mjs +21 -0
- package/plugin-src/host/channels/imessage/production.mjs +13 -0
- package/plugin-src/host/channels/imessage/rpc.mjs +78 -0
- package/plugin-src/host/channels/matrix/index.mjs +31 -0
- package/plugin-src/host/channels/matrix/production.mjs +241 -0
- package/plugin-src/host/channels/matrix/rpc.mjs +228 -0
- package/plugin-src/host/channels/office/index.mjs +14 -0
- package/plugin-src/host/channels/office/production.mjs +45 -0
- package/plugin-src/host/channels/office/rpc.mjs +51 -0
- package/plugin-src/host/channels/qq/connection-supervisor.mjs +124 -0
- package/plugin-src/host/channels/qq/index.mjs +28 -0
- package/plugin-src/host/channels/qq/production.mjs +181 -0
- package/plugin-src/host/channels/qq/rpc.mjs +250 -0
- package/plugin-src/host/channels/shared/access-policy-production.mjs +137 -0
- package/plugin-src/host/channels/shared/access-policy-rpc.mjs +17 -0
- package/plugin-src/host/channels/shared/agent-preset-rpc.mjs +25 -0
- package/plugin-src/host/channels/shared/bot-alias-rpc.mjs +15 -0
- package/plugin-src/host/channels/shared/connection-supervisor.mjs +133 -0
- package/plugin-src/host/channels/shared/context-enhancement-rpc.mjs +17 -0
- package/plugin-src/host/channels/shared/model-setting-rpc.mjs +18 -0
- package/plugin-src/host/channels/shared/production.mjs +237 -0
- package/plugin-src/host/channels/shared/rpc.mjs +226 -0
- package/plugin-src/host/channels/shared/startup-error.mjs +55 -0
- package/plugin-src/host/channels/shared/startup.mjs +76 -0
- package/plugin-src/host/channels/shared/thinking-traces-rpc.mjs +11 -0
- package/plugin-src/host/channels/shared/workspace-rpc.mjs +31 -0
- package/plugin-src/host/channels/slack/index.mjs +31 -0
- package/plugin-src/host/channels/slack/production.mjs +176 -0
- package/plugin-src/host/channels/slack/rpc.mjs +221 -0
- package/plugin-src/host/channels/telegram/index.mjs +33 -0
- package/plugin-src/host/channels/telegram/production.mjs +19 -0
- package/plugin-src/host/channels/telegram/rpc.mjs +22 -0
- package/plugin-src/host/channels/wecom/connection-supervisor.mjs +124 -0
- package/plugin-src/host/channels/wecom/index.mjs +34 -0
- package/plugin-src/host/channels/wecom/production.mjs +187 -0
- package/plugin-src/host/channels/wecom/rpc.mjs +255 -0
- package/plugin-src/host/channels/wecom-app/index.mjs +33 -0
- package/plugin-src/host/channels/wecom-app/production.mjs +221 -0
- package/plugin-src/host/channels/wecom-app/rpc.mjs +235 -0
- package/plugin-src/host/channels/weixin/connection-supervisor.mjs +139 -0
- package/plugin-src/host/channels/weixin/index.mjs +44 -0
- package/plugin-src/host/channels/weixin/production.mjs +257 -0
- package/plugin-src/host/channels/weixin/rpc.mjs +285 -0
- package/plugin-src/host/channels/whatsapp/index.mjs +33 -0
- package/plugin-src/host/channels/whatsapp/production.mjs +198 -0
- package/plugin-src/host/channels/whatsapp/rpc.mjs +242 -0
- package/plugin-src/host/delivery-adapter.mjs +388 -0
- package/plugin-src/host/delivery-http.mjs +132 -0
- package/plugin-src/host/delivery-rpc.mjs +173 -0
- package/plugin-src/host/delivery-service.mjs +552 -0
- package/plugin-src/host/delivery-suggestions.mjs +198 -0
- package/plugin-src/host/harness-command-executor.mjs +48 -0
- package/plugin-src/host/harness-connection.mjs +20 -0
- package/plugin-src/host/harness-session-coordinator.mjs +183 -0
- package/plugin-src/host/host-language-rpc.mjs +71 -0
- package/plugin-src/host/host-language.mjs +157 -0
- package/plugin-src/host/image-input-rpc.mjs +24 -0
- package/plugin-src/host/inbound-ttl-rpc.mjs +86 -0
- package/plugin-src/host/inbound-ttl-runtime.mjs +85 -0
- package/plugin-src/host/inbound-ttl-service.mjs +179 -0
- package/plugin-src/host/index.mjs +224 -0
- package/plugin-src/host/injected-context.mjs +104 -0
- package/plugin-src/host/lark-sdk-handshake-patch.mjs +181 -0
- package/plugin-src/host/modern-harness-api.mjs +738 -0
- package/plugin-src/host/rpc-authority.mjs +12 -0
- package/plugin-src/host/session-sync-coordinator.mjs +233 -0
- package/plugin-src/host/session-title-prefix.mjs +122 -0
- package/plugin-src/host/update-policy.mjs +31 -0
- package/plugin-src/host/update-rpc.mjs +16 -0
- package/plugin-src/host/update-runtime.mjs +339 -0
- package/plugin-src/host/update-service.mjs +392 -0
- package/plugin-src/management-rpc.mjs +87 -0
- package/src/channels/dingtalk/config-store.mjs +284 -0
- package/src/channels/dingtalk/connection-error.mjs +292 -0
- package/src/channels/dingtalk/device-auth.mjs +240 -0
- package/src/channels/dingtalk/dingtalk-api.mjs +1140 -0
- package/src/channels/dingtalk/dingtalk-bridge.mjs +1889 -0
- package/src/channels/dingtalk/dingtalk-card-stream.mjs +242 -0
- package/src/channels/dingtalk/dingtalk-controller.mjs +852 -0
- package/src/channels/dingtalk/dingtalk-menu.mjs +95 -0
- package/src/channels/dingtalk/dingtalk-runtime.mjs +482 -0
- package/src/channels/dingtalk/harness-client.mjs +19 -0
- package/src/channels/dingtalk/state-store.mjs +325 -0
- package/src/channels/discord/config-store.mjs +25 -0
- package/src/channels/discord/discord-api.mjs +347 -0
- package/src/channels/discord/discord-bridge.mjs +16 -0
- package/src/channels/discord/discord-controller.mjs +16 -0
- package/src/channels/discord/discord-runtime.mjs +974 -0
- package/src/channels/discord/harness-client.mjs +11 -0
- package/src/channels/discord/state-store.mjs +3 -0
- package/src/channels/email/config-store.mjs +194 -0
- package/src/channels/email/email-api.mjs +20 -0
- package/src/channels/email/email-bridge.mjs +17 -0
- package/src/channels/email/email-controller.mjs +824 -0
- package/src/channels/email/email-runtime.mjs +699 -0
- package/src/channels/email/harness-client.mjs +7 -0
- package/src/channels/email/mail-format.mjs +91 -0
- package/src/channels/email/state-store.mjs +176 -0
- package/src/channels/email/transport.mjs +64 -0
- package/src/channels/email/transports/agent-mail.mjs +604 -0
- package/src/channels/email/transports/agently-cli.mjs +288 -0
- package/src/channels/email/transports/imap-smtp.mjs +165 -0
- package/src/channels/feishu/bridge.mjs +6286 -0
- package/src/channels/feishu/config.mjs +71 -0
- package/src/channels/feishu/external-consumer.mjs +77 -0
- package/src/channels/feishu/external-files.mjs +111 -0
- package/src/channels/feishu/feishu-app.mjs +54 -0
- package/src/channels/feishu/feishu-cards.mjs +1285 -0
- package/src/channels/feishu/feishu-channel.mjs +651 -0
- package/src/channels/feishu/feishu-runtime.mjs +950 -0
- package/src/channels/feishu/group-message-permission-manager.mjs +72 -0
- package/src/channels/feishu/group-response-mode.mjs +15 -0
- package/src/channels/feishu/harness-client.mjs +19 -0
- package/src/channels/feishu/history-reader.mjs +77 -0
- package/src/channels/feishu/live-cot.mjs +260 -0
- package/src/channels/feishu/message-utils.mjs +613 -0
- package/src/channels/feishu/multi-bot-controller.mjs +1588 -0
- package/src/channels/feishu/nearby-history.mjs +72 -0
- package/src/channels/feishu/plugin-config-store.mjs +216 -0
- package/src/channels/feishu/plugin-controller.mjs +254 -0
- package/src/channels/feishu/registration-manager.mjs +349 -0
- package/src/channels/feishu/repair-manager.mjs +138 -0
- package/src/channels/feishu/reply-context.mjs +22 -0
- package/src/channels/feishu/slash-command-panel.mjs +155 -0
- package/src/channels/feishu/slash-command-registry.mjs +495 -0
- package/src/channels/feishu/state-store.mjs +214 -0
- package/src/channels/feishu/step-push-mode.mjs +25 -0
- package/src/channels/feishu/voice-config.mjs +34 -0
- package/src/channels/feishu/voice.mjs +134 -0
- package/src/channels/imessage/config-store.mjs +24 -0
- package/src/channels/imessage/controller.mjs +37 -0
- package/src/channels/imessage/harness-client.mjs +7 -0
- package/src/channels/imessage/imessage-api.mjs +194 -0
- package/src/channels/imessage/imessage-bridge.mjs +16 -0
- package/src/channels/imessage/runtime.mjs +102 -0
- package/src/channels/imessage/state-store.mjs +3 -0
- package/src/channels/matrix/matrix-api.mjs +696 -0
- package/src/channels/matrix/matrix-bridge.mjs +20 -0
- package/src/channels/matrix/matrix-config-store.mjs +368 -0
- package/src/channels/matrix/matrix-controller.mjs +404 -0
- package/src/channels/matrix/matrix-crypto-store.mjs +279 -0
- package/src/channels/matrix/matrix-crypto.mjs +1014 -0
- package/src/channels/matrix/matrix-harness-client.mjs +11 -0
- package/src/channels/matrix/matrix-normalize.mjs +357 -0
- package/src/channels/matrix/matrix-rich-text.mjs +313 -0
- package/src/channels/matrix/matrix-room-history.mjs +316 -0
- package/src/channels/matrix/matrix-runtime.mjs +1014 -0
- package/src/channels/office/config-store.mjs +107 -0
- package/src/channels/office/office-controller.mjs +178 -0
- package/src/channels/office/office-job-executor.mjs +391 -0
- package/src/channels/office/office-runtime.mjs +175 -0
- package/src/channels/office/office-transport.mjs +171 -0
- package/src/channels/office/protocol.mjs +43 -0
- package/src/channels/qq/config-store.mjs +173 -0
- package/src/channels/qq/harness-client.mjs +11 -0
- package/src/channels/qq/markdown-reply.mjs +446 -0
- package/src/channels/qq/qq-bridge.mjs +1507 -0
- package/src/channels/qq/qq-controller.mjs +514 -0
- package/src/channels/qq/qq-menu.mjs +208 -0
- package/src/channels/qq/qq-runtime.mjs +303 -0
- package/src/channels/qq/qr-auth.mjs +24 -0
- package/src/channels/qq/state-error.mjs +17 -0
- package/src/channels/qq/state-store.mjs +143 -0
- package/src/channels/shared/access-policy.mjs +210 -0
- package/src/channels/shared/agent-preset.mjs +76 -0
- package/src/channels/shared/batch-input.mjs +229 -0
- package/src/channels/shared/bot-alias.mjs +29 -0
- package/src/channels/shared/bot-workspace-store.mjs +2383 -0
- package/src/channels/shared/command-catalog.mjs +107 -0
- package/src/channels/shared/command-permission.mjs +32 -0
- package/src/channels/shared/compact-command.mjs +109 -0
- package/src/channels/shared/config-read-error.mjs +24 -0
- package/src/channels/shared/connection-error.mjs +191 -0
- package/src/channels/shared/connection-test.mjs +58 -0
- package/src/channels/shared/context-enhancement.mjs +372 -0
- package/src/channels/shared/control-command.mjs +111 -0
- package/src/channels/shared/conversation-state-store.mjs +165 -0
- package/src/channels/shared/default-workspace.mjs +31 -0
- package/src/channels/shared/deferred-delivery-coordinator.mjs +241 -0
- package/src/channels/shared/deferred-delivery.mjs +161 -0
- package/src/channels/shared/deferred-state.mjs +53 -0
- package/src/channels/shared/diagnostic-details.mjs +95 -0
- package/src/channels/shared/editable-message-stream.mjs +100 -0
- package/src/channels/shared/exclusive-inbound-consumers.mjs +71 -0
- package/src/channels/shared/file-download.mjs +64 -0
- package/src/channels/shared/harness-approval.mjs +508 -0
- package/src/channels/shared/harness-client.mjs +2143 -0
- package/src/channels/shared/harness-mux.mjs +123 -0
- package/src/channels/shared/harness-question.mjs +95 -0
- package/src/channels/shared/harness-session-binding.mjs +119 -0
- package/src/channels/shared/history-command.mjs +193 -0
- package/src/channels/shared/i18n-en/diagnostics.mjs +55 -0
- package/src/channels/shared/i18n-en/dingtalk.mjs +81 -0
- package/src/channels/shared/i18n-en/discord.mjs +10 -0
- package/src/channels/shared/i18n-en/email.mjs +25 -0
- package/src/channels/shared/i18n-en/feishu.mjs +404 -0
- package/src/channels/shared/i18n-en/image-input.mjs +18 -0
- package/src/channels/shared/i18n-en/matrix.mjs +85 -0
- package/src/channels/shared/i18n-en/office.mjs +23 -0
- package/src/channels/shared/i18n-en/qq.mjs +96 -0
- package/src/channels/shared/i18n-en/shared-a.mjs +241 -0
- package/src/channels/shared/i18n-en/shared-b.mjs +263 -0
- package/src/channels/shared/i18n-en/shared-c.mjs +203 -0
- package/src/channels/shared/i18n-en/slack.mjs +27 -0
- package/src/channels/shared/i18n-en/telegram.mjs +27 -0
- package/src/channels/shared/i18n-en/wecom-app.mjs +33 -0
- package/src/channels/shared/i18n-en/wecom.mjs +62 -0
- package/src/channels/shared/i18n-en/weixin.mjs +88 -0
- package/src/channels/shared/i18n-en/whatsapp.mjs +17 -0
- package/src/channels/shared/i18n-en.mjs +45 -0
- package/src/channels/shared/i18n.mjs +78 -0
- package/src/channels/shared/im-source-guidance.mjs +65 -0
- package/src/channels/shared/image-input-policy.mjs +35 -0
- package/src/channels/shared/image-input-settings-store.mjs +60 -0
- package/src/channels/shared/image-input.mjs +124 -0
- package/src/channels/shared/image-prompt.mjs +360 -0
- package/src/channels/shared/inbound-access.mjs +43 -0
- package/src/channels/shared/inbound-file.mjs +323 -0
- package/src/channels/shared/inbound-ttl-store.mjs +110 -0
- package/src/channels/shared/inbound-ttl.mjs +22 -0
- package/src/channels/shared/injected-context.mjs +362 -0
- package/src/channels/shared/interface-language-store.mjs +127 -0
- package/src/channels/shared/interface-language.mjs +51 -0
- package/src/channels/shared/message-failure.mjs +257 -0
- package/src/channels/shared/model-command.mjs +741 -0
- package/src/channels/shared/model-setting.mjs +145 -0
- package/src/channels/shared/preset-command.mjs +308 -0
- package/src/channels/shared/semantic/artifact-delivery.mjs +177 -0
- package/src/channels/shared/semantic/artifact.mjs +750 -0
- package/src/channels/shared/semantic/delivery.mjs +193 -0
- package/src/channels/shared/semantic/reply-reference.mjs +148 -0
- package/src/channels/shared/session-binding-lock.mjs +40 -0
- package/src/channels/shared/session-channel-labels.mjs +28 -0
- package/src/channels/shared/session-reply-recovery.mjs +104 -0
- package/src/channels/shared/session-sync-registry.mjs +22 -0
- package/src/channels/shared/session-title.mjs +74 -0
- package/src/channels/shared/status-reaction.mjs +107 -0
- package/src/channels/shared/text-harness-bridge.mjs +1623 -0
- package/src/channels/shared/token-bot-controller.mjs +417 -0
- package/src/channels/shared/token-config-store.mjs +208 -0
- package/src/channels/shared/workspace-command.mjs +532 -0
- package/src/channels/shared/workspace-session.mjs +196 -0
- package/src/channels/slack/config-store.mjs +177 -0
- package/src/channels/slack/external-consumer.mjs +80 -0
- package/src/channels/slack/external-files.mjs +90 -0
- package/src/channels/slack/harness-client.mjs +11 -0
- package/src/channels/slack/history-reader.mjs +203 -0
- package/src/channels/slack/manifest.mjs +37 -0
- package/src/channels/slack/slack-api.mjs +636 -0
- package/src/channels/slack/slack-bridge.mjs +20 -0
- package/src/channels/slack/slack-controller.mjs +468 -0
- package/src/channels/slack/slack-runtime.mjs +879 -0
- package/src/channels/slack/state-store.mjs +3 -0
- package/src/channels/telegram/config-store.mjs +89 -0
- package/src/channels/telegram/harness-client.mjs +11 -0
- package/src/channels/telegram/state-store.mjs +3 -0
- package/src/channels/telegram/telegram-api.mjs +486 -0
- package/src/channels/telegram/telegram-bridge.mjs +81 -0
- package/src/channels/telegram/telegram-controller.mjs +52 -0
- package/src/channels/telegram/telegram-http.mjs +21 -0
- package/src/channels/telegram/telegram-rich-message.mjs +149 -0
- package/src/channels/telegram/telegram-runtime.mjs +1471 -0
- package/src/channels/wecom/config-store.mjs +172 -0
- package/src/channels/wecom/harness-client.mjs +11 -0
- package/src/channels/wecom/qr-auth.mjs +95 -0
- package/src/channels/wecom/send-error.mjs +31 -0
- package/src/channels/wecom/state-store.mjs +107 -0
- package/src/channels/wecom/wecom-bridge.mjs +1833 -0
- package/src/channels/wecom/wecom-cards.mjs +101 -0
- package/src/channels/wecom/wecom-controller.mjs +530 -0
- package/src/channels/wecom/wecom-runtime.mjs +269 -0
- package/src/channels/wecom-app/callback-server.mjs +471 -0
- package/src/channels/wecom-app/config-store.mjs +242 -0
- package/src/channels/wecom-app/harness-client.mjs +11 -0
- package/src/channels/wecom-app/state-store.mjs +107 -0
- package/src/channels/wecom-app/wecom-app-api.mjs +432 -0
- package/src/channels/wecom-app/wecom-app-bridge.mjs +1072 -0
- package/src/channels/wecom-app/wecom-app-controller.mjs +453 -0
- package/src/channels/wecom-app/wecom-app-runtime.mjs +222 -0
- package/src/channels/weixin/config-store.mjs +192 -0
- package/src/channels/weixin/connection-error.en.mjs +137 -0
- package/src/channels/weixin/connection-error.mjs +153 -0
- package/src/channels/weixin/diagnostic-details.mjs +1 -0
- package/src/channels/weixin/harness-client.mjs +19 -0
- package/src/channels/weixin/state-store.mjs +291 -0
- package/src/channels/weixin/weixin-api.mjs +949 -0
- package/src/channels/weixin/weixin-bridge.mjs +1537 -0
- package/src/channels/weixin/weixin-controller.mjs +669 -0
- package/src/channels/weixin/weixin-runtime.mjs +416 -0
- package/src/channels/whatsapp/config-store.mjs +210 -0
- package/src/channels/whatsapp/harness-client.mjs +11 -0
- package/src/channels/whatsapp/state-store.mjs +3 -0
- package/src/channels/whatsapp/whatsapp-bridge.mjs +18 -0
- package/src/channels/whatsapp/whatsapp-controller.mjs +470 -0
- package/src/channels/whatsapp/whatsapp-runtime.mjs +917 -0
- package/src/channels/whatsapp/whatsapp-web-session.mjs +214 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile, realpath, stat } from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
import semver from 'semver';
|
|
8
|
+
|
|
9
|
+
export const PACKAGE_NAME = '@xmanrui/dsh-im';
|
|
10
|
+
export const NPM_REGISTRY = 'https://registry.npmjs.org/';
|
|
11
|
+
|
|
12
|
+
const INSTALL_TIMEOUT_MS = 15 * 60_000;
|
|
13
|
+
const CONFIG_TIMEOUT_MS = 10_000;
|
|
14
|
+
const OUTPUT_LIMIT = 16 * 1024;
|
|
15
|
+
|
|
16
|
+
function failure(code, extra = {}) {
|
|
17
|
+
return Object.assign(new Error(code), { code, ...extra });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Cordis 4's get() is the supported optional-service lookup. Putting these
|
|
21
|
+
// Desktop-only services in the plugin's inject array would disable web Hosts.
|
|
22
|
+
function service(ctx, name) {
|
|
23
|
+
return typeof ctx?.get === 'function' ? ctx.get(name) : ctx?.[name];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function inside(directory, filename) {
|
|
27
|
+
const suffix = relative(directory, filename);
|
|
28
|
+
return suffix !== '..' && !suffix.startsWith(`..${sep}`) && !isAbsolute(suffix);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function readOptional(filename) {
|
|
32
|
+
try {
|
|
33
|
+
return await readFile(filename, 'utf8');
|
|
34
|
+
} catch (error) {
|
|
35
|
+
if (error.code === 'ENOENT') return '';
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function packageAt(directory) {
|
|
41
|
+
const contents = await readFile(join(directory, 'package.json'), 'utf8');
|
|
42
|
+
return { directory: await realpath(directory), manifest: JSON.parse(contents), contents };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function containingPackage(filename, name) {
|
|
46
|
+
let directory = dirname(await realpath(filename));
|
|
47
|
+
while (true) {
|
|
48
|
+
try {
|
|
49
|
+
const found = await packageAt(directory);
|
|
50
|
+
return found.manifest?.name === name ? found : null;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (error.code !== 'ENOENT') throw error;
|
|
53
|
+
}
|
|
54
|
+
const parent = dirname(directory);
|
|
55
|
+
if (parent === directory) return null;
|
|
56
|
+
directory = parent;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function profileNameValid(name) {
|
|
61
|
+
return typeof name === 'string' && name.length > 0 && Buffer.byteLength(name) <= 255
|
|
62
|
+
&& !name.startsWith('-') && !['.', '..', 'node_modules'].includes(name)
|
|
63
|
+
&& !/[\\/\x00-\x1f\x7f<>:"|?*]/u.test(name);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function cliProfile(args) {
|
|
67
|
+
if (args[0] === 'web') return 'web';
|
|
68
|
+
let name;
|
|
69
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
70
|
+
const token = args[index];
|
|
71
|
+
if (token === '--profile') name = args[++index];
|
|
72
|
+
else if (token.startsWith('--profile=')) name = token.slice('--profile='.length);
|
|
73
|
+
else if (token === '--patch') index += 1;
|
|
74
|
+
else if (!token.startsWith('--patch=')) break;
|
|
75
|
+
}
|
|
76
|
+
return name;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function dshHome(env, osHome) {
|
|
80
|
+
let selected = env.DSH_HOME?.trim() ? env.DSH_HOME : join(osHome, '.dsh');
|
|
81
|
+
if (selected === '~') selected = osHome;
|
|
82
|
+
else if (/^~[\\/]/u.test(selected)) selected = join(osHome, selected.slice(2));
|
|
83
|
+
return resolve(selected);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function registrySpec(spec) {
|
|
87
|
+
return typeof spec === 'string' && spec.trim().length > 0
|
|
88
|
+
&& (semver.validRange(spec) !== null || /^[A-Za-z][A-Za-z0-9._-]*$/u.test(spec));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function validPackage(pkg) {
|
|
92
|
+
if (pkg.manifest?.name !== PACKAGE_NAME || semver.valid(pkg.manifest.version) === null) return false;
|
|
93
|
+
const entries = [
|
|
94
|
+
pkg.manifest.main,
|
|
95
|
+
pkg.manifest.exports?.['./client'],
|
|
96
|
+
pkg.manifest.dsh?.bundle?.patch,
|
|
97
|
+
];
|
|
98
|
+
for (const entry of entries) {
|
|
99
|
+
if (typeof entry !== 'string' || !entry || isAbsolute(entry) || entry.includes('\0')) return false;
|
|
100
|
+
const filename = resolve(pkg.directory, entry);
|
|
101
|
+
if (!inside(pkg.directory, filename) || !inside(pkg.directory, await realpath(filename))) return false;
|
|
102
|
+
if (!(await stat(filename)).isFile()) return false;
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function officialRegistry(value) {
|
|
108
|
+
if (value === undefined || value === null || value === '') return true;
|
|
109
|
+
if (typeof value !== 'string') return false;
|
|
110
|
+
try {
|
|
111
|
+
const url = new URL(value);
|
|
112
|
+
return url.href === NPM_REGISTRY;
|
|
113
|
+
} catch {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Drain bounded output; raw subprocess diagnostics never cross the RPC boundary. */
|
|
119
|
+
async function run(start, { signal, timeoutMs, errorCode, capture = false }) {
|
|
120
|
+
if (signal?.aborted) throw failure('install-interrupted');
|
|
121
|
+
const controller = new AbortController();
|
|
122
|
+
let interrupted;
|
|
123
|
+
let operation;
|
|
124
|
+
const cancel = (code) => {
|
|
125
|
+
interrupted ??= code;
|
|
126
|
+
controller.abort();
|
|
127
|
+
operation?.cancel?.();
|
|
128
|
+
};
|
|
129
|
+
const onAbort = () => cancel('install-interrupted');
|
|
130
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
131
|
+
const timer = setTimeout(() => cancel('install-timeout'), timeoutMs);
|
|
132
|
+
let stdout = '';
|
|
133
|
+
let stderr = '';
|
|
134
|
+
try {
|
|
135
|
+
operation = start(controller.signal);
|
|
136
|
+
// The Host services own process-tree termination and wait for actual exit.
|
|
137
|
+
// Do not race their completion: a timed-out installer may still hold files.
|
|
138
|
+
operation.stdout?.on('data', (chunk) => {
|
|
139
|
+
if (capture) stdout = (stdout + chunk.toString()).slice(-OUTPUT_LIMIT);
|
|
140
|
+
});
|
|
141
|
+
operation.stderr?.on('data', (chunk) => {
|
|
142
|
+
stderr = (stderr + chunk.toString()).slice(-OUTPUT_LIMIT);
|
|
143
|
+
});
|
|
144
|
+
operation.stdout?.on('error', () => cancel(errorCode));
|
|
145
|
+
operation.stderr?.on('error', () => cancel(errorCode));
|
|
146
|
+
const outcome = await operation.done;
|
|
147
|
+
if (interrupted) throw failure(interrupted);
|
|
148
|
+
if (outcome.exitCode !== 0 || outcome.signal) {
|
|
149
|
+
throw failure(errorCode, {
|
|
150
|
+
exitCode: outcome.exitCode,
|
|
151
|
+
diagnosticCode: stderr.match(/\bERR_PNPM_[A-Z0-9_]+\b/u)?.[0],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return { exitCode: 0, signal: null, ...(capture ? { stdout } : {}) };
|
|
155
|
+
} catch (error) {
|
|
156
|
+
if (interrupted) throw failure(interrupted);
|
|
157
|
+
if (error.code === errorCode) throw error;
|
|
158
|
+
throw failure(errorCode);
|
|
159
|
+
} finally {
|
|
160
|
+
clearTimeout(timer);
|
|
161
|
+
signal?.removeEventListener('abort', onAbort);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Adapt the running Host's existing package-management capabilities. Options
|
|
167
|
+
* replace process facts in tests only; no runtime path comes from RPC input.
|
|
168
|
+
*/
|
|
169
|
+
export function createUpdateRuntime(options = {}) {
|
|
170
|
+
const ctx = options.ctx;
|
|
171
|
+
const env = options.env ?? process.env;
|
|
172
|
+
const argv = options.argv ?? process.argv;
|
|
173
|
+
const execArgv = options.execArgv ?? process.execArgv;
|
|
174
|
+
const execPath = options.execPath ?? process.execPath;
|
|
175
|
+
const cwd = options.cwd ?? process.cwd();
|
|
176
|
+
const platform = options.platform ?? process.platform;
|
|
177
|
+
const osHome = options.osHome ?? homedir();
|
|
178
|
+
const electron = options.electron ?? process.versions.electron;
|
|
179
|
+
const moduleUrl = options.moduleUrl ?? import.meta.url;
|
|
180
|
+
const loadedPackage = containingPackage(fileURLToPath(moduleUrl), PACKAGE_NAME).catch(() => null);
|
|
181
|
+
let boundProfile;
|
|
182
|
+
|
|
183
|
+
async function environment() {
|
|
184
|
+
const profiles = service(ctx, 'desktopProfiles');
|
|
185
|
+
const desktop = service(ctx, 'desktopPnpm');
|
|
186
|
+
const bootstrap = service(ctx, 'desktopPnpmBootstrap');
|
|
187
|
+
const isDesktop = Boolean(electron || profiles || desktop || bootstrap);
|
|
188
|
+
const current = profiles?.current;
|
|
189
|
+
const profileName = isDesktop ? current?.name : cliProfile(argv.slice(2));
|
|
190
|
+
const homeDir = isDesktop && bootstrap?.homeDir ? resolve(bootstrap.homeDir) : dshHome(env, osHome);
|
|
191
|
+
const result = { environmentKind: isDesktop ? 'desktop' : 'cli', homeDir, profileName };
|
|
192
|
+
if (!profileNameValid(profileName)) return { ...result, blockedReason: 'unknown-profile' };
|
|
193
|
+
const profileDir = await realpath(join(homeDir, 'profiles', profileName));
|
|
194
|
+
const home = await realpath(homeDir);
|
|
195
|
+
const base = { ...result, homeDir: home, profileDir };
|
|
196
|
+
|
|
197
|
+
if (isDesktop) {
|
|
198
|
+
try {
|
|
199
|
+
if (typeof desktop?.runPlugin !== 'function' || typeof desktop?.run !== 'function' || !bootstrap
|
|
200
|
+
|| !current?.dir || bootstrap.activeProfileName !== profileName
|
|
201
|
+
|| await realpath(current.dir) !== profileDir
|
|
202
|
+
|| await realpath(bootstrap.activeProfileDir) !== profileDir
|
|
203
|
+
|| await realpath(bootstrap.appExecutable) !== await realpath(execPath)) {
|
|
204
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
205
|
+
}
|
|
206
|
+
const desktopPackage = await containingPackage(bootstrap.dshBootstrapPath, 'dsh-plugin-desktop');
|
|
207
|
+
if (!desktopPackage || basename(bootstrap.dshBootstrapPath) !== 'desktop-cli.js'
|
|
208
|
+
|| dirname(await realpath(bootstrap.dshBootstrapPath)) !== join(desktopPackage.directory, 'lib')) {
|
|
209
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
210
|
+
}
|
|
211
|
+
return { ...base, desktop, executable: execPath, cliEntry: bootstrap.dshBootstrapPath };
|
|
212
|
+
} catch {
|
|
213
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const subprocess = service(ctx, 'subprocess');
|
|
218
|
+
if (typeof subprocess?.spawn !== 'function' || typeof argv[1] !== 'string' || !isAbsolute(argv[1]) || platform === 'win32') {
|
|
219
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
220
|
+
}
|
|
221
|
+
try {
|
|
222
|
+
const cli = await containingPackage(argv[1], '@deepseek-ai/dsh');
|
|
223
|
+
if (!cli) return { ...base, blockedReason: 'executor-unavailable' };
|
|
224
|
+
const cliEntry = await realpath(argv[1]);
|
|
225
|
+
const declared = typeof cli.manifest.bin === 'string' ? cli.manifest.bin : cli.manifest.bin?.dsh;
|
|
226
|
+
const publishedEntry = typeof declared === 'string' ? resolve(cli.directory, declared) : '';
|
|
227
|
+
if (cliEntry !== publishedEntry && cliEntry !== join(cli.directory, 'src', 'bin.ts')) {
|
|
228
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
229
|
+
}
|
|
230
|
+
return { ...base, subprocess, executable: execPath, cliEntry };
|
|
231
|
+
} catch {
|
|
232
|
+
return { ...base, blockedReason: 'executor-unavailable' };
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function cliOperation(runtime, args, signal, directPnpm = false) {
|
|
237
|
+
const child = runtime.subprocess.spawn({
|
|
238
|
+
argv: directPnpm ? ['pnpm', ...args] : [execPath, ...execArgv, runtime.cliEntry, ...args],
|
|
239
|
+
cwd: directPnpm ? runtime.profileDir : cwd,
|
|
240
|
+
env: { DSH_HOME: runtime.homeDir, CI: 'true' },
|
|
241
|
+
stdio: { stdin: 'ignore', stdout: 'pipe', stderr: 'pipe' },
|
|
242
|
+
graceMs: 3_000,
|
|
243
|
+
signal,
|
|
244
|
+
});
|
|
245
|
+
return {
|
|
246
|
+
stdout: child.stdout,
|
|
247
|
+
stderr: child.stderr,
|
|
248
|
+
cancel: () => child.terminate(),
|
|
249
|
+
done: (async () => {
|
|
250
|
+
try { return await child.done; }
|
|
251
|
+
finally { await child.waitForExit(); }
|
|
252
|
+
})(),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
async function checkRegistry(runtime, signal) {
|
|
257
|
+
const args = ['config', 'get', '@xmanrui:registry', '--json'];
|
|
258
|
+
const result = await run(
|
|
259
|
+
(childSignal) => runtime.desktop
|
|
260
|
+
? runtime.desktop.run(args, childSignal)
|
|
261
|
+
: cliOperation(runtime, args, childSignal, true),
|
|
262
|
+
{ signal, timeoutMs: options.configTimeoutMs ?? CONFIG_TIMEOUT_MS, errorCode: 'registry-check-failed', capture: true },
|
|
263
|
+
);
|
|
264
|
+
const output = result.stdout.trim();
|
|
265
|
+
let value;
|
|
266
|
+
try { value = output === '' || output === 'undefined' ? undefined : JSON.parse(output); }
|
|
267
|
+
catch { throw failure('registry-check-failed'); }
|
|
268
|
+
if (!officialRegistry(value)) throw failure('registry-conflict');
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async function inspect({ preflight = false } = {}) {
|
|
272
|
+
let runtime;
|
|
273
|
+
const result = { installedVersion: null, packageValid: false, eligible: false, installationKey: null };
|
|
274
|
+
try {
|
|
275
|
+
runtime = await environment();
|
|
276
|
+
for (const key of ['homeDir', 'profileDir', 'profileName', 'environmentKind', 'executable', 'cliEntry']) {
|
|
277
|
+
result[key] = runtime[key] ?? null;
|
|
278
|
+
}
|
|
279
|
+
if (!runtime.profileDir) return { ...result, blockedReason: runtime.blockedReason ?? 'unknown-profile' };
|
|
280
|
+
|
|
281
|
+
const profile = await packageAt(runtime.profileDir);
|
|
282
|
+
const installed = await packageAt(join(runtime.profileDir, 'node_modules', PACKAGE_NAME));
|
|
283
|
+
result.sourceInstall = !registrySpec(profile.manifest.dependencies?.[PACKAGE_NAME])
|
|
284
|
+
|| !inside(join(runtime.profileDir, 'node_modules'), installed.directory);
|
|
285
|
+
result.installedVersion = typeof installed.manifest.version === 'string' ? installed.manifest.version : null;
|
|
286
|
+
result.packageValid = await validPackage(installed);
|
|
287
|
+
const loaded = await loadedPackage;
|
|
288
|
+
const identity = `${runtime.homeDir}\0${runtime.profileDir}\0${runtime.profileName}`;
|
|
289
|
+
const sameLoadedPackage = loaded?.directory === installed.directory
|
|
290
|
+
&& loaded?.manifest.version === installed.manifest.version;
|
|
291
|
+
if (boundProfile === undefined && sameLoadedPackage && result.packageValid) boundProfile = identity;
|
|
292
|
+
|
|
293
|
+
const stateFiles = await Promise.all(['pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package-lock.json']
|
|
294
|
+
.map((filename) => readOptional(join(runtime.profileDir, filename))));
|
|
295
|
+
result.installationKey = createHash('sha256').update(JSON.stringify([
|
|
296
|
+
identity, profile.contents, installed.directory, installed.contents,
|
|
297
|
+
runtime.cliEntry, runtime.executable, ...stateFiles,
|
|
298
|
+
])).digest('hex');
|
|
299
|
+
|
|
300
|
+
if (boundProfile !== undefined && boundProfile !== identity) result.blockedReason = 'installation-changed';
|
|
301
|
+
else if (!sameLoadedPackage && boundProfile === undefined) result.blockedReason = 'installation-changed';
|
|
302
|
+
else if (!result.packageValid) result.blockedReason = 'invalid-installation';
|
|
303
|
+
else if (result.sourceInstall) result.blockedReason = 'source-install';
|
|
304
|
+
else if (runtime.blockedReason) result.blockedReason = runtime.blockedReason;
|
|
305
|
+
else if (!sameLoadedPackage) result.blockedReason = 'pending-restart';
|
|
306
|
+
else if (preflight) await checkRegistry(runtime);
|
|
307
|
+
|
|
308
|
+
result.eligible = !result.blockedReason;
|
|
309
|
+
return { ...result, blockedReason: result.blockedReason ?? null };
|
|
310
|
+
} catch (error) {
|
|
311
|
+
const known = ['registry-conflict', 'registry-check-failed', 'install-timeout', 'install-interrupted'];
|
|
312
|
+
return { ...result, blockedReason: known.includes(error.code) ? error.code : runtime?.profileDir ? 'invalid-installation' : 'unknown-profile' };
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async function install(version, { signal, expectedInstallationKey } = {}) {
|
|
317
|
+
if (semver.valid(version) !== version || semver.prerelease(version)) throw failure('invalid-version');
|
|
318
|
+
const before = await inspect();
|
|
319
|
+
if (expectedInstallationKey !== undefined && before.installationKey !== expectedInstallationKey) {
|
|
320
|
+
throw failure('installation-changed');
|
|
321
|
+
}
|
|
322
|
+
if (!before.eligible) throw failure(before.blockedReason);
|
|
323
|
+
const runtime = await environment();
|
|
324
|
+
await checkRegistry(runtime, signal);
|
|
325
|
+
// Config validation is asynchronous: do not replace a package another
|
|
326
|
+
// package manager changed while it ran.
|
|
327
|
+
const checked = await inspect();
|
|
328
|
+
if (!checked.eligible || checked.installationKey !== before.installationKey) throw failure('installation-changed');
|
|
329
|
+
const args = ['add', '-w', '--save-exact', `${PACKAGE_NAME}@${version}`, `--registry=${NPM_REGISTRY}`];
|
|
330
|
+
return run(
|
|
331
|
+
(childSignal) => runtime.desktop
|
|
332
|
+
? runtime.desktop.runPlugin(args, runtime.profileDir, childSignal)
|
|
333
|
+
: cliOperation(runtime, ['plugin', '--profile', runtime.profileName, ...args], childSignal),
|
|
334
|
+
{ signal, timeoutMs: options.installTimeoutMs ?? INSTALL_TIMEOUT_MS, errorCode: 'install-failed' },
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return Object.freeze({ inspect, install });
|
|
339
|
+
}
|