@kody-ade/kody-engine 0.4.533 → 0.4.535
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
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.535",
|
|
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",
|
|
@@ -2638,6 +2638,16 @@ function createKodyApiBackendClient(env = process.env) {
|
|
|
2638
2638
|
mutation: (fn, args) => callKodyApi("mutation", fn, args, env)
|
|
2639
2639
|
};
|
|
2640
2640
|
}
|
|
2641
|
+
async function notifyWorkflowCompleted(notification, env = process.env) {
|
|
2642
|
+
const token = await githubOidcToken(env);
|
|
2643
|
+
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/workflow-completed`, {
|
|
2644
|
+
method: "POST",
|
|
2645
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
2646
|
+
body: JSON.stringify(notification),
|
|
2647
|
+
signal: AbortSignal.timeout(3e4)
|
|
2648
|
+
});
|
|
2649
|
+
if (!response.ok) throw new Error(`Kody workflow completion request failed (${response.status})`);
|
|
2650
|
+
}
|
|
2641
2651
|
async function readRuntimeSecretFromKody(name, env = process.env) {
|
|
2642
2652
|
const token = await githubOidcToken(env);
|
|
2643
2653
|
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/secret`, {
|
|
@@ -22554,6 +22564,17 @@ async function runJob(job, base) {
|
|
|
22554
22564
|
if (valid.workflowRunId && workflowIdentity && base.config && result.workflowState) {
|
|
22555
22565
|
await writeWorkflowRunState(base.config, base.cwd, workflowIdentity, valid.workflowRunId, result.workflowState);
|
|
22556
22566
|
}
|
|
22567
|
+
if (valid.workflowRunId && workflowIdentity && hasGitHubActionsIdentity()) {
|
|
22568
|
+
const facts = result.workflowState?.facts ?? {};
|
|
22569
|
+
const pr = typeof facts.pr === "number" ? facts.pr : typeof valid.cliArgs.pr === "number" ? valid.cliArgs.pr : void 0;
|
|
22570
|
+
const headSha = typeof facts.headSha === "string" ? facts.headSha : typeof valid.cliArgs.headSha === "string" ? valid.cliArgs.headSha : void 0;
|
|
22571
|
+
await notifyWorkflowCompleted({
|
|
22572
|
+
workflowId: workflowIdentity,
|
|
22573
|
+
runId: valid.workflowRunId,
|
|
22574
|
+
status: result.exitCode === 0 ? "success" : "failed",
|
|
22575
|
+
...pr !== void 0 || headSha !== void 0 ? { output: { ...pr !== void 0 ? { pr } : {}, ...headSha ? { headSha } : {} } } : {}
|
|
22576
|
+
});
|
|
22577
|
+
}
|
|
22557
22578
|
return result;
|
|
22558
22579
|
}
|
|
22559
22580
|
if (!profileName) {
|
|
@@ -23163,6 +23184,8 @@ function workflowIssueNumber(parent) {
|
|
|
23163
23184
|
}
|
|
23164
23185
|
function workflowPrNumber(data) {
|
|
23165
23186
|
if (typeof data.workflowPrNumber === "number" && Number.isFinite(data.workflowPrNumber)) return data.workflowPrNumber;
|
|
23187
|
+
const workflowContext = data.workflowContext && typeof data.workflowContext === "object" && !Array.isArray(data.workflowContext) ? data.workflowContext : void 0;
|
|
23188
|
+
if (typeof workflowContext?.pr === "number" && Number.isFinite(workflowContext.pr)) return workflowContext.pr;
|
|
23166
23189
|
const prUrl = typeof data.workflowPrUrl === "string" ? data.workflowPrUrl : typeof data.taskState?.core?.prUrl === "string" ? data.taskState.core.prUrl : void 0;
|
|
23167
23190
|
return parsePrNumber5(prUrl) ?? void 0;
|
|
23168
23191
|
}
|
|
@@ -23237,6 +23260,7 @@ var init_job = __esm({
|
|
|
23237
23260
|
init_registry();
|
|
23238
23261
|
init_runIndex();
|
|
23239
23262
|
init_publishReport();
|
|
23263
|
+
init_kody_api_client();
|
|
23240
23264
|
init_simpleCapabilityRuntime();
|
|
23241
23265
|
init_state_backend();
|
|
23242
23266
|
init_workflowDefinitions();
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "kody
|
|
3
|
+
"version": "0.4.535",
|
|
4
|
+
"description": "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -12,6 +12,29 @@
|
|
|
12
12
|
"templates",
|
|
13
13
|
"kody.config.schema.json"
|
|
14
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"kody:run": "tsx bin/kody.ts",
|
|
17
|
+
"serve": "tsx bin/kody.ts serve",
|
|
18
|
+
"serve:vscode": "tsx bin/kody.ts serve vscode",
|
|
19
|
+
"serve:claude": "tsx bin/kody.ts serve claude",
|
|
20
|
+
"clean:dist": "node scripts/clean-dist.cjs",
|
|
21
|
+
"build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
|
|
22
|
+
"check:modularity": "tsx scripts/check-script-modularity.ts",
|
|
23
|
+
"pretest": "pnpm check:modularity",
|
|
24
|
+
"test": "vitest run tests/unit tests/int --coverage",
|
|
25
|
+
"posttest": "tsx scripts/check-coverage-floor.ts",
|
|
26
|
+
"test:smoke": "vitest run tests/smoke --no-coverage",
|
|
27
|
+
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
28
|
+
"test:runtime-services": "node --test \"tests/runtime-services/*.test.mjs\"",
|
|
29
|
+
"test:all": "vitest run tests --no-coverage",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"lint": "biome check",
|
|
32
|
+
"lint:fix": "biome check --write",
|
|
33
|
+
"format": "biome format --write",
|
|
34
|
+
"verify:package": "node scripts/verify-package-tarball.cjs",
|
|
35
|
+
"brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain --build-arg KODY_ENGINE_REF=$(git rev-parse HEAD) -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner",
|
|
36
|
+
"prepublishOnly": "pnpm typecheck && pnpm test:runtime-services && pnpm build && pnpm verify:package"
|
|
37
|
+
},
|
|
15
38
|
"dependencies": {
|
|
16
39
|
"@actions/cache": "^6.0.0",
|
|
17
40
|
"@anthropic-ai/claude-agent-sdk": "0.2.119",
|
|
@@ -38,27 +61,5 @@
|
|
|
38
61
|
"url": "git+https://github.com/aharonyaircohen/kody-engine.git"
|
|
39
62
|
},
|
|
40
63
|
"homepage": "https://github.com/aharonyaircohen/kody-engine",
|
|
41
|
-
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
42
|
-
|
|
43
|
-
"kody:run": "tsx bin/kody.ts",
|
|
44
|
-
"serve": "tsx bin/kody.ts serve",
|
|
45
|
-
"serve:vscode": "tsx bin/kody.ts serve vscode",
|
|
46
|
-
"serve:claude": "tsx bin/kody.ts serve claude",
|
|
47
|
-
"clean:dist": "node scripts/clean-dist.cjs",
|
|
48
|
-
"build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
|
|
49
|
-
"check:modularity": "tsx scripts/check-script-modularity.ts",
|
|
50
|
-
"pretest": "pnpm check:modularity",
|
|
51
|
-
"test": "vitest run tests/unit tests/int --coverage",
|
|
52
|
-
"posttest": "tsx scripts/check-coverage-floor.ts",
|
|
53
|
-
"test:smoke": "vitest run tests/smoke --no-coverage",
|
|
54
|
-
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
55
|
-
"test:runtime-services": "node --test \"tests/runtime-services/*.test.mjs\"",
|
|
56
|
-
"test:all": "vitest run tests --no-coverage",
|
|
57
|
-
"typecheck": "tsc --noEmit",
|
|
58
|
-
"lint": "biome check",
|
|
59
|
-
"lint:fix": "biome check --write",
|
|
60
|
-
"format": "biome format --write",
|
|
61
|
-
"verify:package": "node scripts/verify-package-tarball.cjs",
|
|
62
|
-
"brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain --build-arg KODY_ENGINE_REF=$(git rev-parse HEAD) -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
64
|
+
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
65
|
+
}
|