agmsg 1.0.4 → 1.0.5

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 (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +86 -10
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project are documented here.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.0.5] - 2026-06-17
8
+
9
+ ### Added
10
+ - Add thin Windows PowerShell launcher (#128)
11
+ - Tear down spawned crew members (#109) (#129)
12
+
13
+ ### Fixed
14
+ - Isolate parallel --continue/--resume sessions sharing a session_id (#132)
15
+
7
16
  ## [1.0.4] - 2026-06-15
8
17
 
9
18
  ### Added
@@ -52,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
52
61
  - Handle empty TaskList explicitly to stop fresh-session loop (#71)
53
62
  - Storage driver pluginization design (epic #51) (#52)
54
63
 
64
+ [1.0.5]: https://github.com/fujibee/agmsg/compare/v1.0.4...v1.0.5
55
65
  [1.0.4]: https://github.com/fujibee/agmsg/compare/v1.0.3...v1.0.4
56
66
  [1.0.3]: https://github.com/fujibee/agmsg/compare/v1.0.2...v1.0.3
57
67
  [1.0.2]: https://github.com/fujibee/agmsg/releases/tag/v1.0.2
package/README.md CHANGED
@@ -109,20 +109,19 @@ The **command name** determines:
109
109
 
110
110
  After install, **restart your agent** (Claude Code / Codex / Gemini CLI / Copilot CLI / Antigravity) so it picks up the new skill.
111
111
 
112
- ### Native Windows / PowerShell shortcut
112
+ ### Native Windows / PowerShell profile function
113
113
 
114
- When `install.sh` runs under Git Bash on Windows, it also installs optional native helpers:
115
-
116
- - `~/.agents/agmsg.ps1` — a PowerShell function wrapper
117
- - `~/.agents/agmsg-run.sh` — the Git Bash runner used by that wrapper
118
- - `~/.agents/bin/sqlite3` — a compatibility shim for Windows `sqlite3.exe` output
119
-
120
- To enable the PowerShell command, dot-source the generated file from your PowerShell profile:
114
+ When `install.sh` runs under Git Bash on Windows, it installs the PowerShell
115
+ launcher under the skill tree. To enable an `agmsg` PowerShell command, add the
116
+ profile function from the PowerShell host you use:
121
117
 
122
118
  ```powershell
123
- . "$HOME\.agents\agmsg.ps1"
119
+ pwsh -ExecutionPolicy Bypass -File "$HOME\.agents\skills\agmsg\scripts\windows\install-agmsg.ps1"
124
120
  ```
125
121
 
122
+ Use `powershell` instead of `pwsh` if you use Windows PowerShell rather than
123
+ PowerShell 7; each host has its own profile path.
124
+
126
125
  Then a PowerShell session can run:
127
126
 
128
127
  ```powershell
@@ -133,7 +132,11 @@ agmsg send alice "hello from PowerShell"
133
132
  agmsg mode turn
134
133
  ```
135
134
 
136
- The installer prints the same profile line but does not modify your profile automatically.
135
+ The PowerShell launcher delegates to the existing Bash scripts; it does not
136
+ reimplement agmsg logic or read the SQLite database directly. Git Bash and
137
+ `sqlite3` must both be available from the Windows environment. See
138
+ [Windows PowerShell launcher](docs/windows.md) for details and an optional
139
+ profile installer.
137
140
 
138
141
  ## First run
139
142
 
@@ -185,6 +188,21 @@ Options: `--project <path>` (default: current project), `--team <team>` (auto-re
185
188
 
186
189
  Only `claude-code` and `codex` are supported today. macOS is the primary target; Linux and Windows are best-effort (please open an issue/PR if your terminal isn't handled). Headless environments — no tmux **and** no usable terminal — error out, since the agent CLIs need an interactive terminal.
187
190
 
191
+ ### Tear down a spawned agent (`despawn`)
192
+
193
+ `despawn` is the inverse of `spawn` — it cleanly tears down a member you brought up.
194
+
195
+ ```
196
+ /agmsg despawn reviewer # graceful: the member drops its role and closes its own pane
197
+ /agmsg despawn alice --force # force: tear it down from here when its watcher can't respond
198
+ ```
199
+
200
+ By default `despawn <name>` is **graceful**: it sends a `ctrl:despawn` control message to `<name>`, whose watcher drops its own role (releasing the actas lock and registration) and closes its own tmux pane — ending the agent. It blocks until the role is released, up to `--timeout <secs>` (default 30), then prints `status=ok`. If the member's watcher never responds it prints `status=timeout` and exits 3 — retry with `--force`.
201
+
202
+ `--force` skips the message and tears the member down from the placement recorded at spawn time: it kills the member's tmux pane/window and drops its registration. Use it when the member's watcher can't respond — a dead watcher, or a **codex** member (no Monitor, so graceful has nothing to act on). A member started by hand (no spawn placement record) can't be `--force`d; despawn says so and leaves it for you to close.
203
+
204
+ Despawn only acts on the named member — the session running `despawn` is never torn down, and a broad-subscription watcher ignores a `ctrl:despawn` aimed at another role.
205
+
188
206
  ## Delivery modes
189
207
 
190
208
  How incoming messages reach your agent. Pick one at first join via the prompt, or change it later with `/agmsg mode <name>`.
@@ -234,6 +252,7 @@ The command updates `db/config.yaml`, rewrites the project's hook entries, and p
234
252
  /agmsg actas <name> — switch to another role in this project (create if needed)
235
253
  /agmsg drop <name> — remove a role from this project
236
254
  /agmsg spawn <type> <name> — launch a new agent (claude-code/codex) that takes <name>
255
+ /agmsg despawn <name> [--force] — tear down a member you spawned (graceful, or --force)
237
256
  /agmsg hook on | off — legacy aliases (mode turn | off)
238
257
  /agmsg version — show the installed version (git-describe provenance)
239
258
  /agmsg reset — clear current project registration
@@ -371,6 +390,63 @@ This can also go in project-level `.claude/settings.local.json` if you prefer pe
371
390
 
372
391
  If you installed agmsg under a custom command name (e.g. `m`), adjust the path accordingly (`~/.agents/skills/m/`).
373
392
 
393
+ ### Sandbox compatibility (Codex)
394
+
395
+ Codex may run shell commands in a workspace-write sandbox. agmsg stores its
396
+ SQLite database and team metadata under `~/.agents/skills/<cmd>/` by default,
397
+ which is outside most project workspaces. If the sandbox cannot write there,
398
+ commands that append or update state can fail with errors such as
399
+ `sqlite3.OperationalError: unable to open database file`.
400
+
401
+ This affects operations such as:
402
+
403
+ - sending messages (`send.sh` writes to `db/messages.db`)
404
+ - marking inbox rows as read (`inbox.sh` updates `read_at`)
405
+ - joining, resetting, switching roles, or changing delivery mode (`teams/` and
406
+ config/state files may be updated)
407
+
408
+ If you use Codex with filesystem sandboxing enabled, allow writes to the agmsg
409
+ skill storage directory in your Codex config.
410
+
411
+ Example `~/.codex/config.toml`:
412
+
413
+ ```toml
414
+ sandbox_mode = "workspace-write"
415
+
416
+ [sandbox_workspace_write]
417
+ writable_roots = [
418
+ "~/.agents/skills/agmsg/db",
419
+ "~/.agents/skills/agmsg/teams",
420
+ ]
421
+ ```
422
+
423
+ If you installed agmsg under a custom command name, adjust the path accordingly:
424
+
425
+ ```toml
426
+ [sandbox_workspace_write]
427
+ writable_roots = [
428
+ "~/.agents/skills/m/db",
429
+ "~/.agents/skills/m/teams",
430
+ ]
431
+ ```
432
+
433
+ You can also allow the whole skill directory if your Codex setup supports that:
434
+
435
+ ```toml
436
+ [sandbox_workspace_write]
437
+ writable_roots = [
438
+ "~/.agents/skills/agmsg",
439
+ ]
440
+ ```
441
+
442
+ Codex only supports `mode turn` and `mode off`; it does not have Claude Code's
443
+ Monitor tool. The sandbox allowlist is still required for writes performed by
444
+ manual `$agmsg` commands and turn-end inbox checks.
445
+
446
+ Some Codex runtimes or automations may inject a managed permission profile for a
447
+ single run. In that case, the run-specific writable roots must also include the
448
+ agmsg storage paths; the user-level config alone may not be enough.
449
+
374
450
  ## Tests
375
451
 
376
452
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agmsg",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Cross-agent messaging via SQLite for CLI AI agents (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode). The npm package is a thin bootstrapper that fetches and runs the canonical bash installer at https://github.com/fujibee/agmsg.",
5
5
  "bin": {
6
6
  "agmsg": "bin/agmsg.js"