docs: update pairing docs with SQLite persistence and TUI execution details
This commit is contained in:
@@ -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.
|
- 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.
|
- 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:**
|
**PairingManager State is Ephemeral:** *RESOLVED*
|
||||||
- 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.
|
- 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).
|
||||||
- Files: `src/channels/pairing.ts:36-37`
|
- Commits: `1e1a689`, `ecd3aca`, `62331c3`
|
||||||
- Impact: After restart, all previously paired senders must re-pair. In production, this means users lose access on every deployment or crash.
|
- Files: `src/channels/pairing.ts`, `src/session/store.ts`, `src/daemon/services.ts`, `src/daemon/index.ts`
|
||||||
- Fix approach: Persist approved senders to SQLite (alongside sessions). Pending codes can remain in-memory since they're short-lived by design.
|
|
||||||
|
|
||||||
**Hardcoded Anthropic → GitHub Model Mapping:**
|
**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.
|
- 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.
|
||||||
|
|||||||
@@ -161,10 +161,12 @@ All adapters implement `ChannelAdapter` interface (`src/channels/types.ts`): `co
|
|||||||
- Gateway lock: Single-client WebSocket mode (`server.lock`)
|
- Gateway lock: Single-client WebSocket mode (`server.lock`)
|
||||||
|
|
||||||
**DM Pairing Codes:**
|
**DM Pairing Codes:**
|
||||||
- Implementation: `src/channels/pairing.ts`
|
- Implementation: `src/channels/pairing.ts`, `src/session/store.ts` (SQLite persistence)
|
||||||
- Purpose: Authenticate unknown senders via one-time codes
|
- Purpose: Authenticate unknown senders via one-time codes
|
||||||
- Config: `pairing.enabled`, `pairing.code_ttl` (default 5m), `pairing.code_length` (default 6)
|
- Config: `pairing.enabled`, `pairing.code_ttl` (default 5m), `pairing.code_length` (default 6)
|
||||||
- Gateway handlers for code generation/verification
|
- Gateway handlers for code generation/verification
|
||||||
|
- TUI `/pair` command execution (generate/list/revoke) in `src/frontends/tui/minimal.ts`
|
||||||
|
- Persistence: `PairingStore` interface with SQLite `pairing_approved` table -- approved senders survive daemon restarts
|
||||||
|
|
||||||
**Gmail OAuth2:**
|
**Gmail OAuth2:**
|
||||||
- SDK: `googleapis` (`src/automation/gmail.ts`)
|
- SDK: `googleapis` (`src/automation/gmail.ts`)
|
||||||
|
|||||||
+4
-2
@@ -33,8 +33,10 @@ All notable changes to Flynn are documented in this file.
|
|||||||
- **DM Pairing Codes** -- PairingManager with time-limited codes for
|
- **DM Pairing Codes** -- PairingManager with time-limited codes for
|
||||||
authenticating unknown DM senders. Integrated into all 4 channel adapters
|
authenticating unknown DM senders. Integrated into all 4 channel adapters
|
||||||
(Telegram, Discord, Slack, WhatsApp). Gateway handlers (`pairing.generate`,
|
(Telegram, Discord, Slack, WhatsApp). Gateway handlers (`pairing.generate`,
|
||||||
`pairing.list`, `pairing.revoke`). TUI `/pair` command. Configurable TTL
|
`pairing.list`, `pairing.revoke`). TUI `/pair` command with generate/list/revoke
|
||||||
and code length. 22 tests.
|
subcommands wired through PairingManager. SQLite persistence via `PairingStore`
|
||||||
|
interface -- approved senders survive daemon restarts. Configurable TTL and code
|
||||||
|
length. 35 tests.
|
||||||
- **Zhipu AI (GLM) Provider** -- Support for Zhipu AI's GLM models (glm-4.5, glm-4.7, etc.)
|
- **Zhipu AI (GLM) Provider** -- Support for Zhipu AI's GLM models (glm-4.5, glm-4.7, etc.)
|
||||||
via their OpenAI-compatible API at `https://api.z.ai/api/paas/v4`. Uses `provider: zhipuai`
|
via their OpenAI-compatible API at `https://api.z.ai/api/paas/v4`. Uses `provider: zhipuai`
|
||||||
in config with `api_key` or `ZHIPUAI_API_KEY` env var.
|
in config with `api_key` or `ZHIPUAI_API_KEY` env var.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Self-hosted personal AI assistant with Telegram and Terminal interfaces.
|
|||||||
- **Skills System**: Extensible capability packages (bundled, managed, workspace tiers)
|
- **Skills System**: Extensible capability packages (bundled, managed, workspace tiers)
|
||||||
- **Gateway Lock**: Single-client mode — reject additional WebSocket connections when one is active
|
- **Gateway Lock**: Single-client mode — reject additional WebSocket connections when one is active
|
||||||
- **Tailscale Serve**: Auto-expose gateway via Tailscale Serve on daemon start with lifecycle management
|
- **Tailscale Serve**: Auto-expose gateway via Tailscale Serve on daemon start with lifecycle management
|
||||||
- **DM Pairing Codes**: Allow unknown senders to pair with the bot via time-limited codes across all channels
|
- **DM Pairing Codes**: Allow unknown senders to pair with the bot via time-limited codes across all channels, with SQLite-backed persistence across restarts
|
||||||
- **Lane Queue**: Per-session FIFO queue serializes concurrent gateway requests
|
- **Lane Queue**: Per-session FIFO queue serializes concurrent gateway requests
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
@@ -505,7 +505,7 @@ pairing:
|
|||||||
1. Generate a code via the TUI (`/pair generate`), gateway API (`pairing.generate`), or web dashboard
|
1. Generate a code via the TUI (`/pair generate`), gateway API (`pairing.generate`), or web dashboard
|
||||||
2. Share the code with the user
|
2. Share the code with the user
|
||||||
3. The user sends the code as their first DM to the bot
|
3. The user sends the code as their first DM to the bot
|
||||||
4. If valid, the user's sender ID is permanently approved for that channel
|
4. If valid, the user's sender ID is permanently approved for that channel (persisted in SQLite, survives daemon restarts)
|
||||||
5. Approved users can be listed (`/pair list`) and revoked (`/pair revoke <channel> <id>`)
|
5. Approved users can be listed (`/pair list`) and revoked (`/pair revoke <channel> <id>`)
|
||||||
|
|
||||||
### TUI Commands
|
### TUI Commands
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ Flynn actually has MCP support that OpenClaw doesn't emphasise — OpenClaw reli
|
|||||||
|---------|----------|-------|--------|
|
|---------|----------|-------|--------|
|
||||||
| Tool confirmation hooks | Full | Full (confirm/log/silent patterns) | **MATCH** |
|
| Tool confirmation hooks | Full | Full (confirm/log/silent patterns) | **MATCH** |
|
||||||
| Chat ID allowlists | Per-channel | Full (Telegram, Discord, Slack, WhatsApp all have allowlists) | **MATCH** |
|
| Chat ID allowlists | Per-channel | Full (Telegram, Discord, Slack, WhatsApp all have allowlists) | **MATCH** |
|
||||||
| DM pairing (unknown senders) | Full (pairing codes) | Full (PairingManager with TTL codes, channel adapter integration, gateway handlers, TUI /pair command) | **MATCH** |
|
| DM pairing (unknown senders) | Full (pairing codes) | Full (PairingManager with TTL codes, SQLite persistence, channel adapter integration, gateway handlers, TUI /pair command) | **MATCH** |
|
||||||
| Credential redaction | Config responses redacted (v2026.2.6) | Full (18+ secret fields redacted from config API) | **MATCH** |
|
| Credential redaction | Config responses redacted (v2026.2.6) | Full (18+ secret fields redacted from config API) | **MATCH** |
|
||||||
| Skill/plugin code safety scanner | Static analysis (v2026.2.6) | -- | **MISSING** |
|
| Skill/plugin code safety scanner | Static analysis (v2026.2.6) | -- | **MISSING** |
|
||||||
| Docker sandboxing | Full (per-session/agent/shared) | Full (per-agent sandbox via SandboxManager + Docker) | **MATCH** |
|
| Docker sandboxing | Full (per-session/agent/shared) | Full (per-agent sandbox via SandboxManager + Docker) | **MATCH** |
|
||||||
|
|||||||
Reference in New Issue
Block a user