@kody-ade/kody-engine 0.4.487 → 0.4.489
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 +20 -3
- 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.489",
|
|
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",
|
|
@@ -2448,6 +2448,16 @@ async function readRuntimeSecretFromKody(name, env = process.env) {
|
|
|
2448
2448
|
const body = await response.json();
|
|
2449
2449
|
return typeof body.value === "string" ? body.value : null;
|
|
2450
2450
|
}
|
|
2451
|
+
async function writeRuntimeSecretToKody(name, value, env = process.env) {
|
|
2452
|
+
const token = await githubOidcToken(env);
|
|
2453
|
+
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/secret`, {
|
|
2454
|
+
method: "PUT",
|
|
2455
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
2456
|
+
body: JSON.stringify({ name, value }),
|
|
2457
|
+
signal: AbortSignal.timeout(3e4)
|
|
2458
|
+
});
|
|
2459
|
+
if (!response.ok) throw new Error(`Kody secret upsert failed (${response.status})`);
|
|
2460
|
+
}
|
|
2451
2461
|
async function readPreviewContextFromKody(env = process.env) {
|
|
2452
2462
|
const token = await githubOidcToken(env);
|
|
2453
2463
|
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/preview-context`, {
|
|
@@ -4316,7 +4326,7 @@ function validateCapabilityContractValue(boundary, schema, value) {
|
|
|
4316
4326
|
}
|
|
4317
4327
|
}
|
|
4318
4328
|
function capabilityContractInput(inputs, args) {
|
|
4319
|
-
const isGenericRunnerInput = inputs.some((input) => input.name === "
|
|
4329
|
+
const isGenericRunnerInput = inputs.some((input) => input.name === "input") && (inputs.length === 1 || inputs.some((input) => input.name === "capability"));
|
|
4320
4330
|
if (!isGenericRunnerInput) return args;
|
|
4321
4331
|
const value = args.input;
|
|
4322
4332
|
if (typeof value !== "string") return value;
|
|
@@ -15443,7 +15453,10 @@ async function resolveRuntimeSecret(name, ctx, opts = {}) {
|
|
|
15443
15453
|
if (hasGitHubActionsIdentity(env)) {
|
|
15444
15454
|
try {
|
|
15445
15455
|
const value = await readRuntimeSecretFromKody(name, env);
|
|
15446
|
-
|
|
15456
|
+
if (value) return { value, source: "vault" };
|
|
15457
|
+
const fallback = envSecret(name, env);
|
|
15458
|
+
if (fallback.value) await writeRuntimeSecretToKody(name, fallback.value, env);
|
|
15459
|
+
return fallback;
|
|
15447
15460
|
} catch (err) {
|
|
15448
15461
|
const fallback = envSecret(name, env);
|
|
15449
15462
|
return {
|
|
@@ -16728,6 +16741,7 @@ var init_parseSimpleCapabilityOutput = __esm({
|
|
|
16728
16741
|
reason: reason2,
|
|
16729
16742
|
summary: reason2
|
|
16730
16743
|
};
|
|
16744
|
+
ctx.output.exitCode = 1;
|
|
16731
16745
|
ctx.output.reason = reason2;
|
|
16732
16746
|
ctx.data.capabilityOutput = blocked;
|
|
16733
16747
|
ctx.data.capabilityResults = [
|
|
@@ -16769,6 +16783,9 @@ var init_parseSimpleCapabilityOutput = __esm({
|
|
|
16769
16783
|
ctx.data.capabilityOutput = output;
|
|
16770
16784
|
const structuredResult = parseCapabilityResult(output);
|
|
16771
16785
|
if (structuredResult) {
|
|
16786
|
+
if ((structuredResult.status === "fail" || structuredResult.status === "blocked") && (ctx.output.exitCode === void 0 || ctx.output.exitCode === 0)) {
|
|
16787
|
+
ctx.output.exitCode = 1;
|
|
16788
|
+
}
|
|
16772
16789
|
ctx.output.reason = structuredResult.summary;
|
|
16773
16790
|
ctx.data.capabilityResults = [structuredResult];
|
|
16774
16791
|
return;
|
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.489",
|
|
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",
|