@rubytech/create-realagent 1.0.682 → 1.0.684
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/dist/index.js +41 -184
- package/dist/uninstall.js +172 -72
- package/package.json +1 -1
- package/payload/platform/config/brand.json +1 -0
- package/payload/platform/plugins/docs/references/deployment.md +16 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +23 -0
- package/payload/server/public/assets/{admin-Bu8EzQH7.js → admin-WQxJgaus.js} +3 -3
- package/payload/server/public/index.html +1 -1
package/package.json
CHANGED
|
@@ -76,6 +76,22 @@ Each Maxy device runs one `--user` systemd unit:
|
|
|
76
76
|
|
|
77
77
|
If the admin terminal fails to open, check `sudo tail -n 50 ~/.maxy/logs/edge-boot.log` — the `ttyd-ws-upgrade` / `ttyd-proxy-open` / `ttyd-proxy-close` lines carry a `corrId` that ties the full session lifecycle together. For unit health, `systemctl --user status maxy-ttyd` + `journalctl --user -u maxy-ttyd`.
|
|
78
78
|
|
|
79
|
+
## Running multiple brands on one device
|
|
80
|
+
|
|
81
|
+
A single Pi or laptop can host more than one brand (for example Maxy and Real Agent) side by side. Each brand runs as its own service on its own port, with its own install directory and its own data. Installing one brand does not touch the other.
|
|
82
|
+
|
|
83
|
+
- **Separate:** each brand has its own install folder (`~/maxy/`, `~/realagent/`), its own config folder (`~/.maxy/`, `~/.realagent/`), its own web port, its own Cloudflare tunnel state, and by default its own Neo4j database (Maxy on bolt port 7687, Real Agent on 7688).
|
|
84
|
+
- **Shared:** both brands share the system Chromium/VNC stack, the Ollama model server, and the `cloudflared` command itself. Browser automation is serialised — one admin session at a time across both brands.
|
|
85
|
+
|
|
86
|
+
To install a second brand on a device that already runs the first, just run the other installer. No flags needed for isolation:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Already running Maxy on port 20000. Install Real Agent on a different port:
|
|
90
|
+
npx -y @rubytech/create-realagent --port 19500
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Uninstalling one brand removes only that brand's state when the other brand is present: this brand's install folder, config folder, its own Neo4j data (if it runs a dedicated instance; shared data is left alone), its Cloudflare tunnel, and its systemd service. Shared binaries (Ollama, `cloudflared`), apt packages, and device-wide caches (`~/.claude`, `~/.ollama`) are left in place because the other brand is still using them. When no other brand is present, the uninstaller performs a full device decommission as before.
|
|
94
|
+
|
|
79
95
|
## Upgrading
|
|
80
96
|
|
|
81
97
|
To upgrade Maxy to the latest version, ask Maxy: "Upgrade Maxy." The platform checks the current device identity (hostname and port via `system-status`), then re-runs the installer with explicit `--hostname` and `--port` flags to preserve them across the upgrade.
|
|
@@ -93,6 +93,29 @@ If the initial Cloudflare login fails during setup, Maxy will fall back to askin
|
|
|
93
93
|
|
|
94
94
|
---
|
|
95
95
|
|
|
96
|
+
## Admin terminal renders leading `0`, `1`, or `2` characters (wire-format decoder not running)
|
|
97
|
+
|
|
98
|
+
**Symptom:** The header-menu Terminal or Software Update modal connects, but the xterm.js buffer shows literal digits where the tmux prompt should be — e.g. `1tmux new-session -A -s maxy-pty -x 200 -y 50 (neo)2{"..."}`. Typing keystrokes does nothing (the terminal looks alive but nothing echoes).
|
|
99
|
+
|
|
100
|
+
**What it means:** ttyd 1.7.7 frames every WebSocket message with a 1-byte command prefix (`'0'` for output, `'1'` for window title, `'2'` for preferences). The React terminal needs the [ttyd-protocol.ts](../../../../platform/ui/app/lib/ttyd-protocol.ts) decoder to split the prefix and route accordingly. If the decoder isn't wired up — typically because an older bundle was installed or a hotfix reverted the wiring — xterm.js receives the raw bytes and renders the prefix as a literal digit. Outbound keystrokes have the mirror problem: ttyd discards any frame that doesn't start with `'0'` INPUT.
|
|
101
|
+
|
|
102
|
+
**Check (browser DevTools console on admin.maxy.bot):**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
[terminal] connected
|
|
106
|
+
[ttyd-client] protocol negotiated cmd=0 payloadBytes=<n> ← expected within 3s of connect
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `[terminal] connected` present but `[ttyd-client] protocol negotiated` absent → the decoder is not running. Re-install: `npx -y @rubytech/create-maxy@latest` (or Software Update from the admin header when reachable).
|
|
110
|
+
- `[ttyd-client] unknown cmd prefix=<hex> bytes=<n>` cluster → ttyd version drift. The 1.7.7 pin is expected; a newer ttyd may have added command classes. Safe-ignore on 1.7.7.
|
|
111
|
+
- Neither line appears → the WebSocket itself isn't connecting; see the "Admin terminal blank / flashing cursor" section below (pre-Task-657 sections are historical, not applicable).
|
|
112
|
+
|
|
113
|
+
**Correlate with server side.** `grep corrId=<id> ~/.maxy/logs/edge-boot.log` reveals whether bytes are flowing end-to-end — `ttyd-proxy-chunk dir=upstream→client` lines prove ttyd is sending output. If those lines exist but the browser shows leading digits, the decode listener isn't wired to the live socket; if those lines are absent, the failure is upstream of the client (maxy-ttyd service, tmux attach).
|
|
114
|
+
|
|
115
|
+
**Regression boundary:** `platform/ui/app/RemoteTerminal.tsx` must import `decodeFrame`, `encodeInput`, and `encodeResize` from `./lib/ttyd-protocol`. `@xterm/addon-attach` is not a dependency — it pipes WS bytes to `term.write` raw and cannot satisfy the ttyd framing contract.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
96
119
|
## Software Update click shows an error instead of opening the terminal
|
|
97
120
|
|
|
98
121
|
> **Stale content — Task 657 replaced the VNC-terminal surface with byte-stream xterm.js over `/ttyd`.** The VNC launch-upgrade path described below no longer exists. First-line diagnostic for the new surface: `sudo systemctl --user status maxy-ttyd` plus `sudo grep 'ttyd-proxy' ~/.maxy/logs/edge-boot.log | tail -20`. Failure mode signals: `ttyd-ws-upgrade accepted` with no `ttyd-proxy-open` → `maxy-ttyd.service` is down; `ttyd-proxy-open` with no `ttyd-proxy-chunk dir=upstream→client` → ttyd/tmux is not attaching a PTY. Full rewrite tracked in Task 658. The section below is kept only as a historical reference for devices still on pre-Task-657 bundles.
|