@a5c-ai/babysitter-sdk 0.0.180 → 0.0.181-staging.082bc9c3

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/main.js CHANGED
@@ -644,7 +644,7 @@ function resolveArtifactAbsolutePath(runDir, ref) {
644
644
  });
645
645
  return candidates[0].absolute;
646
646
  }
647
- return path.join(absoluteRunDir, normalized);
647
+ return collapseDoubledA5cRuns(path.join(absoluteRunDir, normalized));
648
648
  }
649
649
  function collectArtifactCandidates(runDir, ref) {
650
650
  const seen = new Map();
@@ -654,7 +654,7 @@ function collectArtifactCandidates(runDir, ref) {
654
654
  const outsideRun = relative.startsWith("..");
655
655
  seen.set(normalizedAbs, { absolute: normalizedAbs, relative, outsideRun });
656
656
  };
657
- pushCandidate(path.join(runDir, ref));
657
+ pushCandidate(collapseDoubledA5cRuns(path.join(runDir, ref)));
658
658
  pushCandidate(path.resolve(ref));
659
659
  return Array.from(seen.values());
660
660
  }
@@ -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;AA8xBjB,wBAAgB,uBAAuB,IAAI,cAAc,CA4DxD"}
1
+ {"version":3,"file":"claudeCode.d.ts","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2BH,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,SAAS,CAAC;AA8xBjB,wBAAgB,uBAAuB,IAAI,cAAc,CA4DxD"}
@@ -52,6 +52,7 @@ const journal_1 = require("../storage/journal");
52
52
  const runFiles_1 = require("../storage/runFiles");
53
53
  const effectIndex_1 = require("../runtime/replay/effectIndex");
54
54
  const completionProof_1 = require("../cli/completionProof");
55
+ const resolveInputPath_1 = require("../cli/resolveInputPath");
55
56
  const skill_1 = require("../cli/commands/skill");
56
57
  const session_1 = require("../session");
57
58
  const session_2 = require("../cli/commands/session");
@@ -210,7 +211,7 @@ async function handleStopHookImpl(args) {
210
211
  }
211
212
  log.info(`Resolved pluginRoot: ${resolvedPluginRoot || "(empty)"}`);
212
213
  log.info(`Resolved stateDir: ${stateDir}`);
213
- const runsDir = args.runsDir || ".a5c/runs";
214
+ const runsDir = (0, resolveInputPath_1.collapseDoubledA5cRuns)(path.resolve(args.runsDir || ".a5c/runs"));
214
215
  // 3. Check iteration — try primary stateDir, then fallback to .a5c/state/
215
216
  let filePath = (0, session_1.getSessionFilePath)(stateDir, sessionId);
216
217
  log.info(`Checking session file at: ${filePath}`);
