@kody-ade/kody-engine 0.4.448 → 0.4.450

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 -3
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@kody-ade/kody-engine",
18
- version: "0.4.448",
18
+ version: "0.4.450",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -13851,7 +13851,7 @@ function normalizeLoopDefinition(value) {
13851
13851
  }
13852
13852
  function readLoopDefinition(cwd, id) {
13853
13853
  if (!ID.test(id)) return null;
13854
- const roots = [path34.join(cwd, ".kody-engine", "runtime"), definitionsRoot(cwd)];
13854
+ const roots = loopRoots(cwd);
13855
13855
  for (const root of roots) {
13856
13856
  const filePath = path34.join(root, "loops", id, "loop.json");
13857
13857
  if (!fs36.existsSync(filePath)) continue;
@@ -13872,7 +13872,7 @@ function readLoopDefinition(cwd, id) {
13872
13872
  return null;
13873
13873
  }
13874
13874
  function listLoopDefinitions(cwd) {
13875
- const roots = [path34.join(cwd, ".kody-engine", "runtime"), definitionsRoot(cwd)];
13875
+ const roots = loopRoots(cwd);
13876
13876
  const byId = /* @__PURE__ */ new Map();
13877
13877
  for (const root of roots.reverse()) {
13878
13878
  const loopsDir = path34.join(root, "loops");
@@ -13892,6 +13892,13 @@ function listLoopDefinitions(cwd) {
13892
13892
  }
13893
13893
  return [...byId.values()].sort((left, right) => left.id.localeCompare(right.id));
13894
13894
  }
13895
+ function loopRoots(cwd) {
13896
+ return [
13897
+ path34.join(cwd, ".kody-engine", "runtime"),
13898
+ path34.join(cwd, ".kody-engine", "definitions"),
13899
+ definitionsRoot(cwd)
13900
+ ].filter((root, index, roots) => roots.indexOf(root) === index);
13901
+ }
13895
13902
  function normalizeTrigger(raw) {
13896
13903
  if (raw.type === "manual" && Object.keys(raw).length === 1) return { type: "manual" };
13897
13904
  if (raw.type === "schedule" && typeof raw.every === "string" && /^\d+[mhd]$/.test(raw.every)) {
@@ -13984,6 +13991,10 @@ var init_dispatchSimpleLoops = __esm({
13984
13991
  const due = listLoopDefinitions(ctx.cwd).filter(
13985
13992
  (loop) => loop.enabled && loop.trigger.type === "schedule" && (force || dueSlot(loop, now) !== null)
13986
13993
  );
13994
+ process.stdout.write(
13995
+ `\u2192 kody: Loop scheduler found ${due.length} runnable Loop(s)${force ? " (manual)" : ""}
13996
+ `
13997
+ );
13987
13998
  const backend = createStateBackendFromEnv();
13988
13999
  const results = [];
13989
14000
  for (const loop of due) {
@@ -14027,6 +14038,12 @@ var init_dispatchSimpleLoops = __esm({
14027
14038
  await backend.finishAgencyDispatch(tenantId2, idempotencyKey, reservationId, status, (/* @__PURE__ */ new Date()).toISOString());
14028
14039
  results.push({ loopId: loop.id, status, reason: result.reason ?? status });
14029
14040
  }
14041
+ for (const result of results) {
14042
+ process.stdout.write(
14043
+ `\u2192 kody: Loop ${result.loopId} ${result.status}: ${result.reason}
14044
+ `
14045
+ );
14046
+ }
14030
14047
  ctx.data.simpleLoopDispatchResults = results;
14031
14048
  };
14032
14049
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.448",
3
+ "version": "0.4.450",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",