Commit Graph

675 Commits

Author SHA1 Message Date
Steve Yegge
f3005d3dc8 Export with bd-150/152/153 closed 2025-10-26 19:39:24 -07:00
Steve Yegge
1c95b69977 bd sync: 2025-10-26 19:39:04 2025-10-26 19:39:04 -07:00
Steve Yegge
445af4e3a5 bd sync: 2025-10-26 19:35:57 2025-10-26 19:35:57 -07:00
Steve Yegge
1c998917e5 bd sync: 2025-10-26 19:35:36 2025-10-26 19:35:36 -07:00
Steve Yegge
3d83a39362 bd sync: 2025-10-26 19:26:33 2025-10-26 19:26:33 -07:00
Steve Yegge
9e33784623 bd sync: 2025-10-26 19:23:21 2025-10-26 19:23:21 -07:00
Steve Yegge
7591a3bf81 Add bd migrate command for database upgrades (bd-164)
- Implement bd migrate command with detection, version checking, and cleanup
- Update daemon to suggest bd migrate for version mismatches
- Enhance CLI version warnings to recommend bd migrate
- Add comprehensive tests for migration scenarios
- Document migration workflow in QUICKSTART.md and AGENTS.md

Completes bd-164 and epic bd-159

Amp-Thread-ID: https://ampcode.com/threads/T-34ea4682-8c48-44c2-8421-dc40f867773b
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 19:20:59 -07:00
Steve Yegge
5cede5e84d bd sync: 2025-10-26 19:04:08 2025-10-26 19:20:59 -07:00
Steve Yegge
2a274b7a10 bd sync: 2025-10-26 19:03:21 2025-10-26 19:03:21 -07:00
Steve Yegge
eb2563310b Update issue metadata
Amp-Thread-ID: https://ampcode.com/threads/T-f1cff202-188b-4850-a909-c2750d24ad22
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 19:03:07 -07:00
Steve Yegge
4e38626361 Document bd daemons commands (bd-150)
Amp-Thread-ID: https://ampcode.com/threads/T-f1cff202-188b-4850-a909-c2750d24ad22
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 19:03:03 -07:00
Steve Yegge
7980b9c9e9 Implement bd daemons killall and logs (bd-153, bd-152)
Amp-Thread-ID: https://ampcode.com/threads/T-f1cff202-188b-4850-a909-c2750d24ad22
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 19:03:00 -07:00
Steve Yegge
43264dbf35 Add RECOVERY.md documenting lost work from git reset 2025-10-26 18:55:24 -07:00
Steve Yegge
881e0940a7 Add config.json support for database path configuration (bd-163)
- Create internal/configfile package for config.json handling
- bd init now creates .beads/config.json with database, version, and jsonl_export fields
- Database discovery checks config.json first, falls back to beads.db
- Update .gitignore to not ignore config.json (part of repo state)
- Update test to expect beads.db and config.json
- Backward compatible with existing beads.db-only setups
2025-10-26 18:44:27 -07:00
Steve Yegge
51abbb512e bd sync: 2025-10-26 18:44:19 2025-10-26 18:44:19 -07:00
Steve Yegge
7549bd86bc Implement stricter daemon lock file validation (bd-161)
- Add JSON format to daemon.lock with database path, version, PID, and timestamp
- Validate database path on client connection (fail if mismatch)
- Backward compatible with old plain-PID lock files
- Add comprehensive tests for JSON format and validation
- Update all lock acquisition callsites to pass database path

