@kody-ade/kody-engine 0.2.44 → 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),
|
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",
|