@kody-ade/kody-engine 0.4.510 → 0.4.512

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.510",
18
+ version: "0.4.512",
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",
@@ -242,7 +242,8 @@ function loadConfig(projectDir = process.cwd()) {
242
242
  typecheck: typeof quality.typecheck === "string" ? quality.typecheck : "",
243
243
  lint: typeof quality.lint === "string" ? quality.lint : "",
244
244
  format: typeof quality.format === "string" ? quality.format : "",
245
- testUnit: typeof quality.testUnit === "string" ? quality.testUnit : ""
245
+ testUnit: typeof quality.testUnit === "string" ? quality.testUnit : "",
246
+ coverage: typeof quality.coverage === "string" ? quality.coverage : ""
246
247
  },
247
248
  git: {
248
249
  defaultBranch: typeof git5.defaultBranch === "string" ? git5.defaultBranch : "main"
@@ -1969,9 +1970,7 @@ function parseCapabilityContract(raw) {
1969
1970
  if (timeoutMs !== void 0 && parsed.execution !== "script") {
1970
1971
  throw new Error('contract.json timeoutMs is supported only when execution is "script"');
1971
1972
  }
1972
- const requiredSubagents = parsed.requiredSubagents === void 0 ? void 0 : Array.isArray(parsed.requiredSubagents) && parsed.requiredSubagents.length > 0 && parsed.requiredSubagents.every(
1973
- (name) => typeof name === "string" && /^[a-z][a-z0-9-]{0,63}$/.test(name)
1974
- ) ? [...new Set(parsed.requiredSubagents)] : null;
1973
+ const requiredSubagents = parsed.requiredSubagents === void 0 ? void 0 : Array.isArray(parsed.requiredSubagents) && parsed.requiredSubagents.length > 0 && parsed.requiredSubagents.every((name) => typeof name === "string" && /^[a-z][a-z0-9-]{0,63}$/.test(name)) ? [...new Set(parsed.requiredSubagents)] : null;
1975
1974
  if (requiredSubagents === null) {
1976
1975
  throw new Error("contract.json requiredSubagents must contain valid specialist names");
1977
1976
  }
@@ -4913,9 +4912,7 @@ var init_capability_contract_validation = __esm({
4913
4912
  const property = error.keyword === "additionalProperties" && typeof error.params.additionalProperty === "string" ? ` (${error.params.additionalProperty})` : "";
4914
4913
  return `${location}: ${error.message ?? error.keyword}${property}`;
4915
4914
  }).join("; ");
4916
- super(
4917
- `Capability ${boundary} does not match its declared contract: ${details}`
4918
- );
4915
+ super(`Capability ${boundary} does not match its declared contract: ${details}`);
4919
4916
  this.boundary = boundary;
4920
4917
  this.errors = errors;
4921
4918
  this.name = "CapabilityContractValidationError";
@@ -7950,10 +7947,7 @@ function capabilityInputEnvironment(input) {
7950
7947
  function capabilityConfigEnvironment(config) {
7951
7948
  if (!config || typeof config !== "object" || Array.isArray(config)) return {};
7952
7949
  return Object.fromEntries(
7953
- flattenConfig(config).map(([key, value]) => [
7954
- `KODY_CFG_${key}`,
7955
- value
7956
- ])
7950
+ flattenConfig(config).map(([key, value]) => [`KODY_CFG_${key}`, value])
7957
7951
  );
7958
7952
  }
7959
7953
  function flattenConfig(config, prefix = "") {
@@ -7966,9 +7960,7 @@ function flattenConfig(config, prefix = "") {
7966
7960
  } else if (Array.isArray(value)) {
7967
7961
  entries.push([key, JSON.stringify(value)]);
7968
7962
  } else if (typeof value === "object") {
7969
- entries.push(
7970
- ...flattenConfig(value, key)
7971
- );
7963
+ entries.push(...flattenConfig(value, key));
7972
7964
  }
7973
7965
  }
7974
7966
  return entries;
@@ -13648,9 +13640,7 @@ import { randomUUID } from "crypto";
13648
13640
  function assertLoopDispatchesSucceeded(results) {
13649
13641
  const failed = results.filter((result) => result.status === "failed");
13650
13642
  if (failed.length === 0) return;
13651
- throw new Error(
13652
- `Loop dispatch failed: ${failed.map((result) => `${result.loopId}: ${result.reason}`).join("; ")}`
13653
- );
13643
+ throw new Error(`Loop dispatch failed: ${failed.map((result) => `${result.loopId}: ${result.reason}`).join("; ")}`);
13654
13644
  }
13655
13645
  async function dispatchLoopsWith(input) {
13656
13646
  const results = [];
@@ -15697,10 +15687,10 @@ var init_loadQaContext = __esm({
15697
15687
  });
15698
15688
 
15699
15689
  // src/scripts/loadSimpleCapability.ts
15690
+ import { randomUUID as randomUUID2 } from "crypto";
15700
15691
  import * as fs43 from "fs";
15701
- import * as path40 from "path";
15702
15692
  import * as os6 from "os";
15703
- import { randomUUID as randomUUID2 } from "crypto";
15693
+ import * as path40 from "path";
15704
15694
  function registerCapabilitySubagents(profile, toolRoot, toolFiles) {
15705
15695
  const subagentFiles = toolFiles.flatMap((file) => {
15706
15696
  const match = /^agents\/([a-z][a-z0-9-]{0,63})\.md$/.exec(file);
@@ -21144,9 +21134,7 @@ async function runImplementation(profileName, input) {
21144
21134
  profile.inputs,
21145
21135
  args,
21146
21136
  profile.canonicalContract.capabilityId,
21147
- Object.keys(
21148
- profile.canonicalContract.inputSchema.properties ?? {}
21149
- )
21137
+ Object.keys(profile.canonicalContract.inputSchema.properties ?? {})
21150
21138
  )
21151
21139
  );
21152
21140
  }
File without changes
@@ -17,7 +17,8 @@
17
17
  "typecheck": { "type": "string", "default": "" },
18
18
  "lint": { "type": "string", "default": "" },
19
19
  "format": { "type": "string", "default": "" },
20
- "testUnit": { "type": "string", "default": "" }
20
+ "testUnit": { "type": "string", "default": "" },
21
+ "coverage": { "type": "string", "default": "" }
21
22
  }
22
23
  },
23
24
  "git": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.510",
4
- "description": "kody autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
3
+ "version": "0.4.512",
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 && vitest run tests/unit tests/int --no-coverage && 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
- "scripts": {
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
+ }