@rubytech/create-realagent 1.0.861 → 1.0.863

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-realagent",
3
- "version": "1.0.861",
3
+ "version": "1.0.863",
4
4
  "description": "Install Real Agent — Built for agents. By agents.",
5
5
  "bin": {
6
6
  "create-realagent": "./dist/index.js"
@@ -2,18 +2,20 @@
2
2
  # Existing-pi install-log redaction (Task 744).
3
3
  #
4
4
  # Idempotent one-shot remediation for Pis that completed installation BEFORE
5
- # the install-log redaction landed at index.ts:152 / setup.sh:94. Scans every
6
- # `install-*.log` in the configured logs directory and replaces every literal
7
- # `set-initial-password ...<secret>` payload with `set-initial-password
8
- # [REDACTED]`. Re-running the script is safe — already-redacted lines do not
9
- # match the source pattern, so no further edits occur.
5
+ # the install-log redaction landed at packages/create-maxy/src/index.ts:152.
6
+ # Scans every `install-*.log` in the configured logs directory and replaces
7
+ # every literal `set-initial-password ...<secret>` payload with
8
+ # `set-initial-password [REDACTED]`. Re-running the script is safe —
9
+ # already-redacted lines do not match the source pattern, so no further
10
+ # edits occur.
10
11
  #
11
12
  # Source patterns covered:
12
13
  # 1. TS installer (packages/create-maxy/src/index.ts:152) — "[ISO] > sudo
13
14
  # neo4j-admin dbms set-initial-password -- <secret>" or any args after
14
15
  # "set-initial-password" (positional or "--" delimited).
15
- # 2. Shell installer (platform/scripts/setup.sh, pre-fix variant) — "+ sudo
16
- # neo4j-admin dbms set-initial-password <secret>" if bash -x had been on.
16
+ # 2. Legacy bash installer (removed) — "+ sudo neo4j-admin dbms
17
+ # set-initial-password <secret>" if bash -x had been on. Pattern kept
18
+ # for historical install logs from before the bash installer's removal.
17
19
  #
18
20
  # A trailing marker line `[redact-install-logs] redacted=<n> file=<path>` is
19
21
  # appended to each modified log so subsequent reads can identify which logs
@@ -9400,15 +9400,22 @@ ${result.stderr}` : ""}`;
9400
9400
  return err("script", message, combined);
9401
9401
  }
9402
9402
  let tunnels;
9403
+ let nullNormalised = false;
9403
9404
  try {
9404
9405
  const parsed = JSON.parse(result.stdout.trim());
9405
- if (!Array.isArray(parsed)) throw new Error("cloudflared response is not an array");
9406
- tunnels = parsed.filter((t) => t.deleted_at == null).map((t) => {
9407
- if (typeof t.id !== "string" || typeof t.name !== "string") {
9408
- throw new Error("tunnel entry missing id or name");
9409
- }
9410
- return { id: t.id, name: t.name };
9411
- });
9406
+ if (parsed === null) {
9407
+ tunnels = [];
9408
+ nullNormalised = true;
9409
+ } else if (!Array.isArray(parsed)) {
9410
+ throw new Error("cloudflared response is not an array");
9411
+ } else {
9412
+ tunnels = parsed.filter((t) => t.deleted_at == null).map((t) => {
9413
+ if (typeof t.id !== "string" || typeof t.name !== "string") {
9414
+ throw new Error("tunnel entry missing id or name");
9415
+ }
9416
+ return { id: t.id, name: t.name };
9417
+ });
9418
+ }
9412
9419
  } catch (e) {
9413
9420
  return err(
9414
9421
  "script",
@@ -9417,11 +9424,12 @@ ${result.stderr}` : ""}`;
9417
9424
  );
9418
9425
  }
9419
9426
  const total = Date.now() - started;
9420
- log(`phase=response-sent total_ms=${total} count=${tunnels.length}`);
9427
+ const nullTag = nullNormalised ? " null_normalised=true" : "";
9428
+ log(`phase=response-sent total_ms=${total} count=${tunnels.length}${nullTag}`);
9421
9429
  writeRouteMilestone(
9422
9430
  streamLogPath,
9423
9431
  "cloudflare-tunnels",
9424
- `phase=response-sent total_ms=${total} count=${tunnels.length} source=cloudflared`
9432
+ `phase=response-sent total_ms=${total} count=${tunnels.length} source=cloudflared${nullTag}`
9425
9433
  );
9426
9434
  const success = { ok: true, tunnels, defaultName, correlationId, streamLogPath };
9427
9435
  return c.json(success, 200);
