@kody-ade/kody-engine 0.4.344 → 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 +4 -5
- package/dist/bin/kody.js +14 -14
- package/kody.config.schema.json +8 -8
- package/package.json +25 -24
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
|
|
87
|
-
after `@kody` through `config.aliases`, then falls back to
|
|
88
|
-
`config.
|
|
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`.
|
|
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.
|
|
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
|
-
...
|
|
769
|
-
...
|
|
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
|
-
|
|
775
|
-
|
|
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
|
|
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 ? {
|
|
944
|
+
return Object.keys(out).length > 0 ? { perImplementation: out } : {};
|
|
945
945
|
}
|
|
946
|
-
function
|
|
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 ? {
|
|
953
|
+
return Object.keys(out).length > 0 ? { perImplementationReasoningEffort: out } : {};
|
|
954
954
|
}
|
|
955
955
|
function parseAgentReasoningEffort(raw) {
|
|
956
956
|
if (typeof raw !== "string") return {};
|
|
@@ -19862,10 +19862,10 @@ async function runExecutable(profileName, input) {
|
|
|
19862
19862
|
if (!input.skipConfig && config.github.owner && config.github.repo) {
|
|
19863
19863
|
hydrateStateWorkspace(config, input.cwd);
|
|
19864
19864
|
}
|
|
19865
|
-
const
|
|
19866
|
-
const modelSpec =
|
|
19865
|
+
const perImplementationModel = config.agent.perImplementation?.[profileName];
|
|
19866
|
+
const modelSpec = perImplementationModel ? perImplementationModel : profile.claudeCode.model === "inherit" ? config.agent.model : profile.claudeCode.model;
|
|
19867
19867
|
const profileHasThinkingTokens = typeof profile.claudeCode.maxThinkingTokens === "number" && profile.claudeCode.maxThinkingTokens > 0;
|
|
19868
|
-
const reasoningEffort = config.agent.
|
|
19868
|
+
const reasoningEffort = config.agent.perImplementationReasoningEffort?.[profileName] ?? profile.claudeCode.reasoningEffort ?? (profileHasThinkingTokens ? void 0 : config.agent.reasoningEffort);
|
|
19869
19869
|
let model;
|
|
19870
19870
|
try {
|
|
19871
19871
|
model = parseProviderModel(modelSpec);
|
|
@@ -22194,7 +22194,7 @@ function autoDispatch(opts) {
|
|
|
22194
22194
|
}
|
|
22195
22195
|
}
|
|
22196
22196
|
if (!route && !firstToken) {
|
|
22197
|
-
const defaultAction = isPr ? opts?.config?.
|
|
22197
|
+
const defaultAction = isPr ? opts?.config?.defaultPrImplementation ?? null : opts?.config?.defaultImplementation ?? null;
|
|
22198
22198
|
route = defaultAction ? resolveConfiguredAction(defaultAction) : null;
|
|
22199
22199
|
}
|
|
22200
22200
|
if (isBotAuthor && !consumedFirstToken) {
|
|
@@ -22208,7 +22208,7 @@ function autoDispatch(opts) {
|
|
|
22208
22208
|
if (!firstToken) return null;
|
|
22209
22209
|
const profileMissing = aliased ? resolveOperatorAction(aliased) === null : true;
|
|
22210
22210
|
process.stderr.write(
|
|
22211
|
-
`[kody] dispatch: no capability action resolved for issue_comment (firstToken=${firstToken ?? "<none>"}, aliased=${aliased ?? "<none>"}, actionFound=${!profileMissing},
|
|
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>"})
|
|
22212
22212
|
`
|
|
22213
22213
|
);
|
|
22214
22214
|
return null;
|
package/kody.config.schema.json
CHANGED
|
@@ -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
|
-
"
|
|
87
|
+
"perImplementation": {
|
|
88
88
|
"type": "object",
|
|
89
|
-
"description": "Optional provider/model override by
|
|
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
|
-
"
|
|
123
|
+
"defaultImplementation": {
|
|
124
124
|
"type": "string",
|
|
125
|
-
"description": "
|
|
125
|
+
"description": "Implementation used for bare @kody comments on issues.",
|
|
126
126
|
"default": "run"
|
|
127
127
|
},
|
|
128
|
-
"
|
|
128
|
+
"defaultPrImplementation": {
|
|
129
129
|
"type": "string",
|
|
130
|
-
"description": "Optional
|
|
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
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
+
}
|