@kody-ade/kody-engine 0.4.127 → 0.4.128

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 +23 -3
  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.127",
883
+ version: "0.4.128",
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",
@@ -8573,6 +8573,24 @@ function readKodyVariables(cwd) {
8573
8573
 
8574
8574
  // src/scripts/loadQaContext.ts
8575
8575
  var PROFILE_DIR_REL_PATH = ".kody/profile";
8576
+ var FRONTMATTER_RE2 = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
8577
+ function readProfileAudience(raw) {
8578
+ const m = FRONTMATTER_RE2.exec(raw);
8579
+ if (!m) return { audience: ["chat"], body: raw };
8580
+ const body = raw.slice(m[0].length);
8581
+ for (const line of (m[1] ?? "").split(/\r?\n/)) {
8582
+ const t = line.trim();
8583
+ const c = t.indexOf(":");
8584
+ if (c < 0) continue;
8585
+ if (t.slice(0, c).trim() === "audience") {
8586
+ const v = t.slice(c + 1).trim();
8587
+ const inner = v.startsWith("[") && v.endsWith("]") ? v.slice(1, -1) : v;
8588
+ const audience = inner.split(",").map((s) => s.trim().replace(/^["']|["']$/g, "").toLowerCase()).filter(Boolean);
8589
+ return { audience: audience.length > 0 ? audience : ["chat"], body };
8590
+ }
8591
+ }
8592
+ return { audience: ["chat"], body };
8593
+ }
8576
8594
  function readProfile(cwd) {
8577
8595
  const dir = path33.join(cwd, PROFILE_DIR_REL_PATH);
8578
8596
  if (!fs34.existsSync(dir)) return "";
@@ -8585,10 +8603,12 @@ function readProfile(cwd) {
8585
8603
  const blocks = [];
8586
8604
  for (const file of entries) {
8587
8605
  try {
8588
- const content = fs34.readFileSync(path33.join(dir, file), "utf-8");
8606
+ const raw = fs34.readFileSync(path33.join(dir, file), "utf-8");
8607
+ const { audience, body } = readProfileAudience(raw);
8608
+ if (!audience.includes("qa")) continue;
8589
8609
  blocks.push(`## ${file}
8590
8610
 
8591
- ${content}`);
8611
+ ${body.trim()}`);
8592
8612
  } catch {
8593
8613
  }
8594
8614
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.127",
3
+ "version": "0.4.128",
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",