Wire validated core bridge, migrate daemon to it, verify live

This commit is contained in:
Fisto
2026-09-11 14:15:03 +02:00
parent e62d3007d8
commit 7d6650ce4e
27 changed files with 754 additions and 266 deletions
+11 -7
View File
@@ -16,19 +16,22 @@ pnpm install
| --- | --- |
| `pnpm poc:qr` | QR login. Writes the token file. |
| `pnpm control:bridge` | Start the daemon. It listens on `http://127.0.0.1:8788/mcp`. |
| `pnpm control:mock` | Start the mock core. Test the daemon without Electron. |
| `pnpm test:trigger` | Inject a trigger event into the mock core. |
| `pnpm poc:dm` | Send one test DM to zzib. |
| `pnpm test:comm` | Run the unit tests for the pure logic. |
| `pnpm cdp:probe` | Check CDP access and event delivery. |
| `pnpm cdp:dispatch` | Run one CDP expression in the client. |
| `pnpm check` | Type check the daemon code. |
## Transport
The daemon uses Chrome DevTools Protocol at this time. Start the client with
`--remote-debugging-port=9222`. The daemon connects to the Discord page and runs the actions in the
real client.
The primary transport is the validated core bridge at `vesktop-puppet.sock`. The daemon sends
validated actions and receives normalized events. See
[../docs/core-bridge.md](../docs/core-bridge.md).
The target transport is the validated core bridge. See
[../docs/core-bridge.md](../docs/core-bridge.md). The daemon logic is the same on both transports.
The CDP transport is a development fallback. It needs no Vesktop patch, and it has no
core-side guardrails. Use it for debugging only.
## Pacing
@@ -44,8 +47,9 @@ The only permitted live-send target is user zzib. See
## Verified
- QR login works end-to-end. The token came from a phone scan.
- The CDP transport works. `get_state` returned the real account and 7 guilds. `send_dm` delivered
a real DM to zzib.
- The core bridge works live. `get_state` returned the real account and 7 guilds. `send_dm` reached
zzib. A synthetic owner message reached the daemon log with the command parsed.
- The mock path works. The daemon handles state, sends, commands, and the two log buckets.
- Pacing stayed inside the 500 to 2800 ms window.
## Findings