@kody-ade/kody-engine 0.4.359 → 0.4.361
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/kody.js +28 -11
- package/package.json +1 -1
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.361",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -2707,9 +2707,9 @@ ${marker}` });
|
|
|
2707
2707
|
return { error: err instanceof Error ? err.message : String(err) };
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
|
-
function dispatchWorkflow(workflowFile, capability, issueNumber, repoSlug) {
|
|
2710
|
+
function dispatchWorkflow(workflowFile, capability, issueNumber, repoSlug, ref) {
|
|
2711
2711
|
const expected = expectedDispatchTarget(capability);
|
|
2712
|
-
if (repoSlug && expected) {
|
|
2712
|
+
if (repoSlug && expected && issueNumber) {
|
|
2713
2713
|
const target = readDispatchTargetKind(repoSlug, issueNumber);
|
|
2714
2714
|
if (!target.ok) return target;
|
|
2715
2715
|
if (expected === "issue" && target.kind === "pr") {
|
|
@@ -2726,14 +2726,22 @@ function dispatchWorkflow(workflowFile, capability, issueNumber, repoSlug) {
|
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
2728
|
try {
|
|
2729
|
-
gh([
|
|
2729
|
+
gh([
|
|
2730
|
+
"workflow",
|
|
2731
|
+
"run",
|
|
2732
|
+
workflowFile,
|
|
2733
|
+
...ref ? ["--ref", ref] : [],
|
|
2734
|
+
"-f",
|
|
2735
|
+
`capability=${capability}`,
|
|
2736
|
+
...issueNumber ? ["-f", `issue_number=${issueNumber}`] : []
|
|
2737
|
+
]);
|
|
2730
2738
|
return { ok: true };
|
|
2731
2739
|
} catch (err) {
|
|
2732
2740
|
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
2733
2741
|
}
|
|
2734
2742
|
}
|
|
2735
|
-
function startCapability(workflowFile, name, issue, repoSlug) {
|
|
2736
|
-
return dispatchWorkflow(workflowFile, name, issue, repoSlug);
|
|
2743
|
+
function startCapability(workflowFile, name, issue, repoSlug, ref) {
|
|
2744
|
+
return dispatchWorkflow(workflowFile, name, issue, repoSlug, ref);
|
|
2737
2745
|
}
|
|
2738
2746
|
function expectedDispatchTarget(capability) {
|
|
2739
2747
|
const route = resolveCapabilityAction(capability);
|
|
@@ -2909,12 +2917,19 @@ function capabilityToolDefinitions(opts) {
|
|
|
2909
2917
|
},
|
|
2910
2918
|
handler: async (args) => {
|
|
2911
2919
|
const name = String(args.name ?? "");
|
|
2912
|
-
const
|
|
2913
|
-
|
|
2914
|
-
|
|
2920
|
+
const rawIssue = args.issue ?? args.issueNumber;
|
|
2921
|
+
const issue = rawIssue == null ? void 0 : Number(rawIssue);
|
|
2922
|
+
if (issue !== void 0 && (!Number.isFinite(issue) || issue <= 0)) {
|
|
2923
|
+
return { content: [{ type: "text", text: "Start failed: `issue` must be a positive number when provided." }] };
|
|
2915
2924
|
}
|
|
2916
|
-
const result = startCapability(
|
|
2917
|
-
|
|
2925
|
+
const result = startCapability(
|
|
2926
|
+
workflowFile,
|
|
2927
|
+
name,
|
|
2928
|
+
issue,
|
|
2929
|
+
opts.repoSlug,
|
|
2930
|
+
opts.defaultBranch
|
|
2931
|
+
);
|
|
2932
|
+
const text = result.ok ? `Started capability \`${name}\`${issue ? ` on #${issue}` : ""} via workflow_dispatch.` : `Start failed for capability \`${name}\`${issue ? ` on #${issue}` : ""}: ${result.error}`;
|
|
2918
2933
|
return { content: [{ type: "text", text }] };
|
|
2919
2934
|
}
|
|
2920
2935
|
};
|
|
@@ -3265,6 +3280,7 @@ async function runAgent(opts) {
|
|
|
3265
3280
|
repoSlug: opts.capabilityRepoSlug,
|
|
3266
3281
|
state: opts.capabilityState,
|
|
3267
3282
|
operatorMention: opts.capabilityOperatorMention ?? "",
|
|
3283
|
+
...opts.capabilityDefaultBranch ? { defaultBranch: opts.capabilityDefaultBranch } : {},
|
|
3268
3284
|
...opts.capabilitySlug ? { capabilitySlug: opts.capabilitySlug } : {}
|
|
3269
3285
|
});
|
|
3270
3286
|
mcpEntries.push(["kody-capability", capabilityHandle.server]);
|
|
@@ -19857,6 +19873,7 @@ async function runImplementation(profileName, input) {
|
|
|
19857
19873
|
// keys trust per capability (not per agent). `jobSlug` is set by loadJobFromFile.
|
|
19858
19874
|
capabilitySlug: typeof ctx.data.jobSlug === "string" ? ctx.data.jobSlug : void 0,
|
|
19859
19875
|
capabilityState: config.state,
|
|
19876
|
+
capabilityDefaultBranch: config.git.defaultBranch,
|
|
19860
19877
|
// owner/repo from kody.config.json; envelope falls back to GITHUB_REPOSITORY
|
|
19861
19878
|
// for tester repos that don't set config.github (the file isn't always
|
|
19862
19879
|
// checked in). Either way, capabilityMcp needs "owner/name" to hit the compare API.
|
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.361",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|