@kody-ade/kody-engine 0.4.626 → 0.4.628

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 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.626",
18
+ version: "0.4.628",
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
  repository: {
@@ -24363,7 +24363,7 @@ function enforceCapabilityOutputContract(capability, result) {
24363
24363
  if (result.exitCode !== 0 || !schema) {
24364
24364
  return result;
24365
24365
  }
24366
- const contractOutput = result.capabilityOutput === void 0 && typeof result.prUrl === "string" && result.prUrl.trim().length > 0 ? { prUrl: result.prUrl } : result.capabilityOutput;
24366
+ const contractOutput = result.capabilityOutput === void 0 && typeof result.prUrl === "string" && result.prUrl.trim().length > 0 ? { status: "changed", summary: `Pull request opened: ${result.prUrl}` } : result.capabilityOutput;
24367
24367
  try {
24368
24368
  validateCapabilityContractOutput(schema, contractOutput);
24369
24369
  return contractOutput === result.capabilityOutput ? result : { ...result, capabilityOutput: contractOutput };
@@ -24840,7 +24840,7 @@ function withWorkflowBoundaryEval(capability, result) {
24840
24840
  function workflowStepToJob(step, parent, chainData, cwd) {
24841
24841
  const action = step.action ?? step.capability;
24842
24842
  const targetNumber = workflowStepTargetNumber(step, parent, chainData);
24843
- const mappedInputs = resolveWorkflowStepInputs(step, chainData);
24843
+ const mappedInputs = resolveWorkflowStepInputs(step, chainData, cwd);
24844
24844
  const rawArgs = mappedInputs ? { ...mappedInputs } : { ...parent.cliArgs };
24845
24845
  if (step.target === "pr") {
24846
24846
  if (typeof targetNumber !== "number") {
@@ -24874,7 +24874,7 @@ function workflowStepToJob(step, parent, chainData, cwd) {
24874
24874
  ...parent.resultTarget ? { resultTarget: parent.resultTarget } : {}
24875
24875
  };
24876
24876
  }
24877
- function resolveWorkflowStepInputs(step, chainData) {
24877
+ function resolveWorkflowStepInputs(step, chainData, cwd) {
24878
24878
  if (!step.inputs) return void 0;
24879
24879
  const source = {
24880
24880
  workflow: {
@@ -24884,16 +24884,23 @@ function resolveWorkflowStepInputs(step, chainData) {
24884
24884
  },
24885
24885
  steps: chainData.workflowStepResults ?? {}
24886
24886
  };
24887
+ const folder = resolveCapabilityFolder(step.capability, hydratedCapabilitiesRoot(cwd));
24888
+ const requiredInputs = folder ? capabilityRequiredInputNames(folder) : null;
24887
24889
  const input = {};
24888
24890
  for (const [name, binding] of Object.entries(step.inputs)) {
24889
24891
  const value = resolveDottedPath2(source, binding.from);
24890
24892
  if (value === void 0) {
24893
+ if (requiredInputs && !requiredInputs.has(name)) continue;
24891
24894
  throw new InvalidJobError(`workflow step ${step.id ?? step.capability} needs missing input ${binding.from}`);
24892
24895
  }
24893
24896
  input[name] = value;
24894
24897
  }
24895
24898
  return input;
24896
24899
  }
24900
+ function capabilityRequiredInputNames(folder) {
24901
+ const required2 = folder.config.inputSchema?.required;
24902
+ return new Set(Array.isArray(required2) ? required2.filter((name) => typeof name === "string") : []);
24903
+ }
24897
24904
  function capabilityInputNames(folder) {
24898
24905
  const properties = folder.config.inputSchema?.properties;
24899
24906
  if (!properties || typeof properties !== "object" || Array.isArray(properties)) return /* @__PURE__ */ new Set();
@@ -9,6 +9,11 @@ whether repository verification was configured and passed and whether a commit
9
9
  was actually pushed. Agent-written prose cannot turn an unverified or unpushed
10
10
  result into a success claim.
11
11
 
12
+ A successful PR delivery keeps the PR URL as delivery metadata and reports the
13
+ capability result as `status: changed` with a plain summary. This lets strict
14
+ repository-owned capability contracts validate the outcome without treating
15
+ delivery metadata as undeclared business output.
16
+
12
17
  ## What happens to each kind of change
13
18
 
14
19
  | Change | Result |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.626",
3
+ "version": "0.4.628",
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
  "repository": {