@kody-ade/kody-engine 0.4.346 → 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 +31 -49
- package/dist/executables/types.ts +13 -16
- 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",
|
|
@@ -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),
|
|
@@ -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
|
};
|
|
@@ -14178,7 +14161,7 @@ var init_loadCapabilityState = __esm({
|
|
|
14178
14161
|
ctx.data.jobStateJson = JSON.stringify(loaded.state, null, 2);
|
|
14179
14162
|
ctx.data.capabilitySlug = slug2;
|
|
14180
14163
|
ctx.data.capabilityTitle = profile.describe;
|
|
14181
|
-
ctx.data.executableSlug = profile.implementation ?? profile.
|
|
14164
|
+
ctx.data.executableSlug = profile.implementation ?? profile.name;
|
|
14182
14165
|
ctx.data.agentSlug = profile.agent ?? "";
|
|
14183
14166
|
ctx.data.agentTitle = "";
|
|
14184
14167
|
ctx.data.capabilitySchedule = String(ctx.data.jobSchedule ?? "");
|
|
@@ -19771,8 +19754,8 @@ function jobReferenceBlock(profileName, profile, data) {
|
|
|
19771
19754
|
jobId || flavor || schedule || data.jobCapability || data.jobImplementation || data.jobWhy
|
|
19772
19755
|
);
|
|
19773
19756
|
if (!isJob2) return null;
|
|
19774
|
-
const capability = typeof data.jobCapability === "string" && data.jobCapability.length > 0 ? data.jobCapability : profile.
|
|
19775
|
-
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;
|
|
19776
19759
|
const agent = typeof profile.agent === "string" && profile.agent.length > 0 ? profile.agent : typeof data.jobAgent === "string" && data.jobAgent.length > 0 ? data.jobAgent : null;
|
|
19777
19760
|
const description = profile.describe.trim();
|
|
19778
19761
|
const workflow = typeof data.workflowCapability === "string" && data.workflowCapability.length > 0 ? data.workflowCapability : null;
|
|
@@ -20820,7 +20803,7 @@ async function runJob(job, base) {
|
|
|
20820
20803
|
}
|
|
20821
20804
|
const workflow = capabilityContext?.config.workflow ?? workflowContext?.config.workflow;
|
|
20822
20805
|
const workflowIdentity = valid.workflow ?? capabilityIdentity ?? workflowContext?.slug;
|
|
20823
|
-
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);
|
|
20824
20807
|
const profileName = explicitImplementation ?? capabilitySelectedImplementation;
|
|
20825
20808
|
if (workflow && shouldRunCapabilityWorkflow(valid, workflow, workflowIdentity, capabilitySelectedImplementation, base)) {
|
|
20826
20809
|
const workflowCapability = capabilityContext ?? workflowContext;
|
|
@@ -21003,7 +20986,6 @@ function workflowStepToJob(step, parent, chainData) {
|
|
|
21003
20986
|
action,
|
|
21004
20987
|
capability: step.capability,
|
|
21005
20988
|
...step.implementation ? { implementation: step.implementation } : {},
|
|
21006
|
-
...step.executable ? { executable: step.executable } : {},
|
|
21007
20989
|
...composeStepWhy(parent.why, step) ? { why: composeStepWhy(parent.why, step) } : {},
|
|
21008
20990
|
...step.agent ?? parent.agent ? { agent: step.agent ?? parent.agent } : {},
|
|
21009
20991
|
...parent.schedule ? { schedule: parent.schedule } : {},
|
|
@@ -22942,7 +22924,7 @@ async function runCi(argv) {
|
|
|
22942
22924
|
action: route.action,
|
|
22943
22925
|
capability: route.capability,
|
|
22944
22926
|
workflow: route.workflow,
|
|
22945
|
-
implementation: route.implementation
|
|
22927
|
+
implementation: route.implementation,
|
|
22946
22928
|
cliArgs: { ...route.cliArgs, ...forceRunCliArgs },
|
|
22947
22929
|
flavor: "instant",
|
|
22948
22930
|
force: true
|
|
@@ -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
|
*/
|
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",
|