@kody-ade/kody-engine 0.4.62 → 0.4.64

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 +33 -2
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -315,7 +315,7 @@ var init_verifyMcp = __esm({
315
315
  // package.json
316
316
  var package_default = {
317
317
  name: "@kody-ade/kody-engine",
318
- version: "0.4.62",
318
+ version: "0.4.64",
319
319
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
320
320
  license: "MIT",
321
321
  type: "module",
@@ -5828,6 +5828,23 @@ var finalizeGoal = async (ctx) => {
5828
5828
  );
5829
5829
  if (!closed.ok) {
5830
5830
  process.stderr.write(`[goal-tick] finalizeGoal: closePr #${pr.number} failed: ${closed.error}
5831
+ `);
5832
+ }
5833
+ }
5834
+ const openIssues = (goal.childTasks ?? []).filter((t) => t.state === "OPEN");
5835
+ for (const t of openIssues) {
5836
+ process.stdout.write(`[goal-tick] closing task issue #${t.number} (goal finalized)
5837
+ `);
5838
+ const closed = closeIssue(
5839
+ t.number,
5840
+ {
5841
+ comment: `_Goal \`${goal.id}\` finalized \u2014 leaf PR #${leaf.number} squash-merged to \`${goal.defaultBranch}\` carries this task's changes._`,
5842
+ reason: "completed"
5843
+ },
5844
+ ctx.cwd
5845
+ );
5846
+ if (!closed.ok) {
5847
+ process.stderr.write(`[goal-tick] finalizeGoal: closeIssue #${t.number} failed: ${closed.error}
5831
5848
  `);
5832
5849
  }
5833
5850
  }
@@ -6644,6 +6661,7 @@ Nothing to do. All files already present. (Use --force to overwrite.)
6644
6661
 
6645
6662
  // src/scripts/loadConventions.ts
6646
6663
  var loadConventions = async (ctx) => {
6664
+ if (Array.isArray(ctx.data.conventions)) return;
6647
6665
  const conventions = loadProjectConventions(ctx.cwd);
6648
6666
  ctx.data.conventions = conventions;
6649
6667
  if (conventions.length > 0) {
@@ -6654,6 +6672,7 @@ var loadConventions = async (ctx) => {
6654
6672
 
6655
6673
  // src/scripts/loadCoverageRules.ts
6656
6674
  var loadCoverageRules = async (ctx) => {
6675
+ if (Array.isArray(ctx.data.coverageRules)) return;
6657
6676
  ctx.data.coverageRules = ctx.config.testRequirements ?? [];
6658
6677
  };
6659
6678
 
@@ -6779,6 +6798,12 @@ var loadIssueContext = async (ctx) => {
6779
6798
  if (typeof issueNumber !== "number" || issueNumber <= 0) {
6780
6799
  throw new Error("loadIssueContext: ctx.args.issue (positive integer) is required");
6781
6800
  }
6801
+ const preloaded = ctx.data.issue;
6802
+ if (preloaded && typeof preloaded === "object" && preloaded.number === issueNumber) {
6803
+ if (!ctx.data.commentTargetType) ctx.data.commentTargetType = "issue";
6804
+ if (!ctx.data.commentTargetNumber) ctx.data.commentTargetNumber = issueNumber;
6805
+ return;
6806
+ }
6782
6807
  const issue = getIssue(issueNumber, ctx.cwd);
6783
6808
  const cfgCtx = ctx.config.issueContext ?? {};
6784
6809
  const limit = cfgCtx.commentLimit ?? DEFAULT_COMMENT_LIMIT;
@@ -6874,6 +6899,7 @@ var PER_PAGE_MAX_BYTES = 4e3;
6874
6899
  var TOTAL_MAX_BYTES = 24e3;
6875
6900
  var TRUNCATED_SUFFIX = "\n\n\u2026 (truncated)";
6876
6901
  var loadMemoryContext = async (ctx) => {
6902
+ if (typeof ctx.data.memoryContext === "string") return;
6877
6903
  const memoryAbs = path26.join(ctx.cwd, MEMORY_DIR_RELATIVE);
6878
6904
  if (!fs27.existsSync(memoryAbs)) {
6879
6905
  ctx.data.memoryContext = "";
@@ -7009,6 +7035,7 @@ var PER_PR_DIFF_MAX_BYTES = 8e3;
7009
7035
  var TOTAL_MAX_BYTES2 = 3e4;
7010
7036
  var TRUNCATED_SUFFIX2 = "\n\n\u2026 (truncated)";
7011
7037
  var loadPriorArt = async (ctx, _profile, args) => {
7038
+ if (typeof ctx.data.priorArt === "string") return;
7012
7039
  const artifactName = typeof args?.artifactName === "string" ? args.artifactName : "priorArt";
7013
7040
  const state = ctx.data.taskState;
7014
7041
  const artifact = state?.artifacts?.[artifactName];
@@ -9573,7 +9600,11 @@ async function runExecutable(profileName, input) {
9573
9600
  config,
9574
9601
  verbose: input.verbose,
9575
9602
  quiet: input.quiet,
9576
- data: {},
9603
+ // Phase 5 foundation: seed ctx.data with any preloaded values handed
9604
+ // in by a parent (typically a container loop). Loaders that see
9605
+ // their field already populated take the fast path and skip the
9606
+ // re-fetch. Always-on; preloadedData defaults to {} when unset.
9607
+ data: { ...input.preloadedData ?? {} },
9577
9608
  output: { exitCode: 0 }
9578
9609
  };
9579
9610
  const ndjsonDir = path29.join(input.cwd, ".kody");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.62",
3
+ "version": "0.4.64",
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",