@bamptee/aia-code 2.0.15 → 2.0.16
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/package.json +1 -1
- package/src/providers/cli-runner.js +1 -11
package/package.json
CHANGED
|
@@ -97,13 +97,6 @@ export function runCli(command, args, { stdin: stdinData, verbose = false, apply
|
|
|
97
97
|
idleTimeoutMs = apply ? AGENT_IDLE_TIMEOUT_MS : DEFAULT_IDLE_TIMEOUT_MS;
|
|
98
98
|
}
|
|
99
99
|
return new Promise((resolve, reject) => {
|
|
100
|
-
// Log the full command for debugging (allows manual replay)
|
|
101
|
-
const shellCmd = [command, ...args].map(a => /[\s"']/.test(a) ? `'${a.replace(/'/g, "'\\''")}'` : a).join(' ');
|
|
102
|
-
console.error(chalk.gray(`[AI] Run: ${shellCmd}`));
|
|
103
|
-
if (stdinData) {
|
|
104
|
-
console.error(chalk.gray(`[AI] stdin: ${stdinData.length > 200 ? stdinData.slice(0, 200) + '...' : stdinData} (${(stdinData.length / 1024).toFixed(1)}KB)`));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
100
|
// Remove CLAUDECODE from env to avoid conflicts
|
|
108
101
|
const { CLAUDECODE: _, ...cleanEnv } = process.env;
|
|
109
102
|
const child = spawn(command, args, {
|
|
@@ -112,8 +105,6 @@ export function runCli(command, args, { stdin: stdinData, verbose = false, apply
|
|
|
112
105
|
cwd,
|
|
113
106
|
});
|
|
114
107
|
|
|
115
|
-
console.error(chalk.gray(`[AI] PID: ${child.pid}`));
|
|
116
|
-
|
|
117
108
|
const chunks = [];
|
|
118
109
|
let stderr = '';
|
|
119
110
|
let settled = false;
|
|
@@ -197,8 +188,7 @@ export function runCli(command, args, { stdin: stdinData, verbose = false, apply
|
|
|
197
188
|
}
|
|
198
189
|
});
|
|
199
190
|
|
|
200
|
-
child.on('close', (code
|
|
201
|
-
console.error(chalk.gray(`[AI] Process exited: code=${code} signal=${signal || 'none'}`));
|
|
191
|
+
child.on('close', (code) => {
|
|
202
192
|
// Process any remaining data in the buffer
|
|
203
193
|
if (streamJson && jsonBuffer.trim()) {
|
|
204
194
|
const { result } = parseStreamJsonEvent(jsonBuffer, onData, parserState);
|