Expose authoritative hosted Claude background task snapshot
This commit is contained in:
@@ -68,6 +68,19 @@ type Pending struct {
|
|||||||
Offset int64 `json:"offset"`
|
Offset int64 `json:"offset"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Task is a native background tool still owned by the hosted CLI. It is kept
|
||||||
|
// separately from the bounded output spool, so trimming old output cannot erase
|
||||||
|
// the identity needed by a reattaching server. Missing metadata stays absent.
|
||||||
|
type Task struct {
|
||||||
|
ToolUseID string `json:"tool_use_id,omitempty"`
|
||||||
|
TaskID string `json:"task_id,omitempty"`
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
TaskType string `json:"task_type,omitempty"`
|
||||||
|
Command string `json:"command,omitempty"`
|
||||||
|
Timestamp string `json:"timestamp,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// Status is the host's snapshot of its CLI.
|
// Status is the host's snapshot of its CLI.
|
||||||
type Status struct {
|
type Status struct {
|
||||||
Version int `json:"version"`
|
Version int `json:"version"`
|
||||||
@@ -84,6 +97,10 @@ type Status struct {
|
|||||||
// live processing resumes.
|
// live processing resumes.
|
||||||
Busy bool `json:"busy"`
|
Busy bool `json:"busy"`
|
||||||
BusyAtAcked bool `json:"busy_at_acked"`
|
BusyAtAcked bool `json:"busy_at_acked"`
|
||||||
|
// Tasks is the authoritative running background set at End. Nil means an
|
||||||
|
// older host did not report this capability; a nonnil empty list means it
|
||||||
|
// knows that no background tasks remain. Reconcile after replay reaches End.
|
||||||
|
Tasks *[]Task `json:"tasks,omitempty"`
|
||||||
// Init is the CLI's initialize response (models, account), so a
|
// Init is the CLI's initialize response (models, account), so a
|
||||||
// reconnecting server does not initialize the CLI twice.
|
// reconnecting server does not initialize the CLI twice.
|
||||||
Init json.RawMessage `json:"init,omitempty"`
|
Init json.RawMessage `json:"init,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user