kaizen-agent 1.76.0 → 1.76.1

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.
Files changed (2) hide show
  1. package/cli/release.sh +17 -6
  2. package/package.json +1 -1
package/cli/release.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
- # Runs after `bun publish`: tag the published version and open a GitHub release
3
- # for it, so a version can never exist on npm with nothing to read on GitHub.
2
+ # Runs after `bun publish`: tag the published version and draft its GitHub release.
3
+ # desktop.yml publishes the draft once the installers are attached and green.
4
4
  #
5
5
  # Never fails the publish. The package is already public by the time this runs;
6
6
  # exiting non-zero here would report a failure that did not happen.
@@ -21,7 +21,11 @@ fi
21
21
  command -v gh >/dev/null 2>&1 || { echo "release: gh not installed — tag pushed, write the release by hand"; exit 0; }
22
22
  gh auth status >/dev/null 2>&1 || { echo "release: gh not logged in — tag pushed, write the release by hand"; exit 0; }
23
23
 
24
- if gh release view "$tag" >/dev/null 2>&1; then
24
+ # The release is made as a draft: the desktop workflow publishes it once its
25
+ # installers are attached, so the app's updater never meets a release without them.
26
+ # A draft already there is the desktop job's placeholder (it ran first): fill it in.
27
+ draft="$(gh release view "$tag" --json isDraft -q .isDraft 2>/dev/null || echo none)"
28
+ if [ "$draft" = "false" ]; then
25
29
  echo "release: $tag already released"
26
30
  exit 0
27
31
  fi
@@ -50,8 +54,15 @@ git log --reverse --format='### %s%n%n%b' ${prev:+"$prev.."}"$tag" \
50
54
  | grep -vE '^### Release [0-9.]+:' \
51
55
  | cat -s > "$notes"
52
56
  [ -n "$prev" ] && printf '\n**Full Changelog**: https://github.com/hfadhlullah/kaizen/compare/%s...%s\n' "$prev" "$tag" >> "$notes"
53
- err="$(gh release create "$tag" --title "$title" --notes-file "$notes" $assets 2>&1 >/dev/null)" \
54
- && echo "release: published $tag https://github.com/hfadhlullah/kaizen/releases/tag/$tag" \
55
- || echo "release: tag pushed, release not created: $err"
57
+ if [ "$draft" = "true" ]; then
58
+ err="$(gh release edit "$tag" --title "$title" --notes-file "$notes" 2>&1 >/dev/null \
59
+ && { [ -z "$assets" ] || gh release upload "$tag" $assets --clobber 2>&1 >/dev/null; })" \
60
+ && echo "release: filled in the desktop job's draft $tag; publish it by hand https://github.com/hfadhlullah/kaizen/releases" \
61
+ || echo "release: tag pushed, draft not filled in: $err"
62
+ else
63
+ err="$(gh release create "$tag" --draft --title "$title" --notes-file "$notes" $assets 2>&1 >/dev/null)" \
64
+ && echo "release: drafted $tag; the desktop workflow publishes it once its installers are attached" \
65
+ || echo "release: tag pushed, release not created: $err"
66
+ fi
56
67
  rm -f "$notes"
57
68
  exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaizen-agent",
3
- "version": "1.76.0",
3
+ "version": "1.76.1",
4
4
  "description": "Staged workflow for AI agents — code, writing, research, operations: plan, human approval, build, independent review, bounded fix loop.",
5
5
  "type": "module",
6
6
  "bin": {