@kody-ade/kody-engine 0.4.228 → 0.4.230
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 +27 -8
- 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.230",
|
|
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",
|
|
@@ -2504,6 +2504,26 @@ function resolveDutyFolder(slug, projectDutiesRoot = getProjectDutiesRoot()) {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
return null;
|
|
2506
2506
|
}
|
|
2507
|
+
function resolveDutyExecution(duty) {
|
|
2508
|
+
const executable = duty.config.executable ?? duty.config.executables?.[0] ?? (duty.config.tickScript ? "duty-tick-scripted" : "duty-tick");
|
|
2509
|
+
const cliArgs = executableDeclaresInput(executable, "duty") ? { duty: duty.slug } : {};
|
|
2510
|
+
return { executable, cliArgs };
|
|
2511
|
+
}
|
|
2512
|
+
function executableDeclaresInput(executable, inputName) {
|
|
2513
|
+
const profilePath = resolveExecutable(executable);
|
|
2514
|
+
if (!profilePath) return false;
|
|
2515
|
+
try {
|
|
2516
|
+
const raw = JSON.parse(fs8.readFileSync(profilePath, "utf-8"));
|
|
2517
|
+
if (!Array.isArray(raw.inputs)) return false;
|
|
2518
|
+
return raw.inputs.some((entry) => {
|
|
2519
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return false;
|
|
2520
|
+
const input = entry;
|
|
2521
|
+
return input.name === inputName || input.flag === `--${inputName}`;
|
|
2522
|
+
});
|
|
2523
|
+
} catch {
|
|
2524
|
+
return false;
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2507
2527
|
function isSafeName(name) {
|
|
2508
2528
|
return /^[a-z][a-z0-9-]*$/.test(name) && !name.includes("..");
|
|
2509
2529
|
}
|
|
@@ -2515,12 +2535,12 @@ function listFolderDutyActions(root, source) {
|
|
|
2515
2535
|
const duty = readDutyFolder(root, slug);
|
|
2516
2536
|
if (!duty) continue;
|
|
2517
2537
|
const action = duty.config.action ?? slug;
|
|
2518
|
-
const
|
|
2538
|
+
const { executable, cliArgs } = resolveDutyExecution(duty);
|
|
2519
2539
|
out.push({
|
|
2520
2540
|
action,
|
|
2521
2541
|
duty: slug,
|
|
2522
2542
|
executable,
|
|
2523
|
-
cliArgs
|
|
2543
|
+
cliArgs,
|
|
2524
2544
|
source,
|
|
2525
2545
|
describe: duty.config.describe ?? duty.title,
|
|
2526
2546
|
profilePath: duty.profilePath,
|
|
@@ -6284,8 +6304,7 @@ async function describeDutySchedule(duty, slug, backend, now, previous) {
|
|
|
6284
6304
|
};
|
|
6285
6305
|
}
|
|
6286
6306
|
function dutyDispatch(duty) {
|
|
6287
|
-
const
|
|
6288
|
-
const cliArgs = duty.config.executable || duty.config.executables?.[0] ? {} : { duty: duty.slug };
|
|
6307
|
+
const { executable, cliArgs } = resolveDutyExecution(duty);
|
|
6289
6308
|
return { duty: duty.slug, executable, cliArgs };
|
|
6290
6309
|
}
|
|
6291
6310
|
function validIso(value) {
|
|
@@ -12876,7 +12895,7 @@ var runScheduledExecutableTick;
|
|
|
12876
12895
|
var init_runScheduledExecutableTick = __esm({
|
|
12877
12896
|
"src/scripts/runScheduledExecutableTick.ts"() {
|
|
12878
12897
|
"use strict";
|
|
12879
|
-
|
|
12898
|
+
init_registry();
|
|
12880
12899
|
init_jobState();
|
|
12881
12900
|
init_tickShellRunner();
|
|
12882
12901
|
runScheduledExecutableTick = async (ctx, profile, args) => {
|
|
@@ -12891,10 +12910,10 @@ var init_runScheduledExecutableTick = __esm({
|
|
|
12891
12910
|
ctx.output.reason = `runScheduledExecutableTick: ctx.args.${slugArg} must be non-empty duty slug`;
|
|
12892
12911
|
return;
|
|
12893
12912
|
}
|
|
12894
|
-
const duty =
|
|
12913
|
+
const duty = resolveDutyFolder(slug, path37.join(ctx.cwd, jobsDir));
|
|
12895
12914
|
if (!duty) {
|
|
12896
12915
|
ctx.output.exitCode = 99;
|
|
12897
|
-
ctx.output.reason = `runScheduledExecutableTick: duty folder not found or incomplete: ${
|
|
12916
|
+
ctx.output.reason = `runScheduledExecutableTick: duty folder not found or incomplete: ${slug} (searched ${jobsDir} and company store)`;
|
|
12898
12917
|
return;
|
|
12899
12918
|
}
|
|
12900
12919
|
const shellPath = path37.join(profile.dir, shell);
|
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.230",
|
|
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",
|