@rubytech/create-realagent-code 0.1.193 → 0.1.194

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-code",
3
- "version": "0.1.193",
3
+ "version": "0.1.194",
4
4
  "description": "Install Real Agent — Built for agents. By agents.",
5
5
  "bin": {
6
6
  "create-realagent-code": "./dist/index.js"
@@ -127,13 +127,15 @@ The share is **LAN-only**: it binds to the loopback and your Pi's Wi-Fi/Ethernet
127
127
 
128
128
  **Credentials:** SMB user is `admin`; password is your {{productName}} PIN. The installer wires the sync so every time you set or rotate the PIN in the admin UI, the SMB password updates with it.
129
129
 
130
- **macOS Finder**: Press `Cmd-K` from any Finder window, type `smb://<hostname>.local` (use the hostname your installer printed for example `smb://maxy-code.local` or `smb://realagent-code.local`), click Connect, sign in as `admin` with your PIN. The share appears in the Finder sidebar; drag-and-drop works in both directions.
130
+ The SMB username is the Linux user that owns the install on the device — `admin` on a Pi or a Hetzner box, your own Linux user (for example `neo`) on a self-hosted laptop install. The password is your {{productName}} PIN. Changing the PIN in the admin UI re-syncs the SMB password for that same Unix user automatically.
131
131
 
132
- **Windows Explorer**: Open File Explorer, type `\\<hostname>.local\<brand>` in the address bar (for example `\\maxy-code.local\maxy-code`), press Enter, sign in as `admin` with your PIN. To keep it across reboots, right-click "Map network drive".
132
+ **macOS Finder**: Press `Cmd-K` from any Finder window, type `smb://<hostname>.local` (use the hostname your installer printed — for example `smb://maxy-code.local` or `smb://realagent-code.local`), click Connect, sign in as the install owner with your PIN. The share appears in the Finder sidebar; drag-and-drop works in both directions.
133
133
 
134
- **iOS Files**: Open Files tap the `…` menu (top-right) "Connect to Server" enter `smb://<hostname>.local` "Registered User" username `admin`, password is your PIN.
134
+ **Windows Explorer**: Open File Explorer, type `\\<hostname>.local\<brand>` in the address bar (for example `\\maxy-code.local\maxy-code`), press Enter, sign in as the install owner with your PIN. To keep it across reboots, right-click → "Map network drive".
135
135
 
136
- **Android (Solid Explorer, CX File Explorer)**: Add a new connection of type SMB / Network. Host = `<hostname>.local`, share = `<brand>` (same as your install folder name), user = `admin`, password = your PIN.
136
+ **iOS Files**: Open Files tap the `…` menu (top-right) "Connect to Server" enter `smb://<hostname>.local` "Registered User" username is the install owner, password is your PIN.
137
+
138
+ **Android (Solid Explorer, CX File Explorer)**: Add a new connection of type SMB / Network. Host = `<hostname>.local`, share = `<brand>` (same as your install folder name), user = the install owner, password = your PIN.
137
139
 
138
140
  **Troubleshooting:** if the mount fails with "logon failure", change your PIN in the admin UI and try again — that re-triggers the smbpasswd sync. If the share doesn't show up at all, your client may need `<hostname>.local` resolved by mDNS — try the Pi's LAN IP address as a fallback (`smb://192.168.1.50` on macOS, `\\192.168.1.50\<brand>` on Windows).
139
141
 
@@ -2705,6 +2705,7 @@ var BIN_DIR = resolve(MAXY_DIR, "bin");
2705
2705
  var REMOTE_PASSWORD_FILE = resolve(MAXY_DIR, ".remote-password");
2706
2706
  var REMOTE_SESSION_SECRET_FILE = resolve(MAXY_DIR, "credentials", "remote-session-secret");
2707
2707
  var ADMIN_SESSION_SECRET_FILE = resolve(MAXY_DIR, "credentials", "admin-session-secret");
2708
+ var INSTALL_OWNER_FILE = resolve(MAXY_DIR, ".install-owner");
2708
2709
  var TELEGRAM_WEBHOOK_SECRET_FILE = resolve(MAXY_DIR, ".telegram-webhook-secret");
2709
2710
  var TELEGRAM_ADMIN_WEBHOOK_SECRET_FILE = resolve(MAXY_DIR, ".telegram-admin-webhook-secret");
2710
2711
  var VISITOR_TOKEN_SECRET_FILE = resolve(MAXY_DIR, "credentials", "visitor-token-secret");
@@ -5454,6 +5455,7 @@ export {
5454
5455
  USERS_FILE,
5455
5456
  LOG_DIR,
5456
5457
  BIN_DIR,
5458
+ INSTALL_OWNER_FILE,
5457
5459
  VISITOR_TOKEN_SECRET_FILE,
5458
5460
  CLAUDE_CREDENTIALS_FILE,
5459
5461
  vncLog,
@@ -14,7 +14,7 @@ import {
14
14
  sanitizeClientCorrId,
15
15
  vncLog,
16
16
  websockifyLog
17
- } from "./chunk-WWD4TCJJ.js";
17
+ } from "./chunk-EXIPYITB.js";
18
18
  import "./chunk-PFF6I7KP.js";
19
19
 
20
20
  // server/edge.ts
@@ -9,6 +9,7 @@ import {
9
9
  COMMERCIAL_MODE,
10
10
  GREETING_DIRECTIVE,
11
11
  Hono,
12
+ INSTALL_OWNER_FILE,
12
13
  LOG_DIR,
13
14
  MAXY_DIR,
14
15
  PLATFORM_ROOT,
@@ -83,7 +84,7 @@ import {
83
84
  vncLog,
84
85
  walkPremiumBundles,
85
86
  writeAdminUserAndPerson
86
- } from "./chunk-WWD4TCJJ.js";
87
+ } from "./chunk-EXIPYITB.js";
87
88
  import {
88
89
  __commonJS,
89
90
  __toESM
@@ -6325,19 +6326,32 @@ app4.post("/set-pin", async (c) => {
6325
6326
  }
6326
6327
  console.log(`[set-pin] wrote users.json + account.json admins: userId=${userId.slice(0, 8)}\u2026 role=owner`);
6327
6328
  if (process.platform === "linux") {
6328
- const smbProc = spawnSync2("sudo", ["-n", "smbpasswd", "-a", "-s", "admin"], {
6329
- input: `${body.pin}
6329
+ let installOwner = null;
6330
+ if (existsSync6(INSTALL_OWNER_FILE)) {
6331
+ try {
6332
+ const raw = readFileSync8(INSTALL_OWNER_FILE, "utf-8").trim();
6333
+ if (raw.length > 0) installOwner = raw;
6334
+ } catch (err) {
6335
+ console.error(`[set-pin] install-owner-read-failed path=${INSTALL_OWNER_FILE} error=${err instanceof Error ? err.message : String(err)}`);
6336
+ }
6337
+ }
6338
+ if (!installOwner) {
6339
+ console.error(`[set-pin] smbpasswd sync failed owner=<unknown> rc=-1 reason=install-owner-file-missing path=${INSTALL_OWNER_FILE}`);
6340
+ } else {
6341
+ const smbProc = spawnSync2("sudo", ["-n", "smbpasswd", "-a", "-s", installOwner], {
6342
+ input: `${body.pin}
6330
6343
  ${body.pin}
6331
6344
  `,
6332
- stdio: ["pipe", "pipe", "pipe"],
6333
- encoding: "utf-8",
6334
- timeout: 1e4
6335
- });
6336
- if (smbProc.status === 0) {
6337
- console.log(`[set-pin] smb-password-synced userId=${userId.slice(0, 8)}\u2026`);
6338
- } else {
6339
- const stderr = (smbProc.stderr ?? "").trim().slice(0, 200);
6340
- console.error(`[set-pin] smb-password-sync-failed exit=${smbProc.status} stderr=${JSON.stringify(stderr)}`);
6345
+ stdio: ["pipe", "pipe", "pipe"],
6346
+ encoding: "utf-8",
6347
+ timeout: 1e4
6348
+ });
6349
+ if (smbProc.status === 0) {
6350
+ console.log(`[set-pin] smbpasswd sync ok owner=${installOwner} userId=${userId.slice(0, 8)}\u2026`);
6351
+ } else {
6352
+ const stderr = (smbProc.stderr ?? "").trim().slice(0, 200);
6353
+ console.error(`[set-pin] smbpasswd sync failed owner=${installOwner} rc=${smbProc.status} stderr=${JSON.stringify(stderr)}`);
6354
+ }
6341
6355
  }
6342
6356
  } else {
6343
6357
  console.log(`[set-pin] smb-password-sync-skipped reason=non-linux platform=${process.platform}`);