@mininglamp-oss/octo-runtime 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/apps/cli/dist/adapters.d.ts +19 -1
- package/apps/cli/dist/adapters.js +154 -28
- package/apps/cli/dist/build-info.json +2 -2
- package/apps/cli/dist/codex.d.ts +5 -0
- package/apps/cli/dist/codex.js +36 -0
- package/apps/cli/dist/kernel.d.ts +4 -0
- package/apps/cli/dist/kernel.js +84 -0
- package/apps/cli/dist/main.js +8 -7
- package/apps/cli/dist/manifest.json +33 -22
- package/apps/cli/dist/output.d.ts +1 -0
- package/apps/cli/dist/output.js +8 -4
- package/apps/cli/dist/playboard.js +21 -12
- package/apps/cli/dist/provider-launch.d.ts +28 -0
- package/apps/cli/dist/provider-launch.js +52 -0
- package/apps/cli/dist/providers.d.ts +182 -0
- package/apps/cli/dist/providers.js +34 -0
- package/dist/public/adapter-sdk.d.ts +2 -0
- package/dist/public/adapter-sdk.js +2 -0
- package/dist/public/protocol.d.ts +2 -2
- package/dist/public/protocol.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/dist/index.js +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-acp-client/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.d.ts +26 -10
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +44 -53
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.d.ts +10 -35
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.js +21 -29
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/agent-env.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/agent-env.js +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.d.ts +14 -68
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.js +77 -61
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.d.ts +19 -31
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.js +28 -18
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/agent-env.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/agent-env.js +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.d.ts +6 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.js +55 -54
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.d.ts +54 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.js +147 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/environment.js +4 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +20 -92
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.js +103 -217
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.js +4 -11
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.d.ts +9 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.js +77 -81
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-SMTJTIN7.js → chunk-AE3OJBDS.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-H3S6WM37.js → chunk-NGR74QLF.js} +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-RISQ6NGV.js → chunk-XIUZ6GXG.js} +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.d.ts +6 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +16 -21
- 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 +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.d.ts +14 -16
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.js +29 -46
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/agent-env.d.ts +3 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/agent-env.js +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/client.js +4 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.d.ts +13 -21
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.js +47 -36
- 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 +24 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.js +14 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.d.ts +24 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.js +13 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.d.ts +24 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.js +14 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.d.ts +7 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +28 -31
- 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 +16 -25
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +113 -179
- 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 +24 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.js +14 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +24 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.js +14 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/activity.d.ts +5 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.d.ts +48 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.js +234 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/approval.js +7 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/environment.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/execution-scope.d.ts +5 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +25 -14
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +112 -59
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/mcp.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.d.ts +11 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.js +89 -8
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.d.ts +10 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.js +25 -0
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/public-display.js +10 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.d.ts +19 -1
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.js +154 -28
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.js +36 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/kernel.d.ts +4 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/kernel.js +84 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/main.js +8 -7
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/manifest.json +33 -22
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.d.ts +1 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +8 -4
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +21 -12
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.d.ts +28 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.js +52 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.d.ts +182 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.js +34 -0
- package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +20 -20
- package/node_modules/@mininglamp-oss/octo-runtime-client/build-info.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.js +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-client/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-ipc.schema.json +3 -104
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/protocol.schema.json +166 -1870
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.d.ts +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +122 -65
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.d.ts +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +13 -85
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-output-silence.d.ts +21 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-output-silence.js +176 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.d.ts +3 -2
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +8 -4
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.js +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.d.ts +5 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +17 -20
- package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/adapter-metadata.d.ts +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.d.ts +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.js +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.js +3 -9
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-configuration.js +1 -8
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.d.ts +1 -5
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +3 -292
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/experience.js +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +2 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +18 -13
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +90 -608
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.js +32 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.d.ts +7 -18
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +34 -189
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +11 -22
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +38 -78
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.js +6 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.d.ts +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.js +5 -40
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.js +2 -1
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
- package/package.json +34 -37
- package/packages/octo-runtime-protocol/schema/kernel-ipc.schema.json +3 -104
- package/packages/octo-runtime-protocol/schema/protocol.schema.json +166 -1870
- package/dist/public/codex.d.ts +0 -1
- package/dist/public/codex.js +0 -1
- package/dist/public/dsh.d.ts +0 -2
- package/dist/public/dsh.js +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/actmode.d.ts +0 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/actmode.js +0 -8
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-configuration-fixtures.json +0 -1219
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-fixtures.json +0 -5988
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-client.behavior.json +0 -56
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/native-invoke-fixtures.json +0 -116
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/run-protocol-fixtures.json +0 -761
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/runtime-selection-fixtures.json +0 -663
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/session-name-fixtures.json +0 -191
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.d.ts +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.js +0 -89
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.d.ts +0 -33
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.js +0 -93
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.d.ts +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.js +0 -36
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.js +0 -80
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.js +0 -9
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.js +0 -68
- /package/node_modules/@mininglamp-oss/octo-runtime-client/{schema → fixtures}/kernel-ipc-fixtures.json +0 -0
- /package/packages/octo-runtime-protocol/{schema → test/fixtures}/kernel-ipc-fixtures.json +0 -0
|
@@ -8,43 +8,51 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"type": "codex",
|
|
11
|
-
"module": "
|
|
12
|
-
"export": "
|
|
11
|
+
"module": "./codex.js",
|
|
12
|
+
"export": "createCliCodexAdapter",
|
|
13
|
+
"factory": true
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
"type": "claude-code",
|
|
16
|
-
"module": "
|
|
17
|
-
"export": "
|
|
17
|
+
"module": "./providers.js",
|
|
18
|
+
"export": "createCliClaudeCodeAdapter",
|
|
19
|
+
"factory": true
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
22
|
"type": "codebuddy",
|
|
21
|
-
"module": "
|
|
22
|
-
"export": "
|
|
23
|
+
"module": "./providers.js",
|
|
24
|
+
"export": "createCliCodeBuddyAdapter",
|
|
25
|
+
"factory": true
|
|
23
26
|
},
|
|
24
27
|
{
|
|
25
28
|
"type": "grok-build",
|
|
26
|
-
"module": "
|
|
27
|
-
"export": "
|
|
29
|
+
"module": "./providers.js",
|
|
30
|
+
"export": "createCliGrokBuildAdapter",
|
|
31
|
+
"factory": true
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
"type": "hermes",
|
|
31
|
-
"module": "
|
|
32
|
-
"export": "
|
|
35
|
+
"module": "./providers.js",
|
|
36
|
+
"export": "createCliHermesAdapter",
|
|
37
|
+
"factory": true
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
40
|
"type": "kimi-code",
|
|
36
|
-
"module": "
|
|
37
|
-
"export": "
|
|
41
|
+
"module": "./providers.js",
|
|
42
|
+
"export": "createCliKimiCodeAdapter",
|
|
43
|
+
"factory": true
|
|
38
44
|
},
|
|
39
45
|
{
|
|
40
46
|
"type": "mcode",
|
|
41
|
-
"module": "
|
|
42
|
-
"export": "
|
|
47
|
+
"module": "./providers.js",
|
|
48
|
+
"export": "createCliMcodeAdapter",
|
|
49
|
+
"factory": true
|
|
43
50
|
},
|
|
44
51
|
{
|
|
45
52
|
"type": "opencode",
|
|
46
|
-
"module": "
|
|
47
|
-
"export": "
|
|
53
|
+
"module": "./providers.js",
|
|
54
|
+
"export": "createCliOpenCodeAdapter",
|
|
55
|
+
"factory": true
|
|
48
56
|
},
|
|
49
57
|
{
|
|
50
58
|
"type": "openclaw",
|
|
@@ -53,18 +61,21 @@
|
|
|
53
61
|
},
|
|
54
62
|
{
|
|
55
63
|
"type": "qodercli",
|
|
56
|
-
"module": "
|
|
57
|
-
"export": "
|
|
64
|
+
"module": "./providers.js",
|
|
65
|
+
"export": "createCliQoderCliAdapter",
|
|
66
|
+
"factory": true
|
|
58
67
|
},
|
|
59
68
|
{
|
|
60
69
|
"type": "qoderclicn",
|
|
61
|
-
"module": "
|
|
62
|
-
"export": "
|
|
70
|
+
"module": "./providers.js",
|
|
71
|
+
"export": "createCliQoderCliCnAdapter",
|
|
72
|
+
"factory": true
|
|
63
73
|
},
|
|
64
74
|
{
|
|
65
75
|
"type": "antigravity",
|
|
66
|
-
"module": "
|
|
67
|
-
"export": "
|
|
76
|
+
"module": "./providers.js",
|
|
77
|
+
"export": "createCliAntigravityAdapter",
|
|
78
|
+
"factory": true
|
|
68
79
|
}
|
|
69
80
|
]
|
|
70
81
|
}
|
|
@@ -12,6 +12,7 @@ export interface ResidentProcessView {
|
|
|
12
12
|
observation: string;
|
|
13
13
|
service_id?: string;
|
|
14
14
|
incarnation?: number;
|
|
15
|
+
ownership?: string;
|
|
15
16
|
}
|
|
16
17
|
/** doctor 仅投影已取得的常驻快照;同 PID 合并角色,层级表示所有权而非猜测 OS PPID。 */
|
|
17
18
|
export declare function residentProcesses(snapshots: Record<string, ComponentSnapshot>): ResidentProcessView[];
|
|
@@ -28,7 +28,7 @@ export function residentProcesses(snapshots) {
|
|
|
28
28
|
const managedPid = pid(snapshot.service.pid);
|
|
29
29
|
add({
|
|
30
30
|
...(actualPid || managedPid ? { pid: actualPid ?? managedPid } : {}),
|
|
31
|
-
roles:
|
|
31
|
+
roles: name === "executor-kernel" ? ["CLI Host", "Kernel"] : [name],
|
|
32
32
|
state: actualPid ? "running" : snapshot.service.state,
|
|
33
33
|
observation: actualPid ? "alive" : "unknown"
|
|
34
34
|
});
|
|
@@ -43,7 +43,8 @@ export function residentProcesses(snapshots) {
|
|
|
43
43
|
state: text(service.state),
|
|
44
44
|
observation: text(service.observation),
|
|
45
45
|
service_id: text(service.service_id),
|
|
46
|
-
incarnation: typeof service.incarnation === "number" ? service.incarnation : undefined
|
|
46
|
+
incarnation: typeof service.incarnation === "number" ? service.incarnation : undefined,
|
|
47
|
+
ownership: typeof service.ownership === "string" ? text(service.ownership) : undefined
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -52,9 +53,12 @@ export function residentProcesses(snapshots) {
|
|
|
52
53
|
export function formatResidentProcesses(processes) {
|
|
53
54
|
const lines = ["Resident processes (ownership):"];
|
|
54
55
|
for (const entry of processes.filter((value) => !value.owner_pid)) {
|
|
55
|
-
|
|
56
|
+
const embeddedKernel = entry.roles.includes("CLI Host") && entry.roles.includes("Kernel");
|
|
57
|
+
lines.push(` ${entry.roles.filter((role) => !embeddedKernel || role !== "Kernel").join(", ")} PID ${entry.pid ?? "unknown"} ${entry.state} (${entry.observation})`);
|
|
58
|
+
if (embeddedKernel)
|
|
59
|
+
lines.push(` +-- Kernel in-process (shared PID ${entry.pid ?? "unknown"})`);
|
|
56
60
|
for (const child of processes.filter((value) => entry.pid && value.owner_pid === entry.pid))
|
|
57
|
-
lines.push(` +-- ${child.roles.join(", ")} PID ${child.pid ?? "-"} ${child.state} (${child.observation}) incarnation ${child.incarnation ?? "-"} service ${child.service_id ?? "-"}`);
|
|
61
|
+
lines.push(` +-- ${child.roles.join(", ")} PID ${child.pid ?? "-"} ${child.state} (${child.observation}) ${child.ownership ?? "unknown"} incarnation ${child.incarnation ?? "-"} service ${child.service_id ?? "-"}`);
|
|
58
62
|
}
|
|
59
63
|
for (const entry of processes.filter((value) => value.owner_pid && !processes.some((parent) => parent.pid === value.owner_pid)))
|
|
60
64
|
lines.push(` ${entry.roles.join(", ")} PID ${entry.pid ?? "-"} ${entry.state} (${entry.observation}) owner PID ${entry.owner_pid}`);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { loadCliAdapters } from "./adapters.js";
|
|
2
|
+
import { createCliKernelService } from "./kernel.js";
|
|
2
3
|
import { defaultRuntimeHome, runtimePaths, readJsonFile } from "./state.js";
|
|
3
4
|
import { loadCliManifest } from "./module-manifest.js";
|
|
4
5
|
import { readCliAdapterConfigurations } from "./adapter-configurations.js";
|
|
5
|
-
import { createKernelService } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
6
6
|
import { componentEndpoint } from "@mininglamp-oss/octo-runtime-host-sdk";
|
|
7
7
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
8
8
|
import { tmpdir } from "node:os";
|
|
@@ -44,12 +44,21 @@ export async function runPlayboard(options) {
|
|
|
44
44
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
45
45
|
throw new TypeError("playboard stdin must contain one JSON input object");
|
|
46
46
|
const input = identifyInvokeInput(InvokeInput.check(value));
|
|
47
|
-
// full_access 是本 CLI
|
|
47
|
+
// full_access 是本 CLI 宿主的缺省策略;显式策略(包括非法值)保留给 Adapter 校验,
|
|
48
48
|
// 不覆盖 Context,也不改变 SDK 的 ask 默认值。
|
|
49
|
-
if (!
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
if (!(Array.isArray(input.agentEnv?.items) &&
|
|
50
|
+
input.agentEnv.items.some((item) => item?.namespace === "octo.security" && item.name === "approval_policy")))
|
|
51
|
+
input.agentEnv = {
|
|
52
|
+
...input.agentEnv,
|
|
53
|
+
items: [
|
|
54
|
+
...input.agentEnv.items,
|
|
55
|
+
{
|
|
56
|
+
namespace: "octo.security",
|
|
57
|
+
name: "approval_policy",
|
|
58
|
+
payload: { mode: "full_access" }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
};
|
|
53
62
|
const profile = options.profile ?? "default";
|
|
54
63
|
const home = options.home ?? defaultRuntimeHome(options.env);
|
|
55
64
|
runtimePaths(home, profile); // Validate the selected profile before starting resources.
|
|
@@ -87,15 +96,15 @@ export async function runPlayboard(options) {
|
|
|
87
96
|
const paths = runtimePaths(home, profile);
|
|
88
97
|
const manifest = await loadCliManifest(home, options.manifest);
|
|
89
98
|
const configuration = await readJsonFile(paths.profileConfig);
|
|
90
|
-
kernel =
|
|
99
|
+
kernel = await createCliKernelService({
|
|
91
100
|
home: temporary,
|
|
92
101
|
endpoint: process.platform === "win32" ? componentEndpoint(temporary) : join(temporary, "k.sock"),
|
|
93
|
-
adapters: await loadCliAdapters(manifest.adapters, {
|
|
94
|
-
profileRoot: paths.profileRoot,
|
|
95
|
-
syncOpenClawTools: false
|
|
96
|
-
}),
|
|
97
102
|
adapterConfigurations: await readCliAdapterConfigurations(paths.profileRoot, configuration?.adapters, manifest, options.env ?? process.env)
|
|
98
|
-
}
|
|
103
|
+
}, await loadCliAdapters(manifest.adapters, {
|
|
104
|
+
profileRoot: paths.profileRoot,
|
|
105
|
+
syncOpenClawTools: false,
|
|
106
|
+
env: options.env ?? process.env
|
|
107
|
+
}));
|
|
99
108
|
await kernel.initialize({ signal: controller.signal });
|
|
100
109
|
let exitCode = 1;
|
|
101
110
|
const { inputs: parts, sessionId, providerSession, agentEnv, ...content } = input;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type AdapterMetadata } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
2
|
+
/** CLI 明确选择安装;配置形状错误阻止装配,缺安装只影响对应 Adapter。 */
|
|
3
|
+
export declare function cliProviderLaunch(options: Record<string, unknown>, env: NodeJS.ProcessEnv, defaultCommand: string): {
|
|
4
|
+
launch: Required<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProviderLaunch>;
|
|
5
|
+
command?: undefined;
|
|
6
|
+
reason?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
command: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
launch?: undefined;
|
|
11
|
+
};
|
|
12
|
+
/** 复用模块静态声明及既有 probe;没有依赖时不构造假 command、不延迟发现安装。 */
|
|
13
|
+
export declare function unavailableCliAdapter(metadata: AdapterMetadata, reason: string, command: string): Readonly<Omit<{
|
|
14
|
+
metadata: AdapterMetadata;
|
|
15
|
+
probe: () => Promise<{
|
|
16
|
+
available: false;
|
|
17
|
+
command: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}>;
|
|
20
|
+
respondInteraction: () => Promise<void>;
|
|
21
|
+
respondNative: () => Promise<void>;
|
|
22
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
23
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
24
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
25
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
26
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineAdapter, runAdapterPreparation } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
2
|
+
import { resolveHostProviderLaunch } from "@mininglamp-oss/octo-runtime-adapter-sdk/process-launch";
|
|
3
|
+
/** CLI 明确选择安装;配置形状错误阻止装配,缺安装只影响对应 Adapter。 */
|
|
4
|
+
export function cliProviderLaunch(options, env, defaultCommand) {
|
|
5
|
+
if ((options.command !== undefined &&
|
|
6
|
+
(typeof options.command !== "string" ||
|
|
7
|
+
!options.command ||
|
|
8
|
+
options.command.includes("\0"))) ||
|
|
9
|
+
(options.commandArgsPrefix !== undefined &&
|
|
10
|
+
(!Array.isArray(options.commandArgsPrefix) ||
|
|
11
|
+
options.commandArgsPrefix.some((arg) => typeof arg !== "string" || arg.includes("\0")))))
|
|
12
|
+
throw new TypeError("PROVIDER_LAUNCH_INVALID");
|
|
13
|
+
try {
|
|
14
|
+
return {
|
|
15
|
+
launch: resolveHostProviderLaunch(options.command ?? defaultCommand, {
|
|
16
|
+
env,
|
|
17
|
+
cwd: process.cwd(),
|
|
18
|
+
args: options.commandArgsPrefix
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
const code = error.code;
|
|
24
|
+
if (code === "ENOENT" || code === "ENOTDIR" || code === "EACCES" || code === "EPERM")
|
|
25
|
+
return {
|
|
26
|
+
command: typeof error.path === "string"
|
|
27
|
+
? error.path
|
|
28
|
+
: (options.command ?? defaultCommand),
|
|
29
|
+
reason: code === "EACCES" || code === "EPERM" ? "permission_denied" : "command_not_found"
|
|
30
|
+
};
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** 复用模块静态声明及既有 probe;没有依赖时不构造假 command、不延迟发现安装。 */
|
|
35
|
+
export function unavailableCliAdapter(metadata, reason, command) {
|
|
36
|
+
const failure = Object.assign(new Error(`${reason}: ${command}`), {
|
|
37
|
+
code: reason === "permission_denied" ? "EACCES" : "ENOENT"
|
|
38
|
+
});
|
|
39
|
+
return defineAdapter({
|
|
40
|
+
metadata,
|
|
41
|
+
probe: () => Promise.resolve({ available: false, command, reason }),
|
|
42
|
+
respondInteraction: () => Promise.reject(new Error("INTERACTION_NOT_ACTIVE")),
|
|
43
|
+
respondNative: () => Promise.reject(new Error("INTERACTION_NOT_ACTIVE")),
|
|
44
|
+
async *invoke(request, context) {
|
|
45
|
+
await runAdapterPreparation(context, () => {
|
|
46
|
+
request.signal?.throwIfAborted();
|
|
47
|
+
throw failure;
|
|
48
|
+
});
|
|
49
|
+
yield* [];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { type AdapterMetadata } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
2
|
+
import type { HostedAdapter } from "@mininglamp-oss/octo-runtime-executor-kernel";
|
|
3
|
+
export declare const createCliOpenCodeAdapter: (options: Record<string, unknown>, context: {
|
|
4
|
+
env: NodeJS.ProcessEnv;
|
|
5
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
6
|
+
metadata: AdapterMetadata;
|
|
7
|
+
probe: () => Promise<{
|
|
8
|
+
available: false;
|
|
9
|
+
command: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
}>;
|
|
12
|
+
respondInteraction: () => Promise<void>;
|
|
13
|
+
respondNative: () => Promise<void>;
|
|
14
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
15
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
16
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
17
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
18
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
export declare const createCliClaudeCodeAdapter: (options: Record<string, unknown>, context: {
|
|
22
|
+
env: NodeJS.ProcessEnv;
|
|
23
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
24
|
+
metadata: AdapterMetadata;
|
|
25
|
+
probe: () => Promise<{
|
|
26
|
+
available: false;
|
|
27
|
+
command: string;
|
|
28
|
+
reason: string;
|
|
29
|
+
}>;
|
|
30
|
+
respondInteraction: () => Promise<void>;
|
|
31
|
+
respondNative: () => Promise<void>;
|
|
32
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
33
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
34
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
35
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
36
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
export declare const createCliCodeBuddyAdapter: (options: Record<string, unknown>, context: {
|
|
40
|
+
env: NodeJS.ProcessEnv;
|
|
41
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
42
|
+
metadata: AdapterMetadata;
|
|
43
|
+
probe: () => Promise<{
|
|
44
|
+
available: false;
|
|
45
|
+
command: string;
|
|
46
|
+
reason: string;
|
|
47
|
+
}>;
|
|
48
|
+
respondInteraction: () => Promise<void>;
|
|
49
|
+
respondNative: () => Promise<void>;
|
|
50
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
51
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
52
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
53
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
54
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
export declare const createCliAntigravityAdapter: (options: Record<string, unknown>, context: {
|
|
58
|
+
env: NodeJS.ProcessEnv;
|
|
59
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
60
|
+
metadata: AdapterMetadata;
|
|
61
|
+
probe: () => Promise<{
|
|
62
|
+
available: false;
|
|
63
|
+
command: string;
|
|
64
|
+
reason: string;
|
|
65
|
+
}>;
|
|
66
|
+
respondInteraction: () => Promise<void>;
|
|
67
|
+
respondNative: () => Promise<void>;
|
|
68
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
69
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
70
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
71
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
72
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
export declare const createCliGrokBuildAdapter: (options: Record<string, unknown>, context: {
|
|
76
|
+
env: NodeJS.ProcessEnv;
|
|
77
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
78
|
+
metadata: AdapterMetadata;
|
|
79
|
+
probe: () => Promise<{
|
|
80
|
+
available: false;
|
|
81
|
+
command: string;
|
|
82
|
+
reason: string;
|
|
83
|
+
}>;
|
|
84
|
+
respondInteraction: () => Promise<void>;
|
|
85
|
+
respondNative: () => Promise<void>;
|
|
86
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
87
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
88
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
89
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
90
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
export declare const createCliHermesAdapter: (options: Record<string, unknown>, context: {
|
|
94
|
+
env: NodeJS.ProcessEnv;
|
|
95
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
96
|
+
metadata: AdapterMetadata;
|
|
97
|
+
probe: () => Promise<{
|
|
98
|
+
available: false;
|
|
99
|
+
command: string;
|
|
100
|
+
reason: string;
|
|
101
|
+
}>;
|
|
102
|
+
respondInteraction: () => Promise<void>;
|
|
103
|
+
respondNative: () => Promise<void>;
|
|
104
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
105
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
106
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
107
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
108
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
export declare const createCliKimiCodeAdapter: (options: Record<string, unknown>, context: {
|
|
112
|
+
env: NodeJS.ProcessEnv;
|
|
113
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
114
|
+
metadata: AdapterMetadata;
|
|
115
|
+
probe: () => Promise<{
|
|
116
|
+
available: false;
|
|
117
|
+
command: string;
|
|
118
|
+
reason: string;
|
|
119
|
+
}>;
|
|
120
|
+
respondInteraction: () => Promise<void>;
|
|
121
|
+
respondNative: () => Promise<void>;
|
|
122
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
123
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
124
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
125
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
126
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
129
|
+
export declare const createCliMcodeAdapter: (options: Record<string, unknown>, context: {
|
|
130
|
+
env: NodeJS.ProcessEnv;
|
|
131
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
132
|
+
metadata: AdapterMetadata;
|
|
133
|
+
probe: () => Promise<{
|
|
134
|
+
available: false;
|
|
135
|
+
command: string;
|
|
136
|
+
reason: string;
|
|
137
|
+
}>;
|
|
138
|
+
respondInteraction: () => Promise<void>;
|
|
139
|
+
respondNative: () => Promise<void>;
|
|
140
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
141
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
142
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
143
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
144
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
145
|
+
};
|
|
146
|
+
}>;
|
|
147
|
+
export declare const createCliQoderCliAdapter: (options: Record<string, unknown>, context: {
|
|
148
|
+
env: NodeJS.ProcessEnv;
|
|
149
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
150
|
+
metadata: AdapterMetadata;
|
|
151
|
+
probe: () => Promise<{
|
|
152
|
+
available: false;
|
|
153
|
+
command: string;
|
|
154
|
+
reason: string;
|
|
155
|
+
}>;
|
|
156
|
+
respondInteraction: () => Promise<void>;
|
|
157
|
+
respondNative: () => Promise<void>;
|
|
158
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
159
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
160
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
161
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
162
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
163
|
+
};
|
|
164
|
+
}>;
|
|
165
|
+
export declare const createCliQoderCliCnAdapter: (options: Record<string, unknown>, context: {
|
|
166
|
+
env: NodeJS.ProcessEnv;
|
|
167
|
+
}) => HostedAdapter | Readonly<Omit<{
|
|
168
|
+
metadata: AdapterMetadata;
|
|
169
|
+
probe: () => Promise<{
|
|
170
|
+
available: false;
|
|
171
|
+
command: string;
|
|
172
|
+
reason: string;
|
|
173
|
+
}>;
|
|
174
|
+
respondInteraction: () => Promise<void>;
|
|
175
|
+
respondNative: () => Promise<void>;
|
|
176
|
+
invoke(request: import("@mininglamp-oss/octo-runtime-protocol").InvokeRequest, context: import("@mininglamp-oss/octo-runtime-adapter-sdk").AdapterInvocationContext | undefined): AsyncGenerator<never, void, unknown>;
|
|
177
|
+
}, "metadata" | "defaultAgentEnv"> & {
|
|
178
|
+
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
179
|
+
metadata: Omit<AdapterMetadata, "protocolSupport"> & {
|
|
180
|
+
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createOpenCodeAdapter, openCodeMetadata } from "@mininglamp-oss/octo-runtime-adapter-opencode";
|
|
2
|
+
import { createClaudeCodeAdapter, claudeCodeMetadata } from "@mininglamp-oss/octo-runtime-adapter-claude-code";
|
|
3
|
+
import { createCodeBuddyAdapter, codeBuddyMetadata } from "@mininglamp-oss/octo-runtime-adapter-codebuddy";
|
|
4
|
+
import { createAntigravityAdapter, antigravityMetadata } from "@mininglamp-oss/octo-runtime-adapter-antigravity";
|
|
5
|
+
import { createGrokBuildAdapter, grokBuildMetadata } from "@mininglamp-oss/octo-runtime-adapter-grok-build";
|
|
6
|
+
import { createHermesAdapter, hermesMetadata } from "@mininglamp-oss/octo-runtime-adapter-hermes";
|
|
7
|
+
import { createKimiCodeAdapter, kimiCodeMetadata } from "@mininglamp-oss/octo-runtime-adapter-kimi-code";
|
|
8
|
+
import { createMcodeAdapter, mcodeMetadata } from "@mininglamp-oss/octo-runtime-adapter-mcode";
|
|
9
|
+
import { createQoderCliAdapter, qoderCliMetadata } from "@mininglamp-oss/octo-runtime-adapter-qodercli";
|
|
10
|
+
import { createQoderCliCnAdapter, qoderCliCnMetadata } from "@mininglamp-oss/octo-runtime-adapter-qoderclicn";
|
|
11
|
+
import { cliProviderLaunch, unavailableCliAdapter } from "./provider-launch.js";
|
|
12
|
+
/** 仅 CLI 的装配便利层;不约束 SDK 构造形式,也不在 Kernel 内注册执行依赖。 */
|
|
13
|
+
function cliFactory(metadata, command, construct) {
|
|
14
|
+
return (options, context) => {
|
|
15
|
+
const selected = cliProviderLaunch(options, context.env, command);
|
|
16
|
+
if (!selected.launch)
|
|
17
|
+
return unavailableCliAdapter(metadata, selected.reason, selected.command);
|
|
18
|
+
return construct({
|
|
19
|
+
command: selected.launch.command,
|
|
20
|
+
commandArgsPrefix: [...selected.launch.args],
|
|
21
|
+
env: selected.launch.env
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export const createCliOpenCodeAdapter = cliFactory(openCodeMetadata, "opencode", createOpenCodeAdapter);
|
|
26
|
+
export const createCliClaudeCodeAdapter = cliFactory(claudeCodeMetadata, "claude", createClaudeCodeAdapter);
|
|
27
|
+
export const createCliCodeBuddyAdapter = cliFactory(codeBuddyMetadata, "codebuddy", createCodeBuddyAdapter);
|
|
28
|
+
export const createCliAntigravityAdapter = cliFactory(antigravityMetadata, "agy", createAntigravityAdapter);
|
|
29
|
+
export const createCliGrokBuildAdapter = cliFactory(grokBuildMetadata, "grok", createGrokBuildAdapter);
|
|
30
|
+
export const createCliHermesAdapter = cliFactory(hermesMetadata, "hermes", createHermesAdapter);
|
|
31
|
+
export const createCliKimiCodeAdapter = cliFactory(kimiCodeMetadata, "kimi", createKimiCodeAdapter);
|
|
32
|
+
export const createCliMcodeAdapter = cliFactory(mcodeMetadata, "mcode", createMcodeAdapter);
|
|
33
|
+
export const createCliQoderCliAdapter = cliFactory(qoderCliMetadata, "qodercli", createQoderCliAdapter);
|
|
34
|
+
export const createCliQoderCliCnAdapter = cliFactory(qoderCliCnMetadata, "qoderclicn", createQoderCliCnAdapter);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,25 +9,25 @@
|
|
|
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.14",
|
|
13
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.14",
|
|
14
14
|
"json5": "2.2.3",
|
|
15
|
-
"@mininglamp-oss/octo-runtime-host-sdk": "1.1.
|
|
16
|
-
"@mininglamp-oss/octo-runtime-adapter-openclaw": "1.1.
|
|
17
|
-
"@mininglamp-oss/octo-runtime-cross-service": "1.1.
|
|
18
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
19
|
-
"@mininglamp-oss/octo-runtime-executor-kernel": "1.1.
|
|
20
|
-
"@mininglamp-oss/octo-runtime-executor-core": "1.1.
|
|
21
|
-
"@mininglamp-oss/octo-runtime-adapter-antigravity": "1.1.
|
|
22
|
-
"@mininglamp-oss/octo-runtime-adapter-claude-code": "1.1.
|
|
23
|
-
"@mininglamp-oss/octo-runtime-adapter-codebuddy": "1.1.
|
|
24
|
-
"@mininglamp-oss/octo-runtime-adapter-codex": "1.1.
|
|
25
|
-
"@mininglamp-oss/octo-runtime-adapter-hermes": "1.1.
|
|
26
|
-
"@mininglamp-oss/octo-runtime-adapter-grok-build": "1.1.
|
|
27
|
-
"@mininglamp-oss/octo-runtime-adapter-kimi-code": "1.1.
|
|
28
|
-
"@mininglamp-oss/octo-runtime-adapter-mcode": "1.1.
|
|
29
|
-
"@mininglamp-oss/octo-runtime-adapter-opencode": "1.1.
|
|
30
|
-
"@mininglamp-oss/octo-runtime-adapter-qodercli": "1.1.
|
|
31
|
-
"@mininglamp-oss/octo-runtime-adapter-qoderclicn": "1.1.
|
|
15
|
+
"@mininglamp-oss/octo-runtime-host-sdk": "1.1.14",
|
|
16
|
+
"@mininglamp-oss/octo-runtime-adapter-openclaw": "1.1.14",
|
|
17
|
+
"@mininglamp-oss/octo-runtime-cross-service": "1.1.14",
|
|
18
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.14",
|
|
19
|
+
"@mininglamp-oss/octo-runtime-executor-kernel": "1.1.14",
|
|
20
|
+
"@mininglamp-oss/octo-runtime-executor-core": "1.1.14",
|
|
21
|
+
"@mininglamp-oss/octo-runtime-adapter-antigravity": "1.1.14",
|
|
22
|
+
"@mininglamp-oss/octo-runtime-adapter-claude-code": "1.1.14",
|
|
23
|
+
"@mininglamp-oss/octo-runtime-adapter-codebuddy": "1.1.14",
|
|
24
|
+
"@mininglamp-oss/octo-runtime-adapter-codex": "1.1.14",
|
|
25
|
+
"@mininglamp-oss/octo-runtime-adapter-hermes": "1.1.14",
|
|
26
|
+
"@mininglamp-oss/octo-runtime-adapter-grok-build": "1.1.14",
|
|
27
|
+
"@mininglamp-oss/octo-runtime-adapter-kimi-code": "1.1.14",
|
|
28
|
+
"@mininglamp-oss/octo-runtime-adapter-mcode": "1.1.14",
|
|
29
|
+
"@mininglamp-oss/octo-runtime-adapter-opencode": "1.1.14",
|
|
30
|
+
"@mininglamp-oss/octo-runtime-adapter-qodercli": "1.1.14",
|
|
31
|
+
"@mininglamp-oss/octo-runtime-adapter-qoderclicn": "1.1.14"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import net from "node:net";
|
|
2
2
|
import { assertIpcEndpoint } from "./runtime-path.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
|
-
import { assertInvokeInput, assertHostFrame, assertHostFrameIdentity, assertHostRunReceipt, assertKernelStatus, createInputInvoke, identifyInvokeInput, isHostTerminal, HOST_RPC_MAX_LINE_BYTES, INVOKE_REQUEST_MAX_BYTES } from "@mininglamp-oss/octo-runtime-protocol";
|
|
4
|
+
import { assertInvokeInput, assertHostFrame, assertHostFrameIdentity, assertHostRunReceipt, assertKernelStatus, createInputInvoke, identifyInvokeInput, isHostTerminal, HOST_RPC_MAX_LINE_BYTES, INVOKE_REQUEST_MAX_BYTES, KERNEL_IPC_VERSION } from "@mininglamp-oss/octo-runtime-protocol";
|
|
5
5
|
import { KernelError } from "./types.js";
|
|
6
6
|
import { InvocationRegistry } from "./invocation-lifecycle.js";
|
|
7
7
|
import { markSubmissionRejected } from "./submission-error.js";
|
|
@@ -217,7 +217,7 @@ export function attachKernel(options) {
|
|
|
217
217
|
if (!value || typeof value !== "object" || typeof value.ipc_version !== "number")
|
|
218
218
|
throw new KernelError("INVALID_RESPONSE");
|
|
219
219
|
// 包版本不参与 wire 兼容判断;submit 复用此既有查询,拒绝后不会发起执行。
|
|
220
|
-
if (value.ipc_version !==
|
|
220
|
+
if (value.ipc_version !== KERNEL_IPC_VERSION)
|
|
221
221
|
throw new KernelError("KERNEL_IPC_VERSION_UNSUPPORTED");
|
|
222
222
|
try {
|
|
223
223
|
// 与服务端/doctor 共用快照白名单;仍保持客户端的受控错误与版本拒绝顺序。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Standalone Node.js client and shared protocol for an existing Octo Runtime Kernel",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./protocol/schema.json": "./schema/protocol.schema.json",
|
|
27
27
|
"./protocol/ipc-schema.json": "./schema/kernel-ipc.schema.json",
|
|
28
|
-
"./protocol/ipc-fixtures.json": "./
|
|
29
|
-
"./protocol/behavior.json": "./schema/kernel-client.behavior.json",
|
|
28
|
+
"./protocol/ipc-fixtures.json": "./fixtures/kernel-ipc-fixtures.json",
|
|
30
29
|
"./internal": {
|
|
31
30
|
"types": "./dist/internal.d.ts",
|
|
32
31
|
"import": "./dist/internal.js"
|
|
@@ -34,7 +33,8 @@
|
|
|
34
33
|
},
|
|
35
34
|
"files": [
|
|
36
35
|
"dist",
|
|
37
|
-
"schema",
|
|
36
|
+
"schema/*.schema.json",
|
|
37
|
+
"fixtures/kernel-ipc-fixtures.json",
|
|
38
38
|
"build-info.json"
|
|
39
39
|
],
|
|
40
40
|
"engines": {
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"directory": "packages/octo-runtime-client"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@mininglamp-oss/octo-runtime-protocol": "1.1.
|
|
52
|
+
"@mininglamp-oss/octo-runtime-protocol": "1.1.14"
|
|
53
53
|
}
|
|
54
54
|
}
|