@maintainer-pro/ai-bridge 0.1.7 → 0.1.9

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.
Files changed (4) hide show
  1. package/README.md +15 -11
  2. package/bin/cli.js +2 -1
  3. package/package.json +3 -2
  4. package/src/daemon.mjs +2247 -1547
package/README.md CHANGED
@@ -7,21 +7,26 @@ Local bridge daemon that pairs a **developer machine** to a Maintainer Pro **par
7
7
  1. In admin → **Bridges**, generate a pair code
8
8
  2. On the machine (any folder):
9
9
 
10
+ **Published (production admin):**
11
+
10
12
  ```bash
11
- npx --yes @maintainer-pro/ai-bridge --pair AB12-CD34 --admin-url https://your-admin
13
+ npx --yes --prefer-online @maintainer-pro/ai-bridge@latest --pair AB12-CD34 --admin-url https://your-admin
12
14
  ```
13
15
 
14
- Credentials are stored in `~/.maintainer-pro/bridge.json` (not the cwd).
16
+ **Local development** (SDK checkout next to admin). From this repo:
15
17
 
16
- 3. Keep the bridge running (`npx @maintainer-pro/ai-bridge`). It advertises the current folder (and any `--offer-folder` paths).
17
- 4. In admin Bridges: pick a reported folder + client sandbox → **Setup sandbox in folder**.
18
+ ```bash
19
+ npm run bridge -- --pair AB12-CD34 --admin-url http://localhost:4100
20
+ ```
18
21
 
19
- For **empty / new** folders the bridge:
20
- - Writes `.env` (server + client keys)
21
- - Scaffolds `index.html` with the chat widget (served by `ai-server`)
22
- - Starts `ai-server` and marks the sandbox Online
22
+ Or the absolute `node packages/ai-bridge/bin/cli.js …` command shown in admin → Bridges.
23
+
24
+ Credentials and per-sandbox project data (host-app cache, screenshots, logs) live under `~/.maintainer-pro/` — `bridge.json` plus `projects/<sandboxId>/`. Host app folders are not modified.
25
+
26
+ 3. Keep the bridge running (`npx --yes --prefer-online @maintainer-pro/ai-bridge@latest`, or `npm run bridge` in local dev). It advertises the current working directory so admin can choose a folder inside it.
27
+ 4. In admin → Bridges: pick a reported folder + client sandbox → **Setup sandbox in folder**.
23
28
 
24
- For **existing** apps it injects the widget / Next env when possible. Use **Client setup** on the Bridges form for manual overrides (`empty`, `existing`, or keys-only).
29
+ For **empty / new** folders the bridge scaffolds a starter `index.html` (chat served in-process). For **existing** apps it does not modify host files env is injected into the process it starts, and chat is injected on the share URL. Use **Client setup** on the Bridges form for manual overrides (`empty`, `existing`, or keys-only).
25
30
 
26
31
  One bridge process can run many sandboxes (different folders / ports) for different clients.
27
32
 
@@ -31,9 +36,8 @@ One bridge process can run many sandboxes (different folders / ports) for differ
31
36
  |------|---------|
32
37
  | `--pair <code>` | Claim a pair code (first run) |
33
38
  | `--admin-url <url>` | Admin base URL (required when pairing) |
34
- | `--offer-folder <path>` | Advertise an extra folder in admin |
35
39
  | `--no-ai-server` | Do not start sidecars |
36
40
 
37
41
  ## Auth
38
42
 
39
- After pairing, the daemon uses a long-lived `mp_bridge_…` machine token (not a per-sandbox API key). Sandbox server/client keys are written into each workspace `.env` during setup.
43
+ After pairing, the daemon uses a long-lived `mp_bridge_…` machine token (not a per-sandbox API key). Sandbox server/client keys stay in `~/.maintainer-pro/bridge.json` and are injected into processes the bridge starts — they are not written into the host app.
package/bin/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * npx --yes @maintainer-pro/ai-bridge
3
+ * npx --yes --prefer-online @maintainer-pro/ai-bridge@latest
4
+ * npm run bridge
4
5
  */
5
6
  import "../src/daemon.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainer-pro/ai-bridge",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Local bridge daemon that pairs a machine to Maintainer Pro and configures multiple client sandboxes.",
5
5
  "keywords": [
6
6
  "maintainer-pro",
@@ -28,6 +28,7 @@
28
28
  "node": ">=22"
29
29
  },
30
30
  "dependencies": {
31
- "@maintainer-pro/ai-cli": "^0.1.5"
31
+ "@maintainer-pro/ai-cli": "^0.1.6",
32
+ "@maintainer-pro/ai-server": "^0.1.5"
32
33
  }
33
34
  }