@kody-ade/kody-engine 0.4.376 → 0.4.378
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 +13 -6
- 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.378",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -1974,7 +1974,7 @@ function parseCapabilityWorkflow(value) {
|
|
|
1974
1974
|
const startAt = value && typeof value === "object" && !Array.isArray(value) ? stringField(value.startAt) : void 0;
|
|
1975
1975
|
return {
|
|
1976
1976
|
steps,
|
|
1977
|
-
...startAt &&
|
|
1977
|
+
...startAt && isSafeStepId(startAt) ? { startAt } : {}
|
|
1978
1978
|
};
|
|
1979
1979
|
}
|
|
1980
1980
|
function parseWorkflowStep(value) {
|
|
@@ -2000,7 +2000,7 @@ function parseWorkflowStep(value) {
|
|
|
2000
2000
|
const report = parseReportPublication(raw.report);
|
|
2001
2001
|
return {
|
|
2002
2002
|
capability,
|
|
2003
|
-
...id &&
|
|
2003
|
+
...id && isSafeStepId(id) ? { id } : {},
|
|
2004
2004
|
...action && isSafeSlug(action) ? { action } : {},
|
|
2005
2005
|
...implementation && isSafeSlug(implementation) ? { implementation } : {},
|
|
2006
2006
|
...evidence ? { evidence } : {},
|
|
@@ -2033,11 +2033,11 @@ function parseWorkflowTransitions(value) {
|
|
|
2033
2033
|
const transitions = rawTransitions.map((raw) => {
|
|
2034
2034
|
if (typeof raw === "string") {
|
|
2035
2035
|
const to2 = raw.trim();
|
|
2036
|
-
return
|
|
2036
|
+
return isSafeStepId(to2) ? { to: to2 } : null;
|
|
2037
2037
|
}
|
|
2038
2038
|
if (!isPlainObject(raw)) return null;
|
|
2039
2039
|
const to = stringField(raw.to);
|
|
2040
|
-
if (!to || !
|
|
2040
|
+
if (!to || !isSafeStepId(to)) return null;
|
|
2041
2041
|
const maxIterations = typeof raw.maxIterations === "number" && Number.isInteger(raw.maxIterations) && raw.maxIterations > 0 ? raw.maxIterations : void 0;
|
|
2042
2042
|
return {
|
|
2043
2043
|
to,
|
|
@@ -2081,6 +2081,9 @@ function isPlainObject(value) {
|
|
|
2081
2081
|
function isSafeSlug(value) {
|
|
2082
2082
|
return /^[a-z][a-z0-9-]*$/.test(value) && !value.includes("..");
|
|
2083
2083
|
}
|
|
2084
|
+
function isSafeStepId(value) {
|
|
2085
|
+
return /^[A-Za-z][A-Za-z0-9_-]*$/.test(value) && !value.includes("..");
|
|
2086
|
+
}
|
|
2084
2087
|
var CAPABILITY_PROFILE_FILE, CAPABILITY_BODY_FILE;
|
|
2085
2088
|
var init_capabilityFolders = __esm({
|
|
2086
2089
|
"src/capabilityFolders.ts"() {
|
|
@@ -21752,10 +21755,14 @@ function workflowConditionContext(data) {
|
|
|
21752
21755
|
};
|
|
21753
21756
|
}
|
|
21754
21757
|
function resolveDottedPath2(root, dotted) {
|
|
21755
|
-
|
|
21758
|
+
const direct = dotted.split(".").reduce((cur, part) => {
|
|
21756
21759
|
if (!cur || typeof cur !== "object") return void 0;
|
|
21757
21760
|
return cur[part];
|
|
21758
21761
|
}, root);
|
|
21762
|
+
if (direct !== void 0 || !dotted.startsWith("result.")) return direct;
|
|
21763
|
+
const result = resolveDottedPath2(root, "result");
|
|
21764
|
+
if (!result || typeof result !== "object" || Array.isArray(result)) return direct;
|
|
21765
|
+
return resolveDottedPath2(result.facts, dotted.slice("result.".length));
|
|
21759
21766
|
}
|
|
21760
21767
|
function valueMatches(actual, expected) {
|
|
21761
21768
|
if (Array.isArray(expected)) return expected.some((entry) => valueMatches(actual, entry));
|
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.378",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|