@maintainer-pro/ai-bridge 0.1.7 → 0.1.10
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/README.md +15 -11
- package/bin/cli.js +2 -1
- package/package.json +3 -2
- package/src/daemon.mjs +2258 -1542
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
|
-
|
|
16
|
+
**Local development** (SDK checkout next to admin). From this repo:
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
```bash
|
|
19
|
+
npm run bridge -- --pair AB12-CD34 --admin-url http://localhost:4100
|
|
20
|
+
```
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
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
|
|
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
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maintainer-pro/ai-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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.
|
|
31
|
+
"@maintainer-pro/ai-cli": "^0.1.6",
|
|
32
|
+
"@maintainer-pro/ai-server": "^0.1.5"
|
|
32
33
|
}
|
|
33
34
|
}
|