menmu-agent-room 0.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/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # agent_room
2
+
3
+ A Linux host creates a shared project session. Members on macOS or Linux request access using its IP and session ID, then share a Codex task queue, terminal and browser conversation after host approval.
4
+
5
+ ## Install with npm
6
+
7
+ Requires Node.js 20+ and npm:
8
+
9
+ ```sh
10
+ npm install -g menmu-agent-room
11
+ agent_room help
12
+ ```
13
+
14
+ This archive includes macOS/Linux x64/arm64 native binaries. It requires no Go compiler, install scripts, or additional download during installation. The launcher selects the platform and checks its SHA-256 before running. `--ignore-scripts` installations also work.
15
+
16
+ The npm package name is `menmu-agent-room`; the installed command is `agent_room`. For offline installation, use `npm install -g ./menmu-agent-room-0.1.0.tgz`. To install without administrator access, add `--prefix "$HOME/.local"` and put `$HOME/.local/bin` on PATH.
17
+
18
+ ## Host (Linux)
19
+
20
+ The host also needs the compatible Codex runtime and a Codex login:
21
+
22
+ ```sh
23
+ npm install --prefix "$HOME/.local/share/agent_room/codex" '@openai/codex@0.151.0-alpha.7.2'
24
+ ~/.local/share/agent_room/codex/node_modules/.bin/codex login
25
+ cd /path/to/your/git/project
26
+ agent_room host .
27
+ ```
28
+
29
+ If the host already has this runtime and login, reuse them. Members need neither Codex nor a host OS account. Work runs with the host execution user's authority.
30
+
31
+ ## Join and open the browser (member's computer)
32
+
33
+ Copy the actual host address, including its port, and full session ID:
34
+
35
+ ```sh
36
+ agent_room join HOST_IP SESSION_ID --name alice --answers
37
+ ```
38
+
39
+ The host approves in another terminal in the same project:
40
+
41
+ ```sh
42
+ agent_room requests
43
+ agent_room approve REQUEST_ID
44
+ ```
45
+
46
+ Already connected in a terminal? Open a separate browser client with:
47
+
48
+ ```sh
49
+ agent_room answers HOST_IP SESSION_ID --name alice
50
+ ```
51
+
52
+ Startup prints `Browser URL: http://127.0.0.1:<local-port>/<random-access-id>/`. This address is generated on each member's own computer; it cannot be assembled from the host IP and session ID. Keep the client running. Add `--no-open` to print the URL without launching a browser.
53
+
54
+ The browser supports sending tasks, shared member history, member filters, progress grouped by task, and final answers with collapsible progress. The original terminal remains available.
55
+
56
+ ## Update or uninstall
57
+
58
+ ```sh
59
+ npm install -g menmu-agent-room@latest
60
+ npm uninstall -g menmu-agent-room
61
+ ```
62
+
63
+ Uninstalling the CLI keeps host sessions and client credentials. Native hosts currently running are not replaced until they restart.
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const fs = require('node:fs');
4
+ const path = require('node:path');
5
+ const crypto = require('node:crypto');
6
+ const {spawn} = require('node:child_process');
7
+ const {constants} = require('node:os');
8
+
9
+ function binaryPath(root, platform = process.platform, architecture = process.arch) {
10
+ const arch = {x64:'amd64', arm64:'arm64'}[architecture];
11
+ if (!['darwin', 'linux'].includes(platform) || !arch) {
12
+ throw new Error(`Unsupported platform ${platform}/${architecture}; agent_room supports macOS/Linux x64 and arm64.`);
13
+ }
14
+ return path.join(root, 'native', `agent_room-${platform}-${arch}`);
15
+ }
16
+ function verifyBinary(root, platform, architecture) {
17
+ const binary = binaryPath(root, platform, architecture);
18
+ const filename = path.basename(binary);
19
+ const lines = fs.readFileSync(path.join(root, 'native', 'SHA256SUMS'), 'utf8').split('\n');
20
+ const checksums = lines.map(line => /^([a-f0-9]{64})\s+([^\s]+)$/.exec(line)).filter(match => match && match[2] === filename);
21
+ if (checksums.length !== 1) throw new Error(`Missing or ambiguous checksum for ${filename}; reinstall the npm package.`);
22
+ const actual = crypto.createHash('sha256').update(fs.readFileSync(binary)).digest('hex');
23
+ if (actual !== checksums[0][1]) throw new Error(`Binary checksum mismatch for ${filename}; reinstall the npm package.`);
24
+ fs.accessSync(binary, fs.constants.X_OK);
25
+ return binary;
26
+ }
27
+ function run(root, args) {
28
+ let executable;
29
+ try { executable = verifyBinary(root, process.platform, process.arch); }
30
+ catch (error) {console.error(`agent_room: ${error.message}`);process.exitCode = 1;return;}
31
+ const child = spawn(executable, args, {stdio:'inherit', shell:false});
32
+ const handlers = new Map();
33
+ for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
34
+ const handler = () => {if (child.exitCode === null && child.signalCode === null) child.kill(signal);};
35
+ handlers.set(signal, handler);process.on(signal, handler);
36
+ }
37
+ function cleanup() {for (const [signal,handler] of handlers) process.removeListener(signal,handler);}
38
+ child.once('error', error => {cleanup();console.error(`agent_room: could not launch native client: ${error.message}`);process.exitCode=1;});
39
+ child.once('exit', (code,signal) => {
40
+ cleanup();
41
+ process.exitCode = code ?? (constants.signals[signal] ? 128 + constants.signals[signal] : 1);
42
+ });
43
+ }
44
+ if (require.main === module) run(path.resolve(__dirname, '..'), process.argv.slice(2));
45
+ module.exports = {binaryPath, verifyBinary, run};
@@ -0,0 +1,4 @@
1
+ dc72bf7b7c5039354573f7f28008815a760515fe0668d7b7d3b69d930fb05a60 agent_room-linux-amd64
2
+ 3caaf84a17353f800afa4caefb86119bcaece39beedcc9e8c01faeaa8506bb60 agent_room-linux-arm64
3
+ a0e51e90b386f81986bf1d4a0e7c3d8b018df56fb4bf300e0ee72eb3524ab640 agent_room-darwin-amd64
4
+ fb92b33ea29dc1007434e4d85e3185209f2676c670b7d9fbef2ec324cbda022b agent_room-darwin-arm64
Binary file
Binary file
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "menmu-agent-room",
3
+ "version": "0.1.0",
4
+ "description": "Shared Codex project sessions with host-approved members, terminal and browser clients",
5
+ "publishConfig": {
6
+ "access": "public",
7
+ "registry": "https://registry.npmjs.org/"
8
+ },
9
+ "license": "UNLICENSED",
10
+ "bin": {
11
+ "agent_room": "bin/agent_room.cjs"
12
+ },
13
+ "files": [
14
+ "bin/agent_room.cjs",
15
+ "native/",
16
+ "README.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "os": [
22
+ "darwin",
23
+ "linux"
24
+ ],
25
+ "cpu": [
26
+ "x64",
27
+ "arm64"
28
+ ]
29
+ }