@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,5 +1,5 @@
|
|
|
1
1
|
import { initialControlInstructions, invocationEnvironment } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
2
|
-
import { canonicalTerminalStatus, hasImageInput } from "@mininglamp-oss/octo-runtime-protocol";
|
|
2
|
+
import { canonicalTerminalStatus, failureMessage, hasImageInput } from "@mininglamp-oss/octo-runtime-protocol";
|
|
3
3
|
import { acpLoadSessionParams, acpNewSessionParams, acpPromptParams, spawnAcpClient } from "@mininglamp-oss/octo-runtime-acp-client";
|
|
4
4
|
import { AcpApprovalBridge, AcpTurnNormalizer, acpToolTerminalStatus, defineAdapter, normalizeAcpToolUpdate, probeCommand, providerInputText } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
5
5
|
/** Translate one ACP update into canonical events; unrecognized update kinds yield nothing. */
|
|
@@ -55,7 +55,7 @@ export function normalizeCodeBuddyUpdate(update) {
|
|
|
55
55
|
{
|
|
56
56
|
protocolVersion: 2,
|
|
57
57
|
type: "usage.update",
|
|
58
|
-
payload: { ...update.usage, model: update.model }
|
|
58
|
+
payload: { ...update.usage, ...(update.model ? { model: update.model } : {}) }
|
|
59
59
|
}
|
|
60
60
|
];
|
|
61
61
|
return [];
|
|
@@ -68,11 +68,101 @@ function isCancelledStopReason(reason) {
|
|
|
68
68
|
return (typeof reason === "string" &&
|
|
69
69
|
["cancelled", "canceled", "interrupted", "aborted"].includes(reason.toLowerCase()));
|
|
70
70
|
}
|
|
71
|
+
/** 只回报本次原生响应确认的模型;请求值及旧 binding 都不代表恢复后的实际模型。 */
|
|
72
|
+
function confirmedSessionModel(result) {
|
|
73
|
+
if (!isRecord(result))
|
|
74
|
+
return undefined;
|
|
75
|
+
const option = Array.isArray(result.configOptions)
|
|
76
|
+
? result.configOptions.find((value) => isRecord(value) && (value.id === "model" || value.category === "model"))
|
|
77
|
+
: undefined;
|
|
78
|
+
for (const value of [
|
|
79
|
+
isRecord(option) ? option.currentValue : undefined,
|
|
80
|
+
isRecord(result.models) ? result.models.currentModelId : undefined,
|
|
81
|
+
result.model
|
|
82
|
+
]) {
|
|
83
|
+
if (typeof value === "string" && value.trim())
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
/** 只使用本次会话广告的目录与原生 setter,不把 session/new.model 当作选模确认。 */
|
|
89
|
+
function modelSelection(session, sessionId, model) {
|
|
90
|
+
const result = isRecord(session) ? session : {};
|
|
91
|
+
const option = Array.isArray(result.configOptions)
|
|
92
|
+
? result.configOptions.find((value) => isRecord(value) && (value.id === "model" || value.category === "model"))
|
|
93
|
+
: undefined;
|
|
94
|
+
const config = isRecord(option) ? option : undefined;
|
|
95
|
+
const models = isRecord(result.models) ? result.models : {};
|
|
96
|
+
const entries = config
|
|
97
|
+
? Array.isArray(config.options)
|
|
98
|
+
? config.options.flatMap((value) => isRecord(value) && Array.isArray(value.options) ? value.options : [value])
|
|
99
|
+
: []
|
|
100
|
+
: Array.isArray(models.availableModels)
|
|
101
|
+
? models.availableModels
|
|
102
|
+
: [];
|
|
103
|
+
const available = entries
|
|
104
|
+
.filter(isRecord)
|
|
105
|
+
.map((entry) => (config ? entry.value : entry.modelId))
|
|
106
|
+
.filter((value) => typeof value === "string" && value.length > 0);
|
|
107
|
+
if (!available.includes(model)) {
|
|
108
|
+
throw new Error(`MODEL_NOT_FOUND: CodeBuddy does not offer model ${model}. Select a model from its advertised catalog.`);
|
|
109
|
+
}
|
|
110
|
+
if (confirmedSessionModel(result) === model)
|
|
111
|
+
return undefined;
|
|
112
|
+
if (config && (typeof config.id !== "string" || !config.id.trim())) {
|
|
113
|
+
throw new Error(`CodeBuddy cannot select model ${model}: the model config option has no id`);
|
|
114
|
+
}
|
|
115
|
+
return config
|
|
116
|
+
? {
|
|
117
|
+
method: "session/set_config_option",
|
|
118
|
+
params: { sessionId, configId: config.id, value: model }
|
|
119
|
+
}
|
|
120
|
+
: { method: "session/set_model", params: { sessionId, modelId: model } };
|
|
121
|
+
}
|
|
122
|
+
/** ACP 失败详情按宿主要求原样序列化,不解析或筛选 Provider 的私有错误字段。 */
|
|
123
|
+
function promptFailure(update) {
|
|
124
|
+
const meta = isRecord(update._meta) ? update._meta : {};
|
|
125
|
+
const outcome = meta["codebuddy.ai/outcome"];
|
|
126
|
+
const raw = meta["codebuddy.ai/errorMessage"];
|
|
127
|
+
const hasError = typeof raw === "string" ? raw.trim().length > 0 : raw != null;
|
|
128
|
+
if (!(typeof update.stopReason === "string" && update.stopReason.toLowerCase() === "refusal") &&
|
|
129
|
+
!(typeof outcome === "string" && outcome.startsWith("FAILED")) &&
|
|
130
|
+
!hasError)
|
|
131
|
+
return undefined;
|
|
132
|
+
return {
|
|
133
|
+
code: "ACP_MODEL_REQUEST_FAILED",
|
|
134
|
+
message: `${failureMessage("OH-PRV-4010")}\n${JSON.stringify(update._meta)}`,
|
|
135
|
+
adapterType: "codebuddy"
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/** 与通用 ACP 一致,仅在无流式 final 且未失败时使用已支持的结果正文载体。 */
|
|
139
|
+
function promptResultText(update) {
|
|
140
|
+
for (const value of [
|
|
141
|
+
update.text,
|
|
142
|
+
update.content,
|
|
143
|
+
update.output,
|
|
144
|
+
update.response,
|
|
145
|
+
update.message
|
|
146
|
+
]) {
|
|
147
|
+
if (typeof value === "string" && value.trim())
|
|
148
|
+
return value;
|
|
149
|
+
if (isRecord(value) && typeof value.text === "string" && value.text.trim())
|
|
150
|
+
return value.text;
|
|
151
|
+
if (Array.isArray(value)) {
|
|
152
|
+
const text = value
|
|
153
|
+
.filter(isRecord)
|
|
154
|
+
.map((item) => (typeof item.text === "string" ? item.text : ""))
|
|
155
|
+
.join("");
|
|
156
|
+
if (text.trim())
|
|
157
|
+
return text;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
71
162
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* prompt streams end silently rather than with a terminal.
|
|
163
|
+
* 创建 CodeBuddy adapter;每轮拥有独立 ACP client,先握手并创建或恢复显式会话,再发送 prompt。
|
|
164
|
+
* adapter 将 Provider 结果映射为唯一终态并负责关闭 client;Core 独立确认清理完成。
|
|
165
|
+
* 显式模型在 prompt 前按本次原生目录设置并确认;回执只取确认值,Provider 失败优先于部分输出及空输出检查。
|
|
76
166
|
*/
|
|
77
167
|
export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, command = "codebuddy" } = {}) {
|
|
78
168
|
const responders = new Map();
|
|
@@ -114,7 +204,7 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
114
204
|
const sessionMethod = requestedSessionId ? "session/load" : "session/new";
|
|
115
205
|
const sessionParams = requestedSessionId
|
|
116
206
|
? acpLoadSessionParams(requestedSessionId, { cwd: req.workdir })
|
|
117
|
-
: acpNewSessionParams({ cwd: req.workdir
|
|
207
|
+
: acpNewSessionParams({ cwd: req.workdir });
|
|
118
208
|
const sessionRequestId = client.reserveRequestId();
|
|
119
209
|
let session;
|
|
120
210
|
const requestOptions = {
|
|
@@ -133,8 +223,21 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
133
223
|
throw new Error("ACP session/new returned no sessionId");
|
|
134
224
|
session = { id: sessionId };
|
|
135
225
|
}
|
|
136
|
-
|
|
137
|
-
|
|
226
|
+
let model = confirmedSessionModel(sessionResult);
|
|
227
|
+
const requestedModel = req.agentConfig?.model;
|
|
228
|
+
if (requestedModel) {
|
|
229
|
+
const selection = modelSelection(sessionResult, session.id, requestedModel);
|
|
230
|
+
if (selection) {
|
|
231
|
+
const selected = await client.request(selection.method, selection.params, {
|
|
232
|
+
requestId: client.reserveRequestId()
|
|
233
|
+
});
|
|
234
|
+
// 空 ACK 或旧模型都不能证明切换生效;失败时不发送下一轮 prompt。
|
|
235
|
+
model = confirmedSessionModel(selected);
|
|
236
|
+
if (model !== requestedModel) {
|
|
237
|
+
throw new Error(`CodeBuddy did not confirm model ${requestedModel} after selection (confirmed: ${model ?? "unknown"}). Select a supported model and retry.`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
138
241
|
yield {
|
|
139
242
|
protocolVersion: 2,
|
|
140
243
|
type: "session.update",
|
|
@@ -142,7 +245,7 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
142
245
|
providerSession: {
|
|
143
246
|
sessionId: session.id,
|
|
144
247
|
resumable: true,
|
|
145
|
-
model:
|
|
248
|
+
...(model ? { model } : {})
|
|
146
249
|
}
|
|
147
250
|
}
|
|
148
251
|
};
|
|
@@ -151,6 +254,9 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
151
254
|
const promptRequestId = client.reserveRequestId();
|
|
152
255
|
let promptStopReason;
|
|
153
256
|
let promptFinishReason;
|
|
257
|
+
let failure;
|
|
258
|
+
let resultText;
|
|
259
|
+
let producedFinalOutput = false;
|
|
154
260
|
const activeToolIds = new Set();
|
|
155
261
|
const turn = new AcpTurnNormalizer("codebuddy");
|
|
156
262
|
for await (const update of client.prompt(session.id, prompt, {
|
|
@@ -158,12 +264,21 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
158
264
|
params: promptParams
|
|
159
265
|
})) {
|
|
160
266
|
if (update.type === "prompt_result") {
|
|
161
|
-
promptStopReason =
|
|
162
|
-
|
|
267
|
+
promptStopReason =
|
|
268
|
+
typeof update.stopReason === "string" ? update.stopReason : undefined;
|
|
269
|
+
promptFinishReason =
|
|
270
|
+
typeof update.finishReason === "string" ? update.finishReason : undefined;
|
|
271
|
+
failure ??= promptFailure(update);
|
|
272
|
+
resultText = promptResultText(update);
|
|
163
273
|
continue;
|
|
164
274
|
}
|
|
165
275
|
const events = turn.normalize(update.sessionUpdate ?? update.type, normalizeCodeBuddyUpdate(update));
|
|
166
276
|
for (const event of events) {
|
|
277
|
+
if (event.type === "message.delta" &&
|
|
278
|
+
event.payload.channel !== "analysis" &&
|
|
279
|
+
typeof event.payload.text === "string" &&
|
|
280
|
+
event.payload.text.trim())
|
|
281
|
+
producedFinalOutput = true;
|
|
167
282
|
const toolID = typeof event.payload.id === "string" ? event.payload.id : undefined;
|
|
168
283
|
if (event.type === "tool_call.create" && toolID)
|
|
169
284
|
activeToolIds.add(toolID);
|
|
@@ -174,34 +289,54 @@ export function createCodeBuddyAdapter({ acpClientFactory = spawnAcpClient, comm
|
|
|
174
289
|
yield event;
|
|
175
290
|
}
|
|
176
291
|
}
|
|
177
|
-
const cancelled = isCancelledStopReason(promptStopReason);
|
|
178
|
-
if (cancelled) {
|
|
292
|
+
const cancelled = !failure && (req.signal?.aborted || isCancelledStopReason(promptStopReason));
|
|
293
|
+
if (!cancelled && !failure && !producedFinalOutput && resultText) {
|
|
294
|
+
yield* turn.normalize("agent_message_chunk", normalizeCodeBuddyUpdate({
|
|
295
|
+
sessionUpdate: "agent_message_chunk",
|
|
296
|
+
content: { text: resultText }
|
|
297
|
+
}));
|
|
298
|
+
producedFinalOutput = true;
|
|
299
|
+
}
|
|
300
|
+
if (!cancelled && !failure && !producedFinalOutput) {
|
|
301
|
+
failure = {
|
|
302
|
+
code: "ACP_NO_FINAL_OUTPUT",
|
|
303
|
+
message: "CodeBuddy completed without assistant output",
|
|
304
|
+
adapterType: "codebuddy"
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const status = failure ? "failed" : cancelled ? "cancelled" : "completed";
|
|
308
|
+
if (cancelled || failure) {
|
|
179
309
|
for (const id of activeToolIds) {
|
|
180
310
|
yield {
|
|
181
311
|
protocolVersion: 2,
|
|
182
312
|
type: "tool_call.update",
|
|
183
|
-
payload: { id, status: canonicalTerminalStatus(
|
|
313
|
+
payload: { id, status: canonicalTerminalStatus(status) }
|
|
184
314
|
};
|
|
185
315
|
}
|
|
186
316
|
}
|
|
187
|
-
for (const event of turn.finish(promptFinishReason ?? promptStopReason,
|
|
317
|
+
for (const event of turn.finish(promptFinishReason ?? promptStopReason, status))
|
|
188
318
|
yield event;
|
|
189
319
|
const terminalMessage = {
|
|
190
320
|
protocolVersion: 2,
|
|
191
321
|
type: "message.update",
|
|
192
|
-
payload: {
|
|
322
|
+
payload: {
|
|
323
|
+
role: "assistant",
|
|
324
|
+
status: failure ? "failed" : cancelled ? "stopped" : "completed"
|
|
325
|
+
}
|
|
193
326
|
};
|
|
194
327
|
yield terminalMessage;
|
|
195
|
-
yield
|
|
196
|
-
? {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
328
|
+
yield failure
|
|
329
|
+
? { protocolVersion: 2, type: "run.failed", payload: failure }
|
|
330
|
+
: cancelled
|
|
331
|
+
? {
|
|
332
|
+
protocolVersion: 2,
|
|
333
|
+
type: "run.cancelled",
|
|
334
|
+
payload: {
|
|
335
|
+
reason: promptStopReason ?? "cancelled",
|
|
336
|
+
...(promptFinishReason ? { finishReason: promptFinishReason } : {})
|
|
337
|
+
}
|
|
202
338
|
}
|
|
203
|
-
|
|
204
|
-
: { protocolVersion: 2, type: "run.completed", payload: {} };
|
|
339
|
+
: { protocolVersion: 2, type: "run.completed", payload: {} };
|
|
205
340
|
}
|
|
206
341
|
finally {
|
|
207
342
|
await client.close?.();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-codebuddy",
|
|
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-acp-client": "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-acp-client": "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": [
|
|
@@ -2,6 +2,7 @@ import { actmodeEvidence, invocationEnvs, mapReasoningEffort } from "@mininglamp
|
|
|
2
2
|
import { canonicalTerminalStatus, classifyFailure, contextHash, contextActmode, assertJsonByteLimit, INVOKE_REQUEST_MAX_BYTES, hasImageInput, providerInputParts, PROVIDER_DIAGNOSTIC_MAX_BYTES, resolveStreamLimitPolicy, streamCapacityError } from "@mininglamp-oss/octo-runtime-protocol";
|
|
3
3
|
import { codexEnvironmentConfig } from "./environment.js";
|
|
4
4
|
import { createProcessCleanup } from "@mininglamp-oss/octo-runtime-adapter-sdk/process-cleanup";
|
|
5
|
+
import { resolveProcessLaunch } from "@mininglamp-oss/octo-runtime-adapter-sdk/process-launch";
|
|
5
6
|
/**
|
|
6
7
|
* Codex app-server transport and event adaptation layer.
|
|
7
8
|
*
|
|
@@ -148,6 +149,9 @@ export async function* runCodexAppServerTurn({ request, spec, spawnFn = defaultS
|
|
|
148
149
|
if (!threadId)
|
|
149
150
|
throw new Error("codex thread start/resume returned no thread id");
|
|
150
151
|
client.setActiveThread(threadId);
|
|
152
|
+
// 名称属于调用方;只命名本轮新建 thread,恢复时保留原生标题与句柄。
|
|
153
|
+
if (!resumed && request.sessionName)
|
|
154
|
+
await client.request("thread/name/set", { threadId, name: request.sessionName });
|
|
151
155
|
const requestedMode = contextActmode(request.context);
|
|
152
156
|
let collaborationMode;
|
|
153
157
|
let effectiveMode;
|
|
@@ -193,6 +197,8 @@ export async function* runCodexAppServerTurn({ request, spec, spawnFn = defaultS
|
|
|
193
197
|
throw new Error("codex fresh fallback returned no thread id", { cause: error });
|
|
194
198
|
}
|
|
195
199
|
client.setActiveThread(threadId);
|
|
200
|
+
if (request.sessionName)
|
|
201
|
+
await client.request("thread/name/set", { threadId, name: request.sessionName });
|
|
196
202
|
turnResult = await client.request("turn/start", {
|
|
197
203
|
...turnParams(request, threadId, true),
|
|
198
204
|
...(collaborationMode ? { collaborationMode } : {})
|
|
@@ -1844,7 +1850,8 @@ class CodexAppServerClient {
|
|
|
1844
1850
|
}
|
|
1845
1851
|
}
|
|
1846
1852
|
function defaultSpawn(command, args, options) {
|
|
1847
|
-
const
|
|
1853
|
+
const launch = resolveProcessLaunch(command, args, options);
|
|
1854
|
+
const child = spawn(launch.command, [...launch.args], {
|
|
1848
1855
|
cwd: options.cwd,
|
|
1849
1856
|
env: options.env,
|
|
1850
1857
|
stdio: ["pipe", "pipe", "pipe"],
|
|
@@ -25,7 +25,7 @@ export declare function createCodexAdapter({ command, appServerArgs, spawnFn, en
|
|
|
25
25
|
appServerArgs?: string[];
|
|
26
26
|
spawnFn?: CodexAppServerSpawn;
|
|
27
27
|
env?: NodeJS.ProcessEnv;
|
|
28
|
-
}): Readonly<{
|
|
28
|
+
}): Readonly<Omit<{
|
|
29
29
|
metadata: {
|
|
30
30
|
mcp: true;
|
|
31
31
|
protocolSupport: {
|
|
@@ -42,8 +42,23 @@ export declare function createCodexAdapter({ command, appServerArgs, spawnFn, en
|
|
|
42
42
|
respondNative(invocationId: string, response: NativeInteractionResponse): Promise<void>;
|
|
43
43
|
respondInteraction(invocationId: string, response: InteractionResponse): Promise<void>;
|
|
44
44
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterOutput, void, any>;
|
|
45
|
+
}, "metadata"> & {
|
|
46
|
+
metadata: Omit<{
|
|
47
|
+
mcp: true;
|
|
48
|
+
protocolSupport: {
|
|
49
|
+
protocol: string;
|
|
50
|
+
modes: ["native", "canonical"];
|
|
51
|
+
nativeMethods: string[];
|
|
52
|
+
};
|
|
53
|
+
type: string;
|
|
54
|
+
agentSources: "provisioned"[];
|
|
55
|
+
processModel: string;
|
|
56
|
+
transport: string;
|
|
57
|
+
}, "protocolSupport"> & {
|
|
58
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
59
|
+
};
|
|
45
60
|
}>;
|
|
46
|
-
export declare const codexAdapter: Readonly<{
|
|
61
|
+
export declare const codexAdapter: Readonly<Omit<{
|
|
47
62
|
metadata: {
|
|
48
63
|
mcp: true;
|
|
49
64
|
protocolSupport: {
|
|
@@ -60,5 +75,20 @@ export declare const codexAdapter: Readonly<{
|
|
|
60
75
|
respondNative(invocationId: string, response: NativeInteractionResponse): Promise<void>;
|
|
61
76
|
respondInteraction(invocationId: string, response: InteractionResponse): Promise<void>;
|
|
62
77
|
invoke(request: InvokeRequest, context?: AdapterInvocationContext): AsyncGenerator<import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterOutput, void, any>;
|
|
78
|
+
}, "metadata"> & {
|
|
79
|
+
metadata: Omit<{
|
|
80
|
+
mcp: true;
|
|
81
|
+
protocolSupport: {
|
|
82
|
+
protocol: string;
|
|
83
|
+
modes: ["native", "canonical"];
|
|
84
|
+
nativeMethods: string[];
|
|
85
|
+
};
|
|
86
|
+
type: string;
|
|
87
|
+
agentSources: "provisioned"[];
|
|
88
|
+
processModel: string;
|
|
89
|
+
transport: string;
|
|
90
|
+
}, "protocolSupport"> & {
|
|
91
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
92
|
+
};
|
|
63
93
|
}>;
|
|
64
94
|
export default codexAdapter;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-codex",
|
|
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": [
|
|
@@ -779,7 +779,8 @@ function errorMessage(error) {
|
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
// packages/octo-runtime-adapter-dsh/dist/errors.js
|
|
782
|
-
var
|
|
782
|
+
var DSH_MIN_VERSION = "0.2.1-rc.4";
|
|
783
|
+
var DSH_VERSION = DSH_MIN_VERSION;
|
|
783
784
|
var messages = {
|
|
784
785
|
DSH_CONFIG_INVALID: "DeepSeek Harness configuration is invalid for this invocation.",
|
|
785
786
|
DSH_ACTMODE_UNSUPPORTED: "DeepSeek Harness supports only the default actmode.",
|
|
@@ -787,8 +788,8 @@ var messages = {
|
|
|
787
788
|
STREAM_QUEUE_ITEM_TOO_LARGE: "DeepSeek Harness event exceeded the configured queue item limit.",
|
|
788
789
|
STREAM_QUEUE_BYTES_EXCEEDED: "DeepSeek Harness event queue exceeded the configured byte limit.",
|
|
789
790
|
STREAM_QUEUE_ITEMS_EXCEEDED: "DeepSeek Harness event queue exceeded the configured item limit.",
|
|
790
|
-
DSH_EXECUTABLE_NOT_FOUND: "
|
|
791
|
-
DSH_VERSION_UNSUPPORTED:
|
|
791
|
+
DSH_EXECUTABLE_NOT_FOUND: "The host-configured DeepSeek Harness JavaScript entry is missing.",
|
|
792
|
+
DSH_VERSION_UNSUPPORTED: `DeepSeek Harness requires version >= ${DSH_MIN_VERSION}. Please upgrade DeepSeek Harness.`,
|
|
792
793
|
DSH_START_FAILED: "DeepSeek Harness could not start.",
|
|
793
794
|
DSH_INITIALIZE_TIMEOUT: "DeepSeek Harness initialization timed out.",
|
|
794
795
|
DSH_RPC_ERROR: "DeepSeek Harness rejected a protocol request.",
|
|
@@ -807,7 +808,7 @@ var DshError = class extends Error {
|
|
|
807
808
|
code;
|
|
808
809
|
diagnostics;
|
|
809
810
|
constructor(code, diagnostics = {}, options) {
|
|
810
|
-
super(`${code}: ${messages[code]}`, options);
|
|
811
|
+
super(`${code}: ${messages[code]}${code === "DSH_VERSION_UNSUPPORTED" ? ` Detected version: ${diagnostics.detectedVersion ?? "unknown"}.` : ""}`, options);
|
|
811
812
|
this.code = code;
|
|
812
813
|
this.diagnostics = diagnostics;
|
|
813
814
|
this.name = "DshError";
|
|
@@ -846,6 +847,7 @@ function dshError(error, fallback) {
|
|
|
846
847
|
|
|
847
848
|
export {
|
|
848
849
|
HarnessClient,
|
|
850
|
+
DSH_MIN_VERSION,
|
|
849
851
|
DSH_VERSION,
|
|
850
852
|
DshError,
|
|
851
853
|
record,
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DSH_MIN_VERSION,
|
|
3
|
+
DshError,
|
|
4
|
+
dshError,
|
|
5
|
+
nativeCode
|
|
6
|
+
} from "./chunk-CFKMMCO6.js";
|
|
7
|
+
|
|
8
|
+
// packages/octo-runtime-adapter-dsh/dist/launch.js
|
|
9
|
+
import { spawn } from "node:child_process";
|
|
10
|
+
import { realpath, stat } from "node:fs/promises";
|
|
11
|
+
import { isAbsolute } from "node:path";
|
|
12
|
+
import { gte, parse } from "semver";
|
|
13
|
+
import { createProcessCleanup } from "@mininglamp-oss/octo-runtime-adapter-sdk/process-cleanup";
|
|
14
|
+
import { mergeProcessEnvironment } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
15
|
+
var VERSION_PROBE_TIMEOUT_MS = 1e4;
|
|
16
|
+
var VERSION_PROBE_MAX_BYTES = 4096;
|
|
17
|
+
var MAX_TIMEOUT_MS = 864e5;
|
|
18
|
+
var MAX_OPTION_STRING_LENGTH = 4096;
|
|
19
|
+
var DSH_PROCESS_GRACE_MS = 1e3;
|
|
20
|
+
async function resolveDshLaunch(options, env, signal) {
|
|
21
|
+
if (["command", "args", "desktopPath"].some((key) => options[key] !== void 0))
|
|
22
|
+
throw new DshError("DSH_CONFIG_INVALID");
|
|
23
|
+
const dshBin = stringOption(options, "dshBin", "");
|
|
24
|
+
assertModulePath(dshBin);
|
|
25
|
+
let physicalPath;
|
|
26
|
+
try {
|
|
27
|
+
physicalPath = await realpath(dshBin);
|
|
28
|
+
if (!(await stat(physicalPath)).isFile())
|
|
29
|
+
throw new Error("not a file");
|
|
30
|
+
} catch {
|
|
31
|
+
throw new DshError("DSH_EXECUTABLE_NOT_FOUND");
|
|
32
|
+
}
|
|
33
|
+
assertModulePath(physicalPath);
|
|
34
|
+
const launch = {
|
|
35
|
+
command: process.execPath,
|
|
36
|
+
args: [physicalPath],
|
|
37
|
+
env: mergeProcessEnvironment(env, process.versions.electron ? { ELECTRON_RUN_AS_NODE: "1" } : {}),
|
|
38
|
+
dshBin: physicalPath
|
|
39
|
+
};
|
|
40
|
+
const version = await checkVersion(launch, signal);
|
|
41
|
+
return { ...launch, version };
|
|
42
|
+
}
|
|
43
|
+
function assertModulePath(path) {
|
|
44
|
+
if (!isAbsolute(path) || !/\.(?:c|m)?js$/i.test(path) || /(?:^|[/\\])[^/\\]*\.asar(?:[/\\]|$)/i.test(path) || /\.app[/\\]Contents(?:[/\\]|$)/i.test(path))
|
|
45
|
+
throw new DshError("DSH_CONFIG_INVALID");
|
|
46
|
+
}
|
|
47
|
+
async function checkVersion(launch, signal) {
|
|
48
|
+
if (signal?.aborted)
|
|
49
|
+
throw new DshError("DSH_START_FAILED", { phase: "version" });
|
|
50
|
+
const child = spawn(launch.command, [...launch.args, "--version"], {
|
|
51
|
+
env: launch.env,
|
|
52
|
+
detached: process.platform !== "win32",
|
|
53
|
+
windowsHide: true,
|
|
54
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
55
|
+
});
|
|
56
|
+
const cleanup = createProcessCleanup(child, {
|
|
57
|
+
processGroup: process.platform !== "win32",
|
|
58
|
+
processTree: true,
|
|
59
|
+
termGraceMs: DSH_PROCESS_GRACE_MS,
|
|
60
|
+
killGraceMs: DSH_PROCESS_GRACE_MS
|
|
61
|
+
});
|
|
62
|
+
let output = "";
|
|
63
|
+
let bytes = 0;
|
|
64
|
+
let rejectPending = () => {
|
|
65
|
+
};
|
|
66
|
+
const stop = () => rejectPending(new DshError("DSH_START_FAILED", { phase: "version" }));
|
|
67
|
+
let timer;
|
|
68
|
+
child.stderr.resume();
|
|
69
|
+
child.stderr.on("error", () => {
|
|
70
|
+
});
|
|
71
|
+
let failure;
|
|
72
|
+
let version = "";
|
|
73
|
+
try {
|
|
74
|
+
await new Promise((resolveVersion, reject) => {
|
|
75
|
+
rejectPending = reject;
|
|
76
|
+
timer = setTimeout(stop, VERSION_PROBE_TIMEOUT_MS);
|
|
77
|
+
const ioFailure = (error) => reject(new DshError("DSH_START_FAILED", {
|
|
78
|
+
phase: "version",
|
|
79
|
+
nativeCode: nativeCode(error.code) ?? null
|
|
80
|
+
}, { cause: error }));
|
|
81
|
+
child.once("error", ioFailure);
|
|
82
|
+
child.stdout.on("error", ioFailure);
|
|
83
|
+
child.stdout.on("data", (chunk) => {
|
|
84
|
+
bytes += chunk.length;
|
|
85
|
+
if (bytes > VERSION_PROBE_MAX_BYTES)
|
|
86
|
+
stop();
|
|
87
|
+
else
|
|
88
|
+
output += chunk.toString("utf8");
|
|
89
|
+
});
|
|
90
|
+
child.once("close", (code, signal2) => code === 0 ? resolveVersion() : reject(new DshError("DSH_START_FAILED", { phase: "version", exitCode: code, signal: signal2 })));
|
|
91
|
+
signal?.addEventListener("abort", stop, { once: true });
|
|
92
|
+
if (signal?.aborted)
|
|
93
|
+
stop();
|
|
94
|
+
});
|
|
95
|
+
version = output.trim();
|
|
96
|
+
const parsed = parse(version);
|
|
97
|
+
if (!parsed || !gte(parsed, DSH_MIN_VERSION))
|
|
98
|
+
throw new DshError("DSH_VERSION_UNSUPPORTED", {
|
|
99
|
+
detectedVersion: parsed ? version : "unknown",
|
|
100
|
+
minimumVersion: DSH_MIN_VERSION
|
|
101
|
+
});
|
|
102
|
+
} catch (error) {
|
|
103
|
+
failure = error;
|
|
104
|
+
} finally {
|
|
105
|
+
clearTimeout(timer);
|
|
106
|
+
signal?.removeEventListener("abort", stop);
|
|
107
|
+
try {
|
|
108
|
+
await cleanup();
|
|
109
|
+
} catch (error) {
|
|
110
|
+
const primary = failure === void 0 ? void 0 : dshError(failure, "DSH_START_FAILED");
|
|
111
|
+
const cleanup2 = dshError(error, "DSH_CLEANUP_FAILED");
|
|
112
|
+
failure = new DshError("DSH_CLEANUP_FAILED", {
|
|
113
|
+
...primary?.diagnostics,
|
|
114
|
+
phase: "version",
|
|
115
|
+
pid: child.pid ?? null,
|
|
116
|
+
primaryCode: primary?.code ?? "NONE",
|
|
117
|
+
cleanupCode: cleanup2.diagnostics.nativeCode ?? cleanup2.code
|
|
118
|
+
}, {
|
|
119
|
+
cause: new AggregateError(failure === void 0 ? [error] : [failure, error], "DSH version probe cleanup failed")
|
|
120
|
+
});
|
|
121
|
+
} finally {
|
|
122
|
+
child.stdout.destroy();
|
|
123
|
+
child.stderr.destroy();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (failure instanceof Error)
|
|
127
|
+
throw failure;
|
|
128
|
+
if (failure !== void 0)
|
|
129
|
+
throw new DshError("DSH_START_FAILED", { phase: "version" });
|
|
130
|
+
return version;
|
|
131
|
+
}
|
|
132
|
+
function timeoutOption(options, key, fallback) {
|
|
133
|
+
const raw = options[key];
|
|
134
|
+
const value = raw === void 0 ? fallback : typeof raw === "number" || typeof raw === "string" && /^\d+$/.test(raw) ? Number(raw) : NaN;
|
|
135
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > MAX_TIMEOUT_MS)
|
|
136
|
+
throw new DshError("DSH_CONFIG_INVALID");
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
function stringOption(options, key, fallback) {
|
|
140
|
+
const value = options[key] ?? fallback;
|
|
141
|
+
if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > MAX_OPTION_STRING_LENGTH)
|
|
142
|
+
throw new DshError("DSH_CONFIG_INVALID");
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export {
|
|
147
|
+
DSH_PROCESS_GRACE_MS,
|
|
148
|
+
resolveDshLaunch,
|
|
149
|
+
timeoutOption,
|
|
150
|
+
stringOption
|
|
151
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const DSH_MIN_VERSION = "0.2.1-rc.4";
|
|
2
|
+
/** 保留原公开名称作为最低版本别名;实际安装版本由 probe 返回。 */
|
|
3
|
+
export declare const DSH_VERSION = "0.2.1-rc.4";
|
|
2
4
|
declare const messages: {
|
|
3
5
|
readonly DSH_CONFIG_INVALID: "DeepSeek Harness configuration is invalid for this invocation.";
|
|
4
6
|
readonly DSH_ACTMODE_UNSUPPORTED: "DeepSeek Harness supports only the default actmode.";
|
|
@@ -6,8 +8,8 @@ declare const messages: {
|
|
|
6
8
|
readonly STREAM_QUEUE_ITEM_TOO_LARGE: "DeepSeek Harness event exceeded the configured queue item limit.";
|
|
7
9
|
readonly STREAM_QUEUE_BYTES_EXCEEDED: "DeepSeek Harness event queue exceeded the configured byte limit.";
|
|
8
10
|
readonly STREAM_QUEUE_ITEMS_EXCEEDED: "DeepSeek Harness event queue exceeded the configured item limit.";
|
|
9
|
-
readonly DSH_EXECUTABLE_NOT_FOUND: "
|
|
10
|
-
readonly DSH_VERSION_UNSUPPORTED: "DeepSeek Harness version
|
|
11
|
+
readonly DSH_EXECUTABLE_NOT_FOUND: "The host-configured DeepSeek Harness JavaScript entry is missing.";
|
|
12
|
+
readonly DSH_VERSION_UNSUPPORTED: "DeepSeek Harness requires version >= 0.2.1-rc.4. Please upgrade DeepSeek Harness.";
|
|
11
13
|
readonly DSH_START_FAILED: "DeepSeek Harness could not start.";
|
|
12
14
|
readonly DSH_INITIALIZE_TIMEOUT: "DeepSeek Harness initialization timed out.";
|
|
13
15
|
readonly DSH_RPC_ERROR: "DeepSeek Harness rejected a protocol request.";
|