feat(gateway): delete in-process ChatContract path, make remote the only mode

archie-gateway is now the sole owner of ChatContract; the daemon always
dials it over gRPC for webui chat, no in-process fallback left. Telegram
and email keep their own in-process routers unchanged (their streaming
responder is a callback that can't cross the wire-safe contract).

- composeChatContract only accepts mode="remote"; config defaults
  Services.Gateway to remote + 127.0.0.1:8585 when unset
- deleted taskActionsActor (dead code once the local branch is gone)
- task dev now launches archie-gateway alongside archied + Vite

Verified end-to-end: archie-gateway + archied booted against a shared
NATS/store, webui's /api/chat/sessions round-tripped through the gRPC hop.
This commit is contained in:
sam committed 2026-09-06 02:07:02 +10:00
1 parent 10e76e7528
commit bec9caa24e
12 files changed
+108 -123

No files matched your search

+14 -7
View File
@@ -89,25 +89,32 @@ tasks:
- npm test
dev:
desc: "Develop: archied live-reload + Vite HMR together. Open http://localhost:5173"
desc: "Develop: archied live-reload + archie-gateway + Vite HMR together. Open http://localhost:5173"
summary: |
Runs both halves of the dev loop in one terminal:
Runs the dev loop in one terminal:
* air rebuilds and restarts archied on Go changes
* vite serves the dashboard with hot reload on :5173,
proxying /api and /events through to archied on :8484
* air rebuilds and restarts archied on Go changes
* archie-gateway serves ChatContract on 127.0.0.1:8585 (archied
dials it for chat; it does not embed a gateway)
* vite serves the dashboard with hot reload on :5173,
proxying /api and /events through to archied on :8484
Open http://localhost:5173 -- not :8484. The Vite server is the one with
hot reload; :8484 serves the last built dist/ and will look stale.
Ctrl-C stops both.
deps: [dev:daemon, dev:ui]
Ctrl-C stops all three.
deps: [dev:daemon, dev:gateway, dev:ui]
dev:daemon:
desc: archied only, live-reloading via air (prefer `task dev`)
cmds:
- air
dev:gateway:
desc: archie-gateway only, no live-reload (prefer `task dev`)
cmds:
- go run ./cmd/archie-gateway
dev:ui:
desc: Vite dev server only, expects archied already running (prefer `task dev`)
dir: ui