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
|
# Phase 1: Core Dispatch Loop & Public APIs
|
||||||
|
|
||||||
## Task 1.1: Document Public Entry Points & Dispatch Loops
|
## 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]`.
|
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]`.
|
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]`.
|
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]`.
|
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]`.
|
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`
|
Run: `pytest tests/test_ai_client_tool_loop.py tests/test_ai_client_result.py`
|
||||||
Expected: Success.
|
Expected: Success.
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
# Phase 2: Primary Provider Senders
|
# Phase 2: Primary Provider Senders
|
||||||
|
|
||||||
## Task 2.1: Document 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]`.
|
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)**
|
- [ ] **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]`.
|
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]`.
|
||||||
|
|||||||
@@ -5,22 +5,22 @@
|
|||||||
track_id = "ai_client_docs_20260613"
|
track_id = "ai_client_docs_20260613"
|
||||||
name = "SQLite-Granularity Inline Docs for ai_client.py"
|
name = "SQLite-Granularity Inline Docs for ai_client.py"
|
||||||
status = "ready"
|
status = "ready"
|
||||||
current_phase = 1
|
current_phase = 2
|
||||||
last_updated = "2026-06-13"
|
last_updated = "2026-06-13"
|
||||||
|
|
||||||
[blocked_by]
|
[blocked_by]
|
||||||
|
|
||||||
[phases]
|
[phases]
|
||||||
phase_1 = { status = "ready", checkpoint_sha = "", name = "Core Dispatch Loop & Public APIs" }
|
phase_1 = { status = "completed", checkpoint_sha = "", name = "Core Dispatch Loop & Public APIs" }
|
||||||
phase_2 = { status = "pending", checkpoint_sha = "", name = "Primary Provider Senders" }
|
phase_2 = { status = "ready", checkpoint_sha = "", name = "Primary Provider Senders" }
|
||||||
phase_3 = { status = "pending", checkpoint_sha = "", name = "Secondary Provider Senders & Helpers" }
|
phase_3 = { status = "pending", checkpoint_sha = "", name = "Secondary Provider Senders & Helpers" }
|
||||||
|
|
||||||
[tasks]
|
[tasks]
|
||||||
# Phase 1: Core Dispatch Loop & Public APIs
|
# Phase 1: Core Dispatch Loop & Public APIs
|
||||||
t1_1 = { status = "pending", commit_sha = "", description = "Document Public Entry Points & Dispatch Loops (send_result, send, run_with_tool_loop, _execute_tool_calls_concurrently, _execute_single_tool_call_async)" }
|
t1_1 = { status = "completed", commit_sha = "", description = "Document Public Entry Points & Dispatch Loops (send_result, send, run_with_tool_loop, _execute_tool_calls_concurrently, _execute_single_tool_call_async)" }
|
||||||
|
|
||||||
# Phase 2: Primary Provider Senders
|
# Phase 2: Primary Provider Senders
|
||||||
t2_1 = { status = "pending", commit_sha = "", description = "Document Primary Provider Senders (_send_anthropic, _send_gemini, _send_gemini_cli, _send_deepseek)" }
|
t2_1 = { status = "in_progress", commit_sha = "", description = "Document Primary Provider Senders (_send_anthropic, _send_gemini, _send_gemini_cli, _send_deepseek)" }
|
||||||
|
|
||||||
# Phase 3: Secondary Provider Senders & Helpers
|
# Phase 3: Secondary Provider Senders & Helpers
|
||||||
t3_1 = { status = "pending", commit_sha = "", description = "Document Secondary Senders & Context Helpers (_send_minimax, _send_grok, _send_qwen, _send_llama, _send_llama_native, _reread_file_items, _build_file_diff_text)" }
|
t3_1 = { status = "pending", commit_sha = "", description = "Document Secondary Senders & Context Helpers (_send_minimax, _send_grok, _send_qwen, _send_llama, _send_llama_native, _reread_file_items, _build_file_diff_text)" }
|
||||||
|
|||||||
Reference in New Issue
Block a user