@kody-ade/kody-engine 0.4.481 → 0.4.483
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 +35 -23
- package/kody.config.schema.json +0 -20
- 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.
|
|
18
|
+
version: "0.4.483",
|
|
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",
|
|
@@ -451,13 +451,9 @@ function parseReleaseConfig(raw) {
|
|
|
451
451
|
const version = recordValue(r.version);
|
|
452
452
|
const readCommand = typeof version?.readCommand === "string" ? version.readCommand.trim() : "";
|
|
453
453
|
const writeCommand = typeof version?.writeCommand === "string" ? version.writeCommand.trim() : "";
|
|
454
|
-
const files = Array.isArray(version?.files) ? version.files.filter(
|
|
455
|
-
(file) => typeof file === "string" && file.trim().length > 0
|
|
456
|
-
).map((file) => file.trim()) : [];
|
|
454
|
+
const files = Array.isArray(version?.files) ? version.files.filter((file) => typeof file === "string" && file.trim().length > 0).map((file) => file.trim()) : [];
|
|
457
455
|
if (!readCommand || !writeCommand || files.length === 0) {
|
|
458
|
-
throw new Error(
|
|
459
|
-
"kody.config.json: release.version requires readCommand, writeCommand, and files"
|
|
460
|
-
);
|
|
456
|
+
throw new Error("kody.config.json: release.version requires readCommand, writeCommand, and files");
|
|
461
457
|
}
|
|
462
458
|
out.version = { readCommand, writeCommand, files: [...new Set(files)] };
|
|
463
459
|
}
|
|
@@ -471,26 +467,20 @@ function parseReleaseConfig(raw) {
|
|
|
471
467
|
if (typeof r.allowAdminMerge === "boolean") out.allowAdminMerge = r.allowAdminMerge;
|
|
472
468
|
if (typeof r.releaseBranch === "string") out.releaseBranch = r.releaseBranch;
|
|
473
469
|
if (typeof r.timeoutMs === "number" && r.timeoutMs > 0) out.timeoutMs = Math.floor(r.timeoutMs);
|
|
474
|
-
if (typeof r.productionDeployRequired === "boolean")
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
);
|
|
470
|
+
if (typeof r.productionDeployRequired === "boolean") out.productionDeployRequired = r.productionDeployRequired;
|
|
471
|
+
if (r.deployment !== void 0) {
|
|
472
|
+
throw new Error(
|
|
473
|
+
"kody.config.json: release.deployment is workflow-owned and cannot be configured by a consumer repository"
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
out.validation = parseReleaseWorkflowRequest(r.validation);
|
|
482
477
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
483
478
|
}
|
|
484
|
-
function parseReleaseWorkflowRequest(raw
|
|
479
|
+
function parseReleaseWorkflowRequest(raw) {
|
|
485
480
|
if (raw === void 0) return void 0;
|
|
486
481
|
const request = recordValue(raw);
|
|
487
482
|
const workflow = typeof request?.workflow === "string" ? request.workflow.trim() : "";
|
|
488
|
-
if (!workflow)
|
|
489
|
-
if (requiredWhenConfigured) {
|
|
490
|
-
throw new Error(`kody.config.json: release.${field}.workflow is required`);
|
|
491
|
-
}
|
|
492
|
-
return void 0;
|
|
493
|
-
}
|
|
483
|
+
if (!workflow) return void 0;
|
|
494
484
|
const rawInputs = recordValue(request?.inputs);
|
|
495
485
|
const inputs = rawInputs ? Object.fromEntries(
|
|
496
486
|
Object.entries(rawInputs).filter(
|
|
@@ -15576,6 +15566,25 @@ var init_loadQaContext = __esm({
|
|
|
15576
15566
|
// src/scripts/loadSimpleCapability.ts
|
|
15577
15567
|
import * as fs43 from "fs";
|
|
15578
15568
|
import * as path40 from "path";
|
|
15569
|
+
function registerCapabilitySubagents(profile, toolRoot, toolFiles) {
|
|
15570
|
+
const subagentFiles = toolFiles.flatMap((file) => {
|
|
15571
|
+
const match = /^agents\/([a-z][a-z0-9-]{0,63})\.md$/.exec(file);
|
|
15572
|
+
return match ? [{ name: match[1], file }] : [];
|
|
15573
|
+
});
|
|
15574
|
+
if (subagentFiles.length === 0) return;
|
|
15575
|
+
profile.claudeCode.subagents = [
|
|
15576
|
+
.../* @__PURE__ */ new Set([...profile.claudeCode.subagents, ...subagentFiles.map(({ name }) => name)])
|
|
15577
|
+
];
|
|
15578
|
+
profile.subagentTemplates = {
|
|
15579
|
+
...profile.subagentTemplates ?? {},
|
|
15580
|
+
...Object.fromEntries(
|
|
15581
|
+
subagentFiles.map(({ name, file }) => [name, fs43.readFileSync(path40.join(toolRoot, file), "utf-8")])
|
|
15582
|
+
)
|
|
15583
|
+
};
|
|
15584
|
+
if (!profile.claudeCode.tools.includes("Agent")) {
|
|
15585
|
+
profile.claudeCode.tools = [...profile.claudeCode.tools, "Agent"];
|
|
15586
|
+
}
|
|
15587
|
+
}
|
|
15579
15588
|
function parseInput(supplied) {
|
|
15580
15589
|
if (typeof supplied !== "string") return supplied;
|
|
15581
15590
|
try {
|
|
@@ -15631,7 +15640,7 @@ var init_loadSimpleCapability = __esm({
|
|
|
15631
15640
|
init_capabilityFolders();
|
|
15632
15641
|
init_definition_paths();
|
|
15633
15642
|
init_capabilityExecutionEnvironment();
|
|
15634
|
-
loadSimpleCapability = async (ctx) => {
|
|
15643
|
+
loadSimpleCapability = async (ctx, profile) => {
|
|
15635
15644
|
const slug = typeof ctx.args.capability === "string" ? ctx.args.capability.trim() : "";
|
|
15636
15645
|
if (!/^[a-z][a-z0-9-]*$/.test(slug)) {
|
|
15637
15646
|
throw new Error("capability-run requires a valid capability slug");
|
|
@@ -15651,6 +15660,9 @@ var init_loadSimpleCapability = __esm({
|
|
|
15651
15660
|
ctx.data.jobCapability = slug;
|
|
15652
15661
|
ctx.data.capabilityInput = input;
|
|
15653
15662
|
ctx.data.capabilityExecution = capability.contract?.execution ?? "agent";
|
|
15663
|
+
if (ctx.data.capabilityExecution === "agent") {
|
|
15664
|
+
registerCapabilitySubagents(profile, toolRoot, toolFiles);
|
|
15665
|
+
}
|
|
15654
15666
|
if (capability.contract?.execution === "script") {
|
|
15655
15667
|
ctx.data.capabilityScriptPath = path40.join(capability.dir, "tools", "run.sh");
|
|
15656
15668
|
ctx.data.capabilitySecretNames = capability.contract.secrets ?? [];
|
package/kody.config.schema.json
CHANGED
|
@@ -188,26 +188,6 @@
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
|
-
"deployment": {
|
|
192
|
-
"type": "object",
|
|
193
|
-
"additionalProperties": false,
|
|
194
|
-
"required": ["workflow"],
|
|
195
|
-
"properties": {
|
|
196
|
-
"workflow": {
|
|
197
|
-
"type": "string",
|
|
198
|
-
"minLength": 1
|
|
199
|
-
},
|
|
200
|
-
"inputs": {
|
|
201
|
-
"type": "object",
|
|
202
|
-
"propertyNames": {
|
|
203
|
-
"pattern": "^[a-z][a-z0-9_]*$"
|
|
204
|
-
},
|
|
205
|
-
"additionalProperties": {
|
|
206
|
-
"type": ["string", "number", "boolean"]
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
191
|
"timeoutMs": {
|
|
212
192
|
"type": "integer",
|
|
213
193
|
"minimum": 1
|
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.483",
|
|
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",
|