docs: update CLAUDE.md, deployment, and conversations docs
CLAUDE.md: updated source layout with orchestrator, grpc, code_index, breadcrumbs modules. Deployment: added gRPC service, startup flowchart, new secrets and troubleshooting. Conversations: updated lifecycle to show orchestrator path and gRPC session keys.
This commit is contained in:
@@ -8,7 +8,7 @@ The Conversations API path provides persistent, server-side conversation state p
|
||||
sequenceDiagram
|
||||
participant M as Matrix Sync
|
||||
participant E as Evaluator
|
||||
participant R as Responder
|
||||
participant O as Orchestrator
|
||||
participant CR as ConversationRegistry
|
||||
participant API as Mistral Conversations API
|
||||
participant T as ToolRegistry
|
||||
@@ -17,14 +17,14 @@ sequenceDiagram
|
||||
M->>E: message event
|
||||
E-->>M: MustRespond/MaybeRespond
|
||||
|
||||
M->>R: generate_response_conversations()
|
||||
R->>CR: send_message(room_id, input, is_dm)
|
||||
M->>O: GenerateRequest
|
||||
O->>CR: send_message(conversation_key, input, is_dm)
|
||||
|
||||
alt new room (no conversation)
|
||||
alt new conversation
|
||||
CR->>API: create_conversation(agent_id?, model, input)
|
||||
API-->>CR: ConversationResponse + conversation_id
|
||||
CR->>DB: upsert_conversation(room_id, conv_id, tokens)
|
||||
else existing room
|
||||
else existing conversation
|
||||
CR->>API: append_conversation(conv_id, input)
|
||||
API-->>CR: ConversationResponse
|
||||
CR->>DB: update_tokens(room_id, new_total)
|
||||
@@ -32,20 +32,20 @@ sequenceDiagram
|
||||
|
||||
alt response contains function_calls
|
||||
loop up to max_tool_iterations (5)
|
||||
R->>T: execute(name, args)
|
||||
T-->>R: result string
|
||||
R->>CR: send_function_result(room_id, entries)
|
||||
O->>T: execute(name, args)
|
||||
T-->>O: result string
|
||||
O->>CR: send_function_result(room_id, entries)
|
||||
CR->>API: append_conversation(conv_id, FunctionResult entries)
|
||||
API-->>CR: ConversationResponse
|
||||
alt more function_calls
|
||||
Note over R: continue loop
|
||||
Note over O: continue loop
|
||||
else text response
|
||||
Note over R: break
|
||||
Note over O: break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
R-->>M: response text (or None)
|
||||
O-->>M: response text (or None)
|
||||
M->>M: send to Matrix room
|
||||
M->>M: fire-and-forget memory extraction
|
||||
```
|
||||
@@ -59,6 +59,8 @@ Each Matrix room maps to exactly one Mistral conversation:
|
||||
|
||||
The mapping is stored in `ConversationRegistry.mapping` (HashMap in-memory, backed by SQLite `conversations` table).
|
||||
|
||||
For gRPC coding sessions, the conversation key is the project path + branch, creating a dedicated conversation per coding context.
|
||||
|
||||
## ConversationState
|
||||
|
||||
```rust
|
||||
@@ -101,7 +103,7 @@ This means conversation history is lost on compaction. The archive still has the
|
||||
|
||||
### startup recovery
|
||||
|
||||
On initialization, `ConversationRegistry::new()` calls `store.load_all_conversations()` to restore all room→conversation mappings from SQLite. This means conversations survive pod restarts.
|
||||
On initialization, `ConversationRegistry::new()` calls `store.load_all_conversations()` to restore all room-to-conversation mappings from SQLite. This means conversations survive pod restarts.
|
||||
|
||||
### SQLite schema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user