@kody-ade/kody-engine 0.4.404 → 0.4.406
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 +29 -3
- package/package.json +25 -24
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.406",
|
|
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",
|
|
@@ -2220,6 +2220,10 @@ function requireTenant(tenantId2) {
|
|
|
2220
2220
|
if (!/^[^/\s]+\/[^/\s]+$/.test(value)) throw new Error("tenantId must be an owner/repository pair");
|
|
2221
2221
|
return value;
|
|
2222
2222
|
}
|
|
2223
|
+
function requireChatTenant(tenantId2) {
|
|
2224
|
+
const value = tenantId2.trim();
|
|
2225
|
+
return value === "global" ? value : requireTenant(value);
|
|
2226
|
+
}
|
|
2223
2227
|
function requireNonEmpty(value, name) {
|
|
2224
2228
|
const normalized = value.trim();
|
|
2225
2229
|
if (!normalized) throw new Error(`${name} must not be empty`);
|
|
@@ -2302,7 +2306,7 @@ function createStateBackendFromEnv(env = process.env, client) {
|
|
|
2302
2306
|
},
|
|
2303
2307
|
async appendChatEvent(tenantId2, sessionId, event) {
|
|
2304
2308
|
await transport.mutation(anyApi.chatEvents.append, {
|
|
2305
|
-
tenantId:
|
|
2309
|
+
tenantId: requireChatTenant(tenantId2),
|
|
2306
2310
|
sessionId: requireNonEmpty(sessionId, "sessionId"),
|
|
2307
2311
|
event
|
|
2308
2312
|
});
|
|
@@ -21933,6 +21937,19 @@ async function runCodexChatTurn(args) {
|
|
|
21933
21937
|
import * as fs13 from "fs";
|
|
21934
21938
|
import * as path14 from "path";
|
|
21935
21939
|
import posixPath2 from "path/posix";
|
|
21940
|
+
var BackendEventSink = class {
|
|
21941
|
+
constructor(append, tenantId2, sessionId) {
|
|
21942
|
+
this.append = append;
|
|
21943
|
+
this.tenantId = tenantId2;
|
|
21944
|
+
this.sessionId = sessionId;
|
|
21945
|
+
}
|
|
21946
|
+
append;
|
|
21947
|
+
tenantId;
|
|
21948
|
+
sessionId;
|
|
21949
|
+
async emit(event) {
|
|
21950
|
+
await this.append(this.tenantId, this.sessionId, event);
|
|
21951
|
+
}
|
|
21952
|
+
};
|
|
21936
21953
|
function eventsFilePath(cwd, sessionId) {
|
|
21937
21954
|
return path14.join(cwd, ".kody-engine", "runtime", "events", `${sessionId}.jsonl`);
|
|
21938
21955
|
}
|
|
@@ -25221,6 +25238,7 @@ async function emit2(sink, type, sessionId, suffix, payload) {
|
|
|
25221
25238
|
// src/chat-cli.ts
|
|
25222
25239
|
init_config();
|
|
25223
25240
|
init_litellm();
|
|
25241
|
+
init_state_backend();
|
|
25224
25242
|
init_stateWorkspace();
|
|
25225
25243
|
var DEFAULT_MODEL2 = "claude/claude-haiku-4-5-20251001";
|
|
25226
25244
|
var CHAT_HELP = `kody chat \u2014 dashboard-driven chat session
|
|
@@ -25285,7 +25303,15 @@ function tryLoadConfig(cwd) {
|
|
|
25285
25303
|
}
|
|
25286
25304
|
}
|
|
25287
25305
|
function buildSink(cwd, sessionId, dashboardUrl) {
|
|
25288
|
-
const
|
|
25306
|
+
const backend = createStateBackendFromEnv();
|
|
25307
|
+
const sinks = [
|
|
25308
|
+
new BackendEventSink(
|
|
25309
|
+
(tenantId2, targetSessionId, event) => backend.appendChatEvent(tenantId2, targetSessionId, event),
|
|
25310
|
+
"global",
|
|
25311
|
+
sessionId
|
|
25312
|
+
),
|
|
25313
|
+
new FileSink(eventsFilePath(cwd, sessionId))
|
|
25314
|
+
];
|
|
25289
25315
|
if (dashboardUrl) sinks.push(new HttpSink(dashboardUrl, sessionId));
|
|
25290
25316
|
return new TeeSink(sinks);
|
|
25291
25317
|
}
|
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.406",
|
|
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,6 +12,28 @@
|
|
|
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
|
+
},
|
|
15
37
|
"dependencies": {
|
|
16
38
|
"@actions/cache": "^6.0.0",
|
|
17
39
|
"@anthropic-ai/claude-agent-sdk": "0.2.119",
|
|
@@ -36,26 +58,5 @@
|
|
|
36
58
|
"url": "git+https://github.com/aharonyaircohen/kody-engine.git"
|
|
37
59
|
},
|
|
38
60
|
"homepage": "https://github.com/aharonyaircohen/kody-engine",
|
|
39
|
-
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
40
|
-
|
|
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
|
-
}
|
|
61
|
+
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
62
|
+
}
|