menmu-agent-room 0.1.1 → 0.1.3

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 CHANGED
@@ -4,6 +4,23 @@ A Linux host creates a shared project session. Members on macOS or Linux request
4
4
 
5
5
  ## Install with npm
6
6
 
7
+ For a persistent user installation without sudo, run the standalone
8
+ [`scripts/setup.sh`](https://github.com/Doorwood/agent_room/blob/main/scripts/setup.sh)
9
+ from a checkout or extracted binary bundle (Node.js 20+ and npm required):
10
+
11
+ ```sh
12
+ sh scripts/setup.sh
13
+ export PATH="$HOME/.local/bin:$PATH"
14
+ agent_room-update --check
15
+ agent_room-update
16
+ ```
17
+
18
+ Setup configures Bash/Zsh startup files so new terminals and project sessions
19
+ can reuse `agent_room`. The updater checks the public npm registry and installs
20
+ the latest version when invoked; it does not schedule background updates.
21
+ Restart running clients after upgrading. Session data and Codex are preserved.
22
+
23
+
7
24
  Requires Node.js 20+ and npm:
8
25
 
9
26
  ```sh
@@ -13,7 +30,7 @@ agent_room help
13
30
 
14
31
  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
32
 
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.1.tgz`. To install without administrator access, add `--prefix "$HOME/.local"` and put `$HOME/.local/bin` on PATH.
33
+ 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.3.tgz`. To install without administrator access, add `--prefix "$HOME/.local"` and put `$HOME/.local/bin` on PATH.
17
34
 
18
35
  ## Host (Linux)
19
36
 
@@ -60,7 +77,7 @@ agent_room answers HOST_IP SESSION_ID --name alice
60
77
 
61
78
  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.
62
79
 
63
- 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.
80
+ The browser supports sending tasks, shared member history, member filters, progress grouped by task, and final answers with collapsible progress. Press Enter to send a message or Alt+Enter to insert a newline. The original terminal remains available.
64
81
 
65
82
  ## Update or uninstall
66
83
 
package/native/SHA256SUMS CHANGED
@@ -1,4 +1,4 @@
1
- 41aeac7299613a47586b1b21f9bf9e8accc79bca8911c1dbdf2089237e0f41d3 agent_room-linux-amd64
2
- 39b6eecc438589c7c2127f55320506a0a70165108bf7fa806ee391fd19d8fa0b agent_room-linux-arm64
3
- 51dd851c061201f4069c5a226d659c053e4ef8234cc543ee1e8871610c956a22 agent_room-darwin-amd64
4
- 7c2b71fa5dd9cdcb219a853a4c38e909ab6d935eab555b667180384f03faf902 agent_room-darwin-arm64
1
+ 42b01b04f38c41c8b8dc71d1e4fe098f3d635156a3b4a7d1de9722163aee92b9 agent_room-linux-amd64
2
+ 22ad3a2cf1d060e523091c69973cf26c95be3c319f59e7a4b5d4ae7145b556ea agent_room-linux-arm64
3
+ 38da1a6973e21b64db8f52d75c17a4a24239e49aa361c25390659997e5d30eed agent_room-darwin-amd64
4
+ 68a1830fc9442441c6e1efdc4d963fe27f9ad5d89d822a05d8e7e2a9e41fa0e8 agent_room-darwin-arm64
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "menmu-agent-room",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Shared Codex project sessions with host-approved members, terminal and browser clients",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -17,6 +17,7 @@
17
17
  "files": [
18
18
  "bin/agent_room.cjs",
19
19
  "native/",
20
+ "scripts/setup.sh",
20
21
  "README.md",
21
22
  "LICENSE"
22
23
  ],
@@ -0,0 +1,88 @@
1
+ #!/bin/sh
2
+ # Standalone user installation and update entry point (macOS/Linux, Bash/Zsh).
3
+ set -eu
4
+ mode=install
5
+ case "$(basename "$0")" in agent_room-update) mode=update ;; esac
6
+ while [ "$#" -gt 0 ]; do
7
+ case "$1" in
8
+ --update) mode=update ;;
9
+ --check) mode=check ;;
10
+ --help) echo 'Usage: sh setup.sh [--update | --check]'; exit 0 ;;
11
+ *) echo "Unknown option: $1" >&2; exit 2 ;;
12
+ esac
13
+ shift
14
+ done
15
+ case "$(uname -s)/$(uname -m)" in
16
+ Linux/x86_64|Linux/amd64|Linux/aarch64|Linux/arm64|Darwin/x86_64|Darwin/arm64) ;;
17
+ *) echo 'Supported systems: macOS/Linux x64/arm64' >&2; exit 1 ;;
18
+ esac
19
+ command -v node >/dev/null 2>&1 && command -v npm >/dev/null 2>&1 || {
20
+ echo 'Install Node.js 20+ and npm first, then rerun this script.' >&2; exit 1;
21
+ }
22
+ node -e 'if (Number(process.versions.node.split(".")[0]) < 20) process.exit(1)' || {
23
+ echo 'Node.js 20+ is required.' >&2; exit 1;
24
+ }
25
+ install_root="$HOME/.local/share/agent_room/npm"
26
+ user_bin="$HOME/.local/bin"
27
+ registry=https://registry.npmjs.org/
28
+ installed=$(node -e 'try { console.log(require(process.argv[1]).version) } catch { console.log("none") }' "$install_root/node_modules/menmu-agent-room/package.json")
29
+ latest=$(npm view menmu-agent-room dist-tags.latest --registry="$registry" --prefer-online)
30
+ # Validate registry output before using it as a package selector.
31
+ node -e 'if (!/^\d+\.\d+\.\d+$/.test(process.argv[1])) process.exit(1)' "$latest" || {
32
+ echo 'Registry returned an invalid stable version.' >&2; exit 1;
33
+ }
34
+ printf 'Installed: %s\nLatest: %s\n' "$installed" "$latest"
35
+ if [ "$mode" = check ]; then exit 0; fi
36
+ if [ "$mode" = update ] && [ "$installed" = none ]; then
37
+ echo 'Run the setup script first to install agent_room.' >&2; exit 1
38
+ fi
39
+ if [ "$installed" != "$latest" ]; then
40
+ # Never downgrade a newer installation if the registry rolls latest back.
41
+ if [ "$installed" != none ]; then
42
+ node -e 'const a=process.argv[1].split(".").map(Number), b=process.argv[2].split(".").map(Number); for(let i=0;i<3;i++){if(a[i]>b[i])process.exit(1);if(a[i]<b[i])break;}' "$installed" "$latest" || {
43
+ echo 'Installed version is newer than latest; leaving it unchanged.'; exit 0;
44
+ }
45
+ fi
46
+ mkdir -p "$install_root"
47
+ npm install --prefix "$install_root" --registry="$registry" --ignore-scripts --no-audit --no-fund "menmu-agent-room@$latest"
48
+ fi
49
+ node "$install_root/node_modules/menmu-agent-room/bin/agent_room.cjs" help
50
+ if [ "$mode" = install ]; then
51
+ mkdir -p "$user_bin"
52
+ # Both entry points are staged beside their destination for atomic replacement.
53
+ stage=$(mktemp -d "$user_bin/.agent-room-setup.XXXXXX")
54
+ trap 'rm -rf "$stage"' EXIT HUP INT TERM
55
+ cat > "$stage/agent_room" <<'WRAPPER'
56
+ #!/bin/sh
57
+ exec node "$HOME/.local/share/agent_room/npm/node_modules/menmu-agent-room/bin/agent_room.cjs" "$@"
58
+ WRAPPER
59
+ cp "$0" "$stage/agent_room-update"
60
+ chmod 755 "$stage/agent_room" "$stage/agent_room-update"
61
+ mv -f "$stage/agent_room" "$user_bin/agent_room"
62
+ mv -f "$stage/agent_room-update" "$user_bin/agent_room-update"
63
+ # Cover interactive shells and login shells. Respect Zsh's configured directory.
64
+ zsh_root=${ZDOTDIR:-$HOME}
65
+ mkdir -p "$zsh_root"
66
+ bash_login="$HOME/.profile"
67
+ if [ -f "$HOME/.bash_profile" ]; then bash_login="$HOME/.bash_profile"
68
+ elif [ -f "$HOME/.bash_login" ]; then bash_login="$HOME/.bash_login"; fi
69
+ for rc in "$bash_login" "$HOME/.bashrc" "$zsh_root/.zprofile" "$zsh_root/.zshrc"; do
70
+ if ! test -f "$rc" || ! grep -Fq '# agent_room user PATH' "$rc"; then
71
+ cat >> "$rc" <<'PROFILE'
72
+
73
+ # agent_room user PATH
74
+ case ":$PATH:" in
75
+ *":$HOME/.local/bin:"*) ;;
76
+ *) export PATH="$HOME/.local/bin:$PATH" ;;
77
+ esac
78
+ PROFILE
79
+ fi
80
+ done
81
+ fi
82
+ printf '\nagent_room %s is ready. Restart running clients to use the updated version.\n' "$latest"
83
+ if [ "$mode" = install ]; then
84
+ echo 'New Bash/Zsh terminals will find agent_room automatically.'
85
+ echo 'For this terminal, run: export PATH="$HOME/.local/bin:$PATH"'
86
+ echo 'Check updates: agent_room-update --check'
87
+ echo 'Upgrade to latest: agent_room-update'
88
+ fi