@mininglamp-oss/octo-runtime 1.1.6 → 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/build-info.json +2 -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/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 +16 -2
- 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 +5 -0
- 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-IW62UM3C.js → chunk-CFKMMCO6.js} +5 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-FWAPYRV2.js → chunk-LO34KB7D.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-3GXX5VD5.js → chunk-V5W6ZTYC.js} +14 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.d.ts +4 -2
- 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 +1 -0
- 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/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 +18 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +7 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +2 -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/build-info.json +2 -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 +1 -1
- 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/package.json +3 -3
- 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 +444 -226
- 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 +36 -22
- 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 +5 -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 +2 -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/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/generated/protocol-types.d.ts +9 -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 +43 -1
|
@@ -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
|
}
|
|
@@ -18,11 +18,13 @@ export { RuntimeLogging, assertRuntimeLogging, noopRuntimeLog, type RuntimeLog,
|
|
|
18
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).
|
|
@@ -26,15 +26,18 @@ export { extraStatusRecord, kernelStatusRecord } from "./service-status.js";
|
|
|
26
26
|
export { sanitizePublicValue } from "./public-display.js";
|
|
27
27
|
export { DEFAULT_REASONING_LEVEL_MAPS, OMNI_REASONING_LEVELS, mapReasoningEffort, reasoningLevelMap } from "./reasoning.js";
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* 接收编写输入并返回可注册的 Adapter,省略协议时仅补 canonical-only 声明。
|
|
30
|
+
* 返回类型必须保留字段必有的保证;不得根据缺省声明推断 native 支持。
|
|
31
|
+
* 冻结顶层对象以固定 metadata 和 invoke 引用;嵌套元数据不作深冻结。
|
|
32
|
+
* 工厂不注册或启动 Provider,宿主随后注册并负责执行与关闭。
|
|
31
33
|
*/
|
|
32
34
|
export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metadata.type)) {
|
|
33
35
|
if (!adapter?.metadata?.type || typeof adapter.invoke !== "function") {
|
|
34
36
|
throw new TypeError("adapter requires metadata.type and invoke(req)");
|
|
35
37
|
}
|
|
36
38
|
const invoke = adapter.invoke.bind(adapter);
|
|
37
|
-
const
|
|
39
|
+
const metadata = adapter.metadata;
|
|
40
|
+
const protocolSupport = metadata.protocolSupport ?? {
|
|
38
41
|
protocol: `${adapter.metadata.type}.canonical`,
|
|
39
42
|
modes: ["canonical"],
|
|
40
43
|
nativeMethods: []
|
|
@@ -42,7 +45,7 @@ export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metada
|
|
|
42
45
|
return Object.freeze({
|
|
43
46
|
...adapter,
|
|
44
47
|
metadata: {
|
|
45
|
-
...
|
|
48
|
+
...metadata,
|
|
46
49
|
protocolSupport
|
|
47
50
|
},
|
|
48
51
|
async *invoke(request, context) {
|
|
@@ -1,6 +1,6 @@
|
|
|
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": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"./module-manifest": "./dist/module-manifest.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
13
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
14
14
|
"import-meta-resolve": "4.2.0"
|
|
15
15
|
},
|
|
16
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": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"commander": "15.0.0",
|
|
12
|
-
"@mininglamp-oss/octo-runtime-adapter-dsh": "1.1.
|
|
13
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
12
|
+
"@mininglamp-oss/octo-runtime-adapter-dsh": "1.1.7",
|
|
13
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.7",
|
|
14
14
|
"json5": "2.2.3",
|
|
15
|
-
"@mininglamp-oss/octo-runtime-extra-channel-gateway": "1.1.
|
|
16
|
-
"@mininglamp-oss/octo-runtime-host-sdk": "1.1.
|
|
17
|
-
"@mininglamp-oss/octo-runtime-adapter-openclaw": "1.1.
|
|
18
|
-
"@mininglamp-oss/octo-runtime-cross-service": "1.1.
|
|
19
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
20
|
-
"@mininglamp-oss/octo-runtime-executor-kernel": "1.1.
|
|
21
|
-
"@mininglamp-oss/octo-runtime-executor-core": "1.1.
|
|
22
|
-
"@mininglamp-oss/octo-runtime-adapter-antigravity": "1.1.
|
|
23
|
-
"@mininglamp-oss/octo-runtime-adapter-claude-code": "1.1.
|
|
24
|
-
"@mininglamp-oss/octo-runtime-adapter-codebuddy": "1.1.
|
|
25
|
-
"@mininglamp-oss/octo-runtime-adapter-codex": "1.1.
|
|
26
|
-
"@mininglamp-oss/octo-runtime-adapter-hermes": "1.1.
|
|
27
|
-
"@mininglamp-oss/octo-runtime-adapter-grok-build": "1.1.
|
|
28
|
-
"@mininglamp-oss/octo-runtime-adapter-kimi-code": "1.1.
|
|
29
|
-
"@mininglamp-oss/octo-runtime-adapter-mcode": "1.1.
|
|
30
|
-
"@mininglamp-oss/octo-runtime-adapter-opencode": "1.1.
|
|
31
|
-
"@mininglamp-oss/octo-runtime-adapter-qodercli": "1.1.
|
|
32
|
-
"@mininglamp-oss/octo-runtime-adapter-qoderclicn": "1.1.
|
|
33
|
-
"@mininglamp-oss/octo-runtime-adapter-zcode-gui": "1.1.
|
|
34
|
-
"@mininglamp-oss/octo-runtime-extra-channel-wecom": "1.1.
|
|
35
|
-
"@mininglamp-oss/octo-runtime-extra-webui": "1.1.
|
|
15
|
+
"@mininglamp-oss/octo-runtime-extra-channel-gateway": "1.1.7",
|
|
16
|
+
"@mininglamp-oss/octo-runtime-host-sdk": "1.1.7",
|
|
17
|
+
"@mininglamp-oss/octo-runtime-adapter-openclaw": "1.1.7",
|
|
18
|
+
"@mininglamp-oss/octo-runtime-cross-service": "1.1.7",
|
|
19
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.7",
|
|
20
|
+
"@mininglamp-oss/octo-runtime-executor-kernel": "1.1.7",
|
|
21
|
+
"@mininglamp-oss/octo-runtime-executor-core": "1.1.7",
|
|
22
|
+
"@mininglamp-oss/octo-runtime-adapter-antigravity": "1.1.7",
|
|
23
|
+
"@mininglamp-oss/octo-runtime-adapter-claude-code": "1.1.7",
|
|
24
|
+
"@mininglamp-oss/octo-runtime-adapter-codebuddy": "1.1.7",
|
|
25
|
+
"@mininglamp-oss/octo-runtime-adapter-codex": "1.1.7",
|
|
26
|
+
"@mininglamp-oss/octo-runtime-adapter-hermes": "1.1.7",
|
|
27
|
+
"@mininglamp-oss/octo-runtime-adapter-grok-build": "1.1.7",
|
|
28
|
+
"@mininglamp-oss/octo-runtime-adapter-kimi-code": "1.1.7",
|
|
29
|
+
"@mininglamp-oss/octo-runtime-adapter-mcode": "1.1.7",
|
|
30
|
+
"@mininglamp-oss/octo-runtime-adapter-opencode": "1.1.7",
|
|
31
|
+
"@mininglamp-oss/octo-runtime-adapter-qodercli": "1.1.7",
|
|
32
|
+
"@mininglamp-oss/octo-runtime-adapter-qoderclicn": "1.1.7",
|
|
33
|
+
"@mininglamp-oss/octo-runtime-adapter-zcode-gui": "1.1.7",
|
|
34
|
+
"@mininglamp-oss/octo-runtime-extra-channel-wecom": "1.1.7",
|
|
35
|
+
"@mininglamp-oss/octo-runtime-extra-webui": "1.1.7"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -6,6 +6,7 @@ import type { CommandOptions, CommandResult, CommandRunner } from "./types.js";
|
|
|
6
6
|
* with exit code 124, allowing the service layer to attach backend context.
|
|
7
7
|
*/
|
|
8
8
|
export declare class NodeCommandRunner implements CommandRunner {
|
|
9
|
-
|
|
9
|
+
#private;
|
|
10
|
+
/** 原命令直接启动并有界捕获;Windows schtasks 内部协商解码,不改变调用方输入。 */
|
|
10
11
|
run(command: string, args: readonly string[], options?: CommandOptions): Promise<CommandResult>;
|
|
11
12
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Shell-free Node.js process runner used to invoke native service managers. */
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
+
import { win32 } from "node:path";
|
|
4
|
+
import iconv from "iconv-lite";
|
|
3
5
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
4
6
|
const MAX_CAPTURE_CHARS = 64 * 1024;
|
|
5
7
|
/**
|
|
@@ -9,62 +11,110 @@ const MAX_CAPTURE_CHARS = 64 * 1024;
|
|
|
9
11
|
* with exit code 124, allowing the service layer to attach backend context.
|
|
10
12
|
*/
|
|
11
13
|
export class NodeCommandRunner {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
#windowsTaskEncoding;
|
|
15
|
+
/** 原命令直接启动并有界捕获;Windows schtasks 内部协商解码,不改变调用方输入。 */
|
|
16
|
+
async run(command, args, options = {}) {
|
|
17
|
+
if (process.platform !== "win32" || !/^schtasks(?:\.exe)?$/i.test(win32.basename(command))) {
|
|
18
|
+
return runProcess(command, args, options);
|
|
19
|
+
}
|
|
20
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
21
|
+
const startedAt = performance.now();
|
|
22
|
+
if (!this.#windowsTaskEncoding) {
|
|
23
|
+
// 与 manager 相同的隐藏控制台启动条件,只查询代码页,不改变宿主控制台或 shell 设置。
|
|
24
|
+
// 仅缓存成功结果;并发查询各自使用调用预算,短超时不能污染其他请求。
|
|
25
|
+
const system32 = win32.join(process.env.SystemRoot ?? "C:\\Windows", "System32");
|
|
26
|
+
const queried = await runProcess(win32.join(system32, "cmd.exe"), ["/d", "/c", win32.join(system32, "chcp.com")], options);
|
|
27
|
+
if (queried.exitCode === 124)
|
|
28
|
+
return commandTimeout(command, args, timeoutMs);
|
|
29
|
+
const codePage = /(\d+)\s*$/.exec(queried.stdout)?.[1];
|
|
30
|
+
const candidate = codePage === "65001" ? "utf8" : codePage ? `cp${codePage}` : "";
|
|
31
|
+
if (queried.exitCode !== 0 || !candidate || !iconv.encodingExists(candidate)) {
|
|
32
|
+
throw new Error("Windows task output code-page query failed", { cause: queried });
|
|
33
|
+
}
|
|
34
|
+
this.#windowsTaskEncoding = candidate;
|
|
35
|
+
}
|
|
36
|
+
const remainingMs = timeoutMs - (performance.now() - startedAt);
|
|
37
|
+
if (timeoutMs > 0 && remainingMs <= 0)
|
|
38
|
+
return commandTimeout(command, args, timeoutMs);
|
|
39
|
+
// 原命令仍直接启动,超时诊断使用原预算,真实 exit code 124 不等于 timer 已触发。
|
|
40
|
+
return runProcess(command, args, { ...options, timeoutMs: timeoutMs > 0 ? remainingMs : timeoutMs }, this.#windowsTaskEncoding, timeoutMs);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** 直接启动原命令;只有 schtasks 的原生字节需要按已查询代码页增量解码。 */
|
|
44
|
+
function runProcess(command, args, options, encoding, reportedTimeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS) {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
const child = spawn(command, [...args], {
|
|
47
|
+
cwd: options.cwd,
|
|
48
|
+
env: options.env ?? process.env,
|
|
49
|
+
shell: false,
|
|
50
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
51
|
+
windowsHide: true
|
|
52
|
+
});
|
|
53
|
+
let stdout = "";
|
|
54
|
+
let stderr = "";
|
|
55
|
+
let settled = false;
|
|
56
|
+
let timedOut = false;
|
|
57
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
58
|
+
const timer = timeoutMs > 0
|
|
59
|
+
? setTimeout(() => {
|
|
60
|
+
timedOut = true;
|
|
61
|
+
child.kill("SIGKILL");
|
|
62
|
+
}, timeoutMs)
|
|
63
|
+
: undefined;
|
|
64
|
+
timer?.unref();
|
|
65
|
+
const stdoutDecoder = encoding ? iconv.getDecoder(encoding, { stripBOM: false }) : undefined;
|
|
66
|
+
const stderrDecoder = encoding ? iconv.getDecoder(encoding, { stripBOM: false }) : undefined;
|
|
67
|
+
if (!encoding) {
|
|
34
68
|
child.stdout.setEncoding("utf8");
|
|
35
69
|
child.stderr.setEncoding("utf8");
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
}
|
|
71
|
+
child.stdout.on("data", (chunk) => {
|
|
72
|
+
stdout = appendBounded(stdout, stdoutDecoder ? stdoutDecoder.write(chunk) : chunk.toString());
|
|
73
|
+
});
|
|
74
|
+
child.stderr.on("data", (chunk) => {
|
|
75
|
+
stderr = appendBounded(stderr, stderrDecoder ? stderrDecoder.write(chunk) : chunk.toString());
|
|
76
|
+
});
|
|
77
|
+
child.stdout.once("end", () => {
|
|
78
|
+
stdout = appendBounded(stdout, stdoutDecoder?.end() ?? "");
|
|
79
|
+
});
|
|
80
|
+
child.stderr.once("end", () => {
|
|
81
|
+
stderr = appendBounded(stderr, stderrDecoder?.end() ?? "");
|
|
82
|
+
});
|
|
83
|
+
child.once("error", (error) => {
|
|
84
|
+
if (settled)
|
|
85
|
+
return;
|
|
86
|
+
settled = true;
|
|
87
|
+
if (timer)
|
|
88
|
+
clearTimeout(timer);
|
|
89
|
+
reject(error);
|
|
90
|
+
});
|
|
91
|
+
child.once("close", (code) => {
|
|
92
|
+
if (settled)
|
|
93
|
+
return;
|
|
94
|
+
settled = true;
|
|
95
|
+
if (timer)
|
|
96
|
+
clearTimeout(timer);
|
|
97
|
+
resolve({
|
|
98
|
+
command,
|
|
99
|
+
args: [...args],
|
|
100
|
+
exitCode: timedOut ? 124 : (code ?? 1),
|
|
101
|
+
stdout,
|
|
102
|
+
stderr: timedOut
|
|
103
|
+
? appendBounded(stderr, `\ncommand timed out after ${reportedTimeoutMs}ms`)
|
|
104
|
+
: stderr
|
|
65
105
|
});
|
|
66
106
|
});
|
|
67
|
-
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/** 内部代码页查询耗尽预算时,不再启动 manager,仍返回原命令的超时事实。 */
|
|
110
|
+
function commandTimeout(command, args, timeoutMs) {
|
|
111
|
+
return {
|
|
112
|
+
command,
|
|
113
|
+
args: [...args],
|
|
114
|
+
exitCode: 124,
|
|
115
|
+
stdout: "",
|
|
116
|
+
stderr: `command timed out after ${timeoutMs}ms`
|
|
117
|
+
};
|
|
68
118
|
}
|
|
69
119
|
function appendBounded(current, chunk) {
|
|
70
120
|
return (current + chunk).slice(-MAX_CAPTURE_CHARS);
|
|
@@ -79,6 +79,10 @@ export class WindowsUserTaskBackend {
|
|
|
79
79
|
}
|
|
80
80
|
/** Return live scheduler state and exact drift from the desired XML/principal/action. */
|
|
81
81
|
async inspect(spec) {
|
|
82
|
+
return this.#inspect(spec, true);
|
|
83
|
+
}
|
|
84
|
+
/** 公开查询要求身份可确认;清理只依赖管理器状态,保留诊断且不放宽查询失败。 */
|
|
85
|
+
async #inspect(spec, requireIdentity) {
|
|
82
86
|
const normalized = this.#normalize(spec);
|
|
83
87
|
const taskName = windowsTaskName(normalized);
|
|
84
88
|
const definitionPath = this.#definitionPath(normalized);
|
|
@@ -123,7 +127,7 @@ export class WindowsUserTaskBackend {
|
|
|
123
127
|
windowsAccountIdentity(task.trigger_user_id, task.trigger_user_matches, this.#windowsUserId) === undefined;
|
|
124
128
|
return {
|
|
125
129
|
manager: this.kind,
|
|
126
|
-
state: identityUnknown ? "unknown" : windowsTaskState(task.state),
|
|
130
|
+
state: identityUnknown && requireIdentity ? "unknown" : windowsTaskState(task.state),
|
|
127
131
|
enabled: task.enabled === true,
|
|
128
132
|
lastExitCode: task.last_exit_code,
|
|
129
133
|
definitionPath,
|
|
@@ -206,7 +210,8 @@ export class WindowsUserTaskBackend {
|
|
|
206
210
|
async stop(spec) {
|
|
207
211
|
const normalized = await this.#installed(spec);
|
|
208
212
|
const taskName = windowsTaskName(normalized);
|
|
209
|
-
|
|
213
|
+
// 账号翻译失败不代表任务仍在运行;停止不依赖账号匹配,权限仍由 Scheduler 校验。
|
|
214
|
+
const status = await this.#inspect(spec, false);
|
|
210
215
|
if (status.state === "stopped" || status.state === "not_installed")
|
|
211
216
|
return;
|
|
212
217
|
if (status.state === "unknown")
|
|
@@ -219,7 +224,7 @@ export class WindowsUserTaskBackend {
|
|
|
219
224
|
// /End 仅表示请求受理;旧实例仍运行时不能 /Run(IgnoreNew 会吞掉重启)。
|
|
220
225
|
const end = Date.now() + normalized.timeoutStopSeconds * 1000;
|
|
221
226
|
while (true) {
|
|
222
|
-
const current = await this
|
|
227
|
+
const current = await this.#inspect(spec, false);
|
|
223
228
|
if (current.state === "stopped" || current.state === "not_installed")
|
|
224
229
|
return;
|
|
225
230
|
if (current.state === "unknown")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-cross-service",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Native user-service lifecycle backends for Octo Runtime",
|
|
6
6
|
"type": "module",
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"dist",
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"iconv-lite": "0.7.3"
|
|
15
|
+
},
|
|
13
16
|
"engines": {
|
|
14
17
|
"node": "^24.0.0 || ^26.0.0"
|
|
15
|
-
}
|
|
16
|
-
"dependencies": {}
|
|
18
|
+
}
|
|
17
19
|
}
|