docs: document pi_embedded canary path and update state
This commit is contained in:
@@ -36,6 +36,7 @@ The gateway serialises agent work **per session**, not per WebSocket connection:
|
||||
- Requests for different sessions can run in parallel.
|
||||
- Lane policy is configurable (`collect`, `followup`, `steer`, `steer_backlog`, `interrupt`) with per-channel and per-session overrides.
|
||||
- Session-local overrides can be managed at runtime via `agent.send` commands: `/queue`, `/queue set ...`, `/queue reset`.
|
||||
- Backend selection for a turn is server-side (`native` by default, optional external backends per config: `claude_code`, `opencode`, `codex`, `gemini`, `pi_embedded`) and does not change JSON-RPC method signatures.
|
||||
|
||||
This is implemented via a per-lane queue (`LaneQueue`) in the gateway server, and used by `agent.send` and `agent.cancel`.
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ flowchart LR
|
||||
SM[SessionManager\nSQLite]
|
||||
OR[AgentOrchestrator]
|
||||
NA[NativeAgent\n(tool loop)]
|
||||
EB[Optional External Backends\nclaude_code/opencode/codex/gemini/pi_embedded]
|
||||
MR[ModelRouter]
|
||||
TP[ToolPolicy + ToolRegistry]
|
||||
TE[ToolExecutor\nhooks + enforcement + audit]
|
||||
@@ -60,7 +61,9 @@ flowchart LR
|
||||
CA --> RT
|
||||
RT --> SM
|
||||
RT --> OR
|
||||
RT --> EB
|
||||
OR --> NA
|
||||
EB --> MP
|
||||
NA --> MR
|
||||
MR --> MP
|
||||
|
||||
@@ -107,6 +110,9 @@ ChannelAdapter -> ChannelRegistry
|
||||
| v
|
||||
| ModelClient
|
||||
|
|
||||
+----> (optional, non-tool turns) ExternalBackend
|
||||
(claude_code/opencode/codex/gemini/pi_embedded)
|
||||
|
|
||||
+----> (optional) PairingManager gate for unknown senders
|
||||
|
||||
Tool Calls (inside NativeAgent loop)
|
||||
@@ -130,6 +136,7 @@ Key files:
|
||||
- Routing + per-session agent creation: `src/daemon/routing.ts`
|
||||
- Orchestration: `src/backends/native/orchestrator.ts`
|
||||
- Tool loop: `src/backends/native/agent.ts`
|
||||
- External backend adapters: `src/backends/external.ts`, `src/backends/piEmbedded.ts`
|
||||
- Model routing: `src/models/router.ts`
|
||||
- Tool policy + execution: `src/tools/policy.ts`, `src/tools/executor.ts`
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ If you only want the protocol surface, see `docs/api/PROTOCOL.md`.
|
||||
- Each connection is attached to a `sessionId`.
|
||||
- Agent work is queued per `sessionId` (FIFO), not per connection.
|
||||
- Sessions persist in SQLite via `SessionManager` even if clients disconnect.
|
||||
- Once dequeued, message routing may execute the native orchestrator path or an optional external backend path (`claude_code`, `opencode`, `codex`, `gemini`, `pi_embedded`) depending on agent/backend config.
|
||||
|
||||
## Component Map
|
||||
|
||||
@@ -30,7 +31,7 @@ flowchart LR
|
||||
subgraph CORE[Flynn Core]
|
||||
SM[SessionManager\nin-memory cache + SQLite]
|
||||
SS[SessionStore\nSQLite tables]
|
||||
AO[AgentOrchestrator]
|
||||
AO[AgentOrchestrator / External Backends]
|
||||
end
|
||||
|
||||
WS --> GS
|
||||
|
||||
+30
-2
@@ -3,6 +3,33 @@
|
||||
"updated_at": "2026-02-24",
|
||||
"description": "Tracks the status of all Flynn plans and implementation phases",
|
||||
"plans": {
|
||||
"pi-embedded-backend-canary-spike": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-24",
|
||||
"updated": "2026-02-24",
|
||||
"summary": "Implemented a Pi embedded canary spike with a new optional `pi_embedded` backend, guarded no-tools canary routing, backend success/fallback latency telemetry in audit logs, focused backend/schema/routing tests, and architecture/protocol documentation updates while keeping native orchestration as the default path.",
|
||||
"files_modified": [
|
||||
"src/backends/piEmbedded.ts",
|
||||
"src/backends/piEmbedded.test.ts",
|
||||
"src/backends/external.ts",
|
||||
"src/backends/index.ts",
|
||||
"src/daemon/index.ts",
|
||||
"src/daemon/routing.ts",
|
||||
"src/daemon/routing.test.ts",
|
||||
"src/config/schema.ts",
|
||||
"src/config/schema.test.ts",
|
||||
"src/agents/registry.ts",
|
||||
"src/audit/types.ts",
|
||||
"src/audit/logger.ts",
|
||||
"config/default.yaml",
|
||||
"README.md",
|
||||
"docs/architecture/AGENT_DIAGRAM.md",
|
||||
"docs/architecture/GATEWAY_SESSIONS_AND_QUEUE.md",
|
||||
"docs/api/PROTOCOL.md",
|
||||
"docs/plans/state.json"
|
||||
],
|
||||
"test_status": "pnpm test:run src/backends/piEmbedded.test.ts src/config/schema.test.ts src/daemon/routing.test.ts + pnpm typecheck + pnpm lint (warnings only) passing"
|
||||
},
|
||||
"full-audit-hardening-and-config-consolidation": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-24",
|
||||
@@ -6403,7 +6430,7 @@
|
||||
}
|
||||
},
|
||||
"overall_progress": {
|
||||
"total_test_count": 1982,
|
||||
"total_test_count": 1989,
|
||||
"all_tests_passing": true,
|
||||
"p0_completion": "3/3 (100%)",
|
||||
"p1_completion": "4/4 (100%)",
|
||||
@@ -6433,7 +6460,8 @@
|
||||
"model_router_correctness": "completed — fallback paths now avoid duplicate clients, apply retry policy consistently, and reject unsupported OpenAI OAuth tool requests early",
|
||||
"native_audio_support": "completed — smart routing for native audio (Gemini/OpenAI/GitHub) vs Whisper transcription fallback, plus 2026-02-23 arg hydration hardening, tool.args_rewritten audit metric, transient fetch retry/timeout hardening, localhost->127.0.0.1 fallback for transcription endpoint connectivity, and whisper docker-compose entrypoint arg fix for port 18801",
|
||||
"remaining_phases_completion": "Phase 1: 3/3 (100%) — context levels, command registry, memory structure. Phase 2: 3/3 (100%) — component registry, confidence routing, history index. Phase 3: 2/2 (100%) — adaptive memory/compaction, truthfulness/autonomy hardening",
|
||||
"next_up": "Track OpenClaw evolution regularly for inspiration and feature ideas"
|
||||
"next_up": "Track OpenClaw evolution regularly for inspiration and feature ideas",
|
||||
"pi_embedded_canary_spike": "completed — added optional pi_embedded backend adapter, canary-safe no-tools routing guard, backend success/fallback latency audit events, and docs/diagram updates while native remains default"
|
||||
},
|
||||
"soul_md_and_cron_create": {
|
||||
"date": "2026-02-11",
|
||||
|
||||
Reference in New Issue
Block a user