Docs: webchat now served in-process, no CLI spawn
This commit is contained in:
@@ -7,7 +7,7 @@ Updated: 2025-12-08
|
||||
- Endpoints:
|
||||
- `GET /webchat/info?session=<key>` → `{port, sessionId, initialMessages, basePath}` plus history from the relay’s session store.
|
||||
- `GET /webchat/*` → static Web Chat assets.
|
||||
- `POST /webchat/rpc` → runs `clawdis agent --json` and returns `{ ok, payloads?, error? }`.
|
||||
- `POST /webchat/rpc` → runs the agent in-process and returns `{ ok, payloads?, error? }` (no CLI spawn, no PATH dependency).
|
||||
- The macOS app simply loads `http://127.0.0.1:<port>/webchat/?session=<key>` (or the SSH-forwarded port in remote mode). No Swift bridge is used for sends; all chat traffic stays inside the Node relay.
|
||||
- Initial messages are fetched from `/webchat/info`, so history appears immediately.
|
||||
- Enable/disable via `webchat.enabled` (default **true**); set the port with `webchat.port`.
|
||||
@@ -24,6 +24,7 @@ Updated: 2025-12-08
|
||||
- Static assets stay in `apps/macos/Sources/Clawdis/Resources/WebChat`; the server reads them directly.
|
||||
- Server code: `src/webchat/server.ts`.
|
||||
- CLI entrypoint (optional): `clawdis webchat --json [--port N]` to query/start manually.
|
||||
- RPC send path is in-process; the relay does not spawn `clawdis` or rely on PATH.
|
||||
- Mac glue: `WebChatWindow.swift` (bootstrap + tunnel) and `WebChatTunnel` (SSH -L).
|
||||
|
||||
## TODO / nice-to-haves
|
||||
|
||||
Reference in New Issue
Block a user