Documentation
¶
Overview ¶
Package runinspect explains frozen Wingthing state without contacting a wing, opening a provider, or changing a record. It never uses ambient state paths.
Index ¶
- Constants
- func RenderText(w io.Writer, report *Report) error
- func ValidateDirectory(workspace, path string) (string, error)
- type Action
- type Archive
- type Checkpoint
- type CheckpointAttempt
- type Conversation
- type Edge
- type File
- type Issue
- type LegacyTask
- type Manifest
- type Options
- type Output
- type Receipt
- type Ref
- type Report
- type Run
Constants ¶
const ManifestName = "snapshot.json"
const ReportVersion = 1
Variables ¶
This section is empty.
Functions ¶
func RenderText ¶
RenderText renders only the typed report. Arbitrary provider text can appear solely in the separately labelled, explicitly requested escaped preview.
func ValidateDirectory ¶
ValidateDirectory confines reads (and CLI report writes) to the explicit workspace. Ancestor aliases are resolved; aliases inside it are refused.
Types ¶
type Archive ¶
type Archive struct {
Agent string `json:"agent,omitempty"`
ProviderSessionID string `json:"provider_session_id,omitempty"`
CompressedBytes int64 `json:"compressed_bytes"`
DecodedBytes int64 `json:"decoded_bytes"`
RotationPending bool `json:"rotation_pending"`
SessionID string `json:"session_id"`
State string `json:"state"`
Sources []Ref `json:"sources"`
}
type Checkpoint ¶
type Checkpoint struct {
State string `json:"state"`
Revision *int64 `json:"revision,omitempty"`
AcknowledgedCursor *int64 `json:"acknowledged_cursor,omitempty"`
EventHead *int64 `json:"event_head,omitempty"`
PendingEvents *int64 `json:"pending_events,omitempty"`
WakeDeliveryCursor *int64 `json:"wake_delivery_cursor,omitempty"`
Content Output `json:"content"`
}
type CheckpointAttempt ¶
type CheckpointAttempt struct {
SessionID string `json:"session_id"`
RequestID string `json:"request_id"`
ConversationID string `json:"conversation_id"`
ExpectedRevision *int64 `json:"expected_revision,omitempty"`
AfterCursor *int64 `json:"after_cursor,omitempty"`
FenceState string `json:"fence_state"`
Acknowledgement string `json:"acknowledgement"`
Source Ref `json:"source"`
}
CheckpointAttempt describes retained mailbox intent. A matching durable checkpoint covers its cursor, but does not prove which writer committed it.
type Conversation ¶
type Conversation struct {
ID string `json:"conversation_id"`
ParentID string `json:"parent_conversation_id,omitempty"`
RootID string `json:"root_conversation_id"`
SessionID string `json:"session_id"`
Executions []string `json:"executions"`
Checkpoint Checkpoint `json:"checkpoint"`
Sources []Ref `json:"sources"`
Issues []Issue `json:"issues"`
}
type LegacyTask ¶
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
Kind string `json:"kind"` // completed_copy or fixture
Completed bool `json:"completed"`
CapturedAt time.Time `json:"captured_at"`
Files []File `json:"files"`
}
Manifest is written by the snapshot supplier after completing a local copy. SQLite must be a consolidated backup: WAL/journal sidecars are refused. Every regular file except snapshot.json must occur exactly once in Files.
type Receipt ¶
type Receipt struct {
Source Ref `json:"source"`
RunID string `json:"run_id"`
SessionID string `json:"session_id"`
Status string `json:"status"`
ProviderSessionID string `json:"provider_session_id,omitempty"`
TurnID string `json:"turn_id,omitempty"`
Deadline *time.Time `json:"deadline,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
EndedAt *time.Time `json:"ended_at,omitempty"`
FailureKind string `json:"failure_kind,omitempty"`
}
type Report ¶
type Report struct {
LegacyTasks []LegacyTask `json:"legacy_tasks"`
CheckpointAttempts []CheckpointAttempt `json:"checkpoint_attempts"`
Version int `json:"version"`
CapturedAt time.Time `json:"captured_at"`
InputFiles []File `json:"input_files"`
Runs []Run `json:"runs"`
Conversations []Conversation `json:"conversations"`
Archives []Archive `json:"archives"`
Edges []Edge `json:"edges"`
Issues []Issue `json:"issues"`
RequiredHostObservations []string `json:"required_host_observations"`
}
type Run ¶
type Run struct {
Receipts []Receipt `json:"receipts"`
EvidenceState string `json:"evidence_state"`
ID string `json:"run_id"`
SessionID string `json:"session_id"`
ParentID string `json:"parent_id,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
CurrentSessionID string `json:"current_session_id,omitempty"`
Phase string `json:"phase"`
WingStatus string `json:"wing_status"`
EggStatus string `json:"egg_status"`
Diagnosis string `json:"diagnosis"`
Acknowledgement string `json:"acknowledgement"`
Output []Output `json:"outputs"`
Sources []Ref `json:"sources"`
Issues []Issue `json:"issues"`
Actions []Action `json:"suggested_actions"`
}