diff --git a/docs/00-architecture-overview.md b/docs/00-architecture-overview.md index 6faa71db..2042b820 100644 --- a/docs/00-architecture-overview.md +++ b/docs/00-architecture-overview.md @@ -38,6 +38,7 @@ flowchart TD SCHED[Scheduler -- 4 Lanes] AR[Agent Router] LOOP[Agent Loop -- Think / Act / Observe] + HOOKS[Hook Dispatcher -- Lifecycle Events] end subgraph Providers["LLM Providers"] @@ -143,6 +144,7 @@ flowchart TD | `internal/workspace/` | Workspace context resolver: 6 scenarios (agent default, team lead, team member, dispatch, subagent, cron) | | `internal/vault/` | Knowledge Vault: wikilinks (semantic mesh), hybrid search (BM25+vector), filesystem sync, L0 auto-injection | | `internal/channels/whatsapp/` | Native WhatsApp channel via whatsmeow (replaces WhatsApp API), QR auth, media handling | +| `internal/hooks/` | Agent lifecycle hooks: event dispatcher (sync/async), handlers (command/http/prompt), matchers (regex + CEL), audit logging, edition gating, cost safeguards | --- diff --git a/docs/06-store-data-model.md b/docs/06-store-data-model.md index e2d03547..4c31e78b 100644 --- a/docs/06-store-data-model.md +++ b/docs/06-store-data-model.md @@ -47,6 +47,7 @@ The `Stores` struct is the top-level container holding all PostgreSQL-backed sto | SnapshotStore | `PGSnapshotStore` | Hourly usage snapshots, cost aggregation, time series queries | | SecureCLIStore | `PGSecureCLIStore` | CLI binary configs with encrypted credential injection | | APIKeyStore | `PGAPIKeyStore` | Gateway API keys, scopes, expiration, revocation | +| HookStore | `PGHookStore` | Lifecycle hook definitions (event, handler type, matcher, config), execution audit log | ### SQLite Parity (Lite Edition) @@ -63,6 +64,7 @@ The `Stores` struct is the top-level container holding all PostgreSQL-backed sto | AgentLinksStore | `SQLiteAgentLinks` | LIKE search, no vector | | SubagentTasksStore | `SQLiteSubagentTasks` | ✓ Parity (json_set for metadata merge) | | SecureCLIStore | `SQLiteSecureCLIStore` | ✓ Parity + AES-256-GCM encryption mandatory (GOCLAW_KEY env var required) | +| HookStore | `SQLiteHookStore` | ✓ Parity (agent_hooks + hook_executions tables, same schema as PG) | --- diff --git a/docs/17-changelog.md b/docs/17-changelog.md index b5bbaccd..c84fb871 100644 --- a/docs/17-changelog.md +++ b/docs/17-changelog.md @@ -6,37 +6,47 @@ All notable changes to GoClaw Gateway are documented here. Format follows [Keep ## [Unreleased] — 2026-04-15 -#### ElevenLabs Audio Manager Refactor — Phase 6 (2026-04-15) +#### Agent Hooks System — Phase 1: Foundation (2026-04-15) -Desktop UI parity: voice picker + STT admin form ported from web to Wails desktop frontend. Completes 6-phase plan; all audio surfaces (TTS/STT/Music/SFX) now manageable from both web and desktop Lite editions. +Lifecycle hook infrastructure: event dispatcher (sync/async paths), audit logging, database schema (PostgreSQL + SQLite), store interface, config validation, edition gating. Handlers + pipeline integration deferred to Phase 2. ### Added -- **Desktop voice picker**: `ui/desktop/frontend/src/components/agents/voice-picker.tsx` — uses desktop's native Combobox primitive; embedded in `AgentDetailPanel` with `other_config.tts_voice_id` persistence via spread-merge pattern -- **Desktop voice preview button**: `ui/desktop/frontend/src/components/agents/voice-preview-button.tsx` — singleton `