Amp-Thread-ID: https://ampcode.com/threads/T-137e6a9c-b690-4ade-9bec-13fcd7d0e4ed
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 18:37:25 -07:00
Steve Yegge
50623f8be1 bd sync: 2025-10-26 18:35:28 2025-10-26 18:35:28 -07:00
Steve Yegge
93e170627d bd-154: Implement bd daemons stop and restart subcommands 2025-10-26 18:35:28 -07:00
Steve Yegge
cd86d7d2ba Implement bd-160: Add database schema versioning
- Added version validation on daemon startup
- Daemon checks bd_version metadata matches current version
- Clear error messages for version mismatches with 3 resolution options
- Auto-sets missing version metadata for old databases
- Added BEADS_IGNORE_VERSION_MISMATCH=1 override for emergencies
- Tested version mismatch detection, override flag, and missing metadata handling
2025-10-26 18:28:15 -07:00
Steve Yegge
b39420f748 bd sync: 2025-10-26 18:21:59 2025-10-26 18:21:59 -07:00
Steve Yegge
0a283d5148 bd-151: Implement bd daemons health subcommand 2025-10-26 18:21:55 -07:00
Steve Yegge
1c7de68bfc bd sync: 2025-10-26 18:17:38 2025-10-26 18:17:38 -07:00
Steve Yegge
9448d5227c bd-149: Add auto-cleanup of stale sockets and PID files to bd daemons list 2025-10-26 18:17:33 -07:00
Steve Yegge
991da5af0c bd sync: 2025-10-26 18:16:59 2025-10-26 18:16:59 -07:00
Steve Yegge
ae5aee279b Implement bd-162: Enforce canonical database name (beads.db)
- Changed bd init to always create beads.db instead of {prefix}.db
- Added migration logic to detect and rename old databases
- Updated findDatabaseInTree to prefer beads.db and warn on multiple .db files
- Daemon now refuses to start if multiple .db files exist (ambiguity error)
- Updated tests to expect beads.db instead of prefix-based naming
- Tested migration, ambiguity detection, and warning messages
2025-10-26 18:16:27 -07:00
Steve Yegge
dd82840886 Close bd-165 as duplicate 2025-10-26 18:10:51 -07:00
Steve Yegge
95f50d7943 bd sync: 2025-10-26 18:10:45 2025-10-26 18:10:45 -07:00
Steve Yegge
764915f6a6 bd sync: 2025-10-26 18:10:25 2025-10-26 18:10:25 -07:00
Steve Yegge
c61ca494fe feat(daemons): implement discovery and list command (bd-146, bd-147)
- Add daemon discovery mechanism with socket scanning
- Implement depth-limited filesystem walk to avoid hangs
- Add DaemonInfo struct with metadata collection
- Create 'bd daemons list' command with table and JSON output
- Add FindDaemonByWorkspace and CleanupStaleSockets utilities
- Fix workspace path to be parent of .beads directory
- Add comprehensive tests for discovery functionality

Closes bd-146
Closes bd-147
2025-10-26 18:10:24 -07:00
Steve Yegge
75c959e69c feat(daemon): add GET /status endpoint (bd-148)
- Add OpStatus operation and StatusResponse type to RPC protocol
- Add workspacePath and dbPath fields to Server struct
- Implement handleStatus() handler with daemon metadata
- Track last activity time with atomic.Value
- Add client.Status() method
- Check for exclusive locks via ShouldSkipDatabase()
- Update all test files to use new NewServer signature
- Add comprehensive status endpoint test

Closes bd-148
2025-10-26 17:55:39 -07:00
Steve Yegge
6bf5c9d2b9 bd sync: 2025-10-26 17:55:32 2025-10-26 17:55:32 -07:00
Steve Yegge
2dd96bff43 chore: Bump version to 0.17.5
Updated all component versions:
- bd CLI: 0.17.4 → 0.17.5
- Plugin: 0.17.4 → 0.17.5
- MCP server: 0.17.4 → 0.17.5
- Documentation: 0.17.4 → 0.17.5

