@mininglamp-oss/octo-runtime 1.1.11 → 1.1.13
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.d.ts +19 -1
- package/apps/cli/dist/adapters.js +153 -27
- package/apps/cli/dist/build-info.json +2 -2
- package/apps/cli/dist/codex.d.ts +5 -0
- package/apps/cli/dist/codex.js +36 -0
- package/apps/cli/dist/command-tree.d.ts +1 -13
- package/apps/cli/dist/command-tree.js +130 -316
- 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/kernel.d.ts +4 -0
- package/apps/cli/dist/kernel.js +84 -0
- package/apps/cli/dist/logs.d.ts +2 -2
- package/apps/cli/dist/logs.js +14 -17
- package/apps/cli/dist/main.js +63 -180
- package/apps/cli/dist/manifest.json +33 -72
- package/apps/cli/dist/module-manifest.d.ts +1 -1
- package/apps/cli/dist/module-manifest.js +2 -3
- package/apps/cli/dist/openclaw.d.ts +0 -8
- package/apps/cli/dist/openclaw.js +2 -114
- package/apps/cli/dist/output.d.ts +1 -0
- package/apps/cli/dist/output.js +16 -23
- package/apps/cli/dist/playboard.js +32 -15
- package/apps/cli/dist/provider-launch.d.ts +28 -0
- package/apps/cli/dist/provider-launch.js +52 -0
- package/apps/cli/dist/providers.d.ts +182 -0
- package/apps/cli/dist/providers.js +34 -0
- package/apps/cli/dist/service-control.js +0 -1
- package/dist/public/adapter-sdk.d.ts +2 -0
- package/dist/public/adapter-sdk.js +2 -0
- package/dist/public/host.d.ts +2 -4
- package/dist/public/host.js +1 -1
- package/dist/public/protocol.d.ts +1 -1
- package/dist/public/protocol.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/dist/index.js +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.d.ts +15 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +24 -28
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.d.ts +10 -35
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.js +22 -29
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.d.ts +14 -68
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.js +60 -43
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.d.ts +19 -31
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.js +29 -18
- 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 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.js +42 -35
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.d.ts +54 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.js +147 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/environment.js +4 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +20 -92
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.js +104 -216
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.js +4 -11
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.d.ts +9 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.js +77 -81
- 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.d.ts +4 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +15 -17
- 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/dist/adapter.d.ts +14 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.js +23 -30
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/client.js +4 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.d.ts +13 -21
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.js +48 -26
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.d.ts +16 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.js +15 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.d.ts +16 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.js +14 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.d.ts +16 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.js +15 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.d.ts +7 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +27 -29
- 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 +16 -25
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +109 -178
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.d.ts +16 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.js +15 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +16 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.js +15 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/activity.d.ts +5 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.d.ts +49 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.js +256 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/approval.js +7 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/environment.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/execution-scope.d.ts +5 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +26 -13
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +117 -59
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/mcp.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/process-launch.d.ts +11 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.js +89 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.d.ts +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.js +25 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/public-display.js +10 -3
- 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.d.ts +19 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.js +153 -27
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.js +36 -0
- 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 -316
- 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/kernel.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/kernel.js +84 -0
- 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 +63 -180
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/manifest.json +33 -72
- 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 +2 -3
- 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 +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +16 -23
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +32 -15
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.d.ts +28 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.js +52 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.d.ts +182 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.js +34 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/service-control.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +20 -23
- package/node_modules/@mininglamp-oss/octo-runtime-client/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/async-question-reply.d.ts +2 -3
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/async-question-reply.js +31 -20
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.js +80 -50
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/index.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/invocation-lifecycle.js +17 -2
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/startup-catalog.js +3 -15
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/submission-error.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/submission-error.js +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/types.d.ts +19 -4
- package/node_modules/@mininglamp-oss/octo-runtime-client/{schema → fixtures}/kernel-ipc-fixtures.json +28 -6
- package/node_modules/@mininglamp-oss/octo-runtime-client/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-ipc.schema.json +3 -104
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/protocol.schema.json +316 -1250
- 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 +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +28 -57
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +13 -78
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.d.ts +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +18 -18
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/index.d.ts +1 -7
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/index.js +0 -5
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -18
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.d.ts +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.js +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.js +3 -5
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-configuration.js +1 -8
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.d.ts +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +3 -267
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +17 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +104 -373
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.js +32 -1
- 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 +6 -15
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +33 -178
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +23 -36
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +54 -45
- 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 +9 -17
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.js +5 -28
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.js +2 -1
- 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 +37 -148
- package/packages/octo-runtime-protocol/schema/kernel-ipc.schema.json +3 -104
- package/packages/octo-runtime-protocol/schema/protocol.schema.json +316 -1250
- package/packages/octo-runtime-protocol/{schema → test/fixtures}/kernel-ipc-fixtures.json +28 -6
- 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 -82
- 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/codex.d.ts +0 -1
- package/dist/public/codex.js +0 -1
- package/dist/public/dsh.d.ts +0 -2
- package/dist/public/dsh.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 -82
- 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-client/schema/context-configuration-fixtures.json +0 -1219
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-fixtures.json +0 -5988
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-client.behavior.json +0 -56
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/native-invoke-fixtures.json +0 -116
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/run-protocol-fixtures.json +0 -761
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/runtime-selection-fixtures.json +0 -663
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/session-name-fixtures.json +0 -191
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.js +0 -89
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.d.ts +0 -33
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.js +0 -93
- 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/contracts.js +0 -1
- 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/ports.js +0 -1
- 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/execution.d.ts +0 -44
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/execution.js +0 -207
- 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 -154
- 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 -45
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extra-service.js +0 -417
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extras.d.ts +0 -62
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/extras.js +0 -389
- 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/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.js +0 -80
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.js +0 -9
- 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
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/** WeCom 插件内部的 Bot 配置合同。 */
|
|
2
|
-
import { createHash } from "node:crypto";
|
|
3
|
-
import { isAbsolute } from "node:path";
|
|
4
|
-
import { assertApprovalMode, assertContextEnvelope } from "@mininglamp-oss/octo-runtime-protocol";
|
|
5
|
-
export function validateImBots(value) {
|
|
6
|
-
if (!Array.isArray(value) || value.length > 16)
|
|
7
|
-
throw new Error("IM_CONFIG_LIST_REQUIRED");
|
|
8
|
-
const identities = new Set();
|
|
9
|
-
for (const bot of value) {
|
|
10
|
-
validateImConfig(bot);
|
|
11
|
-
const identity = imBotIdentity(bot);
|
|
12
|
-
if (identities.has(identity))
|
|
13
|
-
throw new Error("IM_BOT_DUPLICATED");
|
|
14
|
-
identities.add(identity);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export function configuredCredential(config) {
|
|
18
|
-
return config.app_secret?.trim() || undefined;
|
|
19
|
-
}
|
|
20
|
-
export function validateImConfig(config) {
|
|
21
|
-
if (!config || typeof config !== "object" || Array.isArray(config))
|
|
22
|
-
throw new Error("IM_CONFIG_INVALID");
|
|
23
|
-
if (typeof config.bot_id !== "string" || !config.bot_id.trim())
|
|
24
|
-
throw new Error("IM_BOT_ID_REQUIRED");
|
|
25
|
-
if (config.bot_name !== undefined &&
|
|
26
|
-
(typeof config.bot_name !== "string" || !config.bot_name.trim()))
|
|
27
|
-
throw new Error("IM_BOT_NAME_INVALID");
|
|
28
|
-
const adapter = config.adapter;
|
|
29
|
-
if (!adapter || typeof adapter !== "object" || Array.isArray(adapter))
|
|
30
|
-
throw new Error("IM_ADAPTER_REQUIRED");
|
|
31
|
-
if (Object.keys(adapter).some((key) => !["adapter_type", "workdir", "model", "effort", "provider_agent_id"].includes(key)))
|
|
32
|
-
throw new Error("IM_ADAPTER_UNKNOWN_FIELD");
|
|
33
|
-
for (const value of [
|
|
34
|
-
adapter.adapter_type,
|
|
35
|
-
adapter.model,
|
|
36
|
-
adapter.effort,
|
|
37
|
-
adapter.provider_agent_id
|
|
38
|
-
])
|
|
39
|
-
if (value !== undefined && (typeof value !== "string" || !value.trim()))
|
|
40
|
-
throw new Error("IM_EXECUTION_CONFIG_INVALID");
|
|
41
|
-
if (adapter.adapter_type === "openclaw") {
|
|
42
|
-
if (adapter.workdir !== undefined)
|
|
43
|
-
throw new Error("IM_OPENCLAW_WORKDIR_UNSUPPORTED");
|
|
44
|
-
if (adapter.provider_agent_id !== undefined &&
|
|
45
|
-
!/^[a-z0-9_][a-z0-9_-]{0,63}$/.test(adapter.provider_agent_id))
|
|
46
|
-
throw new Error("IM_PROVIDER_AGENT_ID_INVALID");
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
if (typeof adapter.workdir !== "string" || !isAbsolute(adapter.workdir))
|
|
50
|
-
throw new Error("IM_WORKDIR_ABSOLUTE_REQUIRED");
|
|
51
|
-
if (adapter.provider_agent_id !== undefined)
|
|
52
|
-
throw new Error("IM_PROVIDER_AGENT_ID_UNSUPPORTED");
|
|
53
|
-
}
|
|
54
|
-
if (config.context !== undefined)
|
|
55
|
-
assertContextEnvelope(config.context);
|
|
56
|
-
assertApprovalMode(config.approval_mode ?? "full_access");
|
|
57
|
-
if (config.allowed_sender_ids !== undefined &&
|
|
58
|
-
(!Array.isArray(config.allowed_sender_ids) ||
|
|
59
|
-
config.allowed_sender_ids.some((id) => typeof id !== "string" || !id)))
|
|
60
|
-
throw new Error("IM_CONFIG_INVALID");
|
|
61
|
-
if (config.run_timeout_ms !== undefined &&
|
|
62
|
-
(!Number.isInteger(config.run_timeout_ms) ||
|
|
63
|
-
config.run_timeout_ms < 1 ||
|
|
64
|
-
config.run_timeout_ms > 600_000))
|
|
65
|
-
throw new Error("IM_CONFIG_INVALID");
|
|
66
|
-
if (config.enabled !== undefined && typeof config.enabled !== "boolean")
|
|
67
|
-
throw new Error("IM_CONFIG_INVALID");
|
|
68
|
-
const fields = [
|
|
69
|
-
"bot_id",
|
|
70
|
-
"bot_name",
|
|
71
|
-
"enabled",
|
|
72
|
-
"adapter",
|
|
73
|
-
"context",
|
|
74
|
-
"approval_mode",
|
|
75
|
-
"run_timeout_ms",
|
|
76
|
-
"allowed_sender_ids"
|
|
77
|
-
];
|
|
78
|
-
fields.push("app_secret", "ws_url");
|
|
79
|
-
validateUrl(config.ws_url ?? "wss://openws.work.weixin.qq.com", "wss:", "ws:");
|
|
80
|
-
if (config.app_secret !== undefined && typeof config.app_secret !== "string")
|
|
81
|
-
throw new Error("IM_CREDENTIAL_INVALID");
|
|
82
|
-
if (Object.keys(config).some((key) => !fields.includes(key)))
|
|
83
|
-
throw new Error("IM_CONFIG_UNKNOWN_FIELD");
|
|
84
|
-
}
|
|
85
|
-
/** Stable local lookup key, not a caller-supplied identity or authorization token. */
|
|
86
|
-
export function imBotIdentity(config) {
|
|
87
|
-
const identity = [
|
|
88
|
-
"wecom",
|
|
89
|
-
new URL(config.ws_url ?? "wss://openws.work.weixin.qq.com").href,
|
|
90
|
-
config.bot_id
|
|
91
|
-
];
|
|
92
|
-
return createHash("sha256").update(JSON.stringify(identity)).digest("hex");
|
|
93
|
-
}
|
|
94
|
-
function validateUrl(value, secure, local) {
|
|
95
|
-
let url;
|
|
96
|
-
try {
|
|
97
|
-
url = new URL(value);
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
throw new Error("IM_API_URL_INVALID");
|
|
101
|
-
}
|
|
102
|
-
if (url.username ||
|
|
103
|
-
url.password ||
|
|
104
|
-
url.search ||
|
|
105
|
-
url.hash ||
|
|
106
|
-
(url.protocol !== secure &&
|
|
107
|
-
!(url.protocol === local && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname))))
|
|
108
|
-
throw new Error("IM_API_URL_INVALID");
|
|
109
|
-
}
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/manager.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ImBotConfig } from "../contracts.js";
|
|
2
|
-
import type { ImModuleDependencies } from "../ports.js";
|
|
3
|
-
/** Serial updates replace only the target connection. */
|
|
4
|
-
export declare class ImChannelManager {
|
|
5
|
-
#private;
|
|
6
|
-
readonly dependencies: ImModuleDependencies;
|
|
7
|
-
constructor(dependencies: ImModuleDependencies);
|
|
8
|
-
get status(): Record<string, unknown>[];
|
|
9
|
-
upsert(config: ImBotConfig): Promise<Record<string, unknown>>;
|
|
10
|
-
remove(id: string): Promise<void>;
|
|
11
|
-
close(): Promise<void>;
|
|
12
|
-
}
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/lifecycle/manager.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ImRuntime } from "../application/im-channel.js";
|
|
2
|
-
import { imBotIdentity, validateImConfig } from "./configuration.js";
|
|
3
|
-
/** Serial updates replace only the target connection. */
|
|
4
|
-
export class ImChannelManager {
|
|
5
|
-
dependencies;
|
|
6
|
-
#endpoints = new Map();
|
|
7
|
-
#queue = Promise.resolve();
|
|
8
|
-
#closed = false;
|
|
9
|
-
#closing;
|
|
10
|
-
#abort = new AbortController();
|
|
11
|
-
constructor(dependencies) {
|
|
12
|
-
this.dependencies = dependencies;
|
|
13
|
-
}
|
|
14
|
-
get status() {
|
|
15
|
-
return [...this.#endpoints.values()].map((runtime) => ({ ...runtime.status }));
|
|
16
|
-
}
|
|
17
|
-
upsert(config) {
|
|
18
|
-
const snapshot = structuredClone(config);
|
|
19
|
-
return this.#enqueue(async () => {
|
|
20
|
-
validateImConfig(snapshot);
|
|
21
|
-
const key = imBotIdentity(snapshot);
|
|
22
|
-
const current = this.#endpoints.get(key);
|
|
23
|
-
if (!current && this.#endpoints.size >= 16)
|
|
24
|
-
throw new Error("IM_ENDPOINT_CAPACITY_EXHAUSTED");
|
|
25
|
-
await current?.close();
|
|
26
|
-
if (this.#closed)
|
|
27
|
-
throw new Error("IM_MANAGER_CLOSED");
|
|
28
|
-
const runtime = new ImRuntime(snapshot, {
|
|
29
|
-
...this.dependencies,
|
|
30
|
-
signal: AbortSignal.any([
|
|
31
|
-
this.#abort.signal,
|
|
32
|
-
...(this.dependencies.signal ? [this.dependencies.signal] : [])
|
|
33
|
-
])
|
|
34
|
-
});
|
|
35
|
-
this.#endpoints.set(key, runtime);
|
|
36
|
-
await runtime.start();
|
|
37
|
-
return { ...runtime.status };
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
remove(id) {
|
|
41
|
-
return this.#enqueue(async () => {
|
|
42
|
-
await this.#endpoints.get(id)?.close();
|
|
43
|
-
this.#endpoints.delete(id);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
#enqueue(operation) {
|
|
47
|
-
const task = this.#queue.then(() => {
|
|
48
|
-
if (this.#closed)
|
|
49
|
-
throw new Error("IM_MANAGER_CLOSED");
|
|
50
|
-
return operation();
|
|
51
|
-
});
|
|
52
|
-
this.#queue = task.then(() => undefined, () => undefined);
|
|
53
|
-
return task;
|
|
54
|
-
}
|
|
55
|
-
close() {
|
|
56
|
-
if (this.#closing)
|
|
57
|
-
return this.#closing;
|
|
58
|
-
this.#closed = true;
|
|
59
|
-
// Cancel initialization before waiting for the queue it is blocking.
|
|
60
|
-
this.#abort.abort();
|
|
61
|
-
this.#closing = (async () => {
|
|
62
|
-
await this.#queue;
|
|
63
|
-
const results = await Promise.allSettled([...this.#endpoints.values()].map((runtime) => Promise.resolve().then(() => runtime.close())));
|
|
64
|
-
const errors = results
|
|
65
|
-
.filter((result) => result.status === "rejected")
|
|
66
|
-
.map((result) => result.reason);
|
|
67
|
-
if (errors.length)
|
|
68
|
-
throw new AggregateError(errors, "IM_DISPOSE_FAILED");
|
|
69
|
-
this.#endpoints.clear();
|
|
70
|
-
})();
|
|
71
|
-
return this.#closing;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 宿主依赖入口:注入执行能力、凭据来源和脱敏诊断。
|
|
3
|
-
* SDK 应用自行决定账号目录和凭据生命周期,通道无需依赖 CLI 或具体 Provider。
|
|
4
|
-
*/
|
|
5
|
-
import type { ExtraExecutionContext } from "@mininglamp-oss/octo-runtime-host-sdk";
|
|
6
|
-
import type { ImBotConfig } from "./contracts.js";
|
|
7
|
-
import type { ImSessionStore } from "./application/session-store.js";
|
|
8
|
-
import type { RuntimeLog, JsonObject } from "@mininglamp-oss/octo-runtime-host-sdk";
|
|
9
|
-
import type { ContextItem } from "@mininglamp-oss/octo-runtime-protocol";
|
|
10
|
-
export type ImCredentialSource = (config: ImBotConfig, signal: AbortSignal) => Promise<string | undefined>;
|
|
11
|
-
export interface ImModuleDependencies {
|
|
12
|
-
prepareContexts?: (config: JsonObject, signal: AbortSignal) => Promise<ContextItem[]>;
|
|
13
|
-
log?: RuntimeLog;
|
|
14
|
-
kernel: Pick<ExtraExecutionContext, "invoke" | "cancelInvocation" | "respondInteraction">;
|
|
15
|
-
/** Owning Extra/manager lifetime; aborts connections, execution and delivery. */
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
authorizeSpace?: (spaceId: string) => void;
|
|
18
|
-
credentials?: ImCredentialSource;
|
|
19
|
-
sessions?: ImSessionStore;
|
|
20
|
-
onDiagnostic?: (code: string, identity: {
|
|
21
|
-
endpointId: string;
|
|
22
|
-
runId?: string;
|
|
23
|
-
}) => void;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 公开事件投影:将 CanonicalEvent 累积为平台无关的展示快照。
|
|
3
|
-
* 按消息/工具/模型轮次保留身份与顺序,仅公开协议允许的内容;不展示私有 reasoning。
|
|
4
|
-
*/
|
|
5
|
-
import type { CanonicalEvent, FailureEnvelope } from "@mininglamp-oss/octo-runtime-protocol";
|
|
6
|
-
export interface ProgressItem {
|
|
7
|
-
id: string;
|
|
8
|
-
kind: "model_step" | "reasoning" | "commentary" | "tool";
|
|
9
|
-
status: string;
|
|
10
|
-
stepId?: string;
|
|
11
|
-
content: string;
|
|
12
|
-
toolName?: string;
|
|
13
|
-
summary?: string;
|
|
14
|
-
outcome?: "check_findings";
|
|
15
|
-
exitCode?: number;
|
|
16
|
-
finishReason?: string;
|
|
17
|
-
startedAtMs?: number;
|
|
18
|
-
durationMs?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface RunPresentation {
|
|
21
|
-
runId: string;
|
|
22
|
-
seq: number;
|
|
23
|
-
phase: string;
|
|
24
|
-
label?: string;
|
|
25
|
-
terminal?: "completed" | "failed" | "cancelled";
|
|
26
|
-
elapsedMs?: number;
|
|
27
|
-
items: ProgressItem[];
|
|
28
|
-
reasoningCount: number;
|
|
29
|
-
toolCallCount: number;
|
|
30
|
-
modelStepCount: number;
|
|
31
|
-
failure?: FailureEnvelope;
|
|
32
|
-
resultUnknown?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare class ImRunProjector {
|
|
35
|
-
#private;
|
|
36
|
-
readonly runId: string;
|
|
37
|
-
readonly allowToolPreview: boolean;
|
|
38
|
-
constructor(runId: string, allowToolPreview?: boolean);
|
|
39
|
-
accept(event: CanonicalEvent, now?: number): void;
|
|
40
|
-
get finalText(): string;
|
|
41
|
-
snapshot(now?: number): RunPresentation;
|
|
42
|
-
}
|
|
43
|
-
export declare function clampRunes(value: string, maximum: number): string;
|
|
44
|
-
export declare function compactRunes(value: string, maximum: number): string;
|
|
45
|
-
export declare function toolPreview(name: string, args: Record<string, unknown>): string;
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
const publicExposures = new Set(["public_reasoning", "public_summary", "public_plan"]);
|
|
2
|
-
export class ImRunProjector {
|
|
3
|
-
runId;
|
|
4
|
-
allowToolPreview;
|
|
5
|
-
#items = new Map();
|
|
6
|
-
#messages = new Map();
|
|
7
|
-
#toolInputs = new Map();
|
|
8
|
-
#currentStep;
|
|
9
|
-
#seq = 0;
|
|
10
|
-
#phase = "accepted";
|
|
11
|
-
#label;
|
|
12
|
-
#startedAt;
|
|
13
|
-
#endedAt;
|
|
14
|
-
#terminal;
|
|
15
|
-
#failure;
|
|
16
|
-
constructor(runId, allowToolPreview = false) {
|
|
17
|
-
this.runId = runId;
|
|
18
|
-
this.allowToolPreview = allowToolPreview;
|
|
19
|
-
}
|
|
20
|
-
accept(event, now = Date.now()) {
|
|
21
|
-
// 终态后不再接纳迟到帧,防止完成卡片被旧进度改回执行中。
|
|
22
|
-
if (this.#terminal)
|
|
23
|
-
return;
|
|
24
|
-
this.#seq++;
|
|
25
|
-
const p = event.payload;
|
|
26
|
-
// 实际协议以 activity/model_step 启动计时,不能只等待历史 run.started。
|
|
27
|
-
if (event.type === "activity.started" || event.type === "model_step.started")
|
|
28
|
-
this.#startedAt ??= now;
|
|
29
|
-
if (event.type === "run.started") {
|
|
30
|
-
this.#startedAt ??= now;
|
|
31
|
-
this.#phase = "model";
|
|
32
|
-
this.#label = undefined;
|
|
33
|
-
}
|
|
34
|
-
if (event.type === "run.queued")
|
|
35
|
-
this.#phase = "accepted";
|
|
36
|
-
if (event.type === "model_step.started") {
|
|
37
|
-
const p = event.payload;
|
|
38
|
-
this.#currentStep = p.stepId;
|
|
39
|
-
this.#item(`step:${p.stepId}`, "model_step", p.stepId).startedAtMs = p.startedAtMs;
|
|
40
|
-
this.#phase = "model";
|
|
41
|
-
this.#label = undefined;
|
|
42
|
-
}
|
|
43
|
-
if (event.type === "model_step.finished") {
|
|
44
|
-
const p = event.payload;
|
|
45
|
-
const item = this.#item(`step:${p.stepId}`, "model_step", p.stepId);
|
|
46
|
-
item.status = p.status;
|
|
47
|
-
item.finishReason = p.finishReason;
|
|
48
|
-
if (item.startedAtMs !== undefined && p.endedAtMs !== undefined)
|
|
49
|
-
item.durationMs = Math.max(0, p.endedAtMs - item.startedAtMs);
|
|
50
|
-
}
|
|
51
|
-
if (event.type.startsWith("message.")) {
|
|
52
|
-
const id = p.messageId ??
|
|
53
|
-
`unidentified:${p.stepId ?? this.#currentStep ?? "run"}:${p.channel ?? "final"}`;
|
|
54
|
-
const previous = this.#messages.get(id);
|
|
55
|
-
const channel = p.channel ?? previous?.channel ?? "final";
|
|
56
|
-
// analysis 必须显式声明可公开;历史片段也清除,避免后续快照泄漏。
|
|
57
|
-
if (channel === "analysis" && !publicExposures.has(p.exposure ?? "")) {
|
|
58
|
-
this.#messages.delete(id);
|
|
59
|
-
this.#items.delete(`message:${id}`);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (!["analysis", "commentary", "final"].includes(channel) ||
|
|
63
|
-
(p.role && p.role !== "assistant"))
|
|
64
|
-
return;
|
|
65
|
-
const text = typeof p.text !== "string"
|
|
66
|
-
? (previous?.text ?? "")
|
|
67
|
-
: event.type === "message.delta"
|
|
68
|
-
? (previous?.text ?? "") + p.text
|
|
69
|
-
: p.text;
|
|
70
|
-
const stepId = p.stepId ?? previous?.stepId ?? this.#currentStep;
|
|
71
|
-
this.#messages.set(id, { channel, text, stepId });
|
|
72
|
-
if (channel !== "final") {
|
|
73
|
-
const item = this.#item(`message:${id}`, channel === "analysis" ? "reasoning" : "commentary", stepId);
|
|
74
|
-
item.content = text;
|
|
75
|
-
item.status = event.type === "message.update" ? "completed" : "running";
|
|
76
|
-
}
|
|
77
|
-
if (channel === "final" && stepId && this.#items.has(`step:${stepId}`)) {
|
|
78
|
-
this.#items.get(`step:${stepId}`).content = [...this.#messages.values()]
|
|
79
|
-
.filter((message) => message.channel === "final" && message.stepId === stepId)
|
|
80
|
-
.map((message) => message.text)
|
|
81
|
-
.join("\n\n");
|
|
82
|
-
}
|
|
83
|
-
this.#phase =
|
|
84
|
-
channel === "final" ? "answering" : channel === "analysis" ? "thinking" : "commentary";
|
|
85
|
-
this.#label = undefined;
|
|
86
|
-
}
|
|
87
|
-
if (event.type === "tool_call.create") {
|
|
88
|
-
const p = event.payload;
|
|
89
|
-
const item = this.#item(`tool:${p.id}`, "tool", p.stepId ?? this.#currentStep);
|
|
90
|
-
item.toolName = p.name;
|
|
91
|
-
item.startedAtMs = now;
|
|
92
|
-
if (this.allowToolPreview)
|
|
93
|
-
item.summary = toolPreview(p.name, p.args);
|
|
94
|
-
const command = stringArg(p.args.command ?? p.args.cmd);
|
|
95
|
-
if (command.length <= 8192)
|
|
96
|
-
this.#toolInputs.set(p.id, { command });
|
|
97
|
-
this.#phase = "tool";
|
|
98
|
-
this.#label = undefined;
|
|
99
|
-
}
|
|
100
|
-
if (event.type === "tool_call.update") {
|
|
101
|
-
const p = event.payload;
|
|
102
|
-
const item = this.#item(`tool:${p.id}`, "tool", p.stepId ?? this.#currentStep);
|
|
103
|
-
item.status = p.status;
|
|
104
|
-
item.exitCode = p.exitCode;
|
|
105
|
-
item.durationMs =
|
|
106
|
-
p.durationMs ??
|
|
107
|
-
(item.startedAtMs === undefined ? undefined : Math.max(0, now - item.startedAtMs));
|
|
108
|
-
const input = this.#toolInputs.get(p.id);
|
|
109
|
-
if (p.status === "failed" && p.exitCode === 2 && input && detectorFindings(input, p.output))
|
|
110
|
-
item.outcome = "check_findings";
|
|
111
|
-
this.#toolInputs.delete(p.id);
|
|
112
|
-
this.#phase = "tool";
|
|
113
|
-
this.#label = "工具调用完成";
|
|
114
|
-
}
|
|
115
|
-
if (event.type === "activity.started") {
|
|
116
|
-
const p = event.payload;
|
|
117
|
-
const phases = {
|
|
118
|
-
thinking: "thinking",
|
|
119
|
-
executing_tool: "tool",
|
|
120
|
-
responding: "answering",
|
|
121
|
-
starting: "accepted",
|
|
122
|
-
waiting_input: "waiting",
|
|
123
|
-
waiting_approval: "waiting",
|
|
124
|
-
compacting: "model",
|
|
125
|
-
retrying: "model",
|
|
126
|
-
working: "model"
|
|
127
|
-
};
|
|
128
|
-
this.#phase = phases[p.kind] ?? "model";
|
|
129
|
-
this.#label = undefined;
|
|
130
|
-
}
|
|
131
|
-
if (event.type === "interaction.requested") {
|
|
132
|
-
this.#phase = "waiting";
|
|
133
|
-
this.#label = "等待你的确认或输入";
|
|
134
|
-
}
|
|
135
|
-
if (event.type === "interaction.resolved") {
|
|
136
|
-
this.#phase = "model";
|
|
137
|
-
this.#label = undefined;
|
|
138
|
-
}
|
|
139
|
-
if (event.type === "run.notice") {
|
|
140
|
-
const p = event.payload;
|
|
141
|
-
const labels = {
|
|
142
|
-
retry_scheduled: "正在重试",
|
|
143
|
-
context_compacted: "上下文已压缩",
|
|
144
|
-
model_rerouted: "已切换模型",
|
|
145
|
-
config_warning: "执行配置提示"
|
|
146
|
-
};
|
|
147
|
-
this.#label = labels[p.code];
|
|
148
|
-
}
|
|
149
|
-
if (event.type === "run.completed" ||
|
|
150
|
-
event.type === "run.failed" ||
|
|
151
|
-
event.type === "run.cancelled") {
|
|
152
|
-
this.#terminal =
|
|
153
|
-
event.type === "run.completed"
|
|
154
|
-
? "completed"
|
|
155
|
-
: event.type === "run.failed"
|
|
156
|
-
? "failed"
|
|
157
|
-
: "cancelled";
|
|
158
|
-
this.#endedAt = now;
|
|
159
|
-
this.#failure = p.failure;
|
|
160
|
-
for (const item of this.#items.values())
|
|
161
|
-
if (item.status === "running")
|
|
162
|
-
item.status = this.#terminal === "completed" ? "completed" : "cancelled";
|
|
163
|
-
}
|
|
164
|
-
if (this.#items.size > 512 ||
|
|
165
|
-
this.#messages.size > 512 ||
|
|
166
|
-
[...this.#messages.values()].reduce((size, message) => size + Buffer.byteLength(message.text), 0) >
|
|
167
|
-
256 * 1024)
|
|
168
|
-
throw new Error("IM_RESULT_TOO_LARGE");
|
|
169
|
-
}
|
|
170
|
-
#item(id, kind, stepId) {
|
|
171
|
-
let item = this.#items.get(id);
|
|
172
|
-
if (!item) {
|
|
173
|
-
item = { id, kind, stepId, status: "running", content: "" };
|
|
174
|
-
this.#items.set(id, item);
|
|
175
|
-
}
|
|
176
|
-
return item;
|
|
177
|
-
}
|
|
178
|
-
get finalText() {
|
|
179
|
-
return [...this.#messages.values()]
|
|
180
|
-
.filter((m) => m.channel === "final")
|
|
181
|
-
.map((m) => m.text)
|
|
182
|
-
.filter(Boolean)
|
|
183
|
-
.join("\n\n");
|
|
184
|
-
}
|
|
185
|
-
snapshot(now = Date.now()) {
|
|
186
|
-
const items = structuredClone([...this.#items.values()]);
|
|
187
|
-
return {
|
|
188
|
-
runId: this.runId,
|
|
189
|
-
seq: this.#seq,
|
|
190
|
-
phase: this.#phase,
|
|
191
|
-
label: this.#label,
|
|
192
|
-
terminal: this.#terminal,
|
|
193
|
-
elapsedMs: this.#startedAt === undefined
|
|
194
|
-
? undefined
|
|
195
|
-
: Math.max(0, (this.#endedAt ?? now) - this.#startedAt),
|
|
196
|
-
items,
|
|
197
|
-
reasoningCount: items.filter((i) => i.kind === "reasoning").length,
|
|
198
|
-
toolCallCount: items.filter((i) => i.kind === "tool").length,
|
|
199
|
-
modelStepCount: items.filter((i) => i.kind === "model_step").length,
|
|
200
|
-
failure: this.#failure
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
export function clampRunes(value, maximum) {
|
|
205
|
-
const runes = Array.from(value);
|
|
206
|
-
return runes.length <= maximum ? value : runes.slice(0, Math.max(0, maximum - 1)).join("") + "…";
|
|
207
|
-
}
|
|
208
|
-
export function compactRunes(value, maximum) {
|
|
209
|
-
const runes = Array.from(value);
|
|
210
|
-
if (runes.length <= maximum)
|
|
211
|
-
return value;
|
|
212
|
-
const head = Math.floor(((maximum - 3) * 2) / 3);
|
|
213
|
-
return runes.slice(0, head).join("") + " … " + runes.slice(-(maximum - 3 - head)).join("");
|
|
214
|
-
}
|
|
215
|
-
export function toolPreview(name, args) {
|
|
216
|
-
const sensitive = /token|secret|password|passwd|credential|authorization|cookie|api_key|apikey|\.env|id_rsa|id_ed25519|private_key|sk-|bf_|ghp_|xoxb-/i;
|
|
217
|
-
if (["exec_command", "shell", "bash", "sh", "zsh"].includes(name.toLowerCase())) {
|
|
218
|
-
let command = stringArg(args.command ?? args.cmd).trim();
|
|
219
|
-
if (sensitive.test(command) || command.includes("\0"))
|
|
220
|
-
return "";
|
|
221
|
-
command = command.replace(/^(?:\S*\/)?(?:sh|bash|zsh|dash|ksh|fish)\s+-[a-z]*c[a-z]*\s+(['"])([\s\S]*)\1$/, "$2");
|
|
222
|
-
return clampRunes(command.replace(/\s+/g, " ").trim(), 42);
|
|
223
|
-
}
|
|
224
|
-
if (["read", "read_file", "write_file", "file_read", "file_write"].includes(name.toLowerCase())) {
|
|
225
|
-
const path = stringArg(args.path ?? args.file_path ?? args.filePath).replace(/\\/g, "/");
|
|
226
|
-
if (sensitive.test(path) || /:\/\/|[\r\n\0]/.test(path))
|
|
227
|
-
return "";
|
|
228
|
-
const parts = path
|
|
229
|
-
.split("/")
|
|
230
|
-
.filter((p) => p && p !== "." && p !== "..")
|
|
231
|
-
.slice(-2);
|
|
232
|
-
return parts.every((p) => /^[\p{L}\p{N}._+~ -]+$/u.test(p)) && parts.length
|
|
233
|
-
? clampRunes("…/" + parts.join("/"), 96)
|
|
234
|
-
: "";
|
|
235
|
-
}
|
|
236
|
-
return "";
|
|
237
|
-
}
|
|
238
|
-
function detectorFindings(input, output) {
|
|
239
|
-
const command = stringArg(input.command ?? input.cmd);
|
|
240
|
-
if (!/\bdetect\b/.test(command) || !/--json\b/.test(command))
|
|
241
|
-
return false;
|
|
242
|
-
try {
|
|
243
|
-
const findings = typeof output === "string" ? JSON.parse(output) : output;
|
|
244
|
-
return (Array.isArray(findings) &&
|
|
245
|
-
findings.some((f) => {
|
|
246
|
-
if (!f || typeof f !== "object")
|
|
247
|
-
return false;
|
|
248
|
-
const value = f.antipattern;
|
|
249
|
-
return typeof value === "string" && !!value.trim();
|
|
250
|
-
}));
|
|
251
|
-
}
|
|
252
|
-
catch {
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
function stringArg(value) {
|
|
257
|
-
return typeof value === "string" ? value : "";
|
|
258
|
-
}
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ChannelCallbacks, WecomBotConfig } from "../contracts.js";
|
|
2
|
-
import type { ImCredentialSource } from "../ports.js";
|
|
3
|
-
/** 企业微信 IM 平台连接器;不是 MCP。只处理平台准入、消息映射和 stream 回复。 */
|
|
4
|
-
export declare class WecomTransport {
|
|
5
|
-
#private;
|
|
6
|
-
readonly config: WecomBotConfig;
|
|
7
|
-
readonly credentials: ImCredentialSource;
|
|
8
|
-
readonly callbacks: ChannelCallbacks;
|
|
9
|
-
readonly identity: string;
|
|
10
|
-
readonly botId: string;
|
|
11
|
-
constructor(config: WecomBotConfig, credentials: ImCredentialSource, callbacks: ChannelCallbacks);
|
|
12
|
-
get status(): {
|
|
13
|
-
connected: boolean;
|
|
14
|
-
authenticatedAt?: string;
|
|
15
|
-
heartbeatAcks?: number | undefined;
|
|
16
|
-
lastHeartbeatAt?: string;
|
|
17
|
-
error?: string;
|
|
18
|
-
};
|
|
19
|
-
start(signal: AbortSignal): Promise<void>;
|
|
20
|
-
close(): Promise<void>;
|
|
21
|
-
}
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 企业微信平台适配:将授权文本映射为统一 IM 事件,并绑定原会话 stream 回复。
|
|
3
|
-
* 执行与会话策略复用公共编排;不注册 MCP 工具,也不继承客户 App 的聊天设置。
|
|
4
|
-
*/
|
|
5
|
-
import { CONTEXT_SCHEMA } from "@mininglamp-oss/octo-runtime-protocol";
|
|
6
|
-
import { imBotIdentity } from "../lifecycle/configuration.js";
|
|
7
|
-
import { WecomConnection } from "./connection.js";
|
|
8
|
-
import { WecomStreamSession } from "./stream-session.js";
|
|
9
|
-
/** 企业微信 IM 平台连接器;不是 MCP。只处理平台准入、消息映射和 stream 回复。 */
|
|
10
|
-
export class WecomTransport {
|
|
11
|
-
config;
|
|
12
|
-
credentials;
|
|
13
|
-
callbacks;
|
|
14
|
-
identity;
|
|
15
|
-
botId;
|
|
16
|
-
#detachAbort;
|
|
17
|
-
#closing;
|
|
18
|
-
#connection;
|
|
19
|
-
#streams = new Set();
|
|
20
|
-
constructor(config, credentials, callbacks) {
|
|
21
|
-
this.config = config;
|
|
22
|
-
this.credentials = credentials;
|
|
23
|
-
this.callbacks = callbacks;
|
|
24
|
-
this.identity = imBotIdentity(config);
|
|
25
|
-
this.botId = config.bot_id;
|
|
26
|
-
}
|
|
27
|
-
get status() {
|
|
28
|
-
return { ...this.#connection?.status, connected: this.#connection?.status.connected ?? false };
|
|
29
|
-
}
|
|
30
|
-
async start(signal) {
|
|
31
|
-
const secret = await this.credentials(this.config, signal);
|
|
32
|
-
if (!secret)
|
|
33
|
-
throw new Error("IM_CREDENTIALS_REQUIRED");
|
|
34
|
-
if (signal.aborted)
|
|
35
|
-
return;
|
|
36
|
-
const connection = new WecomConnection({ wsUrl: this.config.ws_url }, {
|
|
37
|
-
onMessage: (frame) => this.#receive(frame, connection),
|
|
38
|
-
onDisconnect: (code) => this.callbacks.onDisconnect(code, code !== "WECOM_CONNECTION_REPLACED")
|
|
39
|
-
});
|
|
40
|
-
this.#connection = connection;
|
|
41
|
-
const abort = () => {
|
|
42
|
-
void connection.close();
|
|
43
|
-
};
|
|
44
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
45
|
-
this.#detachAbort = () => signal.removeEventListener("abort", abort);
|
|
46
|
-
if (signal.aborted)
|
|
47
|
-
return;
|
|
48
|
-
await connection.connect({ appBot: this.config.bot_id, appSecret: secret });
|
|
49
|
-
if (signal.aborted)
|
|
50
|
-
await connection.close();
|
|
51
|
-
}
|
|
52
|
-
#receive(frame, connection) {
|
|
53
|
-
const body = frame.body;
|
|
54
|
-
// 企业微信可见范围 / 会话权限是默认准入;用户白名单仅为宿主可选的进一步限制。
|
|
55
|
-
if (!body ||
|
|
56
|
-
body.aibotid !== this.config.bot_id ||
|
|
57
|
-
body.msgtype !== "text" ||
|
|
58
|
-
typeof body.msgid !== "string" ||
|
|
59
|
-
!body.msgid ||
|
|
60
|
-
typeof frame.headers?.req_id !== "string" ||
|
|
61
|
-
!frame.headers.req_id ||
|
|
62
|
-
typeof body.from?.userid !== "string" ||
|
|
63
|
-
!body.from.userid ||
|
|
64
|
-
typeof body.text?.content !== "string" ||
|
|
65
|
-
!["single", "group"].includes(body.chattype))
|
|
66
|
-
return;
|
|
67
|
-
const conversationId = body.chattype === "single" ? body.from.userid : body.chatid;
|
|
68
|
-
if (!conversationId || typeof conversationId !== "string")
|
|
69
|
-
return;
|
|
70
|
-
const stream = new WecomStreamSession((streamId, text, finish) => connection.replyStream(frame.headers.req_id, streamId, fitReply(text), finish));
|
|
71
|
-
this.callbacks.onMessage({
|
|
72
|
-
messageId: body.msgid,
|
|
73
|
-
senderId: body.from.userid,
|
|
74
|
-
conversationId,
|
|
75
|
-
conversationKind: body.chattype === "single" ? "direct" : "group",
|
|
76
|
-
text: body.text.content,
|
|
77
|
-
buildContext: (_signal, options) => Promise.resolve({
|
|
78
|
-
schema: CONTEXT_SCHEMA,
|
|
79
|
-
// extra.im 由本渠道构造;宿主业务材料须使用其他命名空间。
|
|
80
|
-
items: structuredClone((options?.configuredItems ?? this.config.context?.items ?? []).filter((item) => item.namespace !== "extra.im"))
|
|
81
|
-
}),
|
|
82
|
-
beginPresentation: (_runId, onDiagnostic) => {
|
|
83
|
-
this.#streams.add(stream);
|
|
84
|
-
return stream.begin(onDiagnostic);
|
|
85
|
-
},
|
|
86
|
-
reply: (text, effectKey) => stream.reply(text, effectKey).finally(() => {
|
|
87
|
-
if (effectKey?.startsWith("final:"))
|
|
88
|
-
this.#streams.delete(stream);
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
close() {
|
|
93
|
-
if (this.#closing)
|
|
94
|
-
return this.#closing;
|
|
95
|
-
this.#detachAbort?.();
|
|
96
|
-
this.#closing = Promise.resolve().then(async () => {
|
|
97
|
-
const results = await Promise.allSettled([
|
|
98
|
-
...[...this.#streams].map((stream) => Promise.resolve().then(() => stream.close())),
|
|
99
|
-
Promise.resolve().then(() => this.#connection?.close())
|
|
100
|
-
]);
|
|
101
|
-
const errors = results
|
|
102
|
-
.filter((result) => result.status === "rejected")
|
|
103
|
-
.map((result) => result.reason);
|
|
104
|
-
if (errors.length)
|
|
105
|
-
throw new AggregateError(errors, "IM_TRANSPORT_DISPOSE_FAILED");
|
|
106
|
-
this.#streams.clear();
|
|
107
|
-
});
|
|
108
|
-
return this.#closing;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function fitReply(text) {
|
|
112
|
-
if (Buffer.byteLength(text) <= 20_480)
|
|
113
|
-
return text;
|
|
114
|
-
const suffix = "\n\n(回复超过企业微信长度上限,已截断。)";
|
|
115
|
-
const budget = 20_480 - Buffer.byteLength(suffix);
|
|
116
|
-
let bytes = 0, result = "";
|
|
117
|
-
for (const rune of text) {
|
|
118
|
-
bytes += Buffer.byteLength(rune);
|
|
119
|
-
if (bytes > budget)
|
|
120
|
-
break;
|
|
121
|
-
result += rune;
|
|
122
|
-
}
|
|
123
|
-
return result + suffix;
|
|
124
|
-
}
|