{"_id":"@albrorithm/prime-agent-remote","_rev":"4-c2394d096062bf572f7cae37511f2b41","name":"@albrorithm/prime-agent-remote","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@albrorithm/prime-agent-remote","version":"0.1.0","author":{"name":"albrorithm"},"license":"MIT","_id":"@albrorithm/prime-agent-remote@0.1.0","maintainers":[{"name":"albrorithm","email":"albrorithm@albro.dev"}],"homepage":"https://github.com/albrorithm/prime-agent-remote#readme","bugs":{"url":"https://github.com/albrorithm/prime-agent-remote/issues"},"bin":{"prime-agent-remote":"dist-server/cli/index.js"},"dist":{"shasum":"bf26c7b003aa068d11d85f0af1ed85d3418cdbdf","tarball":"https://registry.npmjs.org/@albrorithm/prime-agent-remote/-/prime-agent-remote-0.1.0.tgz","fileCount":90,"integrity":"sha512-XoK7ysJKkdi3qB78mqoOMtZ6eaeRUaQh1XachMEKIJotAviySLydS8g066F5Ap4RpDoMvATyjfQAn4Ra7J4jhg==","signatures":[{"sig":"MEYCIQCkK4RU2J+TsekLRLrsw4xB2ij2VdM4nk5WDbRZfY5fHwIhAKc7wWaV0/VcVCsuKo2ze0bWto+j2KXpdY9xQd/G3KaT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2437696},"type":"module","engines":{"node":">=22"},"gitHead":"212c8b87fd833f6b9ca0ac68de8082b9c854121d","scripts":{"dev":"concurrently -k -n gateway,web -c blue,magenta \"npm:dev:gateway\" \"npm:dev:web\"","test":"vitest run","build":"npm run typecheck && vite build && node scripts/hash-sw.mjs dist && npm run clean:server && tsc -p tsconfig.server.json && node -e \"require('node:fs').chmodSync('dist-server/cli/index.js', 0o755)\"","smoke":"npm run build && node scripts/smoke.mjs","start":"NODE_ENV=production node dist-server/server/index.js","dev:web":"vite","prepare":"node scripts/prepare.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.server.test.json --noEmit","test:watch":"vitest","dev:gateway":"tsx watch src/server/index.ts","clean:server":"node -e \"require('node:fs').rmSync('dist-server', { recursive: true, force: true })\""},"_npmUser":{"name":"albrorithm","email":"albrorithm@albro.dev"},"repository":{"url":"git+https://github.com/albrorithm/prime-agent-remote.git","type":"git"},"_npmVersion":"11.19.0","description":"A mobile-first, installable web UI for Prime Agent: an authenticated gateway that puts a phone-sized chat interface in front of your local agent daemon.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"ws":"^8.18.0","zod":"^3.24.0","react":"^19.0.0","marked":"^18.0.10","lowlight":"^3.3.0","web-push":"^3.6.7","react-dom":"^19.0.0","lucide-react":"^0.468.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vite":"^6.0.0","jsdom":"^25.0.0","vitest":"^4.1.11","axe-core":"^4.10.0","@types/ws":"^8.5.13","typescript":"^5.7.0","vitest-axe":"^0.1.0","@types/node":"^22.10.0","@types/react":"^19.0.0","concurrently":"^9.1.0","@types/web-push":"^3.6.4","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.0","@testing-library/user-event":"^14.5.0"},"_npmOperationalInternal":{"tmp":"tmp/prime-agent-remote_0.1.0_1787871891704_0.8917564907929629","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@albrorithm/prime-agent-remote","version":"0.1.1","author":{"name":"albrorithm"},"license":"MIT","_id":"@albrorithm/prime-agent-remote@0.1.1","maintainers":[{"name":"albrorithm","email":"albrorithm@albro.dev"}],"homepage":"https://github.com/albrorithm/prime-agent-remote#readme","bugs":{"url":"https://github.com/albrorithm/prime-agent-remote/issues"},"bin":{"prime-agent-remote":"dist-server/cli/index.js"},"dist":{"shasum":"0a47f18b0ef5b1ed4cfa6f6b9aba343820ea3da8","tarball":"https://registry.npmjs.org/@albrorithm/prime-agent-remote/-/prime-agent-remote-0.1.1.tgz","fileCount":94,"integrity":"sha512-jRwJl4vutucabCwcpaJA0p9oAjDMwLu8a58dLbHeFQO5e4P+zyvFGG3Wr8RKc1uMbuR7fEc6GkZk1tHUhXYPWw==","signatures":[{"sig":"MEUCIQDmPCnrf5CtvqenVWytPKAkV6OV/h8cfHRJou1MqDGTJwIgEVHM3wUvFh4gR3Scytt5wzxc62uzEnloSYU+R+VsZtU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2511729},"type":"module","_from":"file:/private/tmp/prime-agent-remote-release.ZtOPAB/albrorithm-prime-agent-remote-0.1.1.tgz","engines":{"node":">=22"},"scripts":{"dev":"concurrently -k -n gateway,web -c blue,magenta \"npm:dev:gateway\" \"npm:dev:web\"","test":"vitest run","build":"npm run typecheck && vite build && node scripts/hash-sw.mjs dist && npm run clean:server && tsc -p tsconfig.server.json && node -e \"require('node:fs').chmodSync('dist-server/cli/index.js', 0o755)\"","smoke":"npm run build && node scripts/smoke.mjs","start":"NODE_ENV=production node dist-server/server/index.js","dev:web":"vite","prepare":"node scripts/prepare.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.server.test.json --noEmit","test:watch":"vitest","dev:gateway":"tsx watch src/server/index.ts","clean:server":"node -e \"require('node:fs').rmSync('dist-server', { recursive: true, force: true })\""},"_npmUser":{"name":"albrorithm","email":"albrorithm@albro.dev"},"_resolved":"/private/tmp/prime-agent-remote-release.ZtOPAB/albrorithm-prime-agent-remote-0.1.1.tgz","_integrity":"sha512-jRwJl4vutucabCwcpaJA0p9oAjDMwLu8a58dLbHeFQO5e4P+zyvFGG3Wr8RKc1uMbuR7fEc6GkZk1tHUhXYPWw==","repository":{"url":"git+https://github.com/albrorithm/prime-agent-remote.git","type":"git"},"_npmVersion":"11.19.0","description":"A mobile-first, installable web UI for Prime Agent: an authenticated gateway that puts a phone-sized chat interface in front of your local agent daemon.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"ws":"^8.18.0","zod":"^3.24.0","react":"^19.0.0","marked":"^18.0.10","lowlight":"^3.3.0","web-push":"^3.6.7","react-dom":"^19.0.0","lucide-react":"^0.468.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vite":"^6.0.0","jsdom":"^25.0.0","vitest":"^4.1.11","axe-core":"^4.10.0","@types/ws":"^8.5.13","typescript":"^5.7.0","vitest-axe":"^0.1.0","@types/node":"^22.10.0","@types/react":"^19.0.0","concurrently":"^9.1.0","@types/web-push":"^3.6.4","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.0","@testing-library/user-event":"^14.5.0"},"_npmOperationalInternal":{"tmp":"tmp/prime-agent-remote_0.1.1_1788320251035_0.9563217628318574","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@albrorithm/prime-agent-remote","version":"0.1.2","author":{"name":"albrorithm"},"license":"MIT","_id":"@albrorithm/prime-agent-remote@0.1.2","maintainers":[{"name":"albrorithm","email":"albrorithm@albro.dev"}],"homepage":"https://github.com/albrorithm/prime-agent-remote#readme","bugs":{"url":"https://github.com/albrorithm/prime-agent-remote/issues"},"bin":{"prime-agent-remote":"dist-server/cli/index.js"},"dist":{"shasum":"a28128b057a3a228e0c2ed3adee94e75257e7417","tarball":"https://registry.npmjs.org/@albrorithm/prime-agent-remote/-/prime-agent-remote-0.1.2.tgz","fileCount":101,"integrity":"sha512-grz7xeQ3xPQfmXtk6rRpqjM2pzZ/hDoSWL0PF4cdDXQkybnnW0HAsGcd+mkb/DKn0+AqeHP889WpouYbzECDXQ==","signatures":[{"sig":"MEYCIQDmSWk79qKP3J9FUUMGySau6XdRvPMhUDXrF+K7xAJ+nQIhAOBSRoIDdh8SEipYpIYkbwnPdVOzkaC/Hb21WVfVGH3Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2690628},"type":"module","engines":{"node":">=22.2"},"gitHead":"c820f28f325d9309d9a832c09345abc7fa735bdf","scripts":{"dev":"concurrently -k -n gateway,web -c blue,magenta \"npm:dev:gateway\" \"npm:dev:web\"","test":"vitest run","build":"npm run typecheck && vite build && node scripts/hash-sw.mjs dist && npm run clean:server && tsc -p tsconfig.server.json && node -e \"require('node:fs').chmodSync('dist-server/cli/index.js', 0o755)\"","smoke":"npm run build && node scripts/smoke.mjs","start":"NODE_ENV=production node dist-server/server/index.js","dev:web":"vite","prepare":"node scripts/prepare.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.server.test.json --noEmit","test:watch":"vitest","dev:gateway":"tsx watch src/server/index.ts","clean:server":"node -e \"require('node:fs').rmSync('dist-server', { recursive: true, force: true })\""},"_npmUser":{"name":"albrorithm","email":"albrorithm@albro.dev"},"repository":{"url":"git+https://github.com/albrorithm/prime-agent-remote.git","type":"git"},"_npmVersion":"11.19.0","description":"A mobile-first, installable web UI for Prime Agent: an authenticated gateway that puts a phone-sized chat interface in front of your local agent daemon.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"ws":"^8.18.0","zod":"^3.24.0","react":"^19.0.0","marked":"^18.0.10","lowlight":"^3.3.0","web-push":"^3.6.7","react-dom":"^19.0.0","lucide-react":"^0.468.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vite":"^6.0.0","jsdom":"^25.0.0","vitest":"^4.1.11","axe-core":"^4.10.0","@types/ws":"^8.5.13","typescript":"^5.7.0","vitest-axe":"^0.1.0","@types/node":"^22.10.0","@types/react":"^19.0.0","concurrently":"^9.1.0","@types/web-push":"^3.6.4","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.0","@testing-library/user-event":"^14.5.0"},"_npmOperationalInternal":{"tmp":"tmp/prime-agent-remote_0.1.2_1788745788496_0.5932054047217346","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@albrorithm/prime-agent-remote@0.1.3","bin":{"prime-agent-remote":"dist-server/cli/index.js"},"bugs":{"url":"https://github.com/albrorithm/prime-agent-remote/issues"},"dist":{"shasum":"cc82841ce61e8a4054ae105f68f37f8512f30d81","tarball":"https://registry.npmjs.org/@albrorithm/prime-agent-remote/-/prime-agent-remote-0.1.3.tgz","fileCount":113,"integrity":"sha512-gVeRbr4gAjRDY6tOkma3s722oBlPvDfsF2mKv3XHtwf3y91mzaNkRVc52Lzh+ArllUmSF60Ib1kIX32+PDnZlA==","signatures":[{"sig":"MEUCIFhthbByCiID9rSgbIZe5XD2j20OhXpBG3pu5qo0MHGeAiEAxTPyihms44QsN7B4OrBNtjjwqD442l1z+wLBhDViC1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDZ5WVNHtZ1RkNbzveWnhAwE0ScXRknTZbd6ga8zMlabwIgYGrv8g9L3k+kyLUuPPFi3vK11I36a6ESRxI2TiYYf6Q="}],"unpackedSize":3518217},"name":"@albrorithm/prime-agent-remote","type":"module","_from":"file:/tmp/albrorithm-prime-agent-remote-0.1.3.tgz","author":{"name":"albrorithm"},"engines":{"node":">=22.2"},"license":"MIT","scripts":{"dev":"concurrently -k -n gateway,web -c blue,magenta \"npm:dev:gateway\" \"npm:dev:web\"","test":"vitest run","build":"npm run typecheck && vite build && node scripts/hash-sw.mjs dist && npm run clean:server && tsc -p tsconfig.server.json && node -e \"require('node:fs').chmodSync('dist-server/cli/index.js', 0o755)\"","smoke":"npm run build && node scripts/smoke.mjs && node scripts/smoke-prime-client.mjs","start":"NODE_ENV=production node dist-server/server/index.js","dev:web":"vite","prepare":"node scripts/prepare.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.server.test.json --noEmit","test:watch":"vitest","dev:gateway":"tsx watch src/server/index.ts","clean:server":"node -e \"require('node:fs').rmSync('dist-server', { recursive: true, force: true })\""},"version":"0.1.3","_npmUser":{"name":"albrorithm","email":"albrorithm@albro.dev"},"homepage":"https://github.com/albrorithm/prime-agent-remote#readme","_resolved":"/tmp/albrorithm-prime-agent-remote-0.1.3.tgz","_integrity":"sha512-gVeRbr4gAjRDY6tOkma3s722oBlPvDfsF2mKv3XHtwf3y91mzaNkRVc52Lzh+ArllUmSF60Ib1kIX32+PDnZlA==","repository":{"url":"git+https://github.com/albrorithm/prime-agent-remote.git","type":"git"},"_npmVersion":"11.19.0","description":"A mobile-first, installable web UI for Prime Agent: an authenticated gateway that puts a phone-sized chat interface in front of your local agent daemon.","directories":{},"maintainers":[{"name":"albrorithm","email":"albrorithm@albro.dev"}],"_nodeVersion":"26.7.0","dependencies":{"ws":"^8.18.0","zod":"^3.24.0","react":"^19.0.0","marked":"^18.0.10","lowlight":"^3.3.0","web-push":"^3.6.7","react-dom":"^19.0.0","lucide-react":"^0.468.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vite":"^6.0.0","jsdom":"^25.0.0","vitest":"^4.1.11","esbuild":"0.28.2","axe-core":"^4.10.0","@types/ws":"^8.5.13","typescript":"^5.7.0","vitest-axe":"^0.1.0","@types/node":"^22.10.0","@types/react":"^19.0.0","concurrently":"^9.1.0","@types/web-push":"^3.6.4","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.0","@testing-library/user-event":"^14.5.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prime-agent-remote_0.1.3_1789435627595_0.8595854122982995"}}},"time":{"created":"2026-08-27T23:04:51.560Z","modified":"2026-09-15T01:27:07.939Z","0.1.0":"2026-08-27T23:04:51.911Z","0.1.1":"2026-09-02T03:37:31.194Z","0.1.2":"2026-09-07T01:49:48.642Z","0.1.3":"2026-09-15T01:27:07.765Z"},"bugs":{"url":"https://github.com/albrorithm/prime-agent-remote/issues"},"author":{"name":"albrorithm"},"license":"MIT","homepage":"https://github.com/albrorithm/prime-agent-remote#readme","repository":{"url":"git+https://github.com/albrorithm/prime-agent-remote.git","type":"git"},"description":"A mobile-first, installable web UI for Prime Agent: an authenticated gateway that puts a phone-sized chat interface in front of your local agent daemon.","maintainers":[{"name":"albrorithm","email":"albrorithm@albro.dev"}],"readme":"# Prime Agent Remote\n\nA remote interface for [Prime Agent](https://github.com/PrimeIntellect-ai/prime-agent).\nThe daemon stays on your machine; a small authenticated gateway sits in front\nof it, so another device can drive an agent without exposing a terminal.\n\n<p align=\"center\">\n  <a href=\"docs/screenshots/desktop-pair.png\"><img src=\"docs/screenshots/desktop-pair.png\" alt=\"Conversation and session management in Prime Agent Remote\" width=\"520\"></a>\n  <br>\n  <sub>Open full-size: <a href=\"docs/screenshots/conversation.png\">Conversation</a> · <a href=\"docs/screenshots/sessions.png\">Sessions</a></sub>\n</p>\n\nIt is built for phones: it installs to the home screen and opens its session\ndrawer with a swipe. Desktop browsers are supported (the drawer becomes a\npermanent sidebar), but desktop is not what this is designed for or regularly\ntested against.\n\nIt is an independent client. This project is not affiliated with, endorsed by,\nor sponsored by Prime Intellect.\n\n## Install and start\n\nInstall Prime Agent first. It is not on npm, so use its own installer:\n\n```bash\ncurl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh\n```\n\nThen:\n\n```bash\nnpm install -g @albrorithm/prime-agent-remote\nprime-agent-remote install-command\n```\n\nRemote includes a pinned daemon SDK for both Node and compiled Prime installations.\nIt connects to the existing daemon; it does not install or launch an agent runtime.\nSet `PRIME_AGENT_MODULE` only to select a different JavaScript SDK explicitly.\nSettings reports the SDK version separately from the daemon version, which is\ncurrently unknown. See [client compatibility](docs/prime-client.md).\n\nThe published package ships `dist/`, `dist-server/`, and `vendor/prime-daemon/` prebuilt, so nothing\ncompiles at install time and npm's install-scripts gate has nothing to skip.\n`install-command` adds the `/webui` command to Prime Agent. It is a separate\nstep because it writes into Prime Agent's own configuration directory, which\nan install should not do without asking.\n\nThen, from a Prime Agent session:\n\n```\n/webui start\n```\n\nor from a terminal, `prime-agent-remote start`. Either way the launcher finds\nyour Prime Agent build, checks whether Tailscale is running, and prints the\naddress to open along with a pairing link. The link is good for ten minutes and\npairs one phone; `prime-agent-remote token` prints another.\n\n### From a checkout\n\nFor development, or to run your own edits:\n\n```bash\ngit clone https://github.com/albrorithm/prime-agent-remote.git\ncd prime-agent-remote\nnpm install\nnpm link\nprime-agent-remote install-command\n```\n\n`npm install` builds both the UI and the server via the `prepare` script, so\nthere is no separate build step. `npm link` puts the CLI on PATH, which\n`/webui` needs because it shells out to the command by name.\n\nIf you would rather not link anything globally, `./dist-server/cli/index.js\nstart` runs the same launcher straight out of the checkout, but `/webui` will\nnot be available.\n\nInstalling straight from GitHub also works, with one catch:\n\n```bash\nnpm install -g git+https://github.com/albrorithm/prime-agent-remote.git\n```\n\nnpm 11 only runs a git dependency's `prepare` script with explicit approval,\nand skips it silently otherwise, which leaves the CLI unbuilt with no error.\nIf `prime-agent-remote help` prints nothing right after installing this way,\nthat is what happened: approve the script and reinstall. `install-command`\nchecks for this case and says so, rather than reporting a clean install of a\n`/webui` that cannot run. None of this applies to the published package above, which needs\nno build step.\n\n```\nprime-agent-remote start      Start it in the background\nprime-agent-remote status     Show the address and whether it is running\nprime-agent-remote stop       Stop it\nprime-agent-remote token      Print a fresh pairing link (--rotate to void them all)\nprime-agent-remote devices    List paired devices (--revoke <id|all> to remove one)\nprime-agent-remote rebuild    Rebuild the UI and make it live\nprime-agent-remote install-command   Add /webui to Prime Agent\n```\n\n### How it is reachable\n\nThe gateway binds one of three ways, chosen when you start it:\n\n- `--tailscale`: the default when Tailscale is running. The gateway stays on\n  loopback and Tailscale terminates HTTPS, so the app is reachable from your\n  phone anywhere, in a secure context, without installing a certificate.\n  `start` publishes the Tailscale Serve mapping itself and `stop` removes it\n  again, but only the mapping it created: one that was already there, or one\n  pointing somewhere else, is left alone and the command to publish it by hand\n  is printed instead. `--no-serve` never touches your Tailscale configuration.\n- `--loopback`: this machine only. A phone cannot reach it.\n- `--lan`: **experimental**. Binds every interface, so every device on your\n  network can reach it and only a pairing link stops them. Without a\n  certificate the device already trusts, plain HTTP outside `localhost` is\n  not a secure context: no installable app, no service worker, no\n  notifications, no app badge. Every credential that authenticates a request\n  (a pairing code, a paired session's cookie, and the 400-day device\n  credential) also crosses the network unencrypted, so anyone who can observe\n  LAN traffic can copy them off the wire.\n\n## Pairing\n\n`start` prints a QR code beside the address. Scan it with the phone's camera\nand the app pairs itself: the code is the address with a pairing code in the\nURL fragment, which the app spends and then strips out of the URL. Typing the\npairing code into the pairing form does the same thing, if a camera is not to\nhand. `prime-agent-remote token` prints a new link, and `--qr` a code to scan,\nfor a gateway that is already running.\n\nA pairing link is good for ten minutes and pairs one phone. It is minted by\nthe running gateway from a setup secret that stays on this machine and is\nnever itself part of a link, so a screenshot of the code, or a link left in a\nbrowser's history, is worth at most one pairing and at most ten minutes. A\nsecond phone gets its own link. `prime-agent-remote token --rotate` voids\nevery link still outstanding at once, and replaces the setup secret that\nmints them.\n\nEither way the browser is then issued its own device credential, so it stays\npaired across gateway restarts and never needs a link again. Signing out\nrevokes that device, clears both cookies, and ends every other session running\nfrom that device, sockets included. Session expiry revokes nothing, by design,\nso a phone stays paired across a gateway restart.\n\nOnly a hash of the credential is stored, so the file on disk does not let\nanyone impersonate a paired device.\n\n## Installing as a PWA\n\nThe full experience is the installed PWA: on iOS, notifications and the app\nbadge only work once the app has been added to the Home Screen and is opened\nfrom there. In Safari, open the gateway address, then Share → Add to Home\nScreen. Use the Tailscale HTTPS address, since being a secure context is what\nmakes the app installable at all. Chrome on Android offers the install on its\nown.\n\nThe installed app may ask to pair again, because iOS can give it storage\nseparate from Safari's. If it does, that is expected rather than a failed\npairing; a link pairs one phone once, so print a new one with\n`prime-agent-remote token --qr` and scan that.\n\n## From inside Prime Agent\n\n`/webui` is installed by `prime-agent-remote install-command` (see above). It\ncopies `extensions/webui.ts` into `~/.prime/agent/extensions/`, so the command\nexists in every session rather than only inside this checkout. Because it is a\ncopy, it needs re-running after that file changes.\n\n```\n/webui [status|start|stop|token|help]\n```\n\nIt reports where the interface is served and starts it if it is not running.\nIt is a thin wrapper over the same CLI, and it never parents the gateway to a\nsession.\n\n## What it does\n\n- Recursive root-agent and subagent tree.\n- Chat-centred mobile shell with a swipe-open session drawer and compact\n  ancestry navigation.\n- Transcript streaming, live goal progress, and stop/send composer controls.\n- Markdown-lite rendering with copyable code blocks, including while streaming.\n- In-transcript search, quick replies, and per-agent drafts that survive\n  reloads.\n- Image attachments for image-capable models, resized client-side.\n- Catalog-driven slash commands, with clearly marked experimental execution.\n- Dialog and question attention cards.\n- Starting, renaming, stopping and deleting sessions from the phone.\n- Self-configuring web push: the gateway generates its own keys on first\n  start, and each device opts in from Settings.\n- Installable as a PWA.\n\nThe browser never reaches the daemon socket directly. There is no terminal, no\narbitrary shell, and no arbitrary file reading. The only filesystem surface is\na read-only directory-name browser for choosing a working directory.\n[`docs/security.md`](docs/security.md) describes the boundary in full.\n\n## Demo mode\n\n`prime-agent-remote start --demo` runs against a safe fake backend that never\ntouches a real agent. Useful for looking at the interface without a running\nagent, and for development.\n\nDemo mode keeps its own pairing token, paired devices, and gateway state in a\nseparate `prime-agent-web-demo` config directory, so a demo run never shares\ncredentials with a real one or evicts a real device from the paired-device\nstore. Pass `--demo` to `status`, `stop`, and `rebuild` too when you mean the\ndemo instance; without it they operate on the real one.\n\n## Documentation\n\n- [Security model](docs/security.md): what the gateway does and does not\n  defend against. Written by one person and not independently reviewed; a\n  description, not a guarantee.\n- [Deployment](docs/deployment.md): environment variables and production notes.\n- [Changing the web UI](docs/modifying-the-ui.md): for agents and quick edits.\n- [Protocol](docs/protocol.md): the wire contract.\n- [Contributing](CONTRIBUTING.md)\n\n## Requirements\n\n- Node.js 22 or newer.\n- Prime Agent installed and its daemon reachable.\n- Tailscale recommended for access from outside your machine.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\nThe butterfly mark used as the app icon comes from the Prime Agent repository\nand is used under its MIT license. See\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). That license covers the\nartwork, not the Prime Agent name or mark as a trademark, and no rights in\neither are claimed here.\n","readmeFilename":"README.md"}