@kody-ade/kody-engine 0.4.16 → 0.4.17
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
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@kody-ade/kody-engine",
|
|
6
|
-
version: "0.4.
|
|
6
|
+
version: "0.4.17",
|
|
7
7
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
8
8
|
license: "MIT",
|
|
9
9
|
type: "module",
|
|
@@ -175,10 +175,29 @@ PY
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
list_goal_issues() {
|
|
178
|
-
# Up to 100 goal-labelled issues. PRs filtered out.
|
|
178
|
+
# Up to 100 goal-labelled issues. PRs filtered out. Also filters out the
|
|
179
|
+
# umbrella goal issue (if any) — it shares the `goal:<id>` label so the
|
|
180
|
+
# dashboard groups it under the goal, but it must NOT count as a child
|
|
181
|
+
# task: while the umbrella is open the "all child tasks closed" finalize
|
|
182
|
+
# check would never fire (the umbrella only closes on goal-PR merge,
|
|
183
|
+
# which only happens during finalize — deadlock).
|
|
184
|
+
local exclude
|
|
185
|
+
exclude=$(read_state_field "goalIssueNumber")
|
|
179
186
|
gh api \
|
|
180
187
|
"repos/{owner}/{repo}/issues?labels=${label}&state=all&per_page=100" \
|
|
181
|
-
--jq '[.[] | select(.pull_request == null) | {number, state: (.state | ascii_upcase), labels: [.labels[].name]}]'
|
|
188
|
+
--jq '[.[] | select(.pull_request == null) | {number, state: (.state | ascii_upcase), labels: [.labels[].name]}]' \
|
|
189
|
+
| EXCLUDE="$exclude" python3 -c "
|
|
190
|
+
import json, os, sys
|
|
191
|
+
data = json.load(sys.stdin)
|
|
192
|
+
ex = os.environ.get('EXCLUDE', '')
|
|
193
|
+
if ex:
|
|
194
|
+
try:
|
|
195
|
+
ex_num = int(ex)
|
|
196
|
+
data = [i for i in data if i['number'] != ex_num]
|
|
197
|
+
except ValueError:
|
|
198
|
+
pass
|
|
199
|
+
print(json.dumps(data))
|
|
200
|
+
"
|
|
182
201
|
}
|
|
183
202
|
|
|
184
203
|
# ── Cleanup path: state == abandoned ──────────────────────────────────────────
|
|
@@ -224,6 +243,14 @@ fi
|
|
|
224
243
|
ensure_label "$dispatched_label" "ededed" "kody goal-runner: already dispatched this tick"
|
|
225
244
|
ensure_label "$failed_label" "b60205" "kody goal-runner: task failed; needs human attention"
|
|
226
245
|
|
|
246
|
+
# Open the umbrella goal issue on the first active tick (idempotent — no-op if
|
|
247
|
+
# state.json already has goalIssueNumber). The dashboard renders this issue as
|
|
248
|
+
# the goal's "row" with kody:building status; it auto-closes when the final
|
|
249
|
+
# goal PR merges via the `Closes #N` we add to that PR's body. Doing this here
|
|
250
|
+
# (before list_goal_issues) ensures the umbrella exists before we start
|
|
251
|
+
# counting child tasks, so list_goal_issues can filter it out cleanly.
|
|
252
|
+
ensure_goal_issue
|
|
253
|
+
|
|
227
254
|
issues_json=$(list_goal_issues)
|
|
228
255
|
total=$(echo "$issues_json" | python3 -c "import json,sys; print(len(json.load(sys.stdin)))")
|
|
229
256
|
if [ "$total" = "0" ]; then
|
|
@@ -361,12 +388,6 @@ else
|
|
|
361
388
|
fi
|
|
362
389
|
fi
|
|
363
390
|
|
|
364
|
-
# The goal branch now exists (or the fallback path will be used). Open the
|
|
365
|
-
# umbrella goal issue if we haven't yet, so the dashboard can render the goal
|
|
366
|
-
# as an issue row with a "kody:building" status and the goal branch as its
|
|
367
|
-
# preview. Idempotent — only the first call actually creates anything.
|
|
368
|
-
ensure_goal_issue
|
|
369
|
-
|
|
370
391
|
echo "[goal-tick] dispatching @kody on task #$next_issue (--base $goal_branch)"
|
|
371
392
|
gh issue comment "$next_issue" --body "@kody --base ${goal_branch}"
|
|
372
393
|
gh issue edit "$next_issue" --add-label "$dispatched_label"
|
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.17",
|
|
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",
|