@kody-ade/kody-engine 0.4.345 → 0.4.347
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 +59 -89
- package/dist/executables/types.ts +15 -21
- 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.347",
|
|
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",
|
|
@@ -1905,11 +1905,10 @@ function readCapabilityFolder(root, slug2) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
function parseCapabilityConfig(raw) {
|
|
1907
1907
|
const tools = stringList(raw.tools ?? raw.capabilityTools ?? raw.capabilityTools);
|
|
1908
|
-
const implementations = stringList(raw.implementations
|
|
1908
|
+
const implementations = stringList(raw.implementations);
|
|
1909
1909
|
return {
|
|
1910
1910
|
action: stringField(raw.action),
|
|
1911
|
-
implementation: stringField(raw.implementation
|
|
1912
|
-
executable: stringField(raw.executable),
|
|
1911
|
+
implementation: stringField(raw.implementation),
|
|
1913
1912
|
tickScript: stringField(raw.tickScript),
|
|
1914
1913
|
capabilityKind: parseCapabilityKind(raw.capabilityKind),
|
|
1915
1914
|
disabled: typeof raw.disabled === "boolean" ? raw.disabled : void 0,
|
|
@@ -1921,7 +1920,6 @@ function parseCapabilityConfig(raw) {
|
|
|
1921
1920
|
capabilityTools: tools,
|
|
1922
1921
|
capabilityToolMode: parseCapabilityToolMode(raw.capabilityToolMode),
|
|
1923
1922
|
implementations,
|
|
1924
|
-
executables: stringList(raw.executables),
|
|
1925
1923
|
role: stringField(raw.role),
|
|
1926
1924
|
describe: stringField(raw.describe),
|
|
1927
1925
|
stage: stringField(raw.stage),
|
|
@@ -1985,7 +1983,7 @@ function parseWorkflowStep(value) {
|
|
|
1985
1983
|
const raw = value;
|
|
1986
1984
|
const capability = stringField(raw.capability ?? raw.action);
|
|
1987
1985
|
if (!capability || !isSafeSlug(capability)) return null;
|
|
1988
|
-
const implementation = stringField(raw.implementation
|
|
1986
|
+
const implementation = stringField(raw.implementation);
|
|
1989
1987
|
const action = stringField(raw.action);
|
|
1990
1988
|
const agent = stringField(raw.agent);
|
|
1991
1989
|
const reason = stringField(raw.reason);
|
|
@@ -1994,7 +1992,7 @@ function parseWorkflowStep(value) {
|
|
|
1994
1992
|
return {
|
|
1995
1993
|
capability,
|
|
1996
1994
|
...action && isSafeSlug(action) ? { action } : {},
|
|
1997
|
-
...implementation && isSafeSlug(implementation) ? { implementation
|
|
1995
|
+
...implementation && isSafeSlug(implementation) ? { implementation } : {},
|
|
1998
1996
|
...target === "issue" || target === "pr" ? { target } : {},
|
|
1999
1997
|
...agent && isSafeSlug(agent) ? { agent } : {},
|
|
2000
1998
|
...reason ? { reason } : {},
|
|
@@ -2296,10 +2294,10 @@ function getCapabilityActionInputs(action) {
|
|
|
2296
2294
|
function resolveCapabilityExecution(capability) {
|
|
2297
2295
|
const firstWorkflowStep = capability.config.workflow?.steps[0];
|
|
2298
2296
|
if (firstWorkflowStep) {
|
|
2299
|
-
const implementation2 = firstWorkflowStep.implementation ?? firstWorkflowStep.
|
|
2297
|
+
const implementation2 = firstWorkflowStep.implementation ?? firstWorkflowStep.capability;
|
|
2300
2298
|
return { implementation: implementation2, executable: implementation2, cliArgs: {} };
|
|
2301
2299
|
}
|
|
2302
|
-
const implementation = capability.config.implementation ?? capability.config.
|
|
2300
|
+
const implementation = capability.config.implementation ?? capability.config.implementations?.[0] ?? (capability.config.role ? capability.slug : void 0) ?? (capability.config.tickScript ? "capability-tick-scripted" : "capability-tick");
|
|
2303
2301
|
const cliArgs = executableDeclaresInput(implementation, "capability") ? { capability: capability.slug } : {};
|
|
2304
2302
|
return { implementation, executable: implementation, cliArgs };
|
|
2305
2303
|
}
|
|
@@ -2363,7 +2361,7 @@ function listFolderCapabilityActions(root, source) {
|
|
|
2363
2361
|
}
|
|
2364
2362
|
function hasUnresolvedExplicitImplementation(capability, executable) {
|
|
2365
2363
|
const config = capability.config;
|
|
2366
|
-
const hasExplicitImplementation = Boolean(config.implementation
|
|
2364
|
+
const hasExplicitImplementation = Boolean(config.implementation) || (config.implementations?.length ?? 0) > 0;
|
|
2367
2365
|
if (!hasExplicitImplementation) return false;
|
|
2368
2366
|
if (config.workflow?.steps.length) return false;
|
|
2369
2367
|
if (config.role && PUBLIC_EXECUTABLE_ROLES.has(config.role)) return false;
|
|
@@ -2377,7 +2375,7 @@ function listBuiltinCapabilityActions(root = getBuiltinCapabilitiesRoot()) {
|
|
|
2377
2375
|
const capability = readCapabilityFolder(root, slug2);
|
|
2378
2376
|
if (!capability) continue;
|
|
2379
2377
|
const action = capability.config.action ?? slug2;
|
|
2380
|
-
const implementation = capability.config.implementation ??
|
|
2378
|
+
const implementation = capability.config.implementation ?? slug2;
|
|
2381
2379
|
out.push({
|
|
2382
2380
|
action,
|
|
2383
2381
|
capability: slug2,
|
|
@@ -4455,11 +4453,11 @@ function loadProfile(profilePath) {
|
|
|
4455
4453
|
`
|
|
4456
4454
|
);
|
|
4457
4455
|
}
|
|
4458
|
-
const execRef = typeof r.implementation === "string" && r.implementation.trim() ? r.implementation.trim() :
|
|
4456
|
+
const execRef = typeof r.implementation === "string" && r.implementation.trim() ? r.implementation.trim() : "";
|
|
4459
4457
|
if (execRef) {
|
|
4460
4458
|
const refPath = resolveExecutable(execRef);
|
|
4461
4459
|
if (!refPath) {
|
|
4462
|
-
throw new ProfileError(profilePath, `capability references unknown
|
|
4460
|
+
throw new ProfileError(profilePath, `capability references unknown implementation '${execRef}'`);
|
|
4463
4461
|
}
|
|
4464
4462
|
if (path19.resolve(refPath) === path19.resolve(profilePath)) {
|
|
4465
4463
|
} else {
|
|
@@ -4469,7 +4467,6 @@ function loadProfile(profilePath) {
|
|
|
4469
4467
|
name: requireString(profilePath, r, "name"),
|
|
4470
4468
|
action: typeof r.action === "string" && r.action.trim() ? r.action.trim() : void 0,
|
|
4471
4469
|
implementation: execRef,
|
|
4472
|
-
executable: execRef,
|
|
4473
4470
|
internal: typeof r.internal === "boolean" ? r.internal : base.internal,
|
|
4474
4471
|
public: typeof r.public === "boolean" ? r.public : base.public,
|
|
4475
4472
|
capabilityKind: parseCapabilityKind2(r.capabilityKind) ?? base.capabilityKind,
|
|
@@ -4523,7 +4520,6 @@ function loadProfile(profilePath) {
|
|
|
4523
4520
|
name: requireString(profilePath, r, "name"),
|
|
4524
4521
|
action: typeof r.action === "string" && r.action.trim() ? r.action.trim() : void 0,
|
|
4525
4522
|
implementation: void 0,
|
|
4526
|
-
executable: void 0,
|
|
4527
4523
|
internal: typeof r.internal === "boolean" ? r.internal : void 0,
|
|
4528
4524
|
public: typeof r.public === "boolean" ? r.public : void 0,
|
|
4529
4525
|
capabilityKind: parseCapabilityKind2(r.capabilityKind),
|
|
@@ -4898,8 +4894,6 @@ var init_profile = __esm({
|
|
|
4898
4894
|
"action",
|
|
4899
4895
|
"implementation",
|
|
4900
4896
|
"implementations",
|
|
4901
|
-
"executable",
|
|
4902
|
-
"executables",
|
|
4903
4897
|
"internal",
|
|
4904
4898
|
"public",
|
|
4905
4899
|
"capabilityKind",
|
|
@@ -6534,8 +6528,8 @@ function runIndexRowFromJobContext(input) {
|
|
|
6534
6528
|
action: stringValue2(input.data.jobAction) ?? void 0,
|
|
6535
6529
|
capability: stringValue2(input.data.jobCapability) ?? void 0,
|
|
6536
6530
|
workflow: workflow ?? void 0,
|
|
6537
|
-
implementation: stringValue2(input.data.jobImplementation) ??
|
|
6538
|
-
executable: stringValue2(input.data.
|
|
6531
|
+
implementation: stringValue2(input.data.jobImplementation) ?? input.profileName,
|
|
6532
|
+
executable: stringValue2(input.data.jobImplementation) ?? input.profileName,
|
|
6539
6533
|
agent: stringValue2(input.data.jobAgent) ?? input.profile.agent ?? void 0,
|
|
6540
6534
|
model: stringValue2(input.data.jobModel) ?? void 0,
|
|
6541
6535
|
modelProvider: stringValue2(input.data.jobModelProvider) ?? void 0,
|
|
@@ -6584,8 +6578,8 @@ function runIndexRowFromGoalEvents(goalId, logPath, events) {
|
|
|
6584
6578
|
actor: stringValue2(trigger?.githubActor) ?? stringValue2(trigger?.actor) ?? void 0,
|
|
6585
6579
|
action: stringValue2(job?.action) ?? void 0,
|
|
6586
6580
|
capability: stringValue2(job?.capability) ?? void 0,
|
|
6587
|
-
implementation: stringValue2(job?.implementation) ??
|
|
6588
|
-
executable: stringValue2(job?.
|
|
6581
|
+
implementation: stringValue2(job?.implementation) ?? void 0,
|
|
6582
|
+
executable: stringValue2(job?.implementation) ?? void 0,
|
|
6589
6583
|
agent: stringValue2(job?.agent) ?? void 0,
|
|
6590
6584
|
model: stringValue2(job?.model) ?? void 0,
|
|
6591
6585
|
modelProvider: stringValue2(job?.modelProvider) ?? void 0,
|
|
@@ -7065,7 +7059,7 @@ function jobMetaFromData(data) {
|
|
|
7065
7059
|
schedule: typeof data.jobSchedule === "string" ? data.jobSchedule : void 0,
|
|
7066
7060
|
runUrl: typeof data.runUrl === "string" ? data.runUrl : void 0,
|
|
7067
7061
|
capability: typeof data.jobCapability === "string" ? data.jobCapability : void 0,
|
|
7068
|
-
implementation: typeof data.jobImplementation === "string" ? data.jobImplementation :
|
|
7062
|
+
implementation: typeof data.jobImplementation === "string" ? data.jobImplementation : void 0,
|
|
7069
7063
|
target: typeof data.jobTarget === "number" ? data.jobTarget : void 0,
|
|
7070
7064
|
agent: typeof data.jobAgent === "string" ? data.jobAgent : void 0,
|
|
7071
7065
|
why: typeof data.jobWhy === "string" ? data.jobWhy : void 0
|
|
@@ -7329,8 +7323,7 @@ function planManagedGoalTick(goal) {
|
|
|
7329
7323
|
evidence: missing,
|
|
7330
7324
|
stage: step.stage,
|
|
7331
7325
|
capability: step.capability,
|
|
7332
|
-
implementation: step.implementation
|
|
7333
|
-
executable: step.executable,
|
|
7326
|
+
implementation: step.implementation,
|
|
7334
7327
|
cliArgs: resolved.cliArgs,
|
|
7335
7328
|
...step.saveReport === true ? { saveReport: true } : {}
|
|
7336
7329
|
};
|
|
@@ -7440,8 +7433,7 @@ function asRoute(value) {
|
|
|
7440
7433
|
evidence: raw.evidence,
|
|
7441
7434
|
stage: raw.stage,
|
|
7442
7435
|
capability: raw.capability,
|
|
7443
|
-
implementation: typeof raw.implementation === "string" ? raw.implementation :
|
|
7444
|
-
executable: typeof raw.executable === "string" ? raw.executable : void 0,
|
|
7436
|
+
implementation: typeof raw.implementation === "string" ? raw.implementation : void 0,
|
|
7445
7437
|
args: args ?? void 0,
|
|
7446
7438
|
saveReport: raw.saveReport === true,
|
|
7447
7439
|
onPending: asRoutePolicy(raw.onPending),
|
|
@@ -7905,8 +7897,8 @@ function jobContext(data) {
|
|
|
7905
7897
|
flavor: stringValue3(data.jobFlavor) ?? void 0,
|
|
7906
7898
|
action: stringValue3(data.jobAction) ?? void 0,
|
|
7907
7899
|
capability: stringValue3(data.jobCapability) ?? void 0,
|
|
7908
|
-
implementation: stringValue3(data.jobImplementation) ??
|
|
7909
|
-
executable: stringValue3(data.
|
|
7900
|
+
implementation: stringValue3(data.jobImplementation) ?? void 0,
|
|
7901
|
+
executable: stringValue3(data.jobImplementation) ?? void 0,
|
|
7910
7902
|
agent: stringValue3(data.jobAgent) ?? void 0,
|
|
7911
7903
|
schedule: stringValue3(data.jobSchedule) ?? void 0,
|
|
7912
7904
|
target: data.jobTarget ?? void 0,
|
|
@@ -7981,8 +7973,7 @@ function routeStepForLog(step) {
|
|
|
7981
7973
|
evidence: step.evidence,
|
|
7982
7974
|
stage: step.stage,
|
|
7983
7975
|
capability: step.capability,
|
|
7984
|
-
implementation: step.implementation
|
|
7985
|
-
executable: step.executable,
|
|
7976
|
+
implementation: step.implementation,
|
|
7986
7977
|
args: step.args,
|
|
7987
7978
|
saveReport: step.saveReport === true ? true : void 0
|
|
7988
7979
|
});
|
|
@@ -8499,8 +8490,7 @@ function cloneRoute(route) {
|
|
|
8499
8490
|
stage: step.stage,
|
|
8500
8491
|
evidence: step.evidence,
|
|
8501
8492
|
capability: step.capability,
|
|
8502
|
-
...step.implementation ? { implementation: step.implementation } :
|
|
8503
|
-
...step.executable ? { executable: step.executable } : {},
|
|
8493
|
+
...step.implementation ? { implementation: step.implementation } : {},
|
|
8504
8494
|
...step.args ? { args: structuredClone(step.args) } : {}
|
|
8505
8495
|
}));
|
|
8506
8496
|
}
|
|
@@ -8519,8 +8509,7 @@ function routeArray(value) {
|
|
|
8519
8509
|
stage: raw.stage,
|
|
8520
8510
|
evidence: raw.evidence,
|
|
8521
8511
|
capability: raw.capability,
|
|
8522
|
-
implementation: typeof raw.implementation === "string" ? raw.implementation :
|
|
8523
|
-
executable: typeof raw.executable === "string" ? raw.executable : void 0,
|
|
8512
|
+
implementation: typeof raw.implementation === "string" ? raw.implementation : void 0,
|
|
8524
8513
|
args: raw.args && typeof raw.args === "object" && !Array.isArray(raw.args) ? { ...raw.args } : void 0
|
|
8525
8514
|
});
|
|
8526
8515
|
}
|
|
@@ -8567,20 +8556,18 @@ var init_typeDefinitions = __esm({
|
|
|
8567
8556
|
evidence: ["planReady", "changeImplemented", "changeVerified"],
|
|
8568
8557
|
capabilities: ["plan", "fix", "review"],
|
|
8569
8558
|
route: [
|
|
8570
|
-
{ stage: "plan", evidence: "planReady", capability: "plan", implementation: "plan"
|
|
8559
|
+
{ stage: "plan", evidence: "planReady", capability: "plan", implementation: "plan" },
|
|
8571
8560
|
{
|
|
8572
8561
|
stage: "implement",
|
|
8573
8562
|
evidence: "changeImplemented",
|
|
8574
8563
|
capability: "fix",
|
|
8575
|
-
implementation: "fix"
|
|
8576
|
-
executable: "fix"
|
|
8564
|
+
implementation: "fix"
|
|
8577
8565
|
},
|
|
8578
8566
|
{
|
|
8579
8567
|
stage: "review",
|
|
8580
8568
|
evidence: "changeVerified",
|
|
8581
8569
|
capability: "review",
|
|
8582
|
-
implementation: "review"
|
|
8583
|
-
executable: "review"
|
|
8570
|
+
implementation: "review"
|
|
8584
8571
|
}
|
|
8585
8572
|
]
|
|
8586
8573
|
},
|
|
@@ -8614,7 +8601,6 @@ var init_typeDefinitions = __esm({
|
|
|
8614
8601
|
evidence: "releasePrExists",
|
|
8615
8602
|
capability: "release",
|
|
8616
8603
|
implementation: "release-prepare",
|
|
8617
|
-
executable: "release-prepare",
|
|
8618
8604
|
args: { issue: { fact: "issue" }, goal: { fact: "goalId" } }
|
|
8619
8605
|
},
|
|
8620
8606
|
{
|
|
@@ -8622,15 +8608,13 @@ var init_typeDefinitions = __esm({
|
|
|
8622
8608
|
evidence: "mainMerged",
|
|
8623
8609
|
capability: "release-merge",
|
|
8624
8610
|
implementation: "release-merge",
|
|
8625
|
-
executable: "release-merge",
|
|
8626
8611
|
args: { pr: { fact: "releasePr" }, issue: { fact: "issue" }, goal: { fact: "goalId" } }
|
|
8627
8612
|
},
|
|
8628
8613
|
{
|
|
8629
8614
|
stage: "publish",
|
|
8630
8615
|
evidence: "productionDeployed",
|
|
8631
8616
|
capability: "vercel-production-deploy",
|
|
8632
|
-
implementation: "vercel-production-deploy"
|
|
8633
|
-
executable: "vercel-production-deploy"
|
|
8617
|
+
implementation: "vercel-production-deploy"
|
|
8634
8618
|
}
|
|
8635
8619
|
]
|
|
8636
8620
|
},
|
|
@@ -8643,8 +8627,7 @@ var init_typeDefinitions = __esm({
|
|
|
8643
8627
|
stage: "verify",
|
|
8644
8628
|
evidence: "checklistComplete",
|
|
8645
8629
|
capability: "task-verifier",
|
|
8646
|
-
implementation: "task-verifier"
|
|
8647
|
-
executable: "task-verifier"
|
|
8630
|
+
implementation: "task-verifier"
|
|
8648
8631
|
}
|
|
8649
8632
|
]
|
|
8650
8633
|
}
|
|
@@ -9153,12 +9136,12 @@ async function describeCapabilitySchedule(capability, slug2, backend, previous)
|
|
|
9153
9136
|
if (!config.agent || config.agent.trim().length === 0) {
|
|
9154
9137
|
return { slug: slug2, title: capability.title, state: "blocked", reason: "no agent assigned" };
|
|
9155
9138
|
}
|
|
9156
|
-
if (config.
|
|
9139
|
+
if (config.implementations && config.implementations.length > 1) {
|
|
9157
9140
|
return {
|
|
9158
9141
|
slug: slug2,
|
|
9159
9142
|
title: capability.title,
|
|
9160
9143
|
state: "blocked",
|
|
9161
|
-
reason: "multi-
|
|
9144
|
+
reason: "multi-implementation capability needs task-jobs route"
|
|
9162
9145
|
};
|
|
9163
9146
|
}
|
|
9164
9147
|
let lastFiredAt = validIso(previous?.lastFiredAt) ? previous?.lastFiredAt : void 0;
|
|
@@ -9282,7 +9265,7 @@ function stageManagedGoalDecision(data, goalId, goal, goalState, decision, detai
|
|
|
9282
9265
|
} : {
|
|
9283
9266
|
capability: decision.capability,
|
|
9284
9267
|
cliArgs: decision.cliArgs,
|
|
9285
|
-
...decision.
|
|
9268
|
+
...decision.implementation ? { implementation: decision.implementation } : {}
|
|
9286
9269
|
},
|
|
9287
9270
|
goal: details.goalSnapshot,
|
|
9288
9271
|
inspection: details.inspection,
|
|
@@ -9298,7 +9281,7 @@ function stageManagedGoalDecision(data, goalId, goal, goalState, decision, detai
|
|
|
9298
9281
|
stage: decision.stage,
|
|
9299
9282
|
capability: decision.capability,
|
|
9300
9283
|
cliArgs: decision.cliArgs,
|
|
9301
|
-
...decision.
|
|
9284
|
+
...decision.implementation ? { implementation: decision.implementation } : {}
|
|
9302
9285
|
},
|
|
9303
9286
|
change: details.change
|
|
9304
9287
|
});
|
|
@@ -9675,7 +9658,7 @@ var init_advanceManagedGoal = __esm({
|
|
|
9675
9658
|
ctx.output.nextDispatch = {
|
|
9676
9659
|
capability: decision.capability,
|
|
9677
9660
|
cliArgs: decision.cliArgs,
|
|
9678
|
-
...decision.
|
|
9661
|
+
...decision.implementation ? { implementation: decision.implementation } : {},
|
|
9679
9662
|
...decision.saveReport === true ? { saveReport: true } : {},
|
|
9680
9663
|
resultTarget: { type: "goal", id: goal.id, evidence: decision.evidence }
|
|
9681
9664
|
};
|
|
@@ -12782,7 +12765,7 @@ var init_dispatchCapabilityTicks = __esm({
|
|
|
12782
12765
|
const out = await runJob(
|
|
12783
12766
|
mintScheduledJob({
|
|
12784
12767
|
capability: targetExecutable,
|
|
12785
|
-
|
|
12768
|
+
implementation: targetExecutable,
|
|
12786
12769
|
cliArgs: { [issueArg]: issue.number }
|
|
12787
12770
|
}),
|
|
12788
12771
|
{ cwd: ctx.cwd, config: ctx.config, verbose: ctx.verbose, quiet: ctx.quiet, chain: false }
|
|
@@ -12839,10 +12822,10 @@ var init_dispatchClassified = __esm({
|
|
|
12839
12822
|
// src/jobIdentity.ts
|
|
12840
12823
|
function stableJobKey(job) {
|
|
12841
12824
|
const capability = job.workflow ?? job.capability ?? job.action;
|
|
12842
|
-
const
|
|
12843
|
-
if (job.flavor === "scheduled" && job.capability) return `scheduled:${job.capability}:${
|
|
12825
|
+
const implementation = job.implementation ?? capability ?? "unknown";
|
|
12826
|
+
if (job.flavor === "scheduled" && job.capability) return `scheduled:${job.capability}:${implementation}`;
|
|
12844
12827
|
const target = typeof job.target === "number" ? job.target : targetFromCliArgs(job.cliArgs);
|
|
12845
|
-
const work = capability &&
|
|
12828
|
+
const work = capability && implementation && implementation !== capability ? `${capability}:${implementation}` : capability ?? implementation;
|
|
12846
12829
|
return target === void 0 ? `${job.flavor}:${work}` : `${job.flavor}:${work}:${target}`;
|
|
12847
12830
|
}
|
|
12848
12831
|
function targetFromCliArgs(cliArgs) {
|
|
@@ -12865,7 +12848,6 @@ function taskJobToJob(job, issueArg) {
|
|
|
12865
12848
|
return {
|
|
12866
12849
|
capability: job.capability ?? job.implementation,
|
|
12867
12850
|
implementation: job.implementation,
|
|
12868
|
-
executable: job.implementation,
|
|
12869
12851
|
...job.reason ? { why: job.reason } : {},
|
|
12870
12852
|
...job.agent ? { agent: job.agent } : {},
|
|
12871
12853
|
...job.schedule ? { schedule: job.schedule } : {},
|
|
@@ -13231,7 +13213,7 @@ var init_failOnceTaskJob = __esm({
|
|
|
13231
13213
|
const issue = typeof ctx.args.issue === "number" ? ctx.args.issue : void 0;
|
|
13232
13214
|
const fallbackJob = {
|
|
13233
13215
|
capability: profile.action ?? profile.name,
|
|
13234
|
-
|
|
13216
|
+
implementation: profile.name,
|
|
13235
13217
|
flavor: "instant",
|
|
13236
13218
|
...typeof issue === "number" ? { target: issue, cliArgs: { issue } } : { cliArgs: {} }
|
|
13237
13219
|
};
|
|
@@ -14179,7 +14161,7 @@ var init_loadCapabilityState = __esm({
|
|
|
14179
14161
|
ctx.data.jobStateJson = JSON.stringify(loaded.state, null, 2);
|
|
14180
14162
|
ctx.data.capabilitySlug = slug2;
|
|
14181
14163
|
ctx.data.capabilityTitle = profile.describe;
|
|
14182
|
-
ctx.data.executableSlug = profile.implementation ?? profile.
|
|
14164
|
+
ctx.data.executableSlug = profile.implementation ?? profile.name;
|
|
14183
14165
|
ctx.data.agentSlug = profile.agent ?? "";
|
|
14184
14166
|
ctx.data.agentTitle = "";
|
|
14185
14167
|
ctx.data.capabilitySchedule = String(ctx.data.jobSchedule ?? "");
|
|
@@ -15485,9 +15467,8 @@ function requireString2(value, label) {
|
|
|
15485
15467
|
function creatorSourceLabel(ctx, profileName) {
|
|
15486
15468
|
const capability = typeof ctx.data.jobCapability === "string" ? ctx.data.jobCapability.trim() : "";
|
|
15487
15469
|
const implementation = typeof ctx.data.jobImplementation === "string" ? ctx.data.jobImplementation.trim() : "";
|
|
15488
|
-
const executable = typeof ctx.data.jobExecutable === "string" ? ctx.data.jobExecutable.trim() : "";
|
|
15489
15470
|
const profile = typeof profileName === "string" ? profileName.trim() : "";
|
|
15490
|
-
return capability || implementation ||
|
|
15471
|
+
return capability || implementation || profile || "agent-factory";
|
|
15491
15472
|
}
|
|
15492
15473
|
function ghJson(args, cwd, input) {
|
|
15493
15474
|
const raw = gh(args, input === void 0 ? { cwd } : { cwd, input: JSON.stringify(input) });
|
|
@@ -16147,7 +16128,6 @@ function taskJobSpecToJob(spec, issueNumber) {
|
|
|
16147
16128
|
return {
|
|
16148
16129
|
capability: spec.capability ?? spec.implementation,
|
|
16149
16130
|
implementation: spec.implementation,
|
|
16150
|
-
executable: spec.implementation,
|
|
16151
16131
|
why: spec.reason,
|
|
16152
16132
|
agent: spec.agent,
|
|
16153
16133
|
schedule: spec.schedule,
|
|
@@ -16161,7 +16141,7 @@ function normalizeSpec(input, index) {
|
|
|
16161
16141
|
throw new Error(`task job plan entry ${index} must be an object`);
|
|
16162
16142
|
}
|
|
16163
16143
|
const raw = input;
|
|
16164
|
-
const implementation = typeof raw.implementation === "string" ? raw.implementation.trim() :
|
|
16144
|
+
const implementation = typeof raw.implementation === "string" ? raw.implementation.trim() : "";
|
|
16165
16145
|
if (!/^[a-z][a-z0-9-]*$/.test(implementation)) {
|
|
16166
16146
|
throw new Error(`task job plan entry ${index} must have a valid implementation`);
|
|
16167
16147
|
}
|
|
@@ -16186,11 +16166,11 @@ function normalizeSpec(input, index) {
|
|
|
16186
16166
|
};
|
|
16187
16167
|
}
|
|
16188
16168
|
function jobToPlannedTaskJob(job) {
|
|
16189
|
-
const implementation = job.implementation ?? job.
|
|
16169
|
+
const implementation = job.implementation ?? job.capability ?? "unknown";
|
|
16190
16170
|
return {
|
|
16191
16171
|
id: stableJobKey(job),
|
|
16192
16172
|
implementation,
|
|
16193
|
-
capability: job.capability ?? job.action ??
|
|
16173
|
+
capability: job.capability ?? job.action ?? "unknown",
|
|
16194
16174
|
...job.agent ? { agent: job.agent } : {},
|
|
16195
16175
|
...job.flavor ? { flavor: job.flavor } : {},
|
|
16196
16176
|
...job.schedule ? { schedule: job.schedule } : {},
|
|
@@ -19771,11 +19751,11 @@ function jobReferenceBlock(profileName, profile, data) {
|
|
|
19771
19751
|
const flavor = typeof data.jobFlavor === "string" && data.jobFlavor.length > 0 ? data.jobFlavor : null;
|
|
19772
19752
|
const schedule = typeof data.jobSchedule === "string" && data.jobSchedule.length > 0 ? data.jobSchedule : null;
|
|
19773
19753
|
const isJob2 = Boolean(
|
|
19774
|
-
jobId || flavor || schedule || data.jobCapability || data.jobImplementation || data.
|
|
19754
|
+
jobId || flavor || schedule || data.jobCapability || data.jobImplementation || data.jobWhy
|
|
19775
19755
|
);
|
|
19776
19756
|
if (!isJob2) return null;
|
|
19777
|
-
const capability = typeof data.jobCapability === "string" && data.jobCapability.length > 0 ? data.jobCapability : profile.
|
|
19778
|
-
const implementation = typeof profile.implementation === "string" && profile.implementation.length > 0 ? profile.implementation : typeof
|
|
19757
|
+
const capability = typeof data.jobCapability === "string" && data.jobCapability.length > 0 ? data.jobCapability : profile.implementation ? profile.name : null;
|
|
19758
|
+
const implementation = typeof profile.implementation === "string" && profile.implementation.length > 0 ? profile.implementation : typeof data.jobImplementation === "string" && data.jobImplementation.length > 0 ? data.jobImplementation : profileName;
|
|
19779
19759
|
const agent = typeof profile.agent === "string" && profile.agent.length > 0 ? profile.agent : typeof data.jobAgent === "string" && data.jobAgent.length > 0 ? data.jobAgent : null;
|
|
19780
19760
|
const description = profile.describe.trim();
|
|
19781
19761
|
const workflow = typeof data.workflowCapability === "string" && data.workflowCapability.length > 0 ? data.workflowCapability : null;
|
|
@@ -20260,7 +20240,7 @@ async function runExecutableChain(profileName, input) {
|
|
|
20260
20240
|
if (result.nextJob) {
|
|
20261
20241
|
const next2 = result.nextJob;
|
|
20262
20242
|
const after = result.afterNextJob;
|
|
20263
|
-
const label = next2.
|
|
20243
|
+
const label = next2.implementation ?? next2.capability ?? "unknown";
|
|
20264
20244
|
process.stdout.write(`\u2192 kody: in-process job hand-off \u2192 ${label} (hop ${hops}/${MAX_CHAIN_HOPS})
|
|
20265
20245
|
|
|
20266
20246
|
`);
|
|
@@ -20337,7 +20317,7 @@ async function runExecutableChain(profileName, input) {
|
|
|
20337
20317
|
};
|
|
20338
20318
|
}
|
|
20339
20319
|
if (result.nextDispatch || result.nextJob) {
|
|
20340
|
-
const pending = result.nextDispatch?.executable ?? result.nextDispatch?.workflow ?? result.nextJob?.
|
|
20320
|
+
const pending = result.nextDispatch?.executable ?? result.nextDispatch?.workflow ?? result.nextJob?.implementation ?? result.nextJob?.workflow ?? result.nextJob?.capability ?? "unknown";
|
|
20341
20321
|
process.stderr.write(`[kody] in-process hand-off cap (${MAX_CHAIN_HOPS}) reached; not running ${pending}
|
|
20342
20322
|
`);
|
|
20343
20323
|
}
|
|
@@ -20351,7 +20331,6 @@ function handoffToJob(handoff) {
|
|
|
20351
20331
|
capability: handoff.capability,
|
|
20352
20332
|
workflow: handoff.workflow,
|
|
20353
20333
|
implementation: handoff.implementation ?? handoff.executable,
|
|
20354
|
-
executable: handoff.executable,
|
|
20355
20334
|
cliArgs: handoff.cliArgs,
|
|
20356
20335
|
flavor: "instant",
|
|
20357
20336
|
saveReport: handoff.saveReport === true,
|
|
@@ -20781,8 +20760,7 @@ function validateJob(input) {
|
|
|
20781
20760
|
}
|
|
20782
20761
|
return {
|
|
20783
20762
|
action: typeof j.action === "string" ? j.action : void 0,
|
|
20784
|
-
implementation: typeof j.implementation === "string" ? j.implementation :
|
|
20785
|
-
executable: typeof j.executable === "string" ? j.executable : typeof j.implementation === "string" ? j.implementation : void 0,
|
|
20763
|
+
implementation: typeof j.implementation === "string" ? j.implementation : void 0,
|
|
20786
20764
|
capability: typeof j.capability === "string" ? j.capability : void 0,
|
|
20787
20765
|
workflow: typeof j.workflow === "string" ? j.workflow : void 0,
|
|
20788
20766
|
why: typeof j.why === "string" ? j.why : void 0,
|
|
@@ -20816,7 +20794,7 @@ async function runJob(job, base) {
|
|
|
20816
20794
|
const capabilityIdentity = valid.capability ?? resolvedCapability?.capability;
|
|
20817
20795
|
const capabilityContext = valid.workflow ? null : loadCapabilityContext(capabilityIdentity, base.cwd);
|
|
20818
20796
|
const workflowContext = valid.workflow ? loadWorkflowContext(valid.workflow, base) : !capabilityContext && !resolvedCapability ? loadWorkflowContext(capabilityIdentity ?? action, base) : null;
|
|
20819
|
-
const explicitImplementation = valid.implementation
|
|
20797
|
+
const explicitImplementation = valid.implementation;
|
|
20820
20798
|
const explicitImplementationOnly = explicitImplementation !== void 0 && (valid.action === void 0 || valid.action === explicitImplementation) && (valid.capability === void 0 || valid.capability === explicitImplementation);
|
|
20821
20799
|
if (!resolvedCapability && !capabilityContext && !workflowContext && !explicitImplementationOnly) {
|
|
20822
20800
|
throw new InvalidJobError(
|
|
@@ -20825,7 +20803,7 @@ async function runJob(job, base) {
|
|
|
20825
20803
|
}
|
|
20826
20804
|
const workflow = capabilityContext?.config.workflow ?? workflowContext?.config.workflow;
|
|
20827
20805
|
const workflowIdentity = valid.workflow ?? capabilityIdentity ?? workflowContext?.slug;
|
|
20828
|
-
const capabilitySelectedImplementation = resolvedCapability?.implementation ?? capabilityContext?.config.implementation ?? capabilityContext?.config.
|
|
20806
|
+
const capabilitySelectedImplementation = resolvedCapability?.implementation ?? capabilityContext?.config.implementation ?? capabilityContext?.config.implementations?.[0] ?? (capabilityContext?.config.role ? capabilityContext.slug : void 0) ?? (capabilityContext?.config.tickScript ? "capability-tick-scripted" : void 0);
|
|
20829
20807
|
const profileName = explicitImplementation ?? capabilitySelectedImplementation;
|
|
20830
20808
|
if (workflow && shouldRunCapabilityWorkflow(valid, workflow, workflowIdentity, capabilitySelectedImplementation, base)) {
|
|
20831
20809
|
const workflowCapability = capabilityContext ?? workflowContext;
|
|
@@ -20833,7 +20811,7 @@ async function runJob(job, base) {
|
|
|
20833
20811
|
return runCapabilityWorkflow(workflowJob, workflow, workflowCapability, base);
|
|
20834
20812
|
}
|
|
20835
20813
|
if (!profileName) {
|
|
20836
|
-
throw new InvalidJobError(`job capability resolves to no
|
|
20814
|
+
throw new InvalidJobError(`job capability resolves to no implementation: ${capabilityIdentity ?? action}`);
|
|
20837
20815
|
}
|
|
20838
20816
|
return runDefaultCapabilityWorkflow(
|
|
20839
20817
|
valid,
|
|
@@ -20864,7 +20842,6 @@ async function runCapabilityImplementationStep(valid, profileName, capabilityIde
|
|
|
20864
20842
|
if (capabilityIdentity !== void 0 && capabilityIdentity.length > 0)
|
|
20865
20843
|
preloadedData.jobCapability = capabilityIdentity;
|
|
20866
20844
|
preloadedData.jobImplementation = profileName;
|
|
20867
|
-
preloadedData.jobExecutable = profileName;
|
|
20868
20845
|
if (valid.schedule !== void 0 && valid.schedule.length > 0) preloadedData.jobSchedule = valid.schedule;
|
|
20869
20846
|
if (valid.saveReport === true) preloadedData.jobSaveReport = true;
|
|
20870
20847
|
if (valid.resultTarget) preloadedData.capabilityResultTarget = valid.resultTarget;
|
|
@@ -20894,19 +20871,19 @@ async function runCapabilityImplementationStep(valid, profileName, capabilityIde
|
|
|
20894
20871
|
quiet: base.quiet,
|
|
20895
20872
|
preloadedData: Object.keys(preloadedData).length > 0 ? preloadedData : void 0
|
|
20896
20873
|
};
|
|
20897
|
-
const shouldApplyResolvedCapabilityArgs = valid.implementation === void 0 &&
|
|
20874
|
+
const shouldApplyResolvedCapabilityArgs = valid.implementation === void 0 && resolvedCapability && profileName === resolvedCapability.implementation;
|
|
20898
20875
|
input.cliArgs = shouldApplyResolvedCapabilityArgs ? { ...resolvedCapability.cliArgs, ...input.cliArgs } : input.cliArgs;
|
|
20899
20876
|
const run = base.chain === false ? runExecutable : runExecutableChain;
|
|
20900
20877
|
return run(profileName, input);
|
|
20901
20878
|
}
|
|
20902
|
-
function shouldRunCapabilityWorkflow(job, workflow, capabilityIdentity,
|
|
20879
|
+
function shouldRunCapabilityWorkflow(job, workflow, capabilityIdentity, selectedImplementation, base) {
|
|
20903
20880
|
if (workflow.steps.length === 0) return false;
|
|
20904
20881
|
if (!capabilityIdentity) return false;
|
|
20905
20882
|
const stack = Array.isArray(base.preloadedData?.workflowStack) ? base.preloadedData.workflowStack.filter((entry) => typeof entry === "string") : [];
|
|
20906
20883
|
if (stack.includes(capabilityIdentity)) return false;
|
|
20907
|
-
const requestedImplementation = job.implementation
|
|
20884
|
+
const requestedImplementation = job.implementation;
|
|
20908
20885
|
if (!requestedImplementation) return true;
|
|
20909
|
-
return requestedImplementation ===
|
|
20886
|
+
return requestedImplementation === selectedImplementation || requestedImplementation === capabilityIdentity || requestedImplementation === job.action;
|
|
20910
20887
|
}
|
|
20911
20888
|
async function runCapabilityWorkflow(parent, workflow, capability, base) {
|
|
20912
20889
|
let chainData = {
|
|
@@ -21009,7 +20986,6 @@ function workflowStepToJob(step, parent, chainData) {
|
|
|
21009
20986
|
action,
|
|
21010
20987
|
capability: step.capability,
|
|
21011
20988
|
...step.implementation ? { implementation: step.implementation } : {},
|
|
21012
|
-
...step.executable ? { executable: step.executable } : {},
|
|
21013
20989
|
...composeStepWhy(parent.why, step) ? { why: composeStepWhy(parent.why, step) } : {},
|
|
21014
20990
|
...step.agent ?? parent.agent ? { agent: step.agent ?? parent.agent } : {},
|
|
21015
20991
|
...parent.schedule ? { schedule: parent.schedule } : {},
|
|
@@ -21105,7 +21081,6 @@ function mintInstantJob(dispatch2, opts) {
|
|
|
21105
21081
|
return {
|
|
21106
21082
|
action: dispatch2.action,
|
|
21107
21083
|
implementation: dispatch2.implementation ?? dispatch2.executable,
|
|
21108
|
-
executable: dispatch2.executable,
|
|
21109
21084
|
capability: dispatch2.capability,
|
|
21110
21085
|
why: opts?.why ?? dispatch2.why,
|
|
21111
21086
|
agent: opts?.agent ?? DEFAULT_INSTANT_AGENT,
|
|
@@ -21118,8 +21093,7 @@ function mintScheduledJob(input) {
|
|
|
21118
21093
|
return {
|
|
21119
21094
|
action: input.action,
|
|
21120
21095
|
capability: input.capability,
|
|
21121
|
-
implementation: input.implementation
|
|
21122
|
-
executable: input.executable,
|
|
21096
|
+
implementation: input.implementation,
|
|
21123
21097
|
schedule: input.schedule,
|
|
21124
21098
|
agent: input.agent,
|
|
21125
21099
|
cliArgs: input.cliArgs ?? {},
|
|
@@ -22950,8 +22924,7 @@ async function runCi(argv) {
|
|
|
22950
22924
|
action: route.action,
|
|
22951
22925
|
capability: route.capability,
|
|
22952
22926
|
workflow: route.workflow,
|
|
22953
|
-
implementation: route.implementation
|
|
22954
|
-
executable: route.executable,
|
|
22927
|
+
implementation: route.implementation,
|
|
22955
22928
|
cliArgs: { ...route.cliArgs, ...forceRunCliArgs },
|
|
22956
22929
|
flavor: "instant",
|
|
22957
22930
|
force: true
|
|
@@ -23190,8 +23163,7 @@ async function runScheduledFanOut(cwd, args, opts) {
|
|
|
23190
23163
|
mintScheduledJob({
|
|
23191
23164
|
action: match.action,
|
|
23192
23165
|
capability: match.capability,
|
|
23193
|
-
implementation: match.implementation,
|
|
23194
|
-
executable: match.executable,
|
|
23166
|
+
implementation: match.implementation ?? match.executable,
|
|
23195
23167
|
cliArgs: match.cliArgs
|
|
23196
23168
|
}),
|
|
23197
23169
|
{
|
|
@@ -26444,7 +26416,6 @@ ${HELP_TEXT}`);
|
|
|
26444
26416
|
action: route.action,
|
|
26445
26417
|
capability: route.capability,
|
|
26446
26418
|
implementation: route.implementation,
|
|
26447
|
-
executable: route.executable,
|
|
26448
26419
|
cliArgs,
|
|
26449
26420
|
target: numericTarget(cliArgs),
|
|
26450
26421
|
flavor: "instant"
|
|
@@ -26482,7 +26453,6 @@ ${HELP_TEXT}`);
|
|
|
26482
26453
|
action: executable,
|
|
26483
26454
|
capability: executable,
|
|
26484
26455
|
implementation: executable,
|
|
26485
|
-
executable,
|
|
26486
26456
|
cliArgs,
|
|
26487
26457
|
target: numericTarget(cliArgs),
|
|
26488
26458
|
flavor: "instant"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Types shared by the generic executor and
|
|
2
|
+
* Types shared by the generic executor and implementation profiles.
|
|
3
3
|
*
|
|
4
4
|
* The executor reads a Profile, validates the user's CLI args against
|
|
5
5
|
* Profile.inputs, then runs the declared preflight scripts → agent →
|
|
@@ -20,42 +20,39 @@ export interface Profile {
|
|
|
20
20
|
/**
|
|
21
21
|
* Public action name owned by a capability. A user may type `@kody <action>`;
|
|
22
22
|
* dispatch resolves that action to the capability, then the capability selects the
|
|
23
|
-
* implementation
|
|
23
|
+
* implementation profile. Absent → the capability slug/name is the action.
|
|
24
24
|
*/
|
|
25
25
|
action?: string
|
|
26
26
|
/**
|
|
27
|
-
* Optional agent this
|
|
27
|
+
* Optional agent this implementation runs *as*. When set, the executor
|
|
28
28
|
* loads hydrated `.kody/agents/<agent>.md` and injects that agent (authoritative
|
|
29
|
-
* identity) ahead of the
|
|
30
|
-
* unification hook: a
|
|
29
|
+
* identity) ahead of the implementation's own system-prompt append. This is the
|
|
30
|
+
* unification hook: a capability can select an implementation + an agent. Absent →
|
|
31
31
|
* runs with no agent (unchanged legacy behaviour). A declared-but-missing
|
|
32
32
|
* agent file is fatal at run time (see src/agents.ts).
|
|
33
33
|
*/
|
|
34
34
|
agent?: string
|
|
35
35
|
describe: string
|
|
36
36
|
/**
|
|
37
|
-
* Semantic role — what this
|
|
37
|
+
* Semantic role — what this implementation IS, not when it runs.
|
|
38
38
|
* - primitive: single-step agent executor (flow → agent → verify → commit → PR).
|
|
39
39
|
* - orchestrator: no-agent, drives primitives via a postflight transition table
|
|
40
40
|
* (comment-based, one GHA run per step).
|
|
41
41
|
* - container: no-agent, runs declared `children` sequentially in-process
|
|
42
42
|
* (one GHA run for the whole flow). Routing is done by per-child
|
|
43
43
|
* `next` maps over action types — no @kody comments dispatched.
|
|
44
|
-
* - watch: scheduled observer that inspects repo state and may trigger other
|
|
44
|
+
* - watch: scheduled observer that inspects repo state and may trigger other implementations.
|
|
45
45
|
* - utility: no-agent, one-off administrative work (scaffolding, release, etc.).
|
|
46
46
|
*
|
|
47
47
|
* Roles enforce shape at profile-load time and let help/dispatch treat
|
|
48
|
-
*
|
|
48
|
+
* implementations differently by category.
|
|
49
49
|
*/
|
|
50
50
|
role: "primitive" | "orchestrator" | "container" | "watch" | "utility"
|
|
51
51
|
/**
|
|
52
52
|
* Capability contract profiles can point at a separate implementation by name.
|
|
53
|
-
* `executable` remains a legacy alias while old assets migrate.
|
|
54
53
|
*/
|
|
55
54
|
implementation?: string
|
|
56
|
-
executable?: string
|
|
57
55
|
implementations?: string[]
|
|
58
|
-
executables?: string[]
|
|
59
56
|
/** Hide a capability implementation profile from public action discovery. */
|
|
60
57
|
internal?: boolean
|
|
61
58
|
/** Explicit public-action flag for capability profiles. */
|
|
@@ -99,7 +96,7 @@ export interface Profile {
|
|
|
99
96
|
/** Cron expression for scheduled profiles (e.g. "0 8 * * MON"). */
|
|
100
97
|
schedule?: string
|
|
101
98
|
/**
|
|
102
|
-
* Task-state phase label emitted when this
|
|
99
|
+
* Task-state phase label emitted when this implementation completes successfully.
|
|
103
100
|
* Failing actions always set phase to "failed" regardless. Omitted → "idle".
|
|
104
101
|
* Lets state.ts stay generic — phase semantics live on the profile.
|
|
105
102
|
*/
|
|
@@ -115,7 +112,7 @@ export interface Profile {
|
|
|
115
112
|
*
|
|
116
113
|
* Lifecycles exist to consolidate orchestration boilerplate (label,
|
|
117
114
|
* context loading, verify, commit, comment) that recurs across many
|
|
118
|
-
*
|
|
115
|
+
* implementations. Per-implementation specifics still go in `scripts.preflight`
|
|
119
116
|
* and `scripts.postflight` — the lifecycle wraps them, it doesn't
|
|
120
117
|
* replace them.
|
|
121
118
|
*/
|
|
@@ -131,14 +128,14 @@ export interface Profile {
|
|
|
131
128
|
}
|
|
132
129
|
outputContract?: OutputContract
|
|
133
130
|
/**
|
|
134
|
-
* Declared artifacts consumed by this
|
|
131
|
+
* Declared artifacts consumed by this implementation. The resolveArtifacts
|
|
135
132
|
* preflight loads each into ctx.data.artifacts[name] from the task-state
|
|
136
|
-
* comment. If `required: true` and the artifact is absent, the
|
|
133
|
+
* comment. If `required: true` and the artifact is absent, the implementation
|
|
137
134
|
* fails fast.
|
|
138
135
|
*/
|
|
139
136
|
inputArtifacts: InputArtifactSpec[]
|
|
140
137
|
/**
|
|
141
|
-
* Declared artifacts produced by this
|
|
138
|
+
* Declared artifacts produced by this implementation. The persistArtifacts
|
|
142
139
|
* postflight reads the named source field from ctx.data and writes an
|
|
143
140
|
* Artifact entry into the task state's `artifacts` map.
|
|
144
141
|
*/
|
|
@@ -489,9 +486,8 @@ export type AnyScript = PreflightScript | PostflightScript
|
|
|
489
486
|
// Job — the unified work request (task-state jobs collect run attempts).
|
|
490
487
|
//
|
|
491
488
|
// A Job is the required work the engine tries to execute, regardless of how it
|
|
492
|
-
// was triggered. It must reference
|
|
493
|
-
//
|
|
494
|
-
// standalone request.
|
|
489
|
+
// was triggered. It must reference a capability/action capability contract.
|
|
490
|
+
// The implementation is selected under that contract, never requested by itself.
|
|
495
491
|
// Task state stores this durable job separately from individual run attempts.
|
|
496
492
|
// Two flavors:
|
|
497
493
|
// - "instant" — run once now (an `@kody <verb>` comment or a manual dispatch)
|
|
@@ -508,8 +504,6 @@ export interface Job {
|
|
|
508
504
|
action?: string
|
|
509
505
|
/** How: implementation profile selected by the capability. Not valid by itself. */
|
|
510
506
|
implementation?: string
|
|
511
|
-
/** Legacy compatibility copy of `implementation`. */
|
|
512
|
-
executable?: string
|
|
513
507
|
/** Why (referenced): a capability slug whose intent drives the run. */
|
|
514
508
|
capability?: string
|
|
515
509
|
/** Why (referenced): a stored workflow definition to run as an ordered capability chain. */
|
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.347",
|
|
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",
|