@kody-ade/kody-engine 0.4.343 → 0.4.345

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/README.md CHANGED
@@ -83,12 +83,11 @@ See [SECURITY.md](SECURITY.md) to report a vulnerability.
83
83
  ```
84
84
 
85
85
  Every top-level command is an auto-discovered capability action. The router has
86
- **zero executable names hardcoded** - comment dispatch resolves the first token
87
- after `@kody` through `config.aliases`, then falls back to the legacy-named
88
- `config.defaultExecutable` / `config.defaultPrExecutable` fields as default
86
+ **zero implementation names hardcoded** - comment dispatch resolves the first token
87
+ after `@kody` through `config.aliases`, then falls back to
88
+ `config.defaultImplementation` / `config.defaultPrImplementation` as default
89
89
  capability actions. Drop a new `.kody/capabilities/<slug>/` directory with
90
- `profile.json` + `capability.md`. Project/store `.kody/executables/` folders
91
- are obsolete and are not resolver sources.
90
+ `profile.json` + `capability.md`.
92
91
 
93
92
  Capability implementation profiles are private implementation units and contain
94
93
  **only** three kinds of files: `profile.json` (declaration), `prompt.md` (agent
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.343",
18
+ version: "0.4.345",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -765,14 +765,14 @@ function loadConfig(projectDir = process.cwd()) {
765
765
  state: parseStateConfig(raw, github),
766
766
  agent: {
767
767
  model: String(agent.model),
768
- ...parsePerExecutable(agent.perExecutable),
769
- ...parsePerExecutableReasoningEffort(agent.perExecutableReasoningEffort),
768
+ ...parsePerImplementation(agent.perImplementation),
769
+ ...parsePerImplementationReasoningEffort(agent.perImplementationReasoningEffort),
770
770
  ...parseAgentReasoningEffort(agent.reasoningEffort)
771
771
  },
772
772
  issueContext: parseIssueContext(raw.issueContext),
773
773
  testRequirements: parseTestRequirements(raw.testRequirements),
774
- defaultExecutable: typeof raw.defaultExecutable === "string" && raw.defaultExecutable.length > 0 ? raw.defaultExecutable : "run",
775
- defaultPrExecutable: typeof raw.defaultPrExecutable === "string" && raw.defaultPrExecutable.length > 0 ? raw.defaultPrExecutable : void 0,
774
+ defaultImplementation: typeof raw.defaultImplementation === "string" && raw.defaultImplementation.length > 0 ? raw.defaultImplementation : "run",
775
+ defaultPrImplementation: typeof raw.defaultPrImplementation === "string" && raw.defaultPrImplementation.length > 0 ? raw.defaultPrImplementation : void 0,
776
776
  onPullRequest: typeof raw.onPullRequest === "string" && raw.onPullRequest.length > 0 ? raw.onPullRequest : void 0,
777
777
  aliases: mergeAliases(raw.aliases),
778
778
  classify: parseClassifyConfig(raw.classify),
@@ -935,22 +935,22 @@ function mergeAliases(raw) {
935
935
  }
936
936
  return out;
937
937
  }
938
- function parsePerExecutable(raw) {
938
+ function parsePerImplementation(raw) {
939
939
  if (!raw || typeof raw !== "object") return {};
940
940
  const out = {};
941
941
  for (const [k, v] of Object.entries(raw)) {
942
942
  if (typeof v === "string" && v.length > 0) out[k] = v;
943
943
  }
944
- return Object.keys(out).length > 0 ? { perExecutable: out } : {};
944
+ return Object.keys(out).length > 0 ? { perImplementation: out } : {};
945
945
  }
946
- function parsePerExecutableReasoningEffort(raw) {
946
+ function parsePerImplementationReasoningEffort(raw) {
947
947
  if (!raw || typeof raw !== "object") return {};
948
948
  const out = {};
949
949
  for (const [k, v] of Object.entries(raw)) {
950
950
  const effort = typeof v === "string" ? parseReasoningEffort(v) : null;
951
951
  if (effort) out[k] = effort;
952
952
  }
953
- return Object.keys(out).length > 0 ? { perExecutableReasoningEffort: out } : {};
953
+ return Object.keys(out).length > 0 ? { perImplementationReasoningEffort: out } : {};
954
954
  }
955
955
  function parseAgentReasoningEffort(raw) {
956
956
  if (typeof raw !== "string") return {};
@@ -6721,7 +6721,7 @@ var init_evaluateAgencyBoundaries = __esm({
6721
6721
  init_agencyBoundaryEval();
6722
6722
  init_capabilityResult();
6723
6723
  evaluateAgencyBoundariesScript = async (ctx, profile, agentResult) => {
6724
- const results = collectResults(ctx.data.capabilityResults ?? ctx.data.dutyResults, agentResult);
6724
+ const results = collectResults(ctx.data.capabilityResults, agentResult);
6725
6725
  const capabilityKind = agencyBoundaryCapabilityKind(ctx.data, profile);
6726
6726
  const capability = agencyBoundaryCapability(ctx.data, profile);
6727
6727
  const evalResult = evaluateAgencyBoundaries({
@@ -10918,7 +10918,7 @@ var init_applyCapabilityReports = __esm({
10918
10918
  init_issue();
10919
10919
  applyCapabilityReports = async (ctx, _profile, agentResult) => {
10920
10920
  const reports = collectReports(ctx.data.capabilityReports, agentResult);
10921
- const results = collectResults2(ctx.data.capabilityResults ?? ctx.data.dutyResults, agentResult);
10921
+ const results = collectResults2(ctx.data.capabilityResults, agentResult);
10922
10922
  const resultTarget = parseResultTarget(ctx.data.capabilityResultTarget);
10923
10923
  const resultGoalId = resultTarget?.id ?? (typeof ctx.args.goal === "string" && ctx.args.goal.length > 0 ? ctx.args.goal : null);
10924
10924
  const explicitEvidence = resultTarget?.evidence ?? (typeof ctx.args.evidence === "string" && ctx.args.evidence.length > 0 ? ctx.args.evidence : void 0);
@@ -19748,9 +19748,8 @@ function collectShellSideChannels(ctx, stdout) {
19748
19748
  }
19749
19749
  const capabilityResults = parseCapabilityResultsFromText(stdout);
19750
19750
  if (capabilityResults.length > 0) {
19751
- const prior = Array.isArray(ctx.data.capabilityResults) ? ctx.data.capabilityResults : Array.isArray(ctx.data.dutyResults) ? ctx.data.dutyResults : [];
19751
+ const prior = Array.isArray(ctx.data.capabilityResults) ? ctx.data.capabilityResults : [];
19752
19752
  ctx.data.capabilityResults = [...prior, ...capabilityResults];
19753
- ctx.data.dutyResults = ctx.data.capabilityResults;
19754
19753
  }
19755
19754
  }
19756
19755
  function operatorRequestBlock(why) {
@@ -19863,10 +19862,10 @@ async function runExecutable(profileName, input) {
19863
19862
  if (!input.skipConfig && config.github.owner && config.github.repo) {
19864
19863
  hydrateStateWorkspace(config, input.cwd);
19865
19864
  }
19866
- const perExecutableModel = config.agent.perExecutable?.[profileName];
19867
- const modelSpec = perExecutableModel ? perExecutableModel : profile.claudeCode.model === "inherit" ? config.agent.model : profile.claudeCode.model;
19865
+ const perImplementationModel = config.agent.perImplementation?.[profileName];
19866
+ const modelSpec = perImplementationModel ? perImplementationModel : profile.claudeCode.model === "inherit" ? config.agent.model : profile.claudeCode.model;
19868
19867
  const profileHasThinkingTokens = typeof profile.claudeCode.maxThinkingTokens === "number" && profile.claudeCode.maxThinkingTokens > 0;
19869
- const reasoningEffort = config.agent.perExecutableReasoningEffort?.[profileName] ?? profile.claudeCode.reasoningEffort ?? (profileHasThinkingTokens ? void 0 : config.agent.reasoningEffort);
19868
+ const reasoningEffort = config.agent.perImplementationReasoningEffort?.[profileName] ?? profile.claudeCode.reasoningEffort ?? (profileHasThinkingTokens ? void 0 : config.agent.reasoningEffort);
19870
19869
  let model;
19871
19870
  try {
19872
19871
  model = parseProviderModel(modelSpec);
@@ -20345,8 +20344,8 @@ async function runExecutableChain(profileName, input) {
20345
20344
  return result;
20346
20345
  }
20347
20346
  function handoffToJob(handoff) {
20348
- const dutyOrAction = handoff.workflow ?? handoff.action ?? handoff.capability;
20349
- if (!dutyOrAction) return null;
20347
+ const capabilityOrAction = handoff.workflow ?? handoff.action ?? handoff.capability;
20348
+ if (!capabilityOrAction) return null;
20350
20349
  return {
20351
20350
  action: handoff.action ?? handoff.capability,
20352
20351
  capability: handoff.capability,
@@ -22195,7 +22194,7 @@ function autoDispatch(opts) {
22195
22194
  }
22196
22195
  }
22197
22196
  if (!route && !firstToken) {
22198
- const defaultAction = isPr ? opts?.config?.defaultPrExecutable ?? null : opts?.config?.defaultExecutable ?? null;
22197
+ const defaultAction = isPr ? opts?.config?.defaultPrImplementation ?? null : opts?.config?.defaultImplementation ?? null;
22199
22198
  route = defaultAction ? resolveConfiguredAction(defaultAction) : null;
22200
22199
  }
22201
22200
  if (isBotAuthor && !consumedFirstToken) {
@@ -22209,7 +22208,7 @@ function autoDispatch(opts) {
22209
22208
  if (!firstToken) return null;
22210
22209
  const profileMissing = aliased ? resolveOperatorAction(aliased) === null : true;
22211
22210
  process.stderr.write(
22212
- `[kody] dispatch: no capability action resolved for issue_comment (firstToken=${firstToken ?? "<none>"}, aliased=${aliased ?? "<none>"}, actionFound=${!profileMissing}, defaultExecutable=${opts?.config?.defaultExecutable ?? "<unset>"}, defaultPrExecutable=${opts?.config?.defaultPrExecutable ?? "<unset>"})
22211
+ `[kody] dispatch: no capability action resolved for issue_comment (firstToken=${firstToken ?? "<none>"}, aliased=${aliased ?? "<none>"}, actionFound=${!profileMissing}, defaultImplementation=${opts?.config?.defaultImplementation ?? "<unset>"}, defaultPrImplementation=${opts?.config?.defaultPrImplementation ?? "<unset>"})
22213
22212
  `
