@tenux/cli 0.0.8 → 0.0.9
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.
|
@@ -207,6 +207,8 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
207
207
|
const args = [
|
|
208
208
|
"--print",
|
|
209
209
|
// non-interactive
|
|
210
|
+
"--verbose",
|
|
211
|
+
// required for stream-json with --print
|
|
210
212
|
"--output-format",
|
|
211
213
|
"stream-json"
|
|
212
214
|
// structured streaming output
|
|
@@ -219,7 +221,7 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
219
221
|
const proc = spawn(claudeBin, args, {
|
|
220
222
|
cwd,
|
|
221
223
|
shell: isWindows,
|
|
222
|
-
stdio: ["
|
|
224
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
223
225
|
// env is omitted — Node inherits parent process.env automatically.
|
|
224
226
|
// Spreading env on Windows can lose system variables and cause ENOENT.
|
|
225
227
|
});
|
|
@@ -265,12 +267,15 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
265
267
|
}
|
|
266
268
|
}
|
|
267
269
|
});
|
|
270
|
+
let stderrText = "";
|
|
268
271
|
proc.stderr.on("data", (chunk) => {
|
|
272
|
+
const text = chunk.toString();
|
|
273
|
+
stderrText += text;
|
|
269
274
|
batch.push({
|
|
270
275
|
command_id: command.id,
|
|
271
276
|
seq: seq++,
|
|
272
277
|
type: "stderr",
|
|
273
|
-
data: { text
|
|
278
|
+
data: { text }
|
|
274
279
|
});
|
|
275
280
|
});
|
|
276
281
|
return new Promise((promiseResolve, reject) => {
|
|
@@ -295,7 +300,8 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
295
300
|
status: exitCode === 0 ? "done" : "error",
|
|
296
301
|
result: {
|
|
297
302
|
exit_code: exitCode,
|
|
298
|
-
...capturedSessionId ? { session_id: capturedSessionId } : {}
|
|
303
|
+
...capturedSessionId ? { session_id: capturedSessionId } : {},
|
|
304
|
+
...exitCode !== 0 && stderrText ? { error: stderrText.trim().slice(0, 500) } : {}
|
|
299
305
|
},
|
|
300
306
|
completed_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
301
307
|
}).eq("id", command.id);
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED