agent/pkg
Snider 4684ae725a feat(agent): go-store backing for dispatch state per RFC §15
Introduce an optional go-store persistence layer for the three state
groups described in RFC §15.3 — queue, concurrency, registry — plus
runtime_state and dispatch_history used by the sync pipeline.

- statestore.go lazily opens `.core/db.duckdb` via go-store when
  available; nil-safe helpers return cleanly so in-memory/file-based
  fallbacks survive when the store cannot open (graceful degradation,
  RFC §15.6)
- prep.go tracks the store reference on the subsystem and closes it on
  shutdown; hydrateWorkspaces now consults the registry group before
  the filesystem scan so ghost agents are marked failed across
  restarts, and TrackWorkspace mirrors updates back into the cache
- runtime_state.go persists backoff + fail-count snapshots into the
  go-store runtime group so dispatch backoff survives restarts even
  when the JSON file rotates
- commit.go writes the completed dispatch record into dispatch_history
  for RFC §16.3 sync push to drain without rescanning workspaces
- statestore_test.go covers lazy-once init, restore/delete round trip,
  ghost-agent failure marking, and runtime-state replay across
  subsystem instances

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 12:17:08 +01:00
..
agentic feat(agent): go-store backing for dispatch state per RFC §15 2026-04-14 12:17:08 +01:00
brain feat(agent): unblock factory dispatch, runtime-aware containers, RFC gaps 2026-04-14 11:45:09 +01:00
lib refactor: AX compliance sweep — replace banned stdlib imports with core primitives 2026-04-13 09:32:00 +01:00
messages feat(agent): implement fleet and sync RFC surfaces 2026-03-31 07:27:15 +00:00
monitor refactor: AX compliance sweep — replace banned stdlib imports with core primitives 2026-04-13 09:32:00 +01:00
runner feat(agent): unblock factory dispatch, runtime-aware containers, RFC gaps 2026-04-14 11:45:09 +01:00
setup refactor(setup-monitor): align service option names with RFC 2026-04-02 08:13:16 +00:00
.DS_Store refactor: AX compliance sweep — replace banned stdlib imports with core primitives 2026-04-13 09:32:00 +01:00