P4: contrib/store — persona SQLite store (JSON-blob round-trip)

db.Personas() satisfies persona.Storage over SQLite. Each Agent is stored as a
JSON blob with extracted indexed columns (owner_id, name, webhook_secret,
chatbot_channel_filter, schedule, next_run_at) — so the WHOLE struct round-trips
(no domain<->GORM<->DB field-loss footgun) while the lookups stay indexable.

Test proves the round-trip preserves nested + map fields (SkillPalette,
StateReactEmoji), the owner/name + webhook + chatbot-filter queries, the
scheduled-due query, and MarkAgentScheduledRun clearing the due window.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 22:46:09 -04:00
parent 95f564ac4e
commit cb16008b14
5 changed files with 245 additions and 2 deletions
+3 -2
View File
@@ -76,8 +76,9 @@ BATTERIES (opt-in siblings, each nil-safe + a default):
BudgetStorage iface + Memory default
contrib/store/ SECOND module (+ modernc.org/sqlite): [P4 ~]
pure-Go SQLite impls of the *Store seams. budget
(conformance-tested); persona/skill/audit pending.
pure-Go SQLite impls of the *Store seams. budget +
persona ✓ (JSON-blob+indexed cols, round-trip tested);
skill/audit pending.
CI proves the driver lands HERE, not in the core go.sum.
```