agmsg 1.0.3 → 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 +68 -0
  2. package/README.md +187 -5
  3. package/package.json +2 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,68 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
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
+
16
+ ## [1.0.4] - 2026-06-15
17
+
18
+ ### Added
19
+ - Record git-describe provenance version (/agmsg version) (#122)
20
+ - Add native Windows agmsg helpers (#103)
21
+ - Readiness handshake by default (status=ready / --no-wait / --ready-timeout) (#113)
22
+ - Launch a new agent into tmux/terminal and auto-actas (#105)
23
+
24
+ ### Fixed
25
+ - Busy_timeout on all DB connections — concurrent writes no longer drop (SQLITE_BUSY) (#115)
26
+ - Make the `monitor` mode and `delivery.sh set` work under Claude Code's sandboxed Bash tool (#106)
27
+ - Persist per-session watermark so restarts don't drop messages (#107) (#111)
28
+ - Resolve session's real project from subdir/worktree (#92) (#110)
29
+
30
+ ### Documentation
31
+ - Show all four install paths (#90)
32
+
33
+ ## [1.0.3] - 2026-06-11
34
+
35
+ ### Fixed
36
+ - Download setup.sh to a tempfile instead of piping curl into bash (#98) (#100)
37
+ - Refuse interactive prompt when stdin is not a tty (#98) (#99)
38
+ - Avoid E2BIG on large settings.local.json (#95) (#97)
39
+
40
+ ### Documentation
41
+ - README + agmsg.cc rework for PH-launch traffic conversion (#94)
42
+
43
+ ## [1.0.2] - 2026-06-08
44
+
45
+ ### Added
46
+ - Add CLI type auto-detection (#69)
47
+ - Add .claude-plugin/ manifests for Claude Code plugin marketplace (#81)
48
+ - Add GitHub Copilot CLI support (turn mode) (#74)
49
+ - Actas exclusivity lock — fix same-team multi-identity message leakage (#62) (#65)
50
+ - Override message store path via AGMSG_STORAGE_PATH (#59)
51
+ - Add support for gemini and antigravity (agy) agents (#45)
52
+
53
+ ### Fixed
54
+ - Unblock npm Trusted Publisher OIDC + bin path
55
+ - Support native Windows (Git Bash + Codex hooks) (#73)
56
+ - Scope set turn/off watcher kill to the target project (#86)
57
+ - SKILL.md self-bootstrap and substitute name placeholder (#83) (#85)
58
+
59
+ ### Documentation
60
+ - Add PRIVACY.md (required by Anthropic community marketplace submission) (#82)
61
+ - Handle empty TaskList explicitly to stop fresh-session loop (#71)
62
+ - Storage driver pluginization design (epic #51) (#52)
63
+
64
+ [1.0.5]: https://github.com/fujibee/agmsg/compare/v1.0.4...v1.0.5
65
+ [1.0.4]: https://github.com/fujibee/agmsg/compare/v1.0.3...v1.0.4
66
+ [1.0.3]: https://github.com/fujibee/agmsg/compare/v1.0.2...v1.0.3
67
+ [1.0.2]: https://github.com/fujibee/agmsg/releases/tag/v1.0.2
68
+
package/README.md CHANGED
@@ -16,7 +16,7 @@ You stop being the copy-paste courier between your agents. Claude Code, Codex, G
16
16
  **What it isn't:**
17
17
 
18
18
  - Not MCP. No MCP server, no extra runtime — just `bash` + `sqlite3`.
19
- - Not subagents. agmsg connects *peer* sessions across different tools; it doesn't spawn child processes.
19
+ - Not subagents. agmsg connects *peer* sessions across different tools. `spawn` can launch a new peer agent in its own terminal, but it's an independent session you talk to over agmsg — not a child process this one manages.
20
20
  - Not a message queue. There's no broker. The SQLite file is the floor; agents are the players.
21
21
 
22
22
  ## Demo
@@ -31,6 +31,8 @@ In real use it looks like this — Claude Code asking Codex for a code review an
31
31
 
32
32
  ## Quick Start
33
33
 
34
+ **Requires:** `bash` and `sqlite3`. macOS ships both. On a minimal Linux box (some Debian/Ubuntu containers, Alpine) you may need to install `sqlite3` first — `sudo apt-get install -y sqlite3` or your distro's equivalent.
35
+
34
36
  ```bash
35
37
  # 1. Install (one-liner)
36
38
  bash <(curl -fsSL https://raw.githubusercontent.com/fujibee/agmsg/main/setup.sh)
@@ -49,6 +51,8 @@ git clone https://github.com/fujibee/agmsg.git && cd agmsg && ./install.sh
49
51
 
50
52
  That's it. The slash command prompts you for a team name and an agent name on first use, then asks you to pick a [delivery mode](#delivery-modes) (default on Claude Code: `monitor` — real-time push; Codex defaults to `turn` because it has no Monitor tool). After that, you talk to your agent naturally — see [First run](#first-run) below.
51
53
 
54
+ Prefer a different install method? See [Install](#install) below for `npm` / `npx` and the Claude Code plugin marketplace paths.
55
+
52
56
  ## How it works
53
57
 
54
58
  agmsg is a thin transport. Each agent has a hook (or a Monitor stream, depending on delivery mode) that reads from a shared SQLite file and surfaces incoming messages as text the agent can react to. Sending is a `send.sh` call that appends a row. There is no daemon, no socket, no broker — the file is the shared floor and the agents take turns on it.
@@ -57,7 +61,40 @@ The store is WAL-mode SQLite, so multiple readers and a single writer coexist wi
57
61
 
58
62
  ## Install
59
63
 
64
+ agmsg ends up at `~/.agents/skills/agmsg/` no matter which install path you take. Pick whichever fits your setup.
65
+
66
+ **Which path gets the latest?** The `git clone` and `setup.sh` (curl) paths install straight from `main`, so they're always current. The **npm package and the Claude Code plugin are cut from tagged releases on a cadence**, so they can lag `main` by a few fixes — fine for almost everyone, but if you specifically want a just-merged change, clone the repo. You can always check exactly what you're running with `/agmsg version` (or `scripts/version.sh`): a tagged release reads like `v1.0.3`, while a checkout ahead of the last release reads like `v1.0.3-6-g1a2b3c4` (6 commits past `v1.0.3`).
67
+
68
+ ### npm / npx
69
+
70
+ ```bash
71
+ npx agmsg # one-shot, no global install
72
+ # or
73
+ npm i -g agmsg && agmsg install
74
+ ```
75
+
76
+ The npm package is a thin bootstrapper that downloads and runs the canonical `setup.sh`. Published from this repo via [npm Trusted Publisher (OIDC)](https://docs.npmjs.com/trusted-publishers) with [SLSA provenance](https://slsa.dev/) — the attestation is visible at <https://www.npmjs.com/package/agmsg>.
77
+
78
+ ### Claude Code plugin marketplace
79
+
80
+ Inside Claude Code:
81
+
82
+ ```
83
+ /plugin marketplace add fujibee/agmsg
84
+ /plugin install agmsg@fujibee-agmsg
85
+ /reload-plugins
86
+ /agmsg
87
+ ```
88
+
89
+ The plugin install path drops the skill into `~/.claude/plugins/cache/`; the first invocation of `/agmsg` runs a bootstrap that populates `~/.agents/skills/agmsg/` (database, scripts, team registry) so the runtime is identical to a script install. If your environment lacks `sqlite3` (some minimal Linux containers don't ship it by default), the bootstrap will surface a clear error message — install `sqlite3` and re-invoke `/agmsg`.
90
+
91
+ ### Direct script
92
+
93
+ Clone the repo first, then run the installer — this is also the path that always tracks the latest `main`:
94
+
60
95
  ```bash
96
+ git clone https://github.com/fujibee/agmsg.git
97
+ cd agmsg
61
98
  ./install.sh # Interactive (asks command name, default: agmsg)
62
99
  ./install.sh --cmd m # Non-interactive with custom command name
63
100
  ./install.sh --agent-type gemini # Install a Gemini-oriented SKILL.md
@@ -65,10 +102,41 @@ The store is WAL-mode SQLite, so multiple readers and a single writer coexist wi
65
102
 
66
103
  The **command name** determines:
67
104
  - Skill folder: `~/.agents/skills/<cmd>/`
68
- - Claude Code: `/<cmd>`
69
- - Codex/Gemini/Antigravity: `$<cmd>`
105
+ - Claude Code / Copilot CLI: `/<cmd>`
106
+ - Codex / Gemini CLI / Antigravity: `$<cmd>`
70
107
 
71
- After install, **restart your agent** (Claude Code / Codex / Gemini CLI / Antigravity) so it picks up the new skill.
108
+ `--cmd` and `--agent-type` are only available via the direct-script path; the `npm` and plugin paths always install as `agmsg` and auto-detect the host agent type.
109
+
110
+ After install, **restart your agent** (Claude Code / Codex / Gemini CLI / Copilot CLI / Antigravity) so it picks up the new skill.
111
+
112
+ ### Native Windows / PowerShell profile function
113
+
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:
117
+
118
+ ```powershell
119
+ pwsh -ExecutionPolicy Bypass -File "$HOME\.agents\skills\agmsg\scripts\windows\install-agmsg.ps1"
120
+ ```
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
+
125
+ Then a PowerShell session can run:
126
+
127
+ ```powershell
128
+ agmsg
129
+ agmsg history
130
+ agmsg team
131
+ agmsg send alice "hello from PowerShell"
132
+ agmsg mode turn
133
+ ```
134
+
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.
72
140
 
73
141
  ## First run
74
142
 
@@ -103,6 +171,38 @@ Same project, same agent type, different role — for example a `tech-lead` iden
103
171
 
104
172
  See [docs/actas.md](docs/actas.md) for the full mechanics — exclusivity model, recovery, liveness / PID recycling, Codex caveat.
105
173
 
174
+ ### Spawn a new agent (`spawn`)
175
+
176
+ Where `actas` switches *this* session to a different role, `spawn` brings up a **separate agent process** that takes a role on boot — handy for fanning out collaborators.
177
+
178
+ ```
179
+ /agmsg spawn codex reviewer # new codex agent, joins and becomes "reviewer"
180
+ /agmsg spawn claude-code alice --window # new claude-code agent in a fresh tmux window
181
+ ```
182
+
183
+ `spawn <type> <name>` pre-joins `<name>`, then launches the target CLI with the actas slash command (`/<your-command> actas <name>`, matching your install command name) as its initial prompt. If the current session is inside **tmux**, it opens in a new pane (or `--window` for a new window, `--split h|v` for the direction); otherwise it opens a new **OS terminal** window.
184
+
185
+ By default `spawn` **blocks until the new agent is actually listening** — its watcher attaches and touches a readiness sentinel — then prints `status=ready`, so you can send work the moment `spawn` returns without losing it to the agent's cold start. Use `--no-wait` for fire-and-forget, or `--ready-timeout <secs>` to bound the wait (default 90; on timeout it prints `status=timeout` and exits 3 so a caller can re-spawn). Codex skips the wait (it has no Monitor).
186
+
187
+ Options: `--project <path>` (default: current project), `--team <team>` (auto-resolved when the project has a single team), and `--terminal <tmpl>` / `$AGMSG_TERMINAL` / config `spawn.terminal` to override the terminal command on the non-tmux path (a `{cmd}` placeholder is replaced with the path to the generated boot script). On macOS the default opens whichever terminal you're currently in (iTerm or Terminal, via `$TERM_PROGRAM`) using `open -a` — a plain app launch, so it does **not** trigger the Automation/AppleScript permission prompts that scripting the terminal directly would.
188
+
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.
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
+
106
206
  ## Delivery modes
107
207
 
108
208
  How incoming messages reach your agent. Pick one at first join via the prompt, or change it later with `/agmsg mode <name>`.
@@ -151,7 +251,10 @@ The command updates `db/config.yaml`, rewrites the project's hook entries, and p
151
251
  /agmsg mode — show current mode
152
252
  /agmsg actas <name> — switch to another role in this project (create if needed)
153
253
  /agmsg drop <name> — remove a role from this project
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)
154
256
  /agmsg hook on | off — legacy aliases (mode turn | off)
257
+ /agmsg version — show the installed version (git-describe provenance)
155
258
  /agmsg reset — clear current project registration
156
259
  ```
157
260
 
@@ -265,6 +368,85 @@ The message store path resolves as **`AGMSG_STORAGE_PATH` (env) > built-in defau
265
368
  AGMSG_STORAGE_PATH=/tmp/agmsg-sandbox ./scripts/send.sh myteam alice bob "hi"
266
369
  ```
267
370
 
371
+ ### Sandbox compatibility (Claude Code)
372
+
373
+ Claude Code's sandbox restricts filesystem writes to the project directory. In `monitor` mode, `watch.sh` runs inside the sandbox and needs to write pidfiles and SQLite WAL files under `~/.agents/skills/agmsg/`. If you have sandboxing enabled, add an allowlist entry to your settings:
374
+
375
+ **`~/.claude/settings.json`** (user-level — applies to all projects):
376
+
377
+ ```json
378
+ {
379
+ "sandbox": {
380
+ "filesystem": {
381
+ "allowWrite": [
382
+ "~/.agents/skills/agmsg/"
383
+ ]
384
+ }
385
+ }
386
+ }
387
+ ```
388
+
389
+ This can also go in project-level `.claude/settings.local.json` if you prefer per-project scope. The allowlist merges across all settings scopes and takes effect immediately — no restart needed.
390
+
391
+ If you installed agmsg under a custom command name (e.g. `m`), adjust the path accordingly (`~/.agents/skills/m/`).
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
+
268
450
  ## Tests
269
451
 
270
452
  ```bash
@@ -297,7 +479,7 @@ bats tests/ # requires bats-core: brew install bats-core
297
479
 
298
480
  - **Product Hunt**: #5 Product of the Day, [2026-06-09 launch](https://www.producthunt.com/products/agmsg) — 219 upvotes, 39 comments
299
481
  - **Derivative projects**: `agmsg-shogi`, `agmsg-go`, `agmsg-mcp` (community-built)
300
- - **External contributors**: [@MiuraKatsu](https://github.com/MiuraKatsu) (Gemini support + whoami auto-detect), [@roundrop](https://github.com/roundrop) (Copilot CLI support), [@TOMONOSUKEJP](https://github.com/TOMONOSUKEJP) (native Windows / Git Bash), [@kenshin-yamada](https://github.com/kenshin-yamada) (watcher scoping fix), [@utenadev](https://github.com/utenadev) (OpenCode contribution)
482
+ - **External contributors**: [@MiuraKatsu](https://github.com/MiuraKatsu) (Gemini support + whoami auto-detect), [@roundrop](https://github.com/roundrop) (Copilot CLI support), [@TOMONOSUKEJP](https://github.com/TOMONOSUKEJP) (native Windows / Git Bash), [@kenshin-yamada](https://github.com/kenshin-yamada) (watcher scoping fix), [@utenadev](https://github.com/utenadev) (OpenCode contribution), [@lucianlamp](https://github.com/lucianlamp) (native Windows PowerShell helpers), [@tatsuya6502](https://github.com/tatsuya6502) (sandboxed Bash tool support)
301
483
 
302
484
  ## Contributing
303
485
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agmsg",
3
- "version": "1.0.3",
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"
@@ -37,6 +37,7 @@
37
37
  "files": [
38
38
  "bin/",
39
39
  "README.md",
40
+ "CHANGELOG.md",
40
41
  "LICENSE"
41
42
  ]
42
43
  }