@kody-ade/kody-engine 0.2.43 → 0.2.45
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
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@kody-ade/kody-engine",
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.45",
|
|
7
7
|
description: "kody2 \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
8
8
|
license: "MIT",
|
|
9
9
|
type: "module",
|
|
@@ -2716,6 +2716,38 @@ var loadTaskState = async (ctx) => {
|
|
|
2716
2716
|
ctx.data.taskState = readTaskState(target, number, ctx.cwd);
|
|
2717
2717
|
};
|
|
2718
2718
|
|
|
2719
|
+
// src/scripts/mirrorStateToPr.ts
|
|
2720
|
+
var mirrorStateToPr = async (ctx) => {
|
|
2721
|
+
const issueNumber = ctx.data.commentTargetNumber;
|
|
2722
|
+
const issueTarget = ctx.data.commentTargetType;
|
|
2723
|
+
if (!issueNumber || issueTarget !== "issue") return;
|
|
2724
|
+
const prUrl = ctx.output.prUrl ?? ctx.data.prResult?.url;
|
|
2725
|
+
if (!prUrl) return;
|
|
2726
|
+
const prNumber = parsePrNumber(prUrl);
|
|
2727
|
+
if (!prNumber) return;
|
|
2728
|
+
let state;
|
|
2729
|
+
try {
|
|
2730
|
+
state = readTaskState("issue", issueNumber, ctx.cwd);
|
|
2731
|
+
} catch {
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
if (prUrl && !state.core.prUrl) state.core.prUrl = prUrl;
|
|
2735
|
+
try {
|
|
2736
|
+
writeTaskState("pr", prNumber, state, ctx.cwd);
|
|
2737
|
+
} catch (err) {
|
|
2738
|
+
process.stderr.write(
|
|
2739
|
+
`[kody2 mirrorStateToPr] failed to mirror state to PR #${prNumber}: ${err instanceof Error ? err.message : String(err)}
|
|
2740
|
+
`
|
|
2741
|
+
);
|
|
2742
|
+
}
|
|
2743
|
+
};
|
|
2744
|
+
function parsePrNumber(prUrl) {
|
|
2745
|
+
const m = prUrl.match(/\/pull\/(\d+)(?:[/?#]|$)/);
|
|
2746
|
+
if (!m) return null;
|
|
2747
|
+
const n = parseInt(m[1], 10);
|
|
2748
|
+
return Number.isFinite(n) ? n : null;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2719
2751
|
// src/scripts/parseAgentResult.ts
|
|
2720
2752
|
var parseAgentResult2 = async (ctx, profile, agentResult) => {
|
|
2721
2753
|
if (!agentResult) {
|
|
@@ -3504,6 +3536,11 @@ function synthesizeAction(ctx) {
|
|
|
3504
3536
|
};
|
|
3505
3537
|
}
|
|
3506
3538
|
|
|
3539
|
+
// src/scripts/skipAgent.ts
|
|
3540
|
+
var skipAgent = async (ctx) => {
|
|
3541
|
+
ctx.skipAgent = true;
|
|
3542
|
+
};
|
|
3543
|
+
|
|
3507
3544
|
// src/scripts/syncFlow.ts
|
|
3508
3545
|
import { execFileSync as execFileSync13 } from "child_process";
|
|
3509
3546
|
var syncFlow = async (ctx) => {
|
|
@@ -3787,7 +3824,8 @@ var preflightScripts = {
|
|
|
3787
3824
|
loadCoverageRules,
|
|
3788
3825
|
buildSyntheticPlugin,
|
|
3789
3826
|
resolveArtifacts,
|
|
3790
|
-
composePrompt
|
|
3827
|
+
composePrompt,
|
|
3828
|
+
skipAgent
|
|
3791
3829
|
};
|
|
3792
3830
|
var postflightScripts = {
|
|
3793
3831
|
parseAgentResult: parseAgentResult2,
|
|
@@ -3803,7 +3841,8 @@ var postflightScripts = {
|
|
|
3803
3841
|
postReviewResult,
|
|
3804
3842
|
persistArtifacts,
|
|
3805
3843
|
writeRunSummary,
|
|
3806
|
-
saveTaskState
|
|
3844
|
+
saveTaskState,
|
|
3845
|
+
mirrorStateToPr
|
|
3807
3846
|
};
|
|
3808
3847
|
var allScriptNames = /* @__PURE__ */ new Set([
|
|
3809
3848
|
...Object.keys(preflightScripts),
|
|
@@ -63,24 +63,27 @@ research stops at findings.>
|
|
|
63
63
|
|
|
64
64
|
Before writing your findings, scan the "Recent comments" block above for a
|
|
65
65
|
previous comment whose body starts with `## Research for issue`. If one
|
|
66
|
-
exists, you are in **delta mode
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
exists, you are in **delta mode**. In delta mode your ENTIRE PR_SUMMARY is
|
|
67
|
+
ONLY the following, and nothing else:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
## Delta since last research
|
|
71
|
+
**Answered:** <one bullet per prior question whose answer appears in a later comment, with the answer>
|
|
72
|
+
**Still open:** <one bullet per prior question nobody has answered>
|
|
73
|
+
**New:** <one bullet per newly surfaced gap or question from the latest comments — only if genuinely new>
|
|
74
|
+
|
|
75
|
+
## Updated scope (only if materially changed)
|
|
76
|
+
Short bullet list of what's now in or out of scope because of the answers.
|
|
77
|
+
If scope is unchanged, write: "Unchanged — see prior research."
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Do NOT re-emit Understood request, Repo context, Clarifying questions, or
|
|
81
|
+
Gaps & assumptions — they live in the prior comment. Keep the whole delta
|
|
82
|
+
under 25 lines. If nothing has changed since the prior research, output
|
|
83
|
+
`FAILED: no new information since last research` instead.
|
|
81
84
|
|
|
82
85
|
If no prior `## Research for issue` comment exists in the thread, produce
|
|
83
|
-
the full first-pass structure
|
|
86
|
+
the full first-pass structure below.
|
|
84
87
|
|
|
85
88
|
# Rules
|
|
86
89
|
- Read-only. Do NOT modify any file.
|
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.45",
|
|
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",
|