Split internal/app/archied into daemon, statestore and gateway packages #338

Closed
opened 2026-10-27 13:35:54 +00:00 by sam · 0 comments
Owner

Each cmd binary links only its own service. Done when go list -deps shows archie-gateway without internal/daemon or internal/webui, and archie-state-store without NATS or the secrets registry; enforced through the import-boundary rules, not a new checker.

Notes

Done on main: 9f4a9e82 State Store in internal/app/statestore plus internal/app/servicekit; 6edb1cc9 gateway owns model work (daemon has no chat runtime, tools, memory or curators; gateway applies provider/model/tool settings live and runs curators). Remaining: move the gateway composition out of internal/app/archied. Blocker is the shared boot struct: config layering (runtimeConfig), control-plane watches (keepWatch), apply status, secret-engine runner, catalog, NATS endpoint discovery and health are boot methods both roots call. Extract those into servicekit first, then give the gateway its own struct like statestore.

Close reason

State Store (internal/app/statestore) and Gateway (internal/app/archiegateway) have their own packages; shared pieces in servicekit and chattask; archie-gateway links no daemon, webui or archied; depguard enforces it.


Imported from beads archie-core-lk50.1 · GitHub #1417 · type task · priority P1 · created 2026-10-03 · closed 2026-10-03

Each cmd binary links only its own service. Done when go list -deps shows archie-gateway without internal/daemon or internal/webui, and archie-state-store without NATS or the secrets registry; enforced through the import-boundary rules, not a new checker. ### Notes Done on main: 9f4a9e82 State Store in internal/app/statestore plus internal/app/servicekit; 6edb1cc9 gateway owns model work (daemon has no chat runtime, tools, memory or curators; gateway applies provider/model/tool settings live and runs curators). Remaining: move the gateway composition out of internal/app/archied. Blocker is the shared boot struct: config layering (runtimeConfig), control-plane watches (keepWatch), apply status, secret-engine runner, catalog, NATS endpoint discovery and health are boot methods both roots call. Extract those into servicekit first, then give the gateway its own struct like statestore. ### Close reason State Store (internal/app/statestore) and Gateway (internal/app/archiegateway) have their own packages; shared pieces in servicekit and chattask; archie-gateway links no daemon, webui or archied; depguard enforces it. --- _Imported from beads `archie-core-lk50.1` · GitHub #1417 · type task · priority P1 · created 2026-10-03 · closed 2026-10-03_
sam added the hightask labels 2026-10-27 13:35:54 +00:00
sam self-assigned this 2026-10-27 13:35:54 +00:00
sam closed this issue 2026-10-27 13:35:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#338