@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,133 +0,0 @@
|
|
|
1
|
-
import { messageSentAt } from "./message-time.js";
|
|
2
|
-
export const historyObject = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
3
|
-
const field = (value, limit = 256) => typeof value === "string" && value.length <= limit ? value : null;
|
|
4
|
-
export const supportedHistoryType = (type) => typeof type === "number" && [1, 2, 8, 11, 14, 18].includes(type);
|
|
5
|
-
/** 只收集有限层级的真实来源 UID;转发自报姓名不参与可信身份映射。 */
|
|
6
|
-
export function historySenderUids(payloads) {
|
|
7
|
-
const result = new Set();
|
|
8
|
-
let nodes = 0;
|
|
9
|
-
const visit = (raw, depth) => {
|
|
10
|
-
if (depth >= 4 || ++nodes > 128)
|
|
11
|
-
return;
|
|
12
|
-
const value = historyObject(raw);
|
|
13
|
-
const quote = historyObject(value.reply);
|
|
14
|
-
if (typeof quote.from_uid === "string")
|
|
15
|
-
result.add(quote.from_uid);
|
|
16
|
-
if (quote.payload)
|
|
17
|
-
visit(quote.payload, depth + 1);
|
|
18
|
-
if (value.type === 11 && Array.isArray(value.msgs))
|
|
19
|
-
for (const rawMessage of value.msgs.slice(0, 128)) {
|
|
20
|
-
if (nodes >= 128)
|
|
21
|
-
break;
|
|
22
|
-
const message = historyObject(rawMessage);
|
|
23
|
-
if (typeof message.from_uid === "string")
|
|
24
|
-
result.add(message.from_uid);
|
|
25
|
-
visit(message.payload, depth + 1);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
for (const value of payloads)
|
|
29
|
-
visit(value, 0);
|
|
30
|
-
return [...result];
|
|
31
|
-
}
|
|
32
|
-
/** 历史只携带已返回的内容结构和资源地址,不下载、解引用或把嵌套材料当新任务。 */
|
|
33
|
-
export function historyContent(raw, identities) {
|
|
34
|
-
let nodes = 0, remaining = 12000, truncated = false;
|
|
35
|
-
const text = (value) => {
|
|
36
|
-
if (typeof value !== "string")
|
|
37
|
-
return "";
|
|
38
|
-
const points = Array.from(value);
|
|
39
|
-
if (points.length > remaining)
|
|
40
|
-
truncated = true;
|
|
41
|
-
const result = points.slice(0, remaining).join("");
|
|
42
|
-
remaining -= Math.min(points.length, remaining);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
const speaker = (value) => {
|
|
46
|
-
const uid = field(value.from_uid, 64);
|
|
47
|
-
return {
|
|
48
|
-
uid,
|
|
49
|
-
username: uid ? (identities.get(uid)?.name ?? null) : null,
|
|
50
|
-
sentAt: messageSentAt(value.timestamp, "seconds")
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
const visit = (value, depth) => {
|
|
54
|
-
if (depth >= 4 || ++nodes > 128) {
|
|
55
|
-
truncated = true;
|
|
56
|
-
return { type: "omitted", reason: "nesting-limit" };
|
|
57
|
-
}
|
|
58
|
-
const payload = historyObject(value);
|
|
59
|
-
let body;
|
|
60
|
-
if (payload.type === 1)
|
|
61
|
-
body = { type: "text", text: text(payload.content) };
|
|
62
|
-
else if (payload.type === 2)
|
|
63
|
-
body = { type: "image", url: field(payload.url, 8192), read: false };
|
|
64
|
-
else if (payload.type === 8)
|
|
65
|
-
body = {
|
|
66
|
-
type: "file",
|
|
67
|
-
name: field(payload.name),
|
|
68
|
-
url: field(payload.url, 8192),
|
|
69
|
-
read: false
|
|
70
|
-
};
|
|
71
|
-
else if (payload.type === 18)
|
|
72
|
-
body = {
|
|
73
|
-
type: "document",
|
|
74
|
-
id: field(payload.doc_id),
|
|
75
|
-
name: field(payload.title),
|
|
76
|
-
url: field(payload.url, 8192),
|
|
77
|
-
read: false
|
|
78
|
-
};
|
|
79
|
-
else if (payload.type === 11) {
|
|
80
|
-
const messages = [];
|
|
81
|
-
if (Array.isArray(payload.msgs))
|
|
82
|
-
for (const entry of payload.msgs.slice(0, 128)) {
|
|
83
|
-
if (nodes >= 128) {
|
|
84
|
-
truncated = true;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
const message = historyObject(entry);
|
|
88
|
-
messages.push({ ...speaker(message), content: visit(message.payload, depth + 1) });
|
|
89
|
-
}
|
|
90
|
-
if (Array.isArray(payload.msgs) && payload.msgs.length > 128)
|
|
91
|
-
truncated = true;
|
|
92
|
-
body = { type: "forward", messages };
|
|
93
|
-
}
|
|
94
|
-
else if (payload.type === 14) {
|
|
95
|
-
if (Array.isArray(payload.content)) {
|
|
96
|
-
const blocks = [];
|
|
97
|
-
for (const block of payload.content.slice(0, 128)) {
|
|
98
|
-
if (++nodes > 128) {
|
|
99
|
-
truncated = true;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
const data = historyObject(block);
|
|
103
|
-
if (data.type === "text")
|
|
104
|
-
blocks.push({ type: "text", text: text(data.text) });
|
|
105
|
-
else if (data.type === "image")
|
|
106
|
-
blocks.push({ type: "image", url: field(data.url, 8192), read: false });
|
|
107
|
-
else
|
|
108
|
-
blocks.push({ type: "unsupported" });
|
|
109
|
-
}
|
|
110
|
-
if (payload.content.length > 128)
|
|
111
|
-
truncated = true;
|
|
112
|
-
body = { type: "rich-text", blocks };
|
|
113
|
-
}
|
|
114
|
-
else
|
|
115
|
-
body = {
|
|
116
|
-
type: "text",
|
|
117
|
-
text: text(typeof payload.plain === "string" ? payload.plain : payload.content)
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
else
|
|
121
|
-
body = { type: "unsupported" };
|
|
122
|
-
const quote = historyObject(payload.reply);
|
|
123
|
-
if (Object.keys(quote).length)
|
|
124
|
-
body = {
|
|
125
|
-
type: "reply",
|
|
126
|
-
quote: { ...speaker(quote), content: visit(quote.payload, depth + 1) },
|
|
127
|
-
content: body
|
|
128
|
-
};
|
|
129
|
-
return body;
|
|
130
|
-
};
|
|
131
|
-
const content = visit(raw, 0);
|
|
132
|
-
return { content, truncated };
|
|
133
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { MessageIdentity } from "./message-identities.js";
|
|
2
|
-
export interface HistoryMessage {
|
|
3
|
-
uid: string;
|
|
4
|
-
username: string | null;
|
|
5
|
-
sentAt: string | null;
|
|
6
|
-
content: Record<string, unknown>;
|
|
7
|
-
truncated?: true;
|
|
8
|
-
}
|
|
9
|
-
/** 输入按新到旧;输出按旧到新,8000 码点预算包含 JSON,截断只影响正文。 */
|
|
10
|
-
export declare function historyMessages(entries: Array<{
|
|
11
|
-
from_uid: string;
|
|
12
|
-
content: string;
|
|
13
|
-
timestamp?: number | null;
|
|
14
|
-
type?: number;
|
|
15
|
-
payload?: unknown;
|
|
16
|
-
message_seq?: number;
|
|
17
|
-
}>, identities?: ReadonlyMap<string, MessageIdentity>, excludedSeqs?: readonly number[]): {
|
|
18
|
-
messages: HistoryMessage[];
|
|
19
|
-
truncated: boolean;
|
|
20
|
-
recoveryMessages?: HistoryMessage[];
|
|
21
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { historyContent, historyObject, supportedHistoryType } from "./history-content.js";
|
|
2
|
-
import { messageSentAt } from "./message-time.js";
|
|
3
|
-
import { IM_HISTORY_MESSAGE_LIMIT } from "../application/context-gap.js";
|
|
4
|
-
/** 输入按新到旧;输出按旧到新,8000 码点预算包含 JSON,截断只影响正文。 */
|
|
5
|
-
export function historyMessages(entries, identities = new Map(), excludedSeqs = []) {
|
|
6
|
-
const messages = [];
|
|
7
|
-
const excluded = new Set();
|
|
8
|
-
const size = (value) => Array.from(JSON.stringify(value)).length;
|
|
9
|
-
let truncated = false;
|
|
10
|
-
for (const entry of entries.slice(0, IM_HISTORY_MESSAGE_LIMIT)) {
|
|
11
|
-
// 先对完整窗口执行原预算;恢复与主历史只是同一材料的互不重叠分区。
|
|
12
|
-
const prepend = (record) => {
|
|
13
|
-
messages.unshift(record);
|
|
14
|
-
if (entry.message_seq !== undefined && excludedSeqs.includes(entry.message_seq))
|
|
15
|
-
excluded.add(record);
|
|
16
|
-
};
|
|
17
|
-
if (!supportedHistoryType(entry.type))
|
|
18
|
-
continue;
|
|
19
|
-
const payload = historyObject(entry.payload ?? { type: entry.type, content: entry.content });
|
|
20
|
-
const plain = entry.type === 1 && !Object.keys(historyObject(payload.reply)).length;
|
|
21
|
-
if (plain && (typeof entry.content !== "string" || !entry.content.trim()))
|
|
22
|
-
continue;
|
|
23
|
-
const body = plain ? undefined : historyContent(payload, identities);
|
|
24
|
-
const record = {
|
|
25
|
-
uid: entry.from_uid,
|
|
26
|
-
username: identities.get(entry.from_uid)?.name ?? null,
|
|
27
|
-
sentAt: messageSentAt(entry.timestamp, "milliseconds"),
|
|
28
|
-
content: plain ? { type: "text", text: entry.content } : body.content,
|
|
29
|
-
...(body?.truncated ? { truncated: true } : {})
|
|
30
|
-
};
|
|
31
|
-
if (size([record, ...messages]) <= 8000) {
|
|
32
|
-
prepend(record);
|
|
33
|
-
truncated ||= body?.truncated === true;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
// 尾部保留最新正文;JSON 转义也占预算,二分选择可容纳的 Unicode 尾段。
|
|
37
|
-
if (!plain) {
|
|
38
|
-
const omitted = {
|
|
39
|
-
uid: record.uid,
|
|
40
|
-
username: record.username,
|
|
41
|
-
sentAt: record.sentAt,
|
|
42
|
-
content: { type: "omitted", reason: "history-budget" },
|
|
43
|
-
truncated: true
|
|
44
|
-
};
|
|
45
|
-
if (size([omitted, ...messages]) <= 8000)
|
|
46
|
-
prepend(omitted);
|
|
47
|
-
truncated = true;
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
const tail = Array.from(entry.content).slice(-8000);
|
|
51
|
-
let low = 0, high = tail.length;
|
|
52
|
-
const shortened = (length) => ({
|
|
53
|
-
...record,
|
|
54
|
-
content: { type: "text", text: length ? tail.slice(-length).join("") : "" },
|
|
55
|
-
truncated: true
|
|
56
|
-
});
|
|
57
|
-
while (low < high) {
|
|
58
|
-
const middle = Math.ceil((low + high) / 2);
|
|
59
|
-
if (size([shortened(middle), ...messages]) <= 8000)
|
|
60
|
-
low = middle;
|
|
61
|
-
else
|
|
62
|
-
high = middle - 1;
|
|
63
|
-
}
|
|
64
|
-
if (low > 0)
|
|
65
|
-
prepend(shortened(low));
|
|
66
|
-
truncated = true;
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
messages: messages.filter((record) => !excluded.has(record)),
|
|
71
|
-
truncated,
|
|
72
|
-
...(excluded.size
|
|
73
|
-
? { recoveryMessages: messages.filter((record) => excluded.has(record)) }
|
|
74
|
-
: {})
|
|
75
|
-
};
|
|
76
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ModelInputPart } from "@mininglamp-oss/octo-runtime-protocol";
|
|
2
|
-
export declare class ImImageInputError extends Error {
|
|
3
|
-
}
|
|
4
|
-
export declare function imageUrl(raw: unknown, apiUrl: string): URL;
|
|
5
|
-
export declare function imagePart(bytes: Buffer, contentType?: string): ModelInputPart;
|
|
6
|
-
export declare function downloadImageInput(rawUrl: unknown, apiUrl: string, token: string, signal: AbortSignal): Promise<ModelInputPart[]>;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { lookup } from "node:dns/promises";
|
|
3
|
-
import { request as httpRequest } from "node:http";
|
|
4
|
-
import { request as httpsRequest } from "node:https";
|
|
5
|
-
import { BlockList, isIP } from "node:net";
|
|
6
|
-
import { IMAGE_INPUT_LIMITS } from "@mininglamp-oss/octo-runtime-protocol";
|
|
7
|
-
import { parseImageDimensions } from "./api/files.js";
|
|
8
|
-
import { trimTrailingSlashes } from "./api/url.js";
|
|
9
|
-
export class ImImageInputError extends Error {
|
|
10
|
-
}
|
|
11
|
-
const blocked = new BlockList();
|
|
12
|
-
for (const [address, prefix] of [
|
|
13
|
-
["0.0.0.0", 8],
|
|
14
|
-
["10.0.0.0", 8],
|
|
15
|
-
["100.64.0.0", 10],
|
|
16
|
-
["127.0.0.0", 8],
|
|
17
|
-
["169.254.0.0", 16],
|
|
18
|
-
["172.16.0.0", 12],
|
|
19
|
-
["192.0.0.0", 24],
|
|
20
|
-
["192.168.0.0", 16],
|
|
21
|
-
["198.18.0.0", 15],
|
|
22
|
-
["224.0.0.0", 4],
|
|
23
|
-
["240.0.0.0", 4]
|
|
24
|
-
])
|
|
25
|
-
blocked.addSubnet(address, prefix, "ipv4");
|
|
26
|
-
const globalV6 = new BlockList();
|
|
27
|
-
globalV6.addSubnet("2000::", 3, "ipv6");
|
|
28
|
-
export function imageUrl(raw, apiUrl) {
|
|
29
|
-
if (typeof raw !== "string" || !raw.trim() || raw.length > 8192)
|
|
30
|
-
throw new ImImageInputError("图片地址无效。");
|
|
31
|
-
try {
|
|
32
|
-
const value = raw.trim();
|
|
33
|
-
if (/^[a-z][a-z0-9+.-]*:/i.test(value) || value.startsWith("/"))
|
|
34
|
-
return new URL(value, apiUrl);
|
|
35
|
-
const path = value.replace(/^file\/(?:preview\/)?/, "");
|
|
36
|
-
return new URL(`${trimTrailingSlashes(apiUrl)}/file/${path}`);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
throw new ImImageInputError("图片地址无效。");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export function imagePart(bytes, contentType) {
|
|
43
|
-
let mimeType;
|
|
44
|
-
if (bytes.subarray(0, 8).equals(Buffer.from("89504e470d0a1a0a", "hex"))) {
|
|
45
|
-
mimeType = "image/png";
|
|
46
|
-
if (bytes.length < 45 || bytes.toString("ascii", bytes.length - 8, bytes.length - 4) !== "IEND")
|
|
47
|
-
throw new ImImageInputError("PNG 图片已损坏或不完整。");
|
|
48
|
-
}
|
|
49
|
-
else if (bytes[0] === 0xff && bytes[1] === 0xd8) {
|
|
50
|
-
mimeType = "image/jpeg";
|
|
51
|
-
if (bytes.at(-2) !== 0xff || bytes.at(-1) !== 0xd9)
|
|
52
|
-
throw new ImImageInputError("JPEG 图片已损坏或不完整。");
|
|
53
|
-
}
|
|
54
|
-
else if (bytes.toString("ascii", 0, 4) === "RIFF" &&
|
|
55
|
-
bytes.toString("ascii", 8, 12) === "WEBP") {
|
|
56
|
-
mimeType = "image/webp";
|
|
57
|
-
if (bytes.length < 25 ||
|
|
58
|
-
bytes.readUInt32LE(4) + 8 !== bytes.length ||
|
|
59
|
-
!["VP8 ", "VP8L", "VP8X"].includes(bytes.toString("ascii", 12, 16)))
|
|
60
|
-
throw new ImImageInputError("WebP 图片已损坏或不完整。");
|
|
61
|
-
}
|
|
62
|
-
else
|
|
63
|
-
throw new ImImageInputError("图片格式不支持,仅支持 PNG、JPEG、WebP。");
|
|
64
|
-
if (mimeType !== "image/webp") {
|
|
65
|
-
const size = parseImageDimensions(bytes, mimeType);
|
|
66
|
-
if (!size || size.width < 1 || size.height < 1)
|
|
67
|
-
throw new ImImageInputError("图片尺寸无效或文件已损坏。");
|
|
68
|
-
}
|
|
69
|
-
const declared = contentType?.split(";", 1)[0].trim().toLowerCase();
|
|
70
|
-
if (declared?.startsWith("image/") &&
|
|
71
|
-
declared !== mimeType &&
|
|
72
|
-
!(declared === "image/jpg" && mimeType === "image/jpeg"))
|
|
73
|
-
throw new ImImageInputError("图片类型与实际内容不一致。");
|
|
74
|
-
if (bytes.length > IMAGE_INPUT_LIMITS.maxBytes)
|
|
75
|
-
throw new ImImageInputError("图片超过 2 MiB 上限。");
|
|
76
|
-
return {
|
|
77
|
-
type: "image",
|
|
78
|
-
mimeType,
|
|
79
|
-
data: bytes.toString("base64"),
|
|
80
|
-
byteSize: bytes.length,
|
|
81
|
-
sha256: createHash("sha256").update(bytes).digest("hex")
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export async function downloadImageInput(rawUrl, apiUrl, token, signal) {
|
|
85
|
-
const trusted = new URL(apiUrl);
|
|
86
|
-
signal = AbortSignal.any([signal, AbortSignal.timeout(30_000)]);
|
|
87
|
-
let url = imageUrl(rawUrl, apiUrl);
|
|
88
|
-
for (let hop = 0; hop <= 3; hop++) {
|
|
89
|
-
signal.throwIfAborted();
|
|
90
|
-
const sameOrigin = url.origin === trusted.origin;
|
|
91
|
-
if (url.username ||
|
|
92
|
-
url.password ||
|
|
93
|
-
url.hash ||
|
|
94
|
-
(url.protocol !== "https:" &&
|
|
95
|
-
!(sameOrigin &&
|
|
96
|
-
trusted.protocol === "http:" &&
|
|
97
|
-
["localhost", "127.0.0.1", "[::1]"].includes(url.hostname))))
|
|
98
|
-
throw new ImImageInputError("图片地址不符合下载要求。");
|
|
99
|
-
const hostname = url.hostname.replace(/^\[|\]$/g, "");
|
|
100
|
-
const addresses = isIP(hostname)
|
|
101
|
-
? [{ address: hostname, family: isIP(hostname) }]
|
|
102
|
-
: await lookup(hostname, { all: true });
|
|
103
|
-
signal.throwIfAborted();
|
|
104
|
-
if (!addresses.length ||
|
|
105
|
-
(!sameOrigin &&
|
|
106
|
-
addresses.some(({ address, family }) => family === 4 ? blocked.check(address, "ipv4") : !globalV6.check(address, "ipv6"))))
|
|
107
|
-
throw new ImImageInputError("图片地址不可访问。");
|
|
108
|
-
// DNS 校验结果固定到本次连接,重定向逐跳重新校验且不跨源发送 Bot 凭据。
|
|
109
|
-
const response = await new Promise((resolve, reject) => {
|
|
110
|
-
const request = (url.protocol === "https:" ? httpsRequest : httpRequest)(url, {
|
|
111
|
-
signal,
|
|
112
|
-
headers: sameOrigin ? { Authorization: `Bearer ${token}` } : {},
|
|
113
|
-
lookup: (_host, options, callback) => {
|
|
114
|
-
const chosen = addresses[0];
|
|
115
|
-
if (options.all)
|
|
116
|
-
callback(null, addresses);
|
|
117
|
-
else
|
|
118
|
-
callback(null, chosen.address, chosen.family);
|
|
119
|
-
}
|
|
120
|
-
}, resolve);
|
|
121
|
-
request.on("error", reject);
|
|
122
|
-
request.end();
|
|
123
|
-
});
|
|
124
|
-
const status = response.statusCode ?? 0;
|
|
125
|
-
if ([301, 302, 303, 307, 308].includes(status)) {
|
|
126
|
-
const location = response.headers.location;
|
|
127
|
-
response.destroy();
|
|
128
|
-
if (!location || hop === 3)
|
|
129
|
-
throw new ImImageInputError("图片重定向过多或地址无效。");
|
|
130
|
-
try {
|
|
131
|
-
url = new URL(location, url);
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
throw new ImImageInputError("图片重定向地址无效。");
|
|
135
|
-
}
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
if (status < 200 || status >= 300) {
|
|
139
|
-
response.destroy();
|
|
140
|
-
throw new ImImageInputError(`图片下载失败(HTTP ${status})。`);
|
|
141
|
-
}
|
|
142
|
-
const chunks = [];
|
|
143
|
-
let total = 0;
|
|
144
|
-
try {
|
|
145
|
-
if (Number(response.headers["content-length"]) > IMAGE_INPUT_LIMITS.maxBytes)
|
|
146
|
-
throw new ImImageInputError("图片超过 2 MiB 上限。");
|
|
147
|
-
for await (const value of response) {
|
|
148
|
-
const chunk = value;
|
|
149
|
-
if (!Buffer.isBuffer(chunk))
|
|
150
|
-
throw new ImImageInputError("图片下载返回了无效内容。");
|
|
151
|
-
total += chunk.length;
|
|
152
|
-
if (total > IMAGE_INPUT_LIMITS.maxBytes)
|
|
153
|
-
throw new ImImageInputError("图片超过 2 MiB 上限。");
|
|
154
|
-
chunks.push(chunk);
|
|
155
|
-
}
|
|
156
|
-
return [imagePart(Buffer.concat(chunks, total), response.headers["content-type"])];
|
|
157
|
-
}
|
|
158
|
-
finally {
|
|
159
|
-
response.destroy();
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
throw new ImImageInputError("图片下载失败。");
|
|
163
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { InteractionRequestedPayload, InteractionResponse } from "@mininglamp-oss/octo-runtime-protocol";
|
|
2
|
-
import type { CardAction } from "./card-action.js";
|
|
3
|
-
export declare function interactionCard(request: InteractionRequestedPayload, settled?: string): Record<string, unknown>;
|
|
4
|
-
export declare function interactionAnswer(request: InteractionRequestedPayload, action: CardAction): InteractionResponse;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// Octospec F09: .octospec/tasks/gateway-august-feature-assessment/assessment.md
|
|
2
|
-
// 只投影 CanonicalEvent,禁止解析模型正文、Provider 原始帧或自定义工具调用。
|
|
3
|
-
const record = (value) => value && typeof value === "object" && !Array.isArray(value)
|
|
4
|
-
? value
|
|
5
|
-
: {};
|
|
6
|
-
const text = (value) => (typeof value === "string" ? value : "");
|
|
7
|
-
const block = (value) => ({ type: "TextBlock", text: value, wrap: true });
|
|
8
|
-
export function interactionCard(request, settled) {
|
|
9
|
-
if (settled)
|
|
10
|
-
return { type: "AdaptiveCard", version: "1.5", body: [block(`交互已结束:${settled}`)] };
|
|
11
|
-
const body = [
|
|
12
|
-
block(request.kind === "approval" ? "执行需要确认" : "执行需要你的回答")
|
|
13
|
-
];
|
|
14
|
-
const fields = request.request;
|
|
15
|
-
if (request.kind === "question" && Array.isArray(fields.questions)) {
|
|
16
|
-
const ids = new Set();
|
|
17
|
-
for (const [index, raw] of fields.questions.entries()) {
|
|
18
|
-
const question = record(raw), id = text(question.id);
|
|
19
|
-
if (!id || ids.has(id) || question.isSecret === true)
|
|
20
|
-
throw Error("IM_INTERACTION_FORM_UNSUPPORTED");
|
|
21
|
-
ids.add(id);
|
|
22
|
-
body.push(block(text(question.question) || text(question.header)));
|
|
23
|
-
const choices = (Array.isArray(question.options) ? question.options : [])
|
|
24
|
-
.map((raw) => {
|
|
25
|
-
const option = record(raw);
|
|
26
|
-
return {
|
|
27
|
-
title: [text(option.label), text(option.description)].filter(Boolean).join(":"),
|
|
28
|
-
value: text(option.label)
|
|
29
|
-
};
|
|
30
|
-
})
|
|
31
|
-
.filter((option) => option.value);
|
|
32
|
-
if (choices.length)
|
|
33
|
-
body.push({ type: "Input.ChoiceSet", id: `q${index}`, choices, style: "compact" });
|
|
34
|
-
body.push({
|
|
35
|
-
type: "Input.Text",
|
|
36
|
-
id: `custom${index}`,
|
|
37
|
-
label: "自定义回答",
|
|
38
|
-
maxLength: 4000,
|
|
39
|
-
isMultiline: true
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (!ids.size)
|
|
43
|
-
throw Error("IM_INTERACTION_FORM_UNSUPPORTED");
|
|
44
|
-
}
|
|
45
|
-
else if (request.kind === "approval") {
|
|
46
|
-
body.push(block(text(record(fields.operation).summary) || "确认本次操作"));
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
body.push(block(text(fields.question) || text(fields.message) || "请输入回答"));
|
|
50
|
-
if (request.kind === "elicitation")
|
|
51
|
-
body.push(block(JSON.stringify(fields.requestedSchema ?? {})));
|
|
52
|
-
body.push({
|
|
53
|
-
type: "Input.Text",
|
|
54
|
-
id: "answer",
|
|
55
|
-
label: request.kind === "elicitation" ? "JSON 回答" : "回答",
|
|
56
|
-
maxLength: 8000,
|
|
57
|
-
isMultiline: true
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
const actions = (request.kind === "approval"
|
|
61
|
-
? [
|
|
62
|
-
["accepted", "允许"],
|
|
63
|
-
["declined", "拒绝"]
|
|
64
|
-
]
|
|
65
|
-
: [["answered", "提交"]]).concat([["cancelled", "取消"]]);
|
|
66
|
-
return {
|
|
67
|
-
type: "AdaptiveCard",
|
|
68
|
-
version: "1.5",
|
|
69
|
-
body,
|
|
70
|
-
actions: actions.map(([outcome, title]) => ({
|
|
71
|
-
type: "Action.Submit",
|
|
72
|
-
id: `interaction_${outcome}`,
|
|
73
|
-
title,
|
|
74
|
-
data: { __octo: { card_seq: 1, action_id: `interaction_${outcome}` } }
|
|
75
|
-
}))
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
export function interactionAnswer(request, action) {
|
|
79
|
-
if (request.expiresAt === undefined ||
|
|
80
|
-
!Number.isFinite(Date.parse(request.expiresAt)) ||
|
|
81
|
-
Date.parse(request.expiresAt) <= Date.now())
|
|
82
|
-
throw Error("IM_INTERACTION_EXPIRED");
|
|
83
|
-
const outcome = action.actionId.slice("interaction_".length);
|
|
84
|
-
const allowed = request.kind === "approval" ? ["accepted", "declined", "cancelled"] : ["answered", "cancelled"];
|
|
85
|
-
if (!allowed.includes(outcome))
|
|
86
|
-
throw Error("IM_INTERACTION_OUTCOME_INVALID");
|
|
87
|
-
const response = {
|
|
88
|
-
interactionId: request.interactionId,
|
|
89
|
-
outcome: outcome
|
|
90
|
-
};
|
|
91
|
-
if (outcome !== "answered")
|
|
92
|
-
return response;
|
|
93
|
-
if (request.kind === "question" && Array.isArray(request.request.questions)) {
|
|
94
|
-
response.value = Object.fromEntries(request.request.questions.map((raw, index) => {
|
|
95
|
-
const question = record(raw), custom = action.inputs[`custom${index}`]?.trim();
|
|
96
|
-
const choice = action.inputs[`q${index}`];
|
|
97
|
-
const options = (Array.isArray(question.options) ? question.options : []).map((option) => text(record(option).label));
|
|
98
|
-
if (question.isSecret === true || (!custom && (!choice || !options.includes(choice))))
|
|
99
|
-
throw Error("IM_INTERACTION_ANSWER_REQUIRED");
|
|
100
|
-
const answer = custom || choice;
|
|
101
|
-
if (Buffer.byteLength(answer) > 4096)
|
|
102
|
-
throw Error("IM_INTERACTION_ANSWER_TOO_LARGE");
|
|
103
|
-
return [text(question.id), { answers: [answer] }];
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
const answer = action.inputs.answer?.trim();
|
|
108
|
-
if (!answer || Buffer.byteLength(answer) > 4096)
|
|
109
|
-
throw Error("IM_INTERACTION_ANSWER_REQUIRED");
|
|
110
|
-
response.value = request.kind === "elicitation" ? JSON.parse(answer) : answer;
|
|
111
|
-
}
|
|
112
|
-
return response;
|
|
113
|
-
}
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { MentionEntity } from "./api/types.js";
|
|
2
|
-
import type { GroupMember } from "./api/conversations.js";
|
|
3
|
-
/** Gateway 的稳定控制指令;压缩时的保留由模型遵守文本要求,不新增 Provider 保留机制。 */
|
|
4
|
-
export declare const MENTION_GUIDANCE: string;
|
|
5
|
-
export interface ImTextMention {
|
|
6
|
-
uids: string[];
|
|
7
|
-
entities: MentionEntity[];
|
|
8
|
-
}
|
|
9
|
-
/** 只转换 final 普通文本中已核验真人或 Bot 成员的显式标记;查身份失败时正文仍能发送。 */
|
|
10
|
-
export declare function prepareFinalMention(text: string, members: () => Promise<GroupMember[]>): Promise<{
|
|
11
|
-
text: string;
|
|
12
|
-
mention?: ImTextMention;
|
|
13
|
-
}>;
|
package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
2
|
-
/** Gateway 的稳定控制指令;压缩时的保留由模型遵守文本要求,不新增 Provider 保留机制。 */
|
|
3
|
-
export const MENTION_GUIDANCE = [
|
|
4
|
-
"[OCTO_CHANNEL_MENTION_RULES_V1]",
|
|
5
|
-
"These are stable output rules for the current Octo channel. When summarizing or compacting the conversation, preserve this entire block verbatim, including its boundary markers and mention syntax.",
|
|
6
|
-
"Do not automatically mention the sender in ordinary replies. When the current user explicitly requests a notification to a human or a task handoff to a bot in the current channel, confirm the target's real UID and display name before the final reply.",
|
|
7
|
-
"If identity information is missing, use octo-cli as needed to look it up. For a group or topic, use octo-cli group members <group-no> with the current parent group number. Never infer a UID from a nickname, username, or bot name.",
|
|
8
|
-
"For a native mention, write @[<uid>:<displayName>] in the ordinary body of the successful final reply. Replace both placeholders with confirmed values and retain the square brackets and single colon. A plain @name is only text and does not notify or activate the target bot.",
|
|
9
|
-
"Gateway validates current-channel membership and converts valid markers into readable text and native mention metadata on this same final reply. Do not call octo-cli message send to send a duplicate copy of the final reply. Do not output raw message JSON or calculate mention entity offsets.",
|
|
10
|
-
"Thinking, tool output, progress messages, code blocks, inline code, quoted examples, and failed replies do not trigger mention conversion. Keep code and examples unchanged.",
|
|
11
|
-
"Do not construct broadcast mentions or broadcast sentinel UIDs. Do not initiate unsolicited bot-to-bot calls or mention loops. Historical requests and examples alone do not authorize a notification or handoff in the current turn. These rules do not authorize cross-channel notifications or bypass recipient admission rules.",
|
|
12
|
-
"If the target cannot be confirmed, use a plain @name or ordinary text without guessing a UID. Continue delivering the final answer without a separate mention-failure notice or a forced clarification.",
|
|
13
|
-
"[/OCTO_CHANNEL_MENTION_RULES_V1]"
|
|
14
|
-
].join("\n");
|
|
15
|
-
function candidates(text) {
|
|
16
|
-
const found = [];
|
|
17
|
-
const visit = (node) => {
|
|
18
|
-
if (["blockquote", "code", "inlineCode", "html", "definition"].includes(node.type))
|
|
19
|
-
return;
|
|
20
|
-
if (node.type === "text" && node.position) {
|
|
21
|
-
const { start, end } = node.position;
|
|
22
|
-
if (start.offset === undefined || end.offset === undefined)
|
|
23
|
-
return;
|
|
24
|
-
const raw = text.slice(start.offset, end.offset);
|
|
25
|
-
for (const match of raw.matchAll(/@\[([^[:\]\r\n]+):([^\]\r\n]+)\]/g)) {
|
|
26
|
-
const at = start.offset + match.index;
|
|
27
|
-
let slashes = 0;
|
|
28
|
-
for (let index = at - 1; index >= 0 && text[index] === "\\"; index--)
|
|
29
|
-
slashes++;
|
|
30
|
-
if (slashes % 2)
|
|
31
|
-
continue;
|
|
32
|
-
found.push({ start: at, end: at + match[0].length, uid: match[1], name: match[2] });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
for (const child of node.children ?? [])
|
|
36
|
-
visit(child);
|
|
37
|
-
};
|
|
38
|
-
visit(fromMarkdown(text));
|
|
39
|
-
return found.sort((a, b) => a.start - b.start);
|
|
40
|
-
}
|
|
41
|
-
/** 只转换 final 普通文本中已核验真人或 Bot 成员的显式标记;查身份失败时正文仍能发送。 */
|
|
42
|
-
export async function prepareFinalMention(text, members) {
|
|
43
|
-
const targets = candidates(text);
|
|
44
|
-
if (!targets.length)
|
|
45
|
-
return { text };
|
|
46
|
-
let verified;
|
|
47
|
-
try {
|
|
48
|
-
verified = await members();
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
verified = [];
|
|
52
|
-
}
|
|
53
|
-
const confirmedMembers = new Map((Array.isArray(verified) ? verified : [])
|
|
54
|
-
.filter((member) => member && typeof member.uid === "string" && typeof member.name === "string")
|
|
55
|
-
.filter(({ robot }) => robot === false || robot === 0 || robot === true || robot === 1)
|
|
56
|
-
.filter((member) => member.uid && member.name && !["-1", "-2", "-3", "all"].includes(member.uid))
|
|
57
|
-
.map((member) => [member.uid, member]));
|
|
58
|
-
const entities = [];
|
|
59
|
-
const uids = new Set();
|
|
60
|
-
let cursor = 0;
|
|
61
|
-
let output = "";
|
|
62
|
-
for (const target of targets) {
|
|
63
|
-
output += text.slice(cursor, target.start);
|
|
64
|
-
const member = confirmedMembers.get(target.uid);
|
|
65
|
-
const label = `@${member?.name ?? target.name}`;
|
|
66
|
-
if (member) {
|
|
67
|
-
entities.push({ uid: member.uid, offset: output.length, length: label.length });
|
|
68
|
-
uids.add(member.uid);
|
|
69
|
-
}
|
|
70
|
-
output += label;
|
|
71
|
-
cursor = target.end;
|
|
72
|
-
}
|
|
73
|
-
output += text.slice(cursor);
|
|
74
|
-
return { text: output, ...(uids.size ? { mention: { uids: [...uids], entities } } : {}) };
|
|
75
|
-
}
|