@kody-ade/kody-engine 0.4.372 → 0.4.374
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 +1148 -317
- package/dist/implementations/types.ts +21 -3
- package/dist/plugins/hooks/block-git.json +1 -1
- package/package.json +1 -1
|
@@ -364,9 +364,12 @@ export interface ScriptEntry {
|
|
|
364
364
|
* Filename of a shell script colocated with the implementation
|
|
365
365
|
* (e.g. "apply-prefer.sh"). Resolved relative to the profile's
|
|
366
366
|
* directory. Invoked via `bash <path> <with-args>` with ctx.args
|
|
367
|
-
* exposed as env vars (KODY_ARG_<UPPER_NAME>=<value>).
|
|
368
|
-
*
|
|
369
|
-
*
|
|
367
|
+
* exposed as env vars (KODY_ARG_<UPPER_NAME>=<value>). Side-channel
|
|
368
|
+
* markers (KODY_SKIP_AGENT=true, KODY_PR_URL=, KODY_REASON=,
|
|
369
|
+
* KODY_CAPABILITY_RESULT=, KODY_CAPABILITY_REPORT=) are read from the
|
|
370
|
+
* file named by $KODY_OUTPUT (preferred — not forgeable by echoed
|
|
371
|
+
* untrusted text); plain-stdout markers remain a deprecated fallback.
|
|
372
|
+
* Non-zero exit is treated as a preflight failure.
|
|
370
373
|
*/
|
|
371
374
|
shell?: string
|
|
372
375
|
/**
|
|
@@ -535,6 +538,10 @@ export interface Job {
|
|
|
535
538
|
cliArgs: Record<string, unknown>
|
|
536
539
|
/** Internal workflow resume context. Not passed to capability CLI args. */
|
|
537
540
|
workflowFacts?: Record<string, unknown>
|
|
541
|
+
/** Durable execution cursor for a graph-shaped workflow. */
|
|
542
|
+
workflowState?: WorkflowRunState
|
|
543
|
+
/** Stable id used to load and persist one workflow execution. */
|
|
544
|
+
workflowRunId?: string
|
|
538
545
|
/** Evidence this capability run is expected to report, independent of who consumes it. */
|
|
539
546
|
evidence?: string
|
|
540
547
|
/** Run once now ("instant") or on the schedule ("scheduled"). */
|
|
@@ -548,3 +555,14 @@ export interface Job {
|
|
|
548
555
|
/** Internal parent context used by postflights to attach neutral capability output. */
|
|
549
556
|
resultTarget?: CapabilityResultTarget
|
|
550
557
|
}
|
|
558
|
+
|
|
559
|
+
export interface WorkflowRunState {
|
|
560
|
+
status: "running" | "blocked" | "failed" | "done"
|
|
561
|
+
currentStepId?: string
|
|
562
|
+
completedStepIds: string[]
|
|
563
|
+
transitionCounts: Record<string, number>
|
|
564
|
+
facts: Record<string, unknown>
|
|
565
|
+
evidence: Record<string, boolean>
|
|
566
|
+
artifacts: Array<{ label: string; url?: string; path?: string }>
|
|
567
|
+
blocker?: string
|
|
568
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "node -e 'let s=\"\";process.stdin.on(\"data\",c=>s+=c).on(\"end\",()=>{try{const d=JSON.parse(s);const cmd=(d.tool_input&&d.tool_input.command)||\"\";
|
|
10
|
+
"command": "node -e 'let s=\"\";process.stdin.on(\"data\",c=>s+=c).on(\"end\",()=>{try{const d=JSON.parse(s);const cmd=(d.tool_input&&d.tool_input.command)||\"\";const vcs=t=>/^(?:\\S*\\/)?(git|gh)$/.test(t);const wrap=new Set([\"command\",\"exec\",\"xargs\",\"env\",\"nohup\",\"time\",\"nice\",\"sudo\",\"doas\"]);const seg=cmd.split(/[;&|\\n]+/).some(p=>{const t=p.trim().split(/\\s+/).filter(Boolean);let i=0;while(i<t.length&&(wrap.has(t[i])||/^[A-Za-z_][A-Za-z0-9_]*=/.test(t[i])))i++;return t[i]!==undefined&&vcs(t[i])});const shc=/\\b(?:ba|z|da|k)?sh\\s+[^;|&]*-c\\s*[\"\\x27`]+\\s*(?:\\S*\\/)?(?:git|gh)\\b/.test(cmd);const sub=/[$`]\\(?\\s*(?:\\S*\\/)?(?:git|gh)\\s/.test(cmd);if(seg||shc||sub){process.stderr.write(\"kody blocks git/gh — the wrapper handles VCS; do not run git or gh commands (any invocation form)\\n\");process.exit(2)}}catch{}})'"
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
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.374",
|
|
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",
|