@kody-ade/kody-engine 0.4.572 → 0.4.573
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 +31 -4
- 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.573",
|
|
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",
|
|
@@ -2187,6 +2187,7 @@ function readCapabilityFolder(root, slug) {
|
|
|
2187
2187
|
},
|
|
2188
2188
|
rawProfile: contract ? {
|
|
2189
2189
|
...contract.execution ? { execution: contract.execution } : {},
|
|
2190
|
+
...contract.deliveryPolicy ? { deliveryPolicy: contract.deliveryPolicy } : {},
|
|
2190
2191
|
input: contract.input,
|
|
2191
2192
|
output: contract.output
|
|
2192
2193
|
} : {},
|
|
@@ -2227,13 +2228,20 @@ function parseCapabilityContract(raw) {
|
|
|
2227
2228
|
throw new Error('contract.json requiredSubagents are supported only when execution is "agent"');
|
|
2228
2229
|
}
|
|
2229
2230
|
const unsupported = Object.keys(parsed).filter(
|
|
2230
|
-
(key) => key !== "execution" && key !== "requirements" && key !== "secrets" && key !== "timeoutMs" && key !== "requiredSubagents" && key !== "input" && key !== "output"
|
|
2231
|
+
(key) => key !== "execution" && key !== "deliveryPolicy" && key !== "requirements" && key !== "secrets" && key !== "timeoutMs" && key !== "requiredSubagents" && key !== "input" && key !== "output"
|
|
2231
2232
|
);
|
|
2232
2233
|
if (unsupported.length > 0) {
|
|
2233
2234
|
throw new Error(`contract.json contains unsupported fields: ${unsupported.join(", ")}`);
|
|
2234
2235
|
}
|
|
2236
|
+
if (parsed.deliveryPolicy !== void 0 && parsed.deliveryPolicy !== "checkpoint") {
|
|
2237
|
+
throw new Error('contract.json deliveryPolicy must be "checkpoint"');
|
|
2238
|
+
}
|
|
2239
|
+
if (parsed.deliveryPolicy === "checkpoint" && parsed.execution !== "agent") {
|
|
2240
|
+
throw new Error('contract.json deliveryPolicy "checkpoint" is supported only when execution is "agent"');
|
|
2241
|
+
}
|
|
2235
2242
|
return {
|
|
2236
2243
|
...parsed.execution ? { execution: parsed.execution } : {},
|
|
2244
|
+
...parsed.deliveryPolicy === "checkpoint" ? { deliveryPolicy: "checkpoint" } : {},
|
|
2237
2245
|
...requirements ? { requirements } : {},
|
|
2238
2246
|
...secrets ? { secrets } : {},
|
|
2239
2247
|
...timeoutMs !== void 0 ? { timeoutMs } : {},
|
|
@@ -12186,6 +12194,11 @@ var init_checkCoverageWithRetry = __esm({
|
|
|
12186
12194
|
init_coverage();
|
|
12187
12195
|
init_prompt();
|
|
12188
12196
|
checkCoverageWithRetry = async (ctx) => {
|
|
12197
|
+
if (ctx.data.capabilityDeliveryPolicy === "checkpoint") {
|
|
12198
|
+
ctx.data.verificationDeferred = true;
|
|
12199
|
+
ctx.data.coverageMisses = [];
|
|
12200
|
+
return;
|
|
12201
|
+
}
|
|
12189
12202
|
const reqs = ctx.data.coverageRules ?? [];
|
|
12190
12203
|
if (reqs.length === 0) {
|
|
12191
12204
|
ctx.data.coverageMisses = [];
|
|
@@ -14628,6 +14641,9 @@ function setOutcome(ctx, outcome) {
|
|
|
14628
14641
|
ctx.output.prUrl = outcome.url;
|
|
14629
14642
|
}
|
|
14630
14643
|
}
|
|
14644
|
+
function deliveryCheckpointReason(data) {
|
|
14645
|
+
return data.capabilityDeliveryPolicy === "checkpoint" ? "Repository-wide verification is deferred to pull request CI." : "";
|
|
14646
|
+
}
|
|
14631
14647
|
function computeFailureReason(ctx) {
|
|
14632
14648
|
const expectedTests = collectExpectedTests(ctx.data.coverageMisses);
|
|
14633
14649
|
if (expectedTests.length > 0) return `missing tests: ${expectedTests.join(", ")}`;
|
|
@@ -14697,7 +14713,8 @@ var init_ensurePr = __esm({
|
|
|
14697
14713
|
setOutcome(ctx, { kind: "skipped", reason: "no branch context (ctx.data.branch missing)" });
|
|
14698
14714
|
return;
|
|
14699
14715
|
}
|
|
14700
|
-
const
|
|
14716
|
+
const checkpointReason = deliveryCheckpointReason(ctx.data);
|
|
14717
|
+
const failureReason = computeFailureReason(ctx) || checkpointReason;
|
|
14701
14718
|
const isFailure = failureReason.length > 0;
|
|
14702
14719
|
const changedFiles = ctx.data.changedFiles ?? [];
|
|
14703
14720
|
const issue2 = ctx.data.issue;
|
|
@@ -16295,6 +16312,9 @@ var init_loadSimpleCapability = __esm({
|
|
|
16295
16312
|
ctx.data.jobCapability = slug;
|
|
16296
16313
|
ctx.data.capabilityInput = input;
|
|
16297
16314
|
ctx.data.capabilityExecution = capability.contract?.execution ?? "agent";
|
|
16315
|
+
if (capability.contract?.deliveryPolicy) {
|
|
16316
|
+
ctx.data.capabilityDeliveryPolicy = capability.contract.deliveryPolicy;
|
|
16317
|
+
}
|
|
16298
16318
|
if (capability.contract?.requirements) {
|
|
16299
16319
|
ctx.data.capabilityRequirements = capability.contract.requirements;
|
|
16300
16320
|
}
|
|
@@ -17881,7 +17901,8 @@ var init_postIssueComment = __esm({
|
|
|
17881
17901
|
githubRepo: ctx.config.github?.repo
|
|
17882
17902
|
});
|
|
17883
17903
|
postWith(targetType, targetNumber, msg, ctx.cwd);
|
|
17884
|
-
|
|
17904
|
+
const prIsDraft = (prResult?.kind === "created" || prResult?.kind === "updated") && prResult.draft === true;
|
|
17905
|
+
if (!isFailure && !prIsDraft) {
|
|
17885
17906
|
markPrReadyForReview(ctx, prResult);
|
|
17886
17907
|
}
|
|
17887
17908
|
let exitCode = 0;
|
|
@@ -21006,6 +21027,12 @@ var init_verifyWithRetry = __esm({
|
|
|
21006
21027
|
init_prompt();
|
|
21007
21028
|
init_verify();
|
|
21008
21029
|
verifyWithRetry = async (ctx) => {
|
|
21030
|
+
if (ctx.data.capabilityDeliveryPolicy === "checkpoint") {
|
|
21031
|
+
ctx.data.verificationDeferred = true;
|
|
21032
|
+
delete ctx.data.verifyOk;
|
|
21033
|
+
delete ctx.data.verifyReason;
|
|
21034
|
+
return;
|
|
21035
|
+
}
|
|
21009
21036
|
await runVerify(ctx);
|
|
21010
21037
|
if (ctx.data.verifyOk !== false) return;
|
|
21011
21038
|
if (ctx.abortSignal?.aborted) {
|
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.573",
|
|
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",
|