@@ -1,195 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Maxy Phase 0 — Pi Setup Script
3
- # Run on a fresh Raspberry Pi 5 (16GB) with Raspberry Pi OS (64-bit)
4
- #
5
- # Usage: curl -fsSL https://raw.githubusercontent.com/aeon-neo/getmaxy/main/platform/scripts/setup.sh | bash
6
- # or: git clone git@github.com:aeon-neo/getmaxy.git && cd getmaxy && bash platform/scripts/setup.sh
7
-
8
- set -euo pipefail
9
-
10
- REPO_URL="https://github.com/aeon-neo/getmaxy.git"
11
- INSTALL_DIR="$HOME/maxy"
12
-
13
- echo "================================================================"
14
- echo " Maxy Phase 0 — Setup"
15
- echo " AI for Productive People"
16
- echo "================================================================"
17
- echo ""
18
-
19
- # ------------------------------------------------------------------
20
- # 1. System dependencies + hostname + Avahi (mDNS)
21
- # ------------------------------------------------------------------
22
- echo "[1/8] Updating system packages and configuring network..."
23
- sudo apt-get update -qq
24
- sudo apt-get install -y -qq curl git unzip avahi-daemon avahi-utils bind9-dnsutils
25
-
26
- # Set hostname to 'maxy' so device is reachable at maxy.local
27
- CURRENT_HOSTNAME=$(hostname)
28
- if [ "$CURRENT_HOSTNAME" != "maxy" ]; then
29
- echo " Setting hostname to 'maxy' (was '$CURRENT_HOSTNAME')..."
30
- sudo hostnamectl set-hostname maxy
31
- # Update /etc/hosts
32
- sudo sed -i "s/127\.0\.1\.1.*$/127.0.1.1\tmaxy/" /etc/hosts
33
- fi
34
-
35
- # Create Avahi service file for LAN discovery
36
- sudo tee /etc/avahi/services/maxy.service > /dev/null <<AVAHI
37
- <?xml version="1.0" standalone='no'?>
38
- <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
39
- <service-group>
40
- <name replace-wildcards="yes">Maxy on %h</name>
41
- <service>
42
- <type>_http._tcp</type>
43
- <port>19200</port>
44
- <txt-record>role=maxy</txt-record>
45
- <txt-record>path=/</txt-record>
46
- </service>
47
- </service-group>
48
- AVAHI
49
-
50
- # Ensure Avahi is running
51
- sudo systemctl enable avahi-daemon
52
- sudo systemctl restart avahi-daemon
53
- echo " Device reachable at http://maxy.local:19200"
54
-
55
- # ------------------------------------------------------------------
56
- # 2. Node.js 20+
57
- # ------------------------------------------------------------------
58
- if command -v node &>/dev/null && [[ "$(node -v | cut -d. -f1 | tr -d v)" -ge 20 ]]; then
59
- echo "[2/8] Node.js $(node -v) already installed."
60
- else
61
- echo "[2/8] Installing Node.js 22..."
62
- curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
63
- sudo apt-get install -y -qq nodejs
64
- fi
65
-
66
- # ------------------------------------------------------------------
67
- # 3. Neo4j Community Edition 5.x
68
- # ------------------------------------------------------------------
69
- if command -v neo4j &>/dev/null; then
70
- echo "[3/8] Neo4j already installed."
71
- else
72
- echo "[3/8] Installing Neo4j Community Edition 5..."
73
-
74
- # Neo4j 5.x requires Java 17+
75
- if ! java -version 2>&1 | grep -q '"17\.\|"21\.\|"22\.\|"23\.'; then
76
- echo " Installing OpenJDK 17..."
77
- sudo apt-get install -y -qq openjdk-17-jre-headless
78
- fi
79
-
80
- # Add Neo4j repository
81
- curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/neo4j.gpg 2>/dev/null
82
- echo "deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable 5" | sudo tee /etc/apt/sources.list.d/neo4j.list
83
- sudo apt-get update -qq
84
- sudo apt-get install -y -qq neo4j
85
-
86
- # Configure Neo4j for local use
87
- sudo sed -i 's/#server.default_listen_address=0.0.0.0/server.default_listen_address=127.0.0.1/' /etc/neo4j/neo4j.conf
88
-
89
- # Generate a strong random password and store it.
90
- # Password handling block is set +x bracketed so even bash -x setup.sh
91
- # cannot print the substituted secret. The password is written to
92
- # platform/config/.neo4j-password (chmod 600) — the only readable source.
93
- # set-initial-password reads the secret via $(cat ...) so the literal
94
- # never appears on the parent shell's command line, and stdout is
95
- # discarded so neo4j-admin's own echo cannot leak it either (Task 744).
96
- { set +x; } 2>/dev/null
97
- NEO4J_GENERATED_PASSWORD=$(openssl rand -base64 32 | tr -d '/+=' | head -c 32)
98
- mkdir -p "$INSTALL_DIR/platform/config"
99
- printf '%s' "$NEO4J_GENERATED_PASSWORD" > "$INSTALL_DIR/platform/config/.neo4j-password"
100
- chmod 600 "$INSTALL_DIR/platform/config/.neo4j-password"
101
- unset NEO4J_GENERATED_PASSWORD
102
- sudo neo4j-admin dbms set-initial-password "$(cat "$INSTALL_DIR/platform/config/.neo4j-password")" >/dev/null 2>&1
103
-
104
- # Start and enable
105
- sudo systemctl enable neo4j
106
- sudo systemctl start neo4j
107
- echo " Neo4j started. Password stored in platform/config/.neo4j-password"
108
- fi
109
-
110
- # ------------------------------------------------------------------
111
- # 4. Ollama (local embeddings)
112
- # ------------------------------------------------------------------
113
- if command -v ollama &>/dev/null; then
114
- echo "[4/8] Ollama already installed."
115
- else
116
- echo "[4/8] Installing Ollama..."
117
- curl -fsSL https://ollama.ai/install.sh | sh
118
- fi
119
-
120
- # Pull the embedding model (configurable via EMBED_MODEL env var)
121
- EMBED_MODEL="${EMBED_MODEL:-nomic-embed-text}"
122
- echo " Pulling ${EMBED_MODEL} embedding model..."
123
- ollama pull "$EMBED_MODEL"
124
-
125
- # ------------------------------------------------------------------
126
- # 5. Cloudflared (Cloudflare Tunnel)
127
- # ------------------------------------------------------------------
128
- if command -v cloudflared &>/dev/null; then
129
- echo "[5/8] Cloudflared already installed."
130
- else
131
- echo "[5/8] Installing cloudflared..."
132
- curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb -o /tmp/cloudflared.deb
133
- sudo dpkg -i /tmp/cloudflared.deb
134
- rm /tmp/cloudflared.deb
135
- fi
136
-
137
- # ------------------------------------------------------------------
138
- # 6. Clone or update Maxy
139
- # ------------------------------------------------------------------
140
- if [ -d "$INSTALL_DIR/.git" ]; then
141
- echo "[6/8] Updating Maxy..."
142
- cd "$INSTALL_DIR"
143
- git pull --ff-only
144
- else
145
- echo "[6/8] Cloning Maxy..."
146
- git clone "$REPO_URL" "$INSTALL_DIR"
147
- cd "$INSTALL_DIR"
148
- fi
149
-
150
- # ------------------------------------------------------------------
151
- # 6.5. Redact install-log credential leaks (Task 744 — idempotent).
152
- # Pre-fix logs may contain plaintext neo4j passwords; this script scrubs
153
- # every install-*.log to "[REDACTED]". Safe on already-clean logs.
154
- # ------------------------------------------------------------------
155
- if [ -x "$INSTALL_DIR/platform/scripts/redact-install-logs.sh" ]; then
156
- bash "$INSTALL_DIR/platform/scripts/redact-install-logs.sh" || true
157
- fi
158
-
159
- # ------------------------------------------------------------------
160
- # 7. Install dependencies and build
161
- # ------------------------------------------------------------------
162
- echo "[7/8] Installing dependencies and building..."
163
-
164
- # Platform MCP servers
165
- cd "$INSTALL_DIR/platform"
166
- npm install --quiet
167
- npm run build
168
-
169
- # Web app
170
- cd "$INSTALL_DIR/maxy"
171
- npm install --quiet
172
- npm run build
173
-
174
- # ------------------------------------------------------------------
175
- # 8. Create account and apply schema
176
- # ------------------------------------------------------------------
177
- cd "$INSTALL_DIR"
178
- if [ ! -f "$INSTALL_DIR/.seeded" ]; then
179
- echo "[8/8] Creating account and applying schema..."
180
- bash platform/scripts/seed-neo4j.sh
181
- touch "$INSTALL_DIR/.seeded"
182
- fi
183
-
184
- # ------------------------------------------------------------------
185
- # Done
186
- # ------------------------------------------------------------------
187
- echo ""
188
- echo "================================================================"
189
- echo " Maxy is installed."
190
- echo ""
191
- echo " Open in your browser:"
192
- echo " http://maxy.local:19200"
193
- echo ""
194
- echo " Everything from here happens through conversation."
195
- echo "================================================================"