Commit Graph

43 Commits

Author SHA1 Message Date
Steve Yegge
cecf63d1b9 docs(scripts): add Gas Town guidance to bump-version.sh
Learned during v0.32.1 release: running version bumps from crew clones
causes git conflicts with bd sync, which commits from mayor/rig.

Added note to always run releases from the rig root where beads lives.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 22:02:10 -08:00
Steve Yegge
1f3b43853d docs(scripts): add molecule workflow note to bump-version.sh
Document that version bumps should be done via molecule bonding for
guided, resumable releases. The bd-6s61 template creates child beads
for each release step.

Until bd mol bond is implemented (bd-usro), use bd template instantiate.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 18:30:36 -08:00
Steve Yegge
5892a826fc feat(packaging): add Windows winget manifest (fixes #524)
Adds winget manifest files for publishing beads to Windows Package Manager:
- winget/SteveYegge.beads.yaml (version manifest)
- winget/SteveYegge.beads.installer.yaml (installer config)
- winget/SteveYegge.beads.locale.en-US.yaml (package metadata)
- scripts/update-winget.sh (helper script for updating manifests)

Once submitted to microsoft/winget-pkgs, users can install with:
  winget install SteveYegge.beads

The update-winget.sh script automates manifest updates for new releases.

Closes #524

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 03:38:31 -08:00
Steve Yegge
a6f0c2d497 fix: sync all version files to 0.30.2 and add CI check
The 0.30.2 bump was done manually and missed several files:
- .claude-plugin/plugin.json (was 0.30.0)
- .claude-plugin/marketplace.json (was 0.30.0)
- npm-package/package.json (was 0.30.1)
- integrations/beads-mcp/pyproject.toml (was 0.30.1)
- integrations/beads-mcp/src/beads_mcp/__init__.py (was 0.30.1)

Added scripts/check-versions.sh and CI job to prevent this in future.
Always use scripts/bump-version.sh for version bumps.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:13:01 -08:00
matt wilkie
bb3ca0c51d restore install.sh which downloads from releases (#573)
Closes #566

There might be some further work to ensure that bd version still reports branch and commit hash. That'll be a separate PR.

Co-authored-by: Matt Wilkie <matt.wilkie@yukon.ca>
2025-12-15 21:17:07 -08:00
matt wilkie
e01b7412d9 feat: add Git worktree compatibility (PR #478)
Adds comprehensive Git worktree support for beads issue tracking:

Core changes:
- New internal/git/gitdir.go package for worktree detection
- GetGitDir() returns proper .git location (main repo, not worktree)
- Updated all hooks to use git.GetGitDir() instead of local helper
- BeadsDir() now prioritizes main repository's .beads directory

Features:
- Hooks auto-install in main repo when run from worktree
- Shared .beads directory across all worktrees
- Config option no-install-hooks to disable auto-install
- New bd worktree subcommand for diagnostics

Documentation:
- New docs/WORKTREES.md with setup instructions
- Updated CHANGELOG.md and AGENT_INSTRUCTIONS.md

Testing:
- Updated tests to use exported git.GetGitDir()
- Added worktree detection tests

Co-authored-by: Claude <noreply@anthropic.com>
Closes: #478
2025-12-13 12:50:33 -08:00
Aodhan Hayter
322f734010 fix(bump-version): update default.nix version (#502)
- Add missing support for scripted default.nix version update to
  bump-version.sh
2025-12-12 15:06:32 -08:00
matt wilkie
2a3a53531c docs: Add comprehensive documentation for version reporting changes 2025-12-13 10:04:01 +11:00
Steve Yegge
0b400c754b fix(install): re-sign binary on macOS to avoid Gatekeeper delays
On macOS, downloaded binaries with ad-hoc signatures from other machines
trigger Gatekeeper malware checks on every invocation, causing slowness.
Re-signing with a local ad-hoc signature avoids this.

Fixes #466

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 09:59:15 +11:00
matt wilkie
2d77e564a8 WIP: changes before push 2025-11-26 17:52:08 -08:00
Steve Yegge
4a2ee066f8 bd sync: 2025-11-24 10:39:28 2025-11-24 10:39:28 -08:00
Steve Yegge
634b6a20f9 feat: Update bump-version.sh to handle CHANGELOG.md
- Automatically moves [Unreleased] section to [version] - date
- Creates new empty [Unreleased] section at top
- Includes CHANGELOG.md in version bump commit
- Follows Keep a Changelog format properly
2025-11-24 00:05:45 -08:00
Steve Yegge
054700456c Add --upgrade-mcp flag to bump-version.sh
- Adds automatic beads-mcp upgrade during version bumps
- Tries pip first, falls back to uv tool
- Warns if version mismatch (normal before PyPI publish)
- Updates RELEASING.md Post-Release section with usage
- Adds reminders in 'Next steps' output if not used
2025-11-23 22:25:37 -08:00
Steve Yegge
0040e8029b feat: Add test infrastructure with automatic skip list
Overview: Added comprehensive test infrastructure to handle the large
test suite (41K LOC, 313 tests in cmd/bd alone) with automatic skipping
of known broken tests.

Changes:
- .test-skip: List of broken tests to skip (with GH issue references)
- scripts/test.sh: Smart test runner that auto-skips broken tests
- docs/TESTING.md: Comprehensive testing guide
- .claude/test-strategy.md: Quick reference for AI agents
- Updated Makefile to use new test script

Known Issues Filed:
- GH #355: TestFallbackToDirectModeEnablesFlush (database deadlock)
- GH #356: TestFindJSONLPathDefault (wrong JSONL filename)

Performance: 3min total (180s compilation, 3.8s execution)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 22:43:04 -05:00
Steve Yegge
ff3ccdd26e rebuild Go binaries in version bump script 2025-11-21 09:45:37 -05:00
Steve Yegge
f4fbf6f8c1 Remove spurious and obsolete scripts
Cleaned up scripts/ directory by removing:
- Investigation/one-off tools (collision-calculator, latency benchmarks)
- Test cleanup utilities (cleanup-test-pollution)
- Nix packaging support (update-nix-hash)
- Agent Mail server management scripts (4 scripts, will be replaced)

Retains only actively-used scripts:
- release.sh, bump-version.sh, update-homebrew.sh
- install.sh, install-hooks.sh, hooks/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 22:02:50 -05:00
Steve Yegge
ddf58cabbd Merge remote changes 2025-11-20 12:41:28 -05:00
Steve Yegge
b56527d101 Use -short flag in release.sh to avoid test deadlock (bd-82dv) 2025-11-08 22:58:43 -08:00
Steve Yegge
005e822978 Merge branch 'main' of github.com:steveyegge/beads 2025-11-08 04:16:47 -08:00
Steve Yegge
bbe73d54bc Add Agent Mail multi-workspace deployment guide and scripts
- docs/AGENT_MAIL_DEPLOYMENT.md: 10-step deployment plan for 13 workspaces
- docs/AGENT_MAIL_MULTI_WORKSPACE_SETUP.md: Architecture and configuration guide
- scripts/setup-agent-mail-workspace.sh: Auto-configure .envrc per workspace
- scripts/start-agent-mail-server.sh: Start Agent Mail server
- scripts/stop-agent-mail-server.sh: Stop Agent Mail server
- scripts/agent-mail-status.sh: Monitor server and all channels

Supports 3-channel setup: beads.dev, vc.dev, wyvern.dev
Ready for 0.23.0 deployment with Agent Mail integration

Amp-Thread-ID: https://ampcode.com/threads/T-bc960efb-3ddc-4635-8c8e-a42a6e9e67d9
Co-authored-by: Amp <amp@ampcode.com>
2025-11-08 04:16:44 -08:00
Steve Yegge
77f91c3ad1 Document update-homebrew.sh script and v0.23.0 fix 2025-11-08 04:15:16 -08:00
Steve Yegge
90f57a7a40 Remove obsolete 10s wait from release.sh (update-homebrew.sh handles waiting) 2025-11-08 04:14:34 -08:00
Steve Yegge
f7d4eb0318 Fix update-homebrew.sh: Use GoReleaser checksums instead of source tarball 2025-11-08 04:14:14 -08:00
Steve Yegge
9351044539 feat(agent-mail): Add Python adapter library for Agent Mail integration
- Created lib/beads_mail_adapter.py with AgentMailAdapter class
- Automatic health check on initialization
- Graceful degradation when server unavailable
- Methods: reserve_issue(), release_issue(), notify(), check_inbox()
- Environment-based configuration (AGENT_MAIL_URL, AGENT_MAIL_TOKEN)
- Comprehensive unit tests (15 tests, 100% passing)
- Full documentation in lib/README.md

Closes bd-m9th

Amp-Thread-ID: https://ampcode.com/threads/T-caa26228-0d18-4b35-b98a-9f95f6a099fe
Co-authored-by: Amp <amp@ampcode.com>
2025-11-08 00:15:07 -08:00
Travis Lyons
d8c04260b6 fix: remove unnecessary cd commands (#257) 2025-11-08 00:10:43 -08:00
Steve Yegge
3e207dfca9 Add cleanup script for test pollution (bd-vxdr) 2025-11-07 16:08:47 -08:00
Steve Yegge
e47d258f54 fix: Handle missing PLUGIN.md in git add during version bump 2025-11-06 20:25:31 -08:00
Steve Yegge
5fc55489af fix: Make PLUGIN.md update optional in bump-version.sh 2025-11-06 20:24:34 -08:00
Ben Lovell
b5e2ef4a59 Add script to automate Nix vendorHash updates (#235)
* Add script to automate Nix vendorHash updates

- Create update-nix-hash.sh to automate vendorHash calculation
- Update vendorHash (to be usedafter recent Go dependency changes)
- Script uses ed for OS agnostic in-place editing and extracts hash from nix output

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Test Nix Flake CI job

* Revert CI change - bd outputs help by default without 'help' arg

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steve Yegge <stevey@sourcegraph.com>
2025-11-06 10:30:19 -08:00
Steve Yegge
626d51dd61 fix: Add npm-package to bump-version script and publish v0.21.8
- Added npm-package/package.json to version bump automation
- Published @beads/bd@0.21.8 to npm
- Future releases will auto-update npm package version
2025-11-05 00:18:19 -08:00
Steve Yegge
38df6c8838 fix: Add --tag and --push flags to bump-version.sh
This addresses confusion where version bump doesn't trigger release.
The script now supports:
- --commit: Create git commit
- --tag: Create annotated git tag (requires --commit)
- --push: Push commit and tag (requires --tag)

Updated RELEASING.md to use: ./scripts/bump-version.sh X.Y.Z --commit --tag --push

Fixes the gap between version bump and actual release trigger.
2025-11-05 00:08:08 -08:00
Steve Yegge
76d3403d0a Implement adaptive ID length scaling (bd-ea2a13)
- Start with 4-char IDs for small databases (0-500 issues)
- Scale to 5-char at 500-1500 issues, 6-char at 1500+
- Configurable via max_collision_prob, min/max_hash_length
- Birthday paradox math ensures collision probability stays under threshold
- Comprehensive tests and documentation
- Collision calculator tool for analysis

Also filed bd-aa744b to remove sequential ID code path.
2025-10-30 21:40:52 -07:00
matt wilkie
8d86f3f9eb installer(unix): warn when multiple 'bd' executables are on PATH and record install path 2025-10-30 15:57:37 +00:00
Steve Yegge
a91467d2fb Add full release automation script
Amp-Thread-ID: https://ampcode.com/threads/T-789d9ba6-2aea-4ee9-b4dc-ce73e8f496f4
Co-authored-by: Amp <amp@ampcode.com>
2025-10-25 16:57:15 -07:00
Steve Yegge
d31e9e7156 Add Homebrew formula update automation script
Amp-Thread-ID: https://ampcode.com/threads/T-789d9ba6-2aea-4ee9-b4dc-ce73e8f496f4
Co-authored-by: Amp <amp@ampcode.com>
2025-10-25 16:54:15 -07:00
Steve Yegge
7931fd4f0d fix(install): restore proper error codes in install script
Revert return 0 -> return 1 for error cases to preserve fallback logic.
Functions should return 1 on failure so main() tries alternative methods.

- Error cases (missing tools, download failures, build failures): return 1
- Success cases: return 0
- Directory restoration fixes from PR #143 are preserved

Amp-Thread-ID: https://ampcode.com/threads/T-908f1690-937c-499f-bf51-ee35a9241eb2
Co-authored-by: Amp <amp@ampcode.com>
2025-10-24 14:58:36 -07:00
Marco Del Pin
f420882f02 fix(install): prevent shell corruption from directory deletion
This fix addresses 3 critical bugs in the install script that caused cascading failures:

**Bug #1: Directory Deletion Without Restoration**
- Script executed `cd "$tmp_dir"` then `rm -rf "$tmp_dir"` on error
- Left shell in deleted directory causing "cannot determine current directory" errors
- Added `cd - > /dev/null || cd "$HOME"` before all `rm -rf "$tmp_dir"` calls (7 locations)

**Bug #2: Go Command Failures**
- Go commands failed with "cannot determine current directory" after directory deletion
- Caused empty `$go_version` variable

**Bug #3: Empty Variable Integer Comparison**
- Empty `$major` and `$minor` variables caused "integer expression expected" bash error (line 167)
- Added variable validation before integer comparison

**Changes:**
- Added 7 directory restoration calls before temp directory cleanup
- Changed all `return 1` to `return 0` per bash safety best practices (prevents shell exit if sourced)
- Added Go version variable validation with regex check
- Added warning comment about script execution vs sourcing

**Test Results:**
- BEFORE: 5 "cannot determine current directory" errors + 2 "integer expression expected" errors
- AFTER: 0 errors, clean installation

**Impact:**
- Eliminates confusing error messages during installation
- Prevents shell corruption if script is accidentally sourced
- Improves error recovery when pre-built binaries are unavailable
- Maintains backward compatibility - all installation paths still work

**Related Documentation:**
Comprehensive analysis available in test repository:
`docs/development/BEADS_INSTALL_SCRIPT_ANALYSIS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 15:40:25 +02:00
Steve Yegge
50eb9ce550 feat: Add GoReleaser workflow for cross-platform binary releases
- Add .goreleaser.yml for automated releases
- Add .github/workflows/release.yml triggered on version tags
- Build matrix: darwin/linux/windows for amd64/arm64
- Update install.sh to download from GitHub releases first
- Add install.sh symlink at root for convenience
- Update RELEASING.md with automation documentation

Closes #89 (vendorable executables as releases)
Implements bd-85

Amp-Thread-ID: https://ampcode.com/threads/T-02baad43-7e97-4710-bc60-777643d2eb77
Co-authored-by: Amp <amp@ampcode.com>
2025-10-23 19:02:12 -07:00
Steve Yegge
a86f3e139e Add native Windows support (#91)
- Native Windows daemon using TCP loopback endpoints
- Direct-mode fallback for CLI/daemon compatibility
- Comment operations over RPC
- PowerShell installer script
- Go 1.24 requirement
- Cross-OS testing documented

Co-authored-by: danshapiro <danshapiro@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-c6230265-055f-4af1-9712-4481061886db
Co-authored-by: Amp <amp@ampcode.com>
2025-10-20 21:08:49 -07:00
Marco Del Pin
f621e80dc3 Restore install.sh to scripts/ directory and update README (#84)
- Restore install.sh (249 lines) from commit b8bcffb^ to scripts/ directory
- Update README.md to reference scripts/install.sh in installation instructions
- Fix 404 error for users following quick installation guide

The install.sh script was accidentally deleted in commit b8bcffb (2025-10-17)
during directory reorganization. This restores it to the new scripts/ directory
as intended by the reorganization.
2025-10-19 09:41:42 -07:00
Steve Yegge
1aad54be55 feat: Add post-push hook to auto-install bd CLI after git push
Hook automatically rebuilds and installs bd CLI when Go files change.

Usage in new clones:
  ./scripts/install-hooks.sh

Files:
- scripts/hooks/post-push: Hook that runs go install after successful push
- scripts/install-hooks.sh: Installer to set up hooks in new clones

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:23:43 -07:00
Steve Yegge
2bb6f026c2 fix: Update version bump script to include MCP server __init__.py
Issue found: bump-version.sh was missing the MCP server's __init__.py file, causing version mismatches (pyproject.toml: 0.9.2, __init__.py: 1.0.0).

Changes:
- Add integrations/beads-mcp/src/beads_mcp/__init__.py to update list
- Add it to git staging in auto-commit
- Add it to verification check
- Fix current version mismatch: 1.0.0 to 0.9.2

Now the script updates 7 files instead of 6
2025-10-14 14:34:04 -07:00
Steve Yegge
a5c71f03ea feat: Add version bump script for consistent versioning
Adds scripts/bump-version.sh to automate version syncing across all
beads components, preventing version mismatches like bd-66.

Features:
- Updates all version files in one command
- Validates semantic versioning format
- Verifies all versions match after update
- Shows git diff preview
- Optional auto-commit with standardized message
- Cross-platform compatible (macOS/Linux)

Files updated by script:
- cmd/bd/version.go
- .claude-plugin/plugin.json
- .claude-plugin/marketplace.json
- integrations/beads-mcp/pyproject.toml
- README.md
- PLUGIN.md

Usage:
  ./scripts/bump-version.sh 0.9.3           # Dry run with diff
  ./scripts/bump-version.sh 0.9.3 --commit  # Auto-commit

Closes bd-67

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 13:49:21 -07:00