@kody-ade/kody-engine 0.4.503 → 0.4.505
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 +31 -9
- 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.505",
|
|
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",
|
|
@@ -22317,6 +22317,7 @@ async function runLinearCapabilityWorkflow(parent, workflow, capability, base) {
|
|
|
22317
22317
|
workflowTitle: capability.title,
|
|
22318
22318
|
workflowStepCount: workflow.steps.length,
|
|
22319
22319
|
workflowIssueNumber: workflowIssueNumber(parent),
|
|
22320
|
+
workflowContext: workflowInputContext(parent.cliArgs),
|
|
22320
22321
|
workflowFacts: parent.workflowFacts ?? {},
|
|
22321
22322
|
workflowStack: [
|
|
22322
22323
|
...Array.isArray(base.preloadedData?.workflowStack) ? base.preloadedData.workflowStack.filter((entry) => typeof entry === "string") : [],
|
|
@@ -22362,7 +22363,10 @@ async function runLinearCapabilityWorkflow(parent, workflow, capability, base) {
|
|
|
22362
22363
|
...chainData,
|
|
22363
22364
|
...result.taskState ? { taskState: result.taskState } : {},
|
|
22364
22365
|
...outcome ? { workflowLastOutcome: outcome } : {},
|
|
22365
|
-
...result.capabilityOutput !== void 0 ? {
|
|
22366
|
+
...result.capabilityOutput !== void 0 ? {
|
|
22367
|
+
workflowLastOutput: result.capabilityOutput,
|
|
22368
|
+
workflowContext: mergeWorkflowContext(chainData.workflowContext, result.capabilityOutput)
|
|
22369
|
+
} : {},
|
|
22366
22370
|
...prUrl ? { workflowPrUrl: prUrl } : {},
|
|
22367
22371
|
...parsePrNumber5(prUrl) ? { workflowPrNumber: parsePrNumber5(prUrl) } : {}
|
|
22368
22372
|
};
|
|
@@ -22429,6 +22433,7 @@ function workflowChainData(parent, capability, base, state) {
|
|
|
22429
22433
|
workflowTitle: capability.title,
|
|
22430
22434
|
workflowStepCount: capability.config.workflow?.steps.length ?? 0,
|
|
22431
22435
|
workflowIssueNumber: workflowIssueNumber(parent),
|
|
22436
|
+
workflowContext: base.preloadedData?.workflowContext ?? workflowInputContext(parent.cliArgs),
|
|
22432
22437
|
workflowFacts: state.facts,
|
|
22433
22438
|
workflowEvidence: state.evidence,
|
|
22434
22439
|
workflowArtifacts: state.artifacts,
|
|
@@ -22506,7 +22511,10 @@ async function runGraphCapabilityWorkflow(parent, workflow, capability, base, ch
|
|
|
22506
22511
|
...result.taskState ? { taskState: result.taskState } : {},
|
|
22507
22512
|
...outcome ? { workflowLastOutcome: outcome } : {},
|
|
22508
22513
|
...result.capabilityResults?.at(-1) ? { workflowLastResult: result.capabilityResults.at(-1) } : {},
|
|
22509
|
-
...result.capabilityOutput !== void 0 ? {
|
|
22514
|
+
...result.capabilityOutput !== void 0 ? {
|
|
22515
|
+
workflowLastOutput: result.capabilityOutput,
|
|
22516
|
+
workflowContext: mergeWorkflowContext(chainData.workflowContext, result.capabilityOutput)
|
|
22517
|
+
} : {},
|
|
22510
22518
|
...prUrl ? { workflowPrUrl: prUrl } : {},
|
|
22511
22519
|
...parsePrNumber5(prUrl) ? { workflowPrNumber: parsePrNumber5(prUrl) } : {}
|
|
22512
22520
|
};
|
|
@@ -22647,7 +22655,7 @@ function workflowStepToJob(step, parent, chainData, cwd) {
|
|
|
22647
22655
|
rawArgs.issue = targetNumber;
|
|
22648
22656
|
}
|
|
22649
22657
|
const genericInput = capabilityStepInput(
|
|
22650
|
-
step.input ?? chainData.workflowLastOutput ?? genericInputFromArgs(rawArgs),
|
|
22658
|
+
step.input ?? chainData.workflowContext ?? chainData.workflowLastOutput ?? genericInputFromArgs(rawArgs),
|
|
22651
22659
|
step.target,
|
|
22652
22660
|
targetNumber
|
|
22653
22661
|
);
|
|
@@ -22686,6 +22694,16 @@ function genericInputFromArgs(args) {
|
|
|
22686
22694
|
}
|
|
22687
22695
|
return args;
|
|
22688
22696
|
}
|
|
22697
|
+
function workflowInputContext(args) {
|
|
22698
|
+
const input = genericInputFromArgs(args);
|
|
22699
|
+
if (input && typeof input === "object" && !Array.isArray(input)) return { ...input };
|
|
22700
|
+
return input === void 0 ? {} : { request: input };
|
|
22701
|
+
}
|
|
22702
|
+
function mergeWorkflowContext(current, output) {
|
|
22703
|
+
const context = current && typeof current === "object" && !Array.isArray(current) ? current : {};
|
|
22704
|
+
if (!output || typeof output !== "object" || Array.isArray(output)) return { ...context };
|
|
22705
|
+
return { ...context, ...output };
|
|
22706
|
+
}
|
|
22689
22707
|
function parseGenericInput(value) {
|
|
22690
22708
|
if (typeof value !== "string") return value;
|
|
22691
22709
|
try {
|
|
@@ -24870,8 +24888,8 @@ function routeRunRequest(request) {
|
|
|
24870
24888
|
const workflowRunId = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/.test(requestedRunId) ? requestedRunId : void 0;
|
|
24871
24889
|
const { runId: _runId, ...workflowInput } = objectValue2(request.input) ?? {};
|
|
24872
24890
|
return {
|
|
24873
|
-
kind: "
|
|
24874
|
-
|
|
24891
|
+
kind: "workflow",
|
|
24892
|
+
workflow: target.id,
|
|
24875
24893
|
cliArgs: workflowInput,
|
|
24876
24894
|
...workflowRunId ? { workflowRunId } : {}
|
|
24877
24895
|
};
|
|
@@ -25123,6 +25141,7 @@ async function runCi(argv) {
|
|
|
25123
25141
|
let forceRunAction = null;
|
|
25124
25142
|
let forceRunCliArgs = {};
|
|
25125
25143
|
let forceWorkflowRunId;
|
|
25144
|
+
let forceRunTargetKind = "action";
|
|
25126
25145
|
let runRequestFanOut = false;
|
|
25127
25146
|
let runRequestFanOutForce = false;
|
|
25128
25147
|
const parsedRunRequest = readRunRequestFromEnv();
|
|
@@ -25131,8 +25150,6 @@ async function runCi(argv) {
|
|
|
25131
25150
|
`);
|
|
25132
25151
|
return 64;
|
|
25133
25152
|
}
|
|
25134
|
-
if (parsedRunRequest && "request" in parsedRunRequest) {
|
|
25135
|
-
}
|
|
25136
25153
|
const explicitLoopRequest = parsedRunRequest && "request" in parsedRunRequest && parsedRunRequest.request.target.type === "loop";
|
|
25137
25154
|
if (!args.issueNumber && !autoFallback && parsedRunRequest && "request" in parsedRunRequest) {
|
|
25138
25155
|
const route = routeRunRequest(parsedRunRequest.request);
|
|
@@ -25148,6 +25165,11 @@ async function runCi(argv) {
|
|
|
25148
25165
|
forceRunAction = route.action;
|
|
25149
25166
|
forceRunCliArgs = route.cliArgs;
|
|
25150
25167
|
forceWorkflowRunId = route.workflowRunId;
|
|
25168
|
+
} else if (route.kind === "workflow") {
|
|
25169
|
+
forceRunAction = route.workflow;
|
|
25170
|
+
forceRunTargetKind = "workflow";
|
|
25171
|
+
forceRunCliArgs = route.cliArgs;
|
|
25172
|
+
forceWorkflowRunId = route.workflowRunId;
|
|
25151
25173
|
}
|
|
25152
25174
|
}
|
|
25153
25175
|
const envForceAction = (process.env.KODY_FORCE_ACTION ?? "").trim();
|
|
@@ -25197,7 +25219,7 @@ async function runCi(argv) {
|
|
|
25197
25219
|
const capabilityRoot = capabilitiesRoot(cwd);
|
|
25198
25220
|
const directCapability = manualGoalManager ? null : resolveCapabilityFolder(forceRunAction, capabilityRoot);
|
|
25199
25221
|
const directExecution = directCapability ? resolveCapabilityExecution(directCapability, cwd) : null;
|
|
25200
|
-
const capabilityRoute = manualGoalManager ? null : resolveCapabilityAction(forceRunAction, capabilityRoot) ?? (directCapability && directExecution && (directCapability.config.action ?? directCapability.slug) === forceRunAction ? {
|
|
25222
|
+
const capabilityRoute = manualGoalManager || forceRunTargetKind === "workflow" ? null : resolveCapabilityAction(forceRunAction, capabilityRoot) ?? (directCapability && directExecution && (directCapability.config.action ?? directCapability.slug) === forceRunAction ? {
|
|
25201
25223
|
action: forceRunAction,
|
|
25202
25224
|
capability: directCapability.slug,
|
|
25203
25225
|
implementation: directExecution.implementation,
|
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.505",
|
|
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",
|