Host Agent now persists step-level execution detail locally (via a real TaskMetadataStore/Timeline wired into TaskRunner) and reports a bounded in-progress snapshot piggybacked on lease renewal. Cloud persists that snapshot per active assignment and exposes it through the existing task list/detail query path; Cloud Console renders it as a live badge. Host Agent's local console gains authenticated, read-only task list and detail/timeline pages (same-origin, server-rendered) with inlined screenshots. Also fixes a pre-existing gap in the shared Timeline: the actual per-step LLM prompt is now recorded instead of the task goal, benefiting both Runtime and Host Agent consoles. When a host uses the cloud planner transport, each decide call's prompt and resulting tool decision are durably logged in a new planner_decision_log table (with bounded retention) and browsable from Cloud Console; direct-transport hosts explicitly surface a "not reported" state. Includes Alembic migrations 0008 (progress columns on scheduled_tasks) and 0009 (planner_decision_log), bounded Host-Agent-local retention, dual-backend repository parity, and Vitest + pytest coverage. Task 6.5 (manual end-to-end device verification) remains. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
ADDED Requirements
Requirement: Cloud Control Plane exposes the latest in-progress step status for an active assignment
The Cloud Control Plane's existing task query surface SHALL include the latest reported step index, step status, and summary for any assignment that has an in-progress Host Agent execution, alongside the task's existing status fields.
Scenario: An assignment has reported progress
- WHEN an operator queries a task that has an active, in-progress assignment with previously reported step progress
- THEN the response includes that step's index, status, and summary alongside the task's existing fields
Scenario: An assignment has no reported progress yet
- WHEN an operator queries a task whose active assignment has not yet reported any progress
- THEN the response omits progress fields rather than showing stale or default values
Scenario: An assignment has reached a terminal state
- WHEN an operator queries a task whose assignment has already completed (succeeded or failed)
- THEN the response does not present the last in-progress step as current status; the task's terminal status and result take precedence
Requirement: Cloud Console renders live step progress for in-progress tasks
Cloud Console SHALL display the current step index, status, and summary for a task with an active, in-progress Host Agent execution, refreshed on its existing polling interval, without requiring a new push channel.
Scenario: Operator views an in-progress task
- WHEN an operator opens a task detail view for a task with an active in-progress assignment
- THEN Cloud Console shows the latest known step index, status, and summary, updating on subsequent polls as new progress is reported
Scenario: Operator views a task with no in-progress execution
- WHEN an operator opens a task detail view for a queued, terminal, or otherwise not-currently-executing task
- THEN Cloud Console does not display stale in-progress step information
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 and resulting decision, sourced from the Cloud Control Plane's persisted planner decision log.
Scenario: Task has persisted planner decisions
- WHEN an operator opens the LLM interaction history view for a task that has one or more persisted planner decisions
- THEN Cloud Console shows each decision in step order with its prompt and resulting tool call
Scenario: Task's host used the direct-to-provider transport
- WHEN an operator opens the LLM interaction history view for a task whose host used the 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