@kody-ade/kody-engine 0.2.1 → 0.2.3
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/kody2.js +1529 -1312
- package/dist/executables/build/profile.json +4 -3
- package/dist/executables/types.ts +2 -6
- package/package.json +15 -12
- package/templates/kody2.yml +15 -6
|
@@ -73,11 +73,12 @@
|
|
|
73
73
|
],
|
|
74
74
|
"postflight": [
|
|
75
75
|
{ "script": "parseAgentResult" },
|
|
76
|
-
{ "script": "verify" },
|
|
77
|
-
{ "script": "checkCoverageWithRetry" },
|
|
76
|
+
{ "script": "verify", "runWhen": { "args.mode": ["run", "fix", "fix-ci"] } },
|
|
77
|
+
{ "script": "checkCoverageWithRetry", "runWhen": { "args.mode": ["run", "fix", "fix-ci"] } },
|
|
78
78
|
{ "script": "commitAndPush" },
|
|
79
79
|
{ "script": "ensurePr" },
|
|
80
|
-
{ "script": "postIssueComment" }
|
|
80
|
+
{ "script": "postIssueComment" },
|
|
81
|
+
{ "script": "writeRunSummary" }
|
|
81
82
|
]
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* (build, review, plan, etc.) — it only executes what the profile declares.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { Kody2Config } from "../config.js"
|
|
11
10
|
import type { AgentResult } from "../agent.js"
|
|
11
|
+
import type { Kody2Config } from "../config.js"
|
|
12
12
|
|
|
13
13
|
// ────────────────────────────────────────────────────────────────────────────
|
|
14
14
|
// Profile shape (mirrors the JSON on disk).
|
|
@@ -144,11 +144,7 @@ export interface Context {
|
|
|
144
144
|
|
|
145
145
|
export type PreflightScript = (ctx: Context, profile: Profile) => Promise<void>
|
|
146
146
|
|
|
147
|
-
export type PostflightScript = (
|
|
148
|
-
ctx: Context,
|
|
149
|
-
profile: Profile,
|
|
150
|
-
agentResult: AgentResult | null,
|
|
151
|
-
) => Promise<void>
|
|
147
|
+
export type PostflightScript = (ctx: Context, profile: Profile, agentResult: AgentResult | null) => Promise<void>
|
|
152
148
|
|
|
153
149
|
/** A registered script may be either phase; registry looks it up by name. */
|
|
154
150
|
export type AnyScript = PreflightScript | PostflightScript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,19 +12,11 @@
|
|
|
12
12
|
"templates",
|
|
13
13
|
"kody.config.schema.json"
|
|
14
14
|
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"kody2": "tsx bin/kody2.ts",
|
|
17
|
-
"build": "tsup && node -e \"require('fs').cpSync('src/executables', 'dist/executables', { recursive: true })\"",
|
|
18
|
-
"test": "vitest run tests --no-coverage",
|
|
19
|
-
"test:e2e": "vitest run e2e --no-coverage",
|
|
20
|
-
"test:all": "vitest run tests e2e --no-coverage",
|
|
21
|
-
"typecheck": "tsc --noEmit",
|
|
22
|
-
"prepublishOnly": "pnpm build"
|
|
23
|
-
},
|
|
24
15
|
"dependencies": {
|
|
25
16
|
"@anthropic-ai/claude-agent-sdk": "0.2.92"
|
|
26
17
|
},
|
|
27
18
|
"devDependencies": {
|
|
19
|
+
"@biomejs/biome": "^2.4.12",
|
|
28
20
|
"@types/node": "^22.5.4",
|
|
29
21
|
"tsup": "^8.5.1",
|
|
30
22
|
"tsx": "^4.21.0",
|
|
@@ -39,5 +31,16 @@
|
|
|
39
31
|
"url": "git+https://github.com/aharonyaircohen/kody-engine.git"
|
|
40
32
|
},
|
|
41
33
|
"homepage": "https://github.com/aharonyaircohen/kody-engine",
|
|
42
|
-
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
43
|
-
|
|
34
|
+
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"kody2": "tsx bin/kody2.ts",
|
|
37
|
+
"build": "tsup && node -e \"require('fs').cpSync('src/executables', 'dist/executables', { recursive: true })\"",
|
|
38
|
+
"test": "vitest run tests/unit tests/int --no-coverage",
|
|
39
|
+
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
40
|
+
"test:all": "vitest run tests --no-coverage",
|
|
41
|
+
"typecheck": "tsc --noEmit",
|
|
42
|
+
"lint": "biome check",
|
|
43
|
+
"lint:fix": "biome check --write",
|
|
44
|
+
"format": "biome format --write"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/templates/kody2.yml
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
# Drop this file at .github/workflows/kody2.yml in your repo.
|
|
2
2
|
#
|
|
3
|
-
# Triggers: @kody2 comment on an issue, or manual workflow_dispatch.
|
|
3
|
+
# Triggers: @kody2 comment on an issue or PR, or manual workflow_dispatch.
|
|
4
4
|
# Everything else (install deps, set up LiteLLM, run the agent, open the PR)
|
|
5
|
-
# is handled inside the @kody-ade/engine package. This template should
|
|
5
|
+
# is handled inside the @kody-ade/kody-engine package. This template should
|
|
6
6
|
# rarely need editing — future kody2 capabilities ship via npm publish.
|
|
7
7
|
#
|
|
8
8
|
# Required repo secrets: at least one model provider key (e.g. MINIMAX_API_KEY,
|
|
9
9
|
# ANTHROPIC_API_KEY). kody2 reads any *_API_KEY secret automatically via
|
|
10
10
|
# toJSON(secrets) — no need to list them here.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# github.token
|
|
12
|
+
# Recommended: KODY_TOKEN secret — a fine-grained PAT or GitHub App token
|
|
13
|
+
# with `repo` + `read:org` scopes. Without it, kody2's commits/PR-creation
|
|
14
|
+
# still work via github.token, but two things degrade:
|
|
15
|
+
# 1. PR body updates fail with "token lacks read:org scope" (cosmetic,
|
|
16
|
+
# surfaces as warnings in logs; the PR itself is still created/updated).
|
|
17
|
+
# 2. Pushes from kody2 won't trigger downstream workflows (github.token
|
|
18
|
+
# pushes are deliberately blocked from re-triggering CI).
|
|
19
|
+
# Set KODY_TOKEN in repo Settings → Secrets → Actions.
|
|
15
20
|
|
|
16
21
|
name: kody2
|
|
17
22
|
|
|
@@ -27,10 +32,14 @@ on:
|
|
|
27
32
|
|
|
28
33
|
jobs:
|
|
29
34
|
run:
|
|
35
|
+
# Skip bot-authored comments (e.g. kody2-bot's own status posts) so we
|
|
36
|
+
# don't loop the workflow on our own output.
|
|
30
37
|
if: >-
|
|
31
38
|
${{ github.event_name == 'workflow_dispatch' ||
|
|
32
39
|
(github.event_name == 'issue_comment' &&
|
|
33
|
-
contains(github.event.comment.body, '@kody2')
|
|
40
|
+
contains(github.event.comment.body, '@kody2') &&
|
|
41
|
+
github.event.comment.user.login != 'kody2-bot' &&
|
|
42
|
+
github.event.comment.user.type != 'Bot') }}
|
|
34
43
|
runs-on: ubuntu-latest
|
|
35
44
|
timeout-minutes: 60
|
|
36
45
|
permissions:
|