@kody-ade/kody-engine 0.4.126 → 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.
- package/dist/bin/kody.js +30 -4
- 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.
|
|
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",
|
|
@@ -6478,6 +6478,9 @@ function parseFlatYaml(text) {
|
|
|
6478
6478
|
else if (lower === "false") out.disabled = false;
|
|
6479
6479
|
} else if (key === "staff" && value.length > 0) {
|
|
6480
6480
|
out.staff = value;
|
|
6481
|
+
} else if (key === "mentions") {
|
|
6482
|
+
const logins = value.split(",").map((s) => s.trim().replace(/^@/, "")).filter(Boolean);
|
|
6483
|
+
if (logins.length > 0) out.mentions = logins;
|
|
6481
6484
|
}
|
|
6482
6485
|
}
|
|
6483
6486
|
return out;
|
|
@@ -8485,7 +8488,9 @@ var loadJobFromFile = async (ctx, _profile, args) => {
|
|
|
8485
8488
|
}
|
|
8486
8489
|
const raw = fs31.readFileSync(absPath, "utf-8");
|
|
8487
8490
|
const { title, body } = parseJobFile(raw, slug);
|
|
8488
|
-
const
|
|
8491
|
+
const frontmatter = splitFrontmatter2(raw).frontmatter;
|
|
8492
|
+
const mentions = (frontmatter.mentions ?? []).map((login) => `@${login}`).join(" ");
|
|
8493
|
+
const workerSlug = (frontmatter.staff ?? "").trim();
|
|
8489
8494
|
let workerTitle = "";
|
|
8490
8495
|
let workerPersona = "";
|
|
8491
8496
|
if (workerSlug) {
|
|
@@ -8510,6 +8515,7 @@ var loadJobFromFile = async (ctx, _profile, args) => {
|
|
|
8510
8515
|
ctx.data.workerSlug = workerSlug;
|
|
8511
8516
|
ctx.data.workerTitle = workerTitle;
|
|
8512
8517
|
ctx.data.workerPersona = workerPersona;
|
|
8518
|
+
ctx.data.mentions = mentions;
|
|
8513
8519
|
};
|
|
8514
8520
|
function parseJobFile(raw, slug) {
|
|
8515
8521
|
let stripped = raw;
|
|
@@ -8567,6 +8573,24 @@ function readKodyVariables(cwd) {
|
|
|
8567
8573
|
|
|
8568
8574
|
// src/scripts/loadQaContext.ts
|
|
8569
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
|
+
}
|
|
8570
8594
|
function readProfile(cwd) {
|
|
8571
8595
|
const dir = path33.join(cwd, PROFILE_DIR_REL_PATH);
|
|
8572
8596
|
if (!fs34.existsSync(dir)) return "";
|
|
@@ -8579,10 +8603,12 @@ function readProfile(cwd) {
|
|
|
8579
8603
|
const blocks = [];
|
|
8580
8604
|
for (const file of entries) {
|
|
8581
8605
|
try {
|
|
8582
|
-
const
|
|
8606
|
+
const raw = fs34.readFileSync(path33.join(dir, file), "utf-8");
|
|
8607
|
+
const { audience, body } = readProfileAudience(raw);
|
|
8608
|
+
if (!audience.includes("qa")) continue;
|
|
8583
8609
|
blocks.push(`## ${file}
|
|
8584
8610
|
|
|
8585
|
-
${
|
|
8611
|
+
${body.trim()}`);
|
|
8586
8612
|
} catch {
|
|
8587
8613
|
}
|
|
8588
8614
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
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",
|