@kody-ade/kody-engine 0.2.58 → 0.2.60

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.
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "approve",
3
+ "role": "utility",
4
+ "describe": "Acknowledge pending risk gate(s) on an issue or PR: applies kody-approve:* labels on both the issue and its PR (if discoverable via task state), then re-triggers the paused flow. Invoked by `@kody2 approve`.",
5
+ "inputs": [
6
+ {
7
+ "name": "issue",
8
+ "flag": "--issue",
9
+ "type": "int",
10
+ "required": false,
11
+ "describe": "Issue number (when approving on the originating issue)."
12
+ },
13
+ {
14
+ "name": "pr",
15
+ "flag": "--pr",
16
+ "type": "int",
17
+ "required": false,
18
+ "describe": "PR number (when approving on the PR side)."
19
+ }
20
+ ],
21
+ "claudeCode": {
22
+ "model": "inherit",
23
+ "permissionMode": "default",
24
+ "maxTurns": 0,
25
+ "maxThinkingTokens": null,
26
+ "systemPromptAppend": null,
27
+ "tools": [],
28
+ "hooks": [],
29
+ "skills": [],
30
+ "commands": [],
31
+ "subagents": [],
32
+ "plugins": [],
33
+ "mcpServers": []
34
+ },
35
+ "cliTools": [],
36
+ "scripts": {
37
+ "preflight": [
38
+ { "script": "skipAgent" }
39
+ ],
40
+ "postflight": [
41
+ { "script": "applyApprovals" }
42
+ ]
43
+ },
44
+ "output": {
45
+ "actionTypes": []
46
+ }
47
+ }
@@ -0,0 +1 @@
1
+ (approve is an agent-less utility; this file is a placeholder kept to satisfy the profile layout convention.)
@@ -66,40 +66,17 @@
66
66
  }
67
67
  ],
68
68
  "postflight": [
69
- {
70
- "script": "parseAgentResult"
71
- },
72
- {
73
- "script": "requireFeedbackActions"
74
- },
75
- {
76
- "script": "verify"
77
- },
78
- {
79
- "script": "checkCoverageWithRetry"
80
- },
81
- {
82
- "script": "commitAndPush"
83
- },
84
- {
85
- "script": "ensurePr"
86
- },
87
- {
88
- "script": "postIssueComment"
89
- },
90
- {
91
- "script": "writeRunSummary"
92
- },
93
- {
94
- "script": "saveTaskState"
95
- },
96
- {
97
- "script": "riskGate"
98
- },
99
- {
100
- "script": "advanceFlow",
101
- "runWhen": { "data.riskGate.decision": "allow" }
102
- }
69
+ { "script": "parseAgentResult" },
70
+ { "script": "requireFeedbackActions" },
71
+ { "script": "verify" },
72
+ { "script": "checkCoverageWithRetry" },
73
+ { "script": "commitAndPush" },
74
+ { "script": "riskGate" },
75
+ { "script": "ensurePr", "runWhen": { "data.riskGate.decision": "allow" } },
76
+ { "script": "postIssueComment", "runWhen": { "data.riskGate.decision": "allow" } },
77
+ { "script": "writeRunSummary" },
78
+ { "script": "saveTaskState", "runWhen": { "data.riskGate.decision": "allow" } },
79
+ { "script": "advanceFlow", "runWhen": { "data.riskGate.decision": "allow" } }
103
80
  ]
104
81
  },
105
82
  "output": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "release",
3
3
  "role": "utility",
4
+ "phase": "shipped",
4
5
  "describe": "Version bump + changelog + release PR (prepare), or tag + publish + GH release (finalize). No agent.",
