@mininglamp-oss/octo-runtime 1.1.5 → 1.1.7
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/apps/cli/dist/adapter-configurations.d.ts +4 -0
- package/apps/cli/dist/adapter-configurations.js +102 -0
- package/apps/cli/dist/build-info.json +2 -2
- package/apps/cli/dist/command-tree.js +1 -1
- package/apps/cli/dist/logs.js +8 -4
- package/apps/cli/dist/main.js +11 -5
- package/apps/cli/dist/output.js +5 -0
- package/apps/cli/dist/playboard.js +3 -2
- package/dist/public/dsh.d.ts +1 -1
- package/dist/public/dsh.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/dist/index.js +5 -2
- 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 +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +17 -0
- 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 +20 -2
- 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 +32 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.js +3 -0
- 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 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.js +161 -26
- 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.js +8 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +32 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-DYOJCNWF.js → chunk-CFKMMCO6.js} +6 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-UOQRXV3Q.js → chunk-LO34KB7D.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/chunk-V5W6ZTYC.js +151 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.d.ts +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.js +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.d.ts +17 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +8 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/launch.d.ts +2 -1
- 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 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.d.ts +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/client.js +8 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.d.ts +10 -6
- 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 +9 -1
- 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 +9 -1
- 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 +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/compatibility.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/compatibility.js +12 -40
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.d.ts +22 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +422 -135
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.d.ts +6 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +2 -0
- 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 +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +19 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +15 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.d.ts +12 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.js +91 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log-worker.js +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/runtime-log.js +13 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.d.ts +9 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/service-status.js +40 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-zcode-gui/dist/index.d.ts +20 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-zcode-gui/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapter-configurations.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapter-configurations.js +102 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/command-tree.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/logs.js +8 -4
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/main.js +11 -5
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +24 -24
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/runner.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/runner.js +102 -52
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/dist/windows-task.js +8 -3
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.d.ts +4 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +9 -4
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-input.js +9 -6
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +47 -4
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/client.js +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/invocation-manifest.js +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/process.d.ts +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/process.js +79 -5
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.d.ts +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +22 -6
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/service.js +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.d.ts +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/submission-error.js +12 -6
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/supervisor.d.ts +4 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/supervisor.js +131 -43
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/config-schema.json +8 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.d.ts +17 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/context-gap.js +22 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/history-context.js +27 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/im-channel.js +462 -228
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.d.ts +5 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/rules-context.js +42 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/session-store.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.d.ts +15 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/application/stable-context.js +28 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/contracts.d.ts +16 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.d.ts +4 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifact-policy.js +12 -9
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/artifacts.js +7 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.d.ts +15 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/identity.js +36 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/delivery/scheduler.js +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.d.ts +5 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/dispatcher.js +39 -22
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.d.ts +29 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/model-wait.js +171 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.d.ts +4 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/execution/task.js +48 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/extra.js +14 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/lifecycle/configuration.js +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.d.ts +7 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/presentation/run-projector.js +265 -38
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/cards.js +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.d.ts +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/client.js +19 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.d.ts +3 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/conversations.js +4 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/errors.js +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/files.js +8 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/api/messages.js +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/card-session.js +27 -15
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.d.ts +17 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/channel.js +217 -50
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connection-error.js +2 -4
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.d.ts +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/connector.js +41 -12
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.d.ts +2 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/contexts.js +53 -82
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.d.ts +12 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-content.js +133 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.d.ts +21 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/history-messages.js +76 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.d.ts +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/mentions.js +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.d.ts +16 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-identities.js +74 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-time.js +19 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.d.ts +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/message-trigger.js +90 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/reasoning-frame.js +39 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.d.ts +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/retry-after.js +60 -0
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/dist/transport/wukong.js +20 -8
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-gateway/package.json +6 -6
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/application/im-channel.js +10 -2
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/extra.js +14 -1
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/dist/transport/channel.js +2 -3
- package/node_modules/@mininglamp-oss/octo-runtime-extra-channel-wecom/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-extra-webui/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.d.ts +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/context-loader.js +11 -4
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/dist/endpoint.js +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +8 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +9 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +18 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +14 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +180 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +314 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.d.ts +129 -0
- package/node_modules/iconv-lite/lib/index.js +182 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +70 -0
- package/node_modules/iconv-lite/types/encodings.d.ts +425 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/package.json +33 -27
- package/packages/octo-runtime-extra-channel-gateway/config-schema.json +8 -1
- package/packages/octo-runtime-protocol/schema/protocol.schema.json +57 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/chunk-G5PWGRL5.js +0 -209
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/desktop-entry.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/desktop-entry.js +0 -16
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-openclaw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
9
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
8
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
9
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.7",
|
|
10
10
|
"ws": "8.22.0"
|
|
11
11
|
},
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -81,13 +81,17 @@ export declare function createOpenCodeAdapter({ command }?: {
|
|
|
81
81
|
}): {
|
|
82
82
|
respondInteraction(invocationId: string, response: import("@mininglamp-oss/octo-runtime-protocol").InteractionResponse): Promise<void>;
|
|
83
83
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<CanonicalEvent>;
|
|
84
|
-
metadata: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterMetadata;
|
|
85
84
|
probe?: (options?: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterProbeOptions) => Promise<ProbeResult>;
|
|
85
|
+
metadata: Omit<import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterMetadata, "protocolSupport"> & {
|
|
86
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
87
|
+
};
|
|
86
88
|
};
|
|
87
89
|
export declare const opencodeAdapter: {
|
|
88
90
|
respondInteraction(invocationId: string, response: import("@mininglamp-oss/octo-runtime-protocol").InteractionResponse): Promise<void>;
|
|
89
91
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<CanonicalEvent>;
|
|
90
|
-
metadata: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterMetadata;
|
|
91
92
|
probe?: (options?: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterProbeOptions) => Promise<ProbeResult>;
|
|
93
|
+
metadata: Omit<import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterMetadata, "protocolSupport"> & {
|
|
94
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
95
|
+
};
|
|
92
96
|
};
|
|
93
97
|
export default opencodeAdapter;
|
|
@@ -193,6 +193,8 @@ export function normalizeOpenCodeEvent(native) {
|
|
|
193
193
|
type: "message.delta",
|
|
194
194
|
payload: {
|
|
195
195
|
text: part.text,
|
|
196
|
+
// 原生 text 是公开最终正文;显式标记,展示层无需猜测缺失的通道。
|
|
197
|
+
channel: "final",
|
|
196
198
|
...(stepId
|
|
197
199
|
? { stepId, messageId: `opencode:${part.id ?? `${stepId}:answer`}` }
|
|
198
200
|
: part.id
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-opencode",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
9
|
-
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.
|
|
10
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
8
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
9
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.7",
|
|
10
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.7"
|
|
11
11
|
},
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"files": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* fallback. Per-session model selection follows the standard ACP path when the
|
|
11
11
|
* runtime configures a model that Qoder advertises.
|
|
12
12
|
*/
|
|
13
|
-
export declare const qoderCliAdapter: Readonly<{
|
|
13
|
+
export declare const qoderCliAdapter: Readonly<Omit<{
|
|
14
14
|
metadata: {
|
|
15
15
|
mcp: true;
|
|
16
16
|
type: string;
|
|
@@ -19,5 +19,13 @@ export declare const qoderCliAdapter: Readonly<{
|
|
|
19
19
|
probe: () => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>;
|
|
20
20
|
respondInteraction(invocationId: string, response: import("@mininglamp-oss/octo-runtime-protocol").InteractionResponse): Promise<void>;
|
|
21
21
|
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context?: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-protocol").CanonicalEvent>;
|
|
22
|
+
}, "metadata"> & {
|
|
23
|
+
metadata: Omit<{
|
|
24
|
+
mcp: true;
|
|
25
|
+
type: string;
|
|
26
|
+
agentSources: "provisioned"[];
|
|
27
|
+
}, "protocolSupport"> & {
|
|
28
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
29
|
+
};
|
|
22
30
|
}>;
|
|
23
31
|
export default qoderCliAdapter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-qodercli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.
|
|
12
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.7"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* binary and is registered as its own adapter type so a runtime can pick the CN
|
|
11
11
|
* build explicitly.
|
|
12
12
|
*/
|
|
13
|
-
export declare const qoderCliCnAdapter: Readonly<{
|
|
13
|
+
export declare const qoderCliCnAdapter: Readonly<Omit<{
|
|
14
14
|
metadata: {
|
|
15
15
|
mcp: true;
|
|
16
16
|
type: string;
|
|
@@ -19,5 +19,13 @@ export declare const qoderCliCnAdapter: Readonly<{
|
|
|
19
19
|
probe: () => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>;
|
|
20
20
|
respondInteraction(invocationId: string, response: import("@mininglamp-oss/octo-runtime-protocol").InteractionResponse): Promise<void>;
|
|
21
21
|
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context?: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-protocol").CanonicalEvent>;
|
|
22
|
+
}, "metadata"> & {
|
|
23
|
+
metadata: Omit<{
|
|
24
|
+
mcp: true;
|
|
25
|
+
type: string;
|
|
26
|
+
agentSources: "provisioned"[];
|
|
27
|
+
}, "protocolSupport"> & {
|
|
28
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
29
|
+
};
|
|
22
30
|
}>;
|
|
23
31
|
export default qoderCliCnAdapter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-qoderclicn",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.
|
|
12
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.7"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -15,14 +15,16 @@ export { watchLineLimit } from "./line-limit.js";
|
|
|
15
15
|
export { readBoundedLines } from "./bounded-lines.js";
|
|
16
16
|
export { HourlyLogWriter, HOURLY_LOG_MAX_BYTES } from "./hourly-log.js";
|
|
17
17
|
export { RuntimeLogging, assertRuntimeLogging, noopRuntimeLog, type RuntimeLog, type RuntimeLogLevel, type RuntimeLoggingOptions } from "./runtime-log.js";
|
|
18
|
-
export { extraStatusRecord, type ExtraStatusRecord } from "./service-status.js";
|
|
18
|
+
export { extraStatusRecord, kernelStatusRecord, type ExtraStatusRecord, type KernelStatusRecord } from "./service-status.js";
|
|
19
19
|
export { sanitizePublicValue } from "./public-display.js";
|
|
20
20
|
export { DEFAULT_REASONING_LEVEL_MAPS, OMNI_REASONING_LEVELS, mapReasoningEffort, reasoningLevelMap, type OmniReasoningLevel, type ReasoningLevelMap } from "./reasoning.js";
|
|
21
|
+
/** Adapter 的编写输入;defineAdapter 在省略协议声明时补 canonical-only 默认值。 */
|
|
21
22
|
export interface AdapterMetadata {
|
|
22
23
|
/** Local implementation support; not a remote runtime admission feature. */
|
|
23
24
|
mcp?: boolean;
|
|
24
25
|
/** False ignores octo.execution/workspace; the Provider owns its workspace. */
|
|
25
26
|
workspace?: boolean;
|
|
27
|
+
/** 仅编写输入可省略;这是执行时消费的协议描述,不能作为业务能力标签。 */
|
|
26
28
|
protocolSupport?: AdapterProtocolSupport;
|
|
27
29
|
type: string;
|
|
28
30
|
agentSources: ("preset" | "provisioned")[];
|
|
@@ -40,6 +42,7 @@ export interface ProbeResult {
|
|
|
40
42
|
version?: string | null;
|
|
41
43
|
reason?: string;
|
|
42
44
|
}
|
|
45
|
+
/** 工厂的编写输入;直接交给 Core 注册时须满足完整的 HostedAdapter 合同。 */
|
|
43
46
|
export interface Adapter<TOutput extends AdapterOutput = AdapterOutput> {
|
|
44
47
|
metadata: AdapterMetadata;
|
|
45
48
|
probe?: (options?: AdapterProbeOptions) => Promise<ProbeResult>;
|
|
@@ -52,6 +55,15 @@ export interface Adapter<TOutput extends AdapterOutput = AdapterOutput> {
|
|
|
52
55
|
*/
|
|
53
56
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncIterable<TOutput>;
|
|
54
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* 工厂输出必须表达已补齐的协议声明,供宿主直接注册;保留作者扩展的字段和方法。
|
|
60
|
+
* 禁止与允许省略字段的编写输入混用,否则会把注册前的类型错误推迟到运行时。
|
|
61
|
+
*/
|
|
62
|
+
export type DefinedAdapter<TAdapter extends Adapter = Adapter> = Readonly<Omit<TAdapter, "metadata"> & {
|
|
63
|
+
metadata: Omit<TAdapter["metadata"], "protocolSupport"> & {
|
|
64
|
+
protocolSupport: AdapterProtocolSupport;
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
55
67
|
/** Provider objects and lifetime signals before the Host assigns stream identity. */
|
|
56
68
|
export type DriverFrame = Pick<NativeHostFrame, "kind" | "messageKind" | "payload"> | {
|
|
57
69
|
kind: "control";
|
|
@@ -92,10 +104,12 @@ interface ProcessExit {
|
|
|
92
104
|
signal: NodeJS.Signals | null;
|
|
93
105
|
}
|
|
94
106
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
107
|
+
* 接收编写输入并返回可注册的 Adapter,省略协议时仅补 canonical-only 声明。
|
|
108
|
+
* 返回类型必须保留字段必有的保证;不得根据缺省声明推断 native 支持。
|
|
109
|
+
* 冻结顶层对象以固定 metadata 和 invoke 引用;嵌套元数据不作深冻结。
|
|
110
|
+
* 工厂不注册或启动 Provider,宿主随后注册并负责执行与关闭。
|
|
97
111
|
*/
|
|
98
|
-
export declare function defineAdapter<TAdapter extends Adapter>(adapter: TAdapter, levels?: ReasoningLevelMap | null):
|
|
112
|
+
export declare function defineAdapter<TAdapter extends Adapter>(adapter: TAdapter, levels?: ReasoningLevelMap | null): DefinedAdapter<TAdapter>;
|
|
99
113
|
/**
|
|
100
114
|
* Spawn a JSON-lines subprocess and yield one parsed native event per stdout
|
|
101
115
|
* line. stderr is buffered and surfaced only if the process exits non-zero (as
|
|
@@ -122,7 +136,7 @@ export declare function parseJsonLine(line: string): Record<string, unknown> | n
|
|
|
122
136
|
* produced a terminal event — synthesize the `onSuccess` events. `cleanup` runs
|
|
123
137
|
* in a `finally` so it fires on cancellation and error paths too.
|
|
124
138
|
*/
|
|
125
|
-
export declare function createJsonCliAdapter<TNative = Record<string, unknown>>(options: JsonCliAdapterOptions<TNative>):
|
|
139
|
+
export declare function createJsonCliAdapter<TNative = Record<string, unknown>>(options: JsonCliAdapterOptions<TNative>): DefinedAdapter<Adapter<CanonicalEvent>>;
|
|
126
140
|
/**
|
|
127
141
|
* Resolve whether a command is runnable. A path-qualified command is checked
|
|
128
142
|
* directly; a bare name is searched across `PATH` (`;`-separated on Windows).
|
|
@@ -6,6 +6,7 @@ import { createInterface } from "node:readline";
|
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import { invocationEnvironment, mergeProcessEnvironment, processEnvironmentValue } from "./environment.js";
|
|
8
8
|
import { createProcessCleanup } from "./process-cleanup.js";
|
|
9
|
+
import { resolveProcessLaunch } from "./process-launch.js";
|
|
9
10
|
import { watchLineLimit } from "./line-limit.js";
|
|
10
11
|
import { mapReasoningEffort, reasoningLevelMap } from "./reasoning.js";
|
|
11
12
|
export { invocationEnvironment, invocationEnvs, mergeProcessEnvironment, processEnvironmentValue } from "./environment.js";
|
|
@@ -21,19 +22,22 @@ export { watchLineLimit } from "./line-limit.js";
|
|
|
21
22
|
export { readBoundedLines } from "./bounded-lines.js";
|
|
22
23
|
export { HourlyLogWriter, HOURLY_LOG_MAX_BYTES } from "./hourly-log.js";
|
|
23
24
|
export { RuntimeLogging, assertRuntimeLogging, noopRuntimeLog } from "./runtime-log.js";
|
|
24
|
-
export { extraStatusRecord } from "./service-status.js";
|
|
25
|
+
export { extraStatusRecord, kernelStatusRecord } from "./service-status.js";
|
|
25
26
|
export { sanitizePublicValue } from "./public-display.js";
|
|
26
27
|
export { DEFAULT_REASONING_LEVEL_MAPS, OMNI_REASONING_LEVELS, mapReasoningEffort, reasoningLevelMap } from "./reasoning.js";
|
|
27
28
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
29
|
+
* 接收编写输入并返回可注册的 Adapter,省略协议时仅补 canonical-only 声明。
|
|
30
|
+
* 返回类型必须保留字段必有的保证;不得根据缺省声明推断 native 支持。
|
|
31
|
+
* 冻结顶层对象以固定 metadata 和 invoke 引用;嵌套元数据不作深冻结。
|
|
32
|
+
* 工厂不注册或启动 Provider,宿主随后注册并负责执行与关闭。
|
|
30
33
|
*/
|
|
31
34
|
export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metadata.type)) {
|
|
32
35
|
if (!adapter?.metadata?.type || typeof adapter.invoke !== "function") {
|
|
33
36
|
throw new TypeError("adapter requires metadata.type and invoke(req)");
|
|
34
37
|
}
|
|
35
38
|
const invoke = adapter.invoke.bind(adapter);
|
|
36
|
-
const
|
|
39
|
+
const metadata = adapter.metadata;
|
|
40
|
+
const protocolSupport = metadata.protocolSupport ?? {
|
|
37
41
|
protocol: `${adapter.metadata.type}.canonical`,
|
|
38
42
|
modes: ["canonical"],
|
|
39
43
|
nativeMethods: []
|
|
@@ -41,7 +45,7 @@ export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metada
|
|
|
41
45
|
return Object.freeze({
|
|
42
46
|
...adapter,
|
|
43
47
|
metadata: {
|
|
44
|
-
...
|
|
48
|
+
...metadata,
|
|
45
49
|
protocolSupport
|
|
46
50
|
},
|
|
47
51
|
async *invoke(request, context) {
|
|
@@ -88,9 +92,11 @@ export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metada
|
|
|
88
92
|
*/
|
|
89
93
|
export async function* spawnJsonLines(options) {
|
|
90
94
|
const { command, args = [], cwd, env, input, signal, parseLine, onInputWritten } = options;
|
|
91
|
-
const
|
|
95
|
+
const processEnv = mergeProcessEnvironment(process.env, env ?? {});
|
|
96
|
+
const launch = resolveProcessLaunch(command, args, { cwd, env: processEnv });
|
|
97
|
+
const child = spawn(launch.command, launch.args, {
|
|
92
98
|
cwd,
|
|
93
|
-
env:
|
|
99
|
+
env: processEnv,
|
|
94
100
|
stdio: ["pipe", "pipe", "pipe"],
|
|
95
101
|
detached: process.platform !== "win32"
|
|
96
102
|
});
|
|
@@ -288,7 +294,8 @@ export async function probeCommand(command, { env = process.env, cwd } = {}) {
|
|
|
288
294
|
continue;
|
|
289
295
|
let version = null;
|
|
290
296
|
try {
|
|
291
|
-
const
|
|
297
|
+
const launch = resolveProcessLaunch(resolve(candidate), ["--version"], { env, cwd });
|
|
298
|
+
const { stdout } = await promisify(execFile)(launch.command, launch.args, {
|
|
292
299
|
env,
|
|
293
300
|
cwd,
|
|
294
301
|
timeout: 2_000,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 在 Provider 启动和版本探测前同步解析 Windows npm 包装器,保持 spawn 的同步返回合同。
|
|
3
|
+
* JS 入口交给 Node,原生入口直接执行;argv 独立传递,未知 batch 沿原路径报错。
|
|
4
|
+
* 返回启动命令和参数;ChildProcess、管道及清理仍由调用方负责。
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveProcessLaunch(command: string, args: readonly string[], { env, cwd }?: {
|
|
7
|
+
env?: NodeJS.ProcessEnv;
|
|
8
|
+
cwd?: string;
|
|
9
|
+
}): {
|
|
10
|
+
command: string;
|
|
11
|
+
args: readonly string[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { readFileSync, statSync } from "node:fs";
|
|
2
|
+
import { basename, delimiter, dirname, extname, join, resolve } from "node:path";
|
|
3
|
+
import { processEnvironmentValue } from "./environment.js";
|
|
4
|
+
function fileSize(file) {
|
|
5
|
+
try {
|
|
6
|
+
const info = statSync(file);
|
|
7
|
+
return info.isFile() ? info.size : undefined;
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
if (["ENOENT", "ENOTDIR"].includes(error.code ?? ""))
|
|
11
|
+
return undefined;
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function commandPath(command, env, cwd) {
|
|
16
|
+
if (/[/\\]/.test(command) || /^[A-Za-z]:/.test(command))
|
|
17
|
+
return resolve(cwd, command);
|
|
18
|
+
const extensions = extname(command)
|
|
19
|
+
? [""]
|
|
20
|
+
: (processEnvironmentValue(env, "PATHEXT") ?? ".COM;.EXE;.BAT;.CMD")
|
|
21
|
+
.split(";")
|
|
22
|
+
.filter((extension) => /^\.(exe|com|cmd|bat)$/i.test(extension));
|
|
23
|
+
const path = processEnvironmentValue(env, "PATH") ?? processEnvironmentValue(process.env, "PATH") ?? "";
|
|
24
|
+
for (const directory of [cwd, ...path.split(delimiter)]) {
|
|
25
|
+
for (const extension of extensions) {
|
|
26
|
+
const candidate = resolve(cwd, directory.replace(/^"(.*)"$/, "$1"), command + extension);
|
|
27
|
+
if (fileSize(candidate) !== undefined)
|
|
28
|
+
return candidate;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 在 Provider 启动和版本探测前同步解析 Windows npm 包装器,保持 spawn 的同步返回合同。
|
|
35
|
+
* JS 入口交给 Node,原生入口直接执行;argv 独立传递,未知 batch 沿原路径报错。
|
|
36
|
+
* 返回启动命令和参数;ChildProcess、管道及清理仍由调用方负责。
|
|
37
|
+
*/
|
|
38
|
+
export function resolveProcessLaunch(command, args, { env = process.env, cwd = process.cwd() } = {}) {
|
|
39
|
+
const original = { command, args };
|
|
40
|
+
if (process.platform !== "win32")
|
|
41
|
+
return original;
|
|
42
|
+
let carrier = commandPath(command, env, cwd);
|
|
43
|
+
if (!carrier)
|
|
44
|
+
return original;
|
|
45
|
+
// probeCommand 可能返回 npm 同时生成的 Unix 入口,仍绑定同一目录的 Windows shim。
|
|
46
|
+
if (!extname(carrier)) {
|
|
47
|
+
const size = fileSize(carrier);
|
|
48
|
+
if (size !== undefined &&
|
|
49
|
+
size <= 64 * 1024 &&
|
|
50
|
+
/^#!.*\bsh\b/.test(readFileSync(carrier, "utf8"))) {
|
|
51
|
+
const sibling = `${carrier}.cmd`;
|
|
52
|
+
if (fileSize(sibling) !== undefined)
|
|
53
|
+
carrier = sibling;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (!/\.(cmd|bat)$/i.test(carrier))
|
|
57
|
+
return { command: carrier, args };
|
|
58
|
+
const size = fileSize(carrier);
|
|
59
|
+
if (size === undefined || size > 64 * 1024)
|
|
60
|
+
return { command: carrier, args };
|
|
61
|
+
const shim = readFileSync(carrier, "utf8");
|
|
62
|
+
if (!/^:find_dp0\s*$/im.test(shim) || !/^\s*CALL :find_dp0\s*$/im.test(shim))
|
|
63
|
+
return { command: carrier, args };
|
|
64
|
+
const match = /^(.*)"%(?:~dp0|dp0%)([^"\r\n]+?\.(?:[cm]?js|exe|com))"\s+%\*\s*$/im.exec(shim);
|
|
65
|
+
// 不解释自定义 batch、额外参数或变量展开;保留 Node 对不支持载体的原始失败。
|
|
66
|
+
if (!match || match[2].includes("%"))
|
|
67
|
+
return { command: carrier, args };
|
|
68
|
+
const entry = resolve(dirname(carrier), match[2].replace(/^[/\\]+/, ""));
|
|
69
|
+
if (/\.(exe|com)$/i.test(entry)) {
|
|
70
|
+
if (match[1].trim() && !/[&|]\s*$/.test(match[1]))
|
|
71
|
+
return { command: carrier, args };
|
|
72
|
+
return { command: entry, args };
|
|
73
|
+
}
|
|
74
|
+
if (!/(?:\bnode(?:\.exe)?|"%_prog%")\s*$/i.test(match[1]))
|
|
75
|
+
return { command: carrier, args };
|
|
76
|
+
if (fileSize(entry) === undefined)
|
|
77
|
+
throw Object.assign(new Error("Provider command entry not found"), {
|
|
78
|
+
code: "ENOENT",
|
|
79
|
+
path: entry
|
|
80
|
+
});
|
|
81
|
+
const adjacentNode = join(dirname(carrier), "node.exe");
|
|
82
|
+
const pathNode = commandPath("node", env, cwd);
|
|
83
|
+
const node = fileSize(adjacentNode) !== undefined
|
|
84
|
+
? adjacentNode
|
|
85
|
+
: pathNode && /\.(exe|com)$/i.test(pathNode)
|
|
86
|
+
? pathNode
|
|
87
|
+
: basename(process.execPath).toLowerCase() === "node.exe"
|
|
88
|
+
? process.execPath
|
|
89
|
+
: "node";
|
|
90
|
+
return { command: node, args: [entry, ...args] };
|
|
91
|
+
}
|
|
@@ -15,8 +15,8 @@ parentPort.on("message", (message) => {
|
|
|
15
15
|
try {
|
|
16
16
|
const category = message.extra
|
|
17
17
|
? `${message.extra}${message.status ? "-status" : ""}`
|
|
18
|
-
:
|
|
19
|
-
const key = message.extra ? `extra:${category}` :
|
|
18
|
+
: `kernel${message.status ? "-status" : ""}`;
|
|
19
|
+
const key = message.extra ? `extra:${category}` : category;
|
|
20
20
|
let writer = writers.get(key);
|
|
21
21
|
if (!writer && writers.size < 128) {
|
|
22
22
|
writer = new HourlyLogWriter(message.extra ? join(directory, "extras") : directory, category, { onError: () => { } });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Optional metadata logging; bounded queues isolate filesystem writes in a dedicated worker. */
|
|
2
2
|
import { isAbsolute } from "node:path";
|
|
3
3
|
import { Worker } from "node:worker_threads";
|
|
4
|
-
import { extraStatusRecord } from "./service-status.js";
|
|
4
|
+
import { extraStatusRecord, kernelStatusRecord } from "./service-status.js";
|
|
5
5
|
export const noopRuntimeLog = () => { };
|
|
6
6
|
const strings = new Set([
|
|
7
7
|
"run_id",
|
|
@@ -94,6 +94,18 @@ export class RuntimeLogging {
|
|
|
94
94
|
#write(source, extra, level, event, data) {
|
|
95
95
|
if (this.#closed)
|
|
96
96
|
return;
|
|
97
|
+
if (source === "kernel" && this.#worker && this.#statusPending < 128) {
|
|
98
|
+
try {
|
|
99
|
+
const status = kernelStatusRecord(level, event, data);
|
|
100
|
+
if (status) {
|
|
101
|
+
this.#worker.postMessage({ status: true, line: `${JSON.stringify(status)}\n` });
|
|
102
|
+
this.#statusPending++;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
/* 状态镜像失败不影响执行或普通日志。 */
|
|
107
|
+
}
|
|
108
|
+
}
|
|
97
109
|
if (extra) {
|
|
98
110
|
try {
|
|
99
111
|
const status = extraStatusRecord(extra, level, event, data);
|
|
@@ -7,5 +7,14 @@ export interface ExtraStatusRecord {
|
|
|
7
7
|
event: string;
|
|
8
8
|
data: Record<string, string | number>;
|
|
9
9
|
}
|
|
10
|
+
export interface KernelStatusRecord {
|
|
11
|
+
time: string;
|
|
12
|
+
level: RuntimeLogLevel;
|
|
13
|
+
source: "kernel";
|
|
14
|
+
event: string;
|
|
15
|
+
data: Record<string, string | number>;
|
|
16
|
+
}
|
|
17
|
+
/** Kernel 父进程的监督诊断白名单;读盘时也重建,绝不包含执行正文或原始异常。 */
|
|
18
|
+
export declare function kernelStatusRecord(level: RuntimeLogLevel, event: string, data?: Readonly<Record<string, unknown>>, time?: string): KernelStatusRecord | undefined;
|
|
10
19
|
/** Rebuild status records from a separate allowlist, including when reading persisted files. */
|
|
11
20
|
export declare function extraStatusRecord(extra: string, level: RuntimeLogLevel, event: string, data?: Readonly<Record<string, unknown>>, time?: string): ExtraStatusRecord | undefined;
|
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
/** Kernel 父进程的监督诊断白名单;读盘时也重建,绝不包含执行正文或原始异常。 */
|
|
2
|
+
export function kernelStatusRecord(level, event, data, time = new Date().toISOString()) {
|
|
3
|
+
if (!["info", "warn", "error"].includes(level) ||
|
|
4
|
+
![
|
|
5
|
+
"worker.ready",
|
|
6
|
+
"worker.lost",
|
|
7
|
+
"worker.recovery_blocked",
|
|
8
|
+
"worker.retry_scheduled",
|
|
9
|
+
"worker.start_failed"
|
|
10
|
+
].includes(event) ||
|
|
11
|
+
!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(time) ||
|
|
12
|
+
!Number.isFinite(Date.parse(time)))
|
|
13
|
+
return;
|
|
14
|
+
const safe = {};
|
|
15
|
+
for (const key of ["code", "signal", "trigger", "stage", "occurred_at", "retry_at"]) {
|
|
16
|
+
const value = data?.[key];
|
|
17
|
+
if (typeof value !== "string")
|
|
18
|
+
continue;
|
|
19
|
+
const valid = key === "code"
|
|
20
|
+
? /^[A-Z][A-Z0-9_]{0,95}$/.test(value)
|
|
21
|
+
: key === "signal"
|
|
22
|
+
? /^SIG[A-Z0-9]+$/.test(value)
|
|
23
|
+
: key === "trigger"
|
|
24
|
+
? ["exit", "error", "heartbeat", "ipc"].includes(value)
|
|
25
|
+
: key === "stage"
|
|
26
|
+
? ["cleanup", "manifest", "starting", "backoff"].includes(value)
|
|
27
|
+
: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(value) &&
|
|
28
|
+
Number.isFinite(Date.parse(value));
|
|
29
|
+
if (valid)
|
|
30
|
+
safe[key] = value;
|
|
31
|
+
}
|
|
32
|
+
for (const key of ["pid", "generation", "attempt", "delay_ms", "exit_code"]) {
|
|
33
|
+
const value = data?.[key];
|
|
34
|
+
if (typeof value === "number" &&
|
|
35
|
+
Number.isSafeInteger(value) &&
|
|
36
|
+
(key === "exit_code" || value >= 0))
|
|
37
|
+
safe[key] = value;
|
|
38
|
+
}
|
|
39
|
+
return Object.freeze({ time, level, source: "kernel", event, data: Object.freeze(safe) });
|
|
40
|
+
}
|
|
1
41
|
const events = new Set([
|
|
2
42
|
"service.initializing",
|
|
3
43
|
"service.ready",
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist/index.js",
|
|
8
8
|
"./process-cleanup": "./dist/process-cleanup.js",
|
|
9
|
+
"./process-launch": "./dist/process-launch.js",
|
|
9
10
|
"./module-manifest": "./dist/module-manifest.js"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
12
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
13
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
13
14
|
"import-meta-resolve": "4.2.0"
|
|
14
15
|
},
|
|
15
16
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@ export declare function createZcodeGuiAdapter({ command, appServerArgs, spawnFn
|
|
|
11
11
|
command?: string;
|
|
12
12
|
appServerArgs?: readonly string[];
|
|
13
13
|
spawnFn?: ZcodeAppServerSpawn;
|
|
14
|
-
}): Readonly<{
|
|
14
|
+
}): Readonly<Omit<{
|
|
15
15
|
metadata: {
|
|
16
16
|
type: string;
|
|
17
17
|
agentSources: "provisioned"[];
|
|
@@ -21,8 +21,17 @@ export declare function createZcodeGuiAdapter({ command, appServerArgs, spawnFn
|
|
|
21
21
|
probe: () => Promise<ProbeResult>;
|
|
22
22
|
respondInteraction(invocationId: string, response: InteractionResponse): Promise<void>;
|
|
23
23
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-protocol").CanonicalEvent, void, any>;
|
|
24
|
+
}, "metadata"> & {
|
|
25
|
+
metadata: Omit<{
|
|
26
|
+
type: string;
|
|
27
|
+
agentSources: "provisioned"[];
|
|
28
|
+
processModel: string;
|
|
29
|
+
transport: string;
|
|
30
|
+
}, "protocolSupport"> & {
|
|
31
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
32
|
+
};
|
|
24
33
|
}>;
|
|
25
|
-
export declare const zcodeGuiAdapter: Readonly<{
|
|
34
|
+
export declare const zcodeGuiAdapter: Readonly<Omit<{
|
|
26
35
|
metadata: {
|
|
27
36
|
type: string;
|
|
28
37
|
agentSources: "provisioned"[];
|
|
@@ -32,5 +41,14 @@ export declare const zcodeGuiAdapter: Readonly<{
|
|
|
32
41
|
probe: () => Promise<ProbeResult>;
|
|
33
42
|
respondInteraction(invocationId: string, response: InteractionResponse): Promise<void>;
|
|
34
43
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-protocol").CanonicalEvent, void, any>;
|
|
44
|
+
}, "metadata"> & {
|
|
45
|
+
metadata: Omit<{
|
|
46
|
+
type: string;
|
|
47
|
+
agentSources: "provisioned"[];
|
|
48
|
+
processModel: string;
|
|
49
|
+
transport: string;
|
|
50
|
+
}, "protocolSupport"> & {
|
|
51
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
52
|
+
};
|
|
35
53
|
}>;
|
|
36
54
|
export default zcodeGuiAdapter;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-zcode-gui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
9
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
8
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
9
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.7"
|
|
10
10
|
},
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"files": [
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ModuleManifest } from "@mininglamp-oss/octo-runtime-adapter-sdk/module-manifest";
|
|
2
|
+
import { readAdapterConfigurations } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
3
|
+
/** CLI 宿主在创建 Kernel 前补齐 npm DSH 入口;探测与调用共享快照,显式配置始终优先。 */
|
|
4
|
+
export declare function readCliAdapterConfigurations(profileRoot: string, adapters: unknown, manifest: ModuleManifest, env?: NodeJS.ProcessEnv): Promise<ReturnType<typeof readAdapterConfigurations>>;
|