docs: update pairing docs with SQLite persistence and TUI execution details

This commit is contained in:
William Valentin
2026-02-09 22:09:30 -08:00
parent 99b7e743f4
commit bab3f26ef6
5 changed files with 14 additions and 11 deletions
+4 -5
View File
@@ -43,11 +43,10 @@
- Impact: Users cannot cancel long-running agent tasks. The "cancel" API endpoint exists but is a no-op beyond setting a flag. This affects gateway/TUI UX.
- Fix approach: Pass an `AbortSignal` into `NativeAgent.run()`. Check `signal.aborted` between loop iterations and before each tool execution. Propagate signal to model client `chat()` calls.
**PairingManager State is Ephemeral:**
- Issue: `PairingManager` stores approved senders and pending codes in memory-only Maps (`src/channels/pairing.ts:36-37`). All pairing state is lost on daemon restart.
- Files: `src/channels/pairing.ts:36-37`
- Impact: After restart, all previously paired senders must re-pair. In production, this means users lose access on every deployment or crash.
- Fix approach: Persist approved senders to SQLite (alongside sessions). Pending codes can remain in-memory since they're short-lived by design.
**PairingManager State is Ephemeral:** *RESOLVED*
- Resolution: `PairingStore` interface added to `PairingManager` with SQLite implementation via `SessionStore.getPairingStore()`. Approved senders are persisted in the `pairing_approved` table and survive daemon restarts. Pending codes remain in-memory (short-lived by design).
- Commits: `1e1a689`, `ecd3aca`, `62331c3`
- Files: `src/channels/pairing.ts`, `src/session/store.ts`, `src/daemon/services.ts`, `src/daemon/index.ts`
**Hardcoded Anthropic → GitHub Model Mapping:**
- Issue: `anthropicToGitHubModel()` contains a hardcoded mapping table that must be manually updated for each new Anthropic model release. A generic fallback regex exists but only handles the date-suffix stripping pattern.