@kody-ade/kody-engine 0.4.342 → 0.4.344
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 +85 -51
- 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.344",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -4951,11 +4951,11 @@ function emptyState() {
|
|
|
4951
4951
|
core: {
|
|
4952
4952
|
phase: "idle",
|
|
4953
4953
|
status: "pending",
|
|
4954
|
-
|
|
4954
|
+
currentImplementation: null,
|
|
4955
4955
|
lastOutcome: null,
|
|
4956
4956
|
attempts: {}
|
|
4957
4957
|
},
|
|
4958
|
-
|
|
4958
|
+
implementations: {},
|
|
4959
4959
|
artifacts: {},
|
|
4960
4960
|
jobs: {},
|
|
4961
4961
|
history: []
|
|
@@ -4972,27 +4972,33 @@ function normalizeTaskState(parsed) {
|
|
|
4972
4972
|
if (parsed?.schemaVersion !== 1) {
|
|
4973
4973
|
throw new CorruptStateError(`unexpected schemaVersion: ${JSON.stringify(parsed?.schemaVersion)}`);
|
|
4974
4974
|
}
|
|
4975
|
+
const raw = parsed;
|
|
4976
|
+
const legacyCurrent = typeof raw.core?.currentExecutable === "string" ? raw.core.currentExecutable : void 0;
|
|
4977
|
+
const currentImplementation = typeof parsed.core?.currentImplementation === "string" ? parsed.core.currentImplementation : legacyCurrent ?? null;
|
|
4978
|
+
const implementations = parsed.implementations && typeof parsed.implementations === "object" ? parsed.implementations : raw.executables && typeof raw.executables === "object" && !Array.isArray(raw.executables) ? raw.executables : {};
|
|
4979
|
+
const coreWithoutLegacy = { ...parsed.core ?? {} };
|
|
4980
|
+
delete coreWithoutLegacy.currentExecutable;
|
|
4975
4981
|
return {
|
|
4976
4982
|
schemaVersion: 1,
|
|
4977
|
-
core: { ...emptyState().core, ...
|
|
4978
|
-
|
|
4983
|
+
core: { ...emptyState().core, ...coreWithoutLegacy, currentImplementation },
|
|
4984
|
+
implementations,
|
|
4979
4985
|
artifacts: parsed.artifacts && typeof parsed.artifacts === "object" ? parsed.artifacts : {},
|
|
4980
4986
|
jobs: normalizeJobs(parsed.jobs),
|
|
4981
|
-
history:
|
|
4987
|
+
history: normalizeHistory(parsed.history),
|
|
4982
4988
|
flow: parsed.flow
|
|
4983
4989
|
};
|
|
4984
4990
|
}
|
|
4985
|
-
function reduce(state,
|
|
4991
|
+
function reduce(state, implementation, action, phase, agent, job) {
|
|
4986
4992
|
if (!action) return state;
|
|
4987
|
-
const newAttempts = { ...state.core.attempts, [
|
|
4988
|
-
const
|
|
4989
|
-
...state.
|
|
4990
|
-
[
|
|
4993
|
+
const newAttempts = { ...state.core.attempts, [implementation]: (state.core.attempts[implementation] ?? 0) + 1 };
|
|
4994
|
+
const newImplementations = {
|
|
4995
|
+
...state.implementations,
|
|
4996
|
+
[implementation]: { ...state.implementations[implementation] ?? { lastAction: null }, lastAction: action }
|
|
4991
4997
|
};
|
|
4992
4998
|
const ranAsAgent = typeof agent === "string" && agent.length > 0 ? agent : void 0;
|
|
4993
4999
|
const entry = {
|
|
4994
5000
|
timestamp: action.timestamp,
|
|
4995
|
-
|
|
5001
|
+
implementation,
|
|
4996
5002
|
action: action.type,
|
|
4997
5003
|
note: noteFromAction(action),
|
|
4998
5004
|
agent: ranAsAgent,
|
|
@@ -5003,19 +5009,19 @@ function reduce(state, executable, action, phase, agent, job) {
|
|
|
5003
5009
|
...job?.runUrl ? { runUrl: job.runUrl } : {}
|
|
5004
5010
|
};
|
|
5005
5011
|
const newHistory = [...state.history, entry].slice(-HISTORY_MAX_ENTRIES);
|
|
5006
|
-
const newJobs = reduceJobs(state.jobs ?? {},
|
|
5012
|
+
const newJobs = reduceJobs(state.jobs ?? {}, implementation, action, agent, job);
|
|
5007
5013
|
return {
|
|
5008
5014
|
schemaVersion: 1,
|
|
5009
5015
|
core: {
|
|
5010
5016
|
...state.core,
|
|
5011
5017
|
attempts: newAttempts,
|
|
5012
5018
|
lastOutcome: action,
|
|
5013
|
-
|
|
5019
|
+
currentImplementation: implementation,
|
|
5014
5020
|
ranAsAgent: ranAsAgent ?? null,
|
|
5015
5021
|
status: statusFromAction(action),
|
|
5016
5022
|
phase: phaseFromAction(action, phase)
|
|
5017
5023
|
},
|
|
5018
|
-
|
|
5024
|
+
implementations: newImplementations,
|
|
5019
5025
|
artifacts: { ...state.artifacts ?? {} },
|
|
5020
5026
|
jobs: newJobs,
|
|
5021
5027
|
history: newHistory,
|
|
@@ -5029,7 +5035,7 @@ function upsertTaskJobs(state, planned, timestamp) {
|
|
|
5029
5035
|
const prior = jobs[plan.id];
|
|
5030
5036
|
jobs[plan.id] = {
|
|
5031
5037
|
id: plan.id,
|
|
5032
|
-
|
|
5038
|
+
implementation: plan.implementation,
|
|
5033
5039
|
...plan.capability ?? prior?.capability ? { capability: plan.capability ?? prior?.capability } : {},
|
|
5034
5040
|
...plan.agent ?? prior?.agent ? { agent: plan.agent ?? prior?.agent } : {},
|
|
5035
5041
|
...plan.flavor ?? prior?.flavor ? { flavor: plan.flavor ?? prior?.flavor } : {},
|
|
@@ -5056,9 +5062,9 @@ function nextPendingTaskJob(state, ids) {
|
|
|
5056
5062
|
}
|
|
5057
5063
|
return null;
|
|
5058
5064
|
}
|
|
5059
|
-
function reduceJobs(jobs,
|
|
5065
|
+
function reduceJobs(jobs, implementation, action, agent, job) {
|
|
5060
5066
|
const status = statusFromAction(action);
|
|
5061
|
-
const id = job?.jobKey || job?.jobId || `legacy:${
|
|
5067
|
+
const id = job?.jobKey || job?.jobId || `legacy:${implementation}`;
|
|
5062
5068
|
const prior = jobs[id];
|
|
5063
5069
|
const note = noteFromAction(action);
|
|
5064
5070
|
const prUrl = job?.prUrl ?? prUrlFromAction(action);
|
|
@@ -5075,7 +5081,7 @@ function reduceJobs(jobs, executable, action, agent, job) {
|
|
|
5075
5081
|
const ranAsAgent = typeof agent === "string" && agent.length > 0 ? agent : job?.agent;
|
|
5076
5082
|
const next = {
|
|
5077
5083
|
id,
|
|
5078
|
-
|
|
5084
|
+
implementation: job?.implementation ?? prior?.implementation ?? implementation,
|
|
5079
5085
|
...job?.capability ?? prior?.capability ? { capability: job?.capability ?? prior?.capability } : {},
|
|
5080
5086
|
...ranAsAgent ?? prior?.agent ? { agent: ranAsAgent ?? prior?.agent } : {},
|
|
5081
5087
|
...job?.flavor ?? prior?.flavor ? { flavor: job?.flavor ?? prior?.flavor } : {},
|
|
@@ -5118,11 +5124,12 @@ function normalizeJobs(input) {
|
|
|
5118
5124
|
for (const [key, value] of Object.entries(input)) {
|
|
5119
5125
|
if (!value || typeof value !== "object" || Array.isArray(value)) continue;
|
|
5120
5126
|
const raw = value;
|
|
5121
|
-
|
|
5127
|
+
const implementation = typeof raw.implementation === "string" ? raw.implementation : typeof raw.executable === "string" ? raw.executable : void 0;
|
|
5128
|
+
if (typeof raw.id !== "string" || typeof implementation !== "string") continue;
|
|
5122
5129
|
if (!isStatus(raw.status)) continue;
|
|
5123
5130
|
out[key] = {
|
|
5124
5131
|
id: raw.id,
|
|
5125
|
-
|
|
5132
|
+
implementation,
|
|
5126
5133
|
...typeof raw.capability === "string" ? { capability: raw.capability } : {},
|
|
5127
5134
|
...typeof raw.agent === "string" ? { agent: raw.agent } : {},
|
|
5128
5135
|
...raw.flavor === "instant" || raw.flavor === "scheduled" ? { flavor: raw.flavor } : {},
|
|
@@ -5140,6 +5147,31 @@ function normalizeJobs(input) {
|
|
|
5140
5147
|
}
|
|
5141
5148
|
return out;
|
|
5142
5149
|
}
|
|
5150
|
+
function normalizeHistory(input) {
|
|
5151
|
+
if (!Array.isArray(input)) return [];
|
|
5152
|
+
const out = [];
|
|
5153
|
+
for (const value of input) {
|
|
5154
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) continue;
|
|
5155
|
+
const raw = value;
|
|
5156
|
+
const implementation = typeof raw.implementation === "string" ? raw.implementation : typeof raw.executable === "string" ? raw.executable : void 0;
|
|
5157
|
+
if (typeof raw.timestamp !== "string" || typeof implementation !== "string" || typeof raw.action !== "string") {
|
|
5158
|
+
continue;
|
|
5159
|
+
}
|
|
5160
|
+
out.push({
|
|
5161
|
+
timestamp: raw.timestamp,
|
|
5162
|
+
implementation,
|
|
5163
|
+
action: raw.action,
|
|
5164
|
+
...typeof raw.note === "string" ? { note: raw.note } : {},
|
|
5165
|
+
...typeof raw.agent === "string" ? { agent: raw.agent } : {},
|
|
5166
|
+
...typeof raw.jobId === "string" ? { jobId: raw.jobId } : {},
|
|
5167
|
+
...raw.flavor === "instant" || raw.flavor === "scheduled" ? { flavor: raw.flavor } : {},
|
|
5168
|
+
...typeof raw.schedule === "string" ? { schedule: raw.schedule } : {},
|
|
5169
|
+
...isStatus(raw.status) ? { status: raw.status } : {},
|
|
5170
|
+
...typeof raw.runUrl === "string" ? { runUrl: raw.runUrl } : {}
|
|
5171
|
+
});
|
|
5172
|
+
}
|
|
5173
|
+
return out;
|
|
5174
|
+
}
|
|
5143
5175
|
function isTaskJobRun(input) {
|
|
5144
5176
|
if (!input || typeof input !== "object" || Array.isArray(input)) return false;
|
|
5145
5177
|
const run = input;
|
|
@@ -5156,8 +5188,8 @@ function renderStateComment(state) {
|
|
|
5156
5188
|
lines.push(`- **Flow:** \`${state.flow.name}\` (step: \`${state.flow.step}\`)`);
|
|
5157
5189
|
}
|
|
5158
5190
|
lines.push(`- **Phase:** \`${state.core.phase}\` **Status:** \`${state.core.status}\``);
|
|
5159
|
-
if (state.core.
|
|
5160
|
-
lines.push(`- **Last
|
|
5191
|
+
if (state.core.currentImplementation) {
|
|
5192
|
+
lines.push(`- **Last implementation:** \`${state.core.currentImplementation}\``);
|
|
5161
5193
|
}
|
|
5162
5194
|
if (state.core.ranAsAgent) {
|
|
5163
5195
|
lines.push(`- **Ran as:** \`${state.core.ranAsAgent}\``);
|
|
@@ -5185,7 +5217,7 @@ function renderStateComment(state) {
|
|
|
5185
5217
|
const recent = state.history.slice(-10).reverse();
|
|
5186
5218
|
for (const h of recent) {
|
|
5187
5219
|
const note = h.note ? ` \u2014 ${h.note}` : "";
|
|
5188
|
-
lines.push(`- \`${h.timestamp}\` **${h.
|
|
5220
|
+
lines.push(`- \`${h.timestamp}\` **${h.implementation}** \u2192 \`${h.action}\`${note}`);
|
|
5189
5221
|
}
|
|
5190
5222
|
lines.push("");
|
|
5191
5223
|
}
|
|
@@ -5193,7 +5225,7 @@ function renderStateComment(state) {
|
|
|
5193
5225
|
lines.push("### Jobs");
|
|
5194
5226
|
lines.push("");
|
|
5195
5227
|
for (const job of jobEntries) {
|
|
5196
|
-
lines.push(`- \`${job.id}\` **${job.
|
|
5228
|
+
lines.push(`- \`${job.id}\` **${job.implementation}** \u2192 \`${job.status}\` (${job.agentRuns.length} runs)`);
|
|
5197
5229
|
}
|
|
5198
5230
|
lines.push("");
|
|
5199
5231
|
}
|
|
@@ -5210,7 +5242,7 @@ function renderStateComment(state) {
|
|
|
5210
5242
|
core: state.core,
|
|
5211
5243
|
artifacts: state.artifacts ?? {},
|
|
5212
5244
|
jobs: state.jobs ?? {},
|
|
5213
|
-
|
|
5245
|
+
implementations: state.implementations,
|
|
5214
5246
|
history: state.history,
|
|
5215
5247
|
...state.flow ? { flow: state.flow } : {}
|
|
5216
5248
|
},
|
|
@@ -5758,7 +5790,7 @@ async function runContainerLoop(profile, ctx, input) {
|
|
|
5758
5790
|
}
|
|
5759
5791
|
const priorState = readContainerState(ctx, child, reader);
|
|
5760
5792
|
if (priorState.core?.prUrl) knownPrUrl = priorState.core.prUrl;
|
|
5761
|
-
const priorAction = priorState.
|
|
5793
|
+
const priorAction = priorState.implementations?.[child.exec]?.lastAction;
|
|
5762
5794
|
let actionType2;
|
|
5763
5795
|
if (priorAction && /_COMPLETED$/i.test(priorAction.type)) {
|
|
5764
5796
|
process.stderr.write(`[kody container] skipping ${child.exec}: already completed (${priorAction.type})
|
|
@@ -5851,7 +5883,7 @@ async function runContainerLoop(profile, ctx, input) {
|
|
|
5851
5883
|
const next = readContainerState(ctx, child, reader);
|
|
5852
5884
|
if (next.core?.prUrl) knownPrUrl = next.core.prUrl;
|
|
5853
5885
|
const nextAttempts = next.core?.attempts?.[child.exec] ?? 0;
|
|
5854
|
-
const nextChildAction = next.
|
|
5886
|
+
const nextChildAction = next.implementations?.[child.exec]?.lastAction;
|
|
5855
5887
|
const childWrote = nextAttempts > priorAttempts && nextChildAction != null;
|
|
5856
5888
|
if (childWrote && nextChildAction) {
|
|
5857
5889
|
actionType2 = nextChildAction.type;
|
|
@@ -5872,7 +5904,7 @@ async function runContainerLoop(profile, ctx, input) {
|
|
|
5872
5904
|
next.core = {
|
|
5873
5905
|
phase: "idle",
|
|
5874
5906
|
status: "pending",
|
|
5875
|
-
|
|
5907
|
+
currentImplementation: null,
|
|
5876
5908
|
lastOutcome: synthetic,
|
|
5877
5909
|
// Bump attempts here too — a synthesized action is, semantically,
|
|
5878
5910
|
// a saveTaskState write that just didn't happen mechanically.
|
|
@@ -6689,7 +6721,7 @@ var init_evaluateAgencyBoundaries = __esm({
|
|
|
6689
6721
|
init_agencyBoundaryEval();
|
|
6690
6722
|
init_capabilityResult();
|
|
6691
6723
|
evaluateAgencyBoundariesScript = async (ctx, profile, agentResult) => {
|
|
6692
|
-
const results = collectResults(ctx.data.capabilityResults
|
|
6724
|
+
const results = collectResults(ctx.data.capabilityResults, agentResult);
|
|
6693
6725
|
const capabilityKind = agencyBoundaryCapabilityKind(ctx.data, profile);
|
|
6694
6726
|
const capability = agencyBoundaryCapability(ctx.data, profile);
|
|
6695
6727
|
const evalResult = evaluateAgencyBoundaries({
|
|
@@ -7033,7 +7065,7 @@ function jobMetaFromData(data) {
|
|
|
7033
7065
|
schedule: typeof data.jobSchedule === "string" ? data.jobSchedule : void 0,
|
|
7034
7066
|
runUrl: typeof data.runUrl === "string" ? data.runUrl : void 0,
|
|
7035
7067
|
capability: typeof data.jobCapability === "string" ? data.jobCapability : void 0,
|
|
7036
|
-
|
|
7068
|
+
implementation: typeof data.jobImplementation === "string" ? data.jobImplementation : typeof data.jobExecutable === "string" ? data.jobExecutable : void 0,
|
|
7037
7069
|
target: typeof data.jobTarget === "number" ? data.jobTarget : void 0,
|
|
7038
7070
|
agent: typeof data.jobAgent === "string" ? data.jobAgent : void 0,
|
|
7039
7071
|
why: typeof data.jobWhy === "string" ? data.jobWhy : void 0
|
|
@@ -7046,7 +7078,7 @@ function applyStandaloneFinalState(state, ctx, profile) {
|
|
|
7046
7078
|
const succeeded = ctx.output.exitCode === 0 && (hasPr || noDeliveryNeeded);
|
|
7047
7079
|
state.core.phase = succeeded ? hasPr ? "reviewing" : "shipped" : "failed";
|
|
7048
7080
|
state.core.status = succeeded ? "succeeded" : "failed";
|
|
7049
|
-
state.core.
|
|
7081
|
+
state.core.currentImplementation = null;
|
|
7050
7082
|
}
|
|
7051
7083
|
function synthesizeAction(ctx) {
|
|
7052
7084
|
const ok = ctx.output.exitCode === 0;
|
|
@@ -7071,9 +7103,9 @@ var init_saveTaskState = __esm({
|
|
|
7071
7103
|
const number = ctx.data.commentTargetNumber;
|
|
7072
7104
|
const state = ctx.data.taskState;
|
|
7073
7105
|
if (!target || !number || !state) return;
|
|
7074
|
-
const
|
|
7106
|
+
const implementation = profile.name;
|
|
7075
7107
|
const action = ctx.data.action ?? synthesizeAction(ctx);
|
|
7076
|
-
const next = reduce(state,
|
|
7108
|
+
const next = reduce(state, implementation, action, profile.phase, profile.agent, {
|
|
7077
7109
|
...jobMetaFromData(ctx.data),
|
|
7078
7110
|
...ctx.output.prUrl ? { prUrl: ctx.output.prUrl } : {}
|
|
7079
7111
|
});
|
|
@@ -10886,7 +10918,7 @@ var init_applyCapabilityReports = __esm({
|
|
|
10886
10918
|
init_issue();
|
|
10887
10919
|
applyCapabilityReports = async (ctx, _profile, agentResult) => {
|
|
10888
10920
|
const reports = collectReports(ctx.data.capabilityReports, agentResult);
|
|
10889
|
-
const results = collectResults2(ctx.data.capabilityResults
|
|
10921
|
+
const results = collectResults2(ctx.data.capabilityResults, agentResult);
|
|
10890
10922
|
const resultTarget = parseResultTarget(ctx.data.capabilityResultTarget);
|
|
10891
10923
|
const resultGoalId = resultTarget?.id ?? (typeof ctx.args.goal === "string" && ctx.args.goal.length > 0 ? ctx.args.goal : null);
|
|
10892
10924
|
const explicitEvidence = resultTarget?.evidence ?? (typeof ctx.args.evidence === "string" && ctx.args.evidence.length > 0 ? ctx.args.evidence : void 0);
|
|
@@ -12831,8 +12863,9 @@ var init_jobIdentity = __esm({
|
|
|
12831
12863
|
function taskJobToJob(job, issueArg) {
|
|
12832
12864
|
const target = typeof job.target === "number" ? job.target : typeof issueArg === "number" ? issueArg : void 0;
|
|
12833
12865
|
return {
|
|
12834
|
-
capability: job.capability ?? job.
|
|
12835
|
-
|
|
12866
|
+
capability: job.capability ?? job.implementation,
|
|
12867
|
+
implementation: job.implementation,
|
|
12868
|
+
executable: job.implementation,
|
|
12836
12869
|
...job.reason ? { why: job.reason } : {},
|
|
12837
12870
|
...job.agent ? { agent: job.agent } : {},
|
|
12838
12871
|
...job.schedule ? { schedule: job.schedule } : {},
|
|
@@ -13268,7 +13301,7 @@ var init_finalizeTerminal = __esm({
|
|
|
13268
13301
|
}
|
|
13269
13302
|
}
|
|
13270
13303
|
if (!state) return;
|
|
13271
|
-
const alreadyTerminal = state.core.phase === phase && state.core.status === status && state.core.
|
|
13304
|
+
const alreadyTerminal = state.core.phase === phase && state.core.status === status && state.core.currentImplementation === null;
|
|
13272
13305
|
if (alreadyTerminal) return;
|
|
13273
13306
|
const next = {
|
|
13274
13307
|
...state,
|
|
@@ -13276,7 +13309,7 @@ var init_finalizeTerminal = __esm({
|
|
|
13276
13309
|
...state.core,
|
|
13277
13310
|
phase,
|
|
13278
13311
|
status,
|
|
13279
|
-
|
|
13312
|
+
currentImplementation: null
|
|
13280
13313
|
}
|
|
13281
13314
|
};
|
|
13282
13315
|
ctx.data.taskState = next;
|
|
@@ -13355,7 +13388,7 @@ var init_finishFlow = __esm({
|
|
|
13355
13388
|
if (terminal && state) {
|
|
13356
13389
|
state.core.phase = terminal.phase;
|
|
13357
13390
|
state.core.status = terminal.status;
|
|
13358
|
-
state.core.
|
|
13391
|
+
state.core.currentImplementation = null;
|
|
13359
13392
|
const target = ctx.data.commentTargetType ?? "issue";
|
|
13360
13393
|
const targetNumber = ctx.data.commentTargetNumber ?? issueNumber;
|
|
13361
13394
|
try {
|
|
@@ -16112,8 +16145,9 @@ function taskJobSpecToJob(spec, issueNumber) {
|
|
|
16112
16145
|
const cliArgs = spec.cliArgs ?? { issue: issueNumber };
|
|
16113
16146
|
const target = typeof spec.target === "number" ? spec.target : targetFromCliArgs(cliArgs) ?? issueNumber;
|
|
16114
16147
|
return {
|
|
16115
|
-
capability: spec.capability ?? spec.
|
|
16116
|
-
|
|
16148
|
+
capability: spec.capability ?? spec.implementation,
|
|
16149
|
+
implementation: spec.implementation,
|
|
16150
|
+
executable: spec.implementation,
|
|
16117
16151
|
why: spec.reason,
|
|
16118
16152
|
agent: spec.agent,
|
|
16119
16153
|
schedule: spec.schedule,
|
|
@@ -16127,9 +16161,9 @@ function normalizeSpec(input, index) {
|
|
|
16127
16161
|
throw new Error(`task job plan entry ${index} must be an object`);
|
|
16128
16162
|
}
|
|
16129
16163
|
const raw = input;
|
|
16130
|
-
const
|
|
16131
|
-
if (!/^[a-z][a-z0-9-]*$/.test(
|
|
16132
|
-
throw new Error(`task job plan entry ${index} must have a valid
|
|
16164
|
+
const implementation = typeof raw.implementation === "string" ? raw.implementation.trim() : typeof raw.executable === "string" ? raw.executable.trim() : "";
|
|
16165
|
+
if (!/^[a-z][a-z0-9-]*$/.test(implementation)) {
|
|
16166
|
+
throw new Error(`task job plan entry ${index} must have a valid implementation`);
|
|
16133
16167
|
}
|
|
16134
16168
|
const cliArgs = raw.cliArgs;
|
|
16135
16169
|
if (cliArgs !== void 0 && (!cliArgs || typeof cliArgs !== "object" || Array.isArray(cliArgs))) {
|
|
@@ -16140,7 +16174,7 @@ function normalizeSpec(input, index) {
|
|
|
16140
16174
|
throw new Error(`task job plan entry ${index} flavor must be "instant" or "scheduled"`);
|
|
16141
16175
|
}
|
|
16142
16176
|
return {
|
|
16143
|
-
|
|
16177
|
+
implementation,
|
|
16144
16178
|
...typeof raw.capability === "string" && raw.capability.trim() ? { capability: raw.capability.trim() } : {},
|
|
16145
16179
|
...typeof raw.reason === "string" && raw.reason.trim() ? { reason: raw.reason.trim() } : {},
|
|
16146
16180
|
...typeof raw.agent === "string" && raw.agent.trim() ? { agent: raw.agent.trim() } : {},
|
|
@@ -16152,9 +16186,10 @@ function normalizeSpec(input, index) {
|
|
|
16152
16186
|
};
|
|
16153
16187
|
}
|
|
16154
16188
|
function jobToPlannedTaskJob(job) {
|
|
16189
|
+
const implementation = job.implementation ?? job.executable ?? job.capability ?? "unknown";
|
|
16155
16190
|
return {
|
|
16156
16191
|
id: stableJobKey(job),
|
|
16157
|
-
|
|
16192
|
+
implementation,
|
|
16158
16193
|
capability: job.capability ?? job.action ?? job.executable ?? "unknown",
|
|
16159
16194
|
...job.agent ? { agent: job.agent } : {},
|
|
16160
16195
|
...job.flavor ? { flavor: job.flavor } : {},
|
|
@@ -19713,9 +19748,8 @@ function collectShellSideChannels(ctx, stdout) {
|
|
|
19713
19748
|
}
|
|
19714
19749
|
const capabilityResults = parseCapabilityResultsFromText(stdout);
|
|
19715
19750
|
if (capabilityResults.length > 0) {
|
|
19716
|
-
const prior = Array.isArray(ctx.data.capabilityResults) ? ctx.data.capabilityResults :
|
|
19751
|
+
const prior = Array.isArray(ctx.data.capabilityResults) ? ctx.data.capabilityResults : [];
|
|
19717
19752
|
ctx.data.capabilityResults = [...prior, ...capabilityResults];
|
|
19718
|
-
ctx.data.dutyResults = ctx.data.capabilityResults;
|
|
19719
19753
|
}
|
|
19720
19754
|
}
|
|
19721
19755
|
function operatorRequestBlock(why) {
|
|
@@ -20310,8 +20344,8 @@ async function runExecutableChain(profileName, input) {
|
|
|
20310
20344
|
return result;
|
|
20311
20345
|
}
|
|
20312
20346
|
function handoffToJob(handoff) {
|
|
20313
|
-
const
|
|
20314
|
-
if (!
|
|
20347
|
+
const capabilityOrAction = handoff.workflow ?? handoff.action ?? handoff.capability;
|
|
20348
|
+
if (!capabilityOrAction) return null;
|
|
20315
20349
|
return {
|
|
20316
20350
|
action: handoff.action ?? handoff.capability,
|
|
20317
20351
|
capability: handoff.capability,
|
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.344",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|