@ai-setting/roy-task-plugin 0.4.1 → 0.4.2
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/cli.js +8 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1409,22 +1409,27 @@ function makeClaudeRunner(opts = {}) {
|
|
|
1409
1409
|
return { ...effective, error: `claude timed out after ${timeoutMs}ms` };
|
|
1410
1410
|
}
|
|
1411
1411
|
if (effective.error) {
|
|
1412
|
-
if (input.sessionId &&
|
|
1412
|
+
if (input.sessionId && STALE_SESSION_RE.test(effective.error)) {
|
|
1413
1413
|
sessions.delete(input.sessionId);
|
|
1414
1414
|
}
|
|
1415
1415
|
return effective;
|
|
1416
1416
|
}
|
|
1417
1417
|
if (code !== 0 && !effective.text) {
|
|
1418
|
+
const error = `claude exited ${code}: ${(stderr || "no stderr").trim().slice(0, 1000)}`;
|
|
1419
|
+
if (input.sessionId && STALE_SESSION_RE.test(error)) {
|
|
1420
|
+
sessions.delete(input.sessionId);
|
|
1421
|
+
}
|
|
1418
1422
|
return {
|
|
1419
1423
|
text: "",
|
|
1420
1424
|
toolCalls: effective.toolCalls,
|
|
1421
1425
|
tools: effective.tools,
|
|
1422
|
-
error
|
|
1426
|
+
error
|
|
1423
1427
|
};
|
|
1424
1428
|
}
|
|
1425
1429
|
return effective;
|
|
1426
1430
|
};
|
|
1427
1431
|
}
|
|
1432
|
+
var STALE_SESSION_RE = /No conversation found|not a UUID|session title/i;
|
|
1428
1433
|
function errMsg(err) {
|
|
1429
1434
|
if (err instanceof Error)
|
|
1430
1435
|
return err.message;
|
|
@@ -1870,7 +1875,7 @@ function formatStatus(report) {
|
|
|
1870
1875
|
}
|
|
1871
1876
|
|
|
1872
1877
|
// ../../../packages/cli/src/main.ts
|
|
1873
|
-
var VERSION = "0.4.
|
|
1878
|
+
var VERSION = "0.4.2";
|
|
1874
1879
|
async function main(argv) {
|
|
1875
1880
|
const parsed = parseArgs(argv);
|
|
1876
1881
|
switch (parsed.command) {
|