@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,165 +0,0 @@
|
|
|
1
|
-
import { CONTEXT_SCHEMA, assertContextEnvelope } from "@mininglamp-oss/octo-runtime-protocol";
|
|
2
|
-
/**
|
|
3
|
-
* 只合并本轮数据,不保留历史。动态同 key 整项替换且保留静态位置,新项按返回顺序追加。
|
|
4
|
-
* instructions.entries 也不拼接:覆盖方须显式保留需要的固定人设;空动态列表不删除静态项。
|
|
5
|
-
* 两个来源先分别校验,避免同源重复 key 被覆盖掩盖;返回副本隔离宿主与插件的后续修改。
|
|
6
|
-
* 调用方可在来源校验后显式选择有效项,选择策略归调用方;最终合并预算仍强制校验。
|
|
7
|
-
*/
|
|
8
|
-
export function mergeConfiguredContexts(base, dynamic, selectItems) {
|
|
9
|
-
assertContextEnvelope({ schema: CONTEXT_SCHEMA, items: base });
|
|
10
|
-
assertContextEnvelope({ schema: CONTEXT_SCHEMA, items: dynamic });
|
|
11
|
-
if (selectItems) {
|
|
12
|
-
base = selectItems(base);
|
|
13
|
-
dynamic = selectItems(dynamic);
|
|
14
|
-
assertContextEnvelope({ schema: CONTEXT_SCHEMA, items: base });
|
|
15
|
-
assertContextEnvelope({ schema: CONTEXT_SCHEMA, items: dynamic });
|
|
16
|
-
}
|
|
17
|
-
const items = [...base];
|
|
18
|
-
const positions = new Map(items.map((item, index) => [`${item.namespace}/${item.name}`, index]));
|
|
19
|
-
for (const item of dynamic) {
|
|
20
|
-
const key = `${item.namespace}/${item.name}`;
|
|
21
|
-
const position = positions.get(key);
|
|
22
|
-
if (position === undefined) {
|
|
23
|
-
positions.set(key, items.length);
|
|
24
|
-
items.push(item);
|
|
25
|
-
}
|
|
26
|
-
else
|
|
27
|
-
items[position] = item;
|
|
28
|
-
}
|
|
29
|
-
const envelope = { schema: CONTEXT_SCHEMA, items };
|
|
30
|
-
assertContextEnvelope(envelope);
|
|
31
|
-
return structuredClone(items);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* 每个 Extra 共用一个有界回调池,而非每个 Bot 各建一份额度。
|
|
35
|
-
* 超时只结束本轮等待,不能强制结束外部 Promise;实际操作结束前仍须占额,防止挂起 IO 累积。
|
|
36
|
-
*/
|
|
37
|
-
export function createContextLoader(callback, settings, owner) {
|
|
38
|
-
const options = settings ?? {};
|
|
39
|
-
if (!options ||
|
|
40
|
-
typeof options !== "object" ||
|
|
41
|
-
Array.isArray(options) ||
|
|
42
|
-
Object.keys(options).some((key) => !["timeout_ms", "max_in_flight"].includes(key)))
|
|
43
|
-
throw new Error("IM_CONTEXT_LOADING_CONFIG_INVALID");
|
|
44
|
-
const timeout = options.timeout_ms ?? 5_000;
|
|
45
|
-
const capacity = options.max_in_flight ?? 8;
|
|
46
|
-
if (typeof timeout !== "number" ||
|
|
47
|
-
!Number.isInteger(timeout) ||
|
|
48
|
-
timeout < 1 ||
|
|
49
|
-
timeout > 30_000 ||
|
|
50
|
-
typeof capacity !== "number" ||
|
|
51
|
-
!Number.isInteger(capacity) ||
|
|
52
|
-
capacity < 1 ||
|
|
53
|
-
capacity > 32)
|
|
54
|
-
throw new Error("IM_CONTEXT_LOADING_CONFIG_INVALID");
|
|
55
|
-
const pending = new Set();
|
|
56
|
-
const stop = new AbortController();
|
|
57
|
-
return {
|
|
58
|
-
async load(config, signal, selectItems) {
|
|
59
|
-
const base = config.context?.items ?? [];
|
|
60
|
-
if (!Array.isArray(base))
|
|
61
|
-
throw new Error("IM_CONTEXT_INVALID");
|
|
62
|
-
if (!callback)
|
|
63
|
-
return mergeConfiguredContexts(base, [], selectItems);
|
|
64
|
-
owner.throwIfAborted();
|
|
65
|
-
stop.signal.throwIfAborted();
|
|
66
|
-
signal.throwIfAborted();
|
|
67
|
-
// 满额直接拒绝,不再建立等待队列;否则排队的配置副本和闭包也可能无限增长。
|
|
68
|
-
if (pending.size >= capacity)
|
|
69
|
-
throw new Error("IM_CONTEXT_LOADING_BUSY");
|
|
70
|
-
const abort = new AbortController();
|
|
71
|
-
const combined = AbortSignal.any([owner, stop.signal, signal, abort.signal]);
|
|
72
|
-
let timer;
|
|
73
|
-
let onAbort;
|
|
74
|
-
const operation = Promise.resolve()
|
|
75
|
-
.then(() => {
|
|
76
|
-
combined.throwIfAborted();
|
|
77
|
-
// 每轮重新调用同一业务函数,不在启动时预取;下一轮可读到宿主已更新的数据。
|
|
78
|
-
return callback(structuredClone(config), { signal: combined });
|
|
79
|
-
})
|
|
80
|
-
.then((items) => {
|
|
81
|
-
// 超时或取消后的迟到结果不能再校验、复制或进入本轮模型输入。
|
|
82
|
-
combined.throwIfAborted();
|
|
83
|
-
assertBoundedJson(items);
|
|
84
|
-
return mergeConfiguredContexts(base, items, selectItems);
|
|
85
|
-
});
|
|
86
|
-
pending.add(operation);
|
|
87
|
-
// 跟踪真实操作,而非 race 的等待结果;迟到 reject 也必须被消费,避免未处理拒绝。
|
|
88
|
-
void operation.finally(() => pending.delete(operation)).catch(() => undefined);
|
|
89
|
-
try {
|
|
90
|
-
return await Promise.race([
|
|
91
|
-
operation,
|
|
92
|
-
new Promise((_, reject) => {
|
|
93
|
-
onAbort = () => reject(new Error("IM_CONTEXT_LOADING_CANCELLED"));
|
|
94
|
-
combined.addEventListener("abort", onAbort, { once: true });
|
|
95
|
-
if (combined.aborted)
|
|
96
|
-
onAbort();
|
|
97
|
-
timer = setTimeout(() => {
|
|
98
|
-
reject(new Error("IM_CONTEXT_LOADING_TIMEOUT"));
|
|
99
|
-
abort.abort();
|
|
100
|
-
}, timeout);
|
|
101
|
-
})
|
|
102
|
-
]);
|
|
103
|
-
}
|
|
104
|
-
finally {
|
|
105
|
-
clearTimeout(timer);
|
|
106
|
-
if (onAbort)
|
|
107
|
-
combined.removeEventListener("abort", onAbort);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
async close() {
|
|
111
|
-
// 等待实际 IO 退出;外层 Extra 各阶段共用 4 秒或继承的更早截止,到期保留失败实例阻止重载。
|
|
112
|
-
stop.abort();
|
|
113
|
-
await Promise.allSettled([...pending]);
|
|
114
|
-
},
|
|
115
|
-
get inFlight() {
|
|
116
|
-
return pending.size;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
// 先限制外部结果的深度和遍历成本,再进入协议校验、序列化和复制,避免校验本身放大内存。
|
|
121
|
-
// 这不是 JS 沙箱:无法限制业务函数执行期间自行分配的内存或阻塞事件循环。
|
|
122
|
-
export function assertBoundedJson(value) {
|
|
123
|
-
if (!Array.isArray(value) || value.length > 32)
|
|
124
|
-
throw new Error("IM_CONTEXT_RESULT_INVALID");
|
|
125
|
-
// 预检预算覆盖节点、键和字符;最终字节数及 item 约束仍由 Context v3 校验器决定。
|
|
126
|
-
let budget = 262_144;
|
|
127
|
-
const ancestors = new Set();
|
|
128
|
-
const visit = (item, depth) => {
|
|
129
|
-
if (depth > 32 || --budget < 0)
|
|
130
|
-
throw new Error("IM_CONTEXT_RESULT_TOO_LARGE");
|
|
131
|
-
if (item === null || typeof item === "boolean")
|
|
132
|
-
return;
|
|
133
|
-
if (typeof item === "string") {
|
|
134
|
-
budget -= item.length * 3;
|
|
135
|
-
if (budget < 0)
|
|
136
|
-
throw new Error("IM_CONTEXT_RESULT_TOO_LARGE");
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (typeof item === "number" && Number.isFinite(item))
|
|
140
|
-
return;
|
|
141
|
-
if (!item ||
|
|
142
|
-
typeof item !== "object" ||
|
|
143
|
-
ancestors.has(item) ||
|
|
144
|
-
(!Array.isArray(item) && Object.getPrototypeOf(item) !== Object.prototype))
|
|
145
|
-
throw new Error("IM_CONTEXT_RESULT_INVALID");
|
|
146
|
-
if (Array.isArray(item) && item.length > budget)
|
|
147
|
-
throw new Error("IM_CONTEXT_RESULT_TOO_LARGE");
|
|
148
|
-
// 不执行业务 getter/toJSON;否则一次普通校验也可能触发副作用或生成更大的对象。
|
|
149
|
-
const toJson = Object.getOwnPropertyDescriptor(item, "toJSON");
|
|
150
|
-
if (toJson && (!Object.hasOwn(toJson, "value") || typeof toJson.value === "function"))
|
|
151
|
-
throw new Error("IM_CONTEXT_RESULT_INVALID");
|
|
152
|
-
ancestors.add(item);
|
|
153
|
-
for (const key in item) {
|
|
154
|
-
if (!Object.hasOwn(item, key))
|
|
155
|
-
continue;
|
|
156
|
-
budget -= key.length * 3;
|
|
157
|
-
const descriptor = Object.getOwnPropertyDescriptor(item, key);
|
|
158
|
-
if (!Object.hasOwn(descriptor, "value"))
|
|
159
|
-
throw new Error("IM_CONTEXT_RESULT_INVALID");
|
|
160
|
-
visit(descriptor.value, depth + 1);
|
|
161
|
-
}
|
|
162
|
-
ancestors.delete(item);
|
|
163
|
-
};
|
|
164
|
-
visit(value, 0);
|
|
165
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { AgentExecutor, HostedAdapterMetadata } from "@mininglamp-oss/octo-runtime-executor-core";
|
|
2
|
-
import { type KernelClient } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
3
|
-
import { type InputInvoke, type InteractionResponse, type NativeInteractionResponse } from "@mininglamp-oss/octo-runtime-protocol";
|
|
4
|
-
/** 宿主显式选择执行位置;direct 始终借用同一 Core,ipc 只连接已有服务。 */
|
|
5
|
-
export type ExtraExecution = {
|
|
6
|
-
kind: "direct";
|
|
7
|
-
executor: AgentExecutor;
|
|
8
|
-
endpoint?: never;
|
|
9
|
-
} | {
|
|
10
|
-
kind: "ipc";
|
|
11
|
-
endpoint: string;
|
|
12
|
-
executor?: never;
|
|
13
|
-
};
|
|
14
|
-
/** Extra 只控制本 scope 的调用;不暴露执行器 shutdown 或 Kernel 的低层恢复原语。 */
|
|
15
|
-
export interface ExtraExecutionContext {
|
|
16
|
-
readonly kind: "direct" | "ipc";
|
|
17
|
-
readonly invoke: InputInvoke;
|
|
18
|
-
cancelInvocation(id: string, reason?: string): Promise<{
|
|
19
|
-
accepted: boolean;
|
|
20
|
-
}>;
|
|
21
|
-
respondInteraction(id: string, response: InteractionResponse): Promise<void>;
|
|
22
|
-
respondNativeInteraction(id: string, response: NativeInteractionResponse): Promise<void>;
|
|
23
|
-
list(): Promise<HostedAdapterMetadata[]>;
|
|
24
|
-
}
|
|
25
|
-
export interface ExtraExecutionScope {
|
|
26
|
-
context: ExtraExecutionContext;
|
|
27
|
-
available(): Promise<boolean>;
|
|
28
|
-
stopAdmission(): void;
|
|
29
|
-
drain(options: {
|
|
30
|
-
deadline: number;
|
|
31
|
-
reason: string;
|
|
32
|
-
}): Promise<{
|
|
33
|
-
complete: boolean;
|
|
34
|
-
}>;
|
|
35
|
-
release(): Promise<void>;
|
|
36
|
-
}
|
|
37
|
-
/** 复用同一 IPC client 的登记、取消重试及恢复逻辑,不复制协议实现。 */
|
|
38
|
-
export declare function ipcExecutionContext(client: KernelClient): ExtraExecutionContext;
|
|
39
|
-
export declare function createIpcExecutionScope(client: KernelClient): ExtraExecutionScope;
|
|
40
|
-
/**
|
|
41
|
-
* 将 Core 的执行 iterator 留在共享有界源中独立驱动;插件只有观察视图。
|
|
42
|
-
* 完整接纳凭据到达前只操作自己的 signal,绝不凭调用方传入的 id 取消共享 Core。
|
|
43
|
-
*/
|
|
44
|
-
export declare function createDirectExecutionScope(executor: AgentExecutor): ExtraExecutionScope;
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { setTimeout as delay } from "node:timers/promises";
|
|
2
|
-
import { HostRunService, KernelError, admissionClosedError } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
3
|
-
import { createInputInvoke, identifyInvokeInput, assertInvokeRequestSize, isHostTerminal } from "@mininglamp-oss/octo-runtime-protocol";
|
|
4
|
-
/** 复用同一 IPC client 的登记、取消重试及恢复逻辑,不复制协议实现。 */
|
|
5
|
-
export function ipcExecutionContext(client) {
|
|
6
|
-
return Object.freeze({
|
|
7
|
-
kind: "ipc",
|
|
8
|
-
invoke: client.invoke,
|
|
9
|
-
cancelInvocation: (id, reason) => client.cancelInvocation(id, reason),
|
|
10
|
-
respondInteraction: (id, response) => client.respondInteraction(id, response),
|
|
11
|
-
respondNativeInteraction: (id, response) => client.respondNativeInteraction(id, response),
|
|
12
|
-
list: () => client.list()
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export function createIpcExecutionScope(client) {
|
|
16
|
-
return {
|
|
17
|
-
context: ipcExecutionContext(client),
|
|
18
|
-
available: () => client.status().then((status) => status.execution_ready, () => false),
|
|
19
|
-
stopAdmission: () => client.invocations.stopAdmission(),
|
|
20
|
-
drain: (options) => client.invocations.drain(options),
|
|
21
|
-
release() {
|
|
22
|
-
client.close();
|
|
23
|
-
return Promise.resolve();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
// 只协调显式共享同一对象的 scope;缓冲总额不随 Extra 数量倍增,不创建全局执行器。
|
|
28
|
-
const coordinators = new WeakMap();
|
|
29
|
-
/**
|
|
30
|
-
* 将 Core 的执行 iterator 留在共享有界源中独立驱动;插件只有观察视图。
|
|
31
|
-
* 完整接纳凭据到达前只操作自己的 signal,绝不凭调用方传入的 id 取消共享 Core。
|
|
32
|
-
*/
|
|
33
|
-
export function createDirectExecutionScope(executor) {
|
|
34
|
-
let coordinator = coordinators.get(executor);
|
|
35
|
-
if (!coordinator) {
|
|
36
|
-
coordinator = {
|
|
37
|
-
users: 0,
|
|
38
|
-
source: new HostRunService({
|
|
39
|
-
invoke: executor.invoke,
|
|
40
|
-
invokeFrames: (input, environment) => executor.invokeFrames(input, environment),
|
|
41
|
-
list: (configurations) => executor.describe(configurations),
|
|
42
|
-
probe: (type, options) => Promise.resolve(executor.probe(type, options)),
|
|
43
|
-
cancel: (id, reason) => Promise.resolve({ cancelled: executor.cancel(id, reason) }),
|
|
44
|
-
respondInteraction: (id, response) => executor.respondInteraction(id, response),
|
|
45
|
-
respondNative: (id, response) => executor.respondNative(id, response)
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
coordinators.set(executor, coordinator);
|
|
49
|
-
}
|
|
50
|
-
const shared = coordinator;
|
|
51
|
-
shared.users++;
|
|
52
|
-
const records = new Map();
|
|
53
|
-
const queries = new Set();
|
|
54
|
-
let stopped = false;
|
|
55
|
-
let released = false;
|
|
56
|
-
let draining;
|
|
57
|
-
const assertOpen = () => {
|
|
58
|
-
if (stopped)
|
|
59
|
-
throw admissionClosedError();
|
|
60
|
-
if (!executor.status().available)
|
|
61
|
-
throw new Error("EXECUTOR_CLOSED");
|
|
62
|
-
};
|
|
63
|
-
const owned = (id) => {
|
|
64
|
-
const record = records.get(id);
|
|
65
|
-
if (!record)
|
|
66
|
-
throw new KernelError("INVOCATION_NOT_TRACKED");
|
|
67
|
-
return record;
|
|
68
|
-
};
|
|
69
|
-
const accepted = (id) => {
|
|
70
|
-
const record = owned(id);
|
|
71
|
-
if (!record.receipt)
|
|
72
|
-
throw new KernelError("INVOCATION_NOT_ACCEPTED");
|
|
73
|
-
if (record.failed)
|
|
74
|
-
throw new KernelError("RUN_OUTCOME_UNKNOWN");
|
|
75
|
-
return record.receipt;
|
|
76
|
-
};
|
|
77
|
-
const trackQuery = (pending) => {
|
|
78
|
-
queries.add(pending);
|
|
79
|
-
void pending.then(() => queries.delete(pending), () => queries.delete(pending));
|
|
80
|
-
};
|
|
81
|
-
const cancel = async (id, reason = "caller_cancelled") => {
|
|
82
|
-
const record = owned(id);
|
|
83
|
-
if (!record.receipt) {
|
|
84
|
-
record.controller.abort(reason);
|
|
85
|
-
// 明确拒绝接纳不会取得他人的控制权;已接纳则由此 signal 定向通知同一次调用。
|
|
86
|
-
await record.admitted;
|
|
87
|
-
return { accepted: true };
|
|
88
|
-
}
|
|
89
|
-
const receipt = accepted(id);
|
|
90
|
-
if (shared.source.get(receipt.run_id).terminal)
|
|
91
|
-
return { accepted: false };
|
|
92
|
-
return { accepted: executor.cancel(receipt.invocation_id, reason) };
|
|
93
|
-
};
|
|
94
|
-
async function* observe(input, environment = {}) {
|
|
95
|
-
assertOpen();
|
|
96
|
-
environment.signal?.throwIfAborted();
|
|
97
|
-
assertInvokeRequestSize(input, environment);
|
|
98
|
-
const identified = identifyInvokeInput(structuredClone(input));
|
|
99
|
-
if (records.has(identified.invocationId))
|
|
100
|
-
throw new KernelError("EXECUTION_IDENTITY_CONFLICT");
|
|
101
|
-
if (records.size >= 128)
|
|
102
|
-
throw new KernelError("CLIENT_INVOCATION_CAPACITY_EXHAUSTED");
|
|
103
|
-
const controller = new AbortController();
|
|
104
|
-
const abort = () => controller.abort(environment.signal?.reason);
|
|
105
|
-
environment.signal?.addEventListener("abort", abort, { once: true });
|
|
106
|
-
const admitted = shared.source.submit(identified, {
|
|
107
|
-
...environment,
|
|
108
|
-
...(environment.executionEnvOverrides
|
|
109
|
-
? { executionEnvOverrides: structuredClone(environment.executionEnvOverrides) }
|
|
110
|
-
: {}),
|
|
111
|
-
signal: controller.signal
|
|
112
|
-
});
|
|
113
|
-
const record = {
|
|
114
|
-
controller,
|
|
115
|
-
admitted,
|
|
116
|
-
settled: Promise.resolve(),
|
|
117
|
-
failed: false
|
|
118
|
-
};
|
|
119
|
-
records.set(identified.invocationId, record);
|
|
120
|
-
record.settled = admitted
|
|
121
|
-
.then(async (receipt) => {
|
|
122
|
-
record.receipt = receipt;
|
|
123
|
-
await shared.source.settled(receipt);
|
|
124
|
-
const cleanup = await executor.waitForInvocationCleanup(receipt);
|
|
125
|
-
if (cleanup !== "complete")
|
|
126
|
-
throw new Error("EXTRA_RUN_CLEANUP_INCOMPLETE");
|
|
127
|
-
records.delete(identified.invocationId);
|
|
128
|
-
})
|
|
129
|
-
.catch(() => {
|
|
130
|
-
// submit 明确拒绝时未创建 Core owner;已接纳的失败必须保留容量和关闭失败事实。
|
|
131
|
-
if (!record.receipt)
|
|
132
|
-
records.delete(identified.invocationId);
|
|
133
|
-
else
|
|
134
|
-
record.failed = true;
|
|
135
|
-
})
|
|
136
|
-
.finally(() => environment.signal?.removeEventListener("abort", abort));
|
|
137
|
-
const receipt = await admitted;
|
|
138
|
-
let after = 0;
|
|
139
|
-
while (true) {
|
|
140
|
-
const window = shared.source.read(receipt.run_id, receipt.stream_id, after);
|
|
141
|
-
for (const item of window.events) {
|
|
142
|
-
after = item.seq;
|
|
143
|
-
yield item.event;
|
|
144
|
-
if (isHostTerminal(item.event)) {
|
|
145
|
-
if (item.event.kind === "control" &&
|
|
146
|
-
item.event.control.type === "state" &&
|
|
147
|
-
item.event.control.state === "lost")
|
|
148
|
-
throw new KernelError("RUN_OUTCOME_UNKNOWN");
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// 每次只读取中央窗口的一小批;观察退出不关闭 source,也不撤销已接纳调用。
|
|
153
|
-
await delay(10);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
const context = Object.freeze({
|
|
157
|
-
kind: "direct",
|
|
158
|
-
invoke: createInputInvoke(observe),
|
|
159
|
-
cancelInvocation: cancel,
|
|
160
|
-
respondInteraction: async (id, response) => {
|
|
161
|
-
const receipt = accepted(id);
|
|
162
|
-
await shared.source.respond(receipt.run_id, response);
|
|
163
|
-
},
|
|
164
|
-
respondNativeInteraction: async (id, response) => {
|
|
165
|
-
const receipt = accepted(id);
|
|
166
|
-
await shared.source.respondNativeRun(receipt.run_id, response);
|
|
167
|
-
},
|
|
168
|
-
list: async () => {
|
|
169
|
-
assertOpen();
|
|
170
|
-
if (queries.size >= 128)
|
|
171
|
-
throw new Error("EXTRA_QUERY_CAPACITY_EXHAUSTED");
|
|
172
|
-
const query = executor.describe({}, { onProbe: trackQuery });
|
|
173
|
-
trackQuery(query);
|
|
174
|
-
return query;
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
return {
|
|
178
|
-
context,
|
|
179
|
-
available: () => Promise.resolve(!stopped && executor.status().available),
|
|
180
|
-
stopAdmission() {
|
|
181
|
-
stopped = true;
|
|
182
|
-
},
|
|
183
|
-
drain({ deadline, reason }) {
|
|
184
|
-
stopped = true;
|
|
185
|
-
return (draining ??= (async () => {
|
|
186
|
-
for (const [id] of records)
|
|
187
|
-
void cancel(id, reason).catch(() => undefined);
|
|
188
|
-
while ([...records.values()].some((record) => !record.failed) || queries.size) {
|
|
189
|
-
if (Date.now() >= deadline)
|
|
190
|
-
return { complete: false };
|
|
191
|
-
await delay(Math.min(10, Math.max(1, deadline - Date.now())));
|
|
192
|
-
}
|
|
193
|
-
return { complete: records.size === 0 };
|
|
194
|
-
})());
|
|
195
|
-
},
|
|
196
|
-
async release() {
|
|
197
|
-
stopped = true;
|
|
198
|
-
if (released || records.size || queries.size)
|
|
199
|
-
return;
|
|
200
|
-
released = true;
|
|
201
|
-
if (--shared.users === 0) {
|
|
202
|
-
coordinators.delete(executor);
|
|
203
|
-
await shared.source.close();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { JsonObject, JsonValue } from "./extras.js";
|
|
2
|
-
/** Extra 自有命令的版本化声明;导入模块只声明命令,不初始化服务或访问业务后端。 */
|
|
3
|
-
export interface ExtraCommandExtension {
|
|
4
|
-
apiVersion: 1;
|
|
5
|
-
commands: readonly ExtraCommand[];
|
|
6
|
-
}
|
|
7
|
-
export interface ExtraCommandOption {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
type: "string" | "boolean";
|
|
11
|
-
required?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ExtraCommand {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
options?: readonly ExtraCommandOption[];
|
|
17
|
-
/** 按顺序消费位置参数;不声明就拒绝额外参数,-- 后的文本仍按此声明校验。 */
|
|
18
|
-
arguments?: readonly {
|
|
19
|
-
name: string;
|
|
20
|
-
required?: boolean;
|
|
21
|
-
}[];
|
|
22
|
-
examples?: readonly string[];
|
|
23
|
-
commands?: readonly ExtraCommand[];
|
|
24
|
-
run?: (context: ExtraCommandContext, input: ExtraCommandInput) => Promise<ExtraCommandResult | void>;
|
|
25
|
-
}
|
|
26
|
-
export interface ExtraCommandInput {
|
|
27
|
-
options: Readonly<Record<string, string | boolean>>;
|
|
28
|
-
arguments: readonly string[];
|
|
29
|
-
}
|
|
30
|
-
export interface ExtraCommandResult {
|
|
31
|
-
/** 可选的普通终端安全提示;--json 时输出 value,不从业务 JSON 字段猜测格式。 */
|
|
32
|
-
message?: string;
|
|
33
|
-
value?: JsonValue;
|
|
34
|
-
exitCode?: number;
|
|
35
|
-
}
|
|
36
|
-
export interface ExtraConfigSnapshot {
|
|
37
|
-
config: JsonObject;
|
|
38
|
-
/** 宿主生成的不透明修订,用于保存时检查整份声明是否发生并发变化。 */
|
|
39
|
-
revision: string;
|
|
40
|
-
}
|
|
41
|
-
export interface ExtraConfigSaved {
|
|
42
|
-
saved: true;
|
|
43
|
-
name: string;
|
|
44
|
-
file: string;
|
|
45
|
-
reload_required: true;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* CLI 拥有 Home、IO 与取消信号;业务实现先读快照、在锁外完成交互/校验,再保存。
|
|
49
|
-
* saveConfig 只写当前 Extra 的 config,保留宿主字段;冲突须重新读取,不能盲目重试。
|
|
50
|
-
* output/prompt 的文本由插件负责脱敏;凭据输入方式归 Extra 决定,不使用会回显的 prompt。
|
|
51
|
-
*/
|
|
52
|
-
export interface ExtraCommandContext {
|
|
53
|
-
readonly home: string;
|
|
54
|
-
readonly name: string;
|
|
55
|
-
readonly signal: AbortSignal;
|
|
56
|
-
readonly interactive: boolean;
|
|
57
|
-
readConfig(): Promise<ExtraConfigSnapshot>;
|
|
58
|
-
saveConfig(config: JsonObject, revision: string): Promise<ExtraConfigSaved>;
|
|
59
|
-
readStdin(): Promise<string>;
|
|
60
|
-
output(text: string): void;
|
|
61
|
-
prompt(question: string): Promise<string>;
|
|
62
|
-
}
|
|
63
|
-
/** 可公开的固定诊断;不得把凭据、用户输入或后端错误正文拼入 code/message。 */
|
|
64
|
-
export declare class ExtraCommandError extends Error {
|
|
65
|
-
readonly code: string;
|
|
66
|
-
constructor(code: string, message: string);
|
|
67
|
-
}
|
|
68
|
-
export type { JsonObject, JsonValue } from "./extras.js";
|
|
69
|
-
/** 将宿主保存回执转换为明确的文本/JSON 输出;业务对象不参与回执识别。 */
|
|
70
|
-
export declare function savedConfigResult(saved: ExtraConfigSaved): ExtraCommandResult;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** 可公开的固定诊断;不得把凭据、用户输入或后端错误正文拼入 code/message。 */
|
|
2
|
-
export class ExtraCommandError extends Error {
|
|
3
|
-
code;
|
|
4
|
-
constructor(code, message) {
|
|
5
|
-
super(message);
|
|
6
|
-
this.code = code;
|
|
7
|
-
this.name = "ExtraCommandError";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/** 将宿主保存回执转换为明确的文本/JSON 输出;业务对象不参与回执识别。 */
|
|
11
|
-
export function savedConfigResult(saved) {
|
|
12
|
-
return {
|
|
13
|
-
value: { ...saved },
|
|
14
|
-
message: `${saved.name}: configuration saved. Restart this Extra to apply it.\nConfig file: ${saved.file}`
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ExtraRegistration, type JsonObject } from "./extras.js";
|
|
2
|
-
/** Host-owned, serializable declaration; config remains plugin-specific JSON. */
|
|
3
|
-
export interface ExtraDescriptor {
|
|
4
|
-
name: string;
|
|
5
|
-
module: string;
|
|
6
|
-
enabled?: boolean;
|
|
7
|
-
config: JsonObject;
|
|
8
|
-
}
|
|
9
|
-
/** CLI 配置可由 manifest 提供模块;原生代码声明 ExtraDescriptor 仍显式指定模块。 */
|
|
10
|
-
export interface StoredExtra {
|
|
11
|
-
module?: string;
|
|
12
|
-
enabled?: boolean;
|
|
13
|
-
config: JsonObject;
|
|
14
|
-
}
|
|
15
|
-
export declare function assertStoredExtra(value: unknown): asserts value is StoredExtra;
|
|
16
|
-
export declare function extraRegistration(descriptor: ExtraDescriptor): ExtraRegistration;
|
|
17
|
-
/** Called only by a host that explicitly selects this directory as its source. */
|
|
18
|
-
export declare function readExtraDirectory(directory: string): Promise<ExtraRegistration[]>;
|
|
19
|
-
/** 宿主显式选取的配置文件;保持凭据权限校验,不解析或导入模块。 */
|
|
20
|
-
export declare function readStoredExtra(directory: string, name: string): Promise<StoredExtra>;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { constants } from "node:fs";
|
|
2
|
-
import { lstat, open, readdir } from "node:fs/promises";
|
|
3
|
-
import { isAbsolute, join } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
-
import { withStartupContext } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
6
|
-
import { assertExtraName } from "./extras.js";
|
|
7
|
-
export function assertStoredExtra(value) {
|
|
8
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
9
|
-
throw new Error("EXTRA_CONFIG_OBJECT_REQUIRED");
|
|
10
|
-
const item = value;
|
|
11
|
-
if (Object.keys(item).some((key) => !["module", "enabled", "config"].includes(key)))
|
|
12
|
-
throw new Error("EXTRA_CONFIG_FIELD_INVALID");
|
|
13
|
-
if (item.module !== undefined && (typeof item.module !== "string" || !validModule(item.module)))
|
|
14
|
-
throw new Error("EXTRA_MODULE_INVALID");
|
|
15
|
-
if (item.enabled !== undefined && typeof item.enabled !== "boolean")
|
|
16
|
-
throw new Error("EXTRA_ENABLED_INVALID");
|
|
17
|
-
if (!item.config || typeof item.config !== "object" || Array.isArray(item.config))
|
|
18
|
-
throw new Error("EXTRA_CONFIG_OBJECT_REQUIRED");
|
|
19
|
-
// Reject non-JSON SDK values instead of silently losing them during IPC serialization.
|
|
20
|
-
const visit = (value, seen) => {
|
|
21
|
-
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
22
|
-
return;
|
|
23
|
-
if (typeof value === "number" && Number.isFinite(value))
|
|
24
|
-
return;
|
|
25
|
-
if (typeof value !== "object" || !value || seen.has(value))
|
|
26
|
-
throw new Error("EXTRA_CONFIG_JSON_REQUIRED");
|
|
27
|
-
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype)
|
|
28
|
-
throw new Error("EXTRA_CONFIG_JSON_REQUIRED");
|
|
29
|
-
seen.add(value);
|
|
30
|
-
for (const child of Object.values(value))
|
|
31
|
-
visit(child, seen);
|
|
32
|
-
seen.delete(value);
|
|
33
|
-
};
|
|
34
|
-
visit(item.config, new Set());
|
|
35
|
-
}
|
|
36
|
-
export function extraRegistration(descriptor) {
|
|
37
|
-
assertExtraName(descriptor.name);
|
|
38
|
-
const { name, ...stored } = descriptor;
|
|
39
|
-
assertStoredExtra(stored);
|
|
40
|
-
const module = stored.module;
|
|
41
|
-
if (!module)
|
|
42
|
-
throw new Error("EXTRA_MODULE_REQUIRED");
|
|
43
|
-
return {
|
|
44
|
-
name,
|
|
45
|
-
module,
|
|
46
|
-
config: stored.config,
|
|
47
|
-
enabled: stored.enabled,
|
|
48
|
-
load: () => import(isAbsolute(module) ? pathToFileURL(module).href : module).catch((error) => {
|
|
49
|
-
throw withStartupContext(error, {
|
|
50
|
-
component: name,
|
|
51
|
-
phase: "created",
|
|
52
|
-
context: { module, resource: "extra-module", operation: "import", configKey: "module" }
|
|
53
|
-
});
|
|
54
|
-
})
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
/** Called only by a host that explicitly selects this directory as its source. */
|
|
58
|
-
export async function readExtraDirectory(directory) {
|
|
59
|
-
const entries = await readdir(directory, { withFileTypes: true }).catch((error) => {
|
|
60
|
-
if (error.code === "ENOENT")
|
|
61
|
-
return [];
|
|
62
|
-
throw error;
|
|
63
|
-
});
|
|
64
|
-
const registrations = [];
|
|
65
|
-
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
66
|
-
if (!entry.isDirectory())
|
|
67
|
-
continue;
|
|
68
|
-
assertExtraName(entry.name);
|
|
69
|
-
try {
|
|
70
|
-
const stored = await readStoredExtra(directory, entry.name);
|
|
71
|
-
registrations.push(stored.module
|
|
72
|
-
? extraRegistration({ ...stored, name: entry.name, module: stored.module })
|
|
73
|
-
: {
|
|
74
|
-
...stored,
|
|
75
|
-
name: entry.name,
|
|
76
|
-
load: () => Promise.reject(new Error("EXTRA_MODULE_REQUIRED"))
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
const code = error instanceof Error && /^EXTRA_[A-Z_]+$/.test(error.message)
|
|
81
|
-
? error.message
|
|
82
|
-
: "EXTRA_CONFIG_READ_FAILED";
|
|
83
|
-
registrations.push({
|
|
84
|
-
name: entry.name,
|
|
85
|
-
config: {},
|
|
86
|
-
load: () => Promise.reject(new Error(code, { cause: error }))
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return registrations;
|
|
91
|
-
}
|
|
92
|
-
/** 宿主显式选取的配置文件;保持凭据权限校验,不解析或导入模块。 */
|
|
93
|
-
export async function readStoredExtra(directory, name) {
|
|
94
|
-
assertExtraName(name);
|
|
95
|
-
const file = join(directory, name, "config.json");
|
|
96
|
-
const handle = await open(file, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0)).catch((error) => {
|
|
97
|
-
throw withStartupContext(error, {
|
|
98
|
-
component: name,
|
|
99
|
-
phase: "created",
|
|
100
|
-
context: { path: file, resource: "extra-config", operation: "open", configKey: "config" }
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
try {
|
|
104
|
-
// 权限、大小和读取绑定同一个文件,不允许检查后换成链接或其他目标。
|
|
105
|
-
const info = await handle.stat();
|
|
106
|
-
if (!info.isFile() || (process.platform !== "win32" && info.mode & 0o077))
|
|
107
|
-
throw new Error("EXTRA_CONFIG_PERMISSIONS_INVALID");
|
|
108
|
-
if (!constants.O_NOFOLLOW) {
|
|
109
|
-
const entry = await lstat(file);
|
|
110
|
-
if (!entry.isFile() || entry.dev !== info.dev || entry.ino !== info.ino)
|
|
111
|
-
throw new Error("EXTRA_CONFIG_PERMISSIONS_INVALID");
|
|
112
|
-
}
|
|
113
|
-
const maximum = 1024 * 1024;
|
|
114
|
-
if (info.size > maximum)
|
|
115
|
-
throw new Error("EXTRA_CONFIG_TOO_LARGE");
|
|
116
|
-
const bytes = Buffer.alloc(maximum + 1);
|
|
117
|
-
let length = 0;
|
|
118
|
-
while (length < bytes.length) {
|
|
119
|
-
const { bytesRead } = await handle.read(bytes, length, bytes.length - length, null);
|
|
120
|
-
if (!bytesRead)
|
|
121
|
-
break;
|
|
122
|
-
length += bytesRead;
|
|
123
|
-
}
|
|
124
|
-
if (length > maximum)
|
|
125
|
-
throw new Error("EXTRA_CONFIG_TOO_LARGE");
|
|
126
|
-
const stored = JSON.parse(bytes.subarray(0, length).toString("utf8"));
|
|
127
|
-
assertStoredExtra(stored);
|
|
128
|
-
return stored;
|
|
129
|
-
}
|
|
130
|
-
catch (error) {
|
|
131
|
-
throw withStartupContext(error, {
|
|
132
|
-
component: name,
|
|
133
|
-
phase: "created",
|
|
134
|
-
context: { path: file, resource: "extra-config", operation: "read", configKey: "config" }
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
finally {
|
|
138
|
-
await handle.close();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function validModule(module) {
|
|
142
|
-
if (isAbsolute(module))
|
|
143
|
-
return true;
|
|
144
|
-
if (module.startsWith("file:")) {
|
|
145
|
-
try {
|
|
146
|
-
const url = new URL(module);
|
|
147
|
-
return url.protocol === "file:" && !url.search && !url.hash;
|
|
148
|
-
}
|
|
149
|
-
catch {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return /^(?:@[a-z0-9._-]+\/)?[a-z0-9][a-z0-9._-]*(?:\/[a-zA-Z0-9._-]+)*$/.test(module);
|
|
154
|
-
}
|