menmu-agent-room 0.1.2 → 1.0.4
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 +56 -1
- package/THIRD_PARTY_NOTICES.md +48 -0
- package/native/SHA256SUMS +4 -4
- package/native/agent_room-darwin-amd64 +0 -0
- package/native/agent_room-darwin-arm64 +0 -0
- package/native/agent_room-linux-amd64 +0 -0
- package/native/agent_room-linux-arm64 +0 -0
- package/package.json +6 -3
- package/scripts/setup.sh +130 -0
package/README.md
CHANGED
|
@@ -4,6 +4,32 @@ A Linux host creates a shared project session. Members on macOS or Linux request
|
|
|
4
4
|
|
|
5
5
|
## Install with npm
|
|
6
6
|
|
|
7
|
+
Recommended user setup (Node.js 20+, macOS/Linux, no sudo):
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm exec --yes --registry=https://registry.npmjs.org/ --package=menmu-agent-room@latest -- agent_room-setup
|
|
11
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
12
|
+
agent_room dashboard
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The setup command ships inside the npm package; no GitHub script download is
|
|
16
|
+
required. In a source checkout or extracted bundle, use `sh scripts/setup.sh`.
|
|
17
|
+
Setup configures Bash/Zsh and preserves existing global installations. Use
|
|
18
|
+
`agent_room doctor` to identify the command and version currently in use.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
agent_room --version
|
|
22
|
+
agent_room-update --check
|
|
23
|
+
agent_room-update
|
|
24
|
+
agent_room-update --rollback
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Updates validate a staged package before switching the managed entry point.
|
|
28
|
+
Failed updates keep the old version. Running clients need to be restarted;
|
|
29
|
+
updates do not stop hosts or cancel tasks. No background updates are scheduled.
|
|
30
|
+
|
|
31
|
+
Alternative: global npm installation (use the same npm prefix for updates):
|
|
32
|
+
|
|
7
33
|
Requires Node.js 20+ and npm:
|
|
8
34
|
|
|
9
35
|
```sh
|
|
@@ -13,7 +39,7 @@ agent_room help
|
|
|
13
39
|
|
|
14
40
|
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
41
|
|
|
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.
|
|
42
|
+
The npm package name is `menmu-agent-room`; the installed command is `agent_room`. For offline installation, use `npm install -g ./menmu-agent-room-1.0.4.tgz`. To install without administrator access, add `--prefix "$HOME/.local"` and put `$HOME/.local/bin` on PATH.
|
|
17
43
|
|
|
18
44
|
## Host (Linux)
|
|
19
45
|
|
|
@@ -70,3 +96,32 @@ npm uninstall -g menmu-agent-room
|
|
|
70
96
|
```
|
|
71
97
|
|
|
72
98
|
Uninstalling the CLI keeps host sessions and client credentials. Native hosts currently running are not replaced until they restart.
|
|
99
|
+
|
|
100
|
+
## Local room dashboard
|
|
101
|
+
|
|
102
|
+
Run `agent_room dashboard` once and keep its terminal running. The local page
|
|
103
|
+
lists saved member identities and local host projects. Add a host address,
|
|
104
|
+
complete session ID and nickname, then connect; first-time members still need
|
|
105
|
+
host approval. Open the conversation from the room card. Disconnect only
|
|
106
|
+
closes that dashboard's connection, preserving membership and submitted tasks.
|
|
107
|
+
Closing the browser tab keeps connections alive; stopping the dashboard process
|
|
108
|
+
closes its connections. Rooms remain available next time, without auto-connecting.
|
|
109
|
+
Connections opened in other terminals are not controlled by this dashboard.
|
|
110
|
+
|
|
111
|
+
For a host using a custom state directory from an older version, use
|
|
112
|
+
`agent_room dashboard --host-state /absolute/state`. The dashboard does not
|
|
113
|
+
start or stop hosts, create host projects, or grant membership approvals.
|
|
114
|
+
Use `--no-open` to print the local URL without opening a browser.
|
|
115
|
+
|
|
116
|
+
The chat page shows its local client version, renders Markdown safely, and
|
|
117
|
+
supports code-block copying. Press Enter to send or Alt+Enter for a newline.
|
|
118
|
+
|
|
119
|
+
## Removing a managed installation
|
|
120
|
+
|
|
121
|
+
Managed and global npm installations are separate. `npm uninstall -g
|
|
122
|
+
menmu-agent-room` removes the global package only. To remove the managed
|
|
123
|
+
installation, stop its local clients, remove its recognized `~/.local/bin/agent_room`
|
|
124
|
+
and `~/.local/bin/agent_room-update` wrappers, and remove only
|
|
125
|
+
`~/.local/share/agent_room/npm`. Keep the surrounding agent_room directory and
|
|
126
|
+
user configuration directory to preserve host state and member credentials.
|
|
127
|
+
The marked PATH block can remain if you use `~/.local/bin` for other tools.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The browser client embeds marked 15.0.12, used only to tokenize Markdown.
|
|
4
|
+
|
|
5
|
+
# License information
|
|
6
|
+
|
|
7
|
+
## Contribution License Agreement
|
|
8
|
+
|
|
9
|
+
If you contribute code to this project, you are implicitly allowing your code
|
|
10
|
+
to be distributed under the MIT license. You are also implicitly verifying that
|
|
11
|
+
all code is your original work. `</legalese>`
|
|
12
|
+
|
|
13
|
+
## Marked
|
|
14
|
+
|
|
15
|
+
Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
|
|
16
|
+
Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
|
|
17
|
+
|
|
18
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
20
|
+
in the Software without restriction, including without limitation the rights
|
|
21
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
23
|
+
furnished to do so, subject to the following conditions:
|
|
24
|
+
|
|
25
|
+
The above copyright notice and this permission notice shall be included in
|
|
26
|
+
all copies or substantial portions of the Software.
|
|
27
|
+
|
|
28
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
34
|
+
THE SOFTWARE.
|
|
35
|
+
|
|
36
|
+
## Markdown
|
|
37
|
+
|
|
38
|
+
Copyright © 2004, John Gruber
|
|
39
|
+
http://daringfireball.net/
|
|
40
|
+
All rights reserved.
|
|
41
|
+
|
|
42
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
43
|
+
|
|
44
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
45
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
46
|
+
* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
47
|
+
|
|
48
|
+
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
package/native/SHA256SUMS
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
a2d397824d4e26a148938f4876100b1b4a15d840a48459326913fc65a99cb410 agent_room-linux-amd64
|
|
2
|
+
43c251414fb4c579b3b799c778554046b58bebaf92902b78e63ed417e777b83a agent_room-linux-arm64
|
|
3
|
+
d83bbc0f7453f5f7ffc78cec9a11789940344c179412b666b74043af1667f167 agent_room-darwin-amd64
|
|
4
|
+
ecdf2062f4e8c347c6fb052b4d23fb9aa4417b91beed38f4b0d6bd353adff084 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.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Shared Codex project sessions with host-approved members, terminal and browser clients",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -12,13 +12,16 @@
|
|
|
12
12
|
"url": "git+https://github.com/Doorwood/agent_room.git"
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"agent_room": "bin/agent_room.cjs"
|
|
15
|
+
"agent_room": "bin/agent_room.cjs",
|
|
16
|
+
"agent_room-setup": "scripts/setup.sh"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"bin/agent_room.cjs",
|
|
19
20
|
"native/",
|
|
21
|
+
"scripts/setup.sh",
|
|
20
22
|
"README.md",
|
|
21
|
-
"LICENSE"
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"THIRD_PARTY_NOTICES.md"
|
|
22
25
|
],
|
|
23
26
|
"engines": {
|
|
24
27
|
"node": ">=20"
|
package/scripts/setup.sh
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# User installation/update entry point. Requires Node.js 20+ and npm.
|
|
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 ;; --check) mode=check ;; --rollback) mode=rollback ;;
|
|
9
|
+
--help) echo 'Usage: sh setup.sh [--update | --check | --rollback]'; exit 0 ;;
|
|
10
|
+
*) echo "Unknown option: $1" >&2; exit 2 ;;
|
|
11
|
+
esac
|
|
12
|
+
shift
|
|
13
|
+
done
|
|
14
|
+
case "$(uname -s)/$(uname -m)" in
|
|
15
|
+
Linux/x86_64|Linux/amd64|Linux/aarch64|Linux/arm64|Darwin/x86_64|Darwin/arm64) ;;
|
|
16
|
+
*) echo 'Supported systems: macOS/Linux x64/arm64' >&2; exit 1 ;;
|
|
17
|
+
esac
|
|
18
|
+
command -v node >/dev/null 2>&1 && command -v npm >/dev/null 2>&1 || { echo 'Install Node.js 20+ and npm first.' >&2; exit 1; }
|
|
19
|
+
node -e 'if (+process.versions.node.split(".")[0] < 20) process.exit(1)' || { echo 'Node.js 20+ is required.' >&2; exit 1; }
|
|
20
|
+
install_root="$HOME/.local/share/agent_room/npm"
|
|
21
|
+
user_bin="$HOME/.local/bin"
|
|
22
|
+
registry=https://registry.npmjs.org/
|
|
23
|
+
current="$install_root/current"
|
|
24
|
+
if [ -f "$current/node_modules/menmu-agent-room/package.json" ]; then active_root=$current; else active_root=$install_root; fi
|
|
25
|
+
installed=$(node -e 'try {console.log(require(process.argv[1]).version)} catch {console.log("none")}' "$active_root/node_modules/menmu-agent-room/package.json")
|
|
26
|
+
active_command=$(command -v agent_room || true)
|
|
27
|
+
printf 'Current command: %s\nManaged installation: %s\n' "${active_command:-not on PATH}" "$installed"
|
|
28
|
+
if [ "$mode" = install ] && [ "$installed" = none ] && [ -n "$active_command" ]; then
|
|
29
|
+
echo 'An existing installation was detected. Setup will add a user-managed installation and preserve the other package.'
|
|
30
|
+
fi
|
|
31
|
+
if [ "$mode" != check ]; then
|
|
32
|
+
# Preserve unknown executables. Recognize our wrapper and npm launcher only.
|
|
33
|
+
for entry in agent_room agent_room-update; do
|
|
34
|
+
if [ -e "$user_bin/$entry" ] || [ -L "$user_bin/$entry" ]; then
|
|
35
|
+
node -e 'const fs=require("fs");const p=process.argv[1];let s;try{if(fs.statSync(p).size>1048576)process.exit(1);s=fs.readFileSync(p,"utf8")}catch{process.exit(1)};if(!s.includes(".local/share/agent_room/npm") && !(s.includes("binaryPath") && s.includes("verifyBinary")))process.exit(1)' "$user_bin/$entry" || {
|
|
36
|
+
echo "Unknown executable at $user_bin/$entry; move it to a backup path before installing. Nothing was replaced." >&2; exit 1;
|
|
37
|
+
}
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
fi
|
|
41
|
+
if [ "$mode" != rollback ]; then
|
|
42
|
+
latest=$(npm view menmu-agent-room dist-tags.latest --registry="$registry" --prefer-online --fetch-retries=1 --fetch-timeout=15000) || {
|
|
43
|
+
echo 'Cannot check the official npm registry. Check your network; existing installation is unchanged.' >&2; exit 1;
|
|
44
|
+
}
|
|
45
|
+
node -e 'if(!/^\d+\.\d+\.\d+$/.test(process.argv[1]))process.exit(1)' "$latest" || { echo 'Invalid stable registry version.' >&2; exit 1; }
|
|
46
|
+
printf 'Latest: %s\n' "$latest"
|
|
47
|
+
fi
|
|
48
|
+
if [ "$mode" = check ]; then exit 0; fi
|
|
49
|
+
if [ "$mode" != install ] && [ "$installed" = none ]; then echo 'Run setup first to configure a managed installation.' >&2; exit 1; fi
|
|
50
|
+
mkdir -p "$install_root" "$user_bin"
|
|
51
|
+
lock="$install_root/.update-lock"
|
|
52
|
+
if ! mkdir "$lock" 2>/dev/null; then echo "Another update is in progress. If it was interrupted, verify no updater is running before removing $lock." >&2; exit 1; fi
|
|
53
|
+
stage=''
|
|
54
|
+
cleanup() { if [ -n "$stage" ]; then rm -rf "$stage"; fi; rmdir "$lock"; }
|
|
55
|
+
trap cleanup EXIT
|
|
56
|
+
trap 'exit 130' INT
|
|
57
|
+
trap 'exit 143' TERM HUP
|
|
58
|
+
# Atomic symlink replacement, including macOS where mv follows directory symlinks.
|
|
59
|
+
switch_to() {
|
|
60
|
+
node -e 'const fs=require("fs"),path=require("path");const [root,target]=process.argv.slice(1);const tmp=path.join(root,".pointer-"+process.pid);try{fs.symlinkSync(target,tmp);fs.renameSync(tmp,path.join(root,"current"))}finally{try{fs.unlinkSync(tmp)}catch{}}' "$install_root" "$1"
|
|
61
|
+
}
|
|
62
|
+
if [ "$mode" = rollback ]; then
|
|
63
|
+
[ -L "$install_root/previous" ] || { echo 'No previous managed installation is available.' >&2; exit 1; }
|
|
64
|
+
previous=$(node -e 'console.log(require("fs").realpathSync(process.argv[1]))' "$install_root/previous")
|
|
65
|
+
node "$previous/node_modules/menmu-agent-room/bin/agent_room.cjs" help >/dev/null
|
|
66
|
+
switch_to "$previous"
|
|
67
|
+
echo 'Previous version restored. Restart your local clients to use it.'
|
|
68
|
+
exit 0
|
|
69
|
+
fi
|
|
70
|
+
if [ "$installed" != "$latest" ]; then
|
|
71
|
+
if [ "$installed" != none ]; then
|
|
72
|
+
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" || { echo 'Installed version is newer; no downgrade performed.'; exit 0; }
|
|
73
|
+
fi
|
|
74
|
+
mkdir -p "$install_root/releases"
|
|
75
|
+
stage=$(mktemp -d "$install_root/releases/.stage-XXXXXX")
|
|
76
|
+
npm install --prefix "$stage" --registry="$registry" --ignore-scripts --no-audit --no-fund --fetch-retries=1 --fetch-timeout=30000 "menmu-agent-room@$latest"
|
|
77
|
+
# The npm launcher validates the native checksum before starting help.
|
|
78
|
+
node "$stage/node_modules/menmu-agent-room/bin/agent_room.cjs" help >/dev/null
|
|
79
|
+
node -e 'if(require(process.argv[1]).version!==process.argv[2])process.exit(1)' "$stage/node_modules/menmu-agent-room/package.json" "$latest"
|
|
80
|
+
if [ "${latest%%.*}" -ge 1 ]; then
|
|
81
|
+
node "$stage/node_modules/menmu-agent-room/bin/agent_room.cjs" --version --json > "$stage/version.json"
|
|
82
|
+
node -e 'if(require(process.argv[1]).version!==process.argv[2])process.exit(1)' "$stage/version.json" "$latest"
|
|
83
|
+
fi
|
|
84
|
+
# Keep the prior entry for explicit rollback. Never remove a running version.
|
|
85
|
+
if [ "$installed" != none ]; then
|
|
86
|
+
old_root=$(node -e 'console.log(require("fs").realpathSync(process.argv[1]))' "$active_root")
|
|
87
|
+
node -e 'const fs=require("fs"),p=require("path");const [root,target]=process.argv.slice(1),tmp=p.join(root,".previous-"+process.pid);try{fs.symlinkSync(target,tmp);fs.renameSync(tmp,p.join(root,"previous"))}finally{try{fs.unlinkSync(tmp)}catch{}}' "$install_root" "$old_root"
|
|
88
|
+
fi
|
|
89
|
+
release="$install_root/releases/$latest-$(basename "$stage" | cut -c8-)"
|
|
90
|
+
mv "$stage" "$release"
|
|
91
|
+
stage=''
|
|
92
|
+
switch_to "$release"
|
|
93
|
+
fi
|
|
94
|
+
# This wrapper reads current at startup. 0.1.3 legacy installs remain a fallback.
|
|
95
|
+
stage=$(mktemp -d "$user_bin/.agent-room-setup.XXXXXX")
|
|
96
|
+
cat > "$stage/agent_room" <<'WRAPPER'
|
|
97
|
+
#!/bin/sh
|
|
98
|
+
root="$HOME/.local/share/agent_room/npm"
|
|
99
|
+
if [ -f "$root/current/node_modules/menmu-agent-room/bin/agent_room.cjs" ]; then root="$root/current"; fi
|
|
100
|
+
exec node "$root/node_modules/menmu-agent-room/bin/agent_room.cjs" "$@"
|
|
101
|
+
WRAPPER
|
|
102
|
+
# Prefer the newly installed updater so future bug fixes take effect too.
|
|
103
|
+
updater="$install_root/current/node_modules/menmu-agent-room/scripts/setup.sh"
|
|
104
|
+
if [ -f "$updater" ] && grep -Fq .update-lock "$updater"; then cp "$updater" "$stage/agent_room-update"; else cp "$0" "$stage/agent_room-update"; fi
|
|
105
|
+
chmod 755 "$stage/agent_room" "$stage/agent_room-update"
|
|
106
|
+
mv -f "$stage/agent_room" "$user_bin/agent_room"
|
|
107
|
+
mv -f "$stage/agent_room-update" "$user_bin/agent_room-update"
|
|
108
|
+
if [ "$mode" = install ]; then
|
|
109
|
+
zsh_root=${ZDOTDIR:-$HOME};mkdir -p "$zsh_root"
|
|
110
|
+
bash_login="$HOME/.profile"
|
|
111
|
+
if [ -f "$HOME/.bash_profile" ]; then bash_login="$HOME/.bash_profile"; elif [ -f "$HOME/.bash_login" ]; then bash_login="$HOME/.bash_login"; fi
|
|
112
|
+
for rc in "$bash_login" "$HOME/.bashrc" "$zsh_root/.zprofile" "$zsh_root/.zshrc"; do
|
|
113
|
+
if ! test -f "$rc" || ! grep -Fq '# agent_room user PATH' "$rc"; then
|
|
114
|
+
cat >> "$rc" <<'PROFILE'
|
|
115
|
+
|
|
116
|
+
# agent_room user PATH
|
|
117
|
+
case ":$PATH:" in
|
|
118
|
+
*":$HOME/.local/bin:"*) ;;
|
|
119
|
+
*) export PATH="$HOME/.local/bin:$PATH" ;;
|
|
120
|
+
esac
|
|
121
|
+
PROFILE
|
|
122
|
+
fi
|
|
123
|
+
done
|
|
124
|
+
fi
|
|
125
|
+
printf '\nInstalled managed version: %s\nCommand: %s/agent_room\n' "$latest" "$user_bin"
|
|
126
|
+
echo 'Restart running answers/join/dashboard clients to use this version; do not restart the host for a client-only UI update.'
|
|
127
|
+
echo 'For this terminal: export PATH="$HOME/.local/bin:$PATH"'
|
|
128
|
+
echo 'Verify: command -v agent_room; agent_room --version; agent_room doctor'
|
|
129
|
+
echo 'Open your rooms: agent_room dashboard'
|
|
130
|
+
echo 'Check: agent_room-update --check | Upgrade: agent_room-update | Restore: agent_room-update --rollback'
|