5
6
  "inputs": [
6
7
  {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "review",
3
3
  "role": "primitive",
4
+ "phase": "reviewing",
4
5
  "describe": "Read-only structured review of an open PR. Posts one comment, never commits.",
5
6
  "inputs": [
6
7
  {
@@ -62,43 +62,18 @@
62
62
  }
63
63
  ],
64
64
  "postflight": [
65
- {
66
- "script": "parseAgentResult"
67
- },
68
- {
69
- "script": "requirePlanDeviations"
70
- },
71
- {
72
- "script": "verify"
73
- },
74
- {
75
- "script": "checkCoverageWithRetry"
76
- },
77
- {
78
- "script": "commitAndPush"
79
- },
80
- {
81
- "script": "ensurePr"
82
- },
83
- {
84
- "script": "postIssueComment"
85
- },
86
- {
87
- "script": "writeRunSummary"
88
- },
89
- {
90
- "script": "saveTaskState"
91
- },
92
- {
93
- "script": "mirrorStateToPr"
94
- },
95
- {
96
- "script": "riskGate"
97
- },
98
- {
99
- "script": "advanceFlow",
100
- "runWhen": { "data.riskGate.decision": "allow" }
101
- }
65
+ { "script": "parseAgentResult" },
66
+ { "script": "requirePlanDeviations" },
67
+ { "script": "verify" },
68
+ { "script": "checkCoverageWithRetry" },
69
+ { "script": "commitAndPush" },
70
+ { "script": "riskGate" },
71
+ { "script": "ensurePr", "runWhen": { "data.riskGate.decision": "allow" } },
72
+ { "script": "postIssueComment", "runWhen": { "data.riskGate.decision": "allow" } },
73
+ { "script": "writeRunSummary" },
74
+ { "script": "saveTaskState", "runWhen": { "data.riskGate.decision": "allow" } },
75
+ { "script": "mirrorStateToPr", "runWhen": { "data.riskGate.decision": "allow" } },
76
+ { "script": "advanceFlow", "runWhen": { "data.riskGate.decision": "allow" } }
102
77
  ]
103
78
  },
104
79
  "input": {
@@ -9,6 +9,7 @@
9
9
 
10
10
  import type { AgentResult } from "../agent.js"
11
11
  import type { Kody2Config } from "../config.js"
12
+ import type { Phase } from "../state.js"
12
13
 
13
14
  // ────────────────────────────────────────────────────────────────────────────
14
15
  // Profile shape (mirrors the JSON on disk).
@@ -37,6 +38,12 @@ export interface Profile {
37
38
  kind: "oneshot" | "scheduled"
38
39
  /** Cron expression for scheduled profiles (e.g. "0 8 * * MON"). */
39
40
  schedule?: string
41
+ /**
42
+ * Task-state phase label emitted when this executable completes successfully.
43
+ * Failing actions always set phase to "failed" regardless. Omitted → "idle".
44
+ * Lets state.ts stay generic — phase semantics live on the profile.
45
+ */
46
+ phase?: Phase
40
47
  inputs: InputSpec[]
41
48
  claudeCode: ClaudeCodeSpec
42
49
  cliTools: CliToolSpec[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.2.58",
3
+ "version": "0.2.60",
4
4
  "description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,10 +14,14 @@
14
14
  # toJSON(secrets) — no need to list them here.
15
15
  #
16
16
  # Recommended: KODY_TOKEN secret — a fine-grained PAT or GitHub App token
17
- # with `repo` + `read:org` scopes. Without it, kody2's commits/PR-creation
18
- # still work via github.token, but two things degrade:
17
+ # with `repo` + `read:org` + `workflow` scopes. Without it, kody2's
18
+ # commits/PR-creation still work via github.token, but three things degrade:
19
19
  # 1. PR body updates fail with "token lacks read:org scope" (cosmetic).
20
20
  # 2. Pushes from kody2 won't trigger downstream workflows.
21
+ # 3. Any commit that modifies `.github/workflows/*` is REJECTED by
22
+ # GitHub — the default GITHUB_TOKEN can't touch workflow files.
23
+ # (The `workflow-edit` risk gate is effectively unreachable without
24
+ # a token carrying the `workflow` scope.)
21
25
  # Set KODY_TOKEN in repo Settings → Secrets → Actions.
22
26
 
23
27
  name: kody2