agmsg 1.0.5 → 1.1.0
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/CHANGELOG.md +64 -0
- package/README.md +80 -45
- package/bin/agmsg.js +24 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,68 @@ 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.1.0] - 2026-06-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Add Cursor agent type (#189)
|
|
11
|
+
- Add Hermes Agent as a beta agent type
|
|
12
|
+
- Axis-generic driver discovery + external-plugin opt-in
|
|
13
|
+
- Drop the aliases= auto-redirect; explicit type selection only
|
|
14
|
+
- Pluggable agent-type registry
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Warn to re-register delivery hooks on --update (#190)
|
|
18
|
+
- Re-point an existing Codex monitor shim on --update
|
|
19
|
+
- Follow init-db move to internal/ in the Windows PowerShell smoke
|
|
20
|
+
- Readfile() config binding for single-quote-safe registry (#185)
|
|
21
|
+
- Strip CR from sqlite3 output so Windows Git Bash works (#180)
|
|
22
|
+
- Git Bash compatibility for the Codex bridge (#179)
|
|
23
|
+
- Cut-release.sh stops at the PR (no auto-merge / auto-publish) (#177)
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Drop the Windows PowerShell launcher in favor of Git Bash
|
|
27
|
+
- Relocate types/ under scripts/drivers/types/
|
|
28
|
+
- Consolidate mode support into delivery_modes manifest
|
|
29
|
+
- Data-drive Windows hook wrapping via manifest
|
|
30
|
+
- Status as a Template Method plug
|
|
31
|
+
- Fold the codex runtime into types/codex/
|
|
32
|
+
- Move enable/disable side effects into type plugs
|
|
33
|
+
- Wire SKILL templates to type-dir manifests
|
|
34
|
+
- Extract codex bridge handoff into a type plug
|
|
35
|
+
- Drive Stop-hook status output from manifest stop_output=
|
|
36
|
+
- Per-type delivery as a Template Method plug
|
|
37
|
+
- Extract hook JSON primitives into lib/hooks-json.sh
|
|
38
|
+
- Move init-db to internal/, dispatch to windows/, drop hook.sh
|
|
39
|
+
- Move the codex subsystem into scripts/codex/
|
|
40
|
+
|
|
41
|
+
### Documentation
|
|
42
|
+
- Add supported-agents logo strip
|
|
43
|
+
- List hermes in the --agent-type help (co1 nit)
|
|
44
|
+
- Add docs/plugins.md + README section + plugins/ drop-in dir
|
|
45
|
+
- Refresh manifest table + paths for the 1.1.0 layout
|
|
46
|
+
- Lead Quick Start with npx, the zero-clone install path
|
|
47
|
+
|
|
48
|
+
## [1.0.6] - 2026-06-21
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
- Codex monitor bridge (beta) — app-server bridge + re-arm + fresh-session launch (#41) (#148)
|
|
52
|
+
- Add OpenCode as a supported agent type (#136)
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
- Pin install to the bootstrapper's version, not main (#173)
|
|
56
|
+
- Engage the monitor bridge on codex 0.141 (ws transport + loaded-thread discovery) (#174)
|
|
57
|
+
- Escape hook command values via json_object (#175)
|
|
58
|
+
- Stop orphaned watch.sh from advancing the shared watermark past undelivered messages (#145)
|
|
59
|
+
- Resolve Codex thread by physical path so symlinked project paths match (#160) (#164)
|
|
60
|
+
- Validate writefile() byte count, not just sqlite3 exit code (#166)
|
|
61
|
+
- Pass sqlite3 -escape off so the char(31) separator stays raw (#165)
|
|
62
|
+
- Write hook files with writefile() to avoid sqlite3 caret-escaping (#158)
|
|
63
|
+
- Validate team names to prevent teams/ path traversal (#147)
|
|
64
|
+
|
|
65
|
+
### Documentation
|
|
66
|
+
- Worker guardrails + empty-poll OOM case study (#163) (#167)
|
|
67
|
+
- Add llms.txt for AI-agent orientation (#155)
|
|
68
|
+
|
|
7
69
|
## [1.0.5] - 2026-06-17
|
|
8
70
|
|
|
9
71
|
### Added
|
|
@@ -61,6 +123,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
61
123
|
- Handle empty TaskList explicitly to stop fresh-session loop (#71)
|
|
62
124
|
- Storage driver pluginization design (epic #51) (#52)
|
|
63
125
|
|
|
126
|
+
[1.1.0]: https://github.com/fujibee/agmsg/compare/v1.0.6...v1.1.0
|
|
127
|
+
[1.0.6]: https://github.com/fujibee/agmsg/compare/v1.0.5...v1.0.6
|
|
64
128
|
[1.0.5]: https://github.com/fujibee/agmsg/compare/v1.0.4...v1.0.5
|
|
65
129
|
[1.0.4]: https://github.com/fujibee/agmsg/compare/v1.0.3...v1.0.4
|
|
66
130
|
[1.0.3]: https://github.com/fujibee/agmsg/compare/v1.0.2...v1.0.3
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Cross-agent messaging for CLI AI agents. No daemon, no network, no complexity.
|
|
4
4
|
|
|
5
|
+
> **For AI agents:** see [`/llms.txt`](llms.txt) for a quick, machine-friendly orientation.
|
|
6
|
+
|
|
5
7
|
<a href="https://www.producthunt.com/products/agmsg?utm_source=badge-top-post-badge&utm_medium=badge" target="_blank">
|
|
6
8
|
<picture>
|
|
7
9
|
<source media="(prefers-color-scheme: dark)"
|
|
@@ -13,6 +15,11 @@ Cross-agent messaging for CLI AI agents. No daemon, no network, no complexity.
|
|
|
13
15
|
|
|
14
16
|
You stop being the copy-paste courier between your agents. Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, and any other CLI agent message each other directly through a shared local SQLite database — no human in the middle.
|
|
15
17
|
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="docs/logos/supported-agents.png" width="780"
|
|
20
|
+
alt="Supported agents: Claude Code, Codex, Gemini, GitHub Copilot, Antigravity, OpenCode, Hermes">
|
|
21
|
+
</p>
|
|
22
|
+
|
|
16
23
|
**What it isn't:**
|
|
17
24
|
|
|
18
25
|
- Not MCP. No MCP server, no extra runtime — just `bash` + `sqlite3`.
|
|
@@ -34,24 +41,22 @@ In real use it looks like this — Claude Code asking Codex for a code review an
|
|
|
34
41
|
**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
42
|
|
|
36
43
|
```bash
|
|
37
|
-
# 1. Install
|
|
38
|
-
|
|
44
|
+
# 1. Install — npx is the fastest path, no clone needed
|
|
45
|
+
npx agmsg
|
|
39
46
|
|
|
40
|
-
#
|
|
41
|
-
git clone https://github.com/fujibee/agmsg.git && cd agmsg && ./install.sh
|
|
42
|
-
|
|
43
|
-
# 2. Restart Claude Code / Codex / Gemini CLI / Antigravity to pick up the new skill
|
|
47
|
+
# 2. Restart Claude Code / Codex / Gemini CLI / Antigravity / OpenCode to pick up the new skill
|
|
44
48
|
|
|
45
49
|
# 3. Run the command — it will prompt for team and agent name on first use
|
|
46
50
|
# Claude Code: /agmsg
|
|
47
51
|
# Codex: $agmsg
|
|
48
52
|
# Gemini CLI: $agmsg
|
|
49
53
|
# Antigravity: $agmsg
|
|
54
|
+
# OpenCode: $agmsg
|
|
50
55
|
```
|
|
51
56
|
|
|
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
|
|
57
|
+
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 offers a beta `monitor` bridge or `turn`). After that, you talk to your agent naturally — see [First run](#first-run) below.
|
|
53
58
|
|
|
54
|
-
Prefer a
|
|
59
|
+
Prefer to inspect the code first, track the latest `main`, or pick a custom command name? See [Install](#install) below for the `setup.sh` one-liner, `git clone`, and the Claude Code plugin marketplace paths.
|
|
55
60
|
|
|
56
61
|
## How it works
|
|
57
62
|
|
|
@@ -97,7 +102,8 @@ git clone https://github.com/fujibee/agmsg.git
|
|
|
97
102
|
cd agmsg
|
|
98
103
|
./install.sh # Interactive (asks command name, default: agmsg)
|
|
99
104
|
./install.sh --cmd m # Non-interactive with custom command name
|
|
100
|
-
./install.sh --agent-type gemini
|
|
105
|
+
./install.sh --agent-type gemini # Install a Gemini-oriented SKILL.md
|
|
106
|
+
./install.sh --agent-type opencode # OpenCode-only: sets shared skill to OpenCode template
|
|
101
107
|
```
|
|
102
108
|
|
|
103
109
|
The **command name** determines:
|
|
@@ -107,36 +113,32 @@ The **command name** determines:
|
|
|
107
113
|
|
|
108
114
|
`--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
115
|
|
|
110
|
-
After install, **restart your agent** (Claude Code / Codex / Gemini CLI / Copilot CLI / Antigravity) so it picks up the new skill.
|
|
111
|
-
|
|
112
|
-
###
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
PowerShell
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
|
|
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.
|
|
116
|
+
After install, **restart your agent** (Claude Code / Codex / Gemini CLI / Copilot CLI / Antigravity / OpenCode) so it picks up the new skill.
|
|
117
|
+
|
|
118
|
+
### Windows: Git Bash & Codex
|
|
119
|
+
|
|
120
|
+
agmsg's implementation is the Bash script set under `scripts/`, so on Windows the
|
|
121
|
+
scripts run through **Git Bash** (Git for Windows, with `sqlite3` available on the
|
|
122
|
+
Git Bash PATH). There is no PowerShell reimplementation.
|
|
123
|
+
|
|
124
|
+
- In Windows environments, Claude Code naturally works with Bash/Git Bash for
|
|
125
|
+
these script calls, but native Windows Codex commands and hooks often start
|
|
126
|
+
from PowerShell. Keep the actual agmsg execution path pinned to Git Bash so
|
|
127
|
+
all agents share the same `$HOME` and SQLite database.
|
|
128
|
+
- **Codex delivery hooks** are wrapped automatically. On native Windows Codex runs
|
|
129
|
+
hook commands via PowerShell, which cannot execute a bare `.sh` path, so agmsg
|
|
130
|
+
emits a `commandWindows` entry that invokes Git Bash (`& $bash -lc '...'`). No
|
|
131
|
+
setup needed — see `windows_wrap()` in `scripts/delivery.sh`.
|
|
132
|
+
- **Interactive / agent-typed commands** call the scripts through Git Bash, e.g.
|
|
133
|
+
`bash -lc 'scripts/whoami.sh "$(pwd)" codex'`.
|
|
134
|
+
- Heads-up: a bare `bash` in PowerShell usually resolves to the **WSL** shim
|
|
135
|
+
(`WindowsApps\bash.exe`), which has a separate `$HOME` and database — agents
|
|
136
|
+
would then talk to a different DB than Claude Code. Pin Git Bash in your
|
|
137
|
+
PowerShell profile so everything shares one database:
|
|
138
|
+
|
|
139
|
+
```powershell
|
|
140
|
+
Set-Alias bash 'C:\Program Files\Git\bin\bash.exe'
|
|
141
|
+
```
|
|
140
142
|
|
|
141
143
|
## First run
|
|
142
144
|
|
|
@@ -210,7 +212,7 @@ How incoming messages reach your agent. Pick one at first join via the prompt, o
|
|
|
210
212
|
| mode | mechanism | latency | who it's for |
|
|
211
213
|
|---|---|---|---|
|
|
212
214
|
| **`monitor`** (default on Claude Code) | SessionStart hook → Monitor tool → blocking SQLite stream | ~5s | Claude Code users wanting real-time push |
|
|
213
|
-
| **`turn`** (default on Codex / Copilot CLI) | Stop hook fires `check-inbox.sh` between assistant turns | until your next interaction | Codex / Copilot CLI (no Monitor tool); Claude Code users on a quieter loop |
|
|
215
|
+
| **`turn`** (default on Codex / Copilot CLI / OpenCode) | Stop hook fires `check-inbox.sh` between assistant turns | until your next interaction | Codex / Copilot CLI / OpenCode (no Monitor tool); Claude Code users on a quieter loop |
|
|
214
216
|
| **`both`** | monitor primary, turn as per-session safety net | ~5s; falls back to turn-end on watcher failure | belt-and-suspenders |
|
|
215
217
|
| **`off`** | no automatic delivery | manual `/agmsg` only | minimalists |
|
|
216
218
|
|
|
@@ -264,7 +266,11 @@ The command updates `db/config.yaml`, rewrites the project's hook entries, and p
|
|
|
264
266
|
$agmsg — or /skills → agmsg
|
|
265
267
|
```
|
|
266
268
|
|
|
267
|
-
Codex supports `mode
|
|
269
|
+
Codex supports `mode monitor` as a **beta** app-server bridge, plus `mode turn` and `mode off`.
|
|
270
|
+
|
|
271
|
+
> ⚠️ **The monitor beta changes how Codex starts — opt in only if you understand it.** Codex has no Monitor tool, so `mode monitor` installs a shim at `~/.agents/bin/codex` and asks you to put `~/.agents/bin` **first on your PATH**, so `codex` then resolves to the shim instead of the real binary. In monitor-mode projects the shim routes interactive launches through a bridge that turns incoming agmsg messages into turns on the current Codex thread; `codex exec` and non-monitor projects pass straight through to the real Codex. It depends on experimental Codex app-server behavior and has known rough edges (orphans on TUI close — #149; one identity per project — #150).
|
|
272
|
+
|
|
273
|
+
If the shim can't be installed, launch with `~/.agents/skills/<cmd>/scripts/drivers/types/codex/codex-monitor.sh`. Codex sandboxing must allow writes to the skill's `db/`, `teams/`, and `run/` dirs — `install.sh` configures those `writable_roots` when `~/.codex/config.toml` exists. Setup, PATH notes, and internals: [docs/codex-monitor-beta.md](docs/codex-monitor-beta.md).
|
|
268
274
|
|
|
269
275
|
### GitHub Copilot CLI
|
|
270
276
|
|
|
@@ -274,6 +280,18 @@ Codex supports `mode turn` and `mode off` only — there's no Monitor tool to st
|
|
|
274
280
|
|
|
275
281
|
The Copilot installer drops a `SKILL.md` at `~/.copilot/skills/agmsg/` so `/agmsg` is auto-discovered. Per-project hooks live at `<project>/.github/hooks/agmsg.json`. Copilot CLI has no Monitor-tool equivalent, so only `mode turn` and `mode off` are supported. Asking for `monitor` or `both` is rejected with an error.
|
|
276
282
|
|
|
283
|
+
### OpenCode
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
$agmsg
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Install with `./install.sh` (when `~/.config/opencode/` exists, the OpenCode-typed skill is placed automatically alongside the default Codex-typed shared skill). Use `--agent-type opencode` only for OpenCode-only environments where Codex is not installed. OpenCode is supported for manual and turn/off delivery workflows. It currently supports `mode turn` and `mode off`; `monitor`, `both`, and `spawn opencode` are not supported.
|
|
290
|
+
|
|
291
|
+
This makes OpenCode useful as a local coding agent, including configurations backed by local providers such as Ollama.
|
|
292
|
+
|
|
293
|
+
See [docs/opencode.md](docs/opencode.md) for full setup instructions.
|
|
294
|
+
|
|
277
295
|
### Shell (any agent)
|
|
278
296
|
|
|
279
297
|
```bash
|
|
@@ -289,8 +307,6 @@ The Copilot installer drops a `SKILL.md` at `~/.copilot/skills/agmsg/` so `/agms
|
|
|
289
307
|
|
|
290
308
|
`send.sh` takes exactly four positional arguments: `<team> <from> <to> "<message>"`. Quote the message so the shell sees it as one argument; an unquoted message with spaces will be misparsed.
|
|
291
309
|
|
|
292
|
-
`hook.sh on|off` still works as a legacy alias for `delivery.sh set turn|off` but prints a deprecation notice.
|
|
293
|
-
|
|
294
310
|
## FAQ / Design notes
|
|
295
311
|
|
|
296
312
|
**Is this MCP? Do I need an MCP server?**
|
|
@@ -360,6 +376,7 @@ Auto-detects installed skill directories and cleans up: skill files, slash comma
|
|
|
360
376
|
| Variable | Default | Purpose |
|
|
361
377
|
|---|---|---|
|
|
362
378
|
| `AGMSG_STORAGE_PATH` | `<skill>/db` | Directory holding the SQLite message store (`messages.db`). Override to relocate the store — handy for tests, sandboxes, or running isolated instances. |
|
|
379
|
+
| `AGMSG_PLUGIN_DIRS` | (unset) | `:`-separated extra directories to search for external drivers, in addition to `<skill>/plugins`. Each holds `<axis>/<name>/` subdirs. Drivers found here are still ignored until opted into with `agmsg plugin trust`. See [docs/plugins.md](docs/plugins.md). |
|
|
363
380
|
|
|
364
381
|
The message store path resolves as **`AGMSG_STORAGE_PATH` (env) > built-in default**. (A config-file layer is planned to slot in between the two as part of the storage-driver work; the intended order is env > config > default.) The override is scoped to the SQLite store only — team configs under `teams/` are unaffected.
|
|
365
382
|
|
|
@@ -460,8 +477,10 @@ bats tests/ # requires bats-core: brew install bats-core
|
|
|
460
477
|
├── SKILL.md # Skill definition (read by CC & Codex)
|
|
461
478
|
├── agents/
|
|
462
479
|
│ └── openai.yaml # Codex metadata
|
|
463
|
-
├── scripts/ # Bash scripts
|
|
464
|
-
├──
|
|
480
|
+
├── scripts/ # Bash scripts (the type-agnostic engine)
|
|
481
|
+
│ ├── lib/ # Sourced helper libraries
|
|
482
|
+
│ └── drivers/types/<name>/ # Built-in agent-type drivers (manifest + runtime)
|
|
483
|
+
├── plugins/<axis>/<name>/ # External drivers you opt into (agmsg plugin trust)
|
|
465
484
|
├── db/messages.db # SQLite WAL-mode message store
|
|
466
485
|
└── teams/ # Team configs (self-contained)
|
|
467
486
|
└── <team>/
|
|
@@ -475,6 +494,22 @@ bats tests/ # requires bats-core: brew install bats-core
|
|
|
475
494
|
- **No daemon**: Direct filesystem access
|
|
476
495
|
- **No network**: Everything local
|
|
477
496
|
|
|
497
|
+
## Plugins
|
|
498
|
+
|
|
499
|
+
agmsg's pluggable units are **drivers** grouped by axis (`types` for agent
|
|
500
|
+
runtimes; `storage` and `delivery` to follow). Built-ins ship under
|
|
501
|
+
`scripts/drivers/`; you can drop your own under `<skill>/plugins/<axis>/<name>/`
|
|
502
|
+
(or point `AGMSG_PLUGIN_DIRS` at a directory) to extend agmsg without forking.
|
|
503
|
+
|
|
504
|
+
Because a driver is shell code that runs with your privileges, **external drivers
|
|
505
|
+
are never loaded until you opt in** — an unexpected drop-in is ignored (with a
|
|
506
|
+
warning) until you run `agmsg plugin trust <axis>/<name>`. List what's discovered
|
|
507
|
+
and its trust state with `agmsg plugin list`.
|
|
508
|
+
|
|
509
|
+
Full discovery order, the trust model, and authoring guidance:
|
|
510
|
+
[docs/plugins.md](docs/plugins.md) (design rationale in
|
|
511
|
+
[ADR 0002](docs/adr/0002-driver-discovery-and-plugin-opt-in.md)).
|
|
512
|
+
|
|
478
513
|
## Community
|
|
479
514
|
|
|
480
515
|
- **Product Hunt**: #5 Product of the Day, [2026-06-09 launch](https://www.producthunt.com/products/agmsg) — 219 upvotes, 39 comments
|
package/bin/agmsg.js
CHANGED
|
@@ -29,10 +29,24 @@ const fs = require('fs');
|
|
|
29
29
|
const os = require('os');
|
|
30
30
|
const path = require('path');
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const RAW_BASE = 'https://raw.githubusercontent.com/fujibee/agmsg';
|
|
33
33
|
const REPO_URL = 'https://github.com/fujibee/agmsg';
|
|
34
34
|
const HOMEPAGE = 'https://agmsg.cc';
|
|
35
35
|
|
|
36
|
+
// Install the repo ref that matches THIS bootstrapper's version, so
|
|
37
|
+
// `npx agmsg@X` installs X — not whatever happens to be on main. We fetch
|
|
38
|
+
// setup.sh from the matching tag AND pass AGMSG_REF so setup.sh clones the
|
|
39
|
+
// same tag. Falls back to main only when the version can't be read (e.g. a
|
|
40
|
+
// dev checkout with no published tag). See #172.
|
|
41
|
+
//
|
|
42
|
+
// Bootstrappers published before this fix (<= 1.0.5) hardcoded main and
|
|
43
|
+
// cannot be retrofitted — `npx agmsg@1.0.5` will still pull main. Pinning
|
|
44
|
+
// holds from the first release that ships this file (1.0.6) onward.
|
|
45
|
+
function installRef() {
|
|
46
|
+
const v = readVersion();
|
|
47
|
+
return v && v !== '?' ? 'v' + v : 'main';
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
function readVersion() {
|
|
37
51
|
try {
|
|
38
52
|
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
@@ -75,21 +89,27 @@ function runInstaller(passthroughArgs) {
|
|
|
75
89
|
// bootstrapper plus a still-vulnerable install.sh would also work; doing it
|
|
76
90
|
// correctly here is defense-in-depth and lets future interactive prompts
|
|
77
91
|
// in setup.sh keep working for real-tty users.
|
|
92
|
+
const ref = installRef();
|
|
93
|
+
const setupUrl = RAW_BASE + '/' + ref + '/setup.sh';
|
|
78
94
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'agmsg-bootstrap-'));
|
|
79
95
|
const setupPath = path.join(tmpDir, 'setup.sh');
|
|
80
96
|
|
|
81
97
|
try {
|
|
82
|
-
const fetch = spawnSync('curl', ['-fsSL', '-o', setupPath,
|
|
98
|
+
const fetch = spawnSync('curl', ['-fsSL', '-o', setupPath, setupUrl], { stdio: 'inherit' });
|
|
83
99
|
if (fetch.error) {
|
|
84
100
|
console.error('agmsg: failed to launch curl:', fetch.error.message);
|
|
85
101
|
process.exit(1);
|
|
86
102
|
}
|
|
87
103
|
if (fetch.status !== 0) {
|
|
88
|
-
console.error('agmsg: curl exited ' + fetch.status + ' fetching ' +
|
|
104
|
+
console.error('agmsg: curl exited ' + fetch.status + ' fetching ' + setupUrl);
|
|
89
105
|
process.exit(fetch.status || 1);
|
|
90
106
|
}
|
|
91
107
|
|
|
92
|
-
|
|
108
|
+
// Pin the clone inside setup.sh to the same ref we fetched it from.
|
|
109
|
+
const result = spawnSync('bash', [setupPath, ...passthroughArgs], {
|
|
110
|
+
stdio: 'inherit',
|
|
111
|
+
env: Object.assign({}, process.env, { AGMSG_REF: ref })
|
|
112
|
+
});
|
|
93
113
|
if (result.error) {
|
|
94
114
|
console.error('agmsg: failed to launch bash:', result.error.message);
|
|
95
115
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agmsg",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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"
|