opencode-beads 0.5.0 → 0.5.2

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/README.md CHANGED
@@ -26,7 +26,7 @@ Optionally, pin to a specific version for stability:
26
26
 
27
27
  ```json
28
28
  {
29
- "plugin": ["opencode-beads@0.5.0"]
29
+ "plugin": ["opencode-beads@0.5.2"]
30
30
  }
31
31
  ```
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-beads",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "description": "A plugin for OpenCode that provides integration with the beads issue tracker.",
6
6
  "author": "Josh Thomas <josh@joshthomas.dev>",
package/src/vendor.ts CHANGED
@@ -104,7 +104,6 @@ Instead, use the \`bash\` tool for all beads operations:
104
104
  - \`bd list --status open --json\` - List issues
105
105
  - \`bd blocked --json\` - Show blocked issues
106
106
  - \`bd stats --json\` - Show statistics
107
- - \`bd sync\` - Sync with git
108
107
 
109
108
  If a tool is not listed above, try \`bd <tool> --help\`.
110
109
 
@@ -1,58 +0,0 @@
1
- ---
2
- description: Manage background sync daemon
3
- argument-hint: [start] [stop] [status]
4
- ---
5
-
6
- Manage the per-project background daemon that handles database connections and syncs with git.
7
-
8
- ## Per-Project Daemon (LSP Model)
9
-
10
- Each project runs its own daemon at `.beads/bd.sock` for complete database isolation.
11
-
12
- > On Windows this file stores the daemon's loopback TCP endpoint metadata—leave it in place so bd can reconnect.
13
-
14
- **Why per-project daemons?**
15
- - Complete database isolation between projects
16
- - No cross-project pollution or git worktree conflicts
17
- - Simpler mental model: one project = one database = one daemon
18
- - Follows LSP (Language Server Protocol) architecture
19
-
20
- **Note:** Global daemon support was removed in v0.16.0. The `--global` flag is no longer functional.
21
-
22
- ## When to Use Daemon Mode
23
-
24
- **✅ You SHOULD use daemon mode if:**
25
- - Working in a team with git remote sync
26
- - Want automatic commit/push of issue changes
27
- - Need background auto-sync (5-second debounce)
28
- - Making frequent bd commands (performance benefit from connection pooling)
29
-
30
- **❌ You DON'T need daemon mode if:**
31
- - Solo developer with local-only tracking
32
- - Working in git worktrees (use --no-daemon to avoid conflicts)
33
- - Running one-off commands or scripts
34
- - Debugging database issues (direct mode is simpler)
35
-
36
- **Local-only users:** Direct mode (default without daemon) is perfectly fine. The daemon mainly helps with git sync automation. You can still use `bd sync` manually when needed.
37
-
38
- **Performance note:** For most operations, the daemon provides minimal performance benefit. The main value is automatic JSONL export (5s debounce) and optional git sync (--auto-commit, --auto-push).
39
-
40
- ## Common Operations
41
-
42
- - **Start**: `bd daemon start` (or auto-starts on first `bd` command)
43
- - **Stop**: `bd daemon stop`
44
- - **Status**: `bd daemon status`
45
- - **Health**: `bd daemon status --all` - shows uptime, cache stats, performance metrics
46
- - **Metrics**: `bd daemon --metrics` - detailed operational telemetry
47
-
48
- ## Sync Options
49
-
50
- - **--auto-commit**: Automatically commit JSONL changes
51
- - **--auto-push**: Automatically push commits to remote
52
- - **--interval**: Sync check interval (default: 5m)
53
-
54
- The daemon provides:
55
- - Connection pooling and caching
56
- - Better performance for frequent operations
57
- - Automatic JSONL sync (5-second debounce)
58
- - Optional git sync
@@ -1,242 +0,0 @@
1
- # bd daemons - Daemon Management
2
-
3
- Manage bd daemon processes across all repositories and worktrees.
4
-
5
- ## Synopsis
6
-
7
- ```bash
8
- bd daemons <subcommand> [flags]
9
- ```
10
-
11
- ## Description
12
-
13
- The `bd daemons` command provides tools for discovering, monitoring, and managing multiple bd daemon processes across your system. This is useful when working with multiple repositories or git worktrees.
14
-
15
- ## Subcommands
16
-
17
- ### list
18
-
19
- List all running bd daemons with metadata.
20
-
21
- ```bash
22
- bd daemons list [--search DIRS] [--json] [--no-cleanup]
23
- ```
24
-
25
- **Flags:**
26
- - `--search` - Directories to search for daemons (default: home, /tmp, cwd)
27
- - `--json` - Output in JSON format
28
- - `--no-cleanup` - Skip auto-cleanup of stale sockets
29
-
30
- **Example:**
31
- ```bash
32
- bd daemons list
33
- bd daemons list --search /Users/me/projects --json
34
- ```
35
-
36
- ### health
37
-
38
- Check health of all bd daemons and report issues.
39
-
40
- ```bash
41
- bd daemons health [--search DIRS] [--json]
42
- ```
43
-
44
- Reports:
45
- - Stale sockets (dead processes)
46
- - Version mismatches between daemon and CLI
47
- - Unresponsive daemons
48
-
49
- **Flags:**
50
- - `--search` - Directories to search for daemons
51
- - `--json` - Output in JSON format
52
-
53
- **Example:**
54
- ```bash
55
- bd daemons health
56
- bd daemons health --json
57
- ```
58
-
59
- ### stop
60
-
61
- Stop a specific daemon gracefully.
62
-
63
- ```bash
64
- bd daemons stop <workspace-path|pid> [--json]
65
- ```
66
-
67
- **Arguments:**
68
- - `<workspace-path|pid>` - Workspace path or PID of daemon to stop
69
-
70
- **Flags:**
71
- - `--json` - Output in JSON format
72
-
73
- **Example:**
74
- ```bash
75
- bd daemons stop /Users/me/projects/myapp
76
- bd daemons stop 12345
77
- bd daemons stop /Users/me/projects/myapp --json
78
- ```
79
-
80
- ### restart
81
-
82
- Restart a specific daemon gracefully.
83
-
84
- ```bash
85
- bd daemons restart <workspace-path|pid> [--search DIRS] [--json]
86
- ```
87
-
88
- Stops the daemon gracefully, then starts a new one in its place. Useful after upgrading bd or when a daemon needs to be refreshed.
89
-
90
- **Arguments:**
91
- - `<workspace-path|pid>` - Workspace path or PID of daemon to restart
92
-
93
- **Flags:**
94
- - `--search` - Directories to search for daemons
95
- - `--json` - Output in JSON format
96
-
97
- **Example:**
98
- ```bash
99
- bd daemons restart /Users/me/projects/myapp
100
- bd daemons restart 12345
101
- bd daemons restart /Users/me/projects/myapp --json
102
- ```
103
-
104
- ### logs
105
-
106
- View logs for a specific daemon.
107
-
108
- ```bash
109
- bd daemons logs <workspace-path|pid> [-f] [-n LINES] [--json]
110
- ```
111
-
112
- **Arguments:**
113
- - `<workspace-path|pid>` - Workspace path or PID of daemon
114
-
115
- **Flags:**
116
- - `-f, --follow` - Follow log output (like tail -f)
117
- - `-n, --lines INT` - Number of lines to show from end (default: 50)
118
- - `--json` - Output in JSON format
119
-
120
- **Example:**
121
- ```bash
122
- bd daemons logs /Users/me/projects/myapp
123
- bd daemons logs 12345 -n 100
124
- bd daemons logs /Users/me/projects/myapp -f
125
- bd daemons logs 12345 --json
126
- ```
127
-
128
- ### killall
129
-
130
- Stop all running bd daemons.
131
-
132
- ```bash
133
- bd daemons killall [--search DIRS] [--force] [--json]
134
- ```
135
-
136
- Uses escalating shutdown strategy:
137
- 1. RPC shutdown (2 second timeout)
138
- 2. SIGTERM (3 second timeout)
139
- 3. SIGKILL (1 second timeout)
140
-
141
- **Flags:**
142
- - `--search` - Directories to search for daemons
143
- - `--force` - Use SIGKILL immediately if graceful shutdown fails
144
- - `--json` - Output in JSON format
145
-
146
- **Example:**
147
- ```bash
148
- bd daemons killall
149
- bd daemons killall --force
150
- bd daemons killall --json
151
- ```
152
-
153
- ## Common Use Cases
154
-
155
- ### Version Upgrade
156
-
157
- After upgrading bd, restart all daemons to use the new version:
158
-
159
- ```bash
160
- bd daemons health # Check for version mismatches
161
- bd daemons killall # Stop all old daemons
162
- # Daemons will auto-start with new version on next bd command
163
-
164
- # Or restart a specific daemon
165
- bd daemons restart /path/to/workspace
166
- ```
167
-
168
- ### Debugging
169
-
170
- Check daemon status and view logs:
171
-
172
- ```bash
173
- bd daemons list
174
- bd daemons health
175
- bd daemons logs /path/to/workspace -n 100
176
- ```
177
-
178
- ### Cleanup
179
-
180
- Remove stale daemon sockets:
181
-
182
- ```bash
183
- bd daemons list # Auto-cleanup happens by default
184
- bd daemons list --no-cleanup # Skip cleanup
185
- ```
186
-
187
- ### Multi-Workspace Management
188
-
189
- Discover daemons in specific directories:
190
-
191
- ```bash
192
- bd daemons list --search /Users/me/projects
193
- bd daemons health --search /Users/me/work
194
- ```
195
-
196
- ## Troubleshooting
197
-
198
- ### Stale Sockets
199
-
200
- If you see stale sockets (dead process but socket file exists):
201
-
202
- ```bash
203
- bd daemons list # Auto-cleanup removes stale sockets
204
- ```
205
-
206
- ### Version Mismatch
207
-
208
- If daemon version != CLI version:
209
-
210
- ```bash
211
- bd daemons health # Identify mismatched daemons
212
- bd daemons killall # Stop all daemons
213
- # Next bd command will auto-start new version
214
- ```
215
-
216
- ### Daemon Won't Stop
217
-
218
- If graceful shutdown fails:
219
-
220
- ```bash
221
- bd daemons killall --force # Force kill with SIGKILL
222
- ```
223
-
224
- ### Can't Find Daemon
225
-
226
- If daemon isn't discovered:
227
-
228
- ```bash
229
- bd daemons list --search /path/to/workspace
230
- ```
231
-
232
- Or check the socket manually:
233
-
234
- ```bash
235
- ls -la /path/to/workspace/.beads/bd.sock
236
- ```
237
-
238
- ## See Also
239
-
240
- - [bd daemon](daemon.md) - Start a daemon manually
241
- - [AGENTS.md](../AGENTS.md) - Agent workflow guide
242
- - [README.md](../README.md) - Main documentation