@a5c-ai/babysitter-sdk 0.0.170-staging.a45f4f48 → 0.0.170-staging.a80bb01b
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeCode.d.ts","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0BH,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"claudeCode.d.ts","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0BH,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,SAAS,CAAC;AA8xBjB,wBAAgB,uBAAuB,IAAI,cAAc,CA4DxD"}
|
|
@@ -351,9 +351,26 @@ async function handleStopHookImpl(args) {
|
|
|
351
351
|
let entrypointImportPath;
|
|
352
352
|
if (runId) {
|
|
353
353
|
try {
|
|
354
|
-
|
|
354
|
+
let runDir = path.isAbsolute(runId)
|
|
355
355
|
? runId
|
|
356
356
|
: path.join(runsDir, runId);
|
|
357
|
+
// Fallback: if run.json not found at primary path, search common
|
|
358
|
+
// alternative locations (e.g. nested .a5c/.a5c/runs/ created when
|
|
359
|
+
// babysit skill installs SDK in .a5c/ and runs commands from there).
|
|
360
|
+
if (!(0, node_fs_1.existsSync)(path.join(runDir, "run.json")) && !path.isAbsolute(runId)) {
|
|
361
|
+
const alternatives = [
|
|
362
|
+
path.join(".a5c", ".a5c", "runs", runId),
|
|
363
|
+
path.join(".a5c", "runs", runId),
|
|
364
|
+
];
|
|
365
|
+
for (const alt of alternatives) {
|
|
366
|
+
const resolved = path.resolve(alt);
|
|
367
|
+
if (resolved !== path.resolve(runDir) && (0, node_fs_1.existsSync)(path.join(resolved, "run.json"))) {
|
|
368
|
+
log.info(`Run not found at ${runDir}, using fallback: ${resolved}`);
|
|
369
|
+
runDir = resolved;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
357
374
|
const metadata = await (0, runFiles_1.readRunMetadata)(runDir);
|
|
358
375
|
entrypointImportPath = metadata?.entrypoint?.importPath;
|
|
359
376
|
const journal = await (0, journal_1.loadJournal)(runDir);
|
package/package.json
CHANGED