agmsg 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 fujibee
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # agmsg (npm bootstrapper)
2
+
3
+ This npm package is a **thin bootstrapper**. It does not contain the agmsg implementation — it just reserves the `agmsg` name on npm and gives users a convenient entry point that defers to the canonical shell installer.
4
+
5
+ The real project, including all source, docs, and issue tracking, lives at:
6
+
7
+ **https://github.com/fujibee/agmsg** • homepage **https://agmsg.cc**
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm i -g agmsg
13
+ agmsg install
14
+ ```
15
+
16
+ Or one-shot via `npx`:
17
+
18
+ ```bash
19
+ npx agmsg install
20
+ ```
21
+
22
+ Either form runs:
23
+
24
+ ```bash
25
+ bash <(curl -fsSL https://raw.githubusercontent.com/fujibee/agmsg/main/setup.sh)
26
+ ```
27
+
28
+ …which installs the real agmsg under `~/.agents/skills/agmsg/` and wires up the per-runtime hooks for whichever CLI AI agents are installed (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode).
29
+
30
+ After install, restart your agent and invoke the agmsg skill (`/agmsg` on Claude Code / Copilot CLI; `$agmsg` on Codex / Gemini CLI / Antigravity / OpenCode) to join a team.
31
+
32
+ ## What is agmsg?
33
+
34
+ Cross-agent messaging for CLI AI agents through a shared local SQLite database. No daemon, no network, no Python. Send messages between Claude Code, Codex, Gemini CLI, Copilot CLI, Antigravity, OpenCode, or any other CLI agent on the same machine.
35
+
36
+ See [https://github.com/fujibee/agmsg](https://github.com/fujibee/agmsg) for the full README, architecture docs, and contributor info.
37
+
38
+ ## Why a bootstrapper instead of a real npm package?
39
+
40
+ agmsg is a `bash` + `sqlite3` project. Packaging it as a real npm module would either:
41
+
42
+ - Bundle a shell tree under `node_modules/` that npm has no idea what to do with, or
43
+ - Re-implement the install logic in Node (duplicating the canonical `install.sh` and creating two maintenance burdens).
44
+
45
+ A thin bootstrapper avoids both. The npm name is reserved (so nobody else can publish an unrelated `agmsg`), Node users have a familiar install path, and there's exactly one source of install truth: the canonical `install.sh`.
46
+
47
+ ## License
48
+
49
+ MIT. See `LICENSE`.
50
+
51
+ ## Issues / contributions
52
+
53
+ Issues and PRs for **the agmsg project itself** go to https://github.com/fujibee/agmsg.
54
+
55
+ Issues and PRs for **the bootstrapper / npm packaging** go to https://github.com/fujibee/agmsg-npm.
package/bin/agmsg.js ADDED
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+
3
+ // agmsg npm bootstrapper.
4
+ //
5
+ // This package does NOT contain the agmsg implementation. It exists to
6
+ // reserve the "agmsg" name on npm and to give users a convenient
7
+ // `npx agmsg install` entry point that defers to the canonical shell
8
+ // installer maintained at https://github.com/fujibee/agmsg.
9
+ //
10
+ // All real installation, configuration, and runtime logic lives in the
11
+ // upstream repo. This bootstrapper just runs:
12
+ //
13
+ // bash <(curl -fsSL https://raw.githubusercontent.com/fujibee/agmsg/main/setup.sh)
14
+ //
15
+ // Subcommands:
16
+ // install Fetch and run the canonical setup.sh (default if no args).
17
+ // --help Print this message and exit 0.
18
+ // --version Print the bootstrapper version and exit 0.
19
+
20
+ const { spawnSync } = require('child_process');
21
+ const fs = require('fs');
22
+ const path = require('path');
23
+
24
+ const SETUP_URL = 'https://raw.githubusercontent.com/fujibee/agmsg/main/setup.sh';
25
+ const REPO_URL = 'https://github.com/fujibee/agmsg';
26
+ const HOMEPAGE = 'https://agmsg.cc';
27
+
28
+ function readVersion() {
29
+ try {
30
+ const pkgPath = path.join(__dirname, '..', 'package.json');
31
+ return JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version;
32
+ } catch (_) {
33
+ return '?';
34
+ }
35
+ }
36
+
37
+ function printHelp() {
38
+ process.stdout.write([
39
+ 'agmsg — npm bootstrapper for cross-agent messaging',
40
+ '',
41
+ 'This package is a thin wrapper. The real installer lives at:',
42
+ ' ' + REPO_URL,
43
+ '',
44
+ 'Usage:',
45
+ ' npx agmsg run the canonical setup.sh (same as `agmsg install`)',
46
+ ' npx agmsg install run the canonical setup.sh',
47
+ ' npx agmsg --help show this message',
48
+ ' npx agmsg --version show this bootstrapper\'s version',
49
+ '',
50
+ 'After install, restart your agent (Claude Code / Codex / Gemini CLI /',
51
+ 'Copilot CLI / Antigravity / OpenCode) and run the agmsg skill command',
52
+ 'to join a team.',
53
+ '',
54
+ 'Homepage: ' + HOMEPAGE,
55
+ 'Issues: ' + REPO_URL + '/issues',
56
+ ''
57
+ ].join('\n'));
58
+ }
59
+
60
+ function runInstaller() {
61
+ // We deliberately invoke `bash -c "curl ... | bash"` rather than piping
62
+ // through Node's HTTP stack. The canonical installer is bash; that's the
63
+ // path upstream tests and supports. We pass `-fsSL` so curl fails on
64
+ // HTTP errors rather than piping an error page into bash.
65
+ const cmd = 'curl -fsSL "' + SETUP_URL + '" | bash';
66
+ const result = spawnSync('bash', ['-c', cmd], { stdio: 'inherit' });
67
+ if (result.error) {
68
+ console.error('agmsg: failed to launch bash:', result.error.message);
69
+ process.exit(1);
70
+ }
71
+ process.exit(result.status === null ? 1 : result.status);
72
+ }
73
+
74
+ const args = process.argv.slice(2);
75
+
76
+ if (args.length === 0 || args[0] === 'install') {
77
+ runInstaller();
78
+ } else if (args[0] === '--help' || args[0] === '-h' || args[0] === 'help') {
79
+ printHelp();
80
+ process.exit(0);
81
+ } else if (args[0] === '--version' || args[0] === '-v') {
82
+ process.stdout.write('agmsg bootstrapper ' + readVersion() + '\n');
83
+ process.stdout.write('canonical project: ' + REPO_URL + '\n');
84
+ process.exit(0);
85
+ } else {
86
+ console.error('agmsg: unknown argument: ' + args[0]);
87
+ console.error('Run `npx agmsg --help` for usage.');
88
+ process.exit(2);
89
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "agmsg",
3
+ "version": "0.0.1",
4
+ "description": "Cross-agent messaging via SQLite for CLI AI agents (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode). This package is a thin bootstrapper — it fetches and runs the canonical install.sh from https://github.com/fujibee/agmsg.",
5
+ "bin": {
6
+ "agmsg": "./bin/agmsg.js"
7
+ },
8
+ "scripts": {
9
+ "test": "node bin/agmsg.js --version"
10
+ },
11
+ "homepage": "https://agmsg.cc",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/fujibee/agmsg-npm.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/fujibee/agmsg/issues"
18
+ },
19
+ "author": "fujibee",
20
+ "license": "MIT",
21
+ "keywords": [
22
+ "claude-code",
23
+ "codex",
24
+ "gemini-cli",
25
+ "copilot-cli",
26
+ "antigravity",
27
+ "opencode",
28
+ "messaging",
29
+ "multi-agent",
30
+ "agent-to-agent",
31
+ "sqlite",
32
+ "cli"
33
+ ],
34
+ "engines": {
35
+ "node": ">=14"
36
+ },
37
+ "files": [
38
+ "bin/",
39
+ "README.md",
40
+ "LICENSE"
41
+ ]
42
+ }