@mininglamp-oss/octo-runtime 1.1.13 → 1.1.15
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/adapters.js +1 -5
- package/apps/cli/dist/build-info.json +2 -2
- package/dist/public/protocol.d.ts +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 +19 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +24 -29
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.js +0 -1
- 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.js +23 -24
- 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.js +1 -2
- 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.js +25 -30
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.js +0 -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-H3S6WM37.js → chunk-NGR74QLF.js} +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-SMTJTIN7.js → chunk-RIZUXNZ2.js} +115 -40
- 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 +2 -6
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +9 -9
- 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.d.ts +5 -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 +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.js +8 -18
- 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/index.js +1 -12
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/package.json +5 -5
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.d.ts +16 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.js +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.d.ts +16 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.js +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.d.ts +16 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.js +1 -2
- 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 +0 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +2 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +6 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/package.json +4 -4
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.d.ts +16 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.js +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +16 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.js +1 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +3 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.d.ts +2 -3
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.js +6 -28
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +0 -2
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +2 -7
- package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.js +1 -5
- package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
- 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/package.json +2 -2
- package/node_modules/@mininglamp-oss/octo-runtime-client/schema/protocol.schema.json +42 -624
- package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +1 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +97 -12
- 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 +189 -0
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.d.ts +0 -1
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +3 -4
- package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
- 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/context-catalog.js +1 -5
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +1 -26
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/experience.js +7 -0
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +3 -12
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +16 -240
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.d.ts +3 -5
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +2 -12
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.js +0 -12
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
- package/package.json +24 -24
- package/packages/octo-runtime-protocol/schema/protocol.schema.json +42 -624
- 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-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/runtime-selection.d.ts +0 -3
- package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.js +0 -68
|
@@ -5,7 +5,14 @@ export declare const hermesMetadata: AdapterMetadata;
|
|
|
5
5
|
export declare function createHermesAdapter(options: NonNullable<Parameters<typeof createAcpAdapter>[1]> & {
|
|
6
6
|
command: string;
|
|
7
7
|
}): Readonly<Omit<{
|
|
8
|
-
metadata:
|
|
8
|
+
metadata: {
|
|
9
|
+
mcp?: boolean;
|
|
10
|
+
workspace?: boolean;
|
|
11
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
12
|
+
type: string;
|
|
13
|
+
processModel?: string;
|
|
14
|
+
transport?: string;
|
|
15
|
+
};
|
|
9
16
|
probe: (() => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>) | (() => Promise<{
|
|
10
17
|
available: false;
|
|
11
18
|
command: string;
|
|
@@ -15,7 +22,14 @@ export declare function createHermesAdapter(options: NonNullable<Parameters<type
|
|
|
15
22
|
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>;
|
|
16
23
|
}, "metadata" | "defaultAgentEnv"> & {
|
|
17
24
|
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
18
|
-
metadata: Omit<
|
|
25
|
+
metadata: Omit<{
|
|
26
|
+
mcp?: boolean;
|
|
27
|
+
workspace?: boolean;
|
|
28
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
29
|
+
type: string;
|
|
30
|
+
processModel?: string;
|
|
31
|
+
transport?: string;
|
|
32
|
+
}, "protocolSupport"> & {
|
|
19
33
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
20
34
|
};
|
|
21
35
|
}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
2
2
|
export const hermesMetadata = {
|
|
3
3
|
type: "hermes",
|
|
4
|
-
mcp: true
|
|
5
|
-
agentSources: ["provisioned"]
|
|
4
|
+
mcp: true
|
|
6
5
|
};
|
|
7
6
|
/** 宿主交付所选命令或 client factory;本模块仅维护 ACP 协议要求。 */
|
|
8
7
|
export function createHermesAdapter(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-hermes",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -5,7 +5,14 @@ export declare const kimiCodeMetadata: AdapterMetadata;
|
|
|
5
5
|
export declare function createKimiCodeAdapter(options: NonNullable<Parameters<typeof createAcpAdapter>[1]> & {
|
|
6
6
|
command: string;
|
|
7
7
|
}): Readonly<Omit<{
|
|
8
|
-
metadata:
|
|
8
|
+
metadata: {
|
|
9
|
+
mcp?: boolean;
|
|
10
|
+
workspace?: boolean;
|
|
11
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
12
|
+
type: string;
|
|
13
|
+
processModel?: string;
|
|
14
|
+
transport?: string;
|
|
15
|
+
};
|
|
9
16
|
probe: (() => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>) | (() => Promise<{
|
|
10
17
|
available: false;
|
|
11
18
|
command: string;
|
|
@@ -15,7 +22,14 @@ export declare function createKimiCodeAdapter(options: NonNullable<Parameters<ty
|
|
|
15
22
|
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>;
|
|
16
23
|
}, "metadata" | "defaultAgentEnv"> & {
|
|
17
24
|
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
18
|
-
metadata: Omit<
|
|
25
|
+
metadata: Omit<{
|
|
26
|
+
mcp?: boolean;
|
|
27
|
+
workspace?: boolean;
|
|
28
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
29
|
+
type: string;
|
|
30
|
+
processModel?: string;
|
|
31
|
+
transport?: string;
|
|
32
|
+
}, "protocolSupport"> & {
|
|
19
33
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
20
34
|
};
|
|
21
35
|
}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
2
2
|
export const kimiCodeMetadata = {
|
|
3
3
|
type: "kimi-code",
|
|
4
|
-
mcp: true
|
|
5
|
-
agentSources: ["provisioned"]
|
|
4
|
+
mcp: true
|
|
6
5
|
};
|
|
7
6
|
/** 宿主交付所选命令或 client factory;本模块仅维护 ACP 协议要求。 */
|
|
8
7
|
export function createKimiCodeAdapter(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-kimi-code",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -17,7 +17,14 @@ export declare const mcodeMetadata: AdapterMetadata;
|
|
|
17
17
|
export declare function createMcodeAdapter(options: NonNullable<Parameters<typeof createAcpAdapter>[1]> & {
|
|
18
18
|
command: string;
|
|
19
19
|
}): Readonly<Omit<{
|
|
20
|
-
metadata:
|
|
20
|
+
metadata: {
|
|
21
|
+
mcp?: boolean;
|
|
22
|
+
workspace?: boolean;
|
|
23
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
24
|
+
type: string;
|
|
25
|
+
processModel?: string;
|
|
26
|
+
transport?: string;
|
|
27
|
+
};
|
|
21
28
|
probe: (() => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>) | (() => Promise<{
|
|
22
29
|
available: false;
|
|
23
30
|
command: string;
|
|
@@ -27,7 +34,14 @@ export declare function createMcodeAdapter(options: NonNullable<Parameters<typeo
|
|
|
27
34
|
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>;
|
|
28
35
|
}, "metadata" | "defaultAgentEnv"> & {
|
|
29
36
|
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
30
|
-
metadata: Omit<
|
|
37
|
+
metadata: Omit<{
|
|
38
|
+
mcp?: boolean;
|
|
39
|
+
workspace?: boolean;
|
|
40
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
41
|
+
type: string;
|
|
42
|
+
processModel?: string;
|
|
43
|
+
transport?: string;
|
|
44
|
+
}, "protocolSupport"> & {
|
|
31
45
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
32
46
|
};
|
|
33
47
|
}>;
|
|
@@ -13,8 +13,7 @@ import { createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
|
13
13
|
*/
|
|
14
14
|
export const mcodeMetadata = {
|
|
15
15
|
type: "mcode",
|
|
16
|
-
mcp: true
|
|
17
|
-
agentSources: ["provisioned"]
|
|
16
|
+
mcp: true
|
|
18
17
|
};
|
|
19
18
|
/** 宿主交付所选命令或 client factory;本模块仅维护 ACP 协议要求。 */
|
|
20
19
|
export function createMcodeAdapter(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-mcode",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -43,7 +43,6 @@ export declare function createOpenClawAdapter({ clientFactory, log }?: {
|
|
|
43
43
|
workspace: false;
|
|
44
44
|
processModel: string;
|
|
45
45
|
transport: string;
|
|
46
|
-
agentSources: ("preset" | "provisioned")[];
|
|
47
46
|
};
|
|
48
47
|
probe: (options?: AdapterProbeOptions) => Promise<{
|
|
49
48
|
available: boolean;
|
|
@@ -63,7 +62,6 @@ export declare function createOpenClawAdapter({ clientFactory, log }?: {
|
|
|
63
62
|
workspace: false;
|
|
64
63
|
processModel: string;
|
|
65
64
|
transport: string;
|
|
66
|
-
agentSources: ("preset" | "provisioned")[];
|
|
67
65
|
}, "protocolSupport"> & {
|
|
68
66
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
69
67
|
};
|
|
@@ -78,7 +76,6 @@ export declare const openclawAdapter: Readonly<Omit<{
|
|
|
78
76
|
workspace: false;
|
|
79
77
|
processModel: string;
|
|
80
78
|
transport: string;
|
|
81
|
-
agentSources: ("preset" | "provisioned")[];
|
|
82
79
|
};
|
|
83
80
|
probe: (options?: AdapterProbeOptions) => Promise<{
|
|
84
81
|
available: boolean;
|
|
@@ -98,7 +95,6 @@ export declare const openclawAdapter: Readonly<Omit<{
|
|
|
98
95
|
workspace: false;
|
|
99
96
|
processModel: string;
|
|
100
97
|
transport: string;
|
|
101
|
-
agentSources: ("preset" | "provisioned")[];
|
|
102
98
|
}, "protocolSupport"> & {
|
|
103
99
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
104
100
|
};
|
|
@@ -1201,15 +1201,14 @@ export function createOpenClawAdapter({ clientFactory = (options) => new OpenCla
|
|
|
1201
1201
|
}
|
|
1202
1202
|
};
|
|
1203
1203
|
return defineAdapter({
|
|
1204
|
-
defaultAgentEnv: withAgentEnvItems(defaultAgentEnv("openclaw"
|
|
1204
|
+
defaultAgentEnv: withAgentEnvItems(defaultAgentEnv("openclaw"), [
|
|
1205
1205
|
{ namespace: "adapter.openclaw", name: "options", payload: { agentId: "main" } }
|
|
1206
1206
|
]),
|
|
1207
1207
|
metadata: {
|
|
1208
1208
|
type: "openclaw",
|
|
1209
1209
|
workspace: false,
|
|
1210
1210
|
processModel: "websocket-per-invocation",
|
|
1211
|
-
transport: "openclaw-gateway-rpc"
|
|
1212
|
-
agentSources: ["preset", "provisioned"]
|
|
1211
|
+
transport: "openclaw-gateway-rpc"
|
|
1213
1212
|
},
|
|
1214
1213
|
probe: probeGateway,
|
|
1215
1214
|
async respondInteraction(invocationId, response) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-openclaw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15",
|
|
9
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.15",
|
|
10
10
|
"ws": "8.22.1"
|
|
11
11
|
},
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export const openCodeMetadata = {
|
|
2
2
|
mcp: true,
|
|
3
|
-
type: "opencode"
|
|
4
|
-
agentSources: ["provisioned"]
|
|
3
|
+
type: "opencode"
|
|
5
4
|
};
|
|
6
5
|
import { assertAdapterAgentEnv, assertAdapterWorkdir, runAdapterPreparation, invocationEffort, invocationModel, invocationRuntimeLimits, invocationApprovalMode, invocationWorkdir } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
7
6
|
import { hasImageInput, mapReasoningEffort, invocationEnvironment, processEnvironmentValue, invocationMcpServers, assertMcpOptions } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
@@ -11,7 +10,7 @@ import { canonicalTerminalStatus } from "@mininglamp-oss/octo-runtime-protocol";
|
|
|
11
10
|
* --thinking --auto`) for full access and ACP for interactive approval.
|
|
12
11
|
* Both transports normalize provider output into canonical events.
|
|
13
12
|
*/
|
|
14
|
-
import { AcpInvocationError, createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
13
|
+
import { AcpInvocationError, acpModeId, createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
15
14
|
import { createJsonCliAdapter, probeCommand, snapshotProviderLaunch, providerInputText, ProviderProcessError } from "@mininglamp-oss/octo-runtime-adapter-sdk";
|
|
16
15
|
class OpenCodeInputError extends Error {
|
|
17
16
|
}
|
|
@@ -358,6 +357,10 @@ export function createOpenCodeAdapter({ command, commandArgsPrefix = [], env = {
|
|
|
358
357
|
throw new Error("APPROVAL_MODE_UNSUPPORTED: opencode has no qualified assisted policy");
|
|
359
358
|
// 启动前只做目录与纯配置检查;实际协议失败按执行结果报告,不以版本号拦截。
|
|
360
359
|
inlineConfig(request, launch.env);
|
|
360
|
+
// JSON CLI 没有本包已接线的模式载体,不替宿主改变审批或选择传输。
|
|
361
|
+
if (invocationApprovalMode(request) === "full_access" &&
|
|
362
|
+
acpModeId(request, "opencode") !== undefined)
|
|
363
|
+
throw new Error("OPENCODE_MODE_UNSUPPORTED: modeId requires the ACP execution path");
|
|
361
364
|
});
|
|
362
365
|
request.signal?.throwIfAborted();
|
|
363
366
|
if (invocationApprovalMode(request) === "ask") {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-opencode",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15",
|
|
9
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.15",
|
|
10
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.15"
|
|
11
11
|
},
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"files": [
|
|
@@ -17,7 +17,14 @@ export declare const qoderCliMetadata: AdapterMetadata;
|
|
|
17
17
|
export declare function createQoderCliAdapter(options: NonNullable<Parameters<typeof createAcpAdapter>[1]> & {
|
|
18
18
|
command: string;
|
|
19
19
|
}): Readonly<Omit<{
|
|
20
|
-
metadata:
|
|
20
|
+
metadata: {
|
|
21
|
+
mcp?: boolean;
|
|
22
|
+
workspace?: boolean;
|
|
23
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
24
|
+
type: string;
|
|
25
|
+
processModel?: string;
|
|
26
|
+
transport?: string;
|
|
27
|
+
};
|
|
21
28
|
probe: (() => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>) | (() => Promise<{
|
|
22
29
|
available: false;
|
|
23
30
|
command: string;
|
|
@@ -27,7 +34,14 @@ export declare function createQoderCliAdapter(options: NonNullable<Parameters<ty
|
|
|
27
34
|
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>;
|
|
28
35
|
}, "metadata" | "defaultAgentEnv"> & {
|
|
29
36
|
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
30
|
-
metadata: Omit<
|
|
37
|
+
metadata: Omit<{
|
|
38
|
+
mcp?: boolean;
|
|
39
|
+
workspace?: boolean;
|
|
40
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
41
|
+
type: string;
|
|
42
|
+
processModel?: string;
|
|
43
|
+
transport?: string;
|
|
44
|
+
}, "protocolSupport"> & {
|
|
31
45
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
32
46
|
};
|
|
33
47
|
}>;
|
|
@@ -14,8 +14,7 @@ import { createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
|
14
14
|
*/
|
|
15
15
|
export const qoderCliMetadata = {
|
|
16
16
|
type: "qodercli",
|
|
17
|
-
mcp: true
|
|
18
|
-
agentSources: ["provisioned"]
|
|
17
|
+
mcp: true
|
|
19
18
|
};
|
|
20
19
|
/** 宿主交付所选命令或 client factory;本模块仅维护 ACP 协议要求。 */
|
|
21
20
|
export function createQoderCliAdapter(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-qodercli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
13
|
-
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.
|
|
12
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.15",
|
|
13
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.15"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -17,7 +17,14 @@ export declare const qoderCliCnMetadata: AdapterMetadata;
|
|
|
17
17
|
export declare function createQoderCliCnAdapter(options: NonNullable<Parameters<typeof createAcpAdapter>[1]> & {
|
|
18
18
|
command: string;
|
|
19
19
|
}): Readonly<Omit<{
|
|
20
|
-
metadata:
|
|
20
|
+
metadata: {
|
|
21
|
+
mcp?: boolean;
|
|
22
|
+
workspace?: boolean;
|
|
23
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
24
|
+
type: string;
|
|
25
|
+
processModel?: string;
|
|
26
|
+
transport?: string;
|
|
27
|
+
};
|
|
21
28
|
probe: (() => Promise<import("@mininglamp-oss/octo-runtime-adapter-sdk").ProbeResult>) | (() => Promise<{
|
|
22
29
|
available: false;
|
|
23
30
|
command: string;
|
|
@@ -27,7 +34,14 @@ export declare function createQoderCliCnAdapter(options: NonNullable<Parameters<
|
|
|
27
34
|
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>;
|
|
28
35
|
}, "metadata" | "defaultAgentEnv"> & {
|
|
29
36
|
readonly defaultAgentEnv: import("@mininglamp-oss/octo-runtime-protocol").AgentEnv;
|
|
30
|
-
metadata: Omit<
|
|
37
|
+
metadata: Omit<{
|
|
38
|
+
mcp?: boolean;
|
|
39
|
+
workspace?: boolean;
|
|
40
|
+
protocolSupport?: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
41
|
+
type: string;
|
|
42
|
+
processModel?: string;
|
|
43
|
+
transport?: string;
|
|
44
|
+
}, "protocolSupport"> & {
|
|
31
45
|
protocolSupport: import("@mininglamp-oss/octo-runtime-protocol").AdapterProtocolSupport;
|
|
32
46
|
};
|
|
33
47
|
}>;
|
|
@@ -14,8 +14,7 @@ import { createAcpAdapter } from "@mininglamp-oss/octo-runtime-adapter-acp";
|
|
|
14
14
|
*/
|
|
15
15
|
export const qoderCliCnMetadata = {
|
|
16
16
|
type: "qoderclicn",
|
|
17
|
-
mcp: true
|
|
18
|
-
agentSources: ["provisioned"]
|
|
17
|
+
mcp: true
|
|
19
18
|
};
|
|
20
19
|
/** 宿主交付所选命令或 client factory;本模块仅维护 ACP 协议要求。 */
|
|
21
20
|
export function createQoderCliCnAdapter(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-qoderclicn",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.
|
|
13
|
-
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.
|
|
12
|
+
"@mininglamp-oss/octo-runtime-adapter-sdk": "1.1.15",
|
|
13
|
+
"@mininglamp-oss/octo-runtime-adapter-acp": "1.1.15"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentEnv, type ContextItem, type
|
|
1
|
+
import { type AgentEnv, type ContextItem, type ApprovalMode, type InvokeRequest, type RuntimeLimits } from "@mininglamp-oss/octo-runtime-protocol";
|
|
2
2
|
/**
|
|
3
3
|
* 在 Adapter 消费本轮 AgentEnv 时,按 namespace/name 精确读取 bean 的 payload;不存在则返回 undefined。
|
|
4
4
|
* 公共与私有 bean 都可读取。私有名称、字段和类型由宿主与对应 Adapter 约定,无须公共 schema 注册。
|
|
@@ -27,7 +27,6 @@ export declare function invocationModel(request: InvokeRequest): string | undefi
|
|
|
27
27
|
export declare function invocationEffort(request: InvokeRequest): string | undefined;
|
|
28
28
|
export declare function invocationWorkdir(request: InvokeRequest): string;
|
|
29
29
|
export declare function invocationApprovalMode(request: InvokeRequest): ApprovalMode;
|
|
30
|
-
export declare function invocationAgentSource(request: InvokeRequest): AgentSource;
|
|
31
30
|
/** Harness 私有选项仍是原始 payload;不生成公共配置副本。 */
|
|
32
31
|
export declare function invocationOptions(request: InvokeRequest, adapterType?: string): Record<string, unknown>;
|
|
33
32
|
/** 可信连接选项只绑定本次 Adapter 调用,不写回调用方信封。 */
|
|
@@ -38,7 +37,7 @@ export declare function invocationTimeoutSeconds(request: InvokeRequest, adapter
|
|
|
38
37
|
/** Adapter 解释预算,Core 仅按本地回调执行计时,不解析配置条目。 */
|
|
39
38
|
export declare function invocationRuntimeLimits(request: InvokeRequest): RuntimeLimits | undefined;
|
|
40
39
|
/** 每个 Harness 拥有自己的默认信封;不包含隐式 cwd、模型或业务材料。 */
|
|
41
|
-
export declare function defaultAgentEnv(type: string
|
|
40
|
+
export declare function defaultAgentEnv(type: string): AgentEnv;
|
|
42
41
|
/** 调用方显式补缺省条目,保留已提交条目的顺序和值,返回独立副本。 */
|
|
43
42
|
export declare function withAgentEnvDefaults(submitted: AgentEnv, defaults: AgentEnv): AgentEnv;
|
|
44
43
|
/** 调用方显式替换同名 bean;不解释 payload,不改变其他条目的相对顺序。 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { constants } from "node:fs";
|
|
2
2
|
import { access, stat } from "node:fs/promises";
|
|
3
3
|
import { isAbsolute } from "node:path";
|
|
4
|
-
import { assertAgentEnv, assertApprovalMode,
|
|
4
|
+
import { assertAgentEnv, assertApprovalMode, assertContextEnvs, assertContextMcp, assertRuntimeLimits, contextItem, CONTEXT_SCHEMA, DEFAULT_RUN_TIMEOUT_MS } from "@mininglamp-oss/octo-runtime-protocol";
|
|
5
5
|
/**
|
|
6
6
|
* 在 Adapter 消费本轮 AgentEnv 时,按 namespace/name 精确读取 bean 的 payload;不存在则返回 undefined。
|
|
7
7
|
* 公共与私有 bean 都可读取。私有名称、字段和类型由宿主与对应 Adapter 约定,无须公共 schema 注册。
|
|
@@ -44,12 +44,6 @@ export function invocationApprovalMode(request) {
|
|
|
44
44
|
assertApprovalMode(mode);
|
|
45
45
|
return mode;
|
|
46
46
|
}
|
|
47
|
-
export function invocationAgentSource(request) {
|
|
48
|
-
const source = agentEnvItem(request.agentEnv, "octo.execution", "agent")?.source ??
|
|
49
|
-
"provisioned";
|
|
50
|
-
assertAgentSource(source);
|
|
51
|
-
return source;
|
|
52
|
-
}
|
|
53
47
|
/** Harness 私有选项仍是原始 payload;不生成公共配置副本。 */
|
|
54
48
|
export function invocationOptions(request, adapterType) {
|
|
55
49
|
const type = adapterType ??
|
|
@@ -87,8 +81,7 @@ const LIMIT_NAMES = {
|
|
|
87
81
|
tool_timeout_ms: "toolTimeoutMs",
|
|
88
82
|
tool_wall_timeout_ms: "toolWallTimeoutMs",
|
|
89
83
|
run_timeout_ms: "runTimeoutMs",
|
|
90
|
-
cancel_grace_ms: "cancelGraceMs"
|
|
91
|
-
enforcement: "enforcement"
|
|
84
|
+
cancel_grace_ms: "cancelGraceMs"
|
|
92
85
|
};
|
|
93
86
|
/** Adapter 解释预算,Core 仅按本地回调执行计时,不解析配置条目。 */
|
|
94
87
|
export function invocationRuntimeLimits(request) {
|
|
@@ -105,12 +98,11 @@ export function invocationRuntimeLimits(request) {
|
|
|
105
98
|
return result;
|
|
106
99
|
}
|
|
107
100
|
/** 每个 Harness 拥有自己的默认信封;不包含隐式 cwd、模型或业务材料。 */
|
|
108
|
-
export function defaultAgentEnv(type
|
|
101
|
+
export function defaultAgentEnv(type) {
|
|
109
102
|
return {
|
|
110
103
|
schema: CONTEXT_SCHEMA,
|
|
111
104
|
items: [
|
|
112
105
|
{ namespace: "octo.execution", name: "adapter", payload: { type } },
|
|
113
|
-
{ namespace: "octo.execution", name: "agent", payload: { source } },
|
|
114
106
|
{ namespace: "octo.security", name: "approval_policy", payload: { mode: "ask" } },
|
|
115
107
|
{
|
|
116
108
|
namespace: "octo.execution",
|
|
@@ -159,7 +151,6 @@ export function withAgentEnvItems(env, items) {
|
|
|
159
151
|
export function assertAdapterAgentEnv(request) {
|
|
160
152
|
assertAgentEnv(request.agentEnv);
|
|
161
153
|
invocationApprovalMode(request);
|
|
162
|
-
invocationAgentSource(request);
|
|
163
154
|
invocationRuntimeLimits(request);
|
|
164
155
|
for (const item of request.agentEnv.items) {
|
|
165
156
|
if (item.namespace === "octo.security" && item.name === "approval_policy") {
|
|
@@ -174,18 +165,9 @@ export function assertAdapterAgentEnv(request) {
|
|
|
174
165
|
if (typeof value.type !== "string" || !value.type)
|
|
175
166
|
throw new TypeError("ADAPTER_TYPE_INVALID");
|
|
176
167
|
}
|
|
177
|
-
if (item.name === "agent") {
|
|
178
|
-
assertFields(value, ["source"]);
|
|
179
|
-
assertAgentSource(value.source);
|
|
180
|
-
}
|
|
181
168
|
if (item.name === "workspace" &&
|
|
182
169
|
(Object.keys(value).some((k) => k !== "path") || typeof value.path !== "string"))
|
|
183
170
|
throw new TypeError("WORKDIR_INVALID");
|
|
184
|
-
if (item.name === "actmode") {
|
|
185
|
-
assertFields(value, ["mode"]);
|
|
186
|
-
if (!["plan", "default"].includes(String(value.mode)))
|
|
187
|
-
throw new TypeError("CONTEXT_SCHEMA_INVALID: actmode");
|
|
188
|
-
}
|
|
189
171
|
if (item.name === "model") {
|
|
190
172
|
assertFields(value, ["selection", "reasoning"]);
|
|
191
173
|
if (!Object.keys(value).length)
|
|
@@ -200,12 +182,8 @@ export function assertAdapterAgentEnv(request) {
|
|
|
200
182
|
if (!bean || typeof bean !== "object" || Array.isArray(bean))
|
|
201
183
|
throw new TypeError("CONTEXT_SCHEMA_INVALID: model");
|
|
202
184
|
const setting = bean;
|
|
203
|
-
assertFields(setting, [property
|
|
204
|
-
if (setting
|
|
205
|
-
continue;
|
|
206
|
-
if (typeof setting[property] !== "string" ||
|
|
207
|
-
!setting[property] ||
|
|
208
|
-
setting.use_provider_default !== undefined)
|
|
185
|
+
assertFields(setting, [property]);
|
|
186
|
+
if (typeof setting[property] !== "string" || !setting[property])
|
|
209
187
|
throw new TypeError("CONTEXT_SCHEMA_INVALID: model");
|
|
210
188
|
}
|
|
211
189
|
}
|
|
@@ -222,7 +200,7 @@ function assertFields(value, allowed) {
|
|
|
222
200
|
/** 调用方准备目录;Adapter 在启动 Provider 前检查,不创建或替换路径。 */
|
|
223
201
|
export async function assertAdapterWorkdir(request, workspace = true) {
|
|
224
202
|
const path = invocationWorkdir(request);
|
|
225
|
-
if (!workspace
|
|
203
|
+
if (!workspace)
|
|
226
204
|
return;
|
|
227
205
|
const messages = {
|
|
228
206
|
WORKDIR_REQUIRED: "A prepared working directory is required; create it and provide its absolute path.",
|
|
@@ -7,7 +7,6 @@ import { type ReasoningLevelMap } from "./reasoning.js";
|
|
|
7
7
|
export type { AdapterInvocationContext, ProviderActivity } from "./activity.js";
|
|
8
8
|
export { invocationEnvironment, invocationEnvs, mergeProcessEnvironment, processEnvironmentValue } from "./environment.js";
|
|
9
9
|
export { invocationMcpServers, expandMcpValue, assertMcpOptions } from "./mcp.js";
|
|
10
|
-
export { actmodeEvidence } from "./actmode.js";
|
|
11
10
|
import { type CanonicalEvent, type AdapterProtocolSupport, type HostControl, type NativeHostFrame, type InvokeRequest, type AgentEnv, type InteractionResponse, type NativeInteractionResponse, type StreamLimitPolicy } from "@mininglamp-oss/octo-runtime-protocol";
|
|
12
11
|
export { freshFallbackInputText, hasImageInput, providerInputParts, providerInputText } from "@mininglamp-oss/octo-runtime-protocol";
|
|
13
12
|
export type { CanonicalEvent, InvokeRequest, MessageChannel, MessageExposure, MessageProvenance } from "@mininglamp-oss/octo-runtime-protocol";
|
|
@@ -31,7 +30,6 @@ export interface AdapterMetadata {
|
|
|
31
30
|
/** 仅编写输入可省略;这是执行时消费的协议描述,不能作为业务能力标签。 */
|
|
32
31
|
protocolSupport?: AdapterProtocolSupport;
|
|
33
32
|
type: string;
|
|
34
|
-
agentSources: ("preset" | "provisioned")[];
|
|
35
33
|
processModel?: string;
|
|
36
34
|
transport?: string;
|
|
37
35
|
}
|
|
@@ -7,7 +7,7 @@ import { createInterface } from "node:readline";
|
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
import { invocationEnvironment, mergeProcessEnvironment } from "./environment.js";
|
|
9
9
|
import { createProcessCleanup } from "./process-cleanup.js";
|
|
10
|
-
import { defaultAgentEnv, assertAdapterAgentEnv, assertAdapterWorkdir, bindInvocationConnection, invocationApprovalMode,
|
|
10
|
+
import { defaultAgentEnv, assertAdapterAgentEnv, assertAdapterWorkdir, bindInvocationConnection, invocationApprovalMode, invocationRuntimeLimits } from "./agent-env.js";
|
|
11
11
|
export * from "./agent-env.js";
|
|
12
12
|
import { assertProviderCommand } from "./provider-launch.js";
|
|
13
13
|
export { snapshotProviderLaunch, assertProviderCommand } from "./provider-launch.js";
|
|
@@ -15,7 +15,6 @@ import { watchLineLimit } from "./line-limit.js";
|
|
|
15
15
|
import { mapReasoningEffort, reasoningLevelMap } from "./reasoning.js";
|
|
16
16
|
export { invocationEnvironment, invocationEnvs, mergeProcessEnvironment, processEnvironmentValue } from "./environment.js";
|
|
17
17
|
export { invocationMcpServers, expandMcpValue, assertMcpOptions } from "./mcp.js";
|
|
18
|
-
export { actmodeEvidence } from "./actmode.js";
|
|
19
18
|
import { DEFAULT_STREAM_LIMIT_POLICY, isTerminal, assertProtocolSupport } from "@mininglamp-oss/octo-runtime-protocol";
|
|
20
19
|
export { freshFallbackInputText, hasImageInput, providerInputParts, providerInputText } from "@mininglamp-oss/octo-runtime-protocol";
|
|
21
20
|
export { acpToolTerminalStatus, normalizeAcpToolUpdate } from "./acp-tool.js";
|
|
@@ -74,8 +73,7 @@ export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metada
|
|
|
74
73
|
modes: ["canonical"],
|
|
75
74
|
nativeMethods: []
|
|
76
75
|
};
|
|
77
|
-
const defaults = structuredClone(adapter.defaultAgentEnv ??
|
|
78
|
-
defaultAgentEnv(metadata.type, metadata.agentSources.includes("provisioned") ? "provisioned" : "preset"));
|
|
76
|
+
const defaults = structuredClone(adapter.defaultAgentEnv ?? defaultAgentEnv(metadata.type));
|
|
79
77
|
return Object.freeze({
|
|
80
78
|
...adapter,
|
|
81
79
|
get defaultAgentEnv() {
|
|
@@ -95,9 +93,6 @@ export function defineAdapter(adapter, levels = reasoningLevelMap(adapter.metada
|
|
|
95
93
|
await runAdapterPreparation(context, async () => {
|
|
96
94
|
assertAdapterAgentEnv(request);
|
|
97
95
|
context?.configureRuntimeLimits?.(invocationRuntimeLimits(request));
|
|
98
|
-
if (request.agentEnv.items.some((item) => item.namespace === "octo.execution" && item.name === "agent") &&
|
|
99
|
-
!metadata.agentSources.includes(invocationAgentSource(request)))
|
|
100
|
-
throw new Error(`AGENT_SOURCE_UNSUPPORTED: ${metadata.type}`);
|
|
101
96
|
if (invocationApprovalMode(request) !== "full_access" &&
|
|
102
97
|
(context?.protocolMode === "native"
|
|
103
98
|
? !adapter.respondNative
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mininglamp-oss/octo-runtime-adapter-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
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.15",
|
|
14
14
|
"import-meta-resolve": "4.2.0"
|
|
15
15
|
},
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
@@ -182,11 +182,7 @@ function callFactory(value, entry, env) {
|
|
|
182
182
|
function isHostedAdapter(value) {
|
|
183
183
|
if (!isRecord(value) || !isRecord(value.metadata))
|
|
184
184
|
return false;
|
|
185
|
-
return
|
|
186
|
-
Array.isArray(value.metadata.agentSources) &&
|
|
187
|
-
value.metadata.agentSources.length > 0 &&
|
|
188
|
-
value.metadata.agentSources.every((source) => source === "preset" || source === "provisioned") &&
|
|
189
|
-
typeof value.invoke === "function");
|
|
185
|
+
return typeof value.metadata.type === "string" && typeof value.invoke === "function";
|
|
190
186
|
}
|
|
191
187
|
function isScopeCleanup(value) {
|
|
192
188
|
if (!isRecord(value) || typeof value.complete !== "boolean")
|