Private
Public Access
Track: Complete Phase 1 of ai_client documentation
Updates plan.md and state.toml to mark Phase 1 tasks (core loops and public entry points documentation) as completed.
This commit is contained in:
@@ -19,17 +19,17 @@
|
||||
# Phase 1: Core Dispatch Loop & Public APIs
|
||||
|
||||
## Task 1.1: Document Public Entry Points & Dispatch Loops
|
||||
- [ ] **Step 1: Document `send_result` (ai_client.py:2645-2730)**
|
||||
- [x] **Step 1: Document `send_result` (ai_client.py:2645-2730)**
|
||||
Add docstring detailing functional purpose, parameters, return type, thread-local storage setup, and error handling. SSDL trace: `[Q:active_provider] -> [I:SetupTierTag] -> [I:DispatchProvider] -> [T:Result]`.
|
||||
- [ ] **Step 2: Document `send` (ai_client.py:2617-2643)**
|
||||
- [x] **Step 2: Document `send` (ai_client.py:2617-2643)**
|
||||
Mark as deprecated, explain callback mapping and Result extraction. SSDL trace: `[I:send_result] -> [T:text]`.
|
||||
- [ ] **Step 3: Document `run_with_tool_loop` (ai_client.py:714-784)**
|
||||
- [x] **Step 3: Document `run_with_tool_loop` (ai_client.py:714-784)**
|
||||
Document the core execution loop and tool dispatch mechanics. SSDL trace: `o-> [I:dispatch_send] -> [B:tool_calls?] => [I:_execute_tool_calls_concurrently] -> [T:response_text]`.
|
||||
- [ ] **Step 4: Document `_execute_tool_calls_concurrently` (ai_client.py:664-712)**
|
||||
- [x] **Step 4: Document `_execute_tool_calls_concurrently` (ai_client.py:664-712)**
|
||||
Document the asynchronous gather and execution flow. SSDL trace: `[I:gather] => o-> [I:_execute_single_tool_call_async] -> [M] -> [T:tool_results]`.
|
||||
- [ ] **Step 5: Document `_execute_single_tool_call_async` (ai_client.py:786-846)**
|
||||
- [x] **Step 5: Document `_execute_single_tool_call_async` (ai_client.py:786-846)**
|
||||
Document execution sandboxing, clutch authorization, and callback handling. SSDL trace: `[I:CheckClutch] -> [B:Approved?] -> [I:run_powershell] -> [T:output]`.
|
||||
- [ ] **Step 6: Verify syntax and run tests**
|
||||
- [x] **Step 6: Verify syntax and run tests**
|
||||
Run: `pytest tests/test_ai_client_tool_loop.py tests/test_ai_client_result.py`
|
||||
Expected: Success.
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
# Phase 2: Primary Provider Senders
|
||||
|
||||
## Task 2.1: Document Primary Provider Senders
|
||||
- [ ] **Step 1: Document `_send_anthropic` (ai_client.py:1188-1364)**
|
||||
- [~] **Step 1: Document `_send_anthropic` (ai_client.py:1188-1364)**
|
||||
Add docstring detailing cache control breakpoints, history pruning, and token tracking. SSDL trace: `[I:_ensure_anthropic_client] -> [I:_trim_anthropic_history] -> [I:client.messages.create] -> [T:Result]`.
|
||||
- [ ] **Step 2: Document `_send_gemini` (ai_client.py:1431-1665)**
|
||||
Document caching states, explicit server-side cache invalidation, and chat session creation. SSDL trace: `[I:_ensure_gemini_client] -> [B:Cache Changed?] -> [I:client.caches.create] -> [I:client.chats.create] -> [T:Result]`.
|
||||
|
||||
Reference in New Issue
Block a user