@mininglamp-oss/octo-runtime 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -142
- package/apps/cli/README.md +7 -102
- package/apps/cli/dist/adapters.js +41 -19
- package/apps/cli/dist/build-info.json +2 -2
- package/apps/cli/dist/command-tree.d.ts +1 -13
- package/apps/cli/dist/command-tree.js +130 -317
- package/apps/cli/dist/foreground.d.ts +1 -2
- package/apps/cli/dist/help.d.ts +0 -1
- package/apps/cli/dist/help.js +2 -13
- package/apps/cli/dist/index.js +14 -1
- package/apps/cli/dist/logs.d.ts +2 -2
- package/apps/cli/dist/logs.js +14 -17
- package/apps/cli/dist/main.js +99 -182
- package/apps/cli/dist/manifest.json +0 -50
- package/apps/cli/dist/module-manifest.d.ts +1 -1
- package/apps/cli/dist/module-manifest.js +23 -6
- package/apps/cli/dist/openclaw.d.ts +0 -8
- package/apps/cli/dist/openclaw.js +2 -114
- package/apps/cli/dist/output.d.ts +19 -1
- package/apps/cli/dist/output.js +185 -44
- package/apps/cli/dist/playboard.js +17 -9
- package/apps/cli/dist/service-control.js +0 -1
- package/apps/cli/dist/state.d.ts +5 -2
- package/apps/cli/dist/state.js +48 -13
- package/dist/public/codex.d.ts +1 -0
- package/dist/public/codex.js +1 -0
- package/dist/public/executor-kernel.d.ts +4 -0
- package/dist/public/executor-kernel.js +2 -0
- package/dist/public/host.d.ts +6 -3
- package/dist/public/host.js +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +20 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.d.ts +6 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.js +78 -262
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +11 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.js +198 -52
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.d.ts +58 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.js +650 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/stdin-writer.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/stdin-writer.js +15 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-R3PDZLX5.js → chunk-H3S6WM37.js} +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-FGFEM7JP.js → chunk-RISQ6NGV.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-TSRZVLIG.js → chunk-SMTJTIN7.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/dsh-sdk-NOTICE.txt +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/launch.js +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/trajectory.js +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/activity.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/execution-scope.d.ts +25 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/module-manifest.d.ts +1 -13
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/module-manifest.js +4 -27
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log-worker.js +4 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log.js +6 -60
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.d.ts +0 -10
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.js +0 -83
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.js +41 -19
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/command-tree.d.ts +1 -13
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/command-tree.js +130 -317
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/foreground.d.ts +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/help.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/help.js +2 -13
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/index.js +14 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/logs.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/logs.js +14 -17
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/main.js +99 -182
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/manifest.json +0 -50
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/module-manifest.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/module-manifest.js +23 -6
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/openclaw.d.ts +0 -8
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/openclaw.js +2 -114
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.d.ts +19 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +185 -44
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +17 -9
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/service-control.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/state.d.ts +5 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/state.js +48 -13
- package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +20 -23
- package/node_modules/@mininglamp-oss/octo-runtime-client/build-info.json +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/async-question-reply.d.ts +29 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/async-question-reply.js +210 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/browser.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/browser.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.d.ts +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.js +495 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/index.d.ts +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/index.js +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/internal.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/internal.js +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/invocation-lifecycle.d.ts +59 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/invocation-lifecycle.js +302 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/notification.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/notification.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/protocol.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/protocol.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/runtime-path.d.ts +21 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/runtime-path.js +138 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/startup-catalog.d.ts +8 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/startup-catalog.js +53 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/startup-diagnostics.d.ts +82 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/startup-diagnostics.js +371 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/submission-error.d.ts +12 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/submission-error.js +29 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/types.d.ts +87 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/types.js +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/package.json +54 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-configuration-fixtures.json +1219 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-fixtures.json +5988 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-client.behavior.json +56 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-ipc-fixtures.json +75 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-ipc.schema.json +538 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/native-invoke-fixtures.json +116 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/protocol.schema.json +4713 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/run-protocol-fixtures.json +761 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/runtime-selection-fixtures.json +663 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/session-name-fixtures.json +191 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.d.ts +26 -18
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +153 -14
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +22 -15
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/async-question-reply.d.ts +1 -30
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/async-question-reply.js +2 -199
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/client.d.ts +1 -10
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/client.js +2 -446
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/endpoint.js +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/host-run-service.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/host-run-service.js +13 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.d.ts +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.js +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/invocation-lifecycle.d.ts +1 -53
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/invocation-lifecycle.js +2 -280
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/lifecycle.d.ts +5 -10
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/lifecycle.js +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/runtime-home.d.ts +20 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/runtime-home.js +180 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +41 -15
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/service.d.ts +5 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/service.js +48 -5
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-catalog.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-catalog.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-diagnostics.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-diagnostics.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-logging.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/startup-logging.js +18 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.d.ts +1 -10
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.js +2 -23
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/types.d.ts +2 -72
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/types.js +2 -10
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +5 -4
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.js +12 -5
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/errors.d.ts +5 -1
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/errors.js +9 -0
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/home.d.ts +5 -6
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/home.js +33 -45
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/identity.js +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/index.d.ts +4 -6
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/index.js +3 -5
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -17
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/adapter-metadata.d.ts +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +52 -8
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/image-input.d.ts +9 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/image-input.js +20 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.d.ts +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +27 -29
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +86 -37
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.d.ts +1 -6
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.js +3 -17
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.js +65 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/ws/README.md +21 -29
- package/node_modules/ws/lib/buffer-util.js +13 -2
- package/node_modules/ws/lib/sender.js +4 -1
- package/node_modules/ws/lib/websocket.js +8 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +33 -135
- package/packages/octo-runtime-protocol/schema/kernel-ipc-fixtures.json +28 -6
- package/packages/octo-runtime-protocol/schema/protocol.schema.json +296 -66
- package/apps/cli/dist/extra-command-config.d.ts +0 -4
- package/apps/cli/dist/extra-command-config.js +0 -50
- package/apps/cli/dist/extra-commands.d.ts +0 -15
- package/apps/cli/dist/extra-commands.js +0 -275
- package/apps/cli/dist/extras.d.ts +0 -8
- package/apps/cli/dist/extras.js +0 -72
- package/apps/cli/dist/global-extras.d.ts +0 -16
- package/apps/cli/dist/global-extras.js +0 -201
- package/apps/cli/dist/status-output.d.ts +0 -10
- package/apps/cli/dist/status-output.js +0 -65
- package/dist/public/channel-gateway-commands.d.ts +0 -1
- package/dist/public/channel-gateway-commands.js +0 -1
- package/dist/public/channel-gateway.d.ts +0 -3
- package/dist/public/channel-gateway.js +0 -1
- package/dist/public/channel-wecom-commands.d.ts +0 -1
- package/dist/public/channel-wecom-commands.js +0 -1
- package/dist/public/channel-wecom.d.ts +0 -2
- package/dist/public/channel-wecom.js +0 -1
- package/dist/public/extra.d.ts +0 -5
- package/dist/public/extra.js +0 -3
- package/dist/public/webui-commands.d.ts +0 -1
- package/dist/public/webui-commands.js +0 -1
- package/dist/public/webui.d.ts +0 -1
- package/dist/public/webui.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extra-command-config.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extra-command-config.js +0 -50
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extra-commands.d.ts +0 -15
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extra-commands.js +0 -275
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extras.d.ts +0 -8
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/extras.js +0 -72
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/global-extras.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/global-extras.js +0 -201
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/status-output.d.ts +0 -10
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/status-output.js +0 -65
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.d.ts +0 -8
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.js +0 -62
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/config-schema.json +0 -458
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.d.ts +0 -50
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.js +0 -140
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.js +0 -27
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/host-session-store.d.ts +0 -17
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/host-session-store.js +0 -123
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/im-channel.d.ts +0 -15
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/im-channel.js +0 -1489
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.d.ts +0 -28
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.js +0 -77
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/session-store.d.ts +0 -71
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/session-store.js +0 -153
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.d.ts +0 -15
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.js +0 -28
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/commands.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/commands.js +0 -124
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/contracts.d.ts +0 -172
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.d.ts +0 -22
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.js +0 -46
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.js +0 -285
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/dispatcher.d.ts +0 -20
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/dispatcher.js +0 -109
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.d.ts +0 -15
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.js +0 -36
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.js +0 -98
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/send-error.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/send-error.js +0 -10
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.d.ts +0 -17
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.js +0 -238
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.d.ts +0 -29
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.js +0 -171
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.d.ts +0 -44
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.js +0 -392
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/tool-environment.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/tool-environment.js +0 -27
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/extra.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/extra.js +0 -87
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/index.d.ts +0 -20
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/index.js +0 -13
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/configuration.d.ts +0 -9
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/configuration.js +0 -162
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/manager.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/manager.js +0 -154
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/ports.d.ts +0 -34
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.d.ts +0 -67
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.js +0 -588
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/typing.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/typing.js +0 -83
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.d.ts +0 -132
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.js +0 -226
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.d.ts +0 -65
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.js +0 -202
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.d.ts +0 -112
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.js +0 -138
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.d.ts +0 -48
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.js +0 -116
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/events.d.ts +0 -51
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/events.js +0 -79
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.d.ts +0 -30
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.js +0 -222
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/index.d.ts +0 -13
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/index.js +0 -13
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.d.ts +0 -92
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.js +0 -173
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/rules.d.ts +0 -84
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/rules.js +0 -110
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/types.d.ts +0 -87
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/types.js +0 -45
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/url.d.ts +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/url.js +0 -7
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/auth.d.ts +0 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/auth.js +0 -23
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-action.d.ts +0 -20
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-action.js +0 -75
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.d.ts +0 -22
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.js +0 -136
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/cards.d.ts +0 -7
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/cards.js +0 -40
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.d.ts +0 -70
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.js +0 -646
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connection-error.d.ts +0 -17
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connection-error.js +0 -91
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.d.ts +0 -18
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.js +0 -148
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.d.ts +0 -15
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.js +0 -257
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.js +0 -133
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.d.ts +0 -21
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.js +0 -76
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/image-input.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/image-input.js +0 -163
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/interaction-card.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/interaction-card.js +0 -113
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.d.ts +0 -13
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.js +0 -75
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-content.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-content.js +0 -117
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.js +0 -74
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.js +0 -19
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.d.ts +0 -7
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.js +0 -90
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/normalize.d.ts +0 -20
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/normalize.js +0 -85
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/reasoning-frame.d.ts +0 -34
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/reasoning-frame.js +0 -430
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/resources.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/resources.js +0 -63
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.js +0 -60
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/session-command.d.ts +0 -9
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/session-command.js +0 -71
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.d.ts +0 -44
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.js +0 -357
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/package.json +0 -33
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/config-schema.json +0 -276
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/im-channel.d.ts +0 -11
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/im-channel.js +0 -754
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/session-store.d.ts +0 -35
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/session-store.js +0 -93
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/commands.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/commands.js +0 -128
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/contracts.d.ts +0 -78
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/contracts.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/delivery/dispatcher.d.ts +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/delivery/dispatcher.js +0 -69
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/execution/dispatcher.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/execution/dispatcher.js +0 -95
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/extra.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/extra.js +0 -85
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/index.d.ts +0 -10
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/index.js +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/configuration.d.ts +0 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/configuration.js +0 -109
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/manager.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/manager.js +0 -73
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/ports.d.ts +0 -24
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/ports.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/presentation/run-projector.d.ts +0 -45
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/presentation/run-projector.js +0 -258
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.d.ts +0 -21
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.js +0 -124
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/connection.d.ts +0 -53
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/connection.js +0 -219
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/stream-session.d.ts +0 -10
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/stream-session.js +0 -52
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/package.json +0 -31
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/config-schema.json +0 -134
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/commands.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/commands.js +0 -51
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/index.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/index.js +0 -423
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/store.d.ts +0 -25
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/store.js +0 -130
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/web/assets/index-BLMf2Etg.js +0 -73
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/web/assets/index-CYTpqItx.css +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/dist/web/index.html +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/package.json +0 -28
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.d.ts +0 -32
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.js +0 -165
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-commands.d.ts +0 -70
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-commands.js +0 -16
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-config.d.ts +0 -20
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-config.js +0 -134
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-dependencies.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-dependencies.js +0 -21
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-service.d.ts +0 -22
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-service.js +0 -309
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extras.d.ts +0 -55
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extras.js +0 -375
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/shutdown.d.ts +0 -7
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/shutdown.js +0 -39
- package/node_modules/@types/debug/LICENSE +0 -21
- package/node_modules/@types/debug/README.md +0 -69
- package/node_modules/@types/debug/index.d.ts +0 -50
- package/node_modules/@types/debug/package.json +0 -58
- package/node_modules/@types/mdast/LICENSE +0 -21
- package/node_modules/@types/mdast/README.md +0 -15
- package/node_modules/@types/mdast/index.d.ts +0 -1123
- package/node_modules/@types/mdast/package.json +0 -47
- package/node_modules/@types/ms/LICENSE +0 -21
- package/node_modules/@types/ms/README.md +0 -82
- package/node_modules/@types/ms/index.d.ts +0 -63
- package/node_modules/@types/ms/package.json +0 -26
- package/node_modules/@types/unist/LICENSE +0 -21
- package/node_modules/@types/unist/README.md +0 -15
- package/node_modules/@types/unist/index.d.ts +0 -119
- package/node_modules/@types/unist/package.json +0 -60
- package/node_modules/character-entities/index.d.ts +0 -6
- package/node_modules/character-entities/index.js +0 -2132
- package/node_modules/character-entities/license +0 -22
- package/node_modules/character-entities/package.json +0 -78
- package/node_modules/character-entities/readme.md +0 -152
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -64
- package/node_modules/debug/src/browser.js +0 -272
- package/node_modules/debug/src/common.js +0 -292
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- package/node_modules/decode-named-character-reference/index.d.ts +0 -13
- package/node_modules/decode-named-character-reference/index.d.ts.map +0 -1
- package/node_modules/decode-named-character-reference/index.dom.d.ts +0 -6
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +0 -1
- package/node_modules/decode-named-character-reference/index.dom.js +0 -32
- package/node_modules/decode-named-character-reference/index.js +0 -19
- package/node_modules/decode-named-character-reference/license +0 -22
- package/node_modules/decode-named-character-reference/package.json +0 -90
- package/node_modules/decode-named-character-reference/readme.md +0 -136
- package/node_modules/dequal/dist/index.js +0 -86
- package/node_modules/dequal/dist/index.min.js +0 -1
- package/node_modules/dequal/dist/index.mjs +0 -84
- package/node_modules/dequal/index.d.ts +0 -1
- package/node_modules/dequal/license +0 -21
- package/node_modules/dequal/lite/index.d.ts +0 -1
- package/node_modules/dequal/lite/index.js +0 -31
- package/node_modules/dequal/lite/index.min.js +0 -1
- package/node_modules/dequal/lite/index.mjs +0 -29
- package/node_modules/dequal/package.json +0 -57
- package/node_modules/dequal/readme.md +0 -112
- package/node_modules/devlop/lib/default.js +0 -9
- package/node_modules/devlop/lib/development.d.ts +0 -84
- package/node_modules/devlop/lib/development.js +0 -238
- package/node_modules/devlop/license +0 -22
- package/node_modules/devlop/package.json +0 -80
- package/node_modules/devlop/readme.md +0 -360
- package/node_modules/mdast-util-from-markdown/dev/index.d.ts +0 -23
- package/node_modules/mdast-util-from-markdown/dev/index.js +0 -2
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +0 -53
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +0 -1
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +0 -1455
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +0 -321
- package/node_modules/mdast-util-from-markdown/dev/lib/types.js +0 -2
- package/node_modules/mdast-util-from-markdown/index.d.ts +0 -23
- package/node_modules/mdast-util-from-markdown/index.js +0 -2
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts +0 -53
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +0 -1
- package/node_modules/mdast-util-from-markdown/lib/index.js +0 -1270
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +0 -321
- package/node_modules/mdast-util-from-markdown/lib/types.js +0 -2
- package/node_modules/mdast-util-from-markdown/license +0 -22
- package/node_modules/mdast-util-from-markdown/package.json +0 -98
- package/node_modules/mdast-util-from-markdown/readme.md +0 -549
- package/node_modules/mdast-util-to-string/index.d.ts +0 -2
- package/node_modules/mdast-util-to-string/index.js +0 -5
- package/node_modules/mdast-util-to-string/lib/index.d.ts +0 -31
- package/node_modules/mdast-util-to-string/lib/index.js +0 -108
- package/node_modules/mdast-util-to-string/license +0 -22
- package/node_modules/mdast-util-to-string/package.json +0 -78
- package/node_modules/mdast-util-to-string/readme.md +0 -218
- package/node_modules/micromark/dev/index.d.ts +0 -82
- package/node_modules/micromark/dev/index.d.ts.map +0 -1
- package/node_modules/micromark/dev/index.js +0 -68
- package/node_modules/micromark/dev/lib/compile.d.ts +0 -16
- package/node_modules/micromark/dev/lib/compile.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/compile.js +0 -1162
- package/node_modules/micromark/dev/lib/constructs.d.ts +0 -73
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/constructs.js +0 -101
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +0 -46
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/create-tokenizer.js +0 -718
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +0 -4
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/initialize/content.js +0 -99
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +0 -10
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/initialize/document.js +0 -449
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +0 -4
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/initialize/flow.js +0 -86
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +0 -8
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/initialize/text.js +0 -248
- package/node_modules/micromark/dev/lib/parse.d.ts +0 -10
- package/node_modules/micromark/dev/lib/parse.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/parse.js +0 -58
- package/node_modules/micromark/dev/lib/postprocess.d.ts +0 -9
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/postprocess.js +0 -19
- package/node_modules/micromark/dev/lib/preprocess.d.ts +0 -13
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +0 -1
- package/node_modules/micromark/dev/lib/preprocess.js +0 -139
- package/node_modules/micromark/dev/stream.d.ts +0 -35
- package/node_modules/micromark/dev/stream.d.ts.map +0 -1
- package/node_modules/micromark/dev/stream.js +0 -270
- package/node_modules/micromark/index.d.ts +0 -82
- package/node_modules/micromark/index.d.ts.map +0 -1
- package/node_modules/micromark/index.js +0 -60
- package/node_modules/micromark/lib/compile.d.ts +0 -16
- package/node_modules/micromark/lib/compile.d.ts.map +0 -1
- package/node_modules/micromark/lib/compile.js +0 -1068
- package/node_modules/micromark/lib/constructs.d.ts +0 -73
- package/node_modules/micromark/lib/constructs.d.ts.map +0 -1
- package/node_modules/micromark/lib/constructs.js +0 -85
- package/node_modules/micromark/lib/create-tokenizer.d.ts +0 -46
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +0 -1
- package/node_modules/micromark/lib/create-tokenizer.js +0 -613
- package/node_modules/micromark/lib/initialize/content.d.ts +0 -4
- package/node_modules/micromark/lib/initialize/content.d.ts.map +0 -1
- package/node_modules/micromark/lib/initialize/content.js +0 -79
- package/node_modules/micromark/lib/initialize/document.d.ts +0 -10
- package/node_modules/micromark/lib/initialize/document.d.ts.map +0 -1
- package/node_modules/micromark/lib/initialize/document.js +0 -370
- package/node_modules/micromark/lib/initialize/flow.d.ts +0 -4
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +0 -1
- package/node_modules/micromark/lib/initialize/flow.js +0 -58
- package/node_modules/micromark/lib/initialize/text.d.ts +0 -8
- package/node_modules/micromark/lib/initialize/text.d.ts.map +0 -1
- package/node_modules/micromark/lib/initialize/text.js +0 -216
- package/node_modules/micromark/lib/parse.d.ts +0 -10
- package/node_modules/micromark/lib/parse.d.ts.map +0 -1
- package/node_modules/micromark/lib/parse.js +0 -56
- package/node_modules/micromark/lib/postprocess.d.ts +0 -9
- package/node_modules/micromark/lib/postprocess.d.ts.map +0 -1
- package/node_modules/micromark/lib/postprocess.js +0 -18
- package/node_modules/micromark/lib/preprocess.d.ts +0 -13
- package/node_modules/micromark/lib/preprocess.d.ts.map +0 -1
- package/node_modules/micromark/lib/preprocess.js +0 -112
- package/node_modules/micromark/license +0 -22
- package/node_modules/micromark/package.json +0 -87
- package/node_modules/micromark/readme.md +0 -488
- package/node_modules/micromark/stream.d.ts +0 -35
- package/node_modules/micromark/stream.d.ts.map +0 -1
- package/node_modules/micromark/stream.js +0 -256
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +0 -23
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/index.js +0 -22
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +0 -294
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +0 -269
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +0 -62
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +0 -162
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +0 -69
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +0 -166
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +0 -472
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +0 -178
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +0 -257
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +0 -7
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +0 -185
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +0 -295
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +0 -65
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +0 -229
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +0 -938
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +0 -783
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +0 -658
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +0 -119
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +0 -71
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +0 -34
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +0 -306
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +0 -67
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +0 -213
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +0 -120
- package/node_modules/micromark-core-commonmark/index.d.ts +0 -23
- package/node_modules/micromark-core-commonmark/index.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/index.js +0 -22
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/attention.js +0 -231
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/autolink.js +0 -233
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +0 -61
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +0 -143
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +0 -64
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +0 -149
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -422
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +0 -159
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/code-text.js +0 -225
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +0 -7
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/content.js +0 -163
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/definition.js +0 -254
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -60
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -191
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +0 -827
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/html-text.js +0 -678
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/label-end.js +0 -561
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -110
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -63
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +0 -33
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/list.js +0 -213
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +0 -61
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -187
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +0 -4
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +0 -1
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -102
- package/node_modules/micromark-core-commonmark/license +0 -22
- package/node_modules/micromark-core-commonmark/package.json +0 -62
- package/node_modules/micromark-core-commonmark/readme.md +0 -171
- package/node_modules/micromark-factory-destination/dev/index.d.ts +0 -42
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-destination/dev/index.js +0 -255
- package/node_modules/micromark-factory-destination/index.d.ts +0 -42
- package/node_modules/micromark-factory-destination/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-destination/index.js +0 -206
- package/node_modules/micromark-factory-destination/license +0 -22
- package/node_modules/micromark-factory-destination/package.json +0 -57
- package/node_modules/micromark-factory-destination/readme.md +0 -234
- package/node_modules/micromark-factory-label/dev/index.d.ts +0 -37
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-label/dev/index.js +0 -172
- package/node_modules/micromark-factory-label/index.d.ts +0 -37
- package/node_modules/micromark-factory-label/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-label/index.js +0 -148
- package/node_modules/micromark-factory-label/license +0 -22
- package/node_modules/micromark-factory-label/package.json +0 -60
- package/node_modules/micromark-factory-label/readme.md +0 -224
- package/node_modules/micromark-factory-space/dev/index.d.ts +0 -60
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-space/dev/index.js +0 -122
- package/node_modules/micromark-factory-space/index.d.ts +0 -60
- package/node_modules/micromark-factory-space/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-space/index.js +0 -116
- package/node_modules/micromark-factory-space/license +0 -22
- package/node_modules/micromark-factory-space/package.json +0 -46
- package/node_modules/micromark-factory-space/readme.md +0 -225
- package/node_modules/micromark-factory-title/dev/index.d.ts +0 -36
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-title/dev/index.js +0 -169
- package/node_modules/micromark-factory-title/index.d.ts +0 -36
- package/node_modules/micromark-factory-title/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-title/index.js +0 -158
- package/node_modules/micromark-factory-title/license +0 -22
- package/node_modules/micromark-factory-title/package.json +0 -58
- package/node_modules/micromark-factory-title/readme.md +0 -229
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +0 -22
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-whitespace/dev/index.js +0 -53
- package/node_modules/micromark-factory-whitespace/index.d.ts +0 -22
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +0 -1
- package/node_modules/micromark-factory-whitespace/index.js +0 -44
- package/node_modules/micromark-factory-whitespace/license +0 -22
- package/node_modules/micromark-factory-whitespace/package.json +0 -57
- package/node_modules/micromark-factory-whitespace/readme.md +0 -205
- package/node_modules/micromark-util-character/dev/index.d.ts +0 -195
- package/node_modules/micromark-util-character/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-character/dev/index.js +0 -252
- package/node_modules/micromark-util-character/index.d.ts +0 -195
- package/node_modules/micromark-util-character/index.d.ts.map +0 -1
- package/node_modules/micromark-util-character/index.js +0 -246
- package/node_modules/micromark-util-character/license +0 -22
- package/node_modules/micromark-util-character/package.json +0 -57
- package/node_modules/micromark-util-character/readme.md +0 -446
- package/node_modules/micromark-util-chunked/dev/index.d.ts +0 -41
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-chunked/dev/index.js +0 -89
- package/node_modules/micromark-util-chunked/index.d.ts +0 -41
- package/node_modules/micromark-util-chunked/index.d.ts.map +0 -1
- package/node_modules/micromark-util-chunked/index.js +0 -81
- package/node_modules/micromark-util-chunked/license +0 -22
- package/node_modules/micromark-util-chunked/package.json +0 -57
- package/node_modules/micromark-util-chunked/readme.md +0 -219
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +0 -18
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-classify-character/dev/index.js +0 -38
- package/node_modules/micromark-util-classify-character/index.d.ts +0 -18
- package/node_modules/micromark-util-classify-character/index.d.ts.map +0 -1
- package/node_modules/micromark-util-classify-character/index.js +0 -27
- package/node_modules/micromark-util-classify-character/license +0 -22
- package/node_modules/micromark-util-classify-character/package.json +0 -59
- package/node_modules/micromark-util-classify-character/readme.md +0 -205
- package/node_modules/micromark-util-combine-extensions/index.d.ts +0 -22
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +0 -1
- package/node_modules/micromark-util-combine-extensions/index.js +0 -143
- package/node_modules/micromark-util-combine-extensions/license +0 -22
- package/node_modules/micromark-util-combine-extensions/package.json +0 -52
- package/node_modules/micromark-util-combine-extensions/readme.md +0 -201
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +0 -16
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +0 -42
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +0 -16
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +0 -1
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -32
- package/node_modules/micromark-util-decode-numeric-character-reference/license +0 -22
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +0 -59
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +0 -184
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +0 -14
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-decode-string/dev/index.js +0 -53
- package/node_modules/micromark-util-decode-string/index.d.ts +0 -14
- package/node_modules/micromark-util-decode-string/index.d.ts.map +0 -1
- package/node_modules/micromark-util-decode-string/index.js +0 -45
- package/node_modules/micromark-util-decode-string/license +0 -22
- package/node_modules/micromark-util-decode-string/package.json +0 -63
- package/node_modules/micromark-util-decode-string/readme.md +0 -179
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +0 -78
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-edit-map/dev/index.js +0 -237
- package/node_modules/micromark-util-edit-map/index.d.ts +0 -78
- package/node_modules/micromark-util-edit-map/index.d.ts.map +0 -1
- package/node_modules/micromark-util-edit-map/index.js +0 -225
- package/node_modules/micromark-util-edit-map/license +0 -22
- package/node_modules/micromark-util-edit-map/package.json +0 -48
- package/node_modules/micromark-util-edit-map/readme.md +0 -234
- package/node_modules/micromark-util-encode/index.d.ts +0 -14
- package/node_modules/micromark-util-encode/index.d.ts.map +0 -1
- package/node_modules/micromark-util-encode/index.js +0 -33
- package/node_modules/micromark-util-encode/license +0 -22
- package/node_modules/micromark-util-encode/package.json +0 -47
- package/node_modules/micromark-util-encode/readme.md +0 -176
- package/node_modules/micromark-util-html-tag-name/index.d.ts +0 -30
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +0 -1
- package/node_modules/micromark-util-html-tag-name/index.js +0 -93
- package/node_modules/micromark-util-html-tag-name/license +0 -22
- package/node_modules/micromark-util-html-tag-name/package.json +0 -47
- package/node_modules/micromark-util-html-tag-name/readme.md +0 -193
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +0 -21
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +0 -38
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +0 -21
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +0 -1
- package/node_modules/micromark-util-normalize-identifier/index.js +0 -33
- package/node_modules/micromark-util-normalize-identifier/license +0 -22
- package/node_modules/micromark-util-normalize-identifier/package.json +0 -58
- package/node_modules/micromark-util-normalize-identifier/readme.md +0 -187
- package/node_modules/micromark-util-resolve-all/index.d.ts +0 -22
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +0 -1
- package/node_modules/micromark-util-resolve-all/index.js +0 -32
- package/node_modules/micromark-util-resolve-all/license +0 -22
- package/node_modules/micromark-util-resolve-all/package.json +0 -48
- package/node_modules/micromark-util-resolve-all/readme.md +0 -238
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +0 -36
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +0 -124
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +0 -36
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +0 -1
- package/node_modules/micromark-util-sanitize-uri/index.js +0 -107
- package/node_modules/micromark-util-sanitize-uri/license +0 -22
- package/node_modules/micromark-util-sanitize-uri/package.json +0 -59
- package/node_modules/micromark-util-sanitize-uri/readme.md +0 -214
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +0 -12
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +0 -1
- package/node_modules/micromark-util-subtokenize/dev/index.js +0 -284
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +0 -161
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +0 -1
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +0 -288
- package/node_modules/micromark-util-subtokenize/index.d.ts +0 -12
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +0 -1
- package/node_modules/micromark-util-subtokenize/index.js +0 -228
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +0 -161
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +0 -1
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -251
- package/node_modules/micromark-util-subtokenize/license +0 -22
- package/node_modules/micromark-util-subtokenize/package.json +0 -60
- package/node_modules/micromark-util-subtokenize/readme.md +0 -181
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +0 -139
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +0 -1
- package/node_modules/micromark-util-symbol/lib/codes.js +0 -158
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +0 -37
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +0 -1
- package/node_modules/micromark-util-symbol/lib/constants.js +0 -44
- package/node_modules/micromark-util-symbol/lib/default.d.ts +0 -5
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +0 -1
- package/node_modules/micromark-util-symbol/lib/default.js +0 -4
- package/node_modules/micromark-util-symbol/lib/types.d.ts +0 -106
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +0 -1
- package/node_modules/micromark-util-symbol/lib/types.js +0 -453
- package/node_modules/micromark-util-symbol/lib/values.d.ts +0 -102
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +0 -1
- package/node_modules/micromark-util-symbol/lib/values.js +0 -109
- package/node_modules/micromark-util-symbol/license +0 -22
- package/node_modules/micromark-util-symbol/package.json +0 -43
- package/node_modules/micromark-util-symbol/readme.md +0 -168
- package/node_modules/micromark-util-types/index.d.ts +0 -1315
- package/node_modules/micromark-util-types/index.js +0 -2
- package/node_modules/micromark-util-types/license +0 -22
- package/node_modules/micromark-util-types/package.json +0 -37
- package/node_modules/micromark-util-types/readme.md +0 -151
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/unist-util-stringify-position/index.d.ts +0 -1
- package/node_modules/unist-util-stringify-position/index.js +0 -1
- package/node_modules/unist-util-stringify-position/lib/index.d.ts +0 -61
- package/node_modules/unist-util-stringify-position/lib/index.js +0 -84
- package/node_modules/unist-util-stringify-position/license +0 -22
- package/node_modules/unist-util-stringify-position/package.json +0 -80
- package/node_modules/unist-util-stringify-position/readme.md +0 -206
- package/packages/octo-runtime-extra-channel-gateway/config-schema.json +0 -458
- package/packages/octo-runtime-extra-channel-wecom/config-schema.json +0 -276
- package/packages/octo-runtime-extra-webui/config-schema.json +0 -134
- /package/node_modules/@mininglamp-oss/{octo-runtime-extra-channel-gateway/dist/contracts.js → octo-runtime-adapter-sdk/dist/execution-scope.js} +0 -0
- /package/node_modules/@mininglamp-oss/{octo-runtime-extra-channel-gateway/dist/ports.js → octo-runtime-protocol/dist/adapter-metadata.js} +0 -0
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.js
DELETED
|
@@ -1,646 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Octo 接入编排:直连 IM Server,完成身份准入、Context 读取、卡片与按钮回传。
|
|
3
|
-
* 此通道就是 IM 事件发起方;只处理 IM 归属,不合成文档评论或其他领域请求。
|
|
4
|
-
*/
|
|
5
|
-
import { CONTEXT_SCHEMA } from "@mininglamp-oss/octo-runtime-protocol";
|
|
6
|
-
import { interactionCard, interactionAnswer } from "./interaction-card.js";
|
|
7
|
-
import { imBotIdentity } from "../lifecycle/configuration.js";
|
|
8
|
-
import { verifyBotIdentity } from "./auth.js";
|
|
9
|
-
import { registerBot, WukongConnection } from "./wukong.js";
|
|
10
|
-
import { acceptsImMessage, groupScope, isRulesNotification, rulesChange } from "./normalize.js";
|
|
11
|
-
import { sessionCommand } from "./session-command.js";
|
|
12
|
-
import { build_im_contexts } from "./contexts.js";
|
|
13
|
-
import { OctoConnector, stableEffectKey } from "./connector.js";
|
|
14
|
-
import { CardSession } from "./card-session.js";
|
|
15
|
-
import { TypingController } from "../presentation/typing.js";
|
|
16
|
-
import { ImRunProjector } from "../presentation/run-projector.js";
|
|
17
|
-
import { buildReasoningFrame } from "./reasoning-frame.js";
|
|
18
|
-
import { ImDeliveryDispatcher } from "../delivery/dispatcher.js";
|
|
19
|
-
import { ImDeliveryScope } from "../delivery/identity.js";
|
|
20
|
-
import { fetchBotEvents, ackBotEvent } from "./api/events.js";
|
|
21
|
-
import { parseCardAction } from "./card-action.js";
|
|
22
|
-
import { setTimeout as delay } from "node:timers/promises";
|
|
23
|
-
import { octoCliEnvironment } from "../execution/tool-environment.js";
|
|
24
|
-
import { downloadImageInput } from "./image-input.js";
|
|
25
|
-
import { prepareFinalMention } from "./mentions.js";
|
|
26
|
-
import { getGroupMembers } from "./api/conversations.js";
|
|
27
|
-
import { getJson } from "./api/client.js";
|
|
28
|
-
import { connectionFailure, ImConnectionError } from "./connection-error.js";
|
|
29
|
-
import { sendReadReceipt } from "./api/messages.js";
|
|
30
|
-
import { ImSendError } from "../delivery/send-error.js";
|
|
31
|
-
import { assistantOutputFingerprint } from "../application/context-gap.js";
|
|
32
|
-
import { observesImScope } from "./normalize.js";
|
|
33
|
-
import { prepareArtifacts } from "../delivery/artifacts.js";
|
|
34
|
-
import { uploadChatAttachment } from "./api/files.js";
|
|
35
|
-
import { MessageIdentityCache } from "./message-identities.js";
|
|
36
|
-
/** Octo IM 平台连接器:WuKong 与 Octo REST 适配;不是 MCP 连接器。 */
|
|
37
|
-
export class GatewayTransport {
|
|
38
|
-
config;
|
|
39
|
-
credentials;
|
|
40
|
-
callbacks;
|
|
41
|
-
deliveryOwner;
|
|
42
|
-
identity;
|
|
43
|
-
botId;
|
|
44
|
-
#detachAbort;
|
|
45
|
-
#closing;
|
|
46
|
-
#connection;
|
|
47
|
-
#spaceId = "";
|
|
48
|
-
#token;
|
|
49
|
-
#deliveryScope = new ImDeliveryScope();
|
|
50
|
-
get scopedConfig() {
|
|
51
|
-
return { ...this.config, spaceId: this.#spaceId };
|
|
52
|
-
}
|
|
53
|
-
#connected = false;
|
|
54
|
-
#closed = true;
|
|
55
|
-
#abort = new AbortController();
|
|
56
|
-
#typing;
|
|
57
|
-
#api;
|
|
58
|
-
#delivery;
|
|
59
|
-
#polling;
|
|
60
|
-
#messageIdentityCache = new MessageIdentityCache();
|
|
61
|
-
#bindings = new Map();
|
|
62
|
-
constructor(config, credentials, callbacks,
|
|
63
|
-
// Bot 持有任务准备与 REST 投递的期限、凭据及身份,接收 WS 不拥有这些资源。
|
|
64
|
-
deliveryOwner) {
|
|
65
|
-
this.config = config;
|
|
66
|
-
this.credentials = credentials;
|
|
67
|
-
this.callbacks = callbacks;
|
|
68
|
-
this.deliveryOwner = deliveryOwner;
|
|
69
|
-
this.identity = imBotIdentity(config);
|
|
70
|
-
this.botId = config.bot_id;
|
|
71
|
-
}
|
|
72
|
-
get status() {
|
|
73
|
-
return {
|
|
74
|
-
connected: this.#connected,
|
|
75
|
-
cardDeliveries: (this.deliveryOwner?.dispatcher ?? this.#delivery)?.receiptCount ?? 0
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
async start(signal) {
|
|
79
|
-
this.#closed = false;
|
|
80
|
-
signal = AbortSignal.any([signal, this.#abort.signal]);
|
|
81
|
-
const token = (await this.credentials(this.config, signal))?.trim();
|
|
82
|
-
if (!token)
|
|
83
|
-
throw new Error("IM_CREDENTIALS_REQUIRED");
|
|
84
|
-
if (!/^bf_[A-Za-z0-9_-]+$/.test(token))
|
|
85
|
-
throw new Error("IM_BOT_TOKEN_INVALID");
|
|
86
|
-
const principal = await verifyBotIdentity(this.config.api_url, token, signal);
|
|
87
|
-
signal.throwIfAborted();
|
|
88
|
-
try {
|
|
89
|
-
if (principal.bot_uid !== this.config.bot_id)
|
|
90
|
-
throw new Error("IM_BOT_IDENTITY_MISMATCH");
|
|
91
|
-
this.callbacks.authorizeSpace?.(principal.space_id);
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
// REST 在核验期间继续使用旧凭据;明确拒绝目标后必须撤销旧任务权限。
|
|
95
|
-
// 只在明确身份/空间拒绝后撤销,网络失败、单纯换 token 和握手失败不走此分支。
|
|
96
|
-
this.deliveryOwner?.identity.revoke();
|
|
97
|
-
this.#deliveryScope.revoke();
|
|
98
|
-
throw error;
|
|
99
|
-
}
|
|
100
|
-
signal.throwIfAborted();
|
|
101
|
-
this.#token = token;
|
|
102
|
-
this.#spaceId = principal.space_id;
|
|
103
|
-
this.identity = `${imBotIdentity(this.config)}:${encodeURIComponent(this.#spaceId)}`;
|
|
104
|
-
// 必须在身份核验及空间准入成功后推进代次;连接失败/再次重连不能复活旧代次。
|
|
105
|
-
this.#deliveryScope = this.deliveryOwner?.identity.accept(this.identity) ?? this.#deliveryScope;
|
|
106
|
-
// 代次与凭据在同一同步段生效,不等待后续注册或 WS 握手。
|
|
107
|
-
this.deliveryOwner?.acceptToken?.(token);
|
|
108
|
-
const registration = await registerBot(this.config.api_url, token, signal);
|
|
109
|
-
const toolEnvironment = octoCliEnvironment(this.config.api_url, token);
|
|
110
|
-
if (signal.aborted)
|
|
111
|
-
return;
|
|
112
|
-
if (registration.robot_id !== this.config.bot_id) {
|
|
113
|
-
// 注册明确拒绝身份也属于授权撤销;网络/握手失败则保留已核验凭据和任务。
|
|
114
|
-
this.deliveryOwner?.identity.revoke();
|
|
115
|
-
this.#deliveryScope.revoke();
|
|
116
|
-
throw new Error("IM_BOT_IDENTITY_MISMATCH");
|
|
117
|
-
}
|
|
118
|
-
const connection = new WukongConnection((message) => {
|
|
119
|
-
if (this.#closed)
|
|
120
|
-
return;
|
|
121
|
-
// 服务端规则通知即使 @ 全部 Bot,也只失效上下文,不能进入任务/卡片路径。
|
|
122
|
-
if (isRulesNotification(message)) {
|
|
123
|
-
const change = rulesChange(message);
|
|
124
|
-
if (change &&
|
|
125
|
-
observesImScope(this.scopedConfig, message.channelId, message.channelType, message.payload.space_id))
|
|
126
|
-
this.callbacks.onRulesChanged?.(change);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (!acceptsImMessage(this.scopedConfig, message))
|
|
130
|
-
return;
|
|
131
|
-
let finalReply;
|
|
132
|
-
let finalOutputCovered = false;
|
|
133
|
-
const deliverySignal = AbortSignal.any([
|
|
134
|
-
this.deliveryOwner?.signal ?? signal,
|
|
135
|
-
this.#deliveryScope.signal
|
|
136
|
-
]);
|
|
137
|
-
// 任务的普通回复、final、进度及失败卡共用 REST 工厂和任务期限。
|
|
138
|
-
const restDelivery = (turnSignal = deliverySignal, obsolete) => new OctoConnector(this.config, token, AbortSignal.any([deliverySignal, turnSignal]), (requestSignal, send) => this.#dispatchRestDelivery(requestSignal, (authorized, botToken) => {
|
|
139
|
-
if (obsolete?.())
|
|
140
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
141
|
-
return send(authorized, botToken);
|
|
142
|
-
}));
|
|
143
|
-
const finalDispatcher = this.#delivery;
|
|
144
|
-
let historyTurn;
|
|
145
|
-
const outputObserver = (payload) => {
|
|
146
|
-
const turn = historyTurn;
|
|
147
|
-
if (!turn || !observesImScope(this.scopedConfig, message.channelId, message.channelType))
|
|
148
|
-
return undefined;
|
|
149
|
-
return (messageSeq) => {
|
|
150
|
-
if (deliverySignal.aborted)
|
|
151
|
-
return;
|
|
152
|
-
(this.callbacks.onTaskPosition ?? this.callbacks.onPosition)?.({
|
|
153
|
-
conversationId: message.channelId,
|
|
154
|
-
conversationKind: message.channelType === 5 ? "thread" : "group",
|
|
155
|
-
messageSeq,
|
|
156
|
-
own: true,
|
|
157
|
-
turn,
|
|
158
|
-
...(payload && turn.providerSessionId
|
|
159
|
-
? { outputFingerprint: assistantOutputFingerprint(payload) }
|
|
160
|
-
: {})
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
// 同一次在途 HTTP 共用 Promise;失败交回当前投递器,只有收尾拥有三次重试预算。
|
|
165
|
-
const sends = new Map();
|
|
166
|
-
const sendMessage = (payload, key, turnSignal, obsolete, observe) => {
|
|
167
|
-
turnSignal.throwIfAborted();
|
|
168
|
-
if (obsolete?.())
|
|
169
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
170
|
-
if (this.#deliveryScope.isConfirmed(key))
|
|
171
|
-
return Promise.resolve("");
|
|
172
|
-
const pending = sends.get(key);
|
|
173
|
-
if (pending)
|
|
174
|
-
return pending;
|
|
175
|
-
const sending = restDelivery(turnSignal, obsolete)
|
|
176
|
-
.message(message, payload, key, observe)
|
|
177
|
-
.then((id) => {
|
|
178
|
-
this.#deliveryScope.confirm(key);
|
|
179
|
-
sends.delete(key);
|
|
180
|
-
return id;
|
|
181
|
-
}, (error) => {
|
|
182
|
-
sends.delete(key);
|
|
183
|
-
throw error;
|
|
184
|
-
});
|
|
185
|
-
sends.set(key, sending);
|
|
186
|
-
return sending;
|
|
187
|
-
};
|
|
188
|
-
this.callbacks.onMessage({
|
|
189
|
-
messageId: message.messageId,
|
|
190
|
-
...(message.channelType === 2 || message.channelType === 5
|
|
191
|
-
? { sessionControl: sessionCommand(message, this.botId) }
|
|
192
|
-
: {}),
|
|
193
|
-
...(message.channelType === 2 || message.channelType === 5
|
|
194
|
-
? {
|
|
195
|
-
position: { messageSeq: message.messageSeq },
|
|
196
|
-
bindHistoryTurn: (turn) => {
|
|
197
|
-
historyTurn = structuredClone(turn);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
: {}),
|
|
201
|
-
markRead: (turnSignal) => sendReadReceipt({
|
|
202
|
-
apiUrl: this.config.api_url,
|
|
203
|
-
botToken: this.#taskToken(deliverySignal),
|
|
204
|
-
channelId: message.channelId,
|
|
205
|
-
channelType: message.channelType,
|
|
206
|
-
messageIds: [message.messageId],
|
|
207
|
-
signal: AbortSignal.any([deliverySignal, turnSignal])
|
|
208
|
-
}),
|
|
209
|
-
senderId: message.fromUid,
|
|
210
|
-
conversationId: message.channelId,
|
|
211
|
-
conversationKind: message.channelType === 1 ? "direct" : message.channelType === 5 ? "thread" : "group",
|
|
212
|
-
text: message.payload.type === 2
|
|
213
|
-
? ""
|
|
214
|
-
: message.payload.type === 11 || message.payload.type === 14
|
|
215
|
-
? `收到一条${message.payload.type === 14 ? "富文本" : "合并转发"}新消息;正文见本轮 extra.im/message-content。`
|
|
216
|
-
: message.payload.type === 8 || message.payload.type === 18
|
|
217
|
-
? typeof message.payload.content === "string" && message.payload.content.trim()
|
|
218
|
-
? message.payload.content
|
|
219
|
-
: "请根据本轮资源上下文处理此资源。"
|
|
220
|
-
: String(message.payload.content),
|
|
221
|
-
...(message.payload.type === 2
|
|
222
|
-
? {
|
|
223
|
-
buildInputs: (turnSignal) => downloadImageInput(message.payload.url, this.config.api_url, this.#taskToken(deliverySignal), AbortSignal.any([deliverySignal, turnSignal]))
|
|
224
|
-
}
|
|
225
|
-
: {}),
|
|
226
|
-
executionEnvironment: () => {
|
|
227
|
-
deliverySignal.throwIfAborted();
|
|
228
|
-
return { executionEnvOverrides: structuredClone(toolEnvironment) };
|
|
229
|
-
},
|
|
230
|
-
runMetadata: {
|
|
231
|
-
spaceId: this.#spaceId,
|
|
232
|
-
botId: this.config.bot_id,
|
|
233
|
-
channelType: message.channelType
|
|
234
|
-
},
|
|
235
|
-
replyFailure: async (event, effectKey, options) => {
|
|
236
|
-
const rest = restDelivery(options?.signal, options?.obsolete);
|
|
237
|
-
const template = await rest.reasoningTemplate();
|
|
238
|
-
if (!template)
|
|
239
|
-
return;
|
|
240
|
-
const projector = new ImRunProjector(`channel:${effectKey}`, message.channelType === 1);
|
|
241
|
-
projector.accept(event);
|
|
242
|
-
const frame = buildReasoningFrame(projector.snapshot(), template);
|
|
243
|
-
if (!frame)
|
|
244
|
-
throw Error("IM_CARD_BUDGET_EXCEEDED");
|
|
245
|
-
await rest.card(message, template, frame, stableEffectKey(this.identity, message, effectKey, "error"), undefined, 1, false);
|
|
246
|
-
},
|
|
247
|
-
reply: async (text, effectKey, options) => {
|
|
248
|
-
// 目标归属冻结在原消息,REST 使用 Bot 期限和持有凭据,不等待 WS 恢复。
|
|
249
|
-
const replySignal = options
|
|
250
|
-
? AbortSignal.any([deliverySignal, options.signal])
|
|
251
|
-
: deliverySignal;
|
|
252
|
-
if (options?.obsolete())
|
|
253
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
254
|
-
const key = stableEffectKey(this.identity, message, effectKey ?? message.messageId, "text");
|
|
255
|
-
await sendMessage({ type: 1, content: text }, key, replySignal, options?.obsolete, outputObserver());
|
|
256
|
-
},
|
|
257
|
-
replyFinal: async (text, effectKey, options) => {
|
|
258
|
-
const finalSignal = options
|
|
259
|
-
? AbortSignal.any([deliverySignal, options.signal])
|
|
260
|
-
: deliverySignal;
|
|
261
|
-
// 准备与投递共用任务身份,切网不取消;停止/换账号不能继续。
|
|
262
|
-
this.#taskToken(finalSignal);
|
|
263
|
-
if (options?.obsolete())
|
|
264
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
265
|
-
if (finalReply?.key !== effectKey)
|
|
266
|
-
finalReply = {
|
|
267
|
-
key: effectKey,
|
|
268
|
-
// 整个准备按 effect 缓存,发送重试不再次上传;链接变化必须先于 mention 偏移计算。
|
|
269
|
-
// 普通上传/成员查询故障在各准备函数内降级为正文;取消或身份撤销不能重建准备而复活。
|
|
270
|
-
value: (async () => {
|
|
271
|
-
const delivered = options
|
|
272
|
-
? await prepareArtifacts(text, options.artifacts, finalSignal, (bytes, name, mime, uploadSignal) => uploadChatAttachment(this.config.api_url, token, bytes, name, mime, uploadSignal, this.#dispatchRestDelivery))
|
|
273
|
-
: { text, files: [] };
|
|
274
|
-
const failures = [];
|
|
275
|
-
// 每张最终文件卡首发后最多重试三次;整段准备仅一次,文本重试不重开预算或上传。
|
|
276
|
-
for (const [index, file] of delivered.files.entries()) {
|
|
277
|
-
finalSignal.throwIfAborted();
|
|
278
|
-
if (options?.obsolete())
|
|
279
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
280
|
-
const key = stableEffectKey(this.identity, message, effectKey, `file:${index}`);
|
|
281
|
-
const receipt = await finalDispatcher.deliver(key, async () => {
|
|
282
|
-
return sendMessage({ type: 8, ...file }, key, finalSignal, () => Boolean(options?.obsolete()), outputObserver(delivered.incomplete ? undefined : { type: 8, ...file }));
|
|
283
|
-
}, {
|
|
284
|
-
attempts: 4,
|
|
285
|
-
obsolete: () => finalSignal.aborted || Boolean(options?.obsolete())
|
|
286
|
-
});
|
|
287
|
-
if (receipt.state !== "delivered")
|
|
288
|
-
failures.push(`${file.name.replace(/[\r\n\x60[\]<>]/g, "_").slice(0, 120)} (${receipt.state}: ${receipt.code ?? "IM_DELIVERY_UNKNOWN"})`);
|
|
289
|
-
}
|
|
290
|
-
const finalText = delivered.text +
|
|
291
|
-
(failures.length
|
|
292
|
-
? `\n\nFile card delivery unconfirmed: ${failures.join("; ")}. The attachment download links above remain available; generation was not rerun.`
|
|
293
|
-
: "");
|
|
294
|
-
// 新增失败事实不在先前 assistant 中,不能因它由本机发送而过滤。
|
|
295
|
-
finalOutputCovered = !delivered.incomplete && failures.length === 0;
|
|
296
|
-
finalSignal.throwIfAborted();
|
|
297
|
-
return prepareFinalMention(finalText, async () => {
|
|
298
|
-
if ([2, 5].includes(message.channelType))
|
|
299
|
-
return getGroupMembers({
|
|
300
|
-
apiUrl: this.config.api_url,
|
|
301
|
-
botToken: token,
|
|
302
|
-
groupNo: groupScope(message.channelId).groupNo,
|
|
303
|
-
dispatchRequest: this.#dispatchRestDelivery,
|
|
304
|
-
signal: finalSignal
|
|
305
|
-
});
|
|
306
|
-
const peer = await getJson(this.config.api_url, token, `/v1/bot/user/info?uid=${encodeURIComponent(message.fromUid)}`, AbortSignal.any([finalSignal, AbortSignal.timeout(5000)]), {
|
|
307
|
-
maxResponseBytes: 64 << 10,
|
|
308
|
-
logRateLimit: false,
|
|
309
|
-
dispatchRequest: this.#dispatchRestDelivery
|
|
310
|
-
});
|
|
311
|
-
return peer?.uid === message.fromUid ? [peer] : [];
|
|
312
|
-
});
|
|
313
|
-
})()
|
|
314
|
-
};
|
|
315
|
-
const result = await finalReply.value;
|
|
316
|
-
if (options?.obsolete())
|
|
317
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
318
|
-
await sendMessage({
|
|
319
|
-
type: 1,
|
|
320
|
-
content: result.text,
|
|
321
|
-
...(result.mention ? { mention: result.mention } : {})
|
|
322
|
-
}, stableEffectKey(this.identity, message, effectKey, "text"), finalSignal, () => Boolean(options?.obsolete()), outputObserver(finalOutputCovered
|
|
323
|
-
? {
|
|
324
|
-
type: 1,
|
|
325
|
-
content: result.text,
|
|
326
|
-
...(result.mention ? { mention: result.mention } : {})
|
|
327
|
-
}
|
|
328
|
-
: undefined));
|
|
329
|
-
},
|
|
330
|
-
buildContext: async (turnSignal, options) => ({
|
|
331
|
-
schema: CONTEXT_SCHEMA,
|
|
332
|
-
items: await build_im_contexts(this.scopedConfig, message, this.#taskToken(deliverySignal), AbortSignal.any([deliverySignal, turnSignal]), {
|
|
333
|
-
...options,
|
|
334
|
-
initialSession: options?.initialSession ?? false,
|
|
335
|
-
identityCache: this.#messageIdentityCache
|
|
336
|
-
})
|
|
337
|
-
}),
|
|
338
|
-
beginPresentation: (runId, onDiagnostic, controls) => {
|
|
339
|
-
// 卡片是 REST,不以 WS 存活为前提。保留同一 CardSession 的消息 ID/序号,
|
|
340
|
-
// 仅 Bot 停止取消其请求;重连不将旧连接 signal 传入客户端或投递器。
|
|
341
|
-
const progressApi = restDelivery();
|
|
342
|
-
const interactions = new Map();
|
|
343
|
-
const resolveInteraction = async (id, status) => {
|
|
344
|
-
const entry = interactions.get(id);
|
|
345
|
-
if (!entry)
|
|
346
|
-
return;
|
|
347
|
-
const messageId = await progressApi.interactionCard(message, interactionCard(entry.request, status), stableEffectKey(this.identity, message, id, "interaction"), entry.messageId);
|
|
348
|
-
// 能力不可用会返回 undefined;已显示卡片只有确认编辑成功后才能移除。
|
|
349
|
-
if (messageId !== entry.messageId)
|
|
350
|
-
throw new Error("IM_INTERACTION_CARD_FINALIZATION_UNCONFIRMED");
|
|
351
|
-
interactions.delete(id);
|
|
352
|
-
};
|
|
353
|
-
const stopTyping = this.config.typing === false ? () => { } : this.#typing.acquire(message, runId);
|
|
354
|
-
const card = new CardSession(progressApi, finalDispatcher, message, runId, stopTyping, onDiagnostic);
|
|
355
|
-
this.#bindings.set(runId, {
|
|
356
|
-
card,
|
|
357
|
-
address: message,
|
|
358
|
-
senderId: message.fromUid,
|
|
359
|
-
controls,
|
|
360
|
-
expires: Date.now() + 86_400_000 + 30 * 60_000,
|
|
361
|
-
active: true,
|
|
362
|
-
turn: historyTurn,
|
|
363
|
-
interactions,
|
|
364
|
-
resolveInteraction
|
|
365
|
-
});
|
|
366
|
-
if (this.#bindings.size > 128) {
|
|
367
|
-
const idle = [...this.#bindings].find(([, binding]) => !binding.active);
|
|
368
|
-
if (idle)
|
|
369
|
-
this.#bindings.delete(idle[0]);
|
|
370
|
-
}
|
|
371
|
-
if (!this.#polling)
|
|
372
|
-
this.#polling = this.#pollActions(token, signal);
|
|
373
|
-
return {
|
|
374
|
-
interaction: async (request) => {
|
|
375
|
-
// 旧按钮轮询不迁移;已失去绑定的连接不再创建无法响应的新交互。
|
|
376
|
-
// 已开始的发卡及已存在卡片的收尾则继续使用任务 REST 期限。
|
|
377
|
-
if (this.#closed || signal.aborted)
|
|
378
|
-
return false;
|
|
379
|
-
const document = interactionCard(request);
|
|
380
|
-
const effect = stableEffectKey(this.identity, message, request.interactionId, "interaction");
|
|
381
|
-
let messageId;
|
|
382
|
-
const receipt = await this.#delivery.deliver(effect, async () => {
|
|
383
|
-
messageId = await progressApi.interactionCard(message, document, effect);
|
|
384
|
-
if (!messageId)
|
|
385
|
-
throw Error("IM_INTERACTION_CARD_UNAVAILABLE");
|
|
386
|
-
return messageId;
|
|
387
|
-
});
|
|
388
|
-
if (receipt.state !== "delivered" || !receipt.messageId)
|
|
389
|
-
return false;
|
|
390
|
-
interactions.set(request.interactionId, {
|
|
391
|
-
request: structuredClone(request),
|
|
392
|
-
messageId: receipt.messageId
|
|
393
|
-
});
|
|
394
|
-
// REST 发卡期间 WS 可能已退出并清除按钮绑定。保留回执用于收尾,
|
|
395
|
-
// 但仅仍可处理按钮的原绑定算可用,否则由 Runtime 发送文字交互命令。
|
|
396
|
-
const binding = this.#bindings.get(runId);
|
|
397
|
-
return (!this.#closed &&
|
|
398
|
-
!signal.aborted &&
|
|
399
|
-
binding?.active === true &&
|
|
400
|
-
binding.interactions === interactions);
|
|
401
|
-
},
|
|
402
|
-
resolveInteraction,
|
|
403
|
-
update: (snapshot) => card.update(snapshot),
|
|
404
|
-
finish: async () => {
|
|
405
|
-
const errors = [];
|
|
406
|
-
try {
|
|
407
|
-
for (const id of interactions.keys()) {
|
|
408
|
-
try {
|
|
409
|
-
await resolveInteraction(id, "invalidated");
|
|
410
|
-
}
|
|
411
|
-
catch (error) {
|
|
412
|
-
errors.push(error);
|
|
413
|
-
onDiagnostic("IM_INTERACTION_CARD_FAILED");
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
try {
|
|
417
|
-
await card.finish();
|
|
418
|
-
}
|
|
419
|
-
catch (error) {
|
|
420
|
-
errors.push(error);
|
|
421
|
-
}
|
|
422
|
-
if (errors.length)
|
|
423
|
-
throw new AggregateError(errors, "IM_PRESENTATION_FAILED");
|
|
424
|
-
}
|
|
425
|
-
finally {
|
|
426
|
-
// 仅保留按钮所需的轻量关联,避免卡片回调继续引用本轮投影上下文。
|
|
427
|
-
card.release();
|
|
428
|
-
const binding = this.#bindings.get(runId);
|
|
429
|
-
if (binding) {
|
|
430
|
-
binding.active = false;
|
|
431
|
-
binding.expires = Date.now() + 30 * 60_000;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
}, (error) => {
|
|
439
|
-
this.#connected = false;
|
|
440
|
-
const failure = connectionFailure(error);
|
|
441
|
-
this.callbacks.onDisconnect(failure.message, failure.retryable);
|
|
442
|
-
}, (position) => {
|
|
443
|
-
if (this.#closed ||
|
|
444
|
-
signal.aborted ||
|
|
445
|
-
!observesImScope(this.scopedConfig, position.channelId, position.channelType, position.spaceId))
|
|
446
|
-
return;
|
|
447
|
-
const own = position.fromUid === this.config.bot_id;
|
|
448
|
-
const binding = own
|
|
449
|
-
? [...this.#bindings.values()].find((candidate) => candidate.address.channelId === position.channelId &&
|
|
450
|
-
candidate.address.channelType === position.channelType &&
|
|
451
|
-
(candidate.card.effectKey === position.clientMsgNo ||
|
|
452
|
-
candidate.card.messageId === position.messageId ||
|
|
453
|
-
[...candidate.interactions.values()].some((entry) => entry.messageId === position.messageId)))
|
|
454
|
-
: undefined;
|
|
455
|
-
this.callbacks.onPosition?.({
|
|
456
|
-
conversationId: position.channelId,
|
|
457
|
-
conversationKind: position.channelType === 5 ? "thread" : "group",
|
|
458
|
-
messageSeq: position.messageSeq,
|
|
459
|
-
own,
|
|
460
|
-
...(binding?.turn ? { turn: binding.turn } : {})
|
|
461
|
-
});
|
|
462
|
-
});
|
|
463
|
-
this.#connection = connection;
|
|
464
|
-
this.#api = new OctoConnector(this.config, token, signal);
|
|
465
|
-
this.#delivery = this.deliveryOwner?.dispatcher ?? new ImDeliveryDispatcher(signal);
|
|
466
|
-
this.#typing = new TypingController((address, typingSignal) => this.#api.typing(address, typingSignal), () => this.callbacks.onDiagnostic?.("IM_TYPING_FAILED"));
|
|
467
|
-
const abort = () => {
|
|
468
|
-
void connection.close();
|
|
469
|
-
};
|
|
470
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
471
|
-
this.#detachAbort = () => signal.removeEventListener("abort", abort);
|
|
472
|
-
if (signal.aborted)
|
|
473
|
-
return;
|
|
474
|
-
await connection.connect(registration);
|
|
475
|
-
if (signal.aborted) {
|
|
476
|
-
await connection.close();
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
479
|
-
if (!connection.connected)
|
|
480
|
-
throw new ImConnectionError("IM_DISCONNECTED", true);
|
|
481
|
-
this.#connected = true;
|
|
482
|
-
}
|
|
483
|
-
/** REST 消费 Bot 已持有的凭据;WS 清理/鉴权/握手均不影响其准入。 */
|
|
484
|
-
#dispatchRestDelivery = async (signal, send) => {
|
|
485
|
-
const requestSignal = AbortSignal.any([
|
|
486
|
-
signal,
|
|
487
|
-
this.#deliveryScope.signal,
|
|
488
|
-
...(this.deliveryOwner ? [this.deliveryOwner.signal] : [])
|
|
489
|
-
]);
|
|
490
|
-
try {
|
|
491
|
-
const token = this.#taskToken(requestSignal);
|
|
492
|
-
// 只读取已注入的值,不触发宿主获取/刷新;检查、替换头与 fetch 同步完成。
|
|
493
|
-
return send(requestSignal, token);
|
|
494
|
-
}
|
|
495
|
-
catch (error) {
|
|
496
|
-
this.#deliveryScope.signal.throwIfAborted();
|
|
497
|
-
if (signal.aborted || this.deliveryOwner?.signal.aborted)
|
|
498
|
-
throw new ImSendError("IM_DELIVERY_CANCELLED", "failed");
|
|
499
|
-
throw error;
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
/** 同步读取 Bot 已持有凭据并核验原任务归属;不检查或等待任何 WS 状态。 */
|
|
503
|
-
#taskToken(signal) {
|
|
504
|
-
signal.throwIfAborted();
|
|
505
|
-
this.#deliveryScope.signal.throwIfAborted();
|
|
506
|
-
this.deliveryOwner?.signal.throwIfAborted();
|
|
507
|
-
const owner = this.deliveryOwner;
|
|
508
|
-
// 身份撤销由 Bot 持有的 deliveryScope 保证,不读取当前 WS 或连接代次。
|
|
509
|
-
const token = owner?.token ? owner.token()?.trim() : this.#token;
|
|
510
|
-
if (!token)
|
|
511
|
-
throw new ImSendError("IM_CREDENTIALS_REQUIRED", "failed");
|
|
512
|
-
if (!/^bf_[A-Za-z0-9_-]+$/.test(token))
|
|
513
|
-
throw new ImSendError("IM_BOT_TOKEN_INVALID", "failed");
|
|
514
|
-
return token;
|
|
515
|
-
}
|
|
516
|
-
async #pollActions(token, signal) {
|
|
517
|
-
if (this.config.cards === false)
|
|
518
|
-
return;
|
|
519
|
-
let cursor = 0, failures = 0;
|
|
520
|
-
const handled = new Set();
|
|
521
|
-
while (!signal.aborted && !this.#closed) {
|
|
522
|
-
const started = Date.now();
|
|
523
|
-
try {
|
|
524
|
-
const events = await fetchBotEvents({
|
|
525
|
-
apiUrl: this.config.api_url,
|
|
526
|
-
botToken: token,
|
|
527
|
-
sinceEventId: cursor,
|
|
528
|
-
limit: 100,
|
|
529
|
-
waitSeconds: 30,
|
|
530
|
-
signal: AbortSignal.any([signal, AbortSignal.timeout(40_000)])
|
|
531
|
-
});
|
|
532
|
-
for (const event of events.sort((a, b) => a.event_id - b.event_id)) {
|
|
533
|
-
if (signal.aborted)
|
|
534
|
-
return;
|
|
535
|
-
if (!Number.isSafeInteger(event.event_id) || event.event_id <= cursor)
|
|
536
|
-
continue;
|
|
537
|
-
// cursor 仅记录本地读取位置;不认识的领域事件不 ACK,也不转换成 IM 请求。
|
|
538
|
-
const action = parseCardAction(event);
|
|
539
|
-
if (!action) {
|
|
540
|
-
cursor = event.event_id;
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
if (action.spaceId !== this.#spaceId ||
|
|
544
|
-
(this.config.allowed_sender_ids &&
|
|
545
|
-
!this.config.allowed_sender_ids.includes(action.operatorUid))) {
|
|
546
|
-
cursor = event.event_id;
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
let consumed = handled.has(event.event_id);
|
|
550
|
-
for (const [id, binding] of this.#bindings) {
|
|
551
|
-
if (consumed)
|
|
552
|
-
break;
|
|
553
|
-
if (binding.expires <= Date.now()) {
|
|
554
|
-
this.#bindings.delete(id);
|
|
555
|
-
continue;
|
|
556
|
-
}
|
|
557
|
-
const sameAddress = binding.address.channelId === action.channelId ||
|
|
558
|
-
(Number(action.channelType) === 1 &&
|
|
559
|
-
binding.address.channelId === `s${this.#spaceId}_${action.channelId}`);
|
|
560
|
-
// 操作者、空间、原消息和地址均匹配才允许控制 Run,不信任表单中的归属声明。
|
|
561
|
-
const interaction = [...binding.interactions.values()].find((entry) => entry.messageId === action.messageId);
|
|
562
|
-
if ((binding.card.messageId !== action.messageId && !interaction) ||
|
|
563
|
-
binding.address.channelType !== Number(action.channelType) ||
|
|
564
|
-
binding.senderId !== action.operatorUid ||
|
|
565
|
-
!sameAddress)
|
|
566
|
-
continue;
|
|
567
|
-
if (interaction && action.actionId.startsWith("interaction_")) {
|
|
568
|
-
if (!binding.active || !binding.controls.respond)
|
|
569
|
-
continue;
|
|
570
|
-
await binding.controls.respond(interactionAnswer(interaction.request, action));
|
|
571
|
-
try {
|
|
572
|
-
await binding.resolveInteraction(interaction.request.interactionId, "resolved");
|
|
573
|
-
}
|
|
574
|
-
catch {
|
|
575
|
-
this.callbacks.onDiagnostic?.("IM_INTERACTION_CARD_FAILED");
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
else if (!interaction && action.actionId === "reasoning_stop")
|
|
579
|
-
await binding.controls.cancel();
|
|
580
|
-
else if (!interaction && action.actionId === "reasoning_retry")
|
|
581
|
-
binding.controls.retry(action.operatorUid, `card_action:${event.event_id}`);
|
|
582
|
-
else
|
|
583
|
-
continue;
|
|
584
|
-
consumed = true;
|
|
585
|
-
handled.add(event.event_id);
|
|
586
|
-
break;
|
|
587
|
-
}
|
|
588
|
-
if (consumed) {
|
|
589
|
-
await ackBotEvent({
|
|
590
|
-
apiUrl: this.config.api_url,
|
|
591
|
-
botToken: token,
|
|
592
|
-
eventId: event.event_id,
|
|
593
|
-
signal: AbortSignal.any([signal, AbortSignal.timeout(10_000)])
|
|
594
|
-
});
|
|
595
|
-
handled.delete(event.event_id);
|
|
596
|
-
}
|
|
597
|
-
cursor = event.event_id;
|
|
598
|
-
for (const id of handled)
|
|
599
|
-
if (id <= cursor)
|
|
600
|
-
handled.delete(id);
|
|
601
|
-
}
|
|
602
|
-
failures = 0;
|
|
603
|
-
if (Date.now() - started < 1000)
|
|
604
|
-
await delay(2_000, undefined, { signal });
|
|
605
|
-
}
|
|
606
|
-
catch {
|
|
607
|
-
if (signal.aborted)
|
|
608
|
-
return;
|
|
609
|
-
this.callbacks.onDiagnostic?.("IM_CARD_ACTION_POLL_FAILED");
|
|
610
|
-
try {
|
|
611
|
-
await delay(Math.min(30_000, 2_000 * 2 ** failures++), undefined, { signal });
|
|
612
|
-
}
|
|
613
|
-
catch {
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
close() {
|
|
620
|
-
if (this.#closing)
|
|
621
|
-
return this.#closing;
|
|
622
|
-
this.#closed = true;
|
|
623
|
-
this.#connected = false;
|
|
624
|
-
this.#abort.abort();
|
|
625
|
-
this.#detachAbort?.();
|
|
626
|
-
this.#closing = Promise.resolve().then(async () => {
|
|
627
|
-
const results = await Promise.allSettled([
|
|
628
|
-
Promise.resolve().then(() => this.#typing?.close()),
|
|
629
|
-
Promise.resolve().then(() => this.#connection?.close()),
|
|
630
|
-
this.#polling
|
|
631
|
-
]);
|
|
632
|
-
const errors = results
|
|
633
|
-
.filter((result) => result.status === "rejected")
|
|
634
|
-
.map((result) => result.reason);
|
|
635
|
-
// WS 重连只移除按钮关联;仍在运行的 REST 卡片由任务 finish 负责释放。
|
|
636
|
-
// 没有 Bot 所有者、Bot 已停止或任务已结束时,保留连接清理的兜底回收。
|
|
637
|
-
for (const binding of this.#bindings.values())
|
|
638
|
-
if (!binding.active || !this.deliveryOwner || this.deliveryOwner.signal.aborted)
|
|
639
|
-
binding.card.release();
|
|
640
|
-
this.#bindings.clear();
|
|
641
|
-
if (errors.length)
|
|
642
|
-
throw new AggregateError(errors, "IM_TRANSPORT_DISPOSE_FAILED");
|
|
643
|
-
});
|
|
644
|
-
return this.#closing;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** 只携带连接协议事实;恢复策略由 Bot 编排决定,不保留响应正文或凭据。 */
|
|
2
|
-
export declare class ImConnectionError extends Error {
|
|
3
|
-
readonly retryable: boolean;
|
|
4
|
-
readonly retryAfterMs: number;
|
|
5
|
-
constructor(code: string, retryable: boolean, retryAfterMs?: number);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* 保留 WuKong 原因码,区分连接中断与明确拒绝;不把服务端主动断开等同于凭据失效。
|
|
9
|
-
* DISCONNECT 与失败 CONNACK 均默认允许重新鉴权建联,覆盖滚动更新、节点迁移和新增码。
|
|
10
|
-
* 只有机器可读的明确认证、权限或协议拒绝才永久失败,不由原因文案猜测所有权。
|
|
11
|
-
*/
|
|
12
|
-
export declare function wukongConnectionFailure(phase: "CONNECT_REJECTED" | "SERVER_DISCONNECTED", reason: number): ImConnectionError;
|
|
13
|
-
/** 将连接依赖的异常归一为脱敏恢复事实;显式分类优先,调用方据此安排回收后的重试。 */
|
|
14
|
-
export declare function connectionFailure(error: unknown): ImConnectionError;
|
|
15
|
-
export declare function connectionFetch(url: string, init: RequestInit, phase: "AUTH" | "REGISTER"): Promise<Response>;
|
|
16
|
-
export declare function httpConnectionFailure(response: Response, phase: "AUTH" | "REGISTER"): Promise<ImConnectionError>;
|
|
17
|
-
export declare function connectionJson(response: Response, phase: "AUTH" | "REGISTER", invalidCode: string): Promise<unknown>;
|