@kody-ade/kody-engine 0.3.21 → 0.3.22

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,53 @@
1
+ {
2
+ "name": "release-publish",
3
+ "role": "utility",
4
+ "phase": "shipped",
5
+ "describe": "Tag the merged release commit, run the configured publishCommand, create the GitHub release. No agent.",
6
+ "inputs": [
7
+ {
8
+ "name": "dry-run",
9
+ "flag": "--dry-run",
10
+ "type": "bool",
11
+ "required": false,
12
+ "describe": "Print plan without tagging or publishing."
13
+ },
14
+ {
15
+ "name": "issue",
16
+ "flag": "--issue",
17
+ "type": "int",
18
+ "required": false,
19
+ "describe": "Issue/PR number to post the terminal notice on. Auto-injected by dispatch."
20
+ }
21
+ ],
22
+ "claudeCode": {
23
+ "model": "inherit",
24
+ "permissionMode": "acceptEdits",
25
+ "maxTurns": 0,
26
+ "maxThinkingTokens": null,
27
+ "systemPromptAppend": null,
28
+ "tools": [],
29
+ "hooks": [],
30
+ "skills": [],
31
+ "commands": [],
32
+ "subagents": [],
33
+ "plugins": [],
34
+ "mcpServers": []
35
+ },
36
+ "cliTools": [],
37
+ "inputArtifacts": [],
38
+ "outputArtifacts": [],
39
+ "scripts": {
40
+ "preflight": [
41
+ { "script": "setCommentTarget", "with": { "type": "issue" } },
42
+ { "script": "loadTaskState" },
43
+ { "shell": "publish.sh" },
44
+ { "script": "skipAgent" }
45
+ ],
46
+ "postflight": [
47
+ { "script": "recordOutcome" },
48
+ { "script": "saveTaskState" },
49
+ { "script": "notifyTerminal", "with": { "label": "release publish" } },
50
+ { "script": "advanceFlow" }
51
+ ]
52
+ }
53
+ }
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # release-publish: tag the current package version, push the tag, run the
4
+ # configured publishCommand (e.g. `pnpm publish --access public`), create
5
+ # the GitHub release. Runs AFTER the orchestrator has merged the release
6
+ # PR into the default branch. No agent.
7
+ #
8
+ # Inputs (env):
9
+ # KODY_ARG_DRY_RUN true|false
10
+ # KODY_ARG_ISSUE triggering issue/PR number (optional)
11
+ #
12
+ # Config (env):
13
+ # KODY_CFG_GIT_DEFAULTBRANCH e.g. main
14
+ # KODY_CFG_RELEASE_PUBLISHCOMMAND optional; $VERSION is substituted
15
+ # KODY_CFG_RELEASE_DRAFTRELEASE "true" → create as draft
16
+ # KODY_CFG_RELEASE_TIMEOUTMS publish timeout (default 600000ms)
17
+ #
18
+ # Stdout signals:
19
+ # KODY_REASON=<text>
20
+ # KODY_PR_URL=<release URL> — gh release create URL (used as the "PR" link)
21
+ # KODY_SKIP_AGENT=true
22
+
23
+ set -euo pipefail
24
+
25
+ dry_run="${KODY_ARG_DRY_RUN:-false}"
26
+ default_branch="${KODY_CFG_GIT_DEFAULTBRANCH:-main}"
27
+ publish_cmd="${KODY_CFG_RELEASE_PUBLISHCOMMAND:-}"
28
+ draft="${KODY_CFG_RELEASE_DRAFTRELEASE:-false}"
29
+ timeout_ms="${KODY_CFG_RELEASE_TIMEOUTMS:-600000}"
30
+ timeout_s=$((timeout_ms / 1000))
31
+
32
+ fail() {
33
+ echo "KODY_REASON=$1"
34
+ echo "KODY_SKIP_AGENT=true"
35
+ exit "${2:-1}"
36
+ }
37
+
38
+ read_pkg_version() {
39
+ python3 -c "import json; print(json.load(open('package.json'))['version'])"
40
+ }
41
+
42
+ if [[ ! -f package.json ]]; then
43
+ fail "release publish: package.json not found" 99
44
+ fi
45
+
46
+ export HUSKY=0 SKIP_HOOKS=1 CI="${CI:-1}"
47
+
48
+ # Make sure we're on the merged commit. The orchestrator merged the release
49
+ # PR into default_branch; pull so the local tree has the bump commit.
50
+ git fetch origin "$default_branch" --tags
51
+ git checkout "$default_branch"
52
+ git reset --hard "origin/$default_branch"
53
+
54
+ version=$(read_pkg_version)
55
+ tag="v${version}"
56
+
57
+ echo "→ release publish: ${tag}"
58
+
59
+ # Refuse if the tag already exists locally (left over from a prior failed run).
60
+ if git rev-parse --verify "$tag" >/dev/null 2>&1; then
61
+ fail "release publish: tag ${tag} already exists" 1
62
+ fi
63
+
64
+ if [[ "$dry_run" == "true" ]]; then
65
+ echo "KODY_REASON=dry-run — would tag + publish ${tag}"
66
+ echo "KODY_SKIP_AGENT=true"
67
+ exit 0
68
+ fi
69
+
70
+ # Tag + push.
71
+ git tag -a "$tag" -m "Release ${tag}"
72
+ git push origin "$tag"
73
+
74
+ # publishCommand (optional). Failure here is recorded but does not abort —
75
+ # we still want the GH release entry so the tag is discoverable.
76
+ publish_status="skipped"
77
+ if [[ -n "$publish_cmd" ]]; then
78
+ cmd="${publish_cmd//\$VERSION/$version}"
79
+ echo " publish: ${cmd}"
80
+ if timeout "${timeout_s}" bash -c "$cmd"; then
81
+ publish_status="ok"
82
+ else
83
+ publish_status="failed"
84
+ echo "[kody release-publish] publishCommand failed (continuing to create GH release)" >&2
85
+ fi
86
+ fi
87
+
88
+ # GitHub release.
89
+ release_url=""
90
+ draft_flag=""
91
+ [[ "$draft" == "true" ]] && draft_flag="--draft"
92
+ if release_url=$(gh release create "$tag" --title "$tag" --notes "Release ${tag} — automated by kody." $draft_flag 2>&1); then
93
+ :
94
+ else
95
+ echo "[kody release-publish] gh release create failed: $release_url" >&2
96
+ release_url=""
97
+ fi
98
+
99
+ echo "RELEASE_TAG=${tag}"
100
+ [[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
101
+
102
+ if [[ "$publish_status" == "failed" ]]; then
103
+ echo "KODY_REASON=tag + GH release created, but publishCommand failed"
104
+ echo "KODY_SKIP_AGENT=true"
105
+ exit 1
106
+ fi
107
+
108
+ [[ -n "$release_url" ]] && echo "KODY_PR_URL=${release_url}"
109
+ echo "KODY_REASON=tagged ${tag}, published${publish_status:+ ($publish_status)}"
110
+ echo "KODY_SKIP_AGENT=true"
@@ -57,8 +57,17 @@ documented in `AGENTS.md` / `CLAUDE.md` — reference those files by path
57
57
  cite it; don't copy it.
58
58
 
59
59
  ## Clarifying questions
60
- Numbered list. Each question must include a one-line "Why:" explaining why
61
- the answer changes the implementation. Skip if there are genuinely none.
60
+ Numbered list. Each question must include a one-line "Why:" naming the
61
+ concrete implementation decision the answer would unblock not "why it
62
+ matters" in general, but which fork in the road it picks.
63
+
64
+ Default to asking. Only skip this section when every entry in
65
+ "Gaps & assumptions" is genuinely safe to proceed on without confirmation;
66
+ if you skip, justify it in one line under the heading. Prefer a few sharp
67
+ questions over many soft ones — a question that wouldn't change the
68
+ implementation is noise. Address the questions to the issue author / a
69
+ human reviewer; they'll be answered in a follow-up comment and picked up
70
+ on the next research run via delta mode.
62
71
 
63
72
  ## Gaps & assumptions
64
73
  What is unknown, and — for each gap — what assumption the implementer would
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
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",