@@ -2,6 +2,7 @@ export type { HarnessAdapter, SessionBindOptions, SessionBindResult, HookHandler
2
2
  export { createClaudeCodeAdapter } from "./claudeCode";
3
3
  export { createCodexAdapter } from "./codex";
4
4
  export { createGeminiCliAdapter } from "./geminiCli";
5
+ export { createPiAdapter } from "./pi";
5
6
  export { createNullAdapter } from "./nullAdapter";
6
7
  export { detectAdapter, getAdapterByName, listSupportedHarnesses, getAdapter, setAdapter, resetAdapter, } from "./registry";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/harness/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/harness/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAC"}
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resetAdapter = exports.setAdapter = exports.getAdapter = exports.listSupportedHarnesses = exports.getAdapterByName = exports.detectAdapter = exports.createNullAdapter = exports.createGeminiCliAdapter = exports.createCodexAdapter = exports.createClaudeCodeAdapter = void 0;
3
+ exports.resetAdapter = exports.setAdapter = exports.getAdapter = exports.listSupportedHarnesses = exports.getAdapterByName = exports.detectAdapter = exports.createNullAdapter = exports.createPiAdapter = exports.createGeminiCliAdapter = exports.createCodexAdapter = exports.createClaudeCodeAdapter = void 0;
4
4
  var claudeCode_1 = require("./claudeCode");
5
5
  Object.defineProperty(exports, "createClaudeCodeAdapter", { enumerable: true, get: function () { return claudeCode_1.createClaudeCodeAdapter; } });
6
6
  var codex_1 = require("./codex");
7
7
  Object.defineProperty(exports, "createCodexAdapter", { enumerable: true, get: function () { return codex_1.createCodexAdapter; } });
8
8
  var geminiCli_1 = require("./geminiCli");
9
9
  Object.defineProperty(exports, "createGeminiCliAdapter", { enumerable: true, get: function () { return geminiCli_1.createGeminiCliAdapter; } });
10
+ var pi_1 = require("./pi");
11
+ Object.defineProperty(exports, "createPiAdapter", { enumerable: true, get: function () { return pi_1.createPiAdapter; } });
10
12
  var nullAdapter_1 = require("./nullAdapter");
11
13
  Object.defineProperty(exports, "createNullAdapter", { enumerable: true, get: function () { return nullAdapter_1.createNullAdapter; } });
12
14
  var registry_1 = require("./registry");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Oh-My-Pi harness adapter.
3
+ *
4
+ * Extends the SDK harness layer with "pi" support while reusing the
5
+ * mature Claude stop/session-start hook handlers. The Pi adapter maps
6
+ * Oh-My-Pi-specific environment conventions to the generic adapter interface.
7
+ */
8
+ import type { HarnessAdapter } from "./types";
9
+ export declare function createPiAdapter(): HarnessAdapter;
10
+ //# sourceMappingURL=pi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../../src/harness/pi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,SAAS,CAAC;AAmCjB,wBAAgB,eAAe,IAAI,cAAc,CAiFhD"}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ /**
3
+ * Oh-My-Pi harness adapter.
4
+ *
5
+ * Extends the SDK harness layer with "pi" support while reusing the
6
+ * mature Claude stop/session-start hook handlers. The Pi adapter maps
7
+ * Oh-My-Pi-specific environment conventions to the generic adapter interface.
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.createPiAdapter = createPiAdapter;
44
+ const path = __importStar(require("node:path"));
45
+ const node_fs_1 = require("node:fs");
46
+ const claudeCode_1 = require("./claudeCode");
47
+ function resolvePiPluginRoot(args = {}) {
48
+ const root = args.pluginRoot || process.env.OMP_PLUGIN_ROOT || process.env.PI_PLUGIN_ROOT;
49
+ return root ? path.resolve(root) : undefined;
50
+ }
51
+ function resolvePiStateDir(args) {
52
+ if (args.stateDir)
53
+ return path.resolve(args.stateDir);
54
+ if (process.env.BABYSITTER_STATE_DIR) {
55
+ return path.resolve(process.env.BABYSITTER_STATE_DIR);
56
+ }
57
+ const pluginRoot = resolvePiPluginRoot(args);
58
+ if (pluginRoot) {
59
+ // Oh-My-Pi plugins conventionally live under ".omp", while state is in ".a5c".
60
+ return path.resolve(pluginRoot, "..", ".a5c");
61
+ }
62
+ return path.resolve(".a5c");
63
+ }
64
+ function resolvePiSessionId(parsed) {
65
+ if (parsed.sessionId)
66
+ return parsed.sessionId;
67
+ if (process.env.OMP_SESSION_ID)
68
+ return process.env.OMP_SESSION_ID;
69
+ if (process.env.PI_SESSION_ID)
70
+ return process.env.PI_SESSION_ID;
71
+ return undefined;
72
+ }
73
+ function createPiAdapter() {
74
+ const claude = (0, claudeCode_1.createClaudeCodeAdapter)();
75
+ return {
76
+ name: "pi",
77
+ isActive() {
78
+ return !!(process.env.OMP_SESSION_ID ||
79
+ process.env.PI_SESSION_ID ||
80
+ process.env.OMP_PLUGIN_ROOT ||
81
+ process.env.PI_PLUGIN_ROOT);
82
+ },
83
+ resolveSessionId(parsed) {
84
+ return resolvePiSessionId(parsed);
85
+ },
86
+ resolveStateDir(args) {
87
+ return resolvePiStateDir(args);
88
+ },
89
+ resolvePluginRoot(args) {
90
+ return resolvePiPluginRoot(args);
91
+ },
92
+ async bindSession(opts) {
93
+ const stateDir = resolvePiStateDir({
94
+ stateDir: opts.stateDir,
95
+ pluginRoot: opts.pluginRoot,
96
+ });
97
+ const result = await claude.bindSession({
98
+ ...opts,
99
+ stateDir,
100
+ });
101
+ return { ...result, harness: "pi" };
102
+ },
103
+ handleStopHook(args) {
104
+ const pluginRoot = resolvePiPluginRoot(args);
105
+ const stateDir = resolvePiStateDir({
106
+ stateDir: args.stateDir,
107
+ pluginRoot,
108
+ });
109
+ return claude.handleStopHook({
110
+ ...args,
111
+ pluginRoot,
112
+ stateDir,
113
+ });
114
+ },
115
+ handleSessionStartHook(args) {
116
+ const pluginRoot = resolvePiPluginRoot(args);
117
+ const stateDir = resolvePiStateDir({
118
+ stateDir: args.stateDir,
119
+ pluginRoot,
120
+ });
121
+ return claude.handleSessionStartHook({
122
+ ...args,
123
+ pluginRoot,
124
+ stateDir,
125
+ });
126
+ },
127
+ findHookDispatcherPath(startCwd) {
128
+ const pluginRoot = resolvePiPluginRoot();
129
+ if (pluginRoot) {
130
+ const candidate = path.join(pluginRoot, "hooks", "hook-dispatcher.sh");
131
+ if ((0, node_fs_1.existsSync)(candidate))
132
+ return candidate;
133
+ }
134
+ const local = path.join(path.resolve(startCwd), ".omp", "hooks", "hook-dispatcher.sh");
135
+ if ((0, node_fs_1.existsSync)(local))
136
+ return local;
137
+ return null;
138
+ },
139
+ };
140
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAoB9C;;;GAGG;AACH,wBAAgB,aAAa,IAAI,cAAc,CAK9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAKpE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAQD;;GAEG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAK3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAExD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAsB9C;;;GAGG;AACH,wBAAgB,aAAa,IAAI,cAAc,CAK9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAKpE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAQD;;GAEG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAK3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAExD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -16,12 +16,14 @@ exports.resetAdapter = resetAdapter;
16
16
  const claudeCode_1 = require("./claudeCode");
17
17
  const codex_1 = require("./codex");
18
18
  const geminiCli_1 = require("./geminiCli");
19
+ const pi_1 = require("./pi");
19
20
  const nullAdapter_1 = require("./nullAdapter");
20
21
  // ---------------------------------------------------------------------------
21
22
  // Registry of known adapters (ordered by priority)
22
23
  // ---------------------------------------------------------------------------
23
24
  const knownAdapters = [
24
25
  (0, codex_1.createCodexAdapter)(),
26
+ (0, pi_1.createPiAdapter)(),
25
27
  (0, claudeCode_1.createClaudeCodeAdapter)(),
26
28
  (0, geminiCli_1.createGeminiCliAdapter)(),
27
29
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/runtime/intrinsics/task.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,WAAW,EAIX,aAAa,EAGb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAMlB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B,CAAC,KAAK,EAAE,OAAO;IACxD,IAAI,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,EAAE,KAAK,CAAC;IACZ,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EACnD,OAAO,EAAE,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,GAClD,OAAO,CAAC,OAAO,CAAC,CAmBlB"}
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/runtime/intrinsics/task.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,WAAW,EAIX,aAAa,EAGb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAOlB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B,CAAC,KAAK,EAAE,OAAO;IACxD,IAAI,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,EAAE,KAAK,CAAC;IACZ,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EACnD,OAAO,EAAE,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,GAClD,OAAO,CAAC,OAAO,CAAC,CAmBlB"}
@@ -13,6 +13,7 @@ const exceptions_1 = require("../exceptions");
13
13
  const invocation_1 = require("../invocation");
14
14
  const instrumentation_1 = require("../instrumentation");
15
15
  const context_1 = require("../../tasks/context");
16
+ const resolveInputPath_1 = require("../../cli/resolveInputPath");
16
17
  const registry_1 = require("../../tasks/registry");
17
18
  const serializer_1 = require("../../tasks/serializer");
18
19
  async function runTaskIntrinsic(options) {
@@ -191,7 +192,7 @@ function extractSleepTarget(taskDef) {
191
192
  return typeof metadataTarget === "number" ? metadataTarget : undefined;
192
193
  }
193
194
  function normalizeRef(runDir, ref) {
194
- return path_1.default.isAbsolute(ref) ? ref : path_1.default.join(runDir, ref);
195
+ return path_1.default.isAbsolute(ref) ? ref : (0, resolveInputPath_1.collapseDoubledA5cRuns)(path_1.default.join(runDir, ref));
195
196
  }
196
197
  async function resolveStoredResultValue(runDir, stored) {
197
198
  if (stored.result !== undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"effectIndex.d.ts","sourceRoot":"","sources":["../../../src/runtime/replay/effectIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAuC,MAAM,UAAU,CAAC;AAG7E,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CACzB;AA0BD,qBAAa,WAAW;IAMF,OAAO,CAAC,QAAQ,CAAC,MAAM;IAL3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmC;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,WAAW,CAAC,CAAgC;IACpD,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO;WAEM,KAAK,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1E,OAAO,CAAC,WAAW;IAOnB,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,MAAM;IAqBpD,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIhE,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIzD,WAAW,IAAI,YAAY,EAAE;IAI7B,kBAAkB,IAAI,YAAY,EAAE;IAIpC,cAAc;aAzDe,MAAM;cAAQ,MAAM;;IA6DjD,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,qBAAqB;IAmC7B,OAAO,CAAC,oBAAoB;IAoC5B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,mBAAmB;CAkB5B;AA2BD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,CAE7F"}
1
+ {"version":3,"file":"effectIndex.d.ts","sourceRoot":"","sources":["../../../src/runtime/replay/effectIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAuC,MAAM,UAAU,CAAC;AAI7E,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CACzB;AA0BD,qBAAa,WAAW;IAMF,OAAO,CAAC,QAAQ,CAAC,MAAM;IAL3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmC;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,WAAW,CAAC,CAAgC;IACpD,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO;WAEM,KAAK,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1E,OAAO,CAAC,WAAW;IAOnB,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,MAAM;IAqBpD,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIhE,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIzD,WAAW,IAAI,YAAY,EAAE;IAI7B,kBAAkB,IAAI,YAAY,EAAE;IAIpC,cAAc;aAzDe,MAAM;cAAQ,MAAM;;IA6DjD,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,qBAAqB;IAmC7B,OAAO,CAAC,oBAAoB;IAoC5B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,mBAAmB;CAkB5B;AA2BD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,CAE7F"}
@@ -5,6 +5,7 @@ exports.buildEffectIndex = buildEffectIndex;
5
5
  const journal_1 = require("../../storage/journal");
6
6
  const exceptions_1 = require("../exceptions");
7
7
  const errorUtils_1 = require("../errorUtils");
8
+ const resolveInputPath_1 = require("../../cli/resolveInputPath");
8
9
  class EffectIndex {
9
10
  runDir;
10
11
  byInvocation = new Map();
@@ -158,10 +159,10 @@ class EffectIndex {
158
159
  }
159
160
  const status = payload.status === "ok" ? "resolved_ok" : "resolved_error";
160
161
  record.status = status;
161
- record.resultRef = payload.resultRef;
162
+ record.resultRef = payload.resultRef ? (0, resolveInputPath_1.collapseDoubledA5cRuns)(payload.resultRef) : payload.resultRef;
162
163
  record.error = payload.error;
163
- record.stdoutRef = payload.stdoutRef;
164
- record.stderrRef = payload.stderrRef;
164
+ record.stdoutRef = payload.stdoutRef ? (0, resolveInputPath_1.collapseDoubledA5cRuns)(payload.stdoutRef) : payload.stdoutRef;
165
+ record.stderrRef = payload.stderrRef ? (0, resolveInputPath_1.collapseDoubledA5cRuns)(payload.stderrRef) : payload.stderrRef;
165
166
  record.resolvedAt = event.recordedAt;
166
167
  }
167
168
  expectObject(event, type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-sdk",
3
- "version": "0.0.180",
3
+ "version": "0.0.181-staging.082bc9c3",
4
4
  "description": "Storage and run-registry primitives for event-sourced babysitter workflows.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",