@kody-ade/kody-engine 0.4.359 → 0.4.360

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +23 -6
  2. 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.359",
18
+ version: "0.4.360",
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,7 +2707,7 @@ ${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
2712
  if (repoSlug && expected) {
2713
2713
  const target = readDispatchTargetKind(repoSlug, issueNumber);
@@ -2726,14 +2726,23 @@ function dispatchWorkflow(workflowFile, capability, issueNumber, repoSlug) {
2726
2726
  }
2727
2727
  }
2728
2728
  try {
2729
- gh(["workflow", "run", workflowFile, "-f", `capability=${capability}`, "-f", `issue_number=${issueNumber}`]);
2729
+ gh([
2730
+ "workflow",
2731
+ "run",
2732
+ workflowFile,
2733
+ ...ref ? ["--ref", ref] : [],
2734
+ "-f",
2735
+ `capability=${capability}`,
2736
+ "-f",
2737
+ `issue_number=${issueNumber}`
2738
+ ]);
2730
2739
  return { ok: true };
2731
2740
  } catch (err) {
2732
2741
  return { ok: false, error: err instanceof Error ? err.message : String(err) };
2733
2742
  }
2734
2743
  }
2735
- function startCapability(workflowFile, name, issue, repoSlug) {
2736
- return dispatchWorkflow(workflowFile, name, issue, repoSlug);
2744
+ function startCapability(workflowFile, name, issue, repoSlug, ref) {
2745
+ return dispatchWorkflow(workflowFile, name, issue, repoSlug, ref);
2737
2746
  }
2738
2747
  function expectedDispatchTarget(capability) {
2739
2748
  const route = resolveCapabilityAction(capability);
@@ -2913,7 +2922,13 @@ function capabilityToolDefinitions(opts) {
2913
2922
  if (!Number.isFinite(issue) || issue <= 0) {
2914
2923
  return { content: [{ type: "text", text: "Start failed: `issue` is required and must be a positive number." }] };
2915
2924
  }
2916
- const result = startCapability(workflowFile, name, issue, opts.repoSlug);
2925
+ const result = startCapability(
2926
+ workflowFile,
2927
+ name,
2928
+ issue,
2929
+ opts.repoSlug,
2930
+ opts.defaultBranch
2931
+ );
2917
2932
  const text = result.ok ? `Started capability \`${name}\` on #${issue} via workflow_dispatch.` : `Start failed for capability \`${name}\` on #${issue}: ${result.error}`;
2918
2933
  return { content: [{ type: "text", text }] };
2919
2934
  }
@@ -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.359",
3
+ "version": "0.4.360",
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",