@kody-ade/kody-engine 0.4.136 → 0.4.137

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +20 -1
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -880,7 +880,7 @@ var init_loadPriorArt = __esm({
880
880
  // package.json
881
881
  var package_default = {
882
882
  name: "@kody-ade/kody-engine",
883
- version: "0.4.136",
883
+ version: "0.4.137",
884
884
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
885
885
  license: "MIT",
886
886
  type: "module",
@@ -12326,6 +12326,25 @@ var writeJobStateFile = async (ctx, _profile, agentResult, args) => {
12326
12326
  `);
12327
12327
  if (ctx.output.exitCode === 0) ctx.output.exitCode = 1;
12328
12328
  if (!ctx.output.reason) ctx.output.reason = `next-state parse failed: ${parseError}`;
12329
+ const prior = ctx.data.jobState;
12330
+ if (prior) {
12331
+ const carried = {
12332
+ version: 1,
12333
+ rev: prior.state.rev + 1,
12334
+ cursor: prior.state.cursor,
12335
+ data: {
12336
+ ...prior.state.data,
12337
+ lastFiredAt: (/* @__PURE__ */ new Date()).toISOString(),
12338
+ lastOutcome: "failed",
12339
+ lastDurationMs: agentResult?.durationMs ?? null,
12340
+ lastError: parseError
12341
+ },
12342
+ done: prior.state.done
12343
+ };
12344
+ const jobsDir2 = String(args?.jobsDir ?? ".kody/duties");
12345
+ const backend2 = resolveBackend({ config: ctx.config, cwd: ctx.cwd, jobsDir: jobsDir2 });
12346
+ await backend2.save(prior, carried);
12347
+ }
12329
12348
  return;
12330
12349
  }
12331
12350
  const next = ctx.data.nextJobState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.136",
3
+ "version": "0.4.137",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",