agent-gear 2.8.0 → 2.9.0
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/AGENTS.md +11 -1
- package/dist/acp/detector.d.ts +2 -0
- package/dist/acp/detector.d.ts.map +1 -1
- package/dist/acp/detector.js +18 -3
- package/dist/acp/detector.js.map +1 -1
- package/dist/acp/detector.test.d.ts +2 -0
- package/dist/acp/detector.test.d.ts.map +1 -0
- package/dist/acp/detector.test.js +50 -0
- package/dist/acp/detector.test.js.map +1 -0
- package/dist/commands/harness.d.ts +5 -1
- package/dist/commands/harness.d.ts.map +1 -1
- package/dist/commands/harness.js +7 -3
- package/dist/commands/harness.js.map +1 -1
- package/dist/harness/dsh-cli.d.ts +17 -0
- package/dist/harness/dsh-cli.d.ts.map +1 -0
- package/dist/harness/dsh-cli.js +51 -0
- package/dist/harness/dsh-cli.js.map +1 -0
- package/dist/harness/dsh-cli.test.d.ts +2 -0
- package/dist/harness/dsh-cli.test.d.ts.map +1 -0
- package/dist/harness/dsh-cli.test.js +51 -0
- package/dist/harness/dsh-cli.test.js.map +1 -0
- package/dist/harness/dsh-config.atomic-failure.test.d.ts +2 -0
- package/dist/harness/dsh-config.atomic-failure.test.d.ts.map +1 -0
- package/dist/harness/dsh-config.atomic-failure.test.js +35 -0
- package/dist/harness/dsh-config.atomic-failure.test.js.map +1 -0
- package/dist/harness/dsh-config.d.ts +46 -0
- package/dist/harness/dsh-config.d.ts.map +1 -0
- package/dist/harness/dsh-config.js +228 -0
- package/dist/harness/dsh-config.js.map +1 -0
- package/dist/harness/dsh-config.test.d.ts +2 -0
- package/dist/harness/dsh-config.test.d.ts.map +1 -0
- package/dist/harness/dsh-config.test.js +229 -0
- package/dist/harness/dsh-config.test.js.map +1 -0
- package/dist/harness/env.d.ts +11 -0
- package/dist/harness/env.d.ts.map +1 -1
- package/dist/harness/env.js +23 -0
- package/dist/harness/env.js.map +1 -1
- package/dist/harness/env.test.js +23 -1
- package/dist/harness/env.test.js.map +1 -1
- package/dist/harness/opencode-cli.d.ts +5 -0
- package/dist/harness/opencode-cli.d.ts.map +1 -1
- package/dist/harness/opencode-cli.js +8 -1
- package/dist/harness/opencode-cli.js.map +1 -1
- package/dist/harness/prepare.d.ts +27 -9
- package/dist/harness/prepare.d.ts.map +1 -1
- package/dist/harness/prepare.js +67 -23
- package/dist/harness/prepare.js.map +1 -1
- package/dist/harness/prepare.test.js +110 -3
- package/dist/harness/prepare.test.js.map +1 -1
- package/dist/socketio-client.auth-gate.test.js +3 -3
- package/package.json +3 -2
- package/src/acp/detector.test.ts +64 -0
- package/src/acp/detector.ts +18 -3
- package/src/commands/harness.ts +9 -3
- package/src/harness/dsh-cli.test.ts +58 -0
- package/src/harness/dsh-cli.ts +67 -0
- package/src/harness/dsh-config.atomic-failure.test.ts +51 -0
- package/src/harness/dsh-config.test.ts +275 -0
- package/src/harness/dsh-config.ts +280 -0
- package/src/harness/env.test.ts +32 -1
- package/src/harness/env.ts +26 -0
- package/src/harness/opencode-cli.ts +9 -2
- package/src/harness/prepare.test.ts +129 -3
- package/src/harness/prepare.ts +103 -27
- package/src/socketio-client.auth-gate.test.ts +3 -3
- package/tests/acp-detector.test.ts +28 -8
- package/tests/commands/harness.test.ts +17 -7
- package/tests/socketio-client.test.ts +2 -2
package/src/harness/prepare.ts
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
import { mkdir } from 'node:fs/promises';
|
|
2
|
-
import { readHarnessEnv, type HarnessEnv } from './env.js';
|
|
2
|
+
import { readHarnessEnv, resolvePrepareTypes, type HarnessEnv, type PrepareHarnessType } from './env.js';
|
|
3
|
+
import { verifyDshCli } from './dsh-cli.js';
|
|
4
|
+
import { writeDshConfig, defaultDshHome, type WriteDshConfigResult } from './dsh-config.js';
|
|
3
5
|
import { verifyOpencodeCli, type CommandRunner } from './opencode-cli.js';
|
|
4
6
|
import { writeOpencodeConfig, type WriteOpencodeConfigResult } from './opencode-config.js';
|
|
5
7
|
|
|
8
|
+
/** 逐类型的 prepare 结果(摘要不含任何 secret)。 */
|
|
9
|
+
export interface HarnessPrepareItemResult {
|
|
10
|
+
type: PrepareHarnessType;
|
|
11
|
+
ok: boolean;
|
|
12
|
+
/** 实际 CLI 版本(opencode / dsh)。 */
|
|
13
|
+
version: string;
|
|
14
|
+
/** 写入的模型数量。 */
|
|
15
|
+
modelCount: number;
|
|
16
|
+
/** 一行摘要(用于 `harness prepare` 输出)。 */
|
|
17
|
+
summary: string;
|
|
18
|
+
config: WriteOpencodeConfigResult | WriteDshConfigResult;
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
/** `harness prepare` 结果摘要(不含任何 secret)。 */
|
|
7
22
|
export interface HarnessPrepareResult {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
env: Pick<HarnessEnv, 'modelBaseUrl' | 'defaultWorkspace'> & {
|
|
24
|
+
modelCount: number;
|
|
25
|
+
types: PrepareHarnessType[];
|
|
26
|
+
};
|
|
27
|
+
items: HarnessPrepareItemResult[];
|
|
11
28
|
}
|
|
12
29
|
|
|
13
30
|
export interface PrepareHarnessOptions {
|
|
@@ -16,54 +33,113 @@ export interface PrepareHarnessOptions {
|
|
|
16
33
|
runner?: CommandRunner;
|
|
17
34
|
/** 覆盖 OpenCode 配置目录(测试/定制场景)。 */
|
|
18
35
|
configDir?: string;
|
|
36
|
+
/** 覆盖 dsh home(测试/定制场景;缺省 `$DSH_HOME` 或 `~/.dsh`)。 */
|
|
37
|
+
dshHome?: string;
|
|
19
38
|
/** 创建工作区的实现(测试注入)。 */
|
|
20
39
|
makeDir?: (path: string) => Promise<void>;
|
|
21
40
|
}
|
|
22
41
|
|
|
42
|
+
function formatOpencodeSummary(
|
|
43
|
+
version: string,
|
|
44
|
+
config: WriteOpencodeConfigResult,
|
|
45
|
+
): string {
|
|
46
|
+
return `opencode: version=${version} models=${config.modelCount} config=${config.path} (${config.created ? 'created' : 'updated'})`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function formatDeepseekSummary(
|
|
50
|
+
version: string,
|
|
51
|
+
config: WriteDshConfigResult,
|
|
52
|
+
): string {
|
|
53
|
+
return [
|
|
54
|
+
`deepseek_harness: version=${version}`,
|
|
55
|
+
`models=${config.modelCount}`,
|
|
56
|
+
`patch=${config.patchPath} (${config.patchCreated ? 'created' : 'updated'})`,
|
|
57
|
+
`credentials=${config.credentialsPath} (${config.credentialsCreated ? 'created' : 'updated'})`,
|
|
58
|
+
].join(' ');
|
|
59
|
+
}
|
|
60
|
+
|
|
23
61
|
/**
|
|
24
|
-
* 准备
|
|
62
|
+
* 准备 harness 环境(契约/计划 Phase 4):
|
|
25
63
|
*
|
|
26
|
-
* 1. 校验 harness env
|
|
27
|
-
* 2. `
|
|
28
|
-
*
|
|
29
|
-
*
|
|
64
|
+
* 1. 校验 harness env(缺失项明确报错,只执行一次);
|
|
65
|
+
* 2. 按 `ZAG_HARNESS_TYPES` 分流(缺省/空/全非法 → `['opencode']`)逐类型 CLI 硬校验
|
|
66
|
+
* (`opencode --version` / `dsh --version`),全部通过前不触碰文件系统;
|
|
67
|
+
* 3. `mkdir -p ZAG_DEFAULT_WORKSPACE`(幂等,只执行一次);
|
|
68
|
+
* 4. 逐类型写入:`opencode` → 合并 `opencode.jsonc`;`deepseek_harness` → 合并
|
|
69
|
+
* `cordis.patch.yml` / `.credentials.yaml`。任一类型失败整体抛错,已成功部分不回滚(幂等重跑)。
|
|
30
70
|
*
|
|
71
|
+
* 只对所选类型做 CLI 校验与写入:`deepseek_harness` 单选时不触碰 opencode(反之亦然)。
|
|
31
72
|
* secret 只写入配置文件,不进入日志/错误/返回值。
|
|
32
73
|
*/
|
|
33
74
|
export async function prepareHarness(
|
|
34
75
|
options: PrepareHarnessOptions = {},
|
|
35
76
|
): Promise<HarnessPrepareResult> {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
77
|
+
const sourceEnv = options.env ?? process.env;
|
|
78
|
+
const env = readHarnessEnv(sourceEnv);
|
|
79
|
+
const types = resolvePrepareTypes(sourceEnv);
|
|
80
|
+
|
|
81
|
+
const makeDir =
|
|
82
|
+
options.makeDir ?? ((path: string) => mkdir(path, { recursive: true }).then(() => undefined));
|
|
83
|
+
|
|
84
|
+
const versions = new Map<PrepareHarnessType, string>();
|
|
85
|
+
for (const type of types) {
|
|
86
|
+
// init 脚本 export OPENCODE_CLI_VERSION / DSH_CLI_VERSION:agent-gear 侧做二次硬校验
|
|
87
|
+
//(opencode C-5 缺省不启用;dsh 预发布段精确比较)。
|
|
88
|
+
versions.set(
|
|
89
|
+
type,
|
|
90
|
+
type === 'opencode'
|
|
91
|
+
? await verifyOpencodeCli(options.runner, sourceEnv.OPENCODE_CLI_VERSION)
|
|
92
|
+
: await verifyDshCli(options.runner, sourceEnv.DSH_CLI_VERSION),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
40
95
|
|
|
41
|
-
const makeDir = options.makeDir ?? ((path: string) => mkdir(path, { recursive: true }).then(() => undefined));
|
|
42
96
|
await makeDir(env.defaultWorkspace);
|
|
43
97
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
98
|
+
const items: HarnessPrepareItemResult[] = [];
|
|
99
|
+
for (const type of types) {
|
|
100
|
+
const version = versions.get(type)!;
|
|
101
|
+
if (type === 'opencode') {
|
|
102
|
+
const config = await writeOpencodeConfig({ env, configDir: options.configDir });
|
|
103
|
+
items.push({
|
|
104
|
+
type,
|
|
105
|
+
ok: true,
|
|
106
|
+
version,
|
|
107
|
+
modelCount: config.modelCount,
|
|
108
|
+
summary: formatOpencodeSummary(version, config),
|
|
109
|
+
config,
|
|
110
|
+
});
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const config = await writeDshConfig({
|
|
115
|
+
env,
|
|
116
|
+
dshHome: options.dshHome ?? defaultDshHome(sourceEnv),
|
|
117
|
+
});
|
|
118
|
+
items.push({
|
|
119
|
+
type,
|
|
120
|
+
ok: true,
|
|
121
|
+
version,
|
|
122
|
+
modelCount: config.modelCount,
|
|
123
|
+
summary: formatDeepseekSummary(version, config),
|
|
124
|
+
config,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
48
127
|
|
|
49
128
|
return {
|
|
50
|
-
opencodeVersion,
|
|
51
129
|
env: {
|
|
52
130
|
modelBaseUrl: env.modelBaseUrl,
|
|
53
131
|
defaultWorkspace: env.defaultWorkspace,
|
|
54
132
|
modelCount: env.modelIds.length,
|
|
133
|
+
types,
|
|
55
134
|
},
|
|
56
|
-
|
|
135
|
+
items,
|
|
57
136
|
};
|
|
58
137
|
}
|
|
59
138
|
|
|
60
|
-
/**
|
|
139
|
+
/** 输出摘要(首行汇总,随后逐类型一行;不含 `ZAG_MODEL_API_KEY` / provider apiKey)。 */
|
|
61
140
|
export function formatPrepareSummary(result: HarnessPrepareResult): string {
|
|
62
|
-
const created = result.config.created ? 'created' : 'updated';
|
|
63
141
|
return [
|
|
64
|
-
`
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`config=${result.config.path} (${created})`,
|
|
68
|
-
].join(' ');
|
|
142
|
+
`Harness prepared: types=${result.env.types.join(',')} models=${result.env.modelCount} workspace=${result.env.defaultWorkspace}`,
|
|
143
|
+
...result.items.map((item) => `- ${item.summary}`),
|
|
144
|
+
].join('\n');
|
|
69
145
|
}
|
|
@@ -75,11 +75,11 @@ function emitted(event: string) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
describe('CONTROLLER_VERSION', () => {
|
|
78
|
-
it('register 上报版本取自 package.json(2.
|
|
78
|
+
it('register 上报版本取自 package.json(2.9.0,无第二处常量)', () => {
|
|
79
79
|
setup();
|
|
80
80
|
fake.handlers.get('connect')?.();
|
|
81
|
-
expect(PACKAGE_VERSION).toBe('2.
|
|
82
|
-
expect(emitted('register')[0]).toMatchObject({ version: '2.
|
|
81
|
+
expect(PACKAGE_VERSION).toBe('2.9.0');
|
|
82
|
+
expect(emitted('register')[0]).toMatchObject({ version: '2.9.0' });
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
|
|
@@ -28,11 +28,17 @@ describe('AcpDetector', () => {
|
|
|
28
28
|
|
|
29
29
|
beforeEach(() => {
|
|
30
30
|
vi.clearAllMocks();
|
|
31
|
+
// 默认按「命令不可用」兜底:个别用例未显式 mock 的探测不会挂起。
|
|
32
|
+
vi.mocked(exec).mockImplementation(((...args: unknown[]) => {
|
|
33
|
+
const cb = args.find((a) => typeof a === 'function') as ((err: Error) => void) | undefined;
|
|
34
|
+
if (cb) cb(new Error('command not found'));
|
|
35
|
+
return {} as any;
|
|
36
|
+
}) as never);
|
|
31
37
|
detector = new AcpDetector();
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
describe('detect', () => {
|
|
35
|
-
it('should detect all
|
|
41
|
+
it('should detect all 8 servers when all available', async () => {
|
|
36
42
|
mockExecSuccessOnce('opencode v1.2.3\n');
|
|
37
43
|
mockExecSuccessOnce('copilot 1.0.0\n');
|
|
38
44
|
mockExecSuccessOnce('claude-agent-acp 0.1.0\n');
|
|
@@ -40,10 +46,11 @@ describe('AcpDetector', () => {
|
|
|
40
46
|
mockExecSuccessOnce('codex-acp 0.5.0\n');
|
|
41
47
|
mockExecSuccessOnce('mimo 0.1.0\n');
|
|
42
48
|
mockExecSuccessOnce('kimi 1.0.0\n');
|
|
49
|
+
mockExecSuccessOnce('0.1.2-alpha.2\n');
|
|
43
50
|
|
|
44
51
|
const result = await detector.detect();
|
|
45
52
|
|
|
46
|
-
expect(result).toHaveLength(
|
|
53
|
+
expect(result).toHaveLength(8);
|
|
47
54
|
expect(result[0]).toEqual({ type: 'opencode', available: true, version: '1.2.3' });
|
|
48
55
|
expect(result[1]).toEqual({ type: 'github_copilot', available: true, version: '1.0.0' });
|
|
49
56
|
expect(result[2]).toEqual({ type: 'claude_code', available: true, version: '0.1.0' });
|
|
@@ -51,6 +58,11 @@ describe('AcpDetector', () => {
|
|
|
51
58
|
expect(result[4]).toEqual({ type: 'codex', available: true, version: '0.5.0' });
|
|
52
59
|
expect(result[5]).toEqual({ type: 'mimo_code', available: true, version: '0.1.0' });
|
|
53
60
|
expect(result[6]).toEqual({ type: 'kimi_code', available: true, version: '1.0.0' });
|
|
61
|
+
expect(result[7]).toEqual({
|
|
62
|
+
type: 'deepseek_harness',
|
|
63
|
+
available: true,
|
|
64
|
+
version: '0.1.2-alpha.2',
|
|
65
|
+
});
|
|
54
66
|
});
|
|
55
67
|
|
|
56
68
|
it('should detect as unavailable when command fails', async () => {
|
|
@@ -64,7 +76,7 @@ describe('AcpDetector', () => {
|
|
|
64
76
|
|
|
65
77
|
const result = await detector.detect();
|
|
66
78
|
|
|
67
|
-
expect(result).toHaveLength(
|
|
79
|
+
expect(result).toHaveLength(8);
|
|
68
80
|
expect(result[0]).toEqual({ type: 'opencode', available: false });
|
|
69
81
|
expect(result[1]).toEqual({ type: 'github_copilot', available: false });
|
|
70
82
|
expect(result[2]).toEqual({ type: 'claude_code', available: false });
|
|
@@ -72,6 +84,7 @@ describe('AcpDetector', () => {
|
|
|
72
84
|
expect(result[4]).toEqual({ type: 'codex', available: false });
|
|
73
85
|
expect(result[5]).toEqual({ type: 'mimo_code', available: false });
|
|
74
86
|
expect(result[6]).toEqual({ type: 'kimi_code', available: false });
|
|
87
|
+
expect(result[7]).toEqual({ type: 'deepseek_harness', available: false });
|
|
75
88
|
});
|
|
76
89
|
|
|
77
90
|
it('should detect claude_code only when other servers fail', async () => {
|
|
@@ -85,7 +98,7 @@ describe('AcpDetector', () => {
|
|
|
85
98
|
|
|
86
99
|
const result = await detector.detect();
|
|
87
100
|
|
|
88
|
-
expect(result).toHaveLength(
|
|
101
|
+
expect(result).toHaveLength(8);
|
|
89
102
|
expect(result[0]).toEqual({ type: 'opencode', available: false });
|
|
90
103
|
expect(result[1]).toEqual({ type: 'github_copilot', available: false });
|
|
91
104
|
expect(result[2]).toEqual({ type: 'claude_code', available: true, version: '0.1.0' });
|
|
@@ -106,7 +119,7 @@ describe('AcpDetector', () => {
|
|
|
106
119
|
|
|
107
120
|
const result = await detector.detect();
|
|
108
121
|
|
|
109
|
-
expect(result).toHaveLength(
|
|
122
|
+
expect(result).toHaveLength(8);
|
|
110
123
|
expect(result[3]).toEqual({ type: 'gemini_cli', available: true, version: '2.0.0' });
|
|
111
124
|
});
|
|
112
125
|
|
|
@@ -121,7 +134,7 @@ describe('AcpDetector', () => {
|
|
|
121
134
|
|
|
122
135
|
const result = await detector.detect();
|
|
123
136
|
|
|
124
|
-
expect(result).toHaveLength(
|
|
137
|
+
expect(result).toHaveLength(8);
|
|
125
138
|
expect(result[4]).toEqual({ type: 'codex', available: true, version: '0.5.0' });
|
|
126
139
|
});
|
|
127
140
|
|
|
@@ -136,7 +149,7 @@ describe('AcpDetector', () => {
|
|
|
136
149
|
|
|
137
150
|
const result = await detector.detect();
|
|
138
151
|
|
|
139
|
-
expect(result).toHaveLength(
|
|
152
|
+
expect(result).toHaveLength(8);
|
|
140
153
|
expect(result[5]).toEqual({ type: 'mimo_code', available: true, version: '0.1.0' });
|
|
141
154
|
});
|
|
142
155
|
|
|
@@ -151,7 +164,7 @@ describe('AcpDetector', () => {
|
|
|
151
164
|
|
|
152
165
|
const result = await detector.detect();
|
|
153
166
|
|
|
154
|
-
expect(result).toHaveLength(
|
|
167
|
+
expect(result).toHaveLength(8);
|
|
155
168
|
expect(result[6]).toEqual({ type: 'kimi_code', available: true, version: '2.0.0' });
|
|
156
169
|
});
|
|
157
170
|
|
|
@@ -163,6 +176,7 @@ describe('AcpDetector', () => {
|
|
|
163
176
|
mockExecSuccessOnce('codex-acp version 0.5.0\n');
|
|
164
177
|
mockExecSuccessOnce('MiMo CLI v1.0.0\n');
|
|
165
178
|
mockExecSuccessOnce('kimi 2.0.0\n');
|
|
179
|
+
mockExecSuccessOnce('0.1.2-alpha.2\n');
|
|
166
180
|
|
|
167
181
|
const result = await detector.detect();
|
|
168
182
|
|
|
@@ -173,6 +187,7 @@ describe('AcpDetector', () => {
|
|
|
173
187
|
expect(result[4].version).toBe('0.5.0');
|
|
174
188
|
expect(result[5].version).toBe('1.0.0');
|
|
175
189
|
expect(result[6].version).toBe('2.0.0');
|
|
190
|
+
expect(result[7].version).toBe('0.1.2-alpha.2');
|
|
176
191
|
});
|
|
177
192
|
});
|
|
178
193
|
|
|
@@ -212,6 +227,11 @@ describe('AcpDetector', () => {
|
|
|
212
227
|
expect(config).toEqual({ command: 'kimi', args: ['acp'] });
|
|
213
228
|
});
|
|
214
229
|
|
|
230
|
+
it('should return deepseek_harness spawner config', () => {
|
|
231
|
+
const config = detector.getSpawnerConfig('deepseek_harness');
|
|
232
|
+
expect(config).toEqual({ command: 'dsh', args: ['--profile', 'acp'] });
|
|
233
|
+
});
|
|
234
|
+
|
|
215
235
|
it('should return opencode as default for unknown serverType', () => {
|
|
216
236
|
const config = detector.getSpawnerConfig('unknown_server');
|
|
217
237
|
expect(config).toEqual({ command: 'opencode', args: ['acp'] });
|
|
@@ -11,17 +11,27 @@ function buildProgram(deps: Parameters<typeof registerHarnessCommands>[1] = {})
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const SUCCESS_RESULT: HarnessPrepareResult = {
|
|
14
|
-
opencodeVersion: '1.2.3',
|
|
15
14
|
env: {
|
|
16
15
|
modelBaseUrl: 'http://admin-api:8002/v1',
|
|
17
16
|
defaultWorkspace: '/root/workspace',
|
|
18
17
|
modelCount: 2,
|
|
18
|
+
types: ['opencode'],
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
items: [
|
|
21
|
+
{
|
|
22
|
+
type: 'opencode',
|
|
23
|
+
ok: true,
|
|
24
|
+
version: '1.2.3',
|
|
25
|
+
modelCount: 2,
|
|
26
|
+
summary:
|
|
27
|
+
'opencode: version=1.2.3 models=2 config=/root/.config/opencode/opencode.jsonc (created)',
|
|
28
|
+
config: {
|
|
29
|
+
path: '/root/.config/opencode/opencode.jsonc',
|
|
30
|
+
created: true,
|
|
31
|
+
modelCount: 2,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
25
35
|
};
|
|
26
36
|
|
|
27
37
|
describe('agent-gear harness command (T-AG15)', () => {
|
|
@@ -67,7 +77,7 @@ describe('agent-gear harness command (T-AG15)', () => {
|
|
|
67
77
|
expect(prepare).toHaveBeenCalledTimes(1);
|
|
68
78
|
expect(process.exitCode).toBeUndefined();
|
|
69
79
|
const output = vi.mocked(console.log).mock.calls.flat().join(' ');
|
|
70
|
-
expect(output).toContain('
|
|
80
|
+
expect(output).toContain('Harness prepared: types=opencode');
|
|
71
81
|
expect(output).toContain('version=1.2.3');
|
|
72
82
|
expect(output).not.toContain('zag_sk_');
|
|
73
83
|
});
|
|
@@ -229,7 +229,7 @@ describe('SocketIO Client', () => {
|
|
|
229
229
|
expect(mockSocket.emit).toHaveBeenCalledWith('register', {
|
|
230
230
|
key: 'zag_k_1_abc123',
|
|
231
231
|
hostname: 'my-machine',
|
|
232
|
-
version: '2.
|
|
232
|
+
version: '2.9.0',
|
|
233
233
|
resumeToken: undefined,
|
|
234
234
|
homeDir: '/home/user',
|
|
235
235
|
platform: 'linux',
|
|
@@ -247,7 +247,7 @@ describe('SocketIO Client', () => {
|
|
|
247
247
|
expect(mockSocket.emit).toHaveBeenCalledWith('register', {
|
|
248
248
|
key: 'zag_k_1_abc123',
|
|
249
249
|
hostname: 'test-machine',
|
|
250
|
-
version: '2.
|
|
250
|
+
version: '2.9.0',
|
|
251
251
|
resumeToken: undefined,
|
|
252
252
|
homeDir: '/home/user',
|
|
253
253
|
platform: 'linux',
|