@agentteams/runner 0.0.124 → 0.0.126
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/dist/api-client.d.ts +2 -1
- package/dist/api-client.js +2 -1
- package/dist/api-client.js.map +1 -1
- package/dist/api-client.test.js +11 -0
- package/dist/api-client.test.js.map +1 -1
- package/dist/executable.js +3 -1
- package/dist/executable.js.map +1 -1
- package/dist/executable.test.js +11 -0
- package/dist/executable.test.js.map +1 -1
- package/dist/handlers/trigger-handler.js +5 -2
- package/dist/handlers/trigger-handler.js.map +1 -1
- package/dist/handlers/trigger-handler.test.js +105 -19
- package/dist/handlers/trigger-handler.test.js.map +1 -1
- package/dist/runners/capabilities.d.ts +1 -1
- package/dist/runners/capabilities.js +3 -0
- package/dist/runners/capabilities.js.map +1 -1
- package/dist/runners/capabilities.test.js +12 -2
- package/dist/runners/capabilities.test.js.map +1 -1
- package/dist/runners/claude-code.js +8 -1
- package/dist/runners/claude-code.js.map +1 -1
- package/dist/runners/engine-commands.js +3 -0
- package/dist/runners/engine-commands.js.map +1 -1
- package/dist/runners/index.js +3 -0
- package/dist/runners/index.js.map +1 -1
- package/dist/runners/index.test.js +2 -0
- package/dist/runners/index.test.js.map +1 -1
- package/dist/runners/json-line-buffer.d.ts +4 -0
- package/dist/runners/json-line-buffer.js +32 -0
- package/dist/runners/json-line-buffer.js.map +1 -0
- package/dist/runners/json-line-buffer.test.d.ts +1 -0
- package/dist/runners/json-line-buffer.test.js +26 -0
- package/dist/runners/json-line-buffer.test.js.map +1 -0
- package/dist/runners/muse-code-identity.d.ts +8 -0
- package/dist/runners/muse-code-identity.js +18 -0
- package/dist/runners/muse-code-identity.js.map +1 -0
- package/dist/runners/muse-code-json-parser.d.ts +14 -0
- package/dist/runners/muse-code-json-parser.js +168 -0
- package/dist/runners/muse-code-json-parser.js.map +1 -0
- package/dist/runners/muse-code.d.ts +28 -0
- package/dist/runners/muse-code.js +327 -0
- package/dist/runners/muse-code.js.map +1 -0
- package/dist/runners/muse-code.test.d.ts +1 -0
- package/dist/runners/muse-code.test.js +237 -0
- package/dist/runners/muse-code.test.js.map +1 -0
- package/dist/runners/opencode-json-parser.d.ts +1 -0
- package/dist/runners/opencode-json-parser.js +20 -32
- package/dist/runners/opencode-json-parser.js.map +1 -1
- package/dist/runners/opencode.js +15 -2
- package/dist/runners/opencode.js.map +1 -1
- package/dist/runners/stream-json-parser.d.ts +2 -0
- package/dist/runners/stream-json-parser.js +9 -27
- package/dist/runners/stream-json-parser.js.map +1 -1
- package/dist/runners/token-usage.d.ts +19 -0
- package/dist/runners/token-usage.js +140 -0
- package/dist/runners/token-usage.js.map +1 -0
- package/dist/runners/token-usage.test.d.ts +1 -0
- package/dist/runners/token-usage.test.js +152 -0
- package/dist/runners/token-usage.test.js.map +1 -0
- package/dist/runners/types.d.ts +2 -0
- package/dist/utils/engine-probe.js +5 -2
- package/dist/utils/engine-probe.js.map +1 -1
- package/dist/utils/engine-probe.test.js +10 -0
- package/dist/utils/engine-probe.test.js.map +1 -1
- package/dist/utils/model-enumerator.d.ts +5 -0
- package/dist/utils/model-enumerator.js +36 -0
- package/dist/utils/model-enumerator.js.map +1 -1
- package/dist/utils/muse-code-models.d.ts +9 -0
- package/dist/utils/muse-code-models.js +81 -0
- package/dist/utils/muse-code-models.js.map +1 -0
- package/dist/utils/muse-code-models.test.d.ts +1 -0
- package/dist/utils/muse-code-models.test.js +81 -0
- package/dist/utils/muse-code-models.test.js.map +1 -0
- package/native/bin/win32-x64/agentrunner-launcher.exe +0 -0
- package/native/bin/win32-x64/manifest.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { createWriteStream } from 'node:fs';
|
|
4
|
+
import { mkdir, rm, writeFile } from 'node:fs/promises';
|
|
5
|
+
import { platform } from 'node:os';
|
|
6
|
+
import { dirname, join } from 'node:path';
|
|
7
|
+
import { resolveExecutablePathsWithPreferenceAsync, runProbeCommand } from '../executable.js';
|
|
8
|
+
import { logger } from '../logger.js';
|
|
9
|
+
import { selectRunnerFailureMessage } from './failure-message.js';
|
|
10
|
+
import { createAnsiStripper } from './kiro-cli.js';
|
|
11
|
+
import { findMuseCodeExecutable, isMuseCodeExecutable } from './muse-code-identity.js';
|
|
12
|
+
import { createMuseCodeStreamConsumer } from './muse-code-json-parser.js';
|
|
13
|
+
import { setupCloseWatchdog, terminateRunnerChild } from './process-control.js';
|
|
14
|
+
import { buildRunnerChildEnv } from './session-env.js';
|
|
15
|
+
const OUTPUT_PREVIEW_MAX = 400;
|
|
16
|
+
const normalizedModel = (model) => (typeof model === 'string' ? model.trim() : '');
|
|
17
|
+
// muse 1.0.2 (2026-09-04): cwd가 workspace이며 프롬프트는 파일로 전달한다.
|
|
18
|
+
// 승인을 비대화형으로 설정하되 기본 샌드박스는 유지한다.
|
|
19
|
+
export const buildMuseCodeArgs = (promptFilePath, model, effort) => {
|
|
20
|
+
const selectedModel = normalizedModel(model);
|
|
21
|
+
return [
|
|
22
|
+
'exec',
|
|
23
|
+
'--json',
|
|
24
|
+
'--approval-mode',
|
|
25
|
+
'never',
|
|
26
|
+
'--prompt-file',
|
|
27
|
+
promptFilePath,
|
|
28
|
+
...(selectedModel && selectedModel !== 'default' ? ['--model', selectedModel] : []),
|
|
29
|
+
...(effort?.trim() ? ['--reasoning-effort', effort.trim()] : []),
|
|
30
|
+
];
|
|
31
|
+
};
|
|
32
|
+
export const getMuseCodeExecutablePreference = (isWindows) => isWindows ? ['muse.exe', 'muse'] : ['muse'];
|
|
33
|
+
const toPowerShellLiteral = (value) => `'${value.replaceAll("'", "''")}'`;
|
|
34
|
+
export const toMuseCodePowerShellEncodedCommand = (resolvedExecutablePath, promptFilePath, model, effort) => {
|
|
35
|
+
const argSegment = buildMuseCodeArgs(promptFilePath, model, effort)
|
|
36
|
+
.map((arg) => ` ${toPowerShellLiteral(arg)}`)
|
|
37
|
+
.join('');
|
|
38
|
+
const scriptContent = [
|
|
39
|
+
"$ErrorActionPreference = 'Stop'",
|
|
40
|
+
'$utf8NoBom = [System.Text.UTF8Encoding]::new($false)',
|
|
41
|
+
'[Console]::InputEncoding = $utf8NoBom',
|
|
42
|
+
'[Console]::OutputEncoding = $utf8NoBom',
|
|
43
|
+
'$OutputEncoding = $utf8NoBom',
|
|
44
|
+
'chcp 65001 > $null',
|
|
45
|
+
`& ${toPowerShellLiteral(resolvedExecutablePath)}${argSegment}`,
|
|
46
|
+
].join('\r\n');
|
|
47
|
+
return Buffer.from(scriptContent, 'utf16le').toString('base64');
|
|
48
|
+
};
|
|
49
|
+
const toOutputPreview = (text) => {
|
|
50
|
+
const trimmed = text.trim();
|
|
51
|
+
return trimmed.length <= OUTPUT_PREVIEW_MAX ? trimmed : `${trimmed.slice(0, OUTPUT_PREVIEW_MAX)}...`;
|
|
52
|
+
};
|
|
53
|
+
// 실측된 기동·종료 진단 문구는 실패 사유 후보에서 제외한다.
|
|
54
|
+
const PROGRESS_ONLY_LINE_PATTERNS = [/^muse: workspace root:/, /^run ended with /];
|
|
55
|
+
const isProgressOnlyOutput = (text) => {
|
|
56
|
+
const lines = text
|
|
57
|
+
.split('\n')
|
|
58
|
+
.map((line) => line.trim())
|
|
59
|
+
.filter((line) => line.length > 0);
|
|
60
|
+
return lines.every((line) => PROGRESS_ONLY_LINE_PATTERNS.some((pattern) => pattern.test(line)));
|
|
61
|
+
};
|
|
62
|
+
const looksLikeErrorOutput = (text) => text.trim().length > 0 && !isProgressOnlyOutput(text);
|
|
63
|
+
const defaultDependencies = {
|
|
64
|
+
platform,
|
|
65
|
+
resolveExecutablePathsWithPreferenceAsync,
|
|
66
|
+
runProbeCommand,
|
|
67
|
+
spawn,
|
|
68
|
+
createWriteStream,
|
|
69
|
+
mkdir,
|
|
70
|
+
writeFile,
|
|
71
|
+
rm,
|
|
72
|
+
setupCloseWatchdog,
|
|
73
|
+
terminateRunnerChild,
|
|
74
|
+
};
|
|
75
|
+
export class MuseCodeRunner {
|
|
76
|
+
deps;
|
|
77
|
+
constructor(dependencies = {}) {
|
|
78
|
+
this.deps = { ...defaultDependencies, ...dependencies };
|
|
79
|
+
}
|
|
80
|
+
async run(opts) {
|
|
81
|
+
if (!opts.authPath || opts.authPath.trim().length === 0) {
|
|
82
|
+
logger.error('authPath is missing for trigger');
|
|
83
|
+
return { exitCode: 1, errorMessage: 'authPath is missing for trigger' };
|
|
84
|
+
}
|
|
85
|
+
const cwd = opts.authPath;
|
|
86
|
+
const logPath = join(cwd, '.agentteams', 'runner', 'log', `${opts.triggerId}.log`);
|
|
87
|
+
await this.deps.mkdir(dirname(logPath), { recursive: true });
|
|
88
|
+
const isWindows = this.deps.platform() === 'win32';
|
|
89
|
+
const resolvedExecutablePath = await findMuseCodeExecutable(getMuseCodeExecutablePreference(isWindows), {
|
|
90
|
+
resolveExecutablePathsWithPreferenceAsync: this.deps.resolveExecutablePathsWithPreferenceAsync,
|
|
91
|
+
runProbeCommand: this.deps.runProbeCommand,
|
|
92
|
+
platform: this.deps.platform,
|
|
93
|
+
});
|
|
94
|
+
if (!resolvedExecutablePath) {
|
|
95
|
+
const message = "Cannot find an official Muse Code executable. Every 'muse' candidate failed the Muse Code identity check.";
|
|
96
|
+
logger.error('Muse Code executable identity check failed', { triggerId: opts.triggerId });
|
|
97
|
+
return { exitCode: 1, errorMessage: message };
|
|
98
|
+
}
|
|
99
|
+
const promptFilePath = join(cwd, '.agentteams', 'runner', 'tmp', `${opts.triggerId}.prompt.md`);
|
|
100
|
+
await this.deps.mkdir(dirname(promptFilePath), { recursive: true });
|
|
101
|
+
await this.deps.writeFile(promptFilePath, opts.prompt, { encoding: 'utf8' });
|
|
102
|
+
const removePromptFile = async () => {
|
|
103
|
+
try {
|
|
104
|
+
await this.deps.rm(promptFilePath, { force: true });
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
logger.warn('Failed to remove Muse Code prompt temp file', {
|
|
108
|
+
triggerId: opts.triggerId,
|
|
109
|
+
promptFilePath,
|
|
110
|
+
error: error instanceof Error ? error.message : String(error),
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const args = buildMuseCodeArgs(promptFilePath, opts.model, opts.effort);
|
|
115
|
+
logger.info('Runner prompt prepared', {
|
|
116
|
+
triggerId: opts.triggerId,
|
|
117
|
+
promptLength: opts.prompt.length,
|
|
118
|
+
promptFilePath,
|
|
119
|
+
requestedCommand: 'muse',
|
|
120
|
+
resolvedExecutablePath,
|
|
121
|
+
platform: isWindows ? 'win32' : this.deps.platform(),
|
|
122
|
+
shell: false,
|
|
123
|
+
detached: !isWindows,
|
|
124
|
+
windowsWrapper: isWindows ? 'powershell.exe -EncodedCommand' : null,
|
|
125
|
+
});
|
|
126
|
+
const env = buildRunnerChildEnv(process.env, opts);
|
|
127
|
+
if (!(await isMuseCodeExecutable(resolvedExecutablePath, {
|
|
128
|
+
runProbeCommand: this.deps.runProbeCommand,
|
|
129
|
+
platform: this.deps.platform,
|
|
130
|
+
}))) {
|
|
131
|
+
await removePromptFile();
|
|
132
|
+
const message = 'The resolved Muse Code executable changed identity before launch; execution was refused.';
|
|
133
|
+
logger.error('Muse Code executable identity changed before launch', { triggerId: opts.triggerId });
|
|
134
|
+
return { exitCode: 1, errorMessage: message };
|
|
135
|
+
}
|
|
136
|
+
let child;
|
|
137
|
+
try {
|
|
138
|
+
child = isWindows
|
|
139
|
+
? this.deps.spawn('powershell.exe', [
|
|
140
|
+
'-NoLogo',
|
|
141
|
+
'-NonInteractive',
|
|
142
|
+
'-ExecutionPolicy',
|
|
143
|
+
'Bypass',
|
|
144
|
+
'-EncodedCommand',
|
|
145
|
+
toMuseCodePowerShellEncodedCommand(resolvedExecutablePath, promptFilePath, opts.model, opts.effort),
|
|
146
|
+
], { cwd, detached: false, shell: false, windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'], env })
|
|
147
|
+
: this.deps.spawn(resolvedExecutablePath, args, {
|
|
148
|
+
cwd,
|
|
149
|
+
detached: true,
|
|
150
|
+
shell: false,
|
|
151
|
+
windowsHide: true,
|
|
152
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
153
|
+
env,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
await removePromptFile();
|
|
158
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
159
|
+
logger.error('Runner process launch failed', { triggerId: opts.triggerId, error: message });
|
|
160
|
+
return { exitCode: 1, errorMessage: message };
|
|
161
|
+
}
|
|
162
|
+
const logStream = this.deps.createWriteStream(logPath, { flags: 'a' });
|
|
163
|
+
logStream.on('error', (error) => logger.warn('Runner log stream error', { triggerId: opts.triggerId, error: error.message }));
|
|
164
|
+
child.stdout?.pipe(logStream);
|
|
165
|
+
child.stderr?.pipe(logStream);
|
|
166
|
+
let lastOutput = '';
|
|
167
|
+
let lastErrorOutput = '';
|
|
168
|
+
let lastErrorSignal = '';
|
|
169
|
+
const stdoutDecoder = new StringDecoder('utf8');
|
|
170
|
+
const stderrDecoder = new StringDecoder('utf8');
|
|
171
|
+
const stdoutStripper = createAnsiStripper();
|
|
172
|
+
const stderrStripper = createAnsiStripper();
|
|
173
|
+
const idleTimer = { reset: () => { } };
|
|
174
|
+
// 각 NDJSON 라인을 한 번만 파싱해 라이브 로그와 결과 판정 양쪽에 전달한다.
|
|
175
|
+
const streamConsumer = createMuseCodeStreamConsumer((entries) => {
|
|
176
|
+
for (const entry of entries) {
|
|
177
|
+
// 실패 사유 후보(lastOutput)는 모델이 쓴 텍스트로 한정한다. SYSTEM(verbose 원문 봉투)이나
|
|
178
|
+
// TOOL 요약이 사유로 승격되면 사람이 읽을 수 없는 조각이 화면에 노출된다.
|
|
179
|
+
if (entry.category === 'TEXT' || entry.category === 'RESULT') {
|
|
180
|
+
lastOutput = toOutputPreview(entry.message);
|
|
181
|
+
}
|
|
182
|
+
opts.onStdoutChunk?.(entry.message, entry.category, entry.toolName);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
child.stdout?.on('data', (chunk) => {
|
|
186
|
+
const rawOutput = Buffer.isBuffer(chunk) ? stdoutDecoder.write(chunk) : String(chunk);
|
|
187
|
+
const text = stdoutStripper.push(rawOutput);
|
|
188
|
+
if (text.length === 0) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
streamConsumer.push(text);
|
|
192
|
+
// 이벤트가 로그 엔트리로 정제되지 않는 구간(델타 연발)에도 살아 있다는 신호이므로,
|
|
193
|
+
// 리셋은 정제 결과가 아니라 데이터 도착을 기준으로 한다.
|
|
194
|
+
idleTimer.reset();
|
|
195
|
+
logger.info('Runner stdout', { triggerId: opts.triggerId, pid: child.pid, output: toOutputPreview(text) });
|
|
196
|
+
});
|
|
197
|
+
child.stderr?.on('data', (chunk) => {
|
|
198
|
+
const rawOutput = Buffer.isBuffer(chunk) ? stderrDecoder.write(chunk) : String(chunk);
|
|
199
|
+
const output = toOutputPreview(stderrStripper.push(rawOutput));
|
|
200
|
+
if (output.length > 0) {
|
|
201
|
+
lastErrorOutput = output;
|
|
202
|
+
// 진행 표시(`run ended with ...`)가 stderr 마지막에 찍혀 실제 오류를 가리므로, 진행 표시가 아닌
|
|
203
|
+
// 가장 최근 청크를 사유로 쓴다. 첫 청크를 고정하면 초반의 무해한 경고가 사유가 된다.
|
|
204
|
+
if (looksLikeErrorOutput(output)) {
|
|
205
|
+
lastErrorSignal = output;
|
|
206
|
+
}
|
|
207
|
+
idleTimer.reset();
|
|
208
|
+
opts.onStderrChunk?.(output, 'STDERR');
|
|
209
|
+
logger.info('Muse Code progress', { triggerId: opts.triggerId, pid: child.pid, output });
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
logger.info('Runner started', { triggerId: opts.triggerId, cwd, logPath, pid: child.pid });
|
|
213
|
+
return await new Promise((resolve) => {
|
|
214
|
+
let finished = false;
|
|
215
|
+
let timedOut = false;
|
|
216
|
+
let idleTimedOut = false;
|
|
217
|
+
let cancelled = false;
|
|
218
|
+
let idleTimeoutId = null;
|
|
219
|
+
const startIdleTimeout = () => {
|
|
220
|
+
if (idleTimeoutId)
|
|
221
|
+
clearTimeout(idleTimeoutId);
|
|
222
|
+
idleTimeoutId = setTimeout(() => {
|
|
223
|
+
idleTimedOut = true;
|
|
224
|
+
timedOut = true;
|
|
225
|
+
logger.warn('Runner idle timeout reached; no output for configured idle period', {
|
|
226
|
+
triggerId: opts.triggerId,
|
|
227
|
+
idleTimeoutMs: opts.idleTimeoutMs,
|
|
228
|
+
});
|
|
229
|
+
this.deps.terminateRunnerChild(child, isWindows, opts.triggerId, 'timeout');
|
|
230
|
+
}, opts.idleTimeoutMs);
|
|
231
|
+
};
|
|
232
|
+
idleTimer.reset = startIdleTimeout;
|
|
233
|
+
startIdleTimeout();
|
|
234
|
+
const handleAbort = () => {
|
|
235
|
+
cancelled = true;
|
|
236
|
+
this.deps.terminateRunnerChild(child, isWindows, opts.triggerId, 'cancel');
|
|
237
|
+
};
|
|
238
|
+
const cleanup = async () => {
|
|
239
|
+
if (finished)
|
|
240
|
+
return;
|
|
241
|
+
finished = true;
|
|
242
|
+
if (idleTimeoutId)
|
|
243
|
+
clearTimeout(idleTimeoutId);
|
|
244
|
+
idleTimer.reset = () => { };
|
|
245
|
+
logStream.end();
|
|
246
|
+
await removePromptFile();
|
|
247
|
+
opts.signal?.removeEventListener('abort', handleAbort);
|
|
248
|
+
};
|
|
249
|
+
const timeoutId = setTimeout(() => {
|
|
250
|
+
timedOut = true;
|
|
251
|
+
this.deps.terminateRunnerChild(child, isWindows, opts.triggerId, 'timeout');
|
|
252
|
+
}, opts.timeoutMs);
|
|
253
|
+
if (opts.signal?.aborted)
|
|
254
|
+
handleAbort();
|
|
255
|
+
else
|
|
256
|
+
opts.signal?.addEventListener('abort', handleAbort, { once: true });
|
|
257
|
+
child.on('error', async (error) => {
|
|
258
|
+
clearTimeout(timeoutId);
|
|
259
|
+
await cleanup();
|
|
260
|
+
logger.error('Runner process launch failed', { triggerId: opts.triggerId, error: error.message });
|
|
261
|
+
resolve({
|
|
262
|
+
exitCode: 1,
|
|
263
|
+
lastOutput,
|
|
264
|
+
outputText: streamConsumer.getFinalText() ?? streamConsumer.getStreamedTextFallback() ?? undefined,
|
|
265
|
+
errorMessage: error.message,
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
const closeWatchdog = this.deps.setupCloseWatchdog(child, opts.triggerId);
|
|
269
|
+
child.on('close', async (code) => {
|
|
270
|
+
closeWatchdog.cancel();
|
|
271
|
+
clearTimeout(timeoutId);
|
|
272
|
+
await cleanup();
|
|
273
|
+
logger.info('Runner process closed', { triggerId: opts.triggerId, pid: child.pid, exitCode: code, timedOut });
|
|
274
|
+
streamConsumer.push(stdoutStripper.push(stdoutDecoder.end()));
|
|
275
|
+
stdoutStripper.flush();
|
|
276
|
+
// 라인 스캐너가 개행 없이 끝난 마지막 NDJSON 라인을 회수한다.
|
|
277
|
+
streamConsumer.flush();
|
|
278
|
+
const finalizedOutputText = streamConsumer.getFinalText() ?? streamConsumer.getStreamedTextFallback() ?? undefined;
|
|
279
|
+
const streamFailureMessage = streamConsumer.getFailureMessage();
|
|
280
|
+
if (timedOut) {
|
|
281
|
+
resolve({
|
|
282
|
+
exitCode: 1,
|
|
283
|
+
timedOut,
|
|
284
|
+
idleTimedOut,
|
|
285
|
+
lastOutput,
|
|
286
|
+
outputText: finalizedOutputText,
|
|
287
|
+
errorMessage: idleTimedOut
|
|
288
|
+
? `Runner idle timed out after ${Math.round(opts.idleTimeoutMs / 60_000)}m of no output`
|
|
289
|
+
: `Runner fail-safe timed out after ${Math.round(opts.timeoutMs / 3_600_000)}h`,
|
|
290
|
+
});
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (cancelled) {
|
|
294
|
+
resolve({
|
|
295
|
+
exitCode: 1,
|
|
296
|
+
cancelled: true,
|
|
297
|
+
lastOutput,
|
|
298
|
+
outputText: finalizedOutputText,
|
|
299
|
+
errorMessage: 'Runner cancelled by user',
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
// 종단 실패 이벤트는 종료 코드와 무관하게 보존한다.
|
|
304
|
+
if (streamFailureMessage) {
|
|
305
|
+
resolve({
|
|
306
|
+
exitCode: code && code !== 0 ? code : 1,
|
|
307
|
+
lastOutput,
|
|
308
|
+
outputText: finalizedOutputText,
|
|
309
|
+
errorMessage: streamFailureMessage,
|
|
310
|
+
});
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
resolve({
|
|
314
|
+
exitCode: code ?? 1,
|
|
315
|
+
lastOutput,
|
|
316
|
+
outputText: finalizedOutputText,
|
|
317
|
+
errorMessage: selectRunnerFailureMessage({
|
|
318
|
+
exitCode: code,
|
|
319
|
+
lastErrorOutput: lastErrorSignal || lastErrorOutput,
|
|
320
|
+
lastOutput,
|
|
321
|
+
}),
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=muse-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muse-code.js","sourceRoot":"","sources":["../../src/runners/muse-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,yCAAyC,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,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AC/B,YAAY,EAAE,0BAA0B,CAAC;wBACvC,QAAQ,EAAE,IAAI;wBACd,eAAe,EAAE,eAAe,IAAI,eAAe;wBACnD,UAAU;qBACX,CAAC;iBACH,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { EventEmitter } from 'node:events';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import { PassThrough } from 'node:stream';
|
|
5
|
+
import test from 'node:test';
|
|
6
|
+
import { buildMuseCodeArgs, MuseCodeRunner, toMuseCodePowerShellEncodedCommand } from './muse-code.js';
|
|
7
|
+
import { findMuseCodeExecutable } from './muse-code-identity.js';
|
|
8
|
+
import { createMuseCodeStreamConsumer } from './muse-code-json-parser.js';
|
|
9
|
+
const options = {
|
|
10
|
+
triggerId: 'muse-test',
|
|
11
|
+
prompt: '- 작업',
|
|
12
|
+
authPath: '/repo',
|
|
13
|
+
apiKey: 'key',
|
|
14
|
+
apiUrl: 'https://example.com',
|
|
15
|
+
teamId: 'team',
|
|
16
|
+
projectId: 'project',
|
|
17
|
+
timeoutMs: 1000,
|
|
18
|
+
idleTimeoutMs: 1000,
|
|
19
|
+
agentConfigId: 'agent',
|
|
20
|
+
runnerType: 'MUSE_CODE',
|
|
21
|
+
};
|
|
22
|
+
const event = (payload_type, payload) => JSON.stringify({ schema_version: 1, payload_type, payload }) + '\n';
|
|
23
|
+
test('Muse arguments preserve sandbox and pass prompt, model, and effort without shell interpolation', () => {
|
|
24
|
+
const args = buildMuseCodeArgs("/repo/a'b.md", ' model-id ', 'high');
|
|
25
|
+
assert.deepEqual(args, [
|
|
26
|
+
'exec',
|
|
27
|
+
'--json',
|
|
28
|
+
'--approval-mode',
|
|
29
|
+
'never',
|
|
30
|
+
'--prompt-file',
|
|
31
|
+
"/repo/a'b.md",
|
|
32
|
+
'--model',
|
|
33
|
+
'model-id',
|
|
34
|
+
'--reasoning-effort',
|
|
35
|
+
'high',
|
|
36
|
+
]);
|
|
37
|
+
for (const model of ['default', null, undefined, ' '])
|
|
38
|
+
assert.equal(buildMuseCodeArgs('/p', model).includes('--model'), false);
|
|
39
|
+
const script = Buffer.from(toMuseCodePowerShellEncodedCommand("C:\\a'b\\muse.exe", "/repo/a'b.md", 'model-id', 'high'), 'base64').toString('utf16le');
|
|
40
|
+
for (const arg of args)
|
|
41
|
+
assert.ok(script.includes(`'${arg.replaceAll("'", "''")}'`));
|
|
42
|
+
});
|
|
43
|
+
test('Muse identity rejects CMS candidates and selects the official installation', async () => {
|
|
44
|
+
const selected = await findMuseCodeExecutable(['muse'], {
|
|
45
|
+
resolveExecutablePathsWithPreferenceAsync: async () => ['/cms/muse', '/official/muse'],
|
|
46
|
+
runProbeCommand: async (path) => path.includes('official') ? 'muse — interactive terminal coding agent' : 'A CMS Scaffolding Tool',
|
|
47
|
+
});
|
|
48
|
+
assert.equal(selected, '/official/muse');
|
|
49
|
+
});
|
|
50
|
+
const collect = (options) => {
|
|
51
|
+
const entries = [];
|
|
52
|
+
const parser = createMuseCodeStreamConsumer((batch) => entries.push(...batch), options);
|
|
53
|
+
return { parser, entries };
|
|
54
|
+
};
|
|
55
|
+
const textMessages = (entries) => entries.filter((entry) => entry.category === 'TEXT').map((entry) => entry.message);
|
|
56
|
+
test('Muse parser replays real echo fixture with arbitrary chunk boundaries and drops unmapped envelopes', async () => {
|
|
57
|
+
const fixture = await readFile(new URL('./fixtures/muse-code-events.jsonl', import.meta.url), 'utf8');
|
|
58
|
+
const { parser, entries } = collect();
|
|
59
|
+
for (let offset = 0; offset < fixture.length; offset += 7)
|
|
60
|
+
parser.push(fixture.slice(offset, offset + 7));
|
|
61
|
+
parser.flush();
|
|
62
|
+
assert.equal(parser.getFinalText(), 'echo: Reply with Muse fixture OK.');
|
|
63
|
+
// 최종 답변은 조각 없이 한 행으로, 그리고 한 번만 남는다.
|
|
64
|
+
assert.deepEqual(textMessages(entries), ['echo: Reply with Muse fixture OK.']);
|
|
65
|
+
assert.equal(entries.some((entry) => entry.message.includes('"schema_version"')), false, 'raw MSP envelopes must not reach the server log');
|
|
66
|
+
assert.equal(entries.some((entry) => entry.message.includes('task.lifecycle')), false);
|
|
67
|
+
parser.push(event('run.terminal.failed', { reason: 'API error 402 billing_error' }).trimEnd());
|
|
68
|
+
parser.flush();
|
|
69
|
+
assert.equal(parser.getFailureMessage(), 'API error 402 billing_error');
|
|
70
|
+
});
|
|
71
|
+
test('Muse parser keeps unmapped envelopes only in verbose mode', async () => {
|
|
72
|
+
const fixture = await readFile(new URL('./fixtures/muse-code-events.jsonl', import.meta.url), 'utf8');
|
|
73
|
+
const { parser, entries } = collect({ verbose: true });
|
|
74
|
+
parser.push(fixture);
|
|
75
|
+
parser.flush();
|
|
76
|
+
const raw = entries.filter((entry) => entry.category === 'SYSTEM' && entry.message.includes('"schema_version"'));
|
|
77
|
+
assert.ok(raw.some((entry) => entry.message.includes('session.workspace_branch.observed')));
|
|
78
|
+
assert.deepEqual(textMessages(entries), ['echo: Reply with Muse fixture OK.']);
|
|
79
|
+
});
|
|
80
|
+
test('Muse parser merges token deltas into bounded rows and never re-emits an already streamed answer', () => {
|
|
81
|
+
const { parser, entries } = collect();
|
|
82
|
+
for (const text of ['Hello', ' wor', 'ld.', ' Second', ' para\nThird', ' line']) {
|
|
83
|
+
parser.push(event('run.output.delta', { text }));
|
|
84
|
+
}
|
|
85
|
+
assert.deepEqual(textMessages(entries), ['Hello world.', 'Second para']);
|
|
86
|
+
parser.push(event('run.terminal.completed', { text: 'Hello world. Second para\nThird line' }));
|
|
87
|
+
parser.flush();
|
|
88
|
+
assert.deepEqual(textMessages(entries), ['Hello world.', 'Second para', 'Third line']);
|
|
89
|
+
assert.equal(parser.getFinalText(), 'Hello world. Second para\nThird line');
|
|
90
|
+
});
|
|
91
|
+
test('Muse parser logs the terminal text as one row when the delta stream does not match it', () => {
|
|
92
|
+
const { parser, entries } = collect();
|
|
93
|
+
parser.push(event('run.output.delta', { text: 'partial' }));
|
|
94
|
+
parser.push(event('run.terminal.completed', { text: 'Complete final answer' }));
|
|
95
|
+
parser.flush();
|
|
96
|
+
assert.deepEqual(textMessages(entries), ['Complete final answer']);
|
|
97
|
+
});
|
|
98
|
+
test('Muse parser caps the streamed text fallback', () => {
|
|
99
|
+
const { parser } = collect();
|
|
100
|
+
parser.push(event('run.output.delta', { text: 'x'.repeat(150_000) }));
|
|
101
|
+
parser.push(event('run.output.delta', { text: 'y'.repeat(100_000) }));
|
|
102
|
+
parser.flush();
|
|
103
|
+
assert.equal(parser.getStreamedTextFallback()?.length, 200_000);
|
|
104
|
+
});
|
|
105
|
+
for (const code of [0, 1, 2]) {
|
|
106
|
+
test(`Muse runner preserves exit ${code} and cleans up the prompt`, async () => {
|
|
107
|
+
let removed = false;
|
|
108
|
+
let spawnOptions;
|
|
109
|
+
const runner = new MuseCodeRunner({
|
|
110
|
+
platform: () => 'linux',
|
|
111
|
+
resolveExecutablePathsWithPreferenceAsync: async () => ['/official/muse'],
|
|
112
|
+
runProbeCommand: async () => 'muse — interactive terminal coding agent',
|
|
113
|
+
mkdir: (async () => undefined),
|
|
114
|
+
writeFile: (async () => undefined),
|
|
115
|
+
rm: (async () => {
|
|
116
|
+
removed = true;
|
|
117
|
+
}),
|
|
118
|
+
createWriteStream: (() => new PassThrough()),
|
|
119
|
+
setupCloseWatchdog: (() => ({ cancel() { } })),
|
|
120
|
+
spawn: ((_cmd, _args, opts) => {
|
|
121
|
+
spawnOptions = opts;
|
|
122
|
+
const child = Object.assign(new EventEmitter(), {
|
|
123
|
+
stdout: new PassThrough(),
|
|
124
|
+
stderr: new PassThrough(),
|
|
125
|
+
pid: 123,
|
|
126
|
+
});
|
|
127
|
+
setTimeout(() => {
|
|
128
|
+
child.stdout.write(event(code === 0 ? 'run.terminal.completed' : 'run.terminal.failed', code === 0 ? { text: '완료' } : { reason: 'specific failure' }));
|
|
129
|
+
child.emit('close', code);
|
|
130
|
+
}, 0);
|
|
131
|
+
return child;
|
|
132
|
+
}),
|
|
133
|
+
});
|
|
134
|
+
const result = await runner.run(options);
|
|
135
|
+
assert.equal(result.exitCode, code);
|
|
136
|
+
assert.equal(removed, true);
|
|
137
|
+
assert.equal(spawnOptions.windowsHide, true);
|
|
138
|
+
assert.equal(spawnOptions.cwd, '/repo');
|
|
139
|
+
if (code === 0)
|
|
140
|
+
assert.equal(result.outputText, '완료');
|
|
141
|
+
else
|
|
142
|
+
assert.equal(result.errorMessage, 'specific failure');
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
for (const kind of ['timeout', 'cancel']) {
|
|
146
|
+
test(`Muse runner reports ${kind} and terminates its process`, async () => {
|
|
147
|
+
let child;
|
|
148
|
+
let terminated = false;
|
|
149
|
+
const controller = new AbortController();
|
|
150
|
+
const runner = new MuseCodeRunner({
|
|
151
|
+
platform: () => 'linux',
|
|
152
|
+
resolveExecutablePathsWithPreferenceAsync: async () => ['/muse'],
|
|
153
|
+
runProbeCommand: async () => 'muse — interactive terminal coding agent',
|
|
154
|
+
mkdir: (async () => undefined),
|
|
155
|
+
writeFile: (async () => undefined),
|
|
156
|
+
rm: (async () => undefined),
|
|
157
|
+
createWriteStream: (() => new PassThrough()),
|
|
158
|
+
setupCloseWatchdog: (() => ({ cancel() { } })),
|
|
159
|
+
spawn: (() => {
|
|
160
|
+
child = Object.assign(new EventEmitter(), { stdout: new PassThrough(), stderr: new PassThrough(), pid: 123 });
|
|
161
|
+
return child;
|
|
162
|
+
}),
|
|
163
|
+
terminateRunnerChild: (() => {
|
|
164
|
+
terminated = true;
|
|
165
|
+
setTimeout(() => child.emit('close', null), 0);
|
|
166
|
+
}),
|
|
167
|
+
});
|
|
168
|
+
if (kind === 'cancel')
|
|
169
|
+
controller.abort();
|
|
170
|
+
const result = await runner.run({ ...options, signal: controller.signal, idleTimeoutMs: 10 });
|
|
171
|
+
assert.equal(terminated, true);
|
|
172
|
+
assert.equal(kind === 'cancel' ? result.cancelled : result.idleTimedOut, true);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
test('Muse real model tool fixture summarizes the bash task as TOOL and keeps the final output intact', async () => {
|
|
176
|
+
const fixture = await readFile(new URL('./fixtures/muse-code-tool-events.jsonl', import.meta.url), 'utf8');
|
|
177
|
+
const { parser, entries } = collect();
|
|
178
|
+
parser.push(fixture);
|
|
179
|
+
parser.flush();
|
|
180
|
+
const tools = entries.filter((entry) => entry.category === 'TOOL');
|
|
181
|
+
assert.deepEqual(tools.map((entry) => [entry.message, entry.toolName]), [['[Tool] tool.bash (proposed)', 'tool.bash']]);
|
|
182
|
+
assert.deepEqual(textMessages(entries), ['Output: `muse-verification-ok`']);
|
|
183
|
+
assert.equal(entries.some((entry) => entry.message.includes('"schema_version"')), false);
|
|
184
|
+
assert.equal(parser.getFinalText(), 'Output: `muse-verification-ok`');
|
|
185
|
+
});
|
|
186
|
+
test('Muse parser reports tool lifecycle stages once the task kind is known', () => {
|
|
187
|
+
const { parser, entries } = collect();
|
|
188
|
+
const task_id = 't1';
|
|
189
|
+
parser.push(event('task.lifecycle.proposed', { event: { kind: 'proposed', task_id, task_kind: 'tool.bash' } }));
|
|
190
|
+
parser.push(event('task.lifecycle.accepted', { event: { kind: 'accepted', task_id } }));
|
|
191
|
+
parser.push(event('task.lifecycle.started', { event: { kind: 'started', task_id } }));
|
|
192
|
+
parser.push(event('task.lifecycle.completed', { event: { kind: 'completed', task_id } }));
|
|
193
|
+
parser.push(event('task.lifecycle.proposed', { event: { kind: 'proposed', task_id: 'm1', task_kind: 'model.x' } }));
|
|
194
|
+
parser.flush();
|
|
195
|
+
assert.deepEqual(entries.map((entry) => entry.message), ['[Tool] tool.bash (proposed)', '[Tool] tool.bash (started)', '[Tool] tool.bash (completed)']);
|
|
196
|
+
});
|
|
197
|
+
const runWithChild = async (feed) => {
|
|
198
|
+
const runner = new MuseCodeRunner({
|
|
199
|
+
platform: () => 'linux',
|
|
200
|
+
resolveExecutablePathsWithPreferenceAsync: async () => ['/official/muse'],
|
|
201
|
+
runProbeCommand: async () => 'muse — interactive terminal coding agent',
|
|
202
|
+
mkdir: (async () => undefined),
|
|
203
|
+
writeFile: (async () => undefined),
|
|
204
|
+
rm: (async () => undefined),
|
|
205
|
+
createWriteStream: (() => new PassThrough()),
|
|
206
|
+
setupCloseWatchdog: (() => ({ cancel() { } })),
|
|
207
|
+
spawn: (() => {
|
|
208
|
+
const child = Object.assign(new EventEmitter(), { stdout: new PassThrough(), stderr: new PassThrough(), pid: 1 });
|
|
209
|
+
setTimeout(() => feed(child), 0);
|
|
210
|
+
return child;
|
|
211
|
+
}),
|
|
212
|
+
});
|
|
213
|
+
return runner.run(options);
|
|
214
|
+
};
|
|
215
|
+
test('Muse runner prefers the latest non-progress stderr line over an early benign warning', async () => {
|
|
216
|
+
const result = await runWithChild((child) => {
|
|
217
|
+
child.stderr.write('muse: workspace root: /repo\n');
|
|
218
|
+
child.stderr.write('A new muse version 1.0.3 is available\n');
|
|
219
|
+
child.stderr.write('Error: API key invalid\n');
|
|
220
|
+
child.stderr.write('run ended with failure\n');
|
|
221
|
+
child.emit('close', 1);
|
|
222
|
+
});
|
|
223
|
+
assert.equal(result.errorMessage, 'Error: API key invalid');
|
|
224
|
+
});
|
|
225
|
+
test('Muse runner keeps lastOutput as a bounded text preview and ignores non-text entries', async () => {
|
|
226
|
+
const long = 'a'.repeat(1_000);
|
|
227
|
+
const result = await runWithChild((child) => {
|
|
228
|
+
child.stdout.write(event('run.output.delta', { text: `${long}.` }));
|
|
229
|
+
child.stdout.write(event('task.lifecycle.proposed', { event: { kind: 'proposed', task_id: 't', task_kind: 'tool.bash' } }));
|
|
230
|
+
child.emit('close', 1);
|
|
231
|
+
});
|
|
232
|
+
assert.equal(result.lastOutput?.length, 403);
|
|
233
|
+
assert.ok(result.lastOutput?.startsWith('aaaa'));
|
|
234
|
+
assert.ok(result.lastOutput?.endsWith('...'));
|
|
235
|
+
assert.equal(result.errorMessage, result.lastOutput);
|
|
236
|
+
});
|
|
237
|
+
//# sourceMappingURL=muse-code.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muse-code.test.js","sourceRoot":"","sources":["../../src/runners/muse-code.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAG1E,MAAM,OAAO,GAAkB;IAC7B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,qBAAqB;IAC7B,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,OAAO;IACtB,UAAU,EAAE,WAAW;CACxB,CAAC;AACF,MAAM,KAAK,GAAG,CAAC,YAAoB,EAAE,OAAe,EAAE,EAAE,CACtD,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;AAEtE,IAAI,CAAC,gGAAgG,EAAE,GAAG,EAAE;IAC1G,MAAM,IAAI,GAAG,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,MAAM,CAA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