Tests / Test failed: 2, passed: 849
- ToolCallDecision captures thinking blocks and pre-tool text output
- AnthropicToolCallingClient supports optional extended thinking (budget_tokens + beta header)
- PlannedStep carries rationale and thinking from each LLM decision
- WorldEvent replaces scene_summary with rationale/thinking/page fields (backward-compatible)
- AI planner system prompt instructs reflection before each tool call
- _history_summary() emits compact {page, rationale, action, success} dicts
- Cloud DB migration 0011 adds nullable rationale/thinking columns to planner_decision_log
- OpenAI client extracts reasoning_content into thinking field
3.1 KiB
3.1 KiB
MODIFIED Requirements
Requirement: Cloud Console displays a task's full LLM interaction history
Cloud Console SHALL provide a view, for a given task, listing each persisted planner decision in step order, including its full prompt, resulting decision, and — when available — the AI's rationale (pre-tool text reflection) and thinking (extended thinking block), sourced from the Cloud Control Plane's persisted planner-decision log.
Scenario: Task has persisted planner decisions with rationale
- WHEN an operator opens the LLM interaction history view for a task that has one or more persisted planner decisions with non-null rationale
- THEN Cloud Console shows each decision in step order with its prompt, resulting tool call, and rationale text
Scenario: Task has persisted planner decisions with thinking
- WHEN an operator opens the LLM interaction history view for a task whose planner decisions include a non-null thinking field
- THEN Cloud Console shows the thinking content alongside the prompt and tool call for that step
Scenario: Task has persisted planner decisions without rationale or thinking
- WHEN an operator opens the LLM interaction history view for a task whose decisions have null rationale and null thinking
- THEN Cloud Console shows each decision without those fields, without error or placeholder text
Scenario: Task's Host used direct-to-provider transport
- WHEN an operator opens the LLM interaction history view for a task whose Host used direct-to-provider transport
- THEN Cloud Console indicates that no LLM interaction history is available because the Host does not report it, rather than showing an empty history with no explanation
Requirement: Cloud Control Plane persists rationale and thinking in the planner decision log
The Cloud Control Plane's planner-decision log SHALL store the AI's rationale and thinking fields alongside the existing prompt and tool-call fields for each persisted decision. Both fields SHALL be nullable; absence of either field SHALL NOT prevent a decision record from being stored or queried.
Scenario: Decision record includes rationale
- WHEN the Host Agent reports a planner decision with a non-null rationale
- THEN the persisted
planner_decision_logrow stores that rationale text in therationalecolumn
Scenario: Decision record includes thinking
- WHEN the Host Agent reports a planner decision with a non-null thinking block
- THEN the persisted
planner_decision_logrow stores that thinking text in thethinkingcolumn
Scenario: Decision record has no rationale or thinking
- WHEN the Host Agent reports a planner decision with null rationale and null thinking (e.g., cloud-proxy transport where these are not surfaced)
- THEN the persisted row stores NULL for both columns without error
Scenario: Existing decision records without rationale or thinking remain readable
- WHEN the system queries a
planner_decision_logrow created before this migration - THEN both
rationaleandthinkingread as NULL, and the row is returned normally