Generated by scripts/bump-version.sh
2025-10-26 17:42:05 -07:00
Steve Yegge
5493559317 Sync AGENTS.md 2025-10-26 17:40:22 -07:00
Steve Yegge
2b43bde756 Update AGENTS.md with new sync workflow and batching behavior
- Document 30-second batching window
- Add 'Agent Session Workflow' section with bd sync instructions
- Update Pro Tips to emphasize running 'bd sync' at end of session
- Clarify auto-sync timing (30s debounce, 5s daemon poll)
2025-10-26 17:39:10 -07:00
Steve Yegge
e910d96bc6 Adjust sync timings for better batching behavior
- Increase flush debounce from 1s to 30s (provides transaction window for batch operations)
- Increase daemon poll from 2s to 5s (reduces commit spam)
- Agents should run 'bd sync' at end of session to force immediate commit
- Prevents creating dozens of commits when making multiple issue changes
2025-10-26 17:15:39 -07:00
Steve Yegge
fcff20a735 Reduce auto-sync delays for better UX
- Reduce flush debounce from 5s to 1s (BEADS_FLUSH_DEBOUNCE)
- Reduce daemon poll interval from 10s to 2s
- Makes issue changes sync much faster to JSONL and git
2025-10-26 17:14:25 -07:00
Steve Yegge
0f27c5abf1 Add bd daemons list and health subcommand tasks (bd-158, bd-157) 2025-10-26 17:11:08 -07:00
Steve Yegge
e657931186 Fix two daemon bugs: race condition on deletion (bd-155) and wrong project context (bd-156)
- bd-155: Add pre-import flush in daemon sync cycle to prevent deleted issues from being re-imported
- bd-155: Reduce default daemon polling interval from 5 minutes to 10 seconds
- bd-156: Fix hardcoded 'vc.db' - now properly detects existing .db files in local .beads/ directory
2025-10-26 17:09:20 -07:00
Steve Yegge
b5a2734f78 feat: Add --all flag to bd list for CLI familiarity
Common CLI pattern (git branch -a, docker ps -a, ls -a).
No-op since bd list already shows all issues by default,
but prevents error/retry cycles when agents reflexively use it.
2025-10-26 14:45:09 -07:00
Steve Yegge
f34eca1e2e feat: Add --version/-v flag support
Agents often try 'bd --version' as a standard CLI pattern.
Now supports both:
- bd --version (or -v)
- bd version (existing subcommand)
2025-10-26 14:24:05 -07:00
Steve Yegge
80b0af9457 chore: Bump version to 0.17.4
Updated all component versions:
- bd CLI: 0.17.3 → 0.17.4
- Plugin: 0.17.3 → 0.17.4
- MCP server: 0.17.3 → 0.17.4
- Documentation: 0.17.3 → 0.17.4

Generated by scripts/bump-version.sh
2025-10-26 14:20:03 -07:00
Steve Yegge
0ee45bf7de fix: Auto-sync RPC client/server versions from CLI version
- Set rpc.ServerVersion from Version in daemon startup
- Set rpc.ClientVersion from Version in main.go startup
- Eliminates need to manually update RPC versions
- Both now use 0.0.0 placeholder, overridden at runtime

Amp-Thread-ID: https://ampcode.com/threads/T-03c37f7f-f41e-4b87-8700-d346c21bad30
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 14:18:35 -07:00
Steve Yegge
d297848f76 chore: Bump version to 0.17.3
Updated all component versions:
- bd CLI: 0.17.2 → 0.17.3
- Plugin: 0.17.2 → 0.17.3
- MCP server: 0.17.2 → 0.17.3
- Documentation: 0.17.2 → 0.17.3

Generated by scripts/bump-version.sh
2025-10-26 13:59:01 -07:00
Steve Yegge
9f9ea48ec1 Update beads.jsonl 2025-10-26 13:24:18 -07:00
Steve Yegge
4c71235377 Fix syntax error in onboard.go from PR #154
The backtick escaping was missing around .beads/issues.jsonl on line 69.
2025-10-26 13:24:18 -07:00
Steve Yegge
dde640a502 Add bd-144 for bd edit follow-ups 2025-10-26 13:24:18 -07:00
Ryan Newton
5727ec629d Add bd edit mode for human usage (#152)
Co-authored-by: Claude Code <claude@anthropic.com>
2025-10-26 13:23:49 -07:00
Steve Yegge
9cebb65410 Auto-update beads.jsonl 2025-10-26 13:21:49 -07:00
Steve Yegge
5228108d41 Update beads.jsonl: close bd-142, create bd-143 2025-10-26 13:21:49 -07:00
Steve Yegge
f01d81b468 Fix bd init --quiet to install git hooks inline
bd init --quiet was returning before git hooks installation code ran.
Also replaced external install.sh dependency with inline hook generation.

Changes:
- Move hooks installation before quiet mode return
- Embed hook scripts directly in installGitHooks()
- Remove dependency on examples/git-hooks/install.sh
- Remove unused os/exec import

Fixes bd-142 testing requirement.
2025-10-26 13:21:49 -07:00