@kody-ade/kody-engine 0.4.204-next.0 → 0.4.204-next.2
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 +15 -6
- package/package.json +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -1483,7 +1483,7 @@ var init_loadCoverageRules = __esm({
|
|
|
1483
1483
|
// package.json
|
|
1484
1484
|
var package_default = {
|
|
1485
1485
|
name: "@kody-ade/kody-engine",
|
|
1486
|
-
version: "0.4.204-next.
|
|
1486
|
+
version: "0.4.204-next.2",
|
|
1487
1487
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
1488
1488
|
license: "MIT",
|
|
1489
1489
|
type: "module",
|
|
@@ -2375,6 +2375,9 @@ function getExecutablesRoot() {
|
|
|
2375
2375
|
function getProjectExecutablesRoot() {
|
|
2376
2376
|
return path7.join(process.cwd(), ".kody", "executables");
|
|
2377
2377
|
}
|
|
2378
|
+
function getProjectDutiesRoot() {
|
|
2379
|
+
return path7.join(process.cwd(), ".kody", "duties");
|
|
2380
|
+
}
|
|
2378
2381
|
function getBuiltinJobsRoot() {
|
|
2379
2382
|
const here = path7.dirname(new URL(import.meta.url).pathname);
|
|
2380
2383
|
const candidates = [
|
|
@@ -2402,7 +2405,7 @@ function listBuiltinJobs(root = getBuiltinJobsRoot()) {
|
|
|
2402
2405
|
return out;
|
|
2403
2406
|
}
|
|
2404
2407
|
function getExecutableRoots() {
|
|
2405
|
-
return [getProjectExecutablesRoot(), getExecutablesRoot()];
|
|
2408
|
+
return [getProjectDutiesRoot(), getProjectExecutablesRoot(), getExecutablesRoot()];
|
|
2406
2409
|
}
|
|
2407
2410
|
function listExecutables(roots = getExecutableRoots()) {
|
|
2408
2411
|
const rootList = typeof roots === "string" ? [roots] : roots;
|
|
@@ -3875,6 +3878,7 @@ var VALID_CONTAINER_CHILD_TARGETS = /* @__PURE__ */ new Set(["issue", "pr"]);
|
|
|
3875
3878
|
var VALID_PHASES = /* @__PURE__ */ new Set(["research", "planning", "implementing", "reviewing", "shipped", "failed", "idle"]);
|
|
3876
3879
|
var KNOWN_PROFILE_KEYS = /* @__PURE__ */ new Set([
|
|
3877
3880
|
"name",
|
|
3881
|
+
"staff",
|
|
3878
3882
|
"describe",
|
|
3879
3883
|
"role",
|
|
3880
3884
|
"kind",
|
|
@@ -4337,16 +4341,17 @@ function parseStateComment(body) {
|
|
|
4337
4341
|
flow: parsed.flow
|
|
4338
4342
|
};
|
|
4339
4343
|
}
|
|
4340
|
-
function reduce(state, executable, action, phase) {
|
|
4344
|
+
function reduce(state, executable, action, phase, staff) {
|
|
4341
4345
|
if (!action) return state;
|
|
4342
4346
|
const newAttempts = { ...state.core.attempts, [executable]: (state.core.attempts[executable] ?? 0) + 1 };
|
|
4343
4347
|
const newExecutables = {
|
|
4344
4348
|
...state.executables,
|
|
4345
4349
|
[executable]: { ...state.executables[executable] ?? { lastAction: null }, lastAction: action }
|
|
4346
4350
|
};
|
|
4351
|
+
const ranAsStaff = typeof staff === "string" && staff.length > 0 ? staff : void 0;
|
|
4347
4352
|
const newHistory = [
|
|
4348
4353
|
...state.history,
|
|
4349
|
-
{ timestamp: action.timestamp, executable, action: action.type, note: noteFromAction(action) }
|
|
4354
|
+
{ timestamp: action.timestamp, executable, action: action.type, note: noteFromAction(action), staff: ranAsStaff }
|
|
4350
4355
|
].slice(-HISTORY_MAX_ENTRIES);
|
|
4351
4356
|
return {
|
|
4352
4357
|
schemaVersion: 1,
|
|
@@ -4355,6 +4360,7 @@ function reduce(state, executable, action, phase) {
|
|
|
4355
4360
|
attempts: newAttempts,
|
|
4356
4361
|
lastOutcome: action,
|
|
4357
4362
|
currentExecutable: executable,
|
|
4363
|
+
ranAsStaff: ranAsStaff ?? null,
|
|
4358
4364
|
status: statusFromAction(action),
|
|
4359
4365
|
phase: phaseFromAction(action, phase)
|
|
4360
4366
|
},
|
|
@@ -4391,6 +4397,9 @@ function renderStateComment(state) {
|
|
|
4391
4397
|
if (state.core.currentExecutable) {
|
|
4392
4398
|
lines.push(`- **Last executable:** \`${state.core.currentExecutable}\``);
|
|
4393
4399
|
}
|
|
4400
|
+
if (state.core.ranAsStaff) {
|
|
4401
|
+
lines.push(`- **Ran as:** \`${state.core.ranAsStaff}\``);
|
|
4402
|
+
}
|
|
4394
4403
|
if (state.core.lastOutcome) {
|
|
4395
4404
|
lines.push(`- **Last action:** \`${state.core.lastOutcome.type}\``);
|
|
4396
4405
|
}
|
|
@@ -5368,7 +5377,7 @@ var advanceFlow = async (ctx, profile) => {
|
|
|
5368
5377
|
const action = ctx.data.action;
|
|
5369
5378
|
let nextIssueState = issueState;
|
|
5370
5379
|
if (targetType === "pr" && action) {
|
|
5371
|
-
nextIssueState = reduce(issueState, profile.name, action, profile.phase);
|
|
5380
|
+
nextIssueState = reduce(issueState, profile.name, action, profile.phase, profile.staff);
|
|
5372
5381
|
if (state?.core.prUrl && !nextIssueState.core.prUrl) nextIssueState.core.prUrl = state.core.prUrl;
|
|
5373
5382
|
}
|
|
5374
5383
|
const prevHops = issueState.flow?.hops ?? flow.hops ?? 0;
|
|
@@ -13498,7 +13507,7 @@ var saveTaskState = async (ctx, profile) => {
|
|
|
13498
13507
|
if (!target || !number || !state) return;
|
|
13499
13508
|
const executable = profile.name;
|
|
13500
13509
|
const action = ctx.data.action ?? synthesizeAction(ctx);
|
|
13501
|
-
const next = reduce(state, executable, action, profile.phase);
|
|
13510
|
+
const next = reduce(state, executable, action, profile.phase, profile.staff);
|
|
13502
13511
|
if (ctx.output.prUrl) next.core.prUrl = ctx.output.prUrl;
|
|
13503
13512
|
if (typeof ctx.data.runUrl === "string") next.core.runUrl = ctx.data.runUrl;
|
|
13504
13513
|
writeTaskState(target, number, next, ctx.cwd);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.204-next.
|
|
3
|
+
"version": "0.4.204-next.2",
|
|
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",
|