22214
22213
  );
22215
22214
  return null;
@@ -84,9 +84,9 @@
84
84
  "enum": ["off", "low", "medium", "high"],
85
85
  "description": "Default thinking effort for the Claude Agent SDK. Maps to maxThinkingTokens. 'off' (default) skips the thinking block entirely — no reasoning preamble, no extra tokens. 'low'/'medium'/'high' enable extended thinking with budgets 2_048/10_000/32_000. Overridable per-session via the REASONING_EFFORT env var or the dashboard's chat-level thinking dropdown."
86
86
  },
87
- "perExecutable": {
87
+ "perImplementation": {
88
88
  "type": "object",
89
- "description": "Optional provider/model override by executable name.",
89
+ "description": "Optional provider/model override by implementation name.",
90
90
  "additionalProperties": {
91
91
  "type": "string",
92
92
  "pattern": "^[^/]+/.+$"
@@ -120,22 +120,22 @@
120
120
  }
121
121
  }
122
122
  },
123
- "defaultExecutable": {
123
+ "defaultImplementation": {
124
124
  "type": "string",
125
- "description": "Executable used for bare @kody comments on issues.",
125
+ "description": "Implementation used for bare @kody comments on issues.",
126
126
  "default": "run"
127
127
  },
128
- "defaultPrExecutable": {
128
+ "defaultPrImplementation": {
129
129
  "type": "string",
130
- "description": "Optional executable used for bare @kody comments on PRs. Leave unset to require explicit PR commands."
130
+ "description": "Optional implementation used for bare @kody comments on PRs. Leave unset to require explicit PR commands."
131
131
  },
132
132
  "onPullRequest": {
133
133
  "type": "string",
134
- "description": "Optional executable to run on pull_request opened, synchronize, or reopened events."
134
+ "description": "Optional implementation to run on pull_request opened, synchronize, or reopened events."
135
135
  },
136
136
  "aliases": {
137
137
  "type": "object",
138
- "description": "Comment subcommand aliases, mapping typed word to executable name.",
138
+ "description": "Comment subcommand aliases, mapping typed word to implementation name.",
139
139
  "additionalProperties": {
140
140
  "type": "string"
141
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.343",
3
+ "version": "0.4.345",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable 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",
@@ -35,26 +57,5 @@
35
57
  "url": "git+https://github.com/aharonyaircohen/kody-engine.git"
36
58
  },
37
59
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
38
- "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
39
- "scripts": {
40
- "kody:run": "tsx bin/kody.ts",
41
- "serve": "tsx bin/kody.ts serve",
42
- "serve:vscode": "tsx bin/kody.ts serve vscode",
43
- "serve:claude": "tsx bin/kody.ts serve claude",
44
- "clean:dist": "node scripts/clean-dist.cjs",
45
- "build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
46
- "check:modularity": "tsx scripts/check-script-modularity.ts",
47
- "pretest": "pnpm check:modularity",
48
- "test": "vitest run tests/unit tests/int --coverage",
49
- "posttest": "tsx scripts/check-coverage-floor.ts",
50
- "test:smoke": "vitest run tests/smoke --no-coverage",
51
- "test:e2e": "vitest run tests/e2e --no-coverage",
52
- "test:all": "vitest run tests --no-coverage",
53
- "typecheck": "tsc --noEmit",
54
- "lint": "biome check",
55
- "lint:fix": "biome check --write",
56
- "format": "biome format --write",
57
- "verify:package": "node scripts/verify-package-tarball.cjs",
58
- "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"
59
- }
60
- }
60
+ "bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
61
+ }