@kody-ade/kody-engine 0.4.406 → 0.4.407
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 +19 -12
- package/package.json +24 -25
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.407",
|
|
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",
|
|
@@ -1885,9 +1885,13 @@ var init_capabilityFolders = __esm({
|
|
|
1885
1885
|
import * as fs5 from "fs";
|
|
1886
1886
|
import * as path6 from "path";
|
|
1887
1887
|
function definitionsRoot(cwd = process.cwd()) {
|
|
1888
|
+
const override = process.env.KODY_DEFINITIONS_ROOT?.trim();
|
|
1889
|
+
const overrideCwd = process.env.KODY_DEFINITIONS_ROOT_CWD?.trim();
|
|
1890
|
+
if (override && overrideCwd && path6.resolve(cwd) === path6.resolve(overrideCwd)) {
|
|
1891
|
+
return path6.resolve(override);
|
|
1892
|
+
}
|
|
1888
1893
|
const hydrated = path6.join(cwd, ".kody-engine", "definitions");
|
|
1889
1894
|
if (fs5.existsSync(hydrated)) return hydrated;
|
|
1890
|
-
const override = process.env.KODY_DEFINITIONS_ROOT?.trim();
|
|
1891
1895
|
return override ? path6.resolve(override) : hydrated;
|
|
1892
1896
|
}
|
|
1893
1897
|
function capabilitiesRoot(cwd = process.cwd()) {
|
|
@@ -1939,8 +1943,10 @@ function getBuiltinCapabilitiesRoot() {
|
|
|
1939
1943
|
return candidates[0];
|
|
1940
1944
|
}
|
|
1941
1945
|
function getImplementationRoots() {
|
|
1942
|
-
|
|
1943
|
-
|
|
1946
|
+
return getImplementationRootsForCwd(process.cwd());
|
|
1947
|
+
}
|
|
1948
|
+
function getImplementationRootsForCwd(cwd) {
|
|
1949
|
+
return [capabilitiesRoot(cwd), getImplementationsRoot()];
|
|
1944
1950
|
}
|
|
1945
1951
|
function getCapabilityRoots(projectCapabilitiesRoot = getProjectCapabilitiesRoot()) {
|
|
1946
1952
|
return [projectCapabilitiesRoot, getBuiltinCapabilitiesRoot()];
|
|
@@ -2013,18 +2019,18 @@ function getCapabilityActionInputs(action, projectCapabilitiesRoot = getProjectC
|
|
|
2013
2019
|
if (!resolved) return null;
|
|
2014
2020
|
return getProfileInputs(resolved.implementation);
|
|
2015
2021
|
}
|
|
2016
|
-
function resolveCapabilityExecution(capability) {
|
|
2022
|
+
function resolveCapabilityExecution(capability, cwd = process.cwd()) {
|
|
2017
2023
|
const firstWorkflowStep = capability.config.workflow?.steps[0];
|
|
2018
2024
|
if (firstWorkflowStep) {
|
|
2019
2025
|
const implementation2 = firstWorkflowStep.implementation ?? firstWorkflowStep.capability;
|
|
2020
2026
|
return { implementation: implementation2, cliArgs: {} };
|
|
2021
2027
|
}
|
|
2022
2028
|
const implementation = capability.config.implementation ?? capability.config.implementations?.[0] ?? (capability.config.role ? capability.slug : void 0) ?? (capability.config.tickScript ? "capability-tick-scripted" : "capability-tick");
|
|
2023
|
-
const cliArgs = implementationDeclaresInput(implementation, "capability") ? { capability: capability.slug } : {};
|
|
2029
|
+
const cliArgs = implementationDeclaresInput(implementation, "capability", cwd) ? { capability: capability.slug } : {};
|
|
2024
2030
|
return { implementation, cliArgs };
|
|
2025
2031
|
}
|
|
2026
|
-
function implementationDeclaresInput(implementation, inputName) {
|
|
2027
|
-
const profilePath = resolveImplementation(implementation);
|
|
2032
|
+
function implementationDeclaresInput(implementation, inputName, cwd = process.cwd()) {
|
|
2033
|
+
const profilePath = resolveImplementation(implementation, getImplementationRootsForCwd(cwd));
|
|
2028
2034
|
if (!profilePath) return false;
|
|
2029
2035
|
try {
|
|
2030
2036
|
const raw = JSON.parse(fs6.readFileSync(profilePath, "utf-8"));
|
|
@@ -9285,7 +9291,7 @@ async function planGoalCapabilitySchedule(opts) {
|
|
|
9285
9291
|
}
|
|
9286
9292
|
};
|
|
9287
9293
|
}
|
|
9288
|
-
const dispatch2 = capabilityDispatch(capability);
|
|
9294
|
+
const dispatch2 = capabilityDispatch(capability, opts.cwd);
|
|
9289
9295
|
statuses[due.slug] = markCapabilitySelected(statuses[due.slug], now);
|
|
9290
9296
|
return {
|
|
9291
9297
|
kind: "dispatch",
|
|
@@ -9345,8 +9351,8 @@ async function describeCapabilitySchedule(capability, slug, backend, previous) {
|
|
|
9345
9351
|
lastFiredAt
|
|
9346
9352
|
};
|
|
9347
9353
|
}
|
|
9348
|
-
function capabilityDispatch(capability) {
|
|
9349
|
-
const { implementation, cliArgs } = resolveCapabilityExecution(capability);
|
|
9354
|
+
function capabilityDispatch(capability, cwd) {
|
|
9355
|
+
const { implementation, cliArgs } = resolveCapabilityExecution(capability, cwd);
|
|
9350
9356
|
return { capability: capability.slug, implementation, cliArgs };
|
|
9351
9357
|
}
|
|
9352
9358
|
function compareOldestLastFired(a, b) {
|
|
@@ -24346,6 +24352,7 @@ async function handleChatTurn(req, res, chatId, opts) {
|
|
|
24346
24352
|
const storeRepoUrl = strField(body, "storeRepoUrl");
|
|
24347
24353
|
const storeRef = strField(body, "storeRef");
|
|
24348
24354
|
const runtime = strField(body, "runtime");
|
|
24355
|
+
const conversationId = strField(body, "conversationId") || chatId;
|
|
24349
24356
|
const allowCrossRepo = boolField(body, "allowCrossRepo");
|
|
24350
24357
|
const agentIdentity = agentIdentityField(body);
|
|
24351
24358
|
let turnDriver = opts.driver;
|
|
@@ -24387,7 +24394,7 @@ async function handleChatTurn(req, res, chatId, opts) {
|
|
|
24387
24394
|
const stateToken = repoToken || envGithubToken();
|
|
24388
24395
|
const sessionFile = sessionFilePath(agentCwd, chatId);
|
|
24389
24396
|
const sessionStore = opts.createStore({
|
|
24390
|
-
sessionId:
|
|
24397
|
+
sessionId: conversationId,
|
|
24391
24398
|
sessionFile,
|
|
24392
24399
|
...repo ? { tenantId: repo } : {}
|
|
24393
24400
|
});
|
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.407",
|
|
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",
|
|
@@ -12,28 +12,6 @@
|
|
|
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:all": "vitest run tests --no-coverage",
|
|
29
|
-
"typecheck": "tsc --noEmit",
|
|
30
|
-
"lint": "biome check",
|
|
31
|
-
"lint:fix": "biome check --write",
|
|
32
|
-
"format": "biome format --write",
|
|
33
|
-
"verify:package": "node scripts/verify-package-tarball.cjs",
|
|
34
|
-
"brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner",
|
|
35
|
-
"prepublishOnly": "pnpm typecheck && vitest run tests/unit tests/int --no-coverage && pnpm build && pnpm verify:package"
|
|
36
|
-
},
|
|
37
15
|
"dependencies": {
|
|
38
16
|
"@actions/cache": "^6.0.0",
|
|
39
17
|
"@anthropic-ai/claude-agent-sdk": "0.2.119",
|
|
@@ -58,5 +36,26 @@
|
|
|
58
36
|
"url": "git+https://github.com/aharonyaircohen/kody-engine.git"
|
|
59
37
|
},
|
|
60
38
|
"homepage": "https://github.com/aharonyaircohen/kody-engine",
|
|
61
|
-
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
62
|
-
|
|
39
|
+
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
|
|
40
|
+
"scripts": {
|
|
41
|
+
"kody:run": "tsx bin/kody.ts",
|
|
42
|
+
"serve": "tsx bin/kody.ts serve",
|
|
43
|
+
"serve:vscode": "tsx bin/kody.ts serve vscode",
|
|
44
|
+
"serve:claude": "tsx bin/kody.ts serve claude",
|
|
45
|
+
"clean:dist": "node scripts/clean-dist.cjs",
|
|
46
|
+
"build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
|
|
47
|
+
"check:modularity": "tsx scripts/check-script-modularity.ts",
|
|
48
|
+
"pretest": "pnpm check:modularity",
|
|
49
|
+
"test": "vitest run tests/unit tests/int --coverage",
|
|
50
|
+
"posttest": "tsx scripts/check-coverage-floor.ts",
|
|
51
|
+
"test:smoke": "vitest run tests/smoke --no-coverage",
|
|
52
|
+
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
53
|
+
"test:all": "vitest run tests --no-coverage",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"lint": "biome check",
|
|
56
|
+
"lint:fix": "biome check --write",
|
|
57
|
+
"format": "biome format --write",
|
|
58
|
+
"verify:package": "node scripts/verify-package-tarball.cjs",
|
|
59
|
+
"brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner"
|
|
60
|
+
}
|
|
61
|
+
}
|