sqlcgen

package
v0.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbandonReplyWatchParams

type AbandonReplyWatchParams struct {
	AbandonReason sql.NullString `json:"abandon_reason"`
	ID            string         `json:"id"`
}

type AcknowledgeAttentionOccurrencesParams

type AcknowledgeAttentionOccurrencesParams struct {
	ProfileID     string `json:"profile_id"`
	ActorKind     string `json:"actor_kind"`
	ActorID       string `json:"actor_id"`
	Now           string `json:"now"`
	OccurrenceIds any    `json:"occurrence_ids"`
}

type AcknowledgeGoalSessionOutboxParams

type AcknowledgeGoalSessionOutboxParams struct {
	DeliveredAt string `json:"delivered_at"`
	EventID     string `json:"event_id"`
}

type AcknowledgeLoopSessionCleanupParams

type AcknowledgeLoopSessionCleanupParams struct {
	CompletedAt string `json:"completed_at"`
	CleanupID   string `json:"cleanup_id"`
}

type AcknowledgeSubagentParams

type AcknowledgeSubagentParams struct {
	TurnID     string `json:"turn_id"`
	RemoveWake int64  `json:"remove_wake"`
	Now        string `json:"now"`
	ID         string `json:"id"`
}

type ActivateGoalBindingParams

type ActivateGoalBindingParams struct {
	ActivatedAt  string `json:"activated_at"`
	LoopRunID    string `json:"loop_run_id"`
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
}

type ActivateLoopApprovalParams

type ActivateLoopApprovalParams struct {
	ActiveGateID            string `json:"active_gate_id"`
	ActiveHumanCriteriaJson string `json:"active_human_criteria_json"`
	BudgetDelta             int64  `json:"budget_delta"`
	ID                      string `json:"id"`
}

type ActiveGoalPromptBindingExistsParams

type ActiveGoalPromptBindingExistsParams struct {
	LoopRunID    string `json:"loop_run_id"`
	WorkspaceID  string `json:"workspace_id"`
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
	SessionID    string `json:"session_id"`
}

type AdmitTaskRunDirectExecutionParams

type AdmitTaskRunDirectExecutionParams struct {
	ClaimedByKind          sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef           sql.NullString `json:"claimed_by_ref"`
	ClaimedAt              sql.NullString `json:"claimed_at"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type AdvanceGoalBudgetVersionRow

type AdvanceGoalBudgetVersionRow struct {
	BudgetTokens     int64  `json:"budget_tokens"`
	BudgetWallSec    int64  `json:"budget_wall_sec"`
	BudgetOnExceeded string `json:"budget_on_exceeded"`
	StartedAt        string `json:"started_at"`
	BudgetVersion    int64  `json:"budget_version"`
}

type AdvanceGoalCheckpointBindingAttemptParams

type AdvanceGoalCheckpointBindingAttemptParams struct {
	BindingHandle         sql.NullString `json:"binding_handle"`
	BindingEpoch          sql.NullInt64  `json:"binding_epoch"`
	SessionID             sql.NullString `json:"session_id"`
	UpdatedAt             string         `json:"updated_at"`
	LoopRunID             string         `json:"loop_run_id"`
	Generation            int64          `json:"generation"`
	NodeID                string         `json:"node_id"`
	ItemIndex             int64          `json:"item_index"`
	ControlEpoch          int64          `json:"control_epoch"`
	Phase                 string         `json:"phase"`
	PromptAttempt         int64          `json:"prompt_attempt"`
	TaskRunID             sql.NullString `json:"task_run_id"`
	QueueEntryID          sql.NullString `json:"queue_entry_id"`
	PromptID              sql.NullString `json:"prompt_id"`
	ExpectedBindingEpoch  sql.NullInt64  `json:"expected_binding_epoch"`
	ExpectedSessionID     sql.NullString `json:"expected_session_id"`
	ExpectedBindingHandle sql.NullString `json:"expected_binding_handle"`
}

type AdvanceGoalOriginBindingAdoptionParams

type AdvanceGoalOriginBindingAdoptionParams struct {
	AdoptedGeneration         int64          `json:"adopted_generation"`
	AdoptionAttemptID         sql.NullString `json:"adoption_attempt_id"`
	LoopRunID                 string         `json:"loop_run_id"`
	Handle                    string         `json:"handle"`
	ExpectedAdoptedGeneration int64          `json:"expected_adopted_generation"`
}

type AdvanceGoalTerminalCheckpointParams

type AdvanceGoalTerminalCheckpointParams struct {
	Phase        string         `json:"phase"`
	UpdatedAt    string         `json:"updated_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	PromptID     sql.NullString `json:"prompt_id"`
}

type AdvanceLoopRunProgressParams

type AdvanceLoopRunProgressParams struct {
	ProgressAt time.Time `json:"progress_at"`
	ID         string    `json:"id"`
}

type AdvanceRejectedGoalCheckpointParams

type AdvanceRejectedGoalCheckpointParams struct {
	PromptAttempt int64          `json:"prompt_attempt"`
	UpdatedAt     string         `json:"updated_at"`
	LoopRunID     string         `json:"loop_run_id"`
	Generation    int64          `json:"generation"`
	NodeID        string         `json:"node_id"`
	ItemIndex     int64          `json:"item_index"`
	ControlEpoch  int64          `json:"control_epoch"`
	BindingEpoch  sql.NullInt64  `json:"binding_epoch"`
	TaskRunID     sql.NullString `json:"task_run_id"`
	QueueEntryID  sql.NullString `json:"queue_entry_id"`
	PromptID      sql.NullString `json:"prompt_id"`
}

type AdvanceRevokedGoalCheckpointParams

type AdvanceRevokedGoalCheckpointParams struct {
	GoalStatus         string         `json:"goal_status"`
	ControlCause       sql.NullString `json:"control_cause"`
	ControlActorKind   sql.NullString `json:"control_actor_kind"`
	ControlActorID     sql.NullString `json:"control_actor_id"`
	ControlRequestedAt string         `json:"control_requested_at"`
	UpdatedAt          string         `json:"updated_at"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ControlEpoch       int64          `json:"control_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
	TaskRunID          sql.NullString `json:"task_run_id"`
	QueueEntryID       sql.NullString `json:"queue_entry_id"`
	PromptID           sql.NullString `json:"prompt_id"`
}

type AdvanceSessionInputGenerationParams

type AdvanceSessionInputGenerationParams struct {
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type AdvanceTaskRunTerminalCommandPhaseParams

type AdvanceTaskRunTerminalCommandPhaseParams struct {
	NextPhase     string `json:"next_phase"`
	UpdatedAt     string `json:"updated_at"`
	CommandID     string `json:"command_id"`
	RunID         string `json:"run_id"`
	TaskID        string `json:"task_id"`
	WorkspaceID   string `json:"workspace_id"`
	ExpectedPhase string `json:"expected_phase"`
}

type AgentHeartbeatRevision

type AgentHeartbeatRevision struct {
	ID             string         `json:"id"`
	WorkspaceID    string         `json:"workspace_id"`
	AgentName      string         `json:"agent_name"`
	SourcePath     string         `json:"source_path"`
	Operation      string         `json:"operation"`
	PreviousDigest sql.NullString `json:"previous_digest"`
	NewDigest      sql.NullString `json:"new_digest"`
	NewSnapshotID  sql.NullString `json:"new_snapshot_id"`
	Body           sql.NullString `json:"body"`
	ActorKind      string         `json:"actor_kind"`
	ActorID        string         `json:"actor_id"`
	CreatedAt      string         `json:"created_at"`
}

type AgentHeartbeatSnapshot

type AgentHeartbeatSnapshot struct {
	ID              string `json:"id"`
	WorkspaceID     string `json:"workspace_id"`
	AgentName       string `json:"agent_name"`
	SourcePath      string `json:"source_path"`
	SchemaVersion   int64  `json:"schema_version"`
	Digest          string `json:"digest"`
	ConfigDigest    string `json:"config_digest"`
	Body            string `json:"body"`
	FrontmatterJson string `json:"frontmatter_json"`
	ResolvedJson    string `json:"resolved_json"`
	DiagnosticsJson string `json:"diagnostics_json"`
	CreatedAt       string `json:"created_at"`
}

type AgentHeartbeatWakeEvent

type AgentHeartbeatWakeEvent struct {
	ID                string         `json:"id"`
	WorkspaceID       string         `json:"workspace_id"`
	AgentName         string         `json:"agent_name"`
	SessionID         sql.NullString `json:"session_id"`
	PolicySnapshotID  sql.NullString `json:"policy_snapshot_id"`
	Source            string         `json:"source"`
	Result            string         `json:"result"`
	Reason            string         `json:"reason"`
	SyntheticPromptID sql.NullString `json:"synthetic_prompt_id"`
	CreatedAt         string         `json:"created_at"`
	ExpiresAt         string         `json:"expires_at"`
}

type AgentHeartbeatWakeState

type AgentHeartbeatWakeState struct {
	WorkspaceID      string         `json:"workspace_id"`
	AgentName        string         `json:"agent_name"`
	SessionID        string         `json:"session_id"`
	PolicySnapshotID sql.NullString `json:"policy_snapshot_id"`
	LastWakeAt       sql.NullString `json:"last_wake_at"`
	NextAllowedAt    sql.NullString `json:"next_allowed_at"`
	CoalescedCount   int64          `json:"coalesced_count"`
	LastResult       string         `json:"last_result"`
	LastReason       sql.NullString `json:"last_reason"`
	UpdatedAt        string         `json:"updated_at"`
}

type AgentSoulRevision

type AgentSoulRevision struct {
	ID              string `json:"id"`
	WorkspaceID     string `json:"workspace_id"`
	AgentName       string `json:"agent_name"`
	SourcePath      string `json:"source_path"`
	Action          string `json:"action"`
	PreviousDigest  string `json:"previous_digest"`
	NewDigest       string `json:"new_digest"`
	Body            string `json:"body"`
	DiagnosticsJson string `json:"diagnostics_json"`
	ActorKind       string `json:"actor_kind"`
	ActorID         string `json:"actor_id"`
	OriginKind      string `json:"origin_kind"`
	OriginRef       string `json:"origin_ref"`
	CreatedAt       string `json:"created_at"`
}

type AgentSoulSnapshot

type AgentSoulSnapshot struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
	Digest      string `json:"digest"`
	ProfileJson string `json:"profile_json"`
	Body        string `json:"body"`
	Truncated   int64  `json:"truncated"`
	CreatedAt   string `json:"created_at"`
}

type AppMetadatum

type AppMetadatum struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	UpdatedAt string `json:"updated_at"`
}

type AssociateSubagentWorktreeParams

type AssociateSubagentWorktreeParams struct {
	WorktreeID      sql.NullString `json:"worktree_id"`
	WorktreeName    sql.NullString `json:"worktree_name"`
	WorktreeBranch  sql.NullString `json:"worktree_branch"`
	WorktreeBaseRef sql.NullString `json:"worktree_base_ref"`
	WorktreeBaseSha sql.NullString `json:"worktree_base_sha"`
	WorktreePath    sql.NullString `json:"worktree_path"`
	ID              string         `json:"id"`
}

type AttachGoalJudgeAttemptParams

type AttachGoalJudgeAttemptParams struct {
	JudgeAttemptID sql.NullString `json:"judge_attempt_id"`
	UpdatedAt      string         `json:"updated_at"`
	LoopRunID      string         `json:"loop_run_id"`
	Generation     int64          `json:"generation"`
	NodeID         string         `json:"node_id"`
	ItemIndex      int64          `json:"item_index"`
	ControlEpoch   int64          `json:"control_epoch"`
	BindingEpoch   sql.NullInt64  `json:"binding_epoch"`
	TaskRunID      sql.NullString `json:"task_run_id"`
	PromptID       sql.NullString `json:"prompt_id"`
}

type AttachSessionParams

type AttachSessionParams struct {
	AttachedTo      string         `json:"attached_to"`
	AttachExpiresAt sql.NullString `json:"attach_expires_at"`
	UpdatedAt       string         `json:"updated_at"`
	ID              string         `json:"id"`
}

type AttentionAcknowledgement

type AttentionAcknowledgement struct {
	ProfileID      string `json:"profile_id"`
	ActorKind      string `json:"actor_kind"`
	ActorID        string `json:"actor_id"`
	OccurrenceID   string `json:"occurrence_id"`
	AcknowledgedAt string `json:"acknowledged_at"`
}

type AttentionSnapshot

type AttentionSnapshot struct {
	ID            string `json:"id"`
	ProfileID     string `json:"profile_id"`
	ActorKind     string `json:"actor_kind"`
	ActorID       string `json:"actor_id"`
	Population    string `json:"population"`
	OccurrenceIds string `json:"occurrence_ids"`
	ExpiresAt     string `json:"expires_at"`
}

type AttentionWorkspaceMute

type AttentionWorkspaceMute struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type AutomationJob

type AutomationJob struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ID               string         `json:"id"`
	ProfileID        string         `json:"profile_id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Schedule         sql.NullString `json:"schedule"`
	Task             sql.NullString `json:"task"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type AutomationJobCatalogEntry

type AutomationJobCatalogEntry struct {
	JobID                  string `json:"job_id"`
	Scope                  string `json:"scope"`
	WorkspaceID            string `json:"workspace_id"`
	Source                 string `json:"source"`
	SourceRank             int64  `json:"source_rank"`
	Name                   string `json:"name"`
	LoopName               string `json:"loop_name"`
	Enabled                bool   `json:"enabled"`
	Target                 string `json:"target"`
	SearchName             string `json:"search_name"`
	SearchAgentName        string `json:"search_agent_name"`
	SearchPrompt           string `json:"search_prompt"`
	SearchScope            string `json:"search_scope"`
	SearchSource           string `json:"search_source"`
	SearchScheduleMode     string `json:"search_schedule_mode"`
	SearchScheduleExpr     string `json:"search_schedule_expr"`
	SearchScheduleInterval string `json:"search_schedule_interval"`
	SearchScheduleTime     string `json:"search_schedule_time"`
}

type AutomationJobOverlay

type AutomationJobOverlay struct {
	JobID           string `json:"job_id"`
	EnabledOverride bool   `json:"enabled_override"`
	UpdatedAt       string `json:"updated_at"`
}

type AutomationRun

type AutomationRun struct {
	WorkspaceID     sql.NullString `json:"workspace_id"`
	Attribution     string         `json:"attribution"`
	ID              string         `json:"id"`
	ProfileID       sql.NullString `json:"profile_id"`
	JobID           sql.NullString `json:"job_id"`
	TriggerID       sql.NullString `json:"trigger_id"`
	SessionID       sql.NullString `json:"session_id"`
	TaskID          sql.NullString `json:"task_id"`
	TaskRunID       sql.NullString `json:"task_run_id"`
	Status          string         `json:"status"`
	Attempt         int64          `json:"attempt"`
	StartedAt       sql.NullString `json:"started_at"`
	EndedAt         sql.NullString `json:"ended_at"`
	Error           sql.NullString `json:"error"`
	LoopRunID       sql.NullString `json:"loop_run_id"`
	FireID          sql.NullString `json:"fire_id"`
	ScheduledAt     sql.NullString `json:"scheduled_at"`
	DeliveryError   sql.NullString `json:"delivery_error"`
	DeliveryErrorAt sql.NullString `json:"delivery_error_at"`
	MetadataJson    string         `json:"metadata_json"`
}

type AutomationSchedulerState

type AutomationSchedulerState struct {
	DeferredUntil             sql.NullString `json:"deferred_until"`
	JobID                     string         `json:"job_id"`
	NextRunAt                 sql.NullString `json:"next_run_at"`
	LastRunAt                 sql.NullString `json:"last_run_at"`
	LastScheduledAt           sql.NullString `json:"last_scheduled_at"`
	LastFireID                string         `json:"last_fire_id"`
	ScheduleHash              string         `json:"schedule_hash"`
	CatchUpPolicy             string         `json:"catch_up_policy"`
	MisfireGraceSeconds       int64          `json:"misfire_grace_seconds"`
	ConsecutiveResumeFailures int64          `json:"consecutive_resume_failures"`
	LastMisfireAt             sql.NullString `json:"last_misfire_at"`
	MisfireCount              int64          `json:"misfire_count"`
	UpdatedAt                 string         `json:"updated_at"`
}

type AutomationSuggestion

type AutomationSuggestion struct {
	ID          string         `json:"id"`
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	Source      string         `json:"source"`
	DedupKey    string         `json:"dedup_key"`
	Status      string         `json:"status"`
	Payload     string         `json:"payload"`
	CreatedAt   string         `json:"created_at"`
	ResolvedAt  sql.NullString `json:"resolved_at"`
}

type AutomationTrigger

type AutomationTrigger struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ID               string         `json:"id"`
	ProfileID        string         `json:"profile_id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Event            string         `json:"event"`
	Filter           sql.NullString `json:"filter"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	WebhookID        sql.NullString `json:"webhook_id"`
	EndpointSlug     sql.NullString `json:"endpoint_slug"`
	WebhookSecretRef sql.NullString `json:"webhook_secret_ref"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type AutomationTriggerCatalogEntry

type AutomationTriggerCatalogEntry struct {
	TriggerID          string `json:"trigger_id"`
	Scope              string `json:"scope"`
	WorkspaceID        string `json:"workspace_id"`
	Event              string `json:"event"`
	Source             string `json:"source"`
	SourceRank         int64  `json:"source_rank"`
	Name               string `json:"name"`
	LoopName           string `json:"loop_name"`
	Enabled            bool   `json:"enabled"`
	Target             string `json:"target"`
	SearchName         string `json:"search_name"`
	SearchAgentName    string `json:"search_agent_name"`
	SearchPrompt       string `json:"search_prompt"`
	SearchScope        string `json:"search_scope"`
	SearchSource       string `json:"search_source"`
	SearchEvent        string `json:"search_event"`
	SearchEndpointSlug string `json:"search_endpoint_slug"`
	SearchWebhookID    string `json:"search_webhook_id"`
}

type AutomationTriggerCatalogFilterTerm

type AutomationTriggerCatalogFilterTerm struct {
	TriggerID string `json:"trigger_id"`
	Value     string `json:"value"`
}

type AutomationTriggerOverlay

type AutomationTriggerOverlay struct {
	TriggerID       string `json:"trigger_id"`
	EnabledOverride bool   `json:"enabled_override"`
	UpdatedAt       string `json:"updated_at"`
}

type AutomationWatchEvent

type AutomationWatchEvent struct {
	Seq         int64          `json:"seq"`
	RunID       string         `json:"run_id"`
	JobID       string         `json:"job_id"`
	TriggerID   string         `json:"trigger_id"`
	SessionID   string         `json:"session_id"`
	Status      string         `json:"status"`
	Attempt     int64          `json:"attempt"`
	StartedAt   sql.NullString `json:"started_at"`
	EndedAt     sql.NullString `json:"ended_at"`
	Error       string         `json:"error"`
	AgentName   string         `json:"agent_name"`
	WorkspaceID string         `json:"workspace_id"`
	RetryJson   string         `json:"retry_json"`
}

type BackfillLoopEventWaitDeadlineParams

type BackfillLoopEventWaitDeadlineParams struct {
	Deadline   sql.NullTime `json:"deadline"`
	LoopRunID  string       `json:"loop_run_id"`
	Generation int64        `json:"generation"`
	NodeID     string       `json:"node_id"`
	ItemIndex  int64        `json:"item_index"`
}

type BeginGoalCompactionCancelParams

type BeginGoalCompactionCancelParams struct {
	CompactionCancelPromptID    sql.NullString `json:"compaction_cancel_prompt_id"`
	CompactionCancelCause       sql.NullString `json:"compaction_cancel_cause"`
	CompactionCancelRequestedAt string         `json:"compaction_cancel_requested_at"`
	UpdatedAt                   string         `json:"updated_at"`
	LoopRunID                   string         `json:"loop_run_id"`
	Generation                  int64          `json:"generation"`
	NodeID                      string         `json:"node_id"`
	ItemIndex                   int64          `json:"item_index"`
	ControlEpoch                int64          `json:"control_epoch"`
	BindingEpoch                sql.NullInt64  `json:"binding_epoch"`
	TaskRunID                   sql.NullString `json:"task_run_id"`
	QueueEntryID                sql.NullString `json:"queue_entry_id"`
	PromptID                    sql.NullString `json:"prompt_id"`
}

type BindGoalCheckpointParams

type BindGoalCheckpointParams struct {
	SessionID     sql.NullString `json:"session_id"`
	BindingHandle sql.NullString `json:"binding_handle"`
	BindingEpoch  sql.NullInt64  `json:"binding_epoch"`
	UpdatedAt     string         `json:"updated_at"`
	LoopRunID     string         `json:"loop_run_id"`
	Generation    int64          `json:"generation"`
	NodeID        string         `json:"node_id"`
	ItemIndex     int64          `json:"item_index"`
	ControlEpoch  int64          `json:"control_epoch"`
}

type BindLeasedTaskRunSessionParams

type BindLeasedTaskRunSessionParams struct {
	SessionID      sql.NullString `json:"session_id"`
	ID             string         `json:"id"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
}

type BindReplyWatchParams

type BindReplyWatchParams struct {
	TurnID       sql.NullString `json:"turn_id"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	ID           string         `json:"id"`
}

type BindTaskRunSessionParams

type BindTaskRunSessionParams struct {
	SessionID              sql.NullString `json:"session_id"`
	WorktreeID             sql.NullString `json:"worktree_id"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type CancelEmptyParentSubagentWakesParams

type CancelEmptyParentSubagentWakesParams struct {
	UpdatedAt       string `json:"updated_at"`
	ParentSessionID string `json:"parent_session_id"`
}

type CancelEmptySubagentWakeParams

type CancelEmptySubagentWakeParams struct {
	UpdatedAt string `json:"updated_at"`
	WakeID    string `json:"wake_id"`
}

type CancelPendingSessionInputsParams

type CancelPendingSessionInputsParams struct {
	CanceledStatus    string         `json:"canceled_status"`
	Now               sql.NullString `json:"now"`
	UpdatedAt         string         `json:"updated_at"`
	SessionID         string         `json:"session_id"`
	SessionGeneration int64          `json:"session_generation"`
	QueuedStatus      string         `json:"queued_status"`
	DispatchingStatus string         `json:"dispatching_status"`
}

type CancelPendingSessionSteerParams

type CancelPendingSessionSteerParams struct {
	Now       sql.NullString `json:"now"`
	SessionID string         `json:"session_id"`
	ID        string         `json:"id"`
}

type CancelPriorSessionSteersParams

type CancelPriorSessionSteersParams struct {
	CanceledStatus  string         `json:"canceled_status"`
	CanceledAt      sql.NullString `json:"canceled_at"`
	UpdatedAt       string         `json:"updated_at"`
	SessionID       string         `json:"session_id"`
	SteerMode       string         `json:"steer_mode"`
	QueuedStatus    string         `json:"queued_status"`
	OriginSessionID string         `json:"origin_session_id"`
}

type CancelSessionInputParams

type CancelSessionInputParams struct {
	CanceledStatus string         `json:"canceled_status"`
	Now            sql.NullString `json:"now"`
	UpdatedAt      string         `json:"updated_at"`
	ID             string         `json:"id"`
	SessionID      string         `json:"session_id"`
}

type CancelSupersededAgentSessionInputsParams

type CancelSupersededAgentSessionInputsParams struct {
	Now             sql.NullString `json:"now"`
	SessionID       string         `json:"session_id"`
	OriginSessionID string         `json:"origin_session_id"`
}

type CancelSupersededAutomationReservationParams

type CancelSupersededAutomationReservationParams struct {
	EndedAt sql.NullString `json:"ended_at"`
	JobID   sql.NullString `json:"job_id"`
}

type CheckpointAmbiguousGoalJudgeParams

type CheckpointAmbiguousGoalJudgeParams struct {
	ControlCause   sql.NullString `json:"control_cause"`
	UpdatedAt      string         `json:"updated_at"`
	LoopRunID      string         `json:"loop_run_id"`
	Generation     int64          `json:"generation"`
	NodeID         string         `json:"node_id"`
	ItemIndex      int64          `json:"item_index"`
	ControlEpoch   int64          `json:"control_epoch"`
	BindingEpoch   sql.NullInt64  `json:"binding_epoch"`
	JudgeAttemptID sql.NullString `json:"judge_attempt_id"`
}

type CheckpointAmbiguousGoalPromptParams

type CheckpointAmbiguousGoalPromptParams struct {
	ControlCause sql.NullString `json:"control_cause"`
	UpdatedAt    string         `json:"updated_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	TaskRunID    sql.NullString `json:"task_run_id"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	PromptID     sql.NullString `json:"prompt_id"`
}

type CheckpointPreparedGoalPromptParams

type CheckpointPreparedGoalPromptParams struct {
	TaskRunID              sql.NullString `json:"task_run_id"`
	QueueEntryID           sql.NullString `json:"queue_entry_id"`
	PromptID               sql.NullString `json:"prompt_id"`
	PromptKind             sql.NullString `json:"prompt_kind"`
	PromptAttempt          int64          `json:"prompt_attempt"`
	SessionID              sql.NullString `json:"session_id"`
	BindingHandle          sql.NullString `json:"binding_handle"`
	BindingEpoch           sql.NullInt64  `json:"binding_epoch"`
	CompactionBaselineUsed sql.NullInt64  `json:"compaction_baseline_used"`
	UpdatedAt              string         `json:"updated_at"`
	LoopRunID              string         `json:"loop_run_id"`
	Generation             int64          `json:"generation"`
	NodeID                 string         `json:"node_id"`
	ItemIndex              int64          `json:"item_index"`
	ControlEpoch           int64          `json:"control_epoch"`
}

type ClaimGoalQueueRowParams

type ClaimGoalQueueRowParams struct {
	ActivatedAt              string         `json:"activated_at"`
	DispatchStartedAt        string         `json:"dispatch_started_at"`
	OperationUsageBaseTokens sql.NullInt64  `json:"operation_usage_base_tokens"`
	DispatchTokenHash        sql.NullString `json:"dispatch_token_hash"`
	UpdatedAt                string         `json:"updated_at"`
	ID                       string         `json:"id"`
	OwnerKind                sql.NullString `json:"owner_kind"`
	OwnerEpoch               sql.NullInt64  `json:"owner_epoch"`
}

type ClaimLoopSessionCleanupParams

type ClaimLoopSessionCleanupParams struct {
	UnsettledFailureCode sql.NullString `json:"unsettled_failure_code"`
	ClaimLimit           int64          `json:"claim_limit"`
}

type ClaimMarketplaceCatalogGenerationParams

type ClaimMarketplaceCatalogGenerationParams struct {
	Source     string `json:"source"`
	SourceRef  string `json:"source_ref"`
	Generation int64  `json:"generation"`
}

type ClaimMarketplaceSourceConfigurationRow

type ClaimMarketplaceSourceConfigurationRow struct {
	Generation int64  `json:"generation"`
	Revision   string `json:"revision"`
}

type ClaimSelectedTaskRunParams

type ClaimSelectedTaskRunParams struct {
	ClaimedStatus  string         `json:"claimed_status"`
	ClaimedByKind  sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef   sql.NullString `json:"claimed_by_ref"`
	SessionID      sql.NullString `json:"session_id"`
	ClaimToken     sql.NullString `json:"claim_token"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
	LeaseUntil     sql.NullString `json:"lease_until"`
	HeartbeatAt    sql.NullString `json:"heartbeat_at"`
	ClaimedAt      sql.NullString `json:"claimed_at"`
	MetadataJson   sql.NullString `json:"metadata_json"`
	ID             string         `json:"id"`
	QueuedStatus   string         `json:"queued_status"`
}

type ClaimSessionInputParams

type ClaimSessionInputParams struct {
	DispatchingStatus string         `json:"dispatching_status"`
	Now               sql.NullString `json:"now"`
	UpdatedAt         string         `json:"updated_at"`
	ID                string         `json:"id"`
	SessionID         string         `json:"session_id"`
	QueuedStatus      string         `json:"queued_status"`
}

type ClaimSubagentWakeRowsParams

type ClaimSubagentWakeRowsParams struct {
	WakeID   sql.NullString `json:"wake_id"`
	Now      string         `json:"now"`
	ParentID string         `json:"parent_id"`
	Ids      any            `json:"ids"`
}

type ClearQueuedSessionInputParams

type ClearQueuedSessionInputParams struct {
	Now       sql.NullString `json:"now"`
	SessionID string         `json:"session_id"`
	EntryID   string         `json:"entry_id"`
}

type ClearTaskBlockParams

type ClearTaskBlockParams struct {
	ClearedAt     sql.NullString `json:"cleared_at"`
	ClearedByKind sql.NullString `json:"cleared_by_kind"`
	ClearedByRef  sql.NullString `json:"cleared_by_ref"`
	ClearNote     sql.NullString `json:"clear_note"`
	ID            string         `json:"id"`
	TaskID        string         `json:"task_id"`
	WorkspaceID   any            `json:"workspace_id"`
}

type ClearTaskCurrentRunProjectionParams

type ClearTaskCurrentRunProjectionParams struct {
	TaskID string         `json:"task_id"`
	RunID  sql.NullString `json:"run_id"`
}

type ClearTaskNeedsAttentionParams

type ClearTaskNeedsAttentionParams struct {
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type CloseGoalBindingWithCleanupParams

type CloseGoalBindingWithCleanupParams struct {
	ClosedAt     string `json:"closed_at"`
	LoopRunID    string `json:"loop_run_id"`
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
	SessionID    string `json:"session_id"`
}

type ClosePendingLoopEffectParams

type ClosePendingLoopEffectParams struct {
	State       string       `json:"state"`
	DeliveredAt sql.NullTime `json:"delivered_at"`
	LoopRunID   string       `json:"loop_run_id"`
	DeliveryID  string       `json:"delivery_id"`
}

type CmdPalettePin

type CmdPalettePin struct {
	WorkspaceID   string `json:"workspace_id"`
	ProfileLensID string `json:"profile_lens_id"`
	CommandID     string `json:"command_id"`
	PinnedAt      int64  `json:"pinned_at"`
}

type CmdPaletteQueryHit

type CmdPaletteQueryHit struct {
	WorkspaceID   string  `json:"workspace_id"`
	ProfileLensID string  `json:"profile_lens_id"`
	Query         string  `json:"query"`
	CommandID     string  `json:"command_id"`
	Weight        float64 `json:"weight"`
	LastUsedAt    int64   `json:"last_used_at"`
}

type CmdPaletteUsage

type CmdPaletteUsage struct {
	WorkspaceID    string  `json:"workspace_id"`
	ProfileLensID  string  `json:"profile_lens_id"`
	CommandID      string  `json:"command_id"`
	UseCount       int64   `json:"use_count"`
	FrecencyWeight float64 `json:"frecency_weight"`
	LastUsedAt     int64   `json:"last_used_at"`
	UpdatedAt      int64   `json:"updated_at"`
}

type CommitQueuedSessionPromptAdmissionDispatchParams

type CommitQueuedSessionPromptAdmissionDispatchParams struct {
	DispatchCommittedState string         `json:"dispatch_committed_state"`
	DispatchCommittedAt    sql.NullString `json:"dispatch_committed_at"`
	UpdatedAt              string         `json:"updated_at"`
	ID                     string         `json:"id"`
	SessionID              string         `json:"session_id"`
	CompletedState         string         `json:"completed_state"`
}

type CommitSessionPromptDispatchParams

type CommitSessionPromptDispatchParams struct {
	DispatchCommittedState string         `json:"dispatch_committed_state"`
	DispatchCommittedAt    sql.NullString `json:"dispatch_committed_at"`
	UpdatedAt              string         `json:"updated_at"`
	WorkspaceID            string         `json:"workspace_id"`
	SessionID              string         `json:"session_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	ReservedState          string         `json:"reserved_state"`
}

type CompareAndSwapLoopRunStatusParams

type CompareAndSwapLoopRunStatusParams struct {
	Status            string `json:"status"`
	ClearControlState int64  `json:"clear_control_state"`
	CompletedAt       string `json:"completed_at"`
	ID                string `json:"id"`
	ExpectedStatus    string `json:"expected_status"`
}

type CompareAndSwapWorktreeStateParams

type CompareAndSwapWorktreeStateParams struct {
	NextState     string `json:"next_state"`
	UpdatedAt     string `json:"updated_at"`
	WorkspaceID   string `json:"workspace_id"`
	WorktreeID    string `json:"worktree_id"`
	ExpectedState string `json:"expected_state"`
}

type CompleteCoordinatorRunParams

type CompleteCoordinatorRunParams struct {
	Status         string         `json:"status"`
	EndedAt        sql.NullString `json:"ended_at"`
	ResultJson     sql.NullString `json:"result_json"`
	ID             string         `json:"id"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
}

type CompleteGoalJudgeAttemptParams

type CompleteGoalJudgeAttemptParams struct {
	Outcome      sql.NullString `json:"outcome"`
	BlockingJson string         `json:"blocking_json"`
	CriteriaJson string         `json:"criteria_json"`
	WarningsJson string         `json:"warnings_json"`
	EvidenceRef  sql.NullString `json:"evidence_ref"`
	TokensUsed   sql.NullInt64  `json:"tokens_used"`
	CompletedAt  string         `json:"completed_at"`
	AttemptID    string         `json:"attempt_id"`
	LoopRunID    string         `json:"loop_run_id"`
}

type CompleteParentRollupTaskRunParams

type CompleteParentRollupTaskRunParams struct {
	ResultJson             sql.NullString `json:"result_json"`
	EndedAt                sql.NullString `json:"ended_at"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type CompleteQueuedSessionPromptAdmissionDispatchParams

type CompleteQueuedSessionPromptAdmissionDispatchParams struct {
	CompletedState         string         `json:"completed_state"`
	CompletedAt            sql.NullString `json:"completed_at"`
	UpdatedAt              string         `json:"updated_at"`
	ID                     string         `json:"id"`
	SessionID              string         `json:"session_id"`
	DispatchCommittedState string         `json:"dispatch_committed_state"`
}

type CompleteSessionPromptAdmissionParams

type CompleteSessionPromptAdmissionParams struct {
	CompletedState string         `json:"completed_state"`
	ResultJson     sql.NullString `json:"result_json"`
	CompletedAt    sql.NullString `json:"completed_at"`
	UpdatedAt      string         `json:"updated_at"`
	WorkspaceID    string         `json:"workspace_id"`
	SessionID      string         `json:"session_id"`
	IdempotencyKey string         `json:"idempotency_key"`
	ExpectedState  string         `json:"expected_state"`
}

type CompleteTaskRunLeaseParams

type CompleteTaskRunLeaseParams struct {
	Status         string         `json:"status"`
	EndedAt        sql.NullString `json:"ended_at"`
	TokensUsed     int64          `json:"tokens_used"`
	ResultJson     sql.NullString `json:"result_json"`
	ID             string         `json:"id"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
}

type CompleteToolApprovalExecutionParams

type CompleteToolApprovalExecutionParams struct {
	ExecutionStatus sql.NullString `json:"execution_status"`
	ResultJson      sql.NullString `json:"result_json"`
	ErrorJson       sql.NullString `json:"error_json"`
	ExecutedAt      sql.NullInt64  `json:"executed_at"`
	ApprovalID      string         `json:"approval_id"`
}

type CompleteWorktreeCreateParams

type CompleteWorktreeCreateParams struct {
	SetupState  string `json:"setup_state"`
	SetupError  string `json:"setup_error"`
	UpdatedAt   string `json:"updated_at"`
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type CompletionCreatedTaskClaimExistsParams

type CompletionCreatedTaskClaimExistsParams struct {
	ID            string         `json:"id"`
	WorkspaceID   sql.NullString `json:"workspace_id"`
	CreatedByKind string         `json:"created_by_kind"`
	CreatedByRef  string         `json:"created_by_ref"`
}

type ConfigApplyRecord

type ConfigApplyRecord struct {
	ID                string         `json:"id"`
	DesiredConfigHash string         `json:"desired_config_hash"`
	ActiveConfigHash  string         `json:"active_config_hash"`
	Generation        int64          `json:"generation"`
	Actor             string         `json:"actor"`
	WriteTarget       string         `json:"write_target"`
	WritePath         string         `json:"write_path"`
	DiffClass         string         `json:"diff_class"`
	Status            string         `json:"status"`
	DiagnosticJson    string         `json:"diagnostic_json"`
	CreatedAt         string         `json:"created_at"`
	AppliedAt         sql.NullString `json:"applied_at"`
	UpdatedAt         string         `json:"updated_at"`
}

type ConsumeTaskRunTerminalCommandParams

type ConsumeTaskRunTerminalCommandParams struct {
	CommandID     string `json:"command_id"`
	RunID         string `json:"run_id"`
	TaskID        string `json:"task_id"`
	WorkspaceID   string `json:"workspace_id"`
	ExpectedPhase string `json:"expected_phase"`
}

type CountActiveCoordinatorRunLeasesParams

type CountActiveCoordinatorRunLeasesParams struct {
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
	Now            sql.NullString `json:"now"`
}

type CountActiveTaskRunClaimsParams

type CountActiveTaskRunClaimsParams struct {
	ClaimedStatus  string `json:"claimed_status"`
	StartingStatus string `json:"starting_status"`
	RunningStatus  string `json:"running_status"`
}

type CountActiveTaskRunLeasesForSessionParams

type CountActiveTaskRunLeasesForSessionParams struct {
	SessionID      sql.NullString `json:"session_id"`
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
	Now            sql.NullString `json:"now"`
}

type CountActiveTaskRunLeasesForWorkspaceParams

type CountActiveTaskRunLeasesForWorkspaceParams struct {
	WorkspaceID    sql.NullString `json:"workspace_id"`
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
	Now            sql.NullString `json:"now"`
}

type CountActiveTaskRunSessionBindingsParams

type CountActiveTaskRunSessionBindingsParams struct {
	SessionID      sql.NullString `json:"session_id"`
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
}

type CountCreatingGoalBindingsParams

type CountCreatingGoalBindingsParams struct {
	LoopRunID string `json:"loop_run_id"`
	Handle    string `json:"handle"`
}

type CountPendingAutomationSuggestionsParams

type CountPendingAutomationSuggestionsParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
}

type CountPendingSessionInputsParams

type CountPendingSessionInputsParams struct {
	SessionID         string `json:"session_id"`
	QueuedStatus      string `json:"queued_status"`
	DispatchingStatus string `json:"dispatching_status"`
	PoolClass         string `json:"pool_class"`
}

type CountSessionFoldersParams

type CountSessionFoldersParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type CreateAppTokenParams

type CreateAppTokenParams struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	TokenHash string `json:"token_hash"`
	CreatedAt string `json:"created_at"`
}

type CreateGatewayDeviceParams

type CreateGatewayDeviceParams struct {
	ID            string         `json:"id"`
	Name          string         `json:"name"`
	TokenHash     string         `json:"token_hash"`
	ActorKind     string         `json:"actor_kind"`
	PairingOrigin string         `json:"pairing_origin"`
	RevokeEpoch   int64          `json:"revoke_epoch"`
	CreatedAt     string         `json:"created_at"`
	LastSeenAt    sql.NullString `json:"last_seen_at"`
	RevokedAt     sql.NullString `json:"revoked_at"`
}

type CreatePendingToolApprovalParams

type CreatePendingToolApprovalParams struct {
	ProfileID    string         `json:"profile_id"`
	ApprovalID   string         `json:"approval_id"`
	WorkspaceID  sql.NullString `json:"workspace_id"`
	InvocationID string         `json:"invocation_id"`
	TargetKind   string         `json:"target_kind"`
	ToolID       sql.NullString `json:"tool_id"`
	TargetJson   string         `json:"target_json"`
	CommandID    sql.NullString `json:"command_id"`
	ArgsJson     string         `json:"args_json"`
	RequestedAt  int64          `json:"requested_at"`
	ExpiresAt    int64          `json:"expires_at"`
}

type CreateSkillExposureParams

type CreateSkillExposureParams struct {
	SkillName    string         `json:"skill_name"`
	CanonicalDir string         `json:"canonical_dir"`
	TargetSlug   string         `json:"target_slug"`
	LinkPath     string         `json:"link_path"`
	LinkTarget   string         `json:"link_target"`
	OwnerScope   string         `json:"owner_scope"`
	WorkspaceID  sql.NullString `json:"workspace_id"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...any) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...any) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...any) *sql.Row
}

type DeadEntity

type DeadEntity struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	Kind        string `json:"kind"`
	EntityID    string `json:"entity_id"`
	Reason      string `json:"reason"`
	MarkedAt    string `json:"marked_at"`
}

type DeleteCmdPalettePersonalizationParams

type DeleteCmdPalettePersonalizationParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type DeleteCmdPalettePinParams

type DeleteCmdPalettePinParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
}

type DeleteCmdPalettePinsParams

type DeleteCmdPalettePinsParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type DeleteCmdPaletteQueryHistoryParams

type DeleteCmdPaletteQueryHistoryParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type DeleteCmdPaletteQueryHitParams

type DeleteCmdPaletteQueryHitParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	Query         string `json:"query"`
	CommandID     string `json:"command_id"`
}

type DeleteCmdPaletteQueryHitsByCommandParams

type DeleteCmdPaletteQueryHitsByCommandParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
}

type DeleteCmdPaletteUsageParams

type DeleteCmdPaletteUsageParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
}

type DeleteDeadEntityParams

type DeleteDeadEntityParams struct {
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
	Kind        string `json:"kind"`
	EntityID    string `json:"entity_id"`
}

type DeleteExtensionEnvBindingParams

type DeleteExtensionEnvBindingParams struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
	EnvName       string `json:"env_name"`
}

type DeleteExtensionEnvBindingsParams

type DeleteExtensionEnvBindingsParams struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type DeleteExtensionInputParams

type DeleteExtensionInputParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	InputID     string `json:"input_id"`
}

type DeleteExtensionMCPAllocationParams

type DeleteExtensionMCPAllocationParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	Server      string `json:"server"`
}

type DeleteExtensionMCPOverridesParams

type DeleteExtensionMCPOverridesParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
}

type DeleteExtensionMCPWorkspaceParams

type DeleteExtensionMCPWorkspaceParams struct {
	Extension   string `json:"extension"`
	WorkspaceID string `json:"workspace_id"`
}

type DeleteGatewayIngressBindingParams

type DeleteGatewayIngressBindingParams struct {
	SubjectKind string `json:"subject_kind"`
	SubjectID   string `json:"subject_id"`
}

type DeleteHeartbeatAgentHistoryParams

type DeleteHeartbeatAgentHistoryParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
}

type DeleteLoopConfigParams

type DeleteLoopConfigParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
}

type DeleteLoopUIAnnotationsParams

type DeleteLoopUIAnnotationsParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
}

type DeleteMCPAuthTokenParams

type DeleteMCPAuthTokenParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type DeleteMCPOAuthRegistrationParams

type DeleteMCPOAuthRegistrationParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type DeleteMismatchedGatewayIngressBindingParams

type DeleteMismatchedGatewayIngressBindingParams struct {
	SubjectKind string         `json:"subject_kind"`
	SubjectID   string         `json:"subject_id"`
	ScopeKind   string         `json:"scope_kind"`
	WorkspaceID sql.NullString `json:"workspace_id"`
}

type DeleteModelCatalogOptionValuesParams

type DeleteModelCatalogOptionValuesParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogOptionsParams

type DeleteModelCatalogOptionsParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogReasoningEffortsParams

type DeleteModelCatalogReasoningEffortsParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogRowsParams

type DeleteModelCatalogRowsParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogSourceParams

type DeleteModelCatalogSourceParams struct {
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogTransportBindingSelectionsParams

type DeleteModelCatalogTransportBindingSelectionsParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeleteModelCatalogTransportBindingsParams

type DeleteModelCatalogTransportBindingsParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
}

type DeletePendingWorktreeParams

type DeletePendingWorktreeParams struct {
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type DeleteRunMaterializationParams

type DeleteRunMaterializationParams struct {
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
	RunID       string `json:"run_id"`
}

type DeleteSessionFolderParams

type DeleteSessionFolderParams struct {
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type DeleteSessionPlacementParams

type DeleteSessionPlacementParams struct {
	SessionID   string `json:"session_id"`
	WorkspaceID string `json:"workspace_id"`
}

type DeleteSessionProcessObservationParams

type DeleteSessionProcessObservationParams struct {
	Pid       int64  `json:"pid"`
	StartedAt string `json:"started_at"`
}

type DeleteSoulAgentHistoryParams

type DeleteSoulAgentHistoryParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
}

type DeleteTaskDependencyParams

type DeleteTaskDependencyParams struct {
	TaskID          string `json:"task_id"`
	DependsOnTaskID string `json:"depends_on_task_id"`
}

type DeleteWorkspaceFolderParams

type DeleteWorkspaceFolderParams struct {
	ID        string `json:"id"`
	ProfileID string `json:"profile_id"`
}

type DeliverReplyWatchParams

type DeliverReplyWatchParams struct {
	DeliveredInputID sql.NullString `json:"delivered_input_id"`
	DeliveredAt      sql.NullString `json:"delivered_at"`
	ID               string         `json:"id"`
}

type DisposeSubagentsParams

type DisposeSubagentsParams struct {
	Now      string `json:"now"`
	ParentID string `json:"parent_id"`
	TurnID   any    `json:"turn_id"`
	Ids      any    `json:"ids"`
}

type EnqueueGoalSessionOutboxParams

type EnqueueGoalSessionOutboxParams struct {
	EventID         string         `json:"event_id"`
	WorkspaceID     string         `json:"workspace_id"`
	OriginSessionID string         `json:"origin_session_id"`
	LoopRunID       string         `json:"loop_run_id"`
	BoundSessionID  sql.NullString `json:"bound_session_id"`
	Cause           string         `json:"cause"`
	CreatedAt       string         `json:"created_at"`
}

type EnqueueLoopSessionCleanupParams

type EnqueueLoopSessionCleanupParams struct {
	CleanupID   string `json:"cleanup_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	SourceKind  string `json:"source_kind"`
	SourceID    string `json:"source_id"`
	SourceEpoch int64  `json:"source_epoch"`
	SessionID   string `json:"session_id"`
	Cause       string `json:"cause"`
	CreatedAt   string `json:"created_at"`
}

type EnrichNativeSubagentResultParams

type EnrichNativeSubagentResultParams struct {
	Result             sql.NullString `json:"result"`
	ResultTruncated    int64          `json:"result_truncated"`
	Error              sql.NullString `json:"error"`
	Now                string         `json:"now"`
	ID                 string         `json:"id"`
	WorkspaceID        string         `json:"workspace_id"`
	ParentSessionID    string         `json:"parent_session_id"`
	ParentTurnID       string         `json:"parent_turn_id"`
	ProviderToolCallID string         `json:"provider_tool_call_id"`
	Status             string         `json:"status"`
}

type EnsureAmbiguousGoalQueueTerminalParams

type EnsureAmbiguousGoalQueueTerminalParams struct {
	TerminalReasonCode sql.NullString `json:"terminal_reason_code"`
	TerminalAt         string         `json:"terminal_at"`
	FailedAt           string         `json:"failed_at"`
	FailureSummary     string         `json:"failure_summary"`
	UpdatedAt          string         `json:"updated_at"`
	ID                 string         `json:"id"`
	LoopRunID          sql.NullString `json:"loop_run_id"`
	PromptID           sql.NullString `json:"prompt_id"`
}

type EnsureSessionTranscriptEpochParams

type EnsureSessionTranscriptEpochParams struct {
	Minimum   int64  `json:"minimum"`
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type EventSummary

type EventSummary struct {
	Seq                  int64          `json:"seq"`
	ID                   string         `json:"id"`
	ProfileID            string         `json:"profile_id"`
	SessionID            string         `json:"session_id"`
	WorkspaceID          string         `json:"workspace_id"`
	WorktreeID           string         `json:"worktree_id"`
	Type                 string         `json:"type"`
	AgentName            string         `json:"agent_name"`
	ContentJson          string         `json:"content_json"`
	TaskID               string         `json:"task_id"`
	RunID                string         `json:"run_id"`
	WorkflowID           string         `json:"workflow_id"`
	ClaimTokenHash       string         `json:"claim_token_hash"`
	LeaseUntil           string         `json:"lease_until"`
	CoordinatorSessionID string         `json:"coordinator_session_id"`
	SchedulerReason      string         `json:"scheduler_reason"`
	HookEvent            string         `json:"hook_event"`
	HookName             string         `json:"hook_name"`
	ActorKind            string         `json:"actor_kind"`
	ActorID              string         `json:"actor_id"`
	ReleaseReason        string         `json:"release_reason"`
	ParentSessionID      string         `json:"parent_session_id"`
	RootSessionID        string         `json:"root_session_id"`
	SpawnDepth           int64          `json:"spawn_depth"`
	Summary              sql.NullString `json:"summary"`
	Timestamp            string         `json:"timestamp"`
	Provider             string         `json:"provider"`
	Outcome              string         `json:"outcome"`
}

type ExhaustExpiredTaskRunLeaseParams

type ExhaustExpiredTaskRunLeaseParams struct {
	NeedsAttentionStatus string         `json:"needs_attention_status"`
	EndedAt              sql.NullString `json:"ended_at"`
	Error                sql.NullString `json:"error"`
	ID                   string         `json:"id"`
	PreviousStatus       string         `json:"previous_status"`
	SessionID            sql.NullString `json:"session_id"`
	ClaimTokenHash       sql.NullString `json:"claim_token_hash"`
	LeaseUntil           sql.NullString `json:"lease_until"`
}

type ExpireTaskBlockParams

type ExpireTaskBlockParams struct {
	ClearedAt     sql.NullString `json:"cleared_at"`
	ClearedByKind sql.NullString `json:"cleared_by_kind"`
	ClearedByRef  sql.NullString `json:"cleared_by_ref"`
	ID            string         `json:"id"`
	TaskID        string         `json:"task_id"`
	Now           sql.NullString `json:"now"`
	WorkspaceID   any            `json:"workspace_id"`
}

type Extension

type Extension struct {
	Name                     string         `json:"name"`
	Version                  string         `json:"version"`
	Source                   string         `json:"source"`
	ManifestPath             string         `json:"manifest_path"`
	Format                   string         `json:"format"`
	IngestDiagnosticsJson    string         `json:"ingest_diagnostics_json"`
	InstalledAt              string         `json:"installed_at"`
	ProvidesJson             string         `json:"provides_json"`
	PermissionsJson          string         `json:"permissions_json"`
	Checksum                 string         `json:"checksum"`
	LifecycleToken           string         `json:"lifecycle_token"`
	RegistrySlug             sql.NullString `json:"registry_slug"`
	RegistryName             sql.NullString `json:"registry_name"`
	RemoteVersion            sql.NullString `json:"remote_version"`
	ProvenanceJson           string         `json:"provenance_json"`
	GatewayRequirementDigest string         `json:"gateway_requirement_digest"`
	GatewayConfirmedBy       sql.NullString `json:"gateway_confirmed_by"`
	GatewayConfirmedAt       sql.NullString `json:"gateway_confirmed_at"`
}
type ExtensionDevLink struct {
	ExtensionName            string         `json:"extension_name"`
	WorkspaceID              string         `json:"workspace_id"`
	OriginPath               string         `json:"origin_path"`
	BundleGeneration         string         `json:"bundle_generation"`
	LinkedAt                 time.Time      `json:"linked_at"`
	Format                   string         `json:"format"`
	IngestDiagnosticsJson    string         `json:"ingest_diagnostics_json"`
	GatewayRequirementDigest string         `json:"gateway_requirement_digest"`
	GatewayConfirmedBy       sql.NullString `json:"gateway_confirmed_by"`
	GatewayConfirmedAt       sql.NullString `json:"gateway_confirmed_at"`
}

type ExtensionEnvBinding

type ExtensionEnvBinding struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
	EnvName       string `json:"env_name"`
	SecretRef     string `json:"secret_ref"`
	InputID       string `json:"input_id"`
	Active        int64  `json:"active"`
	McpServer     string `json:"mcp_server"`
	HeaderName    string `json:"header_name"`
	Kind          string `json:"kind"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

type ExtensionInput

type ExtensionInput struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	InputID     string `json:"input_id"`
	Type        string `json:"type"`
	ValueJson   string `json:"value_json"`
	Active      int64  `json:"active"`
	UpdatedAt   string `json:"updated_at"`
}

type ExtensionInstallation

type ExtensionInstallation struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
	CreatedAt     string `json:"created_at"`
}

type ExtensionMcpOverride

type ExtensionMcpOverride struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	Server      string `json:"server"`
	RuntimeName string `json:"runtime_name"`
	EnvJson     string `json:"env_json"`
	HeadersJson string `json:"headers_json"`
	Url         string `json:"url"`
	UpdatedAt   string `json:"updated_at"`
}

type ExtensionProfileEnablement

type ExtensionProfileEnablement struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	Enabled       int64  `json:"enabled"`
}

type ExtensionProfileMarker

type ExtensionProfileMarker struct {
	ExtensionName      string        `json:"extension_name"`
	ProfileName        string        `json:"profile_name"`
	CreatedProfileID   string        `json:"created_profile_id"`
	CreatedAt          string        `json:"created_at"`
	CreatedByExtension sql.NullInt64 `json:"created_by_extension"`
}

type FailGoalBindingCreationAttemptParams

type FailGoalBindingCreationAttemptParams struct {
	FailureCode  sql.NullString `json:"failure_code"`
	FailedAt     string         `json:"failed_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Handle       string         `json:"handle"`
	BindingEpoch int64          `json:"binding_epoch"`
}

type FailNeedsAttentionTaskRunForRecoveryParams

type FailNeedsAttentionTaskRunForRecoveryParams struct {
	EndedAt                sql.NullString `json:"ended_at"`
	Error                  sql.NullString `json:"error"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type FailSubagentWakeParams

type FailSubagentWakeParams struct {
	UpdatedAt     string `json:"updated_at"`
	WakeMessageID string `json:"wake_message_id"`
}

type FailTaskRunLeaseParams

type FailTaskRunLeaseParams struct {
	Status         string         `json:"status"`
	EndedAt        sql.NullString `json:"ended_at"`
	TokensUsed     int64          `json:"tokens_used"`
	Error          sql.NullString `json:"error"`
	ID             string         `json:"id"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
}

type FinalizeAmbiguousGoalJudgeTurnParams

type FinalizeAmbiguousGoalJudgeTurnParams struct {
	ReasonCode sql.NullString `json:"reason_code"`
	EndedAt    string         `json:"ended_at"`
	LoopRunID  string         `json:"loop_run_id"`
	Generation int64          `json:"generation"`
	NodeID     string         `json:"node_id"`
	ItemIndex  int64          `json:"item_index"`
	Turn       int64          `json:"turn"`
}

type FinalizeAmbiguousGoalTurnParams

type FinalizeAmbiguousGoalTurnParams struct {
	ReasonCode sql.NullString `json:"reason_code"`
	EndedAt    string         `json:"ended_at"`
	LoopRunID  string         `json:"loop_run_id"`
	Generation int64          `json:"generation"`
	NodeID     string         `json:"node_id"`
	ItemIndex  int64          `json:"item_index"`
	PromptID   string         `json:"prompt_id"`
}

type FinalizeSubagentParams

type FinalizeSubagentParams struct {
	Status          string         `json:"status"`
	WorkState       string         `json:"work_state"`
	Result          sql.NullString `json:"result"`
	Error           sql.NullString `json:"error"`
	ResultTruncated int64          `json:"result_truncated"`
	ChildActivity   string         `json:"child_activity"`
	Now             sql.NullString `json:"now"`
	ID              string         `json:"id"`
}

type FindActiveDesignationProjectionCandidateParams

type FindActiveDesignationProjectionCandidateParams struct {
	TaskID             string `json:"task_id"`
	DesignationGroupID string `json:"designation_group_id"`
	ExcludedRunID      string `json:"excluded_run_id"`
}

type FindActiveGatewayDeviceByTokenHashParams

type FindActiveGatewayDeviceByTokenHashParams struct {
	LastSeenAt sql.NullString `json:"last_seen_at"`
	TokenHash  string         `json:"token_hash"`
}

type FindActiveLoopRunParams

type FindActiveLoopRunParams struct {
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
	LoopName    string `json:"loop_name"`
}

type FindGoalReportTargetsParams

type FindGoalReportTargetsParams struct {
	WorkspaceID string         `json:"workspace_id"`
	SessionID   sql.NullString `json:"session_id"`
}

type FindGoalReportTargetsRow

type FindGoalReportTargetsRow struct {
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	PromptID     sql.NullString `json:"prompt_id"`
	SessionID    sql.NullString `json:"session_id"`
}

type FindGoalSessionBindingAttemptParams

type FindGoalSessionBindingAttemptParams struct {
	LoopRunID    string `json:"loop_run_id"`
	WorkspaceID  string `json:"workspace_id"`
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
}

type FindLiveSessionGoalParams

type FindLiveSessionGoalParams struct {
	WorkspaceID     string         `json:"workspace_id"`
	OriginSessionID sql.NullString `json:"origin_session_id"`
}

type FindNewestSessionGoalParams

type FindNewestSessionGoalParams struct {
	WorkspaceID     string         `json:"workspace_id"`
	OriginSessionID sql.NullString `json:"origin_session_id"`
}

type FindNewestSessionGoalRow

type FindNewestSessionGoalRow struct {
	ID            string       `json:"id"`
	GoalClearedAt sql.NullTime `json:"goal_cleared_at"`
}

type FinishWorktreeExitOperationParams

type FinishWorktreeExitOperationParams struct {
	State       string         `json:"state"`
	FinishedAt  sql.NullString `json:"finished_at"`
	WorkspaceID string         `json:"workspace_id"`
	WorktreeID  string         `json:"worktree_id"`
	OpID        string         `json:"op_id"`
}

type FireReplyWatchParams

type FireReplyWatchParams struct {
	Outcome        sql.NullString `json:"outcome"`
	ReplyText      sql.NullString `json:"reply_text"`
	ReplyTruncated int64          `json:"reply_truncated"`
	FiredAt        sql.NullString `json:"fired_at"`
	ID             string         `json:"id"`
}

type FlushGoalTaskUsageParams

type FlushGoalTaskUsageParams struct {
	TokensReported      any            `json:"tokens_reported"`
	LiveTokensUsed      int64          `json:"live_tokens_used"`
	ID                  string         `json:"id"`
	TaskLoopRunID       sql.NullString `json:"task_loop_run_id"`
	CheckpointLoopRunID string         `json:"checkpoint_loop_run_id"`
	Generation          int64          `json:"generation"`
	NodeID              string         `json:"node_id"`
	ItemIndex           int64          `json:"item_index"`
	ControlEpoch        int64          `json:"control_epoch"`
	BindingEpoch        sql.NullInt64  `json:"binding_epoch"`
	Phase               string         `json:"phase"`
	TaskRunID           sql.NullString `json:"task_run_id"`
	QueueEntryID        sql.NullString `json:"queue_entry_id"`
	PromptID            sql.NullString `json:"prompt_id"`
}

type ForceFailEligibleTaskRunParams

type ForceFailEligibleTaskRunParams struct {
	EndedAt                sql.NullString `json:"ended_at"`
	Error                  sql.NullString `json:"error"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type ForceReleaseClaimedTaskRunParams

type ForceReleaseClaimedTaskRunParams struct {
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type ForgePullRequest

type ForgePullRequest struct {
	WorkspaceID       string         `json:"workspace_id"`
	RepoKey           string         `json:"repo_key"`
	Branch            string         `json:"branch"`
	Provider          string         `json:"provider"`
	PrNumber          sql.NullInt64  `json:"pr_number"`
	PrUrl             string         `json:"pr_url"`
	PrState           sql.NullString `json:"pr_state"`
	Merged            sql.NullInt64  `json:"merged"`
	Draft             sql.NullInt64  `json:"draft"`
	HeadSha           string         `json:"head_sha"`
	BaseRef           string         `json:"base_ref"`
	ChecksState       string         `json:"checks_state"`
	ChecksPassed      int64          `json:"checks_passed"`
	ChecksFailed      int64          `json:"checks_failed"`
	ChecksPending     int64          `json:"checks_pending"`
	ChecksFailedNames string         `json:"checks_failed_names"`
	ReviewDecision    string         `json:"review_decision"`
	Mergeable         string         `json:"mergeable"`
	PrUpdatedAt       sql.NullString `json:"pr_updated_at"`
	ObservedAt        sql.NullString `json:"observed_at"`
	LookupState       string         `json:"lookup_state"`
	LookupCause       string         `json:"lookup_cause"`
	AttemptAt         sql.NullString `json:"attempt_at"`
	FailureCount      int64          `json:"failure_count"`
	RetryAfter        sql.NullString `json:"retry_after"`
}

type FreezePreparedGoalInputBatchParams

type FreezePreparedGoalInputBatchParams struct {
	SessionID    string `json:"session_id"`
	QueuedStatus string `json:"queued_status"`
}

type GatewayDeviceEpochMatchesParams

type GatewayDeviceEpochMatchesParams struct {
	ID          string `json:"id"`
	RevokeEpoch int64  `json:"revoke_epoch"`
}

type GatewayDeviceOrigin

type GatewayDeviceOrigin struct {
	DeviceID  string `json:"device_id"`
	Origin    string `json:"origin"`
	CreatedAt string `json:"created_at"`
}

type GatewayDeviceSession

type GatewayDeviceSession struct {
	ID            string         `json:"id"`
	Name          string         `json:"name"`
	TokenHash     string         `json:"token_hash"`
	ActorKind     string         `json:"actor_kind"`
	PairingOrigin string         `json:"pairing_origin"`
	RevokeEpoch   int64          `json:"revoke_epoch"`
	CreatedAt     string         `json:"created_at"`
	LastSeenAt    sql.NullString `json:"last_seen_at"`
	RevokedAt     sql.NullString `json:"revoked_at"`
}

type GatewayEndpointState

type GatewayEndpointState struct {
	Tier               string `json:"tier"`
	EndpointUrl        string `json:"endpoint_url"`
	EndpointGeneration int64  `json:"endpoint_generation"`
	Reachable          bool   `json:"reachable"`
	UpdatedAt          string `json:"updated_at"`
}

type GatewayIngressBinding

type GatewayIngressBinding struct {
	SubjectKind        string         `json:"subject_kind"`
	SubjectID          string         `json:"subject_id"`
	ScopeKind          string         `json:"scope_kind"`
	WorkspaceID        sql.NullString `json:"workspace_id"`
	EndpointGeneration int64          `json:"endpoint_generation"`
	ConfirmedAt        string         `json:"confirmed_at"`
}

type GatewayProvider

type GatewayProvider struct {
	Name            string         `json:"name"`
	InstallSource   string         `json:"install_source"`
	DigestConfirmed sql.NullString `json:"digest_confirmed"`
	ConfirmedAt     sql.NullString `json:"confirmed_at"`
}

type GatewayProviderActivation

type GatewayProviderActivation struct {
	ProviderName  string         `json:"provider_name"`
	Tier          string         `json:"tier"`
	DesiredState  string         `json:"desired_state"`
	ObservedState string         `json:"observed_state"`
	Generation    int64          `json:"generation"`
	LastHealthAt  sql.NullString `json:"last_health_at"`
	LastError     sql.NullString `json:"last_error"`
}

type GatewaySurfaceExposure

type GatewaySurfaceExposure struct {
	Surface       string         `json:"surface"`
	Tier          string         `json:"tier"`
	DesiredState  string         `json:"desired_state"`
	ObservedState string         `json:"observed_state"`
	Generation    int64          `json:"generation"`
	ConsentedAt   sql.NullString `json:"consented_at"`
}

type GetActiveGoalSessionBindingParams

type GetActiveGoalSessionBindingParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
	Handle      string `json:"handle"`
}

type GetAttentionSnapshotParams

type GetAttentionSnapshotParams struct {
	ID         string `json:"id"`
	ProfileID  string `json:"profile_id"`
	ActorKind  string `json:"actor_kind"`
	ActorID    string `json:"actor_id"`
	Population string `json:"population"`
	Now        string `json:"now"`
}

type GetAutomationRunRow

type GetAutomationRunRow struct {
	ID              string         `json:"id"`
	ProfileID       sql.NullString `json:"profile_id"`
	JobID           sql.NullString `json:"job_id"`
	TriggerID       sql.NullString `json:"trigger_id"`
	SessionID       sql.NullString `json:"session_id"`
	TaskID          sql.NullString `json:"task_id"`
	TaskRunID       sql.NullString `json:"task_run_id"`
	FireID          sql.NullString `json:"fire_id"`
	Status          string         `json:"status"`
	Attempt         int64          `json:"attempt"`
	ScheduledAt     sql.NullString `json:"scheduled_at"`
	StartedAt       sql.NullString `json:"started_at"`
	EndedAt         sql.NullString `json:"ended_at"`
	Error           sql.NullString `json:"error"`
	DeliveryError   sql.NullString `json:"delivery_error"`
	DeliveryErrorAt sql.NullString `json:"delivery_error_at"`
	LoopRunID       sql.NullString `json:"loop_run_id"`
	MetadataJson    string         `json:"metadata_json"`
}

type GetAutomationSuggestionByDedupKeyParams

type GetAutomationSuggestionByDedupKeyParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	DedupKey    string         `json:"dedup_key"`
}

type GetAutomationSuggestionParams

type GetAutomationSuggestionParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	ID          string         `json:"id"`
}

type GetAwaitingGoalControlParams

type GetAwaitingGoalControlParams struct {
	LoopRunID    string `json:"loop_run_id"`
	WorkspaceID  string `json:"workspace_id"`
	OutputStatus string `json:"output_status"`
}

type GetAwaitingGoalControlRow

type GetAwaitingGoalControlRow struct {
	Generation           int64          `json:"generation"`
	NodeID               string         `json:"node_id"`
	ItemIndex            int64          `json:"item_index"`
	ControlEpoch         int64          `json:"control_epoch"`
	GoalStatus           string         `json:"goal_status"`
	ControlCause         string         `json:"control_cause"`
	TurnsUsed            int64          `json:"turns_used"`
	TurnLimit            int64          `json:"turn_limit"`
	TaskRunID            string         `json:"task_run_id"`
	QueueEntryID         string         `json:"queue_entry_id"`
	PromptID             string         `json:"prompt_id"`
	PromptKind           string         `json:"prompt_kind"`
	OpenTurn             bool           `json:"open_turn"`
	RunStatus            string         `json:"run_status"`
	ActiveGateID         string         `json:"active_gate_id"`
	OutputStatus         string         `json:"output_status"`
	OutputTaskRun        string         `json:"output_task_run"`
	ControlGrantID       int64          `json:"control_grant_id"`
	ControlGrantKind     sql.NullString `json:"control_grant_kind"`
	ControlGrantCause    sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn     sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope    sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed int64          `json:"control_grant_consumed"`
}

type GetCmdPaletteQueryHitParams

type GetCmdPaletteQueryHitParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	Query         string `json:"query"`
	CommandID     string `json:"command_id"`
}

type GetCmdPaletteQueryHitRow

type GetCmdPaletteQueryHitRow struct {
	ProfileLensID string  `json:"profile_lens_id"`
	WorkspaceID   string  `json:"workspace_id"`
	Query         string  `json:"query"`
	CommandID     string  `json:"command_id"`
	Weight        float64 `json:"weight"`
	LastUsedAt    int64   `json:"last_used_at"`
}

type GetCmdPaletteUsageParams

type GetCmdPaletteUsageParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
}

type GetCmdPaletteUsageRow

type GetCmdPaletteUsageRow struct {
	ProfileLensID  string  `json:"profile_lens_id"`
	WorkspaceID    string  `json:"workspace_id"`
	CommandID      string  `json:"command_id"`
	UseCount       int64   `json:"use_count"`
	FrecencyWeight float64 `json:"frecency_weight"`
	LastUsedAt     int64   `json:"last_used_at"`
	UpdatedAt      int64   `json:"updated_at"`
}

type GetCompletedGoalTurnParams

type GetCompletedGoalTurnParams struct {
	LoopRunID  string `json:"loop_run_id"`
	Generation int64  `json:"generation"`
	NodeID     string `json:"node_id"`
	ItemIndex  int64  `json:"item_index"`
	PromptID   string `json:"prompt_id"`
}

type GetCompletedGoalTurnRow

type GetCompletedGoalTurnRow struct {
	ResultStatus   sql.NullString `json:"result_status"`
	StopReason     sql.NullString `json:"stop_reason"`
	ReasonCode     sql.NullString `json:"reason_code"`
	VerdictOutcome sql.NullString `json:"verdict_outcome"`
	BlockingJson   string         `json:"blocking_json"`
	CriteriaJson   string         `json:"criteria_json"`
	WarningsJson   string         `json:"warnings_json"`
	TokensUsed     sql.NullInt64  `json:"tokens_used"`
	ActorKind      string         `json:"actor_kind"`
	ActorID        string         `json:"actor_id"`
	BindingEpoch   int64          `json:"binding_epoch"`
}

type GetDeadEntityParams

type GetDeadEntityParams struct {
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
	Kind        string `json:"kind"`
	EntityID    string `json:"entity_id"`
}

type GetEventSummarySessionProjectionRow

type GetEventSummarySessionProjectionRow struct {
	WorkspaceID string         `json:"workspace_id"`
	Provider    string         `json:"provider"`
	WorktreeID  sql.NullString `json:"worktree_id"`
}

type GetGatewayIngressBindingParams

type GetGatewayIngressBindingParams struct {
	SubjectKind string `json:"subject_kind"`
	SubjectID   string `json:"subject_id"`
}

type GetGatewayProviderActivationParams

type GetGatewayProviderActivationParams struct {
	ProviderName string `json:"provider_name"`
	Tier         string `json:"tier"`
}

type GetGatewaySurfaceExposureParams

type GetGatewaySurfaceExposureParams struct {
	Surface string `json:"surface"`
	Tier    string `json:"tier"`
}

type GetGatewayWebhookIngressSubjectRow

type GetGatewayWebhookIngressSubjectRow struct {
	ScopeKind    string         `json:"scope_kind"`
	WorkspaceID  sql.NullString `json:"workspace_id"`
	EndpointSlug string         `json:"endpoint_slug"`
	WebhookID    string         `json:"webhook_id"`
	ProfileID    string         `json:"profile_id"`
}

type GetGoalBindingRetryWitnessDigestParams

type GetGoalBindingRetryWitnessDigestParams struct {
	LoopRunID          string `json:"loop_run_id"`
	Handle             string `json:"handle"`
	FailedBindingEpoch int64  `json:"failed_binding_epoch"`
}

type GetGoalCheckpointParams

type GetGoalCheckpointParams struct {
	LoopRunID  string `json:"loop_run_id"`
	Generation int64  `json:"generation"`
	NodeID     string `json:"node_id"`
	ItemIndex  int64  `json:"item_index"`
}

type GetGoalJudgeAttemptDigestParams

type GetGoalJudgeAttemptDigestParams struct {
	AttemptID  string `json:"attempt_id"`
	LoopRunID  string `json:"loop_run_id"`
	Generation int64  `json:"generation"`
	NodeID     string `json:"node_id"`
	ItemIndex  int64  `json:"item_index"`
}

type GetGoalJudgeAttemptParams

type GetGoalJudgeAttemptParams struct {
	AttemptID  string `json:"attempt_id"`
	LoopRunID  string `json:"loop_run_id"`
	Generation int64  `json:"generation"`
	NodeID     string `json:"node_id"`
	ItemIndex  int64  `json:"item_index"`
}

type GetGoalOriginBindingAdoptionOwnerParams

type GetGoalOriginBindingAdoptionOwnerParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type GetGoalOriginBindingAdoptionOwnerRow

type GetGoalOriginBindingAdoptionOwnerRow struct {
	Status     string `json:"status"`
	Generation int64  `json:"generation"`
}

type GetGoalPromptRowParams

type GetGoalPromptRowParams struct {
	LoopRunID sql.NullString `json:"loop_run_id"`
	PromptID  sql.NullString `json:"prompt_id"`
}

type GetGoalPromptRowRow

type GetGoalPromptRowRow struct {
	ID                       string         `json:"id"`
	SessionID                string         `json:"session_id"`
	Status                   string         `json:"status"`
	Text                     string         `json:"text"`
	TaskRunID                string         `json:"task_run_id"`
	RunGeneration            sql.NullInt64  `json:"run_generation"`
	LoopRunID                sql.NullString `json:"loop_run_id"`
	OwnerKind                sql.NullString `json:"owner_kind"`
	OwnerEpoch               sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch             sql.NullInt64  `json:"binding_epoch"`
	PromptID                 sql.NullString `json:"prompt_id"`
	PromptKind               sql.NullString `json:"prompt_kind"`
	PromptAttempt            int64          `json:"prompt_attempt"`
	Dispatchable             int64          `json:"dispatchable"`
	OperationUsageBaseTokens sql.NullInt64  `json:"operation_usage_base_tokens"`
	DispatchTokenHash        sql.NullString `json:"dispatch_token_hash"`
	FenceKind                sql.NullString `json:"fence_kind"`
	FenceDisposition         sql.NullString `json:"fence_disposition"`
	FenceReasonCode          sql.NullString `json:"fence_reason_code"`
	TerminalEventStartSeq    sql.NullInt64  `json:"terminal_event_start_seq"`
	TerminalEventEndSeq      sql.NullInt64  `json:"terminal_event_end_seq"`
	TerminalKind             sql.NullString `json:"terminal_kind"`
	TerminalStopReason       sql.NullString `json:"terminal_stop_reason"`
	TerminalDisposition      sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode       sql.NullString `json:"terminal_reason_code"`
	TerminalTokensReported   int64          `json:"terminal_tokens_reported"`
	TerminalTokensUsed       sql.NullInt64  `json:"terminal_tokens_used"`
	TerminalAt               sql.NullTime   `json:"terminal_at"`
	RuntimeProvider          string         `json:"runtime_provider"`
	RuntimeModel             string         `json:"runtime_model"`
	RuntimeReasoningEffort   string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed             string         `json:"runtime_speed"`
}

type GetGoalReentryStateParams

type GetGoalReentryStateParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
	Generation  int64  `json:"generation"`
	NodeID      string `json:"node_id"`
	ItemIndex   int64  `json:"item_index"`
}

type GetGoalReentryStateRow

type GetGoalReentryStateRow struct {
	Generation           int64          `json:"generation"`
	NodeID               string         `json:"node_id"`
	ItemIndex            int64          `json:"item_index"`
	ControlEpoch         int64          `json:"control_epoch"`
	GoalStatus           string         `json:"goal_status"`
	ControlRequestedAt   sql.NullTime   `json:"control_requested_at"`
	UpdatedAt            time.Time      `json:"updated_at"`
	ControlCause         string         `json:"control_cause"`
	TurnsUsed            int64          `json:"turns_used"`
	TurnLimit            int64          `json:"turn_limit"`
	TaskRunID            string         `json:"task_run_id"`
	QueueEntryID         string         `json:"queue_entry_id"`
	PromptID             string         `json:"prompt_id"`
	PromptKind           string         `json:"prompt_kind"`
	OpenTurn             bool           `json:"open_turn"`
	RunStatus            string         `json:"run_status"`
	ActiveGateID         string         `json:"active_gate_id"`
	OutputStatus         string         `json:"output_status"`
	OutputTaskRun        string         `json:"output_task_run"`
	ControlGrantID       int64          `json:"control_grant_id"`
	ControlGrantKind     sql.NullString `json:"control_grant_kind"`
	ControlGrantCause    sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn     sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope    sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed int64          `json:"control_grant_consumed"`
}

type GetGoalRunOriginParams

type GetGoalRunOriginParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type GetGoalRunOriginRow

type GetGoalRunOriginRow struct {
	OriginKind      string         `json:"origin_kind"`
	OriginSessionID sql.NullString `json:"origin_session_id"`
}

type GetGoalSettlementEvidenceRefParams

type GetGoalSettlementEvidenceRefParams struct {
	AttemptID string `json:"attempt_id"`
	LoopRunID string `json:"loop_run_id"`
}

type GetGoalTurnByPromptIDParams

type GetGoalTurnByPromptIDParams struct {
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	NodeID      string `json:"node_id"`
	ItemIndex   int64  `json:"item_index"`
	PromptID    string `json:"prompt_id"`
	WorkspaceID string `json:"workspace_id"`
}

type GetHeartbeatRevisionForRollbackParams

type GetHeartbeatRevisionForRollbackParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
	ID          string `json:"id"`
}

type GetHeartbeatSnapshotByDigestParams

type GetHeartbeatSnapshotByDigestParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	Digest      string `json:"digest"`
}

type GetHeartbeatWakeStateParams

type GetHeartbeatWakeStateParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SessionID   string `json:"session_id"`
}

type GetInlineGoalOriginSessionRow

type GetInlineGoalOriginSessionRow struct {
	WorkspaceID        string         `json:"workspace_id"`
	State              string         `json:"state"`
	CreationProfileRef sql.NullString `json:"creation_profile_ref"`
	PolicySpecDigest   sql.NullString `json:"policy_spec_digest"`
	CreationDigest     sql.NullString `json:"creation_digest"`
}

type GetLastLoopTokenTickParams

type GetLastLoopTokenTickParams struct {
	LoopRunID string `json:"loop_run_id"`
	Kind      string `json:"kind"`
}

type GetLastLoopTokenTickRow

type GetLastLoopTokenTickRow struct {
	PayloadJson string    `json:"payload_json"`
	At          time.Time `json:"at"`
}

type GetLiveWorktreeByPathParams

type GetLiveWorktreeByPathParams struct {
	WorkspaceID string `json:"workspace_id"`
	Path        string `json:"path"`
}

type GetLoopAdmissionClaimParams

type GetLoopAdmissionClaimParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
	SourceKey   string `json:"source_key"`
	EventKey    string `json:"event_key"`
}

type GetLoopConfigParams

type GetLoopConfigParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
}

type GetLoopConfigRow

type GetLoopConfigRow struct {
	HumanGateEnabled    int64          `json:"human_gate_enabled"`
	ReattemptStrategy   sql.NullString `json:"reattempt_strategy"`
	EnabledChecksJson   string         `json:"enabled_checks_json"`
	IterationCap        sql.NullInt64  `json:"iteration_cap"`
	BudgetTokens        sql.NullInt64  `json:"budget_tokens"`
	BudgetWallSec       sql.NullInt64  `json:"budget_wall_sec"`
	BudgetOnExceeded    sql.NullString `json:"budget_on_exceeded"`
	NoProgressWindow    sql.NullInt64  `json:"no_progress_window"`
	FanOutWidth         sql.NullInt64  `json:"fan_out_width"`
	GateMaxRevisions    sql.NullInt64  `json:"gate_max_revisions"`
	RuntimeDefaultsJson sql.NullString `json:"runtime_defaults_json"`
	RuntimeRulesJson    sql.NullString `json:"runtime_rules_json"`
	EnvironmentJson     sql.NullString `json:"environment_json"`
}

type GetLoopDefinitionSnapshotParams

type GetLoopDefinitionSnapshotParams struct {
	ProfileID        string `json:"profile_id"`
	WorkspaceID      string `json:"workspace_id"`
	DefinitionDigest string `json:"definition_digest"`
}

type GetLoopDefinitionSnapshotRow

type GetLoopDefinitionSnapshotRow struct {
	WorkspaceID       string `json:"workspace_id"`
	DefinitionDigest  string `json:"definition_digest"`
	DefinitionVersion int64  `json:"definition_version"`
	DefinitionJson    string `json:"definition_json"`
	ByteSize          int64  `json:"byte_size"`
	CreatedAt         string `json:"created_at"`
	LastUsedAt        string `json:"last_used_at"`
}

type GetLoopGenerationOutputPayloadParams

type GetLoopGenerationOutputPayloadParams struct {
	OutputRef   string `json:"output_ref"`
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	NodeID      string `json:"node_id"`
	ItemIndex   int64  `json:"item_index"`
	WorkspaceID string `json:"workspace_id"`
}

type GetLoopGenerationOutputStatusParams

type GetLoopGenerationOutputStatusParams struct {
	LoopRunID   string         `json:"loop_run_id"`
	TaskRunID   sql.NullString `json:"task_run_id"`
	WorkspaceID string         `json:"workspace_id"`
}

type GetLoopRunEventHeadParams

type GetLoopRunEventHeadParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type GetLoopRunParams

type GetLoopRunParams struct {
	WorkspaceID string `json:"workspace_id"`
	ID          string `json:"id"`
}

type GetLoopRunPauseStateParams

type GetLoopRunPauseStateParams struct {
	WorkspaceID string `json:"workspace_id"`
	ID          string `json:"id"`
}

type GetLoopRunPauseStateRow

type GetLoopRunPauseStateRow struct {
	Status           string         `json:"status"`
	PauseRequested   int64          `json:"pause_requested"`
	ControlActorKind sql.NullString `json:"control_actor_kind"`
	ControlActorID   sql.NullString `json:"control_actor_id"`
}

type GetMCPAuthTokenParams

type GetMCPAuthTokenParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type GetMCPAuthTokenRefsParams

type GetMCPAuthTokenRefsParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type GetMCPAuthTokenRefsRow

type GetMCPAuthTokenRefsRow struct {
	AccessTokenRef  string `json:"access_token_ref"`
	RefreshTokenRef string `json:"refresh_token_ref"`
}

type GetMCPOAuthRegistrationParams

type GetMCPOAuthRegistrationParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type GetMCPOAuthRegistrationRefsParams

type GetMCPOAuthRegistrationRefsParams struct {
	Scope       string `json:"scope"`
	WorkspaceID string `json:"workspace_id"`
	Owner       string `json:"owner"`
	ServerName  string `json:"server_name"`
}

type GetMCPOAuthRegistrationRefsRow

type GetMCPOAuthRegistrationRefsRow struct {
	ClientSecretRef            string `json:"client_secret_ref"`
	RegistrationAccessTokenRef string `json:"registration_access_token_ref"`
}

type GetMarketplaceCatalogEntryParams

type GetMarketplaceCatalogEntryParams struct {
	Source  string `json:"source"`
	EntryID string `json:"entry_id"`
}

type GetMarketplaceCatalogStateRow

type GetMarketplaceCatalogStateRow struct {
	Source          string         `json:"source"`
	Generation      int64          `json:"generation"`
	Revision        string         `json:"revision"`
	ManifestVersion int64          `json:"manifest_version"`
	GeneratedAt     sql.NullString `json:"generated_at"`
	FetchedAt       string         `json:"fetched_at"`
	Stale           int64          `json:"stale"`
	LastError       string         `json:"last_error"`
	SourceRef       string         `json:"source_ref"`
	ConfigRevision  string         `json:"config_revision"`
	DocumentDigest  string         `json:"document_digest"`
	DiagnosticsJson string         `json:"diagnostics_json"`
	KindOfSource    string         `json:"kind_of_source"`
	Enabled         int64          `json:"enabled"`
	Installable     int64          `json:"installable"`
	ErrorClass      string         `json:"error_class"`
	DocumentPath    string         `json:"document_path"`
	Owner           string         `json:"owner"`
	EntryCount      int64          `json:"entry_count"`
}

type GetMarketplaceExtensionByInstallSlugParams

type GetMarketplaceExtensionByInstallSlugParams struct {
	InstallSlug sql.NullString `json:"install_slug"`
	Version     string         `json:"version"`
}

type GetMarketplaceSourceConfigurationRow

type GetMarketplaceSourceConfigurationRow struct {
	Generation int64  `json:"generation"`
	Revision   string `json:"revision"`
}

type GetMaxGoalBindingEpochParams

type GetMaxGoalBindingEpochParams struct {
	LoopRunID string `json:"loop_run_id"`
	Handle    string `json:"handle"`
}

type GetNextDispatchableSessionInputParams

type GetNextDispatchableSessionInputParams struct {
	SessionID    string `json:"session_id"`
	QueuedStatus string `json:"queued_status"`
}

type GetNotificationCursorParams

type GetNotificationCursorParams struct {
	ScopeKind   string `json:"scope_kind"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	ConsumerID  string `json:"consumer_id"`
	StreamName  string `json:"stream_name"`
	SubjectID   string `json:"subject_id"`
}

type GetOpenTaskRunIDParams

type GetOpenTaskRunIDParams struct {
	TaskID             string `json:"task_id"`
	CompletedStatus    string `json:"completed_status"`
	FailedStatus       string `json:"failed_status"`
	CanceledStatus     string `json:"canceled_status"`
	DesignationGroupID string `json:"designation_group_id"`
}

type GetPendingGoalPauseActorRow

type GetPendingGoalPauseActorRow struct {
	PauseRequested     int64          `json:"pause_requested"`
	ControlActorKind   sql.NullString `json:"control_actor_kind"`
	ControlActorID     sql.NullString `json:"control_actor_id"`
	ControlRequestedAt sql.NullTime   `json:"control_requested_at"`
}

type GetQueuedSessionPromptAdmissionStateParams

type GetQueuedSessionPromptAdmissionStateParams struct {
	ID        string `json:"id"`
	SessionID string `json:"session_id"`
}

type GetReplyWatchByMessageParams

type GetReplyWatchByMessageParams struct {
	TargetSessionID string `json:"target_session_id"`
	MessageID       string `json:"message_id"`
}

type GetRunReviewByRunRoundAttemptParams

type GetRunReviewByRunRoundAttemptParams struct {
	RunID       string `json:"run_id"`
	ReviewRound int64  `json:"review_round"`
	Attempt     int64  `json:"attempt"`
}

type GetSchedulerPauseRow

type GetSchedulerPauseRow struct {
	Paused    int64          `json:"paused"`
	PausedBy  string         `json:"paused_by"`
	PausedAt  sql.NullString `json:"paused_at"`
	Reason    string         `json:"reason"`
	UpdatedAt string         `json:"updated_at"`
}

type GetSessionArchivedAtParams

type GetSessionArchivedAtParams struct {
	WorkspaceID string `json:"workspace_id"`
	ID          string `json:"id"`
}

type GetSessionAttachStateRow

type GetSessionAttachStateRow struct {
	State           string         `json:"state"`
	FailureKind     sql.NullString `json:"failure_kind"`
	StallState      string         `json:"stall_state"`
	AttachedTo      string         `json:"attached_to"`
	AttachExpiresAt sql.NullString `json:"attach_expires_at"`
}

type GetSessionCreationIdentityRow

type GetSessionCreationIdentityRow struct {
	WorkspaceID        string         `json:"workspace_id"`
	State              string         `json:"state"`
	CreationProfileRef sql.NullString `json:"creation_profile_ref"`
	PolicySpecDigest   sql.NullString `json:"policy_spec_digest"`
	CreationDigest     sql.NullString `json:"creation_digest"`
}

type GetSessionDerivationParams

type GetSessionDerivationParams struct {
	WorkspaceID    string `json:"workspace_id"`
	IdempotencyKey string `json:"idempotency_key"`
	ProfileID      string `json:"profile_id"`
}

type GetSessionInputQueueEntryParams

type GetSessionInputQueueEntryParams struct {
	SessionID string `json:"session_id"`
	ID        string `json:"id"`
}

type GetSessionLayoutOwnerParams

type GetSessionLayoutOwnerParams struct {
	WorkspaceID string `json:"workspace_id"`
	ID          string `json:"id"`
}

type GetSessionLayoutOwnerRow

type GetSessionLayoutOwnerRow struct {
	ProfileID string         `json:"profile_id"`
	SpawnRole sql.NullString `json:"spawn_role"`
}

type GetSessionPromptAdmissionByIdempotencyKeyParams

type GetSessionPromptAdmissionByIdempotencyKeyParams struct {
	WorkspaceID    string `json:"workspace_id"`
	SessionID      string `json:"session_id"`
	IdempotencyKey string `json:"idempotency_key"`
}

type GetSessionPromptAdmissionByMessageIDParams

type GetSessionPromptAdmissionByMessageIDParams struct {
	WorkspaceID string `json:"workspace_id"`
	SessionID   string `json:"session_id"`
	MessageID   string `json:"message_id"`
}

type GetSkillExposureByOwnerTargetParams

type GetSkillExposureByOwnerTargetParams struct {
	SkillName   string         `json:"skill_name"`
	OwnerScope  string         `json:"owner_scope"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	TargetSlug  string         `json:"target_slug"`
}

type GetSoulRevisionForRollbackParams

type GetSoulRevisionForRollbackParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
	ID          string `json:"id"`
}

type GetSoulSnapshotByDigestParams

type GetSoulSnapshotByDigestParams struct {
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	Digest      string `json:"digest"`
}

type GetSubagentByKeyParams

type GetSubagentByKeyParams struct {
	ParentSessionID string `json:"parent_session_id"`
	IdempotencyKey  string `json:"idempotency_key"`
}

type GetSyntheticSessionInputByMessageParams

type GetSyntheticSessionInputByMessageParams struct {
	SessionID string `json:"session_id"`
	MessageID string `json:"message_id"`
}

type GetTaskBlockParams

type GetTaskBlockParams struct {
	ID          string `json:"id"`
	TaskID      string `json:"task_id"`
	WorkspaceID any    `json:"workspace_id"`
}

type GetTaskBlockRecurrenceParams

type GetTaskBlockRecurrenceParams struct {
	TaskID string `json:"task_id"`
	Kind   string `json:"kind"`
}

type GetTaskEventRecordRow

type GetTaskEventRecordRow struct {
	EventSeq    int64          `json:"event_seq"`
	ID          string         `json:"id"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type GetTaskExecutionProfileRow

type GetTaskExecutionProfileRow struct {
	TaskID                string `json:"task_id"`
	CoordinatorMode       string `json:"coordinator_mode"`
	CoordinatorAgentName  string `json:"coordinator_agent_name"`
	CoordinatorProvider   string `json:"coordinator_provider"`
	CoordinatorModel      string `json:"coordinator_model"`
	CoordinatorGuidance   string `json:"coordinator_guidance"`
	WorkerMode            string `json:"worker_mode"`
	WorkerAgentName       string `json:"worker_agent_name"`
	WorkerProvider        string `json:"worker_provider"`
	WorkerModel           string `json:"worker_model"`
	WorkerReasoningEffort string `json:"worker_reasoning_effort"`
	WorkerSpeed           string `json:"worker_speed"`
	WorkerAcpOptionsJson  string `json:"worker_acp_options_json"`
	ReviewAgentName       string `json:"review_agent_name"`
	ReviewProvider        string `json:"review_provider"`
	ReviewModel           string `json:"review_model"`
	ReviewReasoningEffort string `json:"review_reasoning_effort"`
	ReviewSpeed           string `json:"review_speed"`
	ReviewAcpOptionsJson  string `json:"review_acp_options_json"`
	WorktreeMode          string `json:"worktree_mode"`
	WorktreeRef           string `json:"worktree_ref"`
	RuntimeMode           string `json:"runtime_mode"`
	CreatedAt             string `json:"created_at"`
	UpdatedAt             string `json:"updated_at"`
}

type GetTaskRow

type GetTaskRow struct {
	GrantCeiling         string         `json:"grant_ceiling"`
	ID                   string         `json:"id"`
	ProfileID            string         `json:"profile_id"`
	Identifier           sql.NullString `json:"identifier"`
	Scope                string         `json:"scope"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
	ParentTaskID         sql.NullString `json:"parent_task_id"`
	Title                string         `json:"title"`
	Description          sql.NullString `json:"description"`
	Priority             string         `json:"priority"`
	MaxAttempts          int64          `json:"max_attempts"`
	AutoEnqueueOnReady   int64          `json:"auto_enqueue_on_ready"`
	Status               string         `json:"status"`
	ApprovalPolicy       string         `json:"approval_policy"`
	ApprovalState        string         `json:"approval_state"`
	OwnerKind            sql.NullString `json:"owner_kind"`
	OwnerRef             sql.NullString `json:"owner_ref"`
	CreatedByKind        string         `json:"created_by_kind"`
	CreatedByRef         string         `json:"created_by_ref"`
	OriginKind           string         `json:"origin_kind"`
	OriginRef            string         `json:"origin_ref"`
	CreatedAt            string         `json:"created_at"`
	UpdatedAt            string         `json:"updated_at"`
	ClosedAt             sql.NullString `json:"closed_at"`
	CurrentRunID         sql.NullString `json:"current_run_id"`
	LatestEventSeq       int64          `json:"latest_event_seq"`
	Paused               int64          `json:"paused"`
	PausedBy             string         `json:"paused_by"`
	PausedAt             sql.NullString `json:"paused_at"`
	PausedReason         string         `json:"paused_reason"`
	NeedsAttentionReason sql.NullString `json:"needs_attention_reason"`
	NeedsAttentionAt     sql.NullString `json:"needs_attention_at"`
	NeedsAttentionByKind sql.NullString `json:"needs_attention_by_kind"`
	NeedsAttentionByRef  sql.NullString `json:"needs_attention_by_ref"`
	WakeCreator          int64          `json:"wake_creator"`
	MetadataJson         sql.NullString `json:"metadata_json"`
}

type GetTaskRunIDByIdempotencyParams

type GetTaskRunIDByIdempotencyParams struct {
	IdempotencyKey string `json:"idempotency_key"`
	OriginKind     string `json:"origin_kind"`
	OriginRef      string `json:"origin_ref"`
}

type GetTaskRunIdempotencyParams

type GetTaskRunIdempotencyParams struct {
	IdempotencyKey string `json:"idempotency_key"`
	OriginKind     string `json:"origin_kind"`
	OriginRef      string `json:"origin_ref"`
}

type GetTaskRunIdempotencyRow

type GetTaskRunIdempotencyRow struct {
	IdempotencyKey string `json:"idempotency_key"`
	RunID          string `json:"run_id"`
	OriginKind     string `json:"origin_kind"`
	OriginRef      string `json:"origin_ref"`
	CreatedAt      string `json:"created_at"`
}

type GetTaskRunProjectionIdentityRow

type GetTaskRunProjectionIdentityRow struct {
	TaskID             string `json:"task_id"`
	DesignationGroupID string `json:"designation_group_id"`
}

type GetTaskRunRow

type GetTaskRunRow struct {
	ID                   string         `json:"id"`
	TaskID               string         `json:"task_id"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
	WorktreeID           sql.NullString `json:"worktree_id"`
	RunKind              string         `json:"run_kind"`
	LoopRunID            sql.NullString `json:"loop_run_id"`
	Status               string         `json:"status"`
	Attempt              int64          `json:"attempt"`
	RecoveryCount        int64          `json:"recovery_count"`
	PreviousRunID        sql.NullString `json:"previous_run_id"`
	FailureKind          string         `json:"failure_kind"`
	ClaimedByKind        sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef         sql.NullString `json:"claimed_by_ref"`
	SessionID            sql.NullString `json:"session_id"`
	OriginKind           string         `json:"origin_kind"`
	OriginRef            string         `json:"origin_ref"`
	IdempotencyKey       sql.NullString `json:"idempotency_key"`
	DesignationGroupID   string         `json:"designation_group_id"`
	ResolvedWorktreeMode string         `json:"resolved_worktree_mode"`
	ResolvedWorktreeRef  string         `json:"resolved_worktree_ref"`
	ClaimToken           string         `json:"claim_token"`
	ClaimTokenHash       sql.NullString `json:"claim_token_hash"`
	LeaseUntil           sql.NullString `json:"lease_until"`
	HeartbeatAt          sql.NullString `json:"heartbeat_at"`
	QueuedAt             string         `json:"queued_at"`
	ClaimedAt            sql.NullString `json:"claimed_at"`
	StartedAt            sql.NullString `json:"started_at"`
	EndedAt              sql.NullString `json:"ended_at"`
	TokensUsed           int64          `json:"tokens_used"`
	Error                sql.NullString `json:"error"`
	MetadataJson         sql.NullString `json:"metadata_json"`
	ResultJson           sql.NullString `json:"result_json"`
	ReviewRequired       bool           `json:"review_required"`
	ReviewRequestRound   int64          `json:"review_request_round"`
	ReviewPolicySnapshot string         `json:"review_policy_snapshot"`
	ReviewRequestID      sql.NullString `json:"review_request_id"`
	ParentRunID          sql.NullString `json:"parent_run_id"`
	ReviewID             sql.NullString `json:"review_id"`
	ReviewRound          int64          `json:"review_round"`
	ContinuationReason   string         `json:"continuation_reason"`
	MissingWorkJson      string         `json:"missing_work_json"`
	NextRoundGuidance    string         `json:"next_round_guidance"`
}

type GetTaskRunTerminalCommandByScopeParams

type GetTaskRunTerminalCommandByScopeParams struct {
	RunID       string `json:"run_id"`
	TaskID      string `json:"task_id"`
	WorkspaceID string `json:"workspace_id"`
}

type GetTaskTriageStateParams

type GetTaskTriageStateParams struct {
	TaskID    string `json:"task_id"`
	ActorKind string `json:"actor_kind"`
	ActorID   string `json:"actor_id"`
}

type GetWorktreeByIDParams

type GetWorktreeByIDParams struct {
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type GetWorktreeByNameParams

type GetWorktreeByNameParams struct {
	WorkspaceID string `json:"workspace_id"`
	Name        string `json:"name"`
}

type GetWorktreeStatusParams

type GetWorktreeStatusParams struct {
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type GoalRunWorkspaceExistsParams

type GoalRunWorkspaceExistsParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type GrantGoalCheckpointControlParams

type GrantGoalCheckpointControlParams struct {
	TurnLimit            int64          `json:"turn_limit"`
	ControlGrantID       int64          `json:"control_grant_id"`
	ControlGrantKind     sql.NullString `json:"control_grant_kind"`
	ControlGrantCause    sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn     sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope    sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed int64          `json:"control_grant_consumed"`
	UpdatedAt            string         `json:"updated_at"`
	LoopRunID            string         `json:"loop_run_id"`
	Generation           int64          `json:"generation"`
	NodeID               string         `json:"node_id"`
	ItemIndex            int64          `json:"item_index"`
	ControlEpoch         int64          `json:"control_epoch"`
}

type HasClearedTaskBlockKindParams

type HasClearedTaskBlockKindParams struct {
	TaskID      string `json:"task_id"`
	Kind        string `json:"kind"`
	WorkspaceID any    `json:"workspace_id"`
}

type HasExpiredObservabilityParams

type HasExpiredObservabilityParams struct {
	Cutoff    string `json:"cutoff"`
	CutoffDay string `json:"cutoff_day"`
}

type HasOpenTaskBlocksParams

type HasOpenTaskBlocksParams struct {
	TaskID      string         `json:"task_id"`
	WorkspaceID any            `json:"workspace_id"`
	Now         sql.NullString `json:"now"`
}

type HasSubagentCommittedAdmissionParams

type HasSubagentCommittedAdmissionParams struct {
	WorkspaceID string `json:"workspace_id"`
	SessionID   string `json:"session_id"`
	SubagentID  string `json:"subagent_id"`
}

type HeartbeatTaskRunLeaseParams

type HeartbeatTaskRunLeaseParams struct {
	LeaseUntil     sql.NullString `json:"lease_until"`
	HeartbeatAt    sql.NullString `json:"heartbeat_at"`
	ClaimToken     sql.NullString `json:"claim_token"`
	TokensUsed     int64          `json:"tokens_used"`
	ID             string         `json:"id"`
	ClaimTokenHash sql.NullString `json:"claim_token_hash"`
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
}

type HydrateAutomationJobCatalogRow

type HydrateAutomationJobCatalogRow struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ProfileID        string         `json:"profile_id"`
	ID               string         `json:"id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Schedule         sql.NullString `json:"schedule"`
	Task             sql.NullString `json:"task"`
	Enabled          any            `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type HydrateAutomationTriggerCatalogRow

type HydrateAutomationTriggerCatalogRow struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ProfileID        string         `json:"profile_id"`
	ID               string         `json:"id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Event            string         `json:"event"`
	Filter           sql.NullString `json:"filter"`
	Enabled          any            `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	WebhookID        sql.NullString `json:"webhook_id"`
	EndpointSlug     sql.NullString `json:"endpoint_slug"`
	WebhookSecretRef sql.NullString `json:"webhook_secret_ref"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type IncrementTaskBlockRecurrenceParams

type IncrementTaskBlockRecurrenceParams struct {
	TaskID    string `json:"task_id"`
	Kind      string `json:"kind"`
	UpdatedAt string `json:"updated_at"`
}

type InheritSubagentWakeAttemptsParams

type InheritSubagentWakeAttemptsParams struct {
	ParentID string `json:"parent_id"`
	Ids      any    `json:"ids"`
	WakeID   string `json:"wake_id"`
}

type InsertAppMetadataIfAbsentParams

type InsertAppMetadataIfAbsentParams struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	UpdatedAt string `json:"updated_at"`
}

type InsertAppTokenOriginParams

type InsertAppTokenOriginParams struct {
	DeviceID  string `json:"device_id"`
	Origin    string `json:"origin"`
	CreatedAt string `json:"created_at"`
}

type InsertAttentionWorkspaceMuteParams

type InsertAttentionWorkspaceMuteParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type InsertAutomationJobParams

type InsertAutomationJobParams struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ProfileID        string         `json:"profile_id"`
	ID               string         `json:"id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Schedule         sql.NullString `json:"schedule"`
	Task             sql.NullString `json:"task"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type InsertAutomationRunParams

type InsertAutomationRunParams struct {
	WorkspaceID     sql.NullString `json:"workspace_id"`
	Attribution     string         `json:"attribution"`
	ID              string         `json:"id"`
	ProfileID       sql.NullString `json:"profile_id"`
	JobID           sql.NullString `json:"job_id"`
	TriggerID       sql.NullString `json:"trigger_id"`
	SessionID       sql.NullString `json:"session_id"`
	TaskID          sql.NullString `json:"task_id"`
	TaskRunID       sql.NullString `json:"task_run_id"`
	FireID          sql.NullString `json:"fire_id"`
	Status          string         `json:"status"`
	Attempt         int64          `json:"attempt"`
	ScheduledAt     sql.NullString `json:"scheduled_at"`
	StartedAt       sql.NullString `json:"started_at"`
	EndedAt         sql.NullString `json:"ended_at"`
	Error           sql.NullString `json:"error"`
	DeliveryError   sql.NullString `json:"delivery_error"`
	DeliveryErrorAt sql.NullString `json:"delivery_error_at"`
	LoopRunID       sql.NullString `json:"loop_run_id"`
	MetadataJson    string         `json:"metadata_json"`
}

type InsertAutomationSuggestionEventSummaryParams

type InsertAutomationSuggestionEventSummaryParams struct {
	ProfileID   string         `json:"profile_id"`
	ID          string         `json:"id"`
	WorkspaceID string         `json:"workspace_id"`
	Type        string         `json:"type"`
	ContentJson string         `json:"content_json"`
	ActorID     string         `json:"actor_id"`
	Outcome     string         `json:"outcome"`
	Summary     sql.NullString `json:"summary"`
	Timestamp   string         `json:"timestamp"`
}

type InsertAutomationSuggestionParams

type InsertAutomationSuggestionParams struct {
	ProfileID   string         `json:"profile_id"`
	ID          string         `json:"id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	Source      string         `json:"source"`
	DedupKey    string         `json:"dedup_key"`
	Status      string         `json:"status"`
	Payload     string         `json:"payload"`
	CreatedAt   string         `json:"created_at"`
	ResolvedAt  sql.NullString `json:"resolved_at"`
}

type InsertAutomationTriggerCatalogTermsParams

type InsertAutomationTriggerCatalogTermsParams struct {
	TriggerID string `json:"trigger_id"`
	TermsJson any    `json:"terms_json"`
}

type InsertAutomationTriggerParams

type InsertAutomationTriggerParams struct {
	GrantCeiling     string         `json:"grant_ceiling"`
	ProfileID        string         `json:"profile_id"`
	ID               string         `json:"id"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Event            string         `json:"event"`
	Filter           sql.NullString `json:"filter"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	WebhookID        sql.NullString `json:"webhook_id"`
	EndpointSlug     sql.NullString `json:"endpoint_slug"`
	WebhookSecretRef sql.NullString `json:"webhook_secret_ref"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type InsertEventSummaryParams

type InsertEventSummaryParams struct {
	ProfileID            string         `json:"profile_id"`
	ID                   string         `json:"id"`
	SessionID            string         `json:"session_id"`
	WorkspaceID          string         `json:"workspace_id"`
	WorktreeID           string         `json:"worktree_id"`
	Type                 string         `json:"type"`
	AgentName            string         `json:"agent_name"`
	ContentJson          string         `json:"content_json"`
	TaskID               string         `json:"task_id"`
	RunID                string         `json:"run_id"`
	WorkflowID           string         `json:"workflow_id"`
	ClaimTokenHash       string         `json:"claim_token_hash"`
	LeaseUntil           string         `json:"lease_until"`
	CoordinatorSessionID string         `json:"coordinator_session_id"`
	SchedulerReason      string         `json:"scheduler_reason"`
	HookEvent            string         `json:"hook_event"`
	HookName             string         `json:"hook_name"`
	ActorKind            string         `json:"actor_kind"`
	ActorID              string         `json:"actor_id"`
	ReleaseReason        string         `json:"release_reason"`
	ParentSessionID      string         `json:"parent_session_id"`
	RootSessionID        string         `json:"root_session_id"`
	SpawnDepth           int64          `json:"spawn_depth"`
	Provider             string         `json:"provider"`
	Outcome              string         `json:"outcome"`
	Summary              sql.NullString `json:"summary"`
	Timestamp            string         `json:"timestamp"`
}

type InsertExtensionMCPAllocationParams

type InsertExtensionMCPAllocationParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	Server      string `json:"server"`
	RuntimeName string `json:"runtime_name"`
	UpdatedAt   string `json:"updated_at"`
}

type InsertGoalBindingRetryWitnessParams

type InsertGoalBindingRetryWitnessParams struct {
	LoopRunID          string `json:"loop_run_id"`
	Handle             string `json:"handle"`
	FailedBindingEpoch int64  `json:"failed_binding_epoch"`
	RequestDigest      string `json:"request_digest"`
	CreatedAt          string `json:"created_at"`
}

type InsertGoalCheckpointParams

type InsertGoalCheckpointParams struct {
	LoopRunID                   string         `json:"loop_run_id"`
	Generation                  int64          `json:"generation"`
	NodeID                      string         `json:"node_id"`
	ItemIndex                   int64          `json:"item_index"`
	ControlEpoch                int64          `json:"control_epoch"`
	ControlActorKind            sql.NullString `json:"control_actor_kind"`
	ControlActorID              sql.NullString `json:"control_actor_id"`
	ControlRequestedAt          sql.NullString `json:"control_requested_at"`
	Phase                       string         `json:"phase"`
	GoalStatus                  string         `json:"goal_status"`
	ControlCause                sql.NullString `json:"control_cause"`
	TurnsUsed                   int64          `json:"turns_used"`
	TurnLimit                   int64          `json:"turn_limit"`
	BrokenStreak                int64          `json:"broken_streak"`
	RecoveryStreak              int64          `json:"recovery_streak"`
	TaskRunID                   sql.NullString `json:"task_run_id"`
	QueueEntryID                sql.NullString `json:"queue_entry_id"`
	PromptID                    sql.NullString `json:"prompt_id"`
	PromptKind                  sql.NullString `json:"prompt_kind"`
	PromptAttempt               int64          `json:"prompt_attempt"`
	ContextState                string         `json:"context_state"`
	UsageSequence               sql.NullInt64  `json:"usage_sequence"`
	UsagePendingAfterSequence   sql.NullInt64  `json:"usage_pending_after_sequence"`
	CompactionBaselineUsed      sql.NullInt64  `json:"compaction_baseline_used"`
	CompactionRecoveryRequired  int64          `json:"compaction_recovery_required"`
	SessionID                   sql.NullString `json:"session_id"`
	BindingHandle               sql.NullString `json:"binding_handle"`
	BindingEpoch                sql.NullInt64  `json:"binding_epoch"`
	ContextNudgeRatio           float64        `json:"context_nudge_ratio"`
	ControlGrantID              int64          `json:"control_grant_id"`
	ControlGrantKind            sql.NullString `json:"control_grant_kind"`
	ControlGrantCause           sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn            sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope           sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed        int64          `json:"control_grant_consumed"`
	JudgeAttemptID              sql.NullString `json:"judge_attempt_id"`
	CompactionCancelPromptID    sql.NullString `json:"compaction_cancel_prompt_id"`
	CompactionCancelCause       sql.NullString `json:"compaction_cancel_cause"`
	CompactionCancelRequestedAt sql.NullString `json:"compaction_cancel_requested_at"`
	ReportPromptID              sql.NullString `json:"report_prompt_id"`
	ReportStatus                sql.NullString `json:"report_status"`
	ReportEvidenceRef           sql.NullString `json:"report_evidence_ref"`
	ReportBindingEpoch          sql.NullInt64  `json:"report_binding_epoch"`
	ReportActorKind             sql.NullString `json:"report_actor_kind"`
	ReportActorID               sql.NullString `json:"report_actor_id"`
	ReportRecordedAt            sql.NullString `json:"report_recorded_at"`
	UpdatedAt                   string         `json:"updated_at"`
}

type InsertGoalJudgeAttemptParams

type InsertGoalJudgeAttemptParams struct {
	AttemptID       string `json:"attempt_id"`
	LoopRunID       string `json:"loop_run_id"`
	Generation      int64  `json:"generation"`
	NodeID          string `json:"node_id"`
	ItemIndex       int64  `json:"item_index"`
	Turn            int64  `json:"turn"`
	JudgeDigest     string `json:"judge_digest"`
	UsageBaseTokens int64  `json:"usage_base_tokens"`
	StartedAt       string `json:"started_at"`
}

type InsertGoalSessionBindingAttemptParams

type InsertGoalSessionBindingAttemptParams struct {
	LoopRunID          string `json:"loop_run_id"`
	Handle             string `json:"handle"`
	BindingEpoch       int64  `json:"binding_epoch"`
	BindingAttemptID   string `json:"binding_attempt_id"`
	SessionID          string `json:"session_id"`
	WorkspaceID        string `json:"workspace_id"`
	CreationProfileRef string `json:"creation_profile_ref"`
	PolicySpecDigest   string `json:"policy_spec_digest"`
	CreationDigest     string `json:"creation_digest"`
	CreatedAt          string `json:"created_at"`
}

type InsertHeartbeatRevisionParams

type InsertHeartbeatRevisionParams struct {
	ID             string         `json:"id"`
	WorkspaceID    string         `json:"workspace_id"`
	AgentName      string         `json:"agent_name"`
	SourcePath     string         `json:"source_path"`
	Operation      string         `json:"operation"`
	PreviousDigest sql.NullString `json:"previous_digest"`
	NewDigest      sql.NullString `json:"new_digest"`
	NewSnapshotID  sql.NullString `json:"new_snapshot_id"`
	Body           sql.NullString `json:"body"`
	ActorKind      string         `json:"actor_kind"`
	ActorID        string         `json:"actor_id"`
	CreatedAt      string         `json:"created_at"`
}

type InsertHeartbeatSnapshotParams

type InsertHeartbeatSnapshotParams struct {
	ID              string `json:"id"`
	WorkspaceID     string `json:"workspace_id"`
	AgentName       string `json:"agent_name"`
	SourcePath      string `json:"source_path"`
	SchemaVersion   int64  `json:"schema_version"`
	Digest          string `json:"digest"`
	ConfigDigest    string `json:"config_digest"`
	Body            string `json:"body"`
	FrontmatterJson string `json:"frontmatter_json"`
	ResolvedJson    string `json:"resolved_json"`
	DiagnosticsJson string `json:"diagnostics_json"`
	CreatedAt       string `json:"created_at"`
}

type InsertHeartbeatWakeEventParams

type InsertHeartbeatWakeEventParams struct {
	ID                string         `json:"id"`
	WorkspaceID       string         `json:"workspace_id"`
	AgentName         string         `json:"agent_name"`
	SessionID         sql.NullString `json:"session_id"`
	PolicySnapshotID  sql.NullString `json:"policy_snapshot_id"`
	Source            string         `json:"source"`
	Result            string         `json:"result"`
	Reason            string         `json:"reason"`
	SyntheticPromptID sql.NullString `json:"synthetic_prompt_id"`
	CreatedAt         string         `json:"created_at"`
	ExpiresAt         string         `json:"expires_at"`
}

type InsertLoopConfigIfMissingParams

type InsertLoopConfigIfMissingParams struct {
	ProfileID           string         `json:"profile_id"`
	WorkspaceID         string         `json:"workspace_id"`
	LoopName            string         `json:"loop_name"`
	HumanGateEnabled    int64          `json:"human_gate_enabled"`
	ReattemptStrategy   sql.NullString `json:"reattempt_strategy"`
	EnabledChecksJson   string         `json:"enabled_checks_json"`
	IterationCap        sql.NullInt64  `json:"iteration_cap"`
	BudgetTokens        sql.NullInt64  `json:"budget_tokens"`
	BudgetWallSec       sql.NullInt64  `json:"budget_wall_sec"`
	BudgetOnExceeded    sql.NullString `json:"budget_on_exceeded"`
	NoProgressWindow    sql.NullInt64  `json:"no_progress_window"`
	FanOutWidth         sql.NullInt64  `json:"fan_out_width"`
	GateMaxRevisions    sql.NullInt64  `json:"gate_max_revisions"`
	RuntimeDefaultsJson sql.NullString `json:"runtime_defaults_json"`
	RuntimeRulesJson    sql.NullString `json:"runtime_rules_json"`
	EnvironmentJson     sql.NullString `json:"environment_json"`
}

type InsertLoopEffectOutboxParams

type InsertLoopEffectOutboxParams struct {
	LoopRunID     string    `json:"loop_run_id"`
	DeliveryID    string    `json:"delivery_id"`
	SourceEventID string    `json:"source_event_id"`
	Trigger       string    `json:"trigger"`
	Generation    int64     `json:"generation"`
	NodeID        string    `json:"node_id"`
	ItemIndex     int64     `json:"item_index"`
	EntryIndex    int64     `json:"entry_index"`
	EntryJson     string    `json:"entry_json"`
	CreatedAt     time.Time `json:"created_at"`
}

type InsertLoopGateVerdictParams

type InsertLoopGateVerdictParams struct {
	LoopRunID          string          `json:"loop_run_id"`
	Generation         int64           `json:"generation"`
	GateID             string          `json:"gate_id"`
	ItemIndex          int64           `json:"item_index"`
	Outcome            string          `json:"outcome"`
	Score              sql.NullFloat64 `json:"score"`
	RouteCauseRank     sql.NullInt64   `json:"route_cause_rank"`
	BlockingIssuesJson string          `json:"blocking_issues_json"`
	CriteriaJson       string          `json:"criteria_json"`
	DecidedAt          time.Time       `json:"decided_at"`
}

type InsertLoopGenerationParams

type InsertLoopGenerationParams struct {
	LoopRunID        string    `json:"loop_run_id"`
	Generation       int64     `json:"generation"`
	ParentGeneration int64     `json:"parent_generation"`
	Origin           string    `json:"origin"`
	CreatedAt        time.Time `json:"created_at"`
}

type InsertLoopRunEventParams

type InsertLoopRunEventParams struct {
	ID          string    `json:"id"`
	LoopRunID   string    `json:"loop_run_id"`
	WorkspaceID string    `json:"workspace_id"`
	Seq         int64     `json:"seq"`
	Kind        string    `json:"kind"`
	PayloadJson string    `json:"payload_json"`
	At          time.Time `json:"at"`
}

type InsertLoopRunParams

type InsertLoopRunParams struct {
	GrantCeiling             string         `json:"grant_ceiling"`
	ProfileID                string         `json:"profile_id"`
	ID                       string         `json:"id"`
	WorkspaceID              string         `json:"workspace_id"`
	LoopName                 string         `json:"loop_name"`
	Status                   string         `json:"status"`
	Historical               int64          `json:"historical"`
	Generation               int64          `json:"generation"`
	ReattemptStrategy        string         `json:"reattempt_strategy"`
	CreatedAt                string         `json:"created_at"`
	StartedAt                string         `json:"started_at"`
	LastProgressAt           time.Time      `json:"last_progress_at"`
	DefinitionVersion        int64          `json:"definition_version"`
	DefinitionDigest         string         `json:"definition_digest"`
	ActiveGateID             string         `json:"active_gate_id"`
	ActiveHumanCriteriaJson  string         `json:"active_human_criteria_json"`
	BudgetApprovalSeq        int64          `json:"budget_approval_seq"`
	StartMetadataJson        string         `json:"start_metadata_json"`
	IterationCap             int64          `json:"iteration_cap"`
	BudgetTokens             int64          `json:"budget_tokens"`
	BudgetWallSec            int64          `json:"budget_wall_sec"`
	BudgetOnExceeded         string         `json:"budget_on_exceeded"`
	TokensUsed               int64          `json:"tokens_used"`
	ParentLoopRunID          sql.NullString `json:"parent_loop_run_id"`
	PauseRequested           int64          `json:"pause_requested"`
	InputsJson               string         `json:"inputs_json"`
	StartedByKind            string         `json:"started_by_kind"`
	StartedByRef             string         `json:"started_by_ref"`
	StartedOriginKind        string         `json:"started_origin_kind"`
	StartedOriginRef         string         `json:"started_origin_ref"`
	GoalContextNudgeRatio    float64        `json:"goal_context_nudge_ratio"`
	OriginKind               string         `json:"origin_kind"`
	OriginSessionID          sql.NullString `json:"origin_session_id"`
	OriginCreationProfileRef sql.NullString `json:"origin_creation_profile_ref"`
	OriginPolicySpecDigest   sql.NullString `json:"origin_policy_spec_digest"`
	OriginCreationDigest     sql.NullString `json:"origin_creation_digest"`
}

type InsertLoopUIAnnotationParams

type InsertLoopUIAnnotationParams struct {
	ProfileID   string  `json:"profile_id"`
	WorkspaceID string  `json:"workspace_id"`
	LoopName    string  `json:"loop_name"`
	NodeID      string  `json:"node_id"`
	X           float64 `json:"x"`
	Y           float64 `json:"y"`
}

type InsertMarketplaceCatalogEntryParams

type InsertMarketplaceCatalogEntryParams struct {
	Source         string         `json:"source"`
	EntryID        string         `json:"entry_id"`
	Name           string         `json:"name"`
	Description    string         `json:"description"`
	Version        string         `json:"version"`
	PublishedAt    sql.NullString `json:"published_at"`
	UpdatedAt      sql.NullString `json:"updated_at"`
	DigestSha256   sql.NullString `json:"digest_sha256"`
	Tier           sql.NullString `json:"tier"`
	InstallSlug    sql.NullString `json:"install_slug"`
	PayloadJson    string         `json:"payload_json"`
	FetchedAt      string         `json:"fetched_at"`
	Layout         string         `json:"layout"`
	Icon           string         `json:"icon"`
	Installable    int64          `json:"installable"`
	InstallBlocker string         `json:"install_blocker"`
	ResolvedRef    string         `json:"resolved_ref"`
}

type InsertModelCatalogOptionParams

type InsertModelCatalogOptionParams struct {
	ContextID      string         `json:"context_id"`
	SourceID       string         `json:"source_id"`
	ProviderID     string         `json:"provider_id"`
	ModelID        string         `json:"model_id"`
	OptionID       string         `json:"option_id"`
	Label          string         `json:"label"`
	Description    string         `json:"description"`
	Category       string         `json:"category"`
	Kind           string         `json:"kind"`
	CurrentValueID sql.NullString `json:"current_value_id"`
	CurrentBool    sql.NullInt64  `json:"current_bool"`
}

type InsertModelCatalogOptionValueParams

type InsertModelCatalogOptionValueParams struct {
	ContextID   string `json:"context_id"`
	SourceID    string `json:"source_id"`
	ProviderID  string `json:"provider_id"`
	ModelID     string `json:"model_id"`
	OptionID    string `json:"option_id"`
	ValueID     string `json:"value_id"`
	Label       string `json:"label"`
	Description string `json:"description"`
	GroupID     string `json:"group_id"`
	GroupLabel  string `json:"group_label"`
	Rank        int64  `json:"rank"`
}

type InsertModelCatalogReasoningEffortParams

type InsertModelCatalogReasoningEffortParams struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
	ModelID    string `json:"model_id"`
	Effort     string `json:"effort"`
	Rank       int64  `json:"rank"`
}

type InsertModelCatalogRowParams

type InsertModelCatalogRowParams struct {
	ContextID                string          `json:"context_id"`
	SourceID                 string          `json:"source_id"`
	ProviderID               string          `json:"provider_id"`
	ModelID                  string          `json:"model_id"`
	SourceKind               string          `json:"source_kind"`
	Priority                 int64           `json:"priority"`
	Available                sql.NullInt64   `json:"available"`
	Stale                    int64           `json:"stale"`
	RefreshedAt              string          `json:"refreshed_at"`
	ExpiresAt                string          `json:"expires_at"`
	DisplayName              string          `json:"display_name"`
	ContextWindow            sql.NullInt64   `json:"context_window"`
	MaxInputTokens           sql.NullInt64   `json:"max_input_tokens"`
	MaxOutputTokens          sql.NullInt64   `json:"max_output_tokens"`
	SupportsTools            sql.NullInt64   `json:"supports_tools"`
	SupportsReasoning        sql.NullInt64   `json:"supports_reasoning"`
	DefaultReasoningEffort   sql.NullString  `json:"default_reasoning_effort"`
	CostInputPerMillion      sql.NullFloat64 `json:"cost_input_per_million"`
	CostOutputPerMillion     sql.NullFloat64 `json:"cost_output_per_million"`
	CostCacheReadPerMillion  sql.NullFloat64 `json:"cost_cache_read_per_million"`
	CostCacheWritePerMillion sql.NullFloat64 `json:"cost_cache_write_per_million"`
	CostReasoningPerMillion  sql.NullFloat64 `json:"cost_reasoning_per_million"`
	ExplicitlyCurated        int64           `json:"explicitly_curated"`
	Deprecated               int64           `json:"deprecated"`
	Hidden                   int64           `json:"hidden"`
	Featured                 int64           `json:"featured"`
	DeprecatedSet            int64           `json:"deprecated_set"`
	HiddenSet                int64           `json:"hidden_set"`
	FeaturedSet              int64           `json:"featured_set"`
	ReleaseDate              sql.NullString  `json:"release_date"`
	LastError                string          `json:"last_error"`
}

type InsertModelCatalogTransportBindingParams

type InsertModelCatalogTransportBindingParams struct {
	ContextID         string         `json:"context_id"`
	SourceID          string         `json:"source_id"`
	ProviderID        string         `json:"provider_id"`
	ModelID           string         `json:"model_id"`
	TransportModelID  string         `json:"transport_model_id"`
	Label             string         `json:"label"`
	ReasoningEffort   sql.NullString `json:"reasoning_effort"`
	Fast              sql.NullInt64  `json:"fast"`
	Thinking          sql.NullInt64  `json:"thinking"`
	Rank              int64          `json:"rank"`
	ConfigOptionsJson string         `json:"config_options_json"`
}

type InsertModelCatalogTransportBindingSelectionParams

type InsertModelCatalogTransportBindingSelectionParams struct {
	ContextID        string         `json:"context_id"`
	SourceID         string         `json:"source_id"`
	ProviderID       string         `json:"provider_id"`
	ModelID          string         `json:"model_id"`
	TransportModelID string         `json:"transport_model_id"`
	OptionID         string         `json:"option_id"`
	ValueID          sql.NullString `json:"value_id"`
	BoolValue        sql.NullInt64  `json:"bool_value"`
}

type InsertNotificationCursorParams

type InsertNotificationCursorParams struct {
	ProfileID       string         `json:"profile_id"`
	ScopeKind       string         `json:"scope_kind"`
	WorkspaceID     string         `json:"workspace_id"`
	ConsumerID      string         `json:"consumer_id"`
	StreamName      string         `json:"stream_name"`
	SubjectID       string         `json:"subject_id"`
	LastSequence    int64          `json:"last_sequence"`
	LastDeliveryID  string         `json:"last_delivery_id"`
	LastDeliveredAt sql.NullString `json:"last_delivered_at"`
	UpdatedAt       string         `json:"updated_at"`
}

type InsertOpenGoalTurnParams

type InsertOpenGoalTurnParams struct {
	LoopRunID       string `json:"loop_run_id"`
	Seq             int64  `json:"seq"`
	Generation      int64  `json:"generation"`
	NodeID          string `json:"node_id"`
	ItemIndex       int64  `json:"item_index"`
	Turn            int64  `json:"turn"`
	SessionID       string `json:"session_id"`
	BindingHandle   string `json:"binding_handle"`
	BindingEpoch    int64  `json:"binding_epoch"`
	PromptID        string `json:"prompt_id"`
	PromptAttempt   int64  `json:"prompt_attempt"`
	UsageBaseTokens int64  `json:"usage_base_tokens"`
	ActorKind       string `json:"actor_kind"`
	ActorID         string `json:"actor_id"`
	StartedAt       string `json:"started_at"`
}

type InsertOriginGoalSessionBindingParams

type InsertOriginGoalSessionBindingParams struct {
	LoopRunID          string         `json:"loop_run_id"`
	Handle             string         `json:"handle"`
	BindingAttemptID   string         `json:"binding_attempt_id"`
	SessionID          string         `json:"session_id"`
	WorkspaceID        string         `json:"workspace_id"`
	CreationProfileRef string         `json:"creation_profile_ref"`
	PolicySpecDigest   string         `json:"policy_spec_digest"`
	CreationDigest     string         `json:"creation_digest"`
	CreatedAt          string         `json:"created_at"`
	ActivatedAt        string         `json:"activated_at"`
	AdoptedGeneration  int64          `json:"adopted_generation"`
	AdoptionAttemptID  sql.NullString `json:"adoption_attempt_id"`
}

type InsertPermissionLogParams

type InsertPermissionLogParams struct {
	ID         string `json:"id"`
	SessionID  string `json:"session_id"`
	AgentName  string `json:"agent_name"`
	Action     string `json:"action"`
	Resource   string `json:"resource"`
	Decision   string `json:"decision"`
	PolicyUsed string `json:"policy_used"`
	Timestamp  string `json:"timestamp"`
}

type InsertPreferredTaskRunCapabilityParams

type InsertPreferredTaskRunCapabilityParams struct {
	RunID        string `json:"run_id"`
	CapabilityID string `json:"capability_id"`
}

type InsertPreparedGoalPromptQueueParams

type InsertPreparedGoalPromptQueueParams struct {
	ID                       string         `json:"id"`
	SessionID                string         `json:"session_id"`
	Mode                     string         `json:"mode"`
	Text                     string         `json:"text"`
	TaskRunID                string         `json:"task_run_id"`
	RunGeneration            sql.NullInt64  `json:"run_generation"`
	EnqueuedAt               string         `json:"enqueued_at"`
	UpdatedAt                string         `json:"updated_at"`
	LoopRunID                sql.NullString `json:"loop_run_id"`
	OwnerKind                sql.NullString `json:"owner_kind"`
	OwnerEpoch               sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch             sql.NullInt64  `json:"binding_epoch"`
	PromptID                 sql.NullString `json:"prompt_id"`
	PromptKind               sql.NullString `json:"prompt_kind"`
	PromptAttempt            int64          `json:"prompt_attempt"`
	OperationUsageBaseTokens sql.NullInt64  `json:"operation_usage_base_tokens"`
	RuntimeProvider          string         `json:"runtime_provider"`
	RuntimeModel             string         `json:"runtime_model"`
	RuntimeReasoningEffort   string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed             string         `json:"runtime_speed"`
}

type InsertReplyWatchParams

type InsertReplyWatchParams struct {
	ID                string         `json:"id"`
	WorkspaceID       string         `json:"workspace_id"`
	SenderSessionID   string         `json:"sender_session_id"`
	TargetWorkspaceID string         `json:"target_workspace_id"`
	TargetSessionID   string         `json:"target_session_id"`
	MessageID         string         `json:"message_id"`
	AdmissionID       string         `json:"admission_id"`
	TurnID            sql.NullString `json:"turn_id"`
	QueueEntryID      sql.NullString `json:"queue_entry_id"`
	Hop               int64          `json:"hop"`
	CreatedAt         string         `json:"created_at"`
}

type InsertRequiredTaskRunCapabilityParams

type InsertRequiredTaskRunCapabilityParams struct {
	RunID        string `json:"run_id"`
	CapabilityID string `json:"capability_id"`
}

type InsertRunReviewRequestParams

type InsertRunReviewRequestParams struct {
	ReviewID          string          `json:"review_id"`
	TaskID            string          `json:"task_id"`
	RunID             string          `json:"run_id"`
	ParentReviewID    sql.NullString  `json:"parent_review_id"`
	Policy            string          `json:"policy"`
	ReviewRound       int64           `json:"review_round"`
	Attempt           int64           `json:"attempt"`
	Status            string          `json:"status"`
	Outcome           sql.NullString  `json:"outcome"`
	Confidence        sql.NullFloat64 `json:"confidence"`
	Reason            string          `json:"reason"`
	DeliveryID        sql.NullString  `json:"delivery_id"`
	MissingWorkJson   string          `json:"missing_work_json"`
	NextRoundGuidance string          `json:"next_round_guidance"`
	ReviewText        string          `json:"review_text"`
	ReviewerSessionID sql.NullString  `json:"reviewer_session_id"`
	ReviewerAgentName string          `json:"reviewer_agent_name"`
	ReviewedByKind    string          `json:"reviewed_by_kind"`
	ReviewedByRef     string          `json:"reviewed_by_ref"`
	RequestedAt       string          `json:"requested_at"`
	RoutedAt          sql.NullString  `json:"routed_at"`
	StartedAt         sql.NullString  `json:"started_at"`
	ReviewedAt        sql.NullString  `json:"reviewed_at"`
	DeadlineAt        sql.NullString  `json:"deadline_at"`
	CreatedAt         string          `json:"created_at"`
	UpdatedAt         string          `json:"updated_at"`
}

type InsertSessionCreationProfileParams

type InsertSessionCreationProfileParams struct {
	ProfileRef  string `json:"profile_ref"`
	ProfileJson string `json:"profile_json"`
	CreatedAt   string `json:"created_at"`
}

type InsertSessionDerivationParams

type InsertSessionDerivationParams struct {
	WorkspaceID        string `json:"workspace_id"`
	IdempotencyKey     string `json:"idempotency_key"`
	ProfileID          string `json:"profile_id"`
	RequestFingerprint string `json:"request_fingerprint"`
	SourceSessionID    string `json:"source_session_id"`
	ChildSessionID     string `json:"child_session_id"`
	Kind               string `json:"kind"`
	OutcomeJson        string `json:"outcome_json"`
	CreatedAt          string `json:"created_at"`
}

type InsertSessionFolderParams

type InsertSessionFolderParams struct {
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	Name        string `json:"name"`
	Now         string `json:"now"`
}

type InsertSessionInputClearTraceParams

type InsertSessionInputClearTraceParams struct {
	EntryID         string `json:"entry_id"`
	SessionID       string `json:"session_id"`
	TurnID          string `json:"turn_id"`
	ActorKind       string `json:"actor_kind"`
	ActorID         string `json:"actor_id"`
	QueueGeneration int64  `json:"queue_generation"`
	CreatedAt       string `json:"created_at"`
}

type InsertSessionInputQueueEntryParams

type InsertSessionInputQueueEntryParams struct {
	Priority               int64          `json:"priority"`
	ID                     string         `json:"id"`
	SessionID              string         `json:"session_id"`
	PromptAdmissionID      sql.NullString `json:"prompt_admission_id"`
	MessageID              string         `json:"message_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	TurnID                 string         `json:"turn_id"`
	TargetTurnID           string         `json:"target_turn_id"`
	EventID                string         `json:"event_id"`
	Status                 string         `json:"status"`
	Mode                   string         `json:"mode"`
	Delivery               string         `json:"delivery"`
	SteerDelivery          sql.NullString `json:"steer_delivery"`
	Text                   string         `json:"text"`
	OwnerKind              sql.NullString `json:"owner_kind"`
	SyntheticPromptJson    sql.NullString `json:"synthetic_prompt_json"`
	SkillInvocationsJson   string         `json:"skill_invocations_json"`
	MentionsJson           string         `json:"mentions_json"`
	AttachmentsJson        string         `json:"attachments_json"`
	OriginJson             sql.NullString `json:"origin_json"`
	RuntimeProvider        string         `json:"runtime_provider"`
	RuntimeModel           string         `json:"runtime_model"`
	RuntimeReasoningEffort string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed           string         `json:"runtime_speed"`
	RuntimeAcpOptionsJson  string         `json:"runtime_acp_options_json"`
	SessionGeneration      int64          `json:"session_generation"`
	TaskRunID              string         `json:"task_run_id"`
	RunGeneration          sql.NullInt64  `json:"run_generation"`
	EnqueuedAt             string         `json:"enqueued_at"`
	UpdatedAt              string         `json:"updated_at"`
	OriginClass            string         `json:"origin_class"`
	OriginSessionID        string         `json:"origin_session_id"`
	HumanIngress           int64          `json:"human_ingress"`
}

type InsertSessionPromptAdmissionParams

type InsertSessionPromptAdmissionParams struct {
	ID                     string         `json:"id"`
	WorkspaceID            string         `json:"workspace_id"`
	SessionID              string         `json:"session_id"`
	MessageID              string         `json:"message_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	Operation              string         `json:"operation"`
	FingerprintVersion     string         `json:"fingerprint_version"`
	RequestFingerprint     string         `json:"request_fingerprint"`
	State                  string         `json:"state"`
	Mode                   string         `json:"mode"`
	AuthoredText           string         `json:"authored_text"`
	SkillInvocationsJson   string         `json:"skill_invocations_json"`
	MentionsJson           string         `json:"mentions_json"`
	AttachmentsJson        string         `json:"attachments_json"`
	OriginJson             sql.NullString `json:"origin_json"`
	RuntimeProvider        string         `json:"runtime_provider"`
	RuntimeModel           string         `json:"runtime_model"`
	RuntimeReasoningEffort string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed           string         `json:"runtime_speed"`
	RuntimeAcpOptionsJson  string         `json:"runtime_acp_options_json"`
	TurnID                 string         `json:"turn_id"`
	EventID                string         `json:"event_id"`
	CreatedAt              string         `json:"created_at"`
	UpdatedAt              string         `json:"updated_at"`
	HumanIngress           int64          `json:"human_ingress"`
}

type InsertSoulRevisionParams

type InsertSoulRevisionParams struct {
	ID              string `json:"id"`
	WorkspaceID     string `json:"workspace_id"`
	AgentName       string `json:"agent_name"`
	SourcePath      string `json:"source_path"`
	Action          string `json:"action"`
	PreviousDigest  string `json:"previous_digest"`
	NewDigest       string `json:"new_digest"`
	Body            string `json:"body"`
	DiagnosticsJson string `json:"diagnostics_json"`
	ActorKind       string `json:"actor_kind"`
	ActorID         string `json:"actor_id"`
	OriginKind      string `json:"origin_kind"`
	OriginRef       string `json:"origin_ref"`
	CreatedAt       string `json:"created_at"`
}

type InsertSoulSnapshotParams

type InsertSoulSnapshotParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	SourcePath  string `json:"source_path"`
	Digest      string `json:"digest"`
	ProfileJson string `json:"profile_json"`
	Body        string `json:"body"`
	Truncated   int64  `json:"truncated"`
	CreatedAt   string `json:"created_at"`
}

type InsertSubagentWakeParams

type InsertSubagentWakeParams struct {
	WakeID   string `json:"wake_id"`
	Now      string `json:"now"`
	ParentID string `json:"parent_id"`
}

type InsertTaskBlockParams

type InsertTaskBlockParams struct {
	ID            string         `json:"id"`
	WorkspaceID   sql.NullString `json:"workspace_id"`
	TaskID        string         `json:"task_id"`
	Kind          string         `json:"kind"`
	Reason        string         `json:"reason"`
	DetailsJson   sql.NullString `json:"details_json"`
	CreatedByKind string         `json:"created_by_kind"`
	CreatedByRef  string         `json:"created_by_ref"`
	CreatedAt     string         `json:"created_at"`
	ExpiresAt     sql.NullString `json:"expires_at"`
}

type InsertTaskDependencyParams

type InsertTaskDependencyParams struct {
	TaskID          string `json:"task_id"`
	DependsOnTaskID string `json:"depends_on_task_id"`
	Kind            string `json:"kind"`
	CreatedAt       string `json:"created_at"`
}

type InsertTaskEventParams

type InsertTaskEventParams struct {
	EventSeq    int64          `json:"event_seq"`
	ID          string         `json:"id"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type InsertTaskParams

type InsertTaskParams struct {
	GrantCeiling       string         `json:"grant_ceiling"`
	ProfileID          string         `json:"profile_id"`
	ID                 string         `json:"id"`
	Identifier         sql.NullString `json:"identifier"`
	Scope              string         `json:"scope"`
	WorkspaceID        sql.NullString `json:"workspace_id"`
	ParentTaskID       sql.NullString `json:"parent_task_id"`
	Title              string         `json:"title"`
	Description        sql.NullString `json:"description"`
	Priority           string         `json:"priority"`
	MaxAttempts        int64          `json:"max_attempts"`
	AutoEnqueueOnReady int64          `json:"auto_enqueue_on_ready"`
	Status             string         `json:"status"`
	ApprovalPolicy     string         `json:"approval_policy"`
	ApprovalState      string         `json:"approval_state"`
	OwnerKind          sql.NullString `json:"owner_kind"`
	OwnerRef           sql.NullString `json:"owner_ref"`
	CreatedByKind      string         `json:"created_by_kind"`
	CreatedByRef       string         `json:"created_by_ref"`
	OriginKind         string         `json:"origin_kind"`
	OriginRef          string         `json:"origin_ref"`
	CreatedAt          string         `json:"created_at"`
	UpdatedAt          string         `json:"updated_at"`
	ClosedAt           sql.NullString `json:"closed_at"`
	Paused             int64          `json:"paused"`
	PausedBy           string         `json:"paused_by"`
	PausedAt           sql.NullString `json:"paused_at"`
	PausedReason       string         `json:"paused_reason"`
	WakeCreator        int64          `json:"wake_creator"`
	MetadataJson       sql.NullString `json:"metadata_json"`
}

type InsertTaskProfileAgentParams

type InsertTaskProfileAgentParams struct {
	TaskID     string `json:"task_id"`
	Role       string `json:"role"`
	Preference string `json:"preference"`
	Value      string `json:"value"`
}

type InsertTaskProfileCapabilityParams

type InsertTaskProfileCapabilityParams struct {
	TaskID     string `json:"task_id"`
	Role       string `json:"role"`
	Preference string `json:"preference"`
	Value      string `json:"value"`
}

type InsertTaskRunIdempotencyParams

type InsertTaskRunIdempotencyParams struct {
	IdempotencyKey string `json:"idempotency_key"`
	OriginKind     string `json:"origin_kind"`
	OriginRef      string `json:"origin_ref"`
	RunID          string `json:"run_id"`
	CreatedAt      string `json:"created_at"`
}

type InsertTaskRunParams

type InsertTaskRunParams struct {
	ID                   string         `json:"id"`
	TaskID               sql.NullString `json:"task_id"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
	WorktreeID           sql.NullString `json:"worktree_id"`
	RunKind              string         `json:"run_kind"`
	LoopRunID            sql.NullString `json:"loop_run_id"`
	Status               string         `json:"status"`
	Attempt              int64          `json:"attempt"`
	RecoveryCount        int64          `json:"recovery_count"`
	PreviousRunID        sql.NullString `json:"previous_run_id"`
	FailureKind          string         `json:"failure_kind"`
	ClaimedByKind        sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef         sql.NullString `json:"claimed_by_ref"`
	SessionID            sql.NullString `json:"session_id"`
	OriginKind           string         `json:"origin_kind"`
	OriginRef            string         `json:"origin_ref"`
	IdempotencyKey       sql.NullString `json:"idempotency_key"`
	DesignationGroupID   string         `json:"designation_group_id"`
	ResolvedWorktreeMode string         `json:"resolved_worktree_mode"`
	ResolvedWorktreeRef  string         `json:"resolved_worktree_ref"`
	ClaimTokenHash       sql.NullString `json:"claim_token_hash"`
	LeaseUntil           sql.NullString `json:"lease_until"`
	HeartbeatAt          sql.NullString `json:"heartbeat_at"`
	QueuedAt             string         `json:"queued_at"`
	ClaimedAt            sql.NullString `json:"claimed_at"`
	StartedAt            sql.NullString `json:"started_at"`
	EndedAt              sql.NullString `json:"ended_at"`
	TokensUsed           int64          `json:"tokens_used"`
	Error                sql.NullString `json:"error"`
	MetadataJson         sql.NullString `json:"metadata_json"`
	ResultJson           sql.NullString `json:"result_json"`
	ReviewRequired       bool           `json:"review_required"`
	ReviewRequestRound   int64          `json:"review_request_round"`
	ReviewPolicySnapshot string         `json:"review_policy_snapshot"`
	ReviewRequestID      sql.NullString `json:"review_request_id"`
	ParentRunID          sql.NullString `json:"parent_run_id"`
	ReviewID             sql.NullString `json:"review_id"`
	ReviewRound          int64          `json:"review_round"`
	ContinuationReason   string         `json:"continuation_reason"`
	MissingWorkJson      string         `json:"missing_work_json"`
	NextRoundGuidance    string         `json:"next_round_guidance"`
}

type InsertTaskRunTerminalCommandParams

type InsertTaskRunTerminalCommandParams struct {
	CommandID            string         `json:"command_id"`
	Kind                 string         `json:"kind"`
	Phase                string         `json:"phase"`
	SourceStatus         string         `json:"source_status"`
	SourceSessionID      string         `json:"source_session_id"`
	SourceClaimTokenHash string         `json:"source_claim_token_hash"`
	SourceLeaseUntil     sql.NullString `json:"source_lease_until"`
	IntentJson           string         `json:"intent_json"`
	ActorJson            string         `json:"actor_json"`
	CommandAt            string         `json:"command_at"`
	AdmittedAt           string         `json:"admitted_at"`
	UpdatedAt            string         `json:"updated_at"`
	RunID                string         `json:"run_id"`
	TaskID               string         `json:"task_id"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
}

type InsertWorkspaceDeletionIntentParams

type InsertWorkspaceDeletionIntentParams struct {
	RequestedAt string `json:"requested_at"`
	WorkspaceID string `json:"workspace_id"`
}

type InsertWorkspaceFolderParams

type InsertWorkspaceFolderParams struct {
	ID        string `json:"id"`
	ProfileID string `json:"profile_id"`
	Name      string `json:"name"`
	Now       string `json:"now"`
}

type InsertWorkspaceParams

type InsertWorkspaceParams struct {
	ID           string         `json:"id"`
	RootDir      string         `json:"root_dir"`
	AddDirs      string         `json:"add_dirs"`
	Name         string         `json:"name"`
	DefaultAgent sql.NullString `json:"default_agent"`
	CreatedAt    string         `json:"created_at"`
	UpdatedAt    string         `json:"updated_at"`
}

type InsertWorktreeExitOperationParams

type InsertWorktreeExitOperationParams struct {
	OpID        string         `json:"op_id"`
	WorkspaceID string         `json:"workspace_id"`
	WorktreeID  string         `json:"worktree_id"`
	Action      string         `json:"action"`
	State       string         `json:"state"`
	StartedAt   string         `json:"started_at"`
	FinishedAt  sql.NullString `json:"finished_at"`
}

type InsertWorktreeParams

type InsertWorktreeParams struct {
	ProfileID     string `json:"profile_id"`
	ID            string `json:"id"`
	WorkspaceID   string `json:"workspace_id"`
	Name          string `json:"name"`
	Branch        string `json:"branch"`
	Path          string `json:"path"`
	GitDir        string `json:"git_dir"`
	State         string `json:"state"`
	PendingPhase  string `json:"pending_phase"`
	Origin        string `json:"origin"`
	SetupState    string `json:"setup_state"`
	SetupError    string `json:"setup_error"`
	BaseRef       string `json:"base_ref"`
	CreatedBranch int64  `json:"created_branch"`
	RunNamespace  string `json:"run_namespace"`
	CreatedHead   string `json:"created_head"`
	RunID         string `json:"run_id"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

type IsAttentionWorkspaceMutedParams

type IsAttentionWorkspaceMutedParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type LinkSubagentChildParams

type LinkSubagentChildParams struct {
	ChildID sql.NullString `json:"child_id"`
	Now     sql.NullString `json:"now"`
	ID      string         `json:"id"`
}

type LinkTaskRunReviewRequestParams

type LinkTaskRunReviewRequestParams struct {
	ReviewRequestRound   int64          `json:"review_request_round"`
	ReviewPolicySnapshot string         `json:"review_policy_snapshot"`
	ReviewRequestID      sql.NullString `json:"review_request_id"`
	ID                   string         `json:"id"`
}

type ListAcknowledgedAttentionParams

type ListAcknowledgedAttentionParams struct {
	ProfileID     string `json:"profile_id"`
	ActorKind     string `json:"actor_kind"`
	ActorID       string `json:"actor_id"`
	OccurrenceIds any    `json:"occurrence_ids"`
}

type ListActiveGoalBindingsForStopParams

type ListActiveGoalBindingsForStopParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListActiveGoalBindingsForStopRow

type ListActiveGoalBindingsForStopRow struct {
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
	SessionID    string `json:"session_id"`
}

type ListAllTaskBlocksParams

type ListAllTaskBlocksParams struct {
	TaskID      string `json:"task_id"`
	WorkspaceID any    `json:"workspace_id"`
}

type ListApprovalGrantsParams

type ListApprovalGrantsParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListAttentionLoopNodeInventoryParams

type ListAttentionLoopNodeInventoryParams struct {
	AllWorkspaces     bool      `json:"all_workspaces"`
	FilterWorkspaceID string    `json:"filter_workspace_id"`
	AllProfiles       bool      `json:"all_profiles"`
	ProfileID         string    `json:"profile_id"`
	FilterLoopName    string    `json:"filter_loop_name"`
	FilterRunID       string    `json:"filter_run_id"`
	HasCursor         int64     `json:"has_cursor"`
	CursorAt          time.Time `json:"cursor_at"`
	CursorRunID       string    `json:"cursor_run_id"`
	CursorGeneration  int64     `json:"cursor_generation"`
	CursorNodeID      string    `json:"cursor_node_id"`
	PageLimit         int64     `json:"page_limit"`
}

type ListAttentionLoopNodeInventoryRow

type ListAttentionLoopNodeInventoryRow struct {
	WorkspaceID string    `json:"workspace_id"`
	LoopRunID   string    `json:"loop_run_id"`
	LoopName    string    `json:"loop_name"`
	Generation  int64     `json:"generation"`
	NodeID      string    `json:"node_id"`
	ItemIndex   int64     `json:"item_index"`
	StateAt     time.Time `json:"state_at"`
}

type ListAutomationSuggestionsAggregateParams

type ListAutomationSuggestionsAggregateParams struct {
	AllProfiles any    `json:"all_profiles"`
	ProfileID   string `json:"profile_id"`
	Status      string `json:"status"`
}

type ListAutomationSuggestionsAllProfilesParams

type ListAutomationSuggestionsAllProfilesParams struct {
	WorkspaceID sql.NullString `json:"workspace_id"`
	Status      string         `json:"status"`
}

type ListAutomationSuggestionsParams

type ListAutomationSuggestionsParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	Status      string         `json:"status"`
}

type ListAutonomyLeaseHandlesRow

type ListAutonomyLeaseHandlesRow struct {
	ID             string         `json:"id"`
	TaskID         string         `json:"task_id"`
	RunKind        string         `json:"run_kind"`
	WorkspaceID    string         `json:"workspace_id"`
	Status         string         `json:"status"`
	SessionID      string         `json:"session_id"`
	ClaimedByKind  sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef   sql.NullString `json:"claimed_by_ref"`
	ClaimToken     string         `json:"claim_token"`
	ClaimTokenHash string         `json:"claim_token_hash"`
	LeaseUntil     sql.NullString `json:"lease_until"`
	HeartbeatAt    sql.NullString `json:"heartbeat_at"`
}

type ListAvailableLoopOutputRefsParams

type ListAvailableLoopOutputRefsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListCmdPalettePinsParams

type ListCmdPalettePinsParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type ListCmdPalettePinsRow

type ListCmdPalettePinsRow struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
	PinnedAt      int64  `json:"pinned_at"`
}

type ListCmdPaletteQueryHitsParams

type ListCmdPaletteQueryHitsParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type ListCmdPaletteQueryHitsRow

type ListCmdPaletteQueryHitsRow struct {
	ProfileLensID string  `json:"profile_lens_id"`
	WorkspaceID   string  `json:"workspace_id"`
	Query         string  `json:"query"`
	CommandID     string  `json:"command_id"`
	Weight        float64 `json:"weight"`
	LastUsedAt    int64   `json:"last_used_at"`
}

type ListCmdPaletteUsageParams

type ListCmdPaletteUsageParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type ListCmdPaletteUsageRow

type ListCmdPaletteUsageRow struct {
	ProfileLensID  string  `json:"profile_lens_id"`
	WorkspaceID    string  `json:"workspace_id"`
	CommandID      string  `json:"command_id"`
	UseCount       int64   `json:"use_count"`
	FrecencyWeight float64 `json:"frecency_weight"`
	LastUsedAt     int64   `json:"last_used_at"`
	UpdatedAt      int64   `json:"updated_at"`
}

type ListCreatingGoalBindingsForStopParams

type ListCreatingGoalBindingsForStopParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListCreatingGoalBindingsForStopRow

type ListCreatingGoalBindingsForStopRow struct {
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
}

type ListDispatchableSessionInputsParams

type ListDispatchableSessionInputsParams struct {
	SessionID string `json:"session_id"`
	RowLimit  int64  `json:"row_limit"`
}

type ListExpiredTaskBlockCandidatesRow

type ListExpiredTaskBlockCandidatesRow struct {
	TaskID string `json:"task_id"`
	ID     string `json:"id"`
}

type ListExpiredTaskBlockIDsParams

type ListExpiredTaskBlockIDsParams struct {
	TaskID      string         `json:"task_id"`
	Now         sql.NullString `json:"now"`
	WorkspaceID any            `json:"workspace_id"`
}

type ListExpiredTaskRunLeaseIDsParams

type ListExpiredTaskRunLeaseIDsParams struct {
	ClaimedStatus  string         `json:"claimed_status"`
	StartingStatus string         `json:"starting_status"`
	RunningStatus  string         `json:"running_status"`
	Now            sql.NullString `json:"now"`
	ReservedLeases any            `json:"reserved_leases"`
	ResultLimit    int64          `json:"result_limit"`
}

type ListExpirylessLoopEventWaitsRow

type ListExpirylessLoopEventWaitsRow struct {
	LoopRunID  string    `json:"loop_run_id"`
	Generation int64     `json:"generation"`
	NodeID     string    `json:"node_id"`
	ItemIndex  int64     `json:"item_index"`
	CreatedAt  time.Time `json:"created_at"`
}

type ListExtensionEnvBindingsParams

type ListExtensionEnvBindingsParams struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
}

type ListExtensionInputsParams

type ListExtensionInputsParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
}

type ListExtensionInputsRow

type ListExtensionInputsRow struct {
	InputID   string `json:"input_id"`
	Type      string `json:"type"`
	ValueJson string `json:"value_json"`
	Active    int64  `json:"active"`
	UpdatedAt string `json:"updated_at"`
}

type ListExtensionMCPOverridesParams

type ListExtensionMCPOverridesParams struct {
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLiveLoopTaskRunIDsParams

type ListLiveLoopTaskRunIDsParams struct {
	LoopRunID            sql.NullString `json:"loop_run_id"`
	QueuedStatus         string         `json:"queued_status"`
	ClaimedStatus        string         `json:"claimed_status"`
	StartingStatus       string         `json:"starting_status"`
	RunningStatus        string         `json:"running_status"`
	NeedsAttentionStatus string         `json:"needs_attention_status"`
}

type ListLoopCatalogAggregatesParams

type ListLoopCatalogAggregatesParams struct {
	WorkspaceID    string `json:"workspace_id"`
	ProfileID      string `json:"profile_id"`
	AggregateAfter string `json:"aggregate_after"`
	NamesJson      any    `json:"names_json"`
}

type ListLoopCatalogAggregatesRow

type ListLoopCatalogAggregatesRow struct {
	LoopName  string          `json:"loop_name"`
	Runs      int64           `json:"runs"`
	Succeeded sql.NullFloat64 `json:"succeeded"`
	Failed    sql.NullFloat64 `json:"failed"`
}

type ListLoopCatalogLatestRunsParams

type ListLoopCatalogLatestRunsParams struct {
	NamesJson   any    `json:"names_json"`
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
}

type ListLoopCatalogLatestRunsRow

type ListLoopCatalogLatestRunsRow struct {
	ID             string          `json:"id"`
	LoopName       string          `json:"loop_name"`
	Status         string          `json:"status"`
	BestGeneration sql.NullInt64   `json:"best_generation"`
	BestScore      sql.NullFloat64 `json:"best_score"`
	CreatedAt      string          `json:"created_at"`
}

type ListLoopEffectOutboxParams

type ListLoopEffectOutboxParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type ListLoopGateDecisionsParams

type ListLoopGateDecisionsParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	GateID      string `json:"gate_id"`
}

type ListLoopGateDecisionsRow

type ListLoopGateDecisionsRow struct {
	CriterionID string `json:"criterion_id"`
	Decision    string `json:"decision"`
	ActorKind   string `json:"actor_kind"`
	ActorRef    string `json:"actor_ref"`
	OriginKind  string `json:"origin_kind"`
	OriginRef   string `json:"origin_ref"`
	Note        string `json:"note"`
}

type ListLoopGateVerdictsParams

type ListLoopGateVerdictsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLoopGateVerdictsRow

type ListLoopGateVerdictsRow struct {
	GateID             string          `json:"gate_id"`
	ItemIndex          int64           `json:"item_index"`
	Outcome            string          `json:"outcome"`
	Score              sql.NullFloat64 `json:"score"`
	RouteCauseRank     sql.NullInt64   `json:"route_cause_rank"`
	BlockingIssuesJson string          `json:"blocking_issues_json"`
	CriteriaJson       string          `json:"criteria_json"`
	DecidedAt          time.Time       `json:"decided_at"`
}

type ListLoopGenerationOutputsParams

type ListLoopGenerationOutputsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLoopGenerationOutputsRow

type ListLoopGenerationOutputsRow struct {
	Generation          int64          `json:"generation"`
	NodeID              string         `json:"node_id"`
	ItemIndex           int64          `json:"item_index"`
	OutputID            sql.NullString `json:"output_id"`
	ArtifactName        sql.NullString `json:"artifact_name"`
	Status              string         `json:"status"`
	OutputRef           sql.NullString `json:"output_ref"`
	TaskRunID           sql.NullString `json:"task_run_id"`
	ChildLoopRunID      sql.NullString `json:"child_loop_run_id"`
	ResolvedRuntimeJson sql.NullString `json:"resolved_runtime_json"`
	Attempt             int64          `json:"attempt"`
	NextAttemptAt       sql.NullTime   `json:"next_attempt_at"`
	FirstScheduledAt    sql.NullTime   `json:"first_scheduled_at"`
	Epoch               int64          `json:"epoch"`
	SessionID           string         `json:"session_id"`
}

type ListLoopGenerationsParams

type ListLoopGenerationsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLoopGenerationsRow

type ListLoopGenerationsRow struct {
	Generation       int64     `json:"generation"`
	ParentGeneration int64     `json:"parent_generation"`
	Origin           string    `json:"origin"`
	CreatedAt        time.Time `json:"created_at"`
}

type ListLoopNodeAttemptsParams

type ListLoopNodeAttemptsParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type ListLoopNodeControlsParams

type ListLoopNodeControlsParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type ListLoopNodeWaitsParams

type ListLoopNodeWaitsParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type ListLoopProvenanceRow

type ListLoopProvenanceRow struct {
	ID           string         `json:"id"`
	WorkspaceID  sql.NullString `json:"workspace_id"`
	MetadataJson sql.NullString `json:"metadata_json"`
	LoopRunID    sql.NullString `json:"loop_run_id"`
	LoopName     sql.NullString `json:"loop_name"`
}

type ListLoopRosterOutputsParams

type ListLoopRosterOutputsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLoopRosterOutputsRow

type ListLoopRosterOutputsRow struct {
	Generation          int64          `json:"generation"`
	NodeID              string         `json:"node_id"`
	ItemIndex           int64          `json:"item_index"`
	OutputID            sql.NullString `json:"output_id"`
	ArtifactName        sql.NullString `json:"artifact_name"`
	Status              string         `json:"status"`
	OutputRef           sql.NullString `json:"output_ref"`
	TaskRunID           sql.NullString `json:"task_run_id"`
	ChildLoopRunID      sql.NullString `json:"child_loop_run_id"`
	ResolvedRuntimeJson sql.NullString `json:"resolved_runtime_json"`
	Attempt             int64          `json:"attempt"`
	NextAttemptAt       sql.NullTime   `json:"next_attempt_at"`
	FirstScheduledAt    sql.NullTime   `json:"first_scheduled_at"`
	Epoch               int64          `json:"epoch"`
	SessionID           string         `json:"session_id"`
	TaskRunStatus       string         `json:"task_run_status"`
	TaskRunTokensUsed   int64          `json:"task_run_tokens_used"`
}

type ListLoopRosterRouteCausesParams

type ListLoopRosterRouteCausesParams struct {
	LoopRunID   string `json:"loop_run_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListLoopRosterRouteCausesRow

type ListLoopRosterRouteCausesRow struct {
	PayloadJson string    `json:"payload_json"`
	At          time.Time `json:"at"`
}

type ListLoopRouteCausesParams

type ListLoopRouteCausesParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	Generation  string `json:"generation"`
}

type ListLoopRouteCausesRow

type ListLoopRouteCausesRow struct {
	PayloadJson string    `json:"payload_json"`
	At          time.Time `json:"at"`
}

type ListLoopRunEventsBackwardParams

type ListLoopRunEventsBackwardParams struct {
	WorkspaceID  string `json:"workspace_id"`
	LoopRunID    string `json:"loop_run_id"`
	FixedHeadSeq int64  `json:"fixed_head_seq"`
	BeforeSeq    int64  `json:"before_seq"`
	RowLimit     int64  `json:"row_limit"`
}

type ListLoopRunEventsParams

type ListLoopRunEventsParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	AfterSeq    int64  `json:"after_seq"`
	RowLimit    int64  `json:"row_limit"`
}

type ListLoopRunsMissingActiveCoordinatorRow

type ListLoopRunsMissingActiveCoordinatorRow struct {
	ID         string `json:"id"`
	Generation int64  `json:"generation"`
}

type ListLoopUIAnnotationsParams

type ListLoopUIAnnotationsParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
}

type ListLoopUIAnnotationsRow

type ListLoopUIAnnotationsRow struct {
	NodeID string  `json:"node_id"`
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
}

type ListMCPAuthTokenRefsByWorkspaceRow

type ListMCPAuthTokenRefsByWorkspaceRow struct {
	AccessTokenRef  string `json:"access_token_ref"`
	RefreshTokenRef string `json:"refresh_token_ref"`
}

type ListMCPOAuthRegistrationRefsByWorkspaceRow

type ListMCPOAuthRegistrationRefsByWorkspaceRow struct {
	ClientSecretRef            string `json:"client_secret_ref"`
	RegistrationAccessTokenRef string `json:"registration_access_token_ref"`
}

type ListMarketplaceCatalogEntriesParams

type ListMarketplaceCatalogEntriesParams struct {
	Source      string `json:"source"`
	ResultLimit int64  `json:"result_limit"`
}

type ListMarketplaceSourceNameRetainersParams

type ListMarketplaceSourceNameRetainersParams struct {
	Source    string `json:"source"`
	SourceRef string `json:"source_ref"`
}

type ListModelCatalogOptionValuesParams

type ListModelCatalogOptionValuesParams struct {
	ContextID    string `json:"context_id"`
	ProviderID   string `json:"provider_id"`
	SourceID     string `json:"source_id"`
	IncludeStale int64  `json:"include_stale"`
	IncludeAll   int64  `json:"include_all"`
}

type ListModelCatalogOptionsParams

type ListModelCatalogOptionsParams struct {
	ContextID    string `json:"context_id"`
	ProviderID   string `json:"provider_id"`
	SourceID     string `json:"source_id"`
	IncludeStale int64  `json:"include_stale"`
	IncludeAll   int64  `json:"include_all"`
}

type ListModelCatalogTransportBindingSelectionsParams

type ListModelCatalogTransportBindingSelectionsParams struct {
	ContextID    string `json:"context_id"`
	ProviderID   string `json:"provider_id"`
	SourceID     string `json:"source_id"`
	IncludeStale int64  `json:"include_stale"`
	IncludeAll   int64  `json:"include_all"`
}

type ListModelCatalogTransportBindingsParams

type ListModelCatalogTransportBindingsParams struct {
	ContextID    string `json:"context_id"`
	ProviderID   string `json:"provider_id"`
	SourceID     string `json:"source_id"`
	IncludeStale int64  `json:"include_stale"`
	IncludeAll   int64  `json:"include_all"`
}

type ListNativeMissingResultSubagentsParams

type ListNativeMissingResultSubagentsParams struct {
	Since      sql.NullString `json:"since"`
	CursorID   any            `json:"cursor_id"`
	CursorTime sql.NullString `json:"cursor_time"`
	RowLimit   int64          `json:"row_limit"`
}

type ListOpenTaskBlocksParams

type ListOpenTaskBlocksParams struct {
	TaskID      string         `json:"task_id"`
	WorkspaceID any            `json:"workspace_id"`
	Now         sql.NullString `json:"now"`
}

type ListOpenTaskDescendantIDsParams

type ListOpenTaskDescendantIDsParams struct {
	CompletedStatus string         `json:"completed_status"`
	FailedStatus    string         `json:"failed_status"`
	CanceledStatus  string         `json:"canceled_status"`
	RootTaskID      sql.NullString `json:"root_task_id"`
}

type ListParkedWatchEventSubscriptionsForLoopRunParams

type ListParkedWatchEventSubscriptionsForLoopRunParams struct {
	Status     string         `json:"status"`
	OutputKind sql.NullString `json:"output_kind"`
	LoopRunID  string         `json:"loop_run_id"`
}

type ListParkedWatchEventSubscriptionsForLoopRunRow

type ListParkedWatchEventSubscriptionsForLoopRunRow struct {
	WorkspaceID      string `json:"workspace_id"`
	ProfileID        string `json:"profile_id"`
	ID               string `json:"id"`
	LoopName         string `json:"loop_name"`
	Generation       int64  `json:"generation"`
	InputsJson       string `json:"inputs_json"`
	DefinitionDigest string `json:"definition_digest"`
	DefinitionJson   string `json:"definition_json"`
	NodeID           string `json:"node_id"`
	OutputRef        string `json:"output_ref"`
}

type ListParkedWatchEventSubscriptionsPageParams

type ListParkedWatchEventSubscriptionsPageParams struct {
	Status            string         `json:"status"`
	OutputKind        sql.NullString `json:"output_kind"`
	CursorWorkspaceID string         `json:"cursor_workspace_id"`
	CursorLoopRunID   string         `json:"cursor_loop_run_id"`
	CursorNodeID      string         `json:"cursor_node_id"`
	RowLimit          int64          `json:"row_limit"`
}

type ListParkedWatchEventSubscriptionsPageRow

type ListParkedWatchEventSubscriptionsPageRow struct {
	WorkspaceID      string `json:"workspace_id"`
	ProfileID        string `json:"profile_id"`
	ID               string `json:"id"`
	LoopName         string `json:"loop_name"`
	Generation       int64  `json:"generation"`
	InputsJson       string `json:"inputs_json"`
	DefinitionDigest string `json:"definition_digest"`
	DefinitionJson   string `json:"definition_json"`
	NodeID           string `json:"node_id"`
	OutputRef        string `json:"output_ref"`
}

type ListParkedWatchEventSubscriptionsParams

type ListParkedWatchEventSubscriptionsParams struct {
	Status     string         `json:"status"`
	OutputKind sql.NullString `json:"output_kind"`
}

type ListParkedWatchEventSubscriptionsRow

type ListParkedWatchEventSubscriptionsRow struct {
	WorkspaceID      string `json:"workspace_id"`
	ProfileID        string `json:"profile_id"`
	ID               string `json:"id"`
	LoopName         string `json:"loop_name"`
	Generation       int64  `json:"generation"`
	InputsJson       string `json:"inputs_json"`
	DefinitionDigest string `json:"definition_digest"`
	DefinitionJson   string `json:"definition_json"`
	NodeID           string `json:"node_id"`
	OutputRef        string `json:"output_ref"`
}

type ListPendingLoopEffectsRow

type ListPendingLoopEffectsRow struct {
	LoopRunID     string       `json:"loop_run_id"`
	WorkspaceID   string       `json:"workspace_id"`
	DeliveryID    string       `json:"delivery_id"`
	SourceEventID string       `json:"source_event_id"`
	Trigger       string       `json:"trigger"`
	Generation    int64        `json:"generation"`
	NodeID        string       `json:"node_id"`
	ItemIndex     int64        `json:"item_index"`
	EntryIndex    int64        `json:"entry_index"`
	EntryJson     string       `json:"entry_json"`
	State         string       `json:"state"`
	Attempts      int64        `json:"attempts"`
	CreatedAt     time.Time    `json:"created_at"`
	DeliveredAt   sql.NullTime `json:"delivered_at"`
}

type ListPendingSessionInputsParams

type ListPendingSessionInputsParams struct {
	SessionID         string `json:"session_id"`
	QueuedStatus      string `json:"queued_status"`
	DispatchingStatus string `json:"dispatching_status"`
}

type ListQuarantinedLoopNodeInventoryParams

type ListQuarantinedLoopNodeInventoryParams struct {
	AllWorkspaces     bool         `json:"all_workspaces"`
	FilterWorkspaceID string       `json:"filter_workspace_id"`
	AllProfiles       bool         `json:"all_profiles"`
	ProfileID         string       `json:"profile_id"`
	FilterLoopName    string       `json:"filter_loop_name"`
	FilterRunID       string       `json:"filter_run_id"`
	HasCursor         int64        `json:"has_cursor"`
	CursorAt          sql.NullTime `json:"cursor_at"`
	CursorRunID       string       `json:"cursor_run_id"`
	CursorGeneration  int64        `json:"cursor_generation"`
	CursorNodeID      string       `json:"cursor_node_id"`
	PageLimit         int64        `json:"page_limit"`
}

type ListQuarantinedLoopNodeInventoryRow

type ListQuarantinedLoopNodeInventoryRow struct {
	WorkspaceID string       `json:"workspace_id"`
	LoopRunID   string       `json:"loop_run_id"`
	LoopName    string       `json:"loop_name"`
	Generation  int64        `json:"generation"`
	NodeID      string       `json:"node_id"`
	ItemIndex   int64        `json:"item_index"`
	StateAt     sql.NullTime `json:"state_at"`
}

type ListQueuedLoopRunsReadyForPromotionRow

type ListQueuedLoopRunsReadyForPromotionRow struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
	Generation  int64  `json:"generation"`
}

type ListReplyWatchesParams

type ListReplyWatchesParams struct {
	StateFilter     any `json:"state_filter"`
	WorkspaceFilter any `json:"workspace_filter"`
	SenderFilter    any `json:"sender_filter"`
	TargetFilter    any `json:"target_filter"`
}

type ListRetryingLoopNodeInventoryParams

type ListRetryingLoopNodeInventoryParams struct {
	AllWorkspaces     bool         `json:"all_workspaces"`
	FilterWorkspaceID string       `json:"filter_workspace_id"`
	AllProfiles       bool         `json:"all_profiles"`
	ProfileID         string       `json:"profile_id"`
	FilterLoopName    string       `json:"filter_loop_name"`
	FilterRunID       string       `json:"filter_run_id"`
	HasCursor         int64        `json:"has_cursor"`
	CursorAt          sql.NullTime `json:"cursor_at"`
	CursorRunID       string       `json:"cursor_run_id"`
	CursorGeneration  int64        `json:"cursor_generation"`
	CursorNodeID      string       `json:"cursor_node_id"`
	CursorItemIndex   int64        `json:"cursor_item_index"`
	PageLimit         int64        `json:"page_limit"`
}

type ListRetryingLoopNodeInventoryRow

type ListRetryingLoopNodeInventoryRow struct {
	WorkspaceID string       `json:"workspace_id"`
	LoopRunID   string       `json:"loop_run_id"`
	LoopName    string       `json:"loop_name"`
	Generation  int64        `json:"generation"`
	NodeID      string       `json:"node_id"`
	ItemIndex   int64        `json:"item_index"`
	StateAt     sql.NullTime `json:"state_at"`
}

type ListRouteCausingLoopGateVerdictsParams

type ListRouteCausingLoopGateVerdictsParams struct {
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	WorkspaceID string `json:"workspace_id"`
}

type ListRouteCausingLoopGateVerdictsRow

type ListRouteCausingLoopGateVerdictsRow struct {
	GateID             string          `json:"gate_id"`
	ItemIndex          int64           `json:"item_index"`
	Outcome            string          `json:"outcome"`
	Score              sql.NullFloat64 `json:"score"`
	RouteCauseRank     sql.NullInt64   `json:"route_cause_rank"`
	BlockingIssuesJson string          `json:"blocking_issues_json"`
	CriteriaJson       string          `json:"criteria_json"`
	DecidedAt          time.Time       `json:"decided_at"`
}

type ListRunReviewsParams

type ListRunReviewsParams struct {
	TaskID            string `json:"task_id"`
	RunID             string `json:"run_id"`
	Status            string `json:"status"`
	ReviewerSessionID string `json:"reviewer_session_id"`
	ResultLimit       int64  `json:"result_limit"`
}

type ListSessionContainerMembersParams

type ListSessionContainerMembersParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
}

type ListSessionFoldersParams

type ListSessionFoldersParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type ListSessionFoldersRow

type ListSessionFoldersRow struct {
	ID           string `json:"id"`
	ProfileID    string `json:"profile_id"`
	WorkspaceID  string `json:"workspace_id"`
	Name         string `json:"name"`
	Position     int64  `json:"position"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
	SessionCount int64  `json:"session_count"`
}

type ListSessionInputQueueSummaryParams

type ListSessionInputQueueSummaryParams struct {
	SessionID         string `json:"session_id"`
	SessionGeneration int64  `json:"session_generation"`
	QueuedStatus      string `json:"queued_status"`
	DispatchingStatus string `json:"dispatching_status"`
}

type ListSessionInputQueueSummaryRow

type ListSessionInputQueueSummaryRow struct {
	Mode   string `json:"mode"`
	Status string `json:"status"`
	Count  int64  `json:"count"`
}

type ListSessionLoopWorkParams

type ListSessionLoopWorkParams struct {
	SessionID   sql.NullString `json:"session_id"`
	WorkspaceID string         `json:"workspace_id"`
	AllProfiles any            `json:"all_profiles"`
	ProfileID   string         `json:"profile_id"`
	OwnerRunID  string         `json:"owner_run_id"`
}

type ListSessionLoopWorkRow

type ListSessionLoopWorkRow struct {
	ID             string `json:"id"`
	CreatedAt      string `json:"created_at"`
	Status         string `json:"status"`
	OwnsGoal       int64  `json:"owns_goal"`
	LeaseUntil     string `json:"lease_until"`
	NeedsAttention bool   `json:"needs_attention"`
	ReconciledAt   string `json:"reconciled_at"`
}

type ListSessionPlacementsByIDsRow

type ListSessionPlacementsByIDsRow struct {
	SessionID      string         `json:"session_id"`
	FolderID       sql.NullString `json:"folder_id"`
	Position       int64          `json:"position"`
	FolderPosition sql.NullInt64  `json:"folder_position"`
}

type ListSkillExposuresByOwnerParams

type ListSkillExposuresByOwnerParams struct {
	SkillName   string         `json:"skill_name"`
	OwnerScope  string         `json:"owner_scope"`
	WorkspaceID sql.NullString `json:"workspace_id"`
}

type ListStaleDispatchingSessionInputsRow

type ListStaleDispatchingSessionInputsRow struct {
	SessionID string `json:"session_id"`
	ID        string `json:"id"`
}

type ListStoppableGoalCheckpointKeysRow

type ListStoppableGoalCheckpointKeysRow struct {
	Generation int64  `json:"generation"`
	NodeID     string `json:"node_id"`
	ItemIndex  int64  `json:"item_index"`
}

type ListSubagentArchiveFamilyParams

type ListSubagentArchiveFamilyParams struct {
	WorkspaceID string `json:"workspace_id"`
	SessionID   string `json:"session_id"`
}

type ListSubagentArchiveFamilyRow

type ListSubagentArchiveFamilyRow struct {
	ID    string `json:"id"`
	State string `json:"state"`
}

type ListSubagentWakesByParentParams

type ListSubagentWakesByParentParams struct {
	ParentID string `json:"parent_id"`
	States   any    `json:"states"`
}

type ListSubagentsByParentParams

type ListSubagentsByParentParams struct {
	Parent     string `json:"parent"`
	Workspace  any    `json:"workspace"`
	Origins    any    `json:"origins"`
	Statuses   any    `json:"statuses"`
	CursorID   any    `json:"cursor_id"`
	CursorTime string `json:"cursor_time"`
	PageLimit  int64  `json:"page_limit"`
}

type ListSubagentsByParentUrgencyParams

type ListSubagentsByParentUrgencyParams struct {
	Parent     string `json:"parent"`
	Workspace  any    `json:"workspace"`
	Origins    any    `json:"origins"`
	Statuses   any    `json:"statuses"`
	CursorID   any    `json:"cursor_id"`
	CursorRank int64  `json:"cursor_rank"`
	CursorTime string `json:"cursor_time"`
	PageLimit  int64  `json:"page_limit"`
}

type ListSubagentsByWorkspaceParams

type ListSubagentsByWorkspaceParams struct {
	Workspace  string `json:"workspace"`
	Origins    any    `json:"origins"`
	Statuses   any    `json:"statuses"`
	CursorID   any    `json:"cursor_id"`
	CursorTime string `json:"cursor_time"`
	PageLimit  int64  `json:"page_limit"`
}

type ListTaskEventRecordsAscendingParams

type ListTaskEventRecordsAscendingParams struct {
	ResultLimit   int64  `json:"result_limit"`
	TaskID        string `json:"task_id"`
	AfterSequence int64  `json:"after_sequence"`
}

type ListTaskEventRecordsAscendingRow

type ListTaskEventRecordsAscendingRow struct {
	EventSeq    int64          `json:"event_seq"`
	ID          string         `json:"id"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type ListTaskEventRecordsDescendingParams

type ListTaskEventRecordsDescendingParams struct {
	ResultLimit   int64  `json:"result_limit"`
	TaskID        string `json:"task_id"`
	AfterSequence int64  `json:"after_sequence"`
}

type ListTaskEventRecordsDescendingRow

type ListTaskEventRecordsDescendingRow struct {
	EventSeq    int64          `json:"event_seq"`
	ID          string         `json:"id"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type ListTaskEventsParams

type ListTaskEventsParams struct {
	ResultLimit int64  `json:"result_limit"`
	TaskID      string `json:"task_id"`
	RunID       string `json:"run_id"`
	EventType   string `json:"event_type"`
}

type ListTaskEventsRow

type ListTaskEventsRow struct {
	ID          string         `json:"id"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type ListTaskProfileAgentsRow

type ListTaskProfileAgentsRow struct {
	Role       string `json:"role"`
	Preference string `json:"preference"`
	Value      string `json:"value"`
}

type ListTaskProfileCapabilitiesRow

type ListTaskProfileCapabilitiesRow struct {
	Role       string `json:"role"`
	Preference string `json:"preference"`
	Value      string `json:"value"`
}

type ListTaskRunsByStatusRow

type ListTaskRunsByStatusRow struct {
	ID                   string         `json:"id"`
	TaskID               string         `json:"task_id"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
	WorktreeID           sql.NullString `json:"worktree_id"`
	RunKind              string         `json:"run_kind"`
	LoopRunID            sql.NullString `json:"loop_run_id"`
	Status               string         `json:"status"`
	Attempt              int64          `json:"attempt"`
	RecoveryCount        int64          `json:"recovery_count"`
	PreviousRunID        sql.NullString `json:"previous_run_id"`
	FailureKind          string         `json:"failure_kind"`
	ClaimedByKind        sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef         sql.NullString `json:"claimed_by_ref"`
	SessionID            sql.NullString `json:"session_id"`
	OriginKind           string         `json:"origin_kind"`
	OriginRef            string         `json:"origin_ref"`
	IdempotencyKey       sql.NullString `json:"idempotency_key"`
	DesignationGroupID   string         `json:"designation_group_id"`
	ResolvedWorktreeMode string         `json:"resolved_worktree_mode"`
	ResolvedWorktreeRef  string         `json:"resolved_worktree_ref"`
	ClaimToken           string         `json:"claim_token"`
	ClaimTokenHash       sql.NullString `json:"claim_token_hash"`
	LeaseUntil           sql.NullString `json:"lease_until"`
	HeartbeatAt          sql.NullString `json:"heartbeat_at"`
	QueuedAt             string         `json:"queued_at"`
	ClaimedAt            sql.NullString `json:"claimed_at"`
	StartedAt            sql.NullString `json:"started_at"`
	EndedAt              sql.NullString `json:"ended_at"`
	TokensUsed           int64          `json:"tokens_used"`
	Error                sql.NullString `json:"error"`
	MetadataJson         sql.NullString `json:"metadata_json"`
	ResultJson           sql.NullString `json:"result_json"`
	ReviewRequired       bool           `json:"review_required"`
	ReviewRequestRound   int64          `json:"review_request_round"`
	ReviewPolicySnapshot string         `json:"review_policy_snapshot"`
	ReviewRequestID      sql.NullString `json:"review_request_id"`
	ParentRunID          sql.NullString `json:"parent_run_id"`
	ReviewID             sql.NullString `json:"review_id"`
	ReviewRound          int64          `json:"review_round"`
	ContinuationReason   string         `json:"continuation_reason"`
	MissingWorkJson      string         `json:"missing_work_json"`
	NextRoundGuidance    string         `json:"next_round_guidance"`
}

type ListTaskTriageStatesParams

type ListTaskTriageStatesParams struct {
	ActorKind string `json:"actor_kind"`
	ActorID   string `json:"actor_id"`
}

type ListWaitingLoopNodeInventoryParams

type ListWaitingLoopNodeInventoryParams struct {
	AllWorkspaces     bool      `json:"all_workspaces"`
	FilterWorkspaceID string    `json:"filter_workspace_id"`
	AllProfiles       bool      `json:"all_profiles"`
	ProfileID         string    `json:"profile_id"`
	FilterLoopName    string    `json:"filter_loop_name"`
	FilterRunID       string    `json:"filter_run_id"`
	HasCursor         int64     `json:"has_cursor"`
	CursorAt          time.Time `json:"cursor_at"`
	CursorRunID       string    `json:"cursor_run_id"`
	CursorGeneration  int64     `json:"cursor_generation"`
	CursorNodeID      string    `json:"cursor_node_id"`
	CursorItemIndex   int64     `json:"cursor_item_index"`
	PageLimit         int64     `json:"page_limit"`
}

type ListWaitingLoopNodeInventoryRow

type ListWaitingLoopNodeInventoryRow struct {
	WorkspaceID string    `json:"workspace_id"`
	LoopRunID   string    `json:"loop_run_id"`
	LoopName    string    `json:"loop_name"`
	Generation  int64     `json:"generation"`
	NodeID      string    `json:"node_id"`
	ItemIndex   int64     `json:"item_index"`
	StateAt     time.Time `json:"state_at"`
}

type ListWorkspaceArchiveBlockersRow

type ListWorkspaceArchiveBlockersRow struct {
	Kind string         `json:"kind"`
	ID   string         `json:"id"`
	Name sql.NullString `json:"name"`
}

type ListWorkspaceContainerMembersParams

type ListWorkspaceContainerMembersParams struct {
	ProfileID string         `json:"profile_id"`
	FolderID  sql.NullString `json:"folder_id"`
}

type ListWorkspaceFoldersRow

type ListWorkspaceFoldersRow struct {
	ID             string `json:"id"`
	ProfileID      string `json:"profile_id"`
	Name           string `json:"name"`
	Position       int64  `json:"position"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
	WorkspaceCount int64  `json:"workspace_count"`
}

type ListWorkspacePlacementsRow

type ListWorkspacePlacementsRow struct {
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
	Position    int64          `json:"position"`
}

type LookupApprovalGrantParams

type LookupApprovalGrantParams struct {
	LastUsedAt  string `json:"last_used_at"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	ToolID      string `json:"tool_id"`
	AgentName   string `json:"agent_name"`
	InputDigest string `json:"input_digest"`
}

type LookupRunReviewBySessionParams

type LookupRunReviewBySessionParams struct {
	ReviewerSessionID sql.NullString `json:"reviewer_session_id"`
	RoutedStatus      string         `json:"routed_status"`
	InReviewStatus    string         `json:"in_review_status"`
}

type LoopAdmissionClaim

type LoopAdmissionClaim struct {
	ProfileID        string       `json:"profile_id"`
	WorkspaceID      string       `json:"workspace_id"`
	LoopName         string       `json:"loop_name"`
	SourceKey        string       `json:"source_key"`
	EventKey         string       `json:"event_key"`
	LoopRunID        string       `json:"loop_run_id"`
	ClaimedAt        time.Time    `json:"claimed_at"`
	ExpiresAt        time.Time    `json:"expires_at"`
	SuppressedCount  int64        `json:"suppressed_count"`
	LastSuppressedAt sql.NullTime `json:"last_suppressed_at"`
}

type LoopConfig

type LoopConfig struct {
	ProfileID           string         `json:"profile_id"`
	WorkspaceID         string         `json:"workspace_id"`
	LoopName            string         `json:"loop_name"`
	HumanGateEnabled    int64          `json:"human_gate_enabled"`
	ReattemptStrategy   sql.NullString `json:"reattempt_strategy"`
	EnabledChecksJson   string         `json:"enabled_checks_json"`
	IterationCap        sql.NullInt64  `json:"iteration_cap"`
	BudgetTokens        sql.NullInt64  `json:"budget_tokens"`
	BudgetWallSec       sql.NullInt64  `json:"budget_wall_sec"`
	BudgetOnExceeded    sql.NullString `json:"budget_on_exceeded"`
	NoProgressWindow    sql.NullInt64  `json:"no_progress_window"`
	FanOutWidth         sql.NullInt64  `json:"fan_out_width"`
	GateMaxRevisions    sql.NullInt64  `json:"gate_max_revisions"`
	RuntimeDefaultsJson sql.NullString `json:"runtime_defaults_json"`
	RuntimeRulesJson    sql.NullString `json:"runtime_rules_json"`
	EnvironmentJson     sql.NullString `json:"environment_json"`
}

type LoopDefinitionSnapshot

type LoopDefinitionSnapshot struct {
	ProfileID         string `json:"profile_id"`
	WorkspaceID       string `json:"workspace_id"`
	DefinitionDigest  string `json:"definition_digest"`
	DefinitionVersion int64  `json:"definition_version"`
	DefinitionJson    string `json:"definition_json"`
	ByteSize          int64  `json:"byte_size"`
	CreatedAt         string `json:"created_at"`
	LastUsedAt        string `json:"last_used_at"`
}

type LoopEffectOutbox

type LoopEffectOutbox struct {
	LoopRunID     string       `json:"loop_run_id"`
	DeliveryID    string       `json:"delivery_id"`
	SourceEventID string       `json:"source_event_id"`
	Trigger       string       `json:"trigger"`
	Generation    int64        `json:"generation"`
	NodeID        string       `json:"node_id"`
	ItemIndex     int64        `json:"item_index"`
	EntryIndex    int64        `json:"entry_index"`
	EntryJson     string       `json:"entry_json"`
	State         string       `json:"state"`
	Attempts      int64        `json:"attempts"`
	CreatedAt     time.Time    `json:"created_at"`
	DeliveredAt   sql.NullTime `json:"delivered_at"`
}

type LoopGateDecision

type LoopGateDecision struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	GateID      string `json:"gate_id"`
	CriterionID string `json:"criterion_id"`
	Decision    string `json:"decision"`
	ActorKind   string `json:"actor_kind"`
	ActorRef    string `json:"actor_ref"`
	OriginKind  string `json:"origin_kind"`
	OriginRef   string `json:"origin_ref"`
	Note        string `json:"note"`
	DecidedAt   string `json:"decided_at"`
}

type LoopGateVerdict

type LoopGateVerdict struct {
	LoopRunID          string          `json:"loop_run_id"`
	Generation         int64           `json:"generation"`
	GateID             string          `json:"gate_id"`
	ItemIndex          int64           `json:"item_index"`
	Outcome            string          `json:"outcome"`
	Score              sql.NullFloat64 `json:"score"`
	RouteCauseRank     sql.NullInt64   `json:"route_cause_rank"`
	BlockingIssuesJson string          `json:"blocking_issues_json"`
	CriteriaJson       string          `json:"criteria_json"`
	DecidedAt          time.Time       `json:"decided_at"`
}

type LoopGeneration

type LoopGeneration struct {
	LoopRunID        string    `json:"loop_run_id"`
	Generation       int64     `json:"generation"`
	ParentGeneration int64     `json:"parent_generation"`
	Origin           string    `json:"origin"`
	CreatedAt        time.Time `json:"created_at"`
}

type LoopGenerationOutput

type LoopGenerationOutput struct {
	LoopRunID           string         `json:"loop_run_id"`
	Generation          int64          `json:"generation"`
	NodeID              string         `json:"node_id"`
	ItemIndex           int64          `json:"item_index"`
	OutputID            sql.NullString `json:"output_id"`
	ArtifactName        sql.NullString `json:"artifact_name"`
	Status              string         `json:"status"`
	OutputRef           sql.NullString `json:"output_ref"`
	TaskRunID           sql.NullString `json:"task_run_id"`
	ChildLoopRunID      sql.NullString `json:"child_loop_run_id"`
	ResolvedRuntimeJson sql.NullString `json:"resolved_runtime_json"`
	Attempt             int64          `json:"attempt"`
	NextAttemptAt       sql.NullTime   `json:"next_attempt_at"`
	FirstScheduledAt    sql.NullTime   `json:"first_scheduled_at"`
	Epoch               int64          `json:"epoch"`
	GoalStatus          sql.NullString `json:"goal_status"`
	GoalTurnsUsed       sql.NullInt64  `json:"goal_turns_used"`
	GoalTurnLimit       sql.NullInt64  `json:"goal_turn_limit"`
}

type LoopGoalBindingRetryWitness

type LoopGoalBindingRetryWitness struct {
	LoopRunID          string    `json:"loop_run_id"`
	Handle             string    `json:"handle"`
	FailedBindingEpoch int64     `json:"failed_binding_epoch"`
	RequestDigest      string    `json:"request_digest"`
	CreatedAt          time.Time `json:"created_at"`
}

type LoopGoalCheckpoint

type LoopGoalCheckpoint struct {
	LoopRunID                   string         `json:"loop_run_id"`
	Generation                  int64          `json:"generation"`
	NodeID                      string         `json:"node_id"`
	ItemIndex                   int64          `json:"item_index"`
	ControlEpoch                int64          `json:"control_epoch"`
	ControlActorKind            sql.NullString `json:"control_actor_kind"`
	ControlActorID              sql.NullString `json:"control_actor_id"`
	ControlRequestedAt          sql.NullTime   `json:"control_requested_at"`
	Phase                       string         `json:"phase"`
	GoalStatus                  string         `json:"goal_status"`
	TurnsUsed                   int64          `json:"turns_used"`
	TurnLimit                   int64          `json:"turn_limit"`
	BrokenStreak                int64          `json:"broken_streak"`
	RecoveryStreak              int64          `json:"recovery_streak"`
	TaskRunID                   sql.NullString `json:"task_run_id"`
	QueueEntryID                sql.NullString `json:"queue_entry_id"`
	PromptID                    sql.NullString `json:"prompt_id"`
	PromptKind                  sql.NullString `json:"prompt_kind"`
	PromptAttempt               int64          `json:"prompt_attempt"`
	ContextState                string         `json:"context_state"`
	UsageSequence               sql.NullInt64  `json:"usage_sequence"`
	UsagePendingAfterSequence   sql.NullInt64  `json:"usage_pending_after_sequence"`
	SessionID                   sql.NullString `json:"session_id"`
	BindingHandle               sql.NullString `json:"binding_handle"`
	BindingEpoch                sql.NullInt64  `json:"binding_epoch"`
	ContextNudgeRatio           float64        `json:"context_nudge_ratio"`
	ControlGrantID              int64          `json:"control_grant_id"`
	ControlGrantKind            sql.NullString `json:"control_grant_kind"`
	ControlGrantCause           sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn            sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope           sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed        int64          `json:"control_grant_consumed"`
	JudgeAttemptID              sql.NullString `json:"judge_attempt_id"`
	CompactionCancelPromptID    sql.NullString `json:"compaction_cancel_prompt_id"`
	CompactionCancelCause       sql.NullString `json:"compaction_cancel_cause"`
	CompactionCancelRequestedAt sql.NullTime   `json:"compaction_cancel_requested_at"`
	ReportPromptID              sql.NullString `json:"report_prompt_id"`
	ReportStatus                sql.NullString `json:"report_status"`
	ReportEvidenceRef           sql.NullString `json:"report_evidence_ref"`
	ReportBindingEpoch          sql.NullInt64  `json:"report_binding_epoch"`
	ReportActorKind             sql.NullString `json:"report_actor_kind"`
	ReportActorID               sql.NullString `json:"report_actor_id"`
	ReportRecordedAt            sql.NullTime   `json:"report_recorded_at"`
	UpdatedAt                   time.Time      `json:"updated_at"`
	ControlCause                sql.NullString `json:"control_cause"`
	CompactionBaselineUsed      sql.NullInt64  `json:"compaction_baseline_used"`
	CompactionRecoveryRequired  int64          `json:"compaction_recovery_required"`
}

type LoopGoalJudgeAttempt

type LoopGoalJudgeAttempt struct {
	AttemptID       string         `json:"attempt_id"`
	LoopRunID       string         `json:"loop_run_id"`
	Generation      int64          `json:"generation"`
	NodeID          string         `json:"node_id"`
	ItemIndex       int64          `json:"item_index"`
	Turn            int64          `json:"turn"`
	JudgeDigest     string         `json:"judge_digest"`
	Status          string         `json:"status"`
	Outcome         sql.NullString `json:"outcome"`
	BlockingJson    string         `json:"blocking_json"`
	CriteriaJson    string         `json:"criteria_json"`
	WarningsJson    string         `json:"warnings_json"`
	EvidenceRef     sql.NullString `json:"evidence_ref"`
	TokensUsed      sql.NullInt64  `json:"tokens_used"`
	UsageBaseTokens int64          `json:"usage_base_tokens"`
	StartedAt       time.Time      `json:"started_at"`
	CompletedAt     sql.NullTime   `json:"completed_at"`
}

type LoopGoalSessionOutbox

type LoopGoalSessionOutbox struct {
	ID              int64          `json:"id"`
	EventID         string         `json:"event_id"`
	WorkspaceID     string         `json:"workspace_id"`
	OriginSessionID string         `json:"origin_session_id"`
	LoopRunID       string         `json:"loop_run_id"`
	BoundSessionID  sql.NullString `json:"bound_session_id"`
	Cause           string         `json:"cause"`
	CreatedAt       time.Time      `json:"created_at"`
	DeliveredAt     sql.NullTime   `json:"delivered_at"`
}

type LoopGoalTurn

type LoopGoalTurn struct {
	LoopRunID       string         `json:"loop_run_id"`
	Seq             int64          `json:"seq"`
	Generation      int64          `json:"generation"`
	NodeID          string         `json:"node_id"`
	ItemIndex       int64          `json:"item_index"`
	Turn            int64          `json:"turn"`
	SessionID       string         `json:"session_id"`
	BindingHandle   string         `json:"binding_handle"`
	BindingEpoch    int64          `json:"binding_epoch"`
	PromptID        string         `json:"prompt_id"`
	PromptAttempt   int64          `json:"prompt_attempt"`
	UsageBaseTokens int64          `json:"usage_base_tokens"`
	ResultStatus    sql.NullString `json:"result_status"`
	StopReason      sql.NullString `json:"stop_reason"`
	ReasonCode      sql.NullString `json:"reason_code"`
	VerdictOutcome  sql.NullString `json:"verdict_outcome"`
	BlockingJson    string         `json:"blocking_json"`
	CriteriaJson    string         `json:"criteria_json"`
	WarningsJson    string         `json:"warnings_json"`
	EvidenceRef     sql.NullString `json:"evidence_ref"`
	PromptRef       sql.NullString `json:"prompt_ref"`
	TokensUsed      sql.NullInt64  `json:"tokens_used"`
	ActorKind       string         `json:"actor_kind"`
	ActorID         string         `json:"actor_id"`
	StartedAt       time.Time      `json:"started_at"`
	EndedAt         sql.NullTime   `json:"ended_at"`
}

type LoopNodeAmendment

type LoopNodeAmendment struct {
	WorkspaceID  string         `json:"workspace_id"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	AmendmentSeq int64          `json:"amendment_seq"`
	OriginalRef  string         `json:"original_ref"`
	AmendedRef   string         `json:"amended_ref"`
	ActorKind    string         `json:"actor_kind"`
	ActorID      string         `json:"actor_id"`
	Reason       sql.NullString `json:"reason"`
	CreatedAt    time.Time      `json:"created_at"`
}

type LoopNodeAttempt

type LoopNodeAttempt struct {
	LoopRunID     string         `json:"loop_run_id"`
	Generation    int64          `json:"generation"`
	NodeID        string         `json:"node_id"`
	ItemIndex     int64          `json:"item_index"`
	Attempt       int64          `json:"attempt"`
	FailureClass  sql.NullString `json:"failure_class"`
	FailureCode   string         `json:"failure_code"`
	Cause         string         `json:"cause"`
	Hint          string         `json:"hint"`
	Target        string         `json:"target"`
	Disposition   string         `json:"disposition"`
	StartedAt     time.Time      `json:"started_at"`
	EndedAt       sql.NullTime   `json:"ended_at"`
	NextAttemptAt sql.NullTime   `json:"next_attempt_at"`
}

type LoopNodeControl

type LoopNodeControl struct {
	LoopRunID               string         `json:"loop_run_id"`
	NodeID                  string         `json:"node_id"`
	Paused                  int64          `json:"paused"`
	PauseActorKind          sql.NullString `json:"pause_actor_kind"`
	PauseActorID            sql.NullString `json:"pause_actor_id"`
	PauseReason             sql.NullString `json:"pause_reason"`
	PauseRuleID             sql.NullString `json:"pause_rule_id"`
	PauseRequestedAt        sql.NullTime   `json:"pause_requested_at"`
	Quarantined             int64          `json:"quarantined"`
	QuarantineEntryJson     sql.NullString `json:"quarantine_entry_json"`
	QuarantinedAt           sql.NullTime   `json:"quarantined_at"`
	AttentionFlag           string         `json:"attention_flag"`
	AttentionReason         string         `json:"attention_reason"`
	AttentionProducerNodeID string         `json:"attention_producer_node_id"`
	CancelState             string         `json:"cancel_state"`
	CancelActorKind         sql.NullString `json:"cancel_actor_kind"`
	CancelActorID           sql.NullString `json:"cancel_actor_id"`
	CancelReason            sql.NullString `json:"cancel_reason"`
	CancelRequestedAt       sql.NullTime   `json:"cancel_requested_at"`
	LastEvidenceAt          sql.NullTime   `json:"last_evidence_at"`
	DeathResumeStreak       int64          `json:"death_resume_streak"`
	GateRevisionsJson       string         `json:"gate_revisions_json"`
	Revision                int64          `json:"revision"`
	UpdatedAt               time.Time      `json:"updated_at"`
}

type LoopNodeLanePause

type LoopNodeLanePause struct {
	WorkspaceID string         `json:"workspace_id"`
	LoopRunID   string         `json:"loop_run_id"`
	Generation  int64          `json:"generation"`
	NodeID      string         `json:"node_id"`
	ItemIndex   int64          `json:"item_index"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	Reason      sql.NullString `json:"reason"`
	Mode        string         `json:"mode"`
	RequestedAt time.Time      `json:"requested_at"`
}

type LoopNodeWait

type LoopNodeWait struct {
	LoopRunID         string         `json:"loop_run_id"`
	Generation        int64          `json:"generation"`
	NodeID            string         `json:"node_id"`
	ItemIndex         int64          `json:"item_index"`
	Kind              string         `json:"kind"`
	ResumeAt          sql.NullTime   `json:"resume_at"`
	NextEscalationAt  sql.NullTime   `json:"next_escalation_at"`
	EscalationCursor  int64          `json:"escalation_cursor"`
	ClaimState        string         `json:"claim_state"`
	ClaimedByKind     sql.NullString `json:"claimed_by_kind"`
	ClaimedByID       sql.NullString `json:"claimed_by_id"`
	ClaimedAt         sql.NullTime   `json:"claimed_at"`
	AdmissionFailures int64          `json:"admission_failures"`
	ExpectJson        sql.NullString `json:"expect_json"`
	AheadPayloadJson  sql.NullString `json:"ahead_payload_json"`
	IssuedEpoch       int64          `json:"issued_epoch"`
	CreatedAt         time.Time      `json:"created_at"`
}

type LoopOutputBlob

type LoopOutputBlob struct {
	OutputRef   string `json:"output_ref"`
	PayloadJson string `json:"payload_json"`
	ByteSize    int64  `json:"byte_size"`
	CreatedAt   string `json:"created_at"`
	LastUsedAt  string `json:"last_used_at"`
}

type LoopRequest

type LoopRequest struct {
	WorkspaceID         string         `json:"workspace_id"`
	LoopRunID           string         `json:"loop_run_id"`
	Generation          int64          `json:"generation"`
	NodeID              string         `json:"node_id"`
	ItemIndex           int64          `json:"item_index"`
	Kind                string         `json:"kind"`
	State               string         `json:"state"`
	Prompt              string         `json:"prompt"`
	ContextPreviewJson  string         `json:"context_preview_json"`
	ContextRef          sql.NullString `json:"context_ref"`
	AnswerSchemaJson    sql.NullString `json:"answer_schema_json"`
	EditSchemaJson      sql.NullString `json:"edit_schema_json"`
	RespondSchemaJson   sql.NullString `json:"respond_schema_json"`
	DecisionsJson       string         `json:"decisions_json"`
	ProposedRef         sql.NullString `json:"proposed_ref"`
	ProposedPreviewJson sql.NullString `json:"proposed_preview_json"`
	AnsweredDecision    sql.NullString `json:"answered_decision"`
	AnsweredPayloadRef  sql.NullString `json:"answered_payload_ref"`
	AnsweredNote        sql.NullString `json:"answered_note"`
	ActorKind           sql.NullString `json:"actor_kind"`
	ActorID             sql.NullString `json:"actor_id"`
	OpenedAt            time.Time      `json:"opened_at"`
	ResolvedAt          sql.NullTime   `json:"resolved_at"`
	ExpiresAt           sql.NullTime   `json:"expires_at"`
}

type LoopRun

type LoopRun struct {
	GrantCeiling             string          `json:"grant_ceiling"`
	ID                       string          `json:"id"`
	ProfileID                string          `json:"profile_id"`
	WorkspaceID              string          `json:"workspace_id"`
	LoopName                 string          `json:"loop_name"`
	Status                   string          `json:"status"`
	Historical               int64           `json:"historical"`
	CompletionState          string          `json:"completion_state"`
	ForkedFromRunID          sql.NullString  `json:"forked_from_run_id"`
	ForkedFromGeneration     sql.NullInt64   `json:"forked_from_generation"`
	Generation               int64           `json:"generation"`
	ReattemptStrategy        string          `json:"reattempt_strategy"`
	LastProgressAt           time.Time       `json:"last_progress_at"`
	CompletedAt              sql.NullTime    `json:"completed_at"`
	BudgetTokens             int64           `json:"budget_tokens"`
	BudgetWallSec            int64           `json:"budget_wall_sec"`
	BudgetOnExceeded         string          `json:"budget_on_exceeded"`
	TokensUsed               int64           `json:"tokens_used"`
	ParentLoopRunID          sql.NullString  `json:"parent_loop_run_id"`
	PauseRequested           int64           `json:"pause_requested"`
	InputsJson               string          `json:"inputs_json"`
	CreatedAt                string          `json:"created_at"`
	IterationCap             int64           `json:"iteration_cap"`
	StartedByKind            string          `json:"started_by_kind"`
	StartedByRef             string          `json:"started_by_ref"`
	StartedOriginKind        string          `json:"started_origin_kind"`
	StartedOriginRef         string          `json:"started_origin_ref"`
	StartedAt                string          `json:"started_at"`
	DefinitionVersion        int64           `json:"definition_version"`
	DefinitionDigest         string          `json:"definition_digest"`
	ActiveGateID             string          `json:"active_gate_id"`
	ActiveHumanCriteriaJson  string          `json:"active_human_criteria_json"`
	BudgetApprovalSeq        int64           `json:"budget_approval_seq"`
	StartMetadataJson        string          `json:"start_metadata_json"`
	OriginKind               string          `json:"origin_kind"`
	OriginSessionID          sql.NullString  `json:"origin_session_id"`
	GoalClearedAt            sql.NullTime    `json:"goal_cleared_at"`
	BudgetVersion            int64           `json:"budget_version"`
	GoalContextNudgeRatio    float64         `json:"goal_context_nudge_ratio"`
	ControlActorKind         sql.NullString  `json:"control_actor_kind"`
	ControlActorID           sql.NullString  `json:"control_actor_id"`
	ControlRequestedAt       sql.NullTime    `json:"control_requested_at"`
	OriginCreationProfileRef sql.NullString  `json:"origin_creation_profile_ref"`
	OriginPolicySpecDigest   sql.NullString  `json:"origin_policy_spec_digest"`
	OriginCreationDigest     sql.NullString  `json:"origin_creation_digest"`
	BestGeneration           sql.NullInt64   `json:"best_generation"`
	BestScore                sql.NullFloat64 `json:"best_score"`
}

type LoopRunEvent

type LoopRunEvent struct {
	WatchSeq    int64          `json:"watch_seq"`
	ID          string         `json:"id"`
	LoopRunID   string         `json:"loop_run_id"`
	WorkspaceID string         `json:"workspace_id"`
	Seq         int64          `json:"seq"`
	Kind        string         `json:"kind"`
	PayloadJson string         `json:"payload_json"`
	At          time.Time      `json:"at"`
	DeliveryKey sql.NullString `json:"delivery_key"`
}

type LoopSessionBinding

type LoopSessionBinding struct {
	LoopRunID          string         `json:"loop_run_id"`
	Handle             string         `json:"handle"`
	BindingEpoch       int64          `json:"binding_epoch"`
	BindingAttemptID   string         `json:"binding_attempt_id"`
	SessionID          string         `json:"session_id"`
	WorkspaceID        string         `json:"workspace_id"`
	CreationProfileRef string         `json:"creation_profile_ref"`
	PolicySpecDigest   string         `json:"policy_spec_digest"`
	CreationDigest     string         `json:"creation_digest"`
	Ownership          string         `json:"ownership"`
	State              string         `json:"state"`
	FailureCode        sql.NullString `json:"failure_code"`
	CreatedAt          time.Time      `json:"created_at"`
	ActivatedAt        sql.NullTime   `json:"activated_at"`
	FailedAt           sql.NullTime   `json:"failed_at"`
	ClosedAt           sql.NullTime   `json:"closed_at"`
	AdoptedGeneration  int64          `json:"adopted_generation"`
	AdoptionAttemptID  sql.NullString `json:"adoption_attempt_id"`
}

type LoopSessionCleanup

type LoopSessionCleanup struct {
	ID          int64        `json:"id"`
	CleanupID   string       `json:"cleanup_id"`
	WorkspaceID string       `json:"workspace_id"`
	LoopRunID   string       `json:"loop_run_id"`
	SourceKind  string       `json:"source_kind"`
	SourceID    string       `json:"source_id"`
	SourceEpoch int64        `json:"source_epoch"`
	SessionID   string       `json:"session_id"`
	Cause       string       `json:"cause"`
	CreatedAt   time.Time    `json:"created_at"`
	CompletedAt sql.NullTime `json:"completed_at"`
}

type LoopTimetravelOp

type LoopTimetravelOp struct {
	WorkspaceID      string         `json:"workspace_id"`
	OpID             string         `json:"op_id"`
	Kind             string         `json:"kind"`
	IdempotencyKey   string         `json:"idempotency_key"`
	RequestDigest    string         `json:"request_digest"`
	SourceRunID      string         `json:"source_run_id"`
	SourceGeneration sql.NullInt64  `json:"source_generation"`
	FromNode         sql.NullString `json:"from_node"`
	ItemIndex        sql.NullInt64  `json:"item_index"`
	ActorKind        string         `json:"actor_kind"`
	ActorID          string         `json:"actor_id"`
	Reason           sql.NullString `json:"reason"`
	ResultRunID      string         `json:"result_run_id"`
	ResultGeneration sql.NullInt64  `json:"result_generation"`
	CreatedAt        time.Time      `json:"created_at"`
}

type LoopUiAnnotation

type LoopUiAnnotation struct {
	ProfileID   string  `json:"profile_id"`
	WorkspaceID string  `json:"workspace_id"`
	LoopName    string  `json:"loop_name"`
	NodeID      string  `json:"node_id"`
	X           float64 `json:"x"`
	Y           float64 `json:"y"`
}

type MarkGatewayEndpointUnavailableParams

type MarkGatewayEndpointUnavailableParams struct {
	UpdatedAt string `json:"updated_at"`
	Tier      string `json:"tier"`
}

type MarkGoalJudgeAttemptAmbiguousParams

type MarkGoalJudgeAttemptAmbiguousParams struct {
	CompletedAt string `json:"completed_at"`
	AttemptID   string `json:"attempt_id"`
	LoopRunID   string `json:"loop_run_id"`
}

type MarkGoalRunClearedParams

type MarkGoalRunClearedParams struct {
	GoalClearedAt string `json:"goal_cleared_at"`
	ID            string `json:"id"`
	WorkspaceID   string `json:"workspace_id"`
}

type MarkInlineGoalRunClearedParams

type MarkInlineGoalRunClearedParams struct {
	GoalClearedAt sql.NullTime `json:"goal_cleared_at"`
	ID            string       `json:"id"`
	WorkspaceID   string       `json:"workspace_id"`
}

type MarkMarketplaceCatalogStateStaleParams

type MarkMarketplaceCatalogStateStaleParams struct {
	LastError  string `json:"last_error"`
	ErrorClass string `json:"error_class"`
	Source     string `json:"source"`
	Generation int64  `json:"generation"`
}

type MarkQueuedSessionPromptAdmissionIndeterminateParams

type MarkQueuedSessionPromptAdmissionIndeterminateParams struct {
	IndeterminateState     string `json:"indeterminate_state"`
	IndeterminateReason    string `json:"indeterminate_reason"`
	UpdatedAt              string `json:"updated_at"`
	ID                     string `json:"id"`
	SessionID              string `json:"session_id"`
	DispatchCommittedState string `json:"dispatch_committed_state"`
}

type MarkSessionDerivationChildDeletedParams

type MarkSessionDerivationChildDeletedParams struct {
	ChildDeletedAt sql.NullString `json:"child_deleted_at"`
	ChildSessionID string         `json:"child_session_id"`
}

type MarkSessionHealthStaleParams

type MarkSessionHealthStaleParams struct {
	Health              string         `json:"health"`
	IneligibilityReason sql.NullString `json:"ineligibility_reason"`
	UpdatedAt           string         `json:"updated_at"`
	Cutoff              sql.NullString `json:"cutoff"`
}

type MarkSessionInputClearTraceProjectedParams

type MarkSessionInputClearTraceProjectedParams struct {
	Now       sql.NullString `json:"now"`
	SessionID string         `json:"session_id"`
	EntryID   string         `json:"entry_id"`
}

type MarkSessionInputFailedParams

type MarkSessionInputFailedParams struct {
	FailedStatus      string         `json:"failed_status"`
	Now               sql.NullString `json:"now"`
	FailureSummary    string         `json:"failure_summary"`
	UpdatedAt         string         `json:"updated_at"`
	ID                string         `json:"id"`
	SessionID         string         `json:"session_id"`
	DispatchingStatus string         `json:"dispatching_status"`
}

type MarkSessionInputSentInTurnParams

type MarkSessionInputSentInTurnParams struct {
	Now       sql.NullString `json:"now"`
	TurnID    string         `json:"turn_id"`
	ID        string         `json:"id"`
	SessionID string         `json:"session_id"`
}

type MarkSessionOrphanedParams

type MarkSessionOrphanedParams struct {
	State     string `json:"state"`
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type MarkSessionPromptAdmissionIndeterminateParams

type MarkSessionPromptAdmissionIndeterminateParams struct {
	IndeterminateState     string `json:"indeterminate_state"`
	IndeterminateReason    string `json:"indeterminate_reason"`
	UpdatedAt              string `json:"updated_at"`
	WorkspaceID            string `json:"workspace_id"`
	SessionID              string `json:"session_id"`
	IdempotencyKey         string `json:"idempotency_key"`
	DispatchCommittedState string `json:"dispatch_committed_state"`
	CompletedState         string `json:"completed_state"`
}

type MarkSubagentFirstPromptAdmittedParams

type MarkSubagentFirstPromptAdmittedParams struct {
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type MarkSubagentWakeDispatchedParams

type MarkSubagentWakeDispatchedParams struct {
	UpdatedAt     string `json:"updated_at"`
	WakeMessageID string `json:"wake_message_id"`
}

type MarkSubagentWakeSteerRequeuedParams

type MarkSubagentWakeSteerRequeuedParams struct {
	UpdatedAt     string `json:"updated_at"`
	WakeMessageID string `json:"wake_message_id"`
}

type MarkTaskNeedsAttentionIfClearParams

type MarkTaskNeedsAttentionIfClearParams struct {
	Reason    sql.NullString `json:"reason"`
	MarkedAt  sql.NullString `json:"marked_at"`
	ActorKind sql.NullString `json:"actor_kind"`
	ActorRef  sql.NullString `json:"actor_ref"`
	ID        string         `json:"id"`
}

type MarkTaskRunNeedsAttentionParams

type MarkTaskRunNeedsAttentionParams struct {
	Error                  sql.NullString `json:"error"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type MarketplaceCatalogConfig

type MarketplaceCatalogConfig struct {
	ID         int64  `json:"id"`
	Generation int64  `json:"generation"`
	Revision   string `json:"revision"`
}

type MarketplaceCatalogEntry

type MarketplaceCatalogEntry struct {
	Source         string         `json:"source"`
	EntryID        string         `json:"entry_id"`
	Name           string         `json:"name"`
	Description    string         `json:"description"`
	Version        string         `json:"version"`
	PublishedAt    sql.NullString `json:"published_at"`
	UpdatedAt      sql.NullString `json:"updated_at"`
	DigestSha256   sql.NullString `json:"digest_sha256"`
	Tier           sql.NullString `json:"tier"`
	InstallSlug    sql.NullString `json:"install_slug"`
	PayloadJson    string         `json:"payload_json"`
	FetchedAt      string         `json:"fetched_at"`
	Layout         string         `json:"layout"`
	Icon           string         `json:"icon"`
	Installable    int64          `json:"installable"`
	InstallBlocker string         `json:"install_blocker"`
	ResolvedRef    string         `json:"resolved_ref"`
}

type MarketplaceCatalogState

type MarketplaceCatalogState struct {
	Source          string         `json:"source"`
	SourceRef       string         `json:"source_ref"`
	ConfigRevision  string         `json:"config_revision"`
	DocumentDigest  string         `json:"document_digest"`
	DiagnosticsJson string         `json:"diagnostics_json"`
	ManifestVersion int64          `json:"manifest_version"`
	GeneratedAt     sql.NullString `json:"generated_at"`
	FetchedAt       string         `json:"fetched_at"`
	Stale           int64          `json:"stale"`
	LastError       string         `json:"last_error"`
	KindOfSource    string         `json:"kind_of_source"`
	Enabled         int64          `json:"enabled"`
	Plugins         int64          `json:"plugins"`
	Installable     int64          `json:"installable"`
	ErrorClass      string         `json:"error_class"`
	DocumentPath    string         `json:"document_path"`
	Owner           string         `json:"owner"`
	Revision        string         `json:"revision"`
	Generation      int64          `json:"generation"`
}

type McpAuthToken

type McpAuthToken struct {
	Scope                 string         `json:"scope"`
	WorkspaceID           string         `json:"workspace_id"`
	Owner                 string         `json:"owner"`
	ServerName            string         `json:"server_name"`
	DefinitionFingerprint string         `json:"definition_fingerprint"`
	Issuer                string         `json:"issuer"`
	ClientID              string         `json:"client_id"`
	ScopesJson            string         `json:"scopes_json"`
	AccessTokenRef        string         `json:"access_token_ref"`
	RefreshTokenRef       string         `json:"refresh_token_ref"`
	TokenType             string         `json:"token_type"`
	ExpiresAt             sql.NullString `json:"expires_at"`
	ObtainedAt            string         `json:"obtained_at"`
	UpdatedAt             string         `json:"updated_at"`
}

type McpOauthRegistration

type McpOauthRegistration struct {
	Scope                      string         `json:"scope"`
	WorkspaceID                string         `json:"workspace_id"`
	Owner                      string         `json:"owner"`
	ServerName                 string         `json:"server_name"`
	DefinitionFingerprint      string         `json:"definition_fingerprint"`
	ResourceUrl                string         `json:"resource_url"`
	Issuer                     string         `json:"issuer"`
	ClientID                   string         `json:"client_id"`
	TokenEndpointAuthMethod    string         `json:"token_endpoint_auth_method"`
	ClientSecretRef            string         `json:"client_secret_ref"`
	RegistrationAccessTokenRef string         `json:"registration_access_token_ref"`
	RegistrationClientUri      string         `json:"registration_client_uri"`
	ClientIDIssuedAt           sql.NullString `json:"client_id_issued_at"`
	ClientSecretExpiresAt      sql.NullString `json:"client_secret_expires_at"`
	RedirectUri                string         `json:"redirect_uri"`
	ScopesJson                 string         `json:"scopes_json"`
	UpdatedAt                  string         `json:"updated_at"`
}

type ModelCatalogExecutionContext

type ModelCatalogExecutionContext struct {
	ContextID          string `json:"context_id"`
	Scope              string `json:"scope"`
	ProfileID          string `json:"profile_id"`
	WorkspaceID        string `json:"workspace_id"`
	CommandFingerprint string `json:"command_fingerprint"`
}

type ModelCatalogOption

type ModelCatalogOption struct {
	ContextID      string         `json:"context_id"`
	SourceID       string         `json:"source_id"`
	ProviderID     string         `json:"provider_id"`
	ModelID        string         `json:"model_id"`
	OptionID       string         `json:"option_id"`
	Label          string         `json:"label"`
	Description    string         `json:"description"`
	Category       string         `json:"category"`
	Kind           string         `json:"kind"`
	CurrentValueID sql.NullString `json:"current_value_id"`
	CurrentBool    sql.NullInt64  `json:"current_bool"`
}

type ModelCatalogOptionValue

type ModelCatalogOptionValue struct {
	ContextID   string `json:"context_id"`
	SourceID    string `json:"source_id"`
	ProviderID  string `json:"provider_id"`
	ModelID     string `json:"model_id"`
	OptionID    string `json:"option_id"`
	ValueID     string `json:"value_id"`
	Label       string `json:"label"`
	Description string `json:"description"`
	GroupID     string `json:"group_id"`
	GroupLabel  string `json:"group_label"`
	Rank        int64  `json:"rank"`
}

type ModelCatalogReasoningEffort

type ModelCatalogReasoningEffort struct {
	ContextID  string `json:"context_id"`
	SourceID   string `json:"source_id"`
	ProviderID string `json:"provider_id"`
	ModelID    string `json:"model_id"`
	Effort     string `json:"effort"`
	Rank       int64  `json:"rank"`
}

type ModelCatalogRow

type ModelCatalogRow struct {
	ContextID                string          `json:"context_id"`
	SourceID                 string          `json:"source_id"`
	ProviderID               string          `json:"provider_id"`
	ModelID                  string          `json:"model_id"`
	SourceKind               string          `json:"source_kind"`
	Priority                 int64           `json:"priority"`
	Available                sql.NullInt64   `json:"available"`
	Stale                    int64           `json:"stale"`
	RefreshedAt              string          `json:"refreshed_at"`
	ExpiresAt                string          `json:"expires_at"`
	DisplayName              string          `json:"display_name"`
	ContextWindow            sql.NullInt64   `json:"context_window"`
	MaxInputTokens           sql.NullInt64   `json:"max_input_tokens"`
	MaxOutputTokens          sql.NullInt64   `json:"max_output_tokens"`
	SupportsTools            sql.NullInt64   `json:"supports_tools"`
	SupportsReasoning        sql.NullInt64   `json:"supports_reasoning"`
	DefaultReasoningEffort   sql.NullString  `json:"default_reasoning_effort"`
	CostInputPerMillion      sql.NullFloat64 `json:"cost_input_per_million"`
	CostOutputPerMillion     sql.NullFloat64 `json:"cost_output_per_million"`
	CostCacheReadPerMillion  sql.NullFloat64 `json:"cost_cache_read_per_million"`
	CostCacheWritePerMillion sql.NullFloat64 `json:"cost_cache_write_per_million"`
	CostReasoningPerMillion  sql.NullFloat64 `json:"cost_reasoning_per_million"`
	LastError                string          `json:"last_error"`
	Deprecated               int64           `json:"deprecated"`
	Hidden                   int64           `json:"hidden"`
	Featured                 int64           `json:"featured"`
	ReleaseDate              sql.NullString  `json:"release_date"`
	ExplicitlyCurated        int64           `json:"explicitly_curated"`
	DeprecatedSet            int64           `json:"deprecated_set"`
	HiddenSet                int64           `json:"hidden_set"`
	FeaturedSet              int64           `json:"featured_set"`
}

type ModelCatalogSource

type ModelCatalogSource struct {
	ContextID     string `json:"context_id"`
	SourceID      string `json:"source_id"`
	ProviderID    string `json:"provider_id"`
	SourceKind    string `json:"source_kind"`
	Priority      int64  `json:"priority"`
	RefreshState  string `json:"refresh_state"`
	LastRefreshAt string `json:"last_refresh_at"`
	NextRefreshAt string `json:"next_refresh_at"`
	LastSuccessAt string `json:"last_success_at"`
	LastError     string `json:"last_error"`
	RowCount      int64  `json:"row_count"`
	Stale         int64  `json:"stale"`
}

type ModelCatalogTransportBinding

type ModelCatalogTransportBinding struct {
	ContextID         string         `json:"context_id"`
	SourceID          string         `json:"source_id"`
	ProviderID        string         `json:"provider_id"`
	ModelID           string         `json:"model_id"`
	TransportModelID  string         `json:"transport_model_id"`
	Label             string         `json:"label"`
	ReasoningEffort   sql.NullString `json:"reasoning_effort"`
	Fast              sql.NullInt64  `json:"fast"`
	Thinking          sql.NullInt64  `json:"thinking"`
	Rank              int64          `json:"rank"`
	ConfigOptionsJson string         `json:"config_options_json"`
}

type ModelCatalogTransportBindingSelection

type ModelCatalogTransportBindingSelection struct {
	ContextID        string         `json:"context_id"`
	SourceID         string         `json:"source_id"`
	ProviderID       string         `json:"provider_id"`
	ModelID          string         `json:"model_id"`
	TransportModelID string         `json:"transport_model_id"`
	OptionID         string         `json:"option_id"`
	ValueID          sql.NullString `json:"value_id"`
	BoolValue        sql.NullInt64  `json:"bool_value"`
}

type NextSessionContainerPositionParams

type NextSessionContainerPositionParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
}

type NextWorkspaceContainerPositionParams

type NextWorkspaceContainerPositionParams struct {
	ProfileID string         `json:"profile_id"`
	FolderID  sql.NullString `json:"folder_id"`
}

type NotificationCursor

type NotificationCursor struct {
	ScopeKind       string         `json:"scope_kind"`
	ProfileID       string         `json:"profile_id"`
	WorkspaceID     string         `json:"workspace_id"`
	ConsumerID      string         `json:"consumer_id"`
	StreamName      string         `json:"stream_name"`
	SubjectID       string         `json:"subject_id"`
	LastSequence    int64          `json:"last_sequence"`
	LastDeliveryID  string         `json:"last_delivery_id"`
	LastDeliveredAt sql.NullString `json:"last_delivered_at"`
	LastError       string         `json:"last_error"`
	UpdatedAt       string         `json:"updated_at"`
}

type OldestQueuedLoopRunReadyForPromotionParams

type OldestQueuedLoopRunReadyForPromotionParams struct {
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
	LoopName    string `json:"loop_name"`
}

type OldestQueuedLoopRunReadyForPromotionRow

type OldestQueuedLoopRunReadyForPromotionRow struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
	LoopName    string `json:"loop_name"`
	Generation  int64  `json:"generation"`
}

type PatchLoopConfigParams

type PatchLoopConfigParams struct {
	PatchHumanGate        int64          `json:"patch_human_gate"`
	HumanGateEnabled      int64          `json:"human_gate_enabled"`
	PatchReattempt        sql.NullString `json:"patch_reattempt"`
	ReattemptStrategy     sql.NullString `json:"reattempt_strategy"`
	PatchEnabledChecks    string         `json:"patch_enabled_checks"`
	EnabledChecksJson     string         `json:"enabled_checks_json"`
	PatchIterationCap     sql.NullInt64  `json:"patch_iteration_cap"`
	IterationCap          sql.NullInt64  `json:"iteration_cap"`
	PatchBudgetTokens     sql.NullInt64  `json:"patch_budget_tokens"`
	BudgetTokens          sql.NullInt64  `json:"budget_tokens"`
	PatchBudgetWallSec    sql.NullInt64  `json:"patch_budget_wall_sec"`
	BudgetWallSec         sql.NullInt64  `json:"budget_wall_sec"`
	PatchBudgetOnExceeded sql.NullString `json:"patch_budget_on_exceeded"`
	BudgetOnExceeded      sql.NullString `json:"budget_on_exceeded"`
	PatchNoProgressWindow sql.NullInt64  `json:"patch_no_progress_window"`
	NoProgressWindow      sql.NullInt64  `json:"no_progress_window"`
	PatchFanOutWidth      sql.NullInt64  `json:"patch_fan_out_width"`
	FanOutWidth           sql.NullInt64  `json:"fan_out_width"`
	PatchGateMaxRevisions sql.NullInt64  `json:"patch_gate_max_revisions"`
	GateMaxRevisions      sql.NullInt64  `json:"gate_max_revisions"`
	PatchRuntimeDefaults  sql.NullString `json:"patch_runtime_defaults"`
	RuntimeDefaultsJson   sql.NullString `json:"runtime_defaults_json"`
	PatchRuntimeRules     sql.NullString `json:"patch_runtime_rules"`
	RuntimeRulesJson      sql.NullString `json:"runtime_rules_json"`
	PatchEnvironment      sql.NullString `json:"patch_environment"`
	EnvironmentJson       sql.NullString `json:"environment_json"`
	ProfileID             string         `json:"profile_id"`
	WorkspaceID           string         `json:"workspace_id"`
	LoopName              string         `json:"loop_name"`
}

type PauseTaskParams

type PauseTaskParams struct {
	PausedBy     string         `json:"paused_by"`
	PausedAt     sql.NullString `json:"paused_at"`
	PausedReason string         `json:"paused_reason"`
	UpdatedAt    string         `json:"updated_at"`
	ID           string         `json:"id"`
}

type PeekNextSessionInputParams

type PeekNextSessionInputParams struct {
	SessionID    string `json:"session_id"`
	QueuedStatus string `json:"queued_status"`
}

type PermissionLog

type PermissionLog struct {
	ID         string `json:"id"`
	SessionID  string `json:"session_id"`
	AgentName  string `json:"agent_name"`
	Action     string `json:"action"`
	Resource   string `json:"resource"`
	Decision   string `json:"decision"`
	PolicyUsed string `json:"policy_used"`
	Timestamp  string `json:"timestamp"`
}

type PersistGoalQueueTerminalParams

type PersistGoalQueueTerminalParams struct {
	Status                 string         `json:"status"`
	TerminalEventStartSeq  sql.NullInt64  `json:"terminal_event_start_seq"`
	TerminalEventEndSeq    sql.NullInt64  `json:"terminal_event_end_seq"`
	TerminalKind           sql.NullString `json:"terminal_kind"`
	TerminalStopReason     sql.NullString `json:"terminal_stop_reason"`
	TerminalDisposition    sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode     sql.NullString `json:"terminal_reason_code"`
	TerminalTokensReported int64          `json:"terminal_tokens_reported"`
	TerminalTokensUsed     sql.NullInt64  `json:"terminal_tokens_used"`
	TerminalAt             string         `json:"terminal_at"`
	ID                     string         `json:"id"`
	LoopRunID              sql.NullString `json:"loop_run_id"`
	TaskRunID              string         `json:"task_run_id"`
	PromptID               sql.NullString `json:"prompt_id"`
	OwnerKind              sql.NullString `json:"owner_kind"`
	OwnerEpoch             sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch           sql.NullInt64  `json:"binding_epoch"`
	SessionID              string         `json:"session_id"`
	DispatchTokenHash      sql.NullString `json:"dispatch_token_hash"`
}

type Profile

type Profile struct {
	ID         string         `json:"id"`
	Name       string         `json:"name"`
	Color      string         `json:"color"`
	Icon       sql.NullString `json:"icon"`
	Emoji      sql.NullString `json:"emoji"`
	State      string         `json:"state"`
	CreatedAt  string         `json:"created_at"`
	ArchivedAt sql.NullString `json:"archived_at"`
}

type ProfileCredentialRequirement

type ProfileCredentialRequirement struct {
	ProfileID         string `json:"profile_id"`
	Provider          string `json:"provider"`
	Slot              string `json:"slot"`
	SourceExtension   string `json:"source_extension"`
	DeclarationDigest string `json:"declaration_digest"`
	CreatedAt         string `json:"created_at"`
}

type ProfileLifecycleOp

type ProfileLifecycleOp struct {
	ID           string         `json:"id"`
	Kind         string         `json:"kind"`
	ProfileID    string         `json:"profile_id"`
	OldName      sql.NullString `json:"old_name"`
	NewName      sql.NullString `json:"new_name"`
	PlanRevision string         `json:"plan_revision"`
	Status       string         `json:"status"`
	CreatedAt    string         `json:"created_at"`
	UpdatedAt    string         `json:"updated_at"`
	CompletedAt  sql.NullString `json:"completed_at"`
	ErrorCode    sql.NullString `json:"error_code"`
	ErrorMessage sql.NullString `json:"error_message"`
}

type ProfileLifecycleOpCredentialAsk

type ProfileLifecycleOpCredentialAsk struct {
	OpID     string `json:"op_id"`
	Provider string `json:"provider"`
	Slot     string `json:"slot"`
}

type ProfileLifecycleOpSeed

type ProfileLifecycleOpSeed struct {
	OpID              string         `json:"op_id"`
	Color             string         `json:"color"`
	Icon              sql.NullString `json:"icon"`
	Emoji             sql.NullString `json:"emoji"`
	DefaultAgent      sql.NullString `json:"default_agent"`
	DefaultProvider   sql.NullString `json:"default_provider"`
	DeclarationDigest string         `json:"declaration_digest"`
}

type ProfileLifecycleOpStep

type ProfileLifecycleOpStep struct {
	OpID         string         `json:"op_id"`
	Seq          int64          `json:"seq"`
	Action       string         `json:"action"`
	PathOld      sql.NullString `json:"path_old"`
	PathNew      sql.NullString `json:"path_new"`
	Status       string         `json:"status"`
	UpdatedAt    string         `json:"updated_at"`
	ErrorMessage sql.NullString `json:"error_message"`
}

type ProfileSelection

type ProfileSelection struct {
	Lens        string `json:"lens"`
	WorkspaceID string `json:"workspace_id"`
	ProfileID   string `json:"profile_id"`
	UpdatedAt   string `json:"updated_at"`
}

type ProjectGoalCheckpointCountsParams

type ProjectGoalCheckpointCountsParams struct {
	GoalStatus    sql.NullString `json:"goal_status"`
	GoalTurnsUsed sql.NullInt64  `json:"goal_turns_used"`
	GoalTurnLimit sql.NullInt64  `json:"goal_turn_limit"`
	LoopRunID     string         `json:"loop_run_id"`
	Generation    int64          `json:"generation"`
	NodeID        string         `json:"node_id"`
	ItemIndex     int64          `json:"item_index"`
}

type ProjectGoalGrantOutputParams

type ProjectGoalGrantOutputParams struct {
	GoalTurnsUsed sql.NullInt64 `json:"goal_turns_used"`
	GoalTurnLimit sql.NullInt64 `json:"goal_turn_limit"`
	LoopRunID     string        `json:"loop_run_id"`
	Generation    int64         `json:"generation"`
	NodeID        string        `json:"node_id"`
	ItemIndex     int64         `json:"item_index"`
}

type ProjectLoopPauseToGoalCheckpointsParams

type ProjectLoopPauseToGoalCheckpointsParams struct {
	Requested   any            `json:"requested"`
	ActorKind   sql.NullString `json:"actor_kind"`
	ActorID     sql.NullString `json:"actor_id"`
	RequestedAt sql.NullTime   `json:"requested_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
	LoopRunID   string         `json:"loop_run_id"`
}

type PromoteQueuedAgentSessionInputToSteerParams

type PromoteQueuedAgentSessionInputToSteerParams struct {
	TargetTurnID string `json:"target_turn_id"`
	Now          string `json:"now"`
	SessionID    string `json:"session_id"`
	ID           string `json:"id"`
}

type PruneModelCatalogSourceContextsParams

type PruneModelCatalogSourceContextsParams struct {
	SourceID         string `json:"source_id"`
	ProviderID       string `json:"provider_id"`
	ContextID        string `json:"context_id"`
	Scope            string `json:"scope"`
	ProfileID        string `json:"profile_id"`
	WorkspaceID      string `json:"workspace_id"`
	RetainedSiblings int64  `json:"retained_siblings"`
}

type PutApprovalGrantParams

type PutApprovalGrantParams struct {
	ProfileID   string `json:"profile_id"`
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	ToolID      string `json:"tool_id"`
	InputDigest string `json:"input_digest"`
	Decision    string `json:"decision"`
	CreatedAt   string `json:"created_at"`
	LastUsedAt  string `json:"last_used_at"`
}

type PutCmdPalettePinParams

type PutCmdPalettePinParams struct {
	ProfileLensID string `json:"profile_lens_id"`
	WorkspaceID   string `json:"workspace_id"`
	CommandID     string `json:"command_id"`
	PinnedAt      int64  `json:"pinned_at"`
}

type PutCmdPaletteQueryHitParams

type PutCmdPaletteQueryHitParams struct {
	ProfileLensID string  `json:"profile_lens_id"`
	WorkspaceID   string  `json:"workspace_id"`
	Query         string  `json:"query"`
	CommandID     string  `json:"command_id"`
	Weight        float64 `json:"weight"`
	LastUsedAt    int64   `json:"last_used_at"`
}

type PutCmdPaletteUsageParams

type PutCmdPaletteUsageParams struct {
	ProfileLensID  string  `json:"profile_lens_id"`
	WorkspaceID    string  `json:"workspace_id"`
	CommandID      string  `json:"command_id"`
	UseCount       int64   `json:"use_count"`
	FrecencyWeight float64 `json:"frecency_weight"`
	LastUsedAt     int64   `json:"last_used_at"`
	UpdatedAt      int64   `json:"updated_at"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AbandonReplyWatch

func (q *Queries) AbandonReplyWatch(ctx context.Context, arg AbandonReplyWatchParams) error

func (*Queries) AcknowledgeAttentionOccurrences

func (q *Queries) AcknowledgeAttentionOccurrences(ctx context.Context, arg AcknowledgeAttentionOccurrencesParams) error

func (*Queries) AcknowledgeGoalSessionOutbox

func (q *Queries) AcknowledgeGoalSessionOutbox(ctx context.Context, arg AcknowledgeGoalSessionOutboxParams) error

func (*Queries) AcknowledgeLoopSessionCleanup

func (q *Queries) AcknowledgeLoopSessionCleanup(ctx context.Context, arg AcknowledgeLoopSessionCleanupParams) (int64, error)

func (*Queries) AcknowledgeSubagent

func (q *Queries) AcknowledgeSubagent(ctx context.Context, arg AcknowledgeSubagentParams) error

func (*Queries) ActivateGoalBinding

func (q *Queries) ActivateGoalBinding(ctx context.Context, arg ActivateGoalBindingParams) (int64, error)

func (*Queries) ActivateLoopApproval

func (q *Queries) ActivateLoopApproval(ctx context.Context, arg ActivateLoopApprovalParams) (int64, error)

func (*Queries) ActiveGoalPromptBindingExists

func (q *Queries) ActiveGoalPromptBindingExists(ctx context.Context, arg ActiveGoalPromptBindingExistsParams) (int64, error)

func (*Queries) AdmitTaskRunDirectExecution

func (q *Queries) AdmitTaskRunDirectExecution(ctx context.Context, arg AdmitTaskRunDirectExecutionParams) (int64, error)

func (*Queries) AdvanceGoalBudgetVersion

func (q *Queries) AdvanceGoalBudgetVersion(ctx context.Context, id string) (AdvanceGoalBudgetVersionRow, error)

func (*Queries) AdvanceGoalCheckpointBindingAttempt

func (q *Queries) AdvanceGoalCheckpointBindingAttempt(ctx context.Context, arg AdvanceGoalCheckpointBindingAttemptParams) (int64, error)

func (*Queries) AdvanceGoalOriginBindingAdoption

func (q *Queries) AdvanceGoalOriginBindingAdoption(ctx context.Context, arg AdvanceGoalOriginBindingAdoptionParams) (int64, error)

func (*Queries) AdvanceGoalTerminalCheckpoint

func (q *Queries) AdvanceGoalTerminalCheckpoint(ctx context.Context, arg AdvanceGoalTerminalCheckpointParams) (int64, error)

func (*Queries) AdvanceLoopRunProgress

func (q *Queries) AdvanceLoopRunProgress(ctx context.Context, arg AdvanceLoopRunProgressParams) error

func (*Queries) AdvanceRejectedGoalCheckpoint

func (q *Queries) AdvanceRejectedGoalCheckpoint(ctx context.Context, arg AdvanceRejectedGoalCheckpointParams) (int64, error)

func (*Queries) AdvanceRevokedGoalCheckpoint

func (q *Queries) AdvanceRevokedGoalCheckpoint(ctx context.Context, arg AdvanceRevokedGoalCheckpointParams) (int64, error)

func (*Queries) AdvanceSessionInputGeneration

func (q *Queries) AdvanceSessionInputGeneration(ctx context.Context, arg AdvanceSessionInputGenerationParams) (int64, error)

func (*Queries) AdvanceTaskRunTerminalCommandPhase

func (q *Queries) AdvanceTaskRunTerminalCommandPhase(ctx context.Context, arg AdvanceTaskRunTerminalCommandPhaseParams) (int64, error)

func (*Queries) AssociateSubagentWorktree

func (q *Queries) AssociateSubagentWorktree(ctx context.Context, arg AssociateSubagentWorktreeParams) (int64, error)

func (*Queries) AttachGoalJudgeAttempt

func (q *Queries) AttachGoalJudgeAttempt(ctx context.Context, arg AttachGoalJudgeAttemptParams) (int64, error)

func (*Queries) AttachSession

func (q *Queries) AttachSession(ctx context.Context, arg AttachSessionParams) (int64, error)

func (*Queries) BackfillLoopEventWaitDeadline

func (q *Queries) BackfillLoopEventWaitDeadline(ctx context.Context, arg BackfillLoopEventWaitDeadlineParams) (int64, error)

func (*Queries) BeginGoalCompactionCancel

func (q *Queries) BeginGoalCompactionCancel(ctx context.Context, arg BeginGoalCompactionCancelParams) (int64, error)

func (*Queries) BindGoalCheckpoint

func (q *Queries) BindGoalCheckpoint(ctx context.Context, arg BindGoalCheckpointParams) (int64, error)

func (*Queries) BindLeasedTaskRunSession

func (q *Queries) BindLeasedTaskRunSession(ctx context.Context, arg BindLeasedTaskRunSessionParams) (int64, error)

func (*Queries) BindReplyWatch

func (q *Queries) BindReplyWatch(ctx context.Context, arg BindReplyWatchParams) error

func (*Queries) BindTaskRunSession

func (q *Queries) BindTaskRunSession(ctx context.Context, arg BindTaskRunSessionParams) (int64, error)

func (*Queries) CancelEmptyParentSubagentWakes

func (q *Queries) CancelEmptyParentSubagentWakes(ctx context.Context, arg CancelEmptyParentSubagentWakesParams) error

func (*Queries) CancelEmptySubagentWake

func (q *Queries) CancelEmptySubagentWake(ctx context.Context, arg CancelEmptySubagentWakeParams) error

func (*Queries) CancelPendingSessionInputs

func (q *Queries) CancelPendingSessionInputs(ctx context.Context, arg CancelPendingSessionInputsParams) (int64, error)

func (*Queries) CancelPendingSessionSteer

func (q *Queries) CancelPendingSessionSteer(ctx context.Context, arg CancelPendingSessionSteerParams) (int64, error)

func (*Queries) CancelPriorSessionSteers

func (q *Queries) CancelPriorSessionSteers(ctx context.Context, arg CancelPriorSessionSteersParams) ([]string, error)

func (*Queries) CancelSessionInput

func (q *Queries) CancelSessionInput(ctx context.Context, arg CancelSessionInputParams) error

func (*Queries) CancelSupersededAgentSessionInputs

func (q *Queries) CancelSupersededAgentSessionInputs(ctx context.Context, arg CancelSupersededAgentSessionInputsParams) ([]string, error)

Supersede: one sender replaces its own older undispatched messages to this target.

func (*Queries) CancelSupersededAutomationReservation

func (q *Queries) CancelSupersededAutomationReservation(ctx context.Context, arg CancelSupersededAutomationReservationParams) error

func (*Queries) CheckpointAmbiguousGoalJudge

func (q *Queries) CheckpointAmbiguousGoalJudge(ctx context.Context, arg CheckpointAmbiguousGoalJudgeParams) (int64, error)

func (*Queries) CheckpointAmbiguousGoalPrompt

func (q *Queries) CheckpointAmbiguousGoalPrompt(ctx context.Context, arg CheckpointAmbiguousGoalPromptParams) (int64, error)

func (*Queries) CheckpointPreparedGoalPrompt

func (q *Queries) CheckpointPreparedGoalPrompt(ctx context.Context, arg CheckpointPreparedGoalPromptParams) (int64, error)

func (*Queries) ClaimGoalQueueRow

func (q *Queries) ClaimGoalQueueRow(ctx context.Context, arg ClaimGoalQueueRowParams) (int64, error)

func (*Queries) ClaimGoalSessionOutbox

func (q *Queries) ClaimGoalSessionOutbox(ctx context.Context, claimLimit int64) ([]LoopGoalSessionOutbox, error)

func (*Queries) ClaimLoopSessionCleanup

func (q *Queries) ClaimLoopSessionCleanup(ctx context.Context, arg ClaimLoopSessionCleanupParams) ([]LoopSessionCleanup, error)

func (*Queries) ClaimMarketplaceCatalogGeneration

func (q *Queries) ClaimMarketplaceCatalogGeneration(ctx context.Context, arg ClaimMarketplaceCatalogGenerationParams) (int64, error)

func (*Queries) ClaimMarketplaceSourceConfiguration

func (q *Queries) ClaimMarketplaceSourceConfiguration(ctx context.Context) (ClaimMarketplaceSourceConfigurationRow, error)

func (*Queries) ClaimSelectedTaskRun

func (q *Queries) ClaimSelectedTaskRun(ctx context.Context, arg ClaimSelectedTaskRunParams) (int64, error)

func (*Queries) ClaimSessionInput

func (q *Queries) ClaimSessionInput(ctx context.Context, arg ClaimSessionInputParams) (int64, error)

func (*Queries) ClaimSubagentWakeRows

func (q *Queries) ClaimSubagentWakeRows(ctx context.Context, arg ClaimSubagentWakeRowsParams) error

func (*Queries) ClearGoalRunControlActor

func (q *Queries) ClearGoalRunControlActor(ctx context.Context, id string) error

func (*Queries) ClearQueuedSessionInput

func (q *Queries) ClearQueuedSessionInput(ctx context.Context, arg ClearQueuedSessionInputParams) (int64, error)

func (*Queries) ClearSettledGoalPause

func (q *Queries) ClearSettledGoalPause(ctx context.Context, id string) error

func (*Queries) ClearTaskBlock

func (q *Queries) ClearTaskBlock(ctx context.Context, arg ClearTaskBlockParams) (int64, error)

func (*Queries) ClearTaskCurrentRunProjection

func (q *Queries) ClearTaskCurrentRunProjection(ctx context.Context, arg ClearTaskCurrentRunProjectionParams) (int64, error)

func (*Queries) ClearTaskNeedsAttention

func (q *Queries) ClearTaskNeedsAttention(ctx context.Context, arg ClearTaskNeedsAttentionParams) (int64, error)

func (*Queries) CloseGoalBindingWithCleanup

func (q *Queries) CloseGoalBindingWithCleanup(ctx context.Context, arg CloseGoalBindingWithCleanupParams) (int64, error)

func (*Queries) ClosePendingLoopEffect

func (q *Queries) ClosePendingLoopEffect(ctx context.Context, arg ClosePendingLoopEffectParams) (int64, error)

func (*Queries) CommitQueuedSessionPromptAdmissionDispatch

func (q *Queries) CommitQueuedSessionPromptAdmissionDispatch(ctx context.Context, arg CommitQueuedSessionPromptAdmissionDispatchParams) (int64, error)

func (*Queries) CommitSessionPromptDispatch

func (q *Queries) CommitSessionPromptDispatch(ctx context.Context, arg CommitSessionPromptDispatchParams) (int64, error)

func (*Queries) CompareAndSwapLoopRunStatus

func (q *Queries) CompareAndSwapLoopRunStatus(ctx context.Context, arg CompareAndSwapLoopRunStatusParams) (int64, error)

func (*Queries) CompareAndSwapWorktreeState

func (q *Queries) CompareAndSwapWorktreeState(ctx context.Context, arg CompareAndSwapWorktreeStateParams) (int64, error)

func (*Queries) CompleteCoordinatorRun

func (q *Queries) CompleteCoordinatorRun(ctx context.Context, arg CompleteCoordinatorRunParams) (int64, error)

func (*Queries) CompleteGoalJudgeAttempt

func (q *Queries) CompleteGoalJudgeAttempt(ctx context.Context, arg CompleteGoalJudgeAttemptParams) (int64, error)

func (*Queries) CompleteParentRollupTaskRun

func (q *Queries) CompleteParentRollupTaskRun(ctx context.Context, arg CompleteParentRollupTaskRunParams) (int64, error)

func (*Queries) CompleteQueuedSessionPromptAdmissionDispatch

func (q *Queries) CompleteQueuedSessionPromptAdmissionDispatch(ctx context.Context, arg CompleteQueuedSessionPromptAdmissionDispatchParams) (int64, error)

func (*Queries) CompleteSessionPromptAdmission

func (q *Queries) CompleteSessionPromptAdmission(ctx context.Context, arg CompleteSessionPromptAdmissionParams) (int64, error)

func (*Queries) CompleteTaskRunLease

func (q *Queries) CompleteTaskRunLease(ctx context.Context, arg CompleteTaskRunLeaseParams) (int64, error)

func (*Queries) CompleteToolApprovalExecution

func (q *Queries) CompleteToolApprovalExecution(ctx context.Context, arg CompleteToolApprovalExecutionParams) (ToolApprovalPending, error)

func (*Queries) CompleteWorktreeCreate

func (q *Queries) CompleteWorktreeCreate(ctx context.Context, arg CompleteWorktreeCreateParams) (int64, error)

func (*Queries) CompletionCreatedTaskClaimExists

func (q *Queries) CompletionCreatedTaskClaimExists(ctx context.Context, arg CompletionCreatedTaskClaimExistsParams) (bool, error)

func (*Queries) ConsumeLoopBudgetApproval

func (q *Queries) ConsumeLoopBudgetApproval(ctx context.Context, id string) (int64, error)

func (*Queries) ConsumeTaskRunTerminalCommand

func (q *Queries) ConsumeTaskRunTerminalCommand(ctx context.Context, arg ConsumeTaskRunTerminalCommandParams) (TaskRunTerminalCommand, error)

func (*Queries) CountActiveAppTokens

func (q *Queries) CountActiveAppTokens(ctx context.Context) (int64, error)

func (*Queries) CountActiveCoordinatorRunLeases

func (q *Queries) CountActiveCoordinatorRunLeases(ctx context.Context, arg CountActiveCoordinatorRunLeasesParams) (int64, error)

func (*Queries) CountActiveGatewayDeviceSessions

func (q *Queries) CountActiveGatewayDeviceSessions(ctx context.Context) (int64, error)

func (*Queries) CountActiveTaskRunClaims

func (q *Queries) CountActiveTaskRunClaims(ctx context.Context, arg CountActiveTaskRunClaimsParams) (int64, error)

func (*Queries) CountActiveTaskRunLeasesForSession

func (q *Queries) CountActiveTaskRunLeasesForSession(ctx context.Context, arg CountActiveTaskRunLeasesForSessionParams) (int64, error)

func (*Queries) CountActiveTaskRunLeasesForWorkspace

func (q *Queries) CountActiveTaskRunLeasesForWorkspace(ctx context.Context, arg CountActiveTaskRunLeasesForWorkspaceParams) (int64, error)

func (*Queries) CountActiveTaskRunSessionBindings

func (q *Queries) CountActiveTaskRunSessionBindings(ctx context.Context, arg CountActiveTaskRunSessionBindingsParams) (int64, error)

func (*Queries) CountAllQueuedTaskRuns

func (q *Queries) CountAllQueuedTaskRuns(ctx context.Context, queuedStatus string) (int64, error)

func (*Queries) CountCreatingGoalBindings

func (q *Queries) CountCreatingGoalBindings(ctx context.Context, arg CountCreatingGoalBindingsParams) (int64, error)

func (*Queries) CountDirectTaskChildren

func (q *Queries) CountDirectTaskChildren(ctx context.Context, parentTaskID sql.NullString) (int64, error)

func (*Queries) CountExpiredSessionAttachLocks

func (q *Queries) CountExpiredSessionAttachLocks(ctx context.Context, now sql.NullString) (int64, error)

func (*Queries) CountExtensionEnvBindingsBySecretRef

func (q *Queries) CountExtensionEnvBindingsBySecretRef(ctx context.Context, secretRef string) (int64, error)

func (*Queries) CountLiveWorktreesByPath

func (q *Queries) CountLiveWorktreesByPath(ctx context.Context, path string) (int64, error)

func (*Queries) CountNeedsAttentionTaskRuns

func (q *Queries) CountNeedsAttentionTaskRuns(ctx context.Context, needsAttentionStatus string) (int64, error)

func (*Queries) CountPausedTasks

func (q *Queries) CountPausedTasks(ctx context.Context) (int64, error)

func (*Queries) CountPendingAutomationSuggestions

func (q *Queries) CountPendingAutomationSuggestions(ctx context.Context, arg CountPendingAutomationSuggestionsParams) (int64, error)

func (*Queries) CountPendingSessionInputs

func (q *Queries) CountPendingSessionInputs(ctx context.Context, arg CountPendingSessionInputsParams) (int64, error)

Human input and agent/synthetic input hold separate capacity pools.

func (*Queries) CountSessionFolders

func (q *Queries) CountSessionFolders(ctx context.Context, arg CountSessionFoldersParams) (int64, error)

func (*Queries) CountTaskDependencies

func (q *Queries) CountTaskDependencies(ctx context.Context, taskID string) (int64, error)

func (*Queries) CountWorkspaceFolders

func (q *Queries) CountWorkspaceFolders(ctx context.Context, profileID string) (int64, error)

func (*Queries) CreateAppToken

func (q *Queries) CreateAppToken(ctx context.Context, arg CreateAppTokenParams) error

func (*Queries) CreateGatewayDevice

func (q *Queries) CreateGatewayDevice(ctx context.Context, arg CreateGatewayDeviceParams) error

func (*Queries) CreatePendingToolApproval

func (q *Queries) CreatePendingToolApproval(ctx context.Context, arg CreatePendingToolApprovalParams) (ToolApprovalPending, error)

func (*Queries) CreateSkillExposure

func (q *Queries) CreateSkillExposure(ctx context.Context, arg CreateSkillExposureParams) (SkillExposure, error)

func (*Queries) DeleteAppMetadata

func (q *Queries) DeleteAppMetadata(ctx context.Context, key string) error

func (*Queries) DeleteAppTokenOrigins

func (q *Queries) DeleteAppTokenOrigins(ctx context.Context, deviceID string) error

func (*Queries) DeleteAttentionWorkspaceMutesForProfile

func (q *Queries) DeleteAttentionWorkspaceMutesForProfile(ctx context.Context, profileID string) error

func (*Queries) DeleteAutomationJob

func (q *Queries) DeleteAutomationJob(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteAutomationJobOverlay

func (q *Queries) DeleteAutomationJobOverlay(ctx context.Context, jobID string) error

func (*Queries) DeleteAutomationRun

func (q *Queries) DeleteAutomationRun(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteAutomationSchedulerState

func (q *Queries) DeleteAutomationSchedulerState(ctx context.Context, jobID string) error

func (*Queries) DeleteAutomationTrigger

func (q *Queries) DeleteAutomationTrigger(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteAutomationTriggerCatalogTerms

func (q *Queries) DeleteAutomationTriggerCatalogTerms(ctx context.Context, triggerID string) error

func (*Queries) DeleteAutomationTriggerOverlay

func (q *Queries) DeleteAutomationTriggerOverlay(ctx context.Context, triggerID string) error

func (*Queries) DeleteCmdPalettePersonalization

func (q *Queries) DeleteCmdPalettePersonalization(ctx context.Context, arg DeleteCmdPalettePersonalizationParams) error

func (*Queries) DeleteCmdPalettePin

func (q *Queries) DeleteCmdPalettePin(ctx context.Context, arg DeleteCmdPalettePinParams) error

func (*Queries) DeleteCmdPalettePins

func (q *Queries) DeleteCmdPalettePins(ctx context.Context, arg DeleteCmdPalettePinsParams) error

func (*Queries) DeleteCmdPaletteQueryHistory

func (q *Queries) DeleteCmdPaletteQueryHistory(ctx context.Context, arg DeleteCmdPaletteQueryHistoryParams) error

func (*Queries) DeleteCmdPaletteQueryHit

func (q *Queries) DeleteCmdPaletteQueryHit(ctx context.Context, arg DeleteCmdPaletteQueryHitParams) error

func (*Queries) DeleteCmdPaletteQueryHitsByCommand

func (q *Queries) DeleteCmdPaletteQueryHitsByCommand(ctx context.Context, arg DeleteCmdPaletteQueryHitsByCommandParams) error

func (*Queries) DeleteCmdPaletteUsage

func (q *Queries) DeleteCmdPaletteUsage(ctx context.Context, arg DeleteCmdPaletteUsageParams) error

func (*Queries) DeleteDeadEntity

func (q *Queries) DeleteDeadEntity(ctx context.Context, arg DeleteDeadEntityParams) (int64, error)

func (*Queries) DeleteEventSummariesBefore

func (q *Queries) DeleteEventSummariesBefore(ctx context.Context, cutoff string) (int64, error)

func (*Queries) DeleteExpiredAttentionSnapshots

func (q *Queries) DeleteExpiredAttentionSnapshots(ctx context.Context, now string) error

func (*Queries) DeleteExpiredLoopAdmissionClaims

func (q *Queries) DeleteExpiredLoopAdmissionClaims(ctx context.Context, expiresBefore time.Time) (int64, error)

func (*Queries) DeleteExtensionEnvBinding

func (q *Queries) DeleteExtensionEnvBinding(ctx context.Context, arg DeleteExtensionEnvBindingParams) (int64, error)

func (*Queries) DeleteExtensionEnvBindings

func (q *Queries) DeleteExtensionEnvBindings(ctx context.Context, arg DeleteExtensionEnvBindingsParams) (int64, error)

func (*Queries) DeleteExtensionEnvBindingsByWorkspace

func (q *Queries) DeleteExtensionEnvBindingsByWorkspace(ctx context.Context, workspaceID string) (int64, error)

func (*Queries) DeleteExtensionInput

func (q *Queries) DeleteExtensionInput(ctx context.Context, arg DeleteExtensionInputParams) error

func (*Queries) DeleteExtensionMCPAllocation

func (q *Queries) DeleteExtensionMCPAllocation(ctx context.Context, arg DeleteExtensionMCPAllocationParams) error

func (*Queries) DeleteExtensionMCPOverrides

func (q *Queries) DeleteExtensionMCPOverrides(ctx context.Context, arg DeleteExtensionMCPOverridesParams) error

func (*Queries) DeleteExtensionMCPWorkspace

func (q *Queries) DeleteExtensionMCPWorkspace(ctx context.Context, arg DeleteExtensionMCPWorkspaceParams) error

func (*Queries) DeleteGatewayIngressBinding

func (q *Queries) DeleteGatewayIngressBinding(ctx context.Context, arg DeleteGatewayIngressBindingParams) (int64, error)

func (*Queries) DeleteGatewayIngressBindingsByWorkspace

func (q *Queries) DeleteGatewayIngressBindingsByWorkspace(ctx context.Context, workspaceID sql.NullString) (int64, error)

func (*Queries) DeleteHeartbeatAgentHistory

func (q *Queries) DeleteHeartbeatAgentHistory(ctx context.Context, arg DeleteHeartbeatAgentHistoryParams) error

func (*Queries) DeleteLoopConfig

func (q *Queries) DeleteLoopConfig(ctx context.Context, arg DeleteLoopConfigParams) error

func (*Queries) DeleteLoopUIAnnotations

func (q *Queries) DeleteLoopUIAnnotations(ctx context.Context, arg DeleteLoopUIAnnotationsParams) error

func (*Queries) DeleteMCPAuthToken

func (q *Queries) DeleteMCPAuthToken(ctx context.Context, arg DeleteMCPAuthTokenParams) (int64, error)

func (*Queries) DeleteMCPAuthTokensByWorkspace

func (q *Queries) DeleteMCPAuthTokensByWorkspace(ctx context.Context, workspaceID string) (int64, error)

func (*Queries) DeleteMCPOAuthRegistration

func (q *Queries) DeleteMCPOAuthRegistration(ctx context.Context, arg DeleteMCPOAuthRegistrationParams) (int64, error)

func (*Queries) DeleteMCPOAuthRegistrationsByWorkspace

func (q *Queries) DeleteMCPOAuthRegistrationsByWorkspace(ctx context.Context, workspaceID string) (int64, error)

func (*Queries) DeleteMarketplaceCatalogEntriesBySource

func (q *Queries) DeleteMarketplaceCatalogEntriesBySource(ctx context.Context, source string) error

func (*Queries) DeleteMarketplaceCatalogState

func (q *Queries) DeleteMarketplaceCatalogState(ctx context.Context, source string) error

func (*Queries) DeleteMismatchedGatewayIngressBinding

func (q *Queries) DeleteMismatchedGatewayIngressBinding(ctx context.Context, arg DeleteMismatchedGatewayIngressBindingParams) (int64, error)

func (*Queries) DeleteModelCatalogOptionValues

func (q *Queries) DeleteModelCatalogOptionValues(ctx context.Context, arg DeleteModelCatalogOptionValuesParams) error

func (*Queries) DeleteModelCatalogOptions

func (q *Queries) DeleteModelCatalogOptions(ctx context.Context, arg DeleteModelCatalogOptionsParams) error

func (*Queries) DeleteModelCatalogReasoningEfforts

func (q *Queries) DeleteModelCatalogReasoningEfforts(ctx context.Context, arg DeleteModelCatalogReasoningEffortsParams) error

func (*Queries) DeleteModelCatalogRows

func (q *Queries) DeleteModelCatalogRows(ctx context.Context, arg DeleteModelCatalogRowsParams) error

func (*Queries) DeleteModelCatalogSource

func (q *Queries) DeleteModelCatalogSource(ctx context.Context, arg DeleteModelCatalogSourceParams) error

func (*Queries) DeleteModelCatalogTransportBindingSelections

func (q *Queries) DeleteModelCatalogTransportBindingSelections(ctx context.Context, arg DeleteModelCatalogTransportBindingSelectionsParams) error

func (*Queries) DeleteModelCatalogTransportBindings

func (q *Queries) DeleteModelCatalogTransportBindings(ctx context.Context, arg DeleteModelCatalogTransportBindingsParams) error

func (*Queries) DeletePendingWorktree

func (q *Queries) DeletePendingWorktree(ctx context.Context, arg DeletePendingWorktreeParams) (int64, error)

func (*Queries) DeletePermissionLogsBefore

func (q *Queries) DeletePermissionLogsBefore(ctx context.Context, cutoff string) (int64, error)

func (*Queries) DeletePreferredTaskRunCapabilities

func (q *Queries) DeletePreferredTaskRunCapabilities(ctx context.Context, runID string) error

func (*Queries) DeleteRequiredTaskRunCapabilities

func (q *Queries) DeleteRequiredTaskRunCapabilities(ctx context.Context, runID string) error

func (*Queries) DeleteReservedSubagent

func (q *Queries) DeleteReservedSubagent(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteRunMaterialization

func (q *Queries) DeleteRunMaterialization(ctx context.Context, arg DeleteRunMaterializationParams) (int64, error)

func (*Queries) DeleteRunStarvation

func (q *Queries) DeleteRunStarvation(ctx context.Context, runID string) error

func (*Queries) DeleteSession

func (q *Queries) DeleteSession(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteSessionFolder

func (q *Queries) DeleteSessionFolder(ctx context.Context, arg DeleteSessionFolderParams) (int64, error)

func (*Queries) DeleteSessionPlacement

func (q *Queries) DeleteSessionPlacement(ctx context.Context, arg DeleteSessionPlacementParams) error

func (*Queries) DeleteSessionProcessObservation

func (q *Queries) DeleteSessionProcessObservation(ctx context.Context, arg DeleteSessionProcessObservationParams) error

func (*Queries) DeleteSessionsByWorkspace

func (q *Queries) DeleteSessionsByWorkspace(ctx context.Context, workspaceID string) error

func (*Queries) DeleteSkillExposure

func (q *Queries) DeleteSkillExposure(ctx context.Context, id int64) error

func (*Queries) DeleteSoulAgentHistory

func (q *Queries) DeleteSoulAgentHistory(ctx context.Context, arg DeleteSoulAgentHistoryParams) error

func (*Queries) DeleteTask

func (q *Queries) DeleteTask(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteTaskBlockRecurrences

func (q *Queries) DeleteTaskBlockRecurrences(ctx context.Context, taskID string) error

func (*Queries) DeleteTaskDependency

func (q *Queries) DeleteTaskDependency(ctx context.Context, arg DeleteTaskDependencyParams) (int64, error)

func (*Queries) DeleteTaskExecutionProfile

func (q *Queries) DeleteTaskExecutionProfile(ctx context.Context, taskID string) (int64, error)

func (*Queries) DeleteTaskProfileAgents

func (q *Queries) DeleteTaskProfileAgents(ctx context.Context, taskID string) error

func (*Queries) DeleteTaskProfileCapabilities

func (q *Queries) DeleteTaskProfileCapabilities(ctx context.Context, taskID string) error

func (*Queries) DeleteTokenStatsBefore

func (q *Queries) DeleteTokenStatsBefore(ctx context.Context, cutoff string) (int64, error)

func (*Queries) DeleteTokenUsageDailyBefore

func (q *Queries) DeleteTokenUsageDailyBefore(ctx context.Context, cutoffDay string) (int64, error)

func (*Queries) DeleteUnconfiguredMarketplaceEntries

func (q *Queries) DeleteUnconfiguredMarketplaceEntries(ctx context.Context, names any) error

func (*Queries) DeleteUnconfiguredMarketplaceStates

func (q *Queries) DeleteUnconfiguredMarketplaceStates(ctx context.Context, names any) error

func (*Queries) DeleteVaultSecret

func (q *Queries) DeleteVaultSecret(ctx context.Context, ref string) (int64, error)

func (*Queries) DeleteWorkspace

func (q *Queries) DeleteWorkspace(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteWorkspaceDeletionIntent

func (q *Queries) DeleteWorkspaceDeletionIntent(ctx context.Context, workspaceID string) (int64, error)

func (*Queries) DeleteWorkspaceFolder

func (q *Queries) DeleteWorkspaceFolder(ctx context.Context, arg DeleteWorkspaceFolderParams) (int64, error)

func (*Queries) DeliverReplyWatch

func (q *Queries) DeliverReplyWatch(ctx context.Context, arg DeliverReplyWatchParams) (int64, error)

func (*Queries) DisableAllGatewayProviderActivations

func (q *Queries) DisableAllGatewayProviderActivations(ctx context.Context) (int64, error)

func (*Queries) DisableAllGatewaySurfaceExposure

func (q *Queries) DisableAllGatewaySurfaceExposure(ctx context.Context) (int64, error)

func (*Queries) DisposeSubagents

func (q *Queries) DisposeSubagents(ctx context.Context, arg DisposeSubagentsParams) ([]SessionSubagent, error)

func (*Queries) EnqueueGoalSessionOutbox

func (q *Queries) EnqueueGoalSessionOutbox(ctx context.Context, arg EnqueueGoalSessionOutboxParams) error

func (*Queries) EnqueueLoopSessionCleanup

func (q *Queries) EnqueueLoopSessionCleanup(ctx context.Context, arg EnqueueLoopSessionCleanupParams) error

func (*Queries) EnrichNativeSubagentResult

func (q *Queries) EnrichNativeSubagentResult(ctx context.Context, arg EnrichNativeSubagentResultParams) (int64, error)

func (*Queries) EnsureAmbiguousGoalQueueTerminal

func (q *Queries) EnsureAmbiguousGoalQueueTerminal(ctx context.Context, arg EnsureAmbiguousGoalQueueTerminalParams) (int64, error)

func (*Queries) EnsureSessionTranscriptEpoch

func (q *Queries) EnsureSessionTranscriptEpoch(ctx context.Context, arg EnsureSessionTranscriptEpochParams) (int64, error)

func (*Queries) ExhaustExpiredTaskRunLease

func (q *Queries) ExhaustExpiredTaskRunLease(ctx context.Context, arg ExhaustExpiredTaskRunLeaseParams) (int64, error)

func (*Queries) ExpirePendingToolApprovals

func (q *Queries) ExpirePendingToolApprovals(ctx context.Context, resolvedAt sql.NullInt64) ([]ToolApprovalPending, error)

func (*Queries) ExpireTaskBlock

func (q *Queries) ExpireTaskBlock(ctx context.Context, arg ExpireTaskBlockParams) (int64, error)

func (*Queries) FailGoalBindingCreationAttempt

func (q *Queries) FailGoalBindingCreationAttempt(ctx context.Context, arg FailGoalBindingCreationAttemptParams) (int64, error)

func (*Queries) FailNeedsAttentionTaskRunForRecovery

func (q *Queries) FailNeedsAttentionTaskRunForRecovery(ctx context.Context, arg FailNeedsAttentionTaskRunForRecoveryParams) (int64, error)

func (*Queries) FailRunningWorktreeExitOperations

func (q *Queries) FailRunningWorktreeExitOperations(ctx context.Context, finishedAt sql.NullString) error

func (*Queries) FailSubagentWake

func (q *Queries) FailSubagentWake(ctx context.Context, arg FailSubagentWakeParams) (int64, error)

func (*Queries) FailTaskRunLease

func (q *Queries) FailTaskRunLease(ctx context.Context, arg FailTaskRunLeaseParams) (int64, error)

func (*Queries) FinalizeAmbiguousGoalJudgeTurn

func (q *Queries) FinalizeAmbiguousGoalJudgeTurn(ctx context.Context, arg FinalizeAmbiguousGoalJudgeTurnParams) (int64, error)

func (*Queries) FinalizeAmbiguousGoalTurn

func (q *Queries) FinalizeAmbiguousGoalTurn(ctx context.Context, arg FinalizeAmbiguousGoalTurnParams) (int64, error)

func (*Queries) FinalizeSubagent

func (q *Queries) FinalizeSubagent(ctx context.Context, arg FinalizeSubagentParams) (int64, error)

func (*Queries) FindActiveDesignationProjectionCandidate

func (q *Queries) FindActiveDesignationProjectionCandidate(ctx context.Context, arg FindActiveDesignationProjectionCandidateParams) (string, error)

func (*Queries) FindActiveGatewayDeviceByTokenHash

func (q *Queries) FindActiveGatewayDeviceByTokenHash(ctx context.Context, arg FindActiveGatewayDeviceByTokenHashParams) (GatewayDeviceSession, error)

func (*Queries) FindActiveLoopRun

func (q *Queries) FindActiveLoopRun(ctx context.Context, arg FindActiveLoopRunParams) (LoopRun, error)

func (*Queries) FindAppTokenByTokenHash

func (q *Queries) FindAppTokenByTokenHash(ctx context.Context, tokenHash string) (GatewayDeviceSession, error)

func (*Queries) FindGoalReportTargets

func (q *Queries) FindGoalReportTargets(ctx context.Context, arg FindGoalReportTargetsParams) ([]FindGoalReportTargetsRow, error)

func (*Queries) FindGoalSessionBindingAttempt

func (q *Queries) FindGoalSessionBindingAttempt(ctx context.Context, arg FindGoalSessionBindingAttemptParams) (LoopSessionBinding, error)

func (*Queries) FindLiveSessionGoal

func (q *Queries) FindLiveSessionGoal(ctx context.Context, arg FindLiveSessionGoalParams) (LoopRun, error)

func (*Queries) FindNewestSessionGoal

func (q *Queries) FindNewestSessionGoal(ctx context.Context, arg FindNewestSessionGoalParams) (FindNewestSessionGoalRow, error)

func (*Queries) FinishWorktreeExitOperation

func (q *Queries) FinishWorktreeExitOperation(ctx context.Context, arg FinishWorktreeExitOperationParams) (int64, error)

func (*Queries) FireReplyWatch

func (q *Queries) FireReplyWatch(ctx context.Context, arg FireReplyWatchParams) (int64, error)

func (*Queries) FlushGoalTaskUsage

func (q *Queries) FlushGoalTaskUsage(ctx context.Context, arg FlushGoalTaskUsageParams) (int64, error)

func (*Queries) ForceFailEligibleTaskRun

func (q *Queries) ForceFailEligibleTaskRun(ctx context.Context, arg ForceFailEligibleTaskRunParams) (int64, error)

func (*Queries) ForceReleaseClaimedTaskRun

func (q *Queries) ForceReleaseClaimedTaskRun(ctx context.Context, arg ForceReleaseClaimedTaskRunParams) (int64, error)

func (*Queries) FreezePreparedGoalInputBatch

func (q *Queries) FreezePreparedGoalInputBatch(ctx context.Context, arg FreezePreparedGoalInputBatchParams) error

func (*Queries) GatewayDeviceEpochMatches

func (q *Queries) GatewayDeviceEpochMatches(ctx context.Context, arg GatewayDeviceEpochMatchesParams) (bool, error)

func (*Queries) GetActiveGoalSessionBinding

func (q *Queries) GetActiveGoalSessionBinding(ctx context.Context, arg GetActiveGoalSessionBindingParams) (LoopSessionBinding, error)

func (*Queries) GetAppMetadata

func (q *Queries) GetAppMetadata(ctx context.Context, key string) (string, error)

func (*Queries) GetAppToken

func (q *Queries) GetAppToken(ctx context.Context, id string) (GatewayDeviceSession, error)

func (*Queries) GetAttentionSnapshot

func (q *Queries) GetAttentionSnapshot(ctx context.Context, arg GetAttentionSnapshotParams) (string, error)

func (*Queries) GetAutomationJob

func (q *Queries) GetAutomationJob(ctx context.Context, id string) (AutomationJob, error)

func (*Queries) GetAutomationJobOverlay

func (q *Queries) GetAutomationJobOverlay(ctx context.Context, jobID string) (AutomationJobOverlay, error)

func (*Queries) GetAutomationRun

func (q *Queries) GetAutomationRun(ctx context.Context, id string) (GetAutomationRunRow, error)

func (*Queries) GetAutomationSchedulerState

func (q *Queries) GetAutomationSchedulerState(ctx context.Context, jobID string) (AutomationSchedulerState, error)

func (*Queries) GetAutomationSuggestion

func (q *Queries) GetAutomationSuggestion(ctx context.Context, arg GetAutomationSuggestionParams) (AutomationSuggestion, error)

func (*Queries) GetAutomationSuggestionByDedupKey

func (q *Queries) GetAutomationSuggestionByDedupKey(ctx context.Context, arg GetAutomationSuggestionByDedupKeyParams) (AutomationSuggestion, error)

func (*Queries) GetAutomationTrigger

func (q *Queries) GetAutomationTrigger(ctx context.Context, id string) (AutomationTrigger, error)

func (*Queries) GetAutomationTriggerByWebhookID

func (q *Queries) GetAutomationTriggerByWebhookID(ctx context.Context, webhookID sql.NullString) (AutomationTrigger, error)

func (*Queries) GetAutomationTriggerOverlay

func (q *Queries) GetAutomationTriggerOverlay(ctx context.Context, triggerID string) (AutomationTriggerOverlay, error)

func (*Queries) GetAwaitingGoalControl

func (q *Queries) GetAwaitingGoalControl(ctx context.Context, arg GetAwaitingGoalControlParams) (GetAwaitingGoalControlRow, error)

func (*Queries) GetCmdPaletteQueryHit

func (q *Queries) GetCmdPaletteQueryHit(ctx context.Context, arg GetCmdPaletteQueryHitParams) (GetCmdPaletteQueryHitRow, error)

func (*Queries) GetCmdPaletteUsage

func (q *Queries) GetCmdPaletteUsage(ctx context.Context, arg GetCmdPaletteUsageParams) (GetCmdPaletteUsageRow, error)

func (*Queries) GetCompletedGoalTurn

func (q *Queries) GetCompletedGoalTurn(ctx context.Context, arg GetCompletedGoalTurnParams) (GetCompletedGoalTurnRow, error)

func (*Queries) GetDeadEntity

func (q *Queries) GetDeadEntity(ctx context.Context, arg GetDeadEntityParams) (DeadEntity, error)

func (*Queries) GetDeniedGoalBudgetVersion

func (q *Queries) GetDeniedGoalBudgetVersion(ctx context.Context, id string) (int64, error)

func (*Queries) GetEventSummarySessionProjection

func (q *Queries) GetEventSummarySessionProjection(ctx context.Context, sessionID string) (GetEventSummarySessionProjectionRow, error)

func (*Queries) GetGatewayDevice

func (q *Queries) GetGatewayDevice(ctx context.Context, id string) (GatewayDeviceSession, error)

func (*Queries) GetGatewayEndpointState

func (q *Queries) GetGatewayEndpointState(ctx context.Context, tier string) (GatewayEndpointState, error)

func (*Queries) GetGatewayIngressBinding

func (q *Queries) GetGatewayIngressBinding(ctx context.Context, arg GetGatewayIngressBindingParams) (GatewayIngressBinding, error)

func (*Queries) GetGatewayProvider

func (q *Queries) GetGatewayProvider(ctx context.Context, name string) (GatewayProvider, error)

func (*Queries) GetGatewayProviderActivation

func (q *Queries) GetGatewayProviderActivation(ctx context.Context, arg GetGatewayProviderActivationParams) (GatewayProviderActivation, error)

func (*Queries) GetGatewaySurfaceExposure

func (q *Queries) GetGatewaySurfaceExposure(ctx context.Context, arg GetGatewaySurfaceExposureParams) (GatewaySurfaceExposure, error)

func (*Queries) GetGatewayWebhookIngressSubject

func (q *Queries) GetGatewayWebhookIngressSubject(ctx context.Context, subjectID string) (GetGatewayWebhookIngressSubjectRow, error)

func (*Queries) GetGoalBindingRetryWitnessDigest

func (q *Queries) GetGoalBindingRetryWitnessDigest(ctx context.Context, arg GetGoalBindingRetryWitnessDigestParams) (string, error)

func (*Queries) GetGoalCheckpoint

func (q *Queries) GetGoalCheckpoint(ctx context.Context, arg GetGoalCheckpointParams) (LoopGoalCheckpoint, error)

func (*Queries) GetGoalDatabaseNow

func (q *Queries) GetGoalDatabaseNow(ctx context.Context) (string, error)

func (*Queries) GetGoalJudgeAttempt

func (q *Queries) GetGoalJudgeAttempt(ctx context.Context, arg GetGoalJudgeAttemptParams) (LoopGoalJudgeAttempt, error)

func (*Queries) GetGoalJudgeAttemptDigest

func (q *Queries) GetGoalJudgeAttemptDigest(ctx context.Context, arg GetGoalJudgeAttemptDigestParams) (string, error)

func (*Queries) GetGoalPromptRow

func (q *Queries) GetGoalPromptRow(ctx context.Context, arg GetGoalPromptRowParams) (GetGoalPromptRowRow, error)

func (*Queries) GetGoalReentryState

func (q *Queries) GetGoalReentryState(ctx context.Context, arg GetGoalReentryStateParams) (GetGoalReentryStateRow, error)

func (*Queries) GetGoalRunOrigin

func (q *Queries) GetGoalRunOrigin(ctx context.Context, arg GetGoalRunOriginParams) (GetGoalRunOriginRow, error)

func (*Queries) GetGoalSessionOutboxByEventID

func (q *Queries) GetGoalSessionOutboxByEventID(ctx context.Context, eventID string) (LoopGoalSessionOutbox, error)

func (*Queries) GetGoalSettlementEvidenceRef

func (q *Queries) GetGoalSettlementEvidenceRef(ctx context.Context, arg GetGoalSettlementEvidenceRefParams) (sql.NullString, error)

func (*Queries) GetGoalTurnByPromptID

func (q *Queries) GetGoalTurnByPromptID(ctx context.Context, arg GetGoalTurnByPromptIDParams) (LoopGoalTurn, error)

func (*Queries) GetHeartbeatRevision

func (q *Queries) GetHeartbeatRevision(ctx context.Context, id string) (AgentHeartbeatRevision, error)

func (*Queries) GetHeartbeatRevisionForRollback

func (q *Queries) GetHeartbeatRevisionForRollback(ctx context.Context, arg GetHeartbeatRevisionForRollbackParams) (AgentHeartbeatRevision, error)

func (*Queries) GetHeartbeatSnapshot

func (q *Queries) GetHeartbeatSnapshot(ctx context.Context, id string) (AgentHeartbeatSnapshot, error)

func (*Queries) GetHeartbeatSnapshotByDigest

func (q *Queries) GetHeartbeatSnapshotByDigest(ctx context.Context, arg GetHeartbeatSnapshotByDigestParams) (AgentHeartbeatSnapshot, error)

func (*Queries) GetHeartbeatWakeEvent

func (q *Queries) GetHeartbeatWakeEvent(ctx context.Context, id string) (AgentHeartbeatWakeEvent, error)

func (*Queries) GetHeartbeatWakeState

func (q *Queries) GetHeartbeatWakeState(ctx context.Context, arg GetHeartbeatWakeStateParams) (AgentHeartbeatWakeState, error)

func (*Queries) GetInlineGoalOriginSession

func (q *Queries) GetInlineGoalOriginSession(ctx context.Context, sessionID string) (GetInlineGoalOriginSessionRow, error)

func (*Queries) GetLastCoordinatorRunIDForLoopRun

func (q *Queries) GetLastCoordinatorRunIDForLoopRun(ctx context.Context, loopRunID sql.NullString) (string, error)

func (*Queries) GetLastCoordinatorTaskIDForLoopRun

func (q *Queries) GetLastCoordinatorTaskIDForLoopRun(ctx context.Context, loopRunID sql.NullString) (string, error)

func (*Queries) GetLastLoopTokenTick

func (q *Queries) GetLastLoopTokenTick(ctx context.Context, arg GetLastLoopTokenTickParams) (GetLastLoopTokenTickRow, error)

func (*Queries) GetLiveWorktreeByPath

func (q *Queries) GetLiveWorktreeByPath(ctx context.Context, arg GetLiveWorktreeByPathParams) (Worktree, error)

func (*Queries) GetLoopAdmissionClaim

func (q *Queries) GetLoopAdmissionClaim(ctx context.Context, arg GetLoopAdmissionClaimParams) (LoopAdmissionClaim, error)

func (*Queries) GetLoopConfig

func (q *Queries) GetLoopConfig(ctx context.Context, arg GetLoopConfigParams) (GetLoopConfigRow, error)

func (*Queries) GetLoopGenerationOutputPayload

func (q *Queries) GetLoopGenerationOutputPayload(ctx context.Context, arg GetLoopGenerationOutputPayloadParams) (string, error)

func (*Queries) GetLoopGenerationOutputStatus

func (q *Queries) GetLoopGenerationOutputStatus(ctx context.Context, arg GetLoopGenerationOutputStatusParams) (string, error)

func (*Queries) GetLoopOutputBlob

func (q *Queries) GetLoopOutputBlob(ctx context.Context, outputRef string) (string, error)

func (*Queries) GetLoopReconciliationStatus

func (q *Queries) GetLoopReconciliationStatus(ctx context.Context, id string) (string, error)

func (*Queries) GetLoopRun

func (q *Queries) GetLoopRun(ctx context.Context, arg GetLoopRunParams) (LoopRun, error)

func (*Queries) GetLoopRunByID

func (q *Queries) GetLoopRunByID(ctx context.Context, id string) (LoopRun, error)

func (*Queries) GetLoopRunEventHead

func (q *Queries) GetLoopRunEventHead(ctx context.Context, arg GetLoopRunEventHeadParams) (int64, error)

func (*Queries) GetLoopRunPauseState

func (q *Queries) GetLoopRunPauseState(ctx context.Context, arg GetLoopRunPauseStateParams) (GetLoopRunPauseStateRow, error)

func (*Queries) GetLoopRunWorkspaceID

func (q *Queries) GetLoopRunWorkspaceID(ctx context.Context, id string) (string, error)

func (*Queries) GetLoopSessionCleanup

func (q *Queries) GetLoopSessionCleanup(ctx context.Context, cleanupID string) (LoopSessionCleanup, error)

func (*Queries) GetMCPAuthToken

func (q *Queries) GetMCPAuthToken(ctx context.Context, arg GetMCPAuthTokenParams) (McpAuthToken, error)

func (*Queries) GetMCPAuthTokenRefs

func (q *Queries) GetMCPAuthTokenRefs(ctx context.Context, arg GetMCPAuthTokenRefsParams) (GetMCPAuthTokenRefsRow, error)

func (*Queries) GetMCPOAuthRegistration

func (q *Queries) GetMCPOAuthRegistration(ctx context.Context, arg GetMCPOAuthRegistrationParams) (McpOauthRegistration, error)

func (*Queries) GetMarketplaceCatalogEntry

func (q *Queries) GetMarketplaceCatalogEntry(ctx context.Context, arg GetMarketplaceCatalogEntryParams) (MarketplaceCatalogEntry, error)

func (*Queries) GetMarketplaceCatalogState

func (q *Queries) GetMarketplaceCatalogState(ctx context.Context, source string) (GetMarketplaceCatalogStateRow, error)

func (*Queries) GetMarketplaceSourceConfiguration

func (q *Queries) GetMarketplaceSourceConfiguration(ctx context.Context) (GetMarketplaceSourceConfigurationRow, error)

func (*Queries) GetMaxGoalBindingEpoch

func (q *Queries) GetMaxGoalBindingEpoch(ctx context.Context, arg GetMaxGoalBindingEpochParams) (int64, error)

func (*Queries) GetNextDispatchableSessionInput

func (q *Queries) GetNextDispatchableSessionInput(ctx context.Context, arg GetNextDispatchableSessionInputParams) (SessionInputQueue, error)

func (*Queries) GetNextGoalTurnSequence

func (q *Queries) GetNextGoalTurnSequence(ctx context.Context, loopRunID string) (int64, error)

func (*Queries) GetNotificationCursor

func (q *Queries) GetNotificationCursor(ctx context.Context, arg GetNotificationCursorParams) (NotificationCursor, error)

func (*Queries) GetOpenSubagentWake

func (q *Queries) GetOpenSubagentWake(ctx context.Context, parentSessionID string) (SessionSubagentWake, error)

func (*Queries) GetOpenTaskRunID

func (q *Queries) GetOpenTaskRunID(ctx context.Context, arg GetOpenTaskRunIDParams) (string, error)

func (*Queries) GetPendingGoalPauseActor

func (q *Queries) GetPendingGoalPauseActor(ctx context.Context, id string) (GetPendingGoalPauseActorRow, error)

func (*Queries) GetPendingToolApproval

func (q *Queries) GetPendingToolApproval(ctx context.Context, approvalID string) (ToolApprovalPending, error)

func (*Queries) GetQueuedSessionPromptAdmissionState

func (q *Queries) GetQueuedSessionPromptAdmissionState(ctx context.Context, arg GetQueuedSessionPromptAdmissionStateParams) (string, error)

func (*Queries) GetReplyWatch

func (q *Queries) GetReplyWatch(ctx context.Context, id string) (SessionPromptReplyWatch, error)

func (*Queries) GetReplyWatchByMessage

func (q *Queries) GetReplyWatchByMessage(ctx context.Context, arg GetReplyWatchByMessageParams) (SessionPromptReplyWatch, error)

func (*Queries) GetRetryChildRunID

func (q *Queries) GetRetryChildRunID(ctx context.Context, previousRunID sql.NullString) (string, error)

func (*Queries) GetRunReviewByID

func (q *Queries) GetRunReviewByID(ctx context.Context, reviewID string) (TaskRunReview, error)

func (*Queries) GetRunReviewByRunRoundAttempt

func (q *Queries) GetRunReviewByRunRoundAttempt(ctx context.Context, arg GetRunReviewByRunRoundAttemptParams) (TaskRunReview, error)

func (*Queries) GetRunStarvation

func (q *Queries) GetRunStarvation(ctx context.Context, runID string) (TaskRunStarvation, error)

func (*Queries) GetSchedulerPause

func (q *Queries) GetSchedulerPause(ctx context.Context) (GetSchedulerPauseRow, error)

func (*Queries) GetSessionArchivedAt

func (q *Queries) GetSessionArchivedAt(ctx context.Context, arg GetSessionArchivedAtParams) (sql.NullString, error)

func (*Queries) GetSessionAttachState

func (q *Queries) GetSessionAttachState(ctx context.Context, id string) (GetSessionAttachStateRow, error)

func (*Queries) GetSessionCreationIdentity

func (q *Queries) GetSessionCreationIdentity(ctx context.Context, id string) (GetSessionCreationIdentityRow, error)

func (*Queries) GetSessionCreationProfileJSON

func (q *Queries) GetSessionCreationProfileJSON(ctx context.Context, profileRef string) (string, error)

func (*Queries) GetSessionDerivation

func (q *Queries) GetSessionDerivation(ctx context.Context, arg GetSessionDerivationParams) (SessionDerivation, error)

func (*Queries) GetSessionHealth

func (q *Queries) GetSessionHealth(ctx context.Context, sessionID string) (SessionHealth, error)

func (*Queries) GetSessionInputGeneration

func (q *Queries) GetSessionInputGeneration(ctx context.Context, id string) (int64, error)

func (*Queries) GetSessionInputQueueEntry

func (q *Queries) GetSessionInputQueueEntry(ctx context.Context, arg GetSessionInputQueueEntryParams) (SessionInputQueue, error)

func (*Queries) GetSessionInputQueueEntryByID

func (q *Queries) GetSessionInputQueueEntryByID(ctx context.Context, id string) (SessionInputQueue, error)

func (*Queries) GetSessionLayoutOwner

func (q *Queries) GetSessionLayoutOwner(ctx context.Context, arg GetSessionLayoutOwnerParams) (GetSessionLayoutOwnerRow, error)

func (*Queries) GetSessionTranscriptEpoch

func (q *Queries) GetSessionTranscriptEpoch(ctx context.Context, id string) (int64, error)

func (*Queries) GetSessionWorkspaceID

func (q *Queries) GetSessionWorkspaceID(ctx context.Context, id string) (string, error)

func (*Queries) GetSkillExposureByOwnerTarget

func (q *Queries) GetSkillExposureByOwnerTarget(ctx context.Context, arg GetSkillExposureByOwnerTargetParams) (SkillExposure, error)

func (*Queries) GetSoulRevision

func (q *Queries) GetSoulRevision(ctx context.Context, id string) (AgentSoulRevision, error)

func (*Queries) GetSoulRevisionForRollback

func (q *Queries) GetSoulRevisionForRollback(ctx context.Context, arg GetSoulRevisionForRollbackParams) (AgentSoulRevision, error)

func (*Queries) GetSoulSnapshot

func (q *Queries) GetSoulSnapshot(ctx context.Context, id string) (AgentSoulSnapshot, error)

func (*Queries) GetSoulSnapshotByDigest

func (q *Queries) GetSoulSnapshotByDigest(ctx context.Context, arg GetSoulSnapshotByDigestParams) (AgentSoulSnapshot, error)

func (*Queries) GetSubagent

func (q *Queries) GetSubagent(ctx context.Context, id string) (SessionSubagent, error)

func (*Queries) GetSubagentByChild

func (q *Queries) GetSubagentByChild(ctx context.Context, childSessionID sql.NullString) (SessionSubagent, error)

func (*Queries) GetSubagentByKey

func (q *Queries) GetSubagentByKey(ctx context.Context, arg GetSubagentByKeyParams) (SessionSubagent, error)

func (*Queries) GetSubagentWake

func (q *Queries) GetSubagentWake(ctx context.Context, wakeMessageID string) (SessionSubagentWake, error)

func (*Queries) GetSyntheticSessionInputByMessage

func (q *Queries) GetSyntheticSessionInputByMessage(ctx context.Context, arg GetSyntheticSessionInputByMessageParams) (SessionInputQueue, error)

func (*Queries) GetTask

func (q *Queries) GetTask(ctx context.Context, taskID string) (GetTaskRow, error)

func (*Queries) GetTaskBlock

func (q *Queries) GetTaskBlock(ctx context.Context, arg GetTaskBlockParams) (TaskBlock, error)

func (*Queries) GetTaskBlockRecurrence

func (q *Queries) GetTaskBlockRecurrence(ctx context.Context, arg GetTaskBlockRecurrenceParams) (TaskBlockRecurrence, error)

func (*Queries) GetTaskCurrentRunProjection

func (q *Queries) GetTaskCurrentRunProjection(ctx context.Context, id string) (sql.NullString, error)

func (*Queries) GetTaskEventRecord

func (q *Queries) GetTaskEventRecord(ctx context.Context, id string) (GetTaskEventRecordRow, error)

func (*Queries) GetTaskExecutionProfile

func (q *Queries) GetTaskExecutionProfile(ctx context.Context, taskID string) (GetTaskExecutionProfileRow, error)

func (*Queries) GetTaskID

func (q *Queries) GetTaskID(ctx context.Context, taskID string) (string, error)

func (*Queries) GetTaskRun

func (q *Queries) GetTaskRun(ctx context.Context, id string) (GetTaskRunRow, error)

func (*Queries) GetTaskRunIDByIdempotency

func (q *Queries) GetTaskRunIDByIdempotency(ctx context.Context, arg GetTaskRunIDByIdempotencyParams) (string, error)

func (*Queries) GetTaskRunIDByReviewID

func (q *Queries) GetTaskRunIDByReviewID(ctx context.Context, reviewID sql.NullString) (string, error)

func (*Queries) GetTaskRunIdempotency

func (q *Queries) GetTaskRunIdempotency(ctx context.Context, arg GetTaskRunIdempotencyParams) (GetTaskRunIdempotencyRow, error)

func (*Queries) GetTaskRunMetadataForClaim

func (q *Queries) GetTaskRunMetadataForClaim(ctx context.Context, id string) (sql.NullString, error)

func (*Queries) GetTaskRunProjectionIdentity

func (q *Queries) GetTaskRunProjectionIdentity(ctx context.Context, runID string) (GetTaskRunProjectionIdentityRow, error)

func (*Queries) GetTaskRunTaskID

func (q *Queries) GetTaskRunTaskID(ctx context.Context, id string) (string, error)

func (*Queries) GetTaskRunTerminalCommandByScope

func (q *Queries) GetTaskRunTerminalCommandByScope(ctx context.Context, arg GetTaskRunTerminalCommandByScopeParams) (TaskRunTerminalCommand, error)

func (*Queries) GetTaskStatus

func (q *Queries) GetTaskStatus(ctx context.Context, id string) (string, error)

func (*Queries) GetTaskTriageState

func (q *Queries) GetTaskTriageState(ctx context.Context, arg GetTaskTriageStateParams) (TaskTriageState, error)

func (*Queries) GetVaultSecret

func (q *Queries) GetVaultSecret(ctx context.Context, ref string) (VaultSecret, error)

func (*Queries) GetWorkspace

func (q *Queries) GetWorkspace(ctx context.Context, id string) (Workspace, error)

func (*Queries) GetWorkspaceByLegacyName

func (q *Queries) GetWorkspaceByLegacyName(ctx context.Context, oldName string) (Workspace, error)

func (*Queries) GetWorkspaceByName

func (q *Queries) GetWorkspaceByName(ctx context.Context, name string) (Workspace, error)

func (*Queries) GetWorkspaceByPath

func (q *Queries) GetWorkspaceByPath(ctx context.Context, rootDir string) (Workspace, error)

func (*Queries) GetWorkspaceDeletionIntent

func (q *Queries) GetWorkspaceDeletionIntent(ctx context.Context, workspaceID string) (WorkspaceDeletionIntent, error)

func (*Queries) GetWorkspaceID

func (q *Queries) GetWorkspaceID(ctx context.Context, workspaceID string) (string, error)

func (*Queries) GetWorktreeByID

func (q *Queries) GetWorktreeByID(ctx context.Context, arg GetWorktreeByIDParams) (Worktree, error)

func (*Queries) GetWorktreeByName

func (q *Queries) GetWorktreeByName(ctx context.Context, arg GetWorktreeByNameParams) (Worktree, error)

func (*Queries) GetWorktreeStatus

func (q *Queries) GetWorktreeStatus(ctx context.Context, arg GetWorktreeStatusParams) (WorktreeStatus, error)

func (*Queries) GoalRunWorkspaceExists

func (q *Queries) GoalRunWorkspaceExists(ctx context.Context, arg GoalRunWorkspaceExistsParams) (int64, error)

func (*Queries) GrantGoalCheckpointControl

func (q *Queries) GrantGoalCheckpointControl(ctx context.Context, arg GrantGoalCheckpointControlParams) (int64, error)

func (*Queries) HasClearedTaskBlockKind

func (q *Queries) HasClearedTaskBlockKind(ctx context.Context, arg HasClearedTaskBlockKindParams) (bool, error)

func (*Queries) HasExpiredHeartbeatWakeEvents

func (q *Queries) HasExpiredHeartbeatWakeEvents(ctx context.Context, cutoff string) (bool, error)

func (*Queries) HasExpiredObservability

func (q *Queries) HasExpiredObservability(ctx context.Context, arg HasExpiredObservabilityParams) (int64, error)

func (*Queries) HasOpenTaskBlocks

func (q *Queries) HasOpenTaskBlocks(ctx context.Context, arg HasOpenTaskBlocksParams) (bool, error)

func (*Queries) HasSubagentCommittedAdmission

func (q *Queries) HasSubagentCommittedAdmission(ctx context.Context, arg HasSubagentCommittedAdmissionParams) (bool, error)

func (*Queries) HeartbeatTaskRunLease

func (q *Queries) HeartbeatTaskRunLease(ctx context.Context, arg HeartbeatTaskRunLeaseParams) (int64, error)

func (*Queries) HydrateAutomationJobCatalog

func (q *Queries) HydrateAutomationJobCatalog(ctx context.Context, idsJson any) ([]HydrateAutomationJobCatalogRow, error)

func (*Queries) HydrateAutomationTriggerCatalog

func (q *Queries) HydrateAutomationTriggerCatalog(ctx context.Context, idsJson any) ([]HydrateAutomationTriggerCatalogRow, error)

func (*Queries) IncrementGoalBudgetVersion

func (q *Queries) IncrementGoalBudgetVersion(ctx context.Context, id string) (int64, error)

func (*Queries) IncrementTaskBlockRecurrence

func (q *Queries) IncrementTaskBlockRecurrence(ctx context.Context, arg IncrementTaskBlockRecurrenceParams) error

func (*Queries) InheritSubagentWakeAttempts

func (q *Queries) InheritSubagentWakeAttempts(ctx context.Context, arg InheritSubagentWakeAttemptsParams) error

func (*Queries) InsertAppMetadataIfAbsent

func (q *Queries) InsertAppMetadataIfAbsent(ctx context.Context, arg InsertAppMetadataIfAbsentParams) error

func (*Queries) InsertAppTokenOrigin

func (q *Queries) InsertAppTokenOrigin(ctx context.Context, arg InsertAppTokenOriginParams) error

func (*Queries) InsertAttentionWorkspaceMute

func (q *Queries) InsertAttentionWorkspaceMute(ctx context.Context, arg InsertAttentionWorkspaceMuteParams) (int64, error)

func (*Queries) InsertAutomationJob

func (q *Queries) InsertAutomationJob(ctx context.Context, arg InsertAutomationJobParams) error

func (*Queries) InsertAutomationRun

func (q *Queries) InsertAutomationRun(ctx context.Context, arg InsertAutomationRunParams) error

func (*Queries) InsertAutomationSuggestion

func (q *Queries) InsertAutomationSuggestion(ctx context.Context, arg InsertAutomationSuggestionParams) error

func (*Queries) InsertAutomationSuggestionEventSummary

func (q *Queries) InsertAutomationSuggestionEventSummary(ctx context.Context, arg InsertAutomationSuggestionEventSummaryParams) error

func (*Queries) InsertAutomationTrigger

func (q *Queries) InsertAutomationTrigger(ctx context.Context, arg InsertAutomationTriggerParams) error

func (*Queries) InsertAutomationTriggerCatalogTerms

func (q *Queries) InsertAutomationTriggerCatalogTerms(ctx context.Context, arg InsertAutomationTriggerCatalogTermsParams) error

func (*Queries) InsertEventSummary

func (q *Queries) InsertEventSummary(ctx context.Context, arg InsertEventSummaryParams) error

func (*Queries) InsertExtensionMCPAllocation

func (q *Queries) InsertExtensionMCPAllocation(ctx context.Context, arg InsertExtensionMCPAllocationParams) error

func (*Queries) InsertGoalBindingRetryWitness

func (q *Queries) InsertGoalBindingRetryWitness(ctx context.Context, arg InsertGoalBindingRetryWitnessParams) error

func (*Queries) InsertGoalCheckpoint

func (q *Queries) InsertGoalCheckpoint(ctx context.Context, arg InsertGoalCheckpointParams) (int64, error)

func (*Queries) InsertGoalJudgeAttempt

func (q *Queries) InsertGoalJudgeAttempt(ctx context.Context, arg InsertGoalJudgeAttemptParams) error

func (*Queries) InsertGoalSessionBindingAttempt

func (q *Queries) InsertGoalSessionBindingAttempt(ctx context.Context, arg InsertGoalSessionBindingAttemptParams) error

func (*Queries) InsertHeartbeatRevision

func (q *Queries) InsertHeartbeatRevision(ctx context.Context, arg InsertHeartbeatRevisionParams) error

func (*Queries) InsertHeartbeatSnapshot

func (q *Queries) InsertHeartbeatSnapshot(ctx context.Context, arg InsertHeartbeatSnapshotParams) (int64, error)

func (*Queries) InsertHeartbeatWakeEvent

func (q *Queries) InsertHeartbeatWakeEvent(ctx context.Context, arg InsertHeartbeatWakeEventParams) error

func (*Queries) InsertLoopConfigIfMissing

func (q *Queries) InsertLoopConfigIfMissing(ctx context.Context, arg InsertLoopConfigIfMissingParams) error

func (*Queries) InsertLoopEffectOutbox

func (q *Queries) InsertLoopEffectOutbox(ctx context.Context, arg InsertLoopEffectOutboxParams) error

func (*Queries) InsertLoopGateVerdict

func (q *Queries) InsertLoopGateVerdict(ctx context.Context, arg InsertLoopGateVerdictParams) (int64, error)

func (*Queries) InsertLoopGeneration

func (q *Queries) InsertLoopGeneration(ctx context.Context, arg InsertLoopGenerationParams) error

func (*Queries) InsertLoopRun

func (q *Queries) InsertLoopRun(ctx context.Context, arg InsertLoopRunParams) error

func (*Queries) InsertLoopRunEvent

func (q *Queries) InsertLoopRunEvent(ctx context.Context, arg InsertLoopRunEventParams) error

func (*Queries) InsertLoopUIAnnotation

func (q *Queries) InsertLoopUIAnnotation(ctx context.Context, arg InsertLoopUIAnnotationParams) error

func (*Queries) InsertMarketplaceCatalogEntry

func (q *Queries) InsertMarketplaceCatalogEntry(ctx context.Context, arg InsertMarketplaceCatalogEntryParams) error

func (*Queries) InsertModelCatalogOption

func (q *Queries) InsertModelCatalogOption(ctx context.Context, arg InsertModelCatalogOptionParams) error

func (*Queries) InsertModelCatalogOptionValue

func (q *Queries) InsertModelCatalogOptionValue(ctx context.Context, arg InsertModelCatalogOptionValueParams) error

func (*Queries) InsertModelCatalogReasoningEffort

func (q *Queries) InsertModelCatalogReasoningEffort(ctx context.Context, arg InsertModelCatalogReasoningEffortParams) error

func (*Queries) InsertModelCatalogRow

func (q *Queries) InsertModelCatalogRow(ctx context.Context, arg InsertModelCatalogRowParams) error

func (*Queries) InsertModelCatalogTransportBinding

func (q *Queries) InsertModelCatalogTransportBinding(ctx context.Context, arg InsertModelCatalogTransportBindingParams) error

func (*Queries) InsertModelCatalogTransportBindingSelection

func (q *Queries) InsertModelCatalogTransportBindingSelection(ctx context.Context, arg InsertModelCatalogTransportBindingSelectionParams) error

func (*Queries) InsertNotificationCursor

func (q *Queries) InsertNotificationCursor(ctx context.Context, arg InsertNotificationCursorParams) error

func (*Queries) InsertOpenGoalTurn

func (q *Queries) InsertOpenGoalTurn(ctx context.Context, arg InsertOpenGoalTurnParams) error

func (*Queries) InsertOriginGoalSessionBinding

func (q *Queries) InsertOriginGoalSessionBinding(ctx context.Context, arg InsertOriginGoalSessionBindingParams) error

func (*Queries) InsertPermissionLog

func (q *Queries) InsertPermissionLog(ctx context.Context, arg InsertPermissionLogParams) error

func (*Queries) InsertPreferredTaskRunCapability

func (q *Queries) InsertPreferredTaskRunCapability(ctx context.Context, arg InsertPreferredTaskRunCapabilityParams) error

func (*Queries) InsertPreparedGoalPromptQueue

func (q *Queries) InsertPreparedGoalPromptQueue(ctx context.Context, arg InsertPreparedGoalPromptQueueParams) error

func (*Queries) InsertReplyWatch

func (q *Queries) InsertReplyWatch(ctx context.Context, arg InsertReplyWatchParams) error

func (*Queries) InsertRequiredTaskRunCapability

func (q *Queries) InsertRequiredTaskRunCapability(ctx context.Context, arg InsertRequiredTaskRunCapabilityParams) error

func (*Queries) InsertRunReviewRequest

func (q *Queries) InsertRunReviewRequest(ctx context.Context, arg InsertRunReviewRequestParams) (int64, error)

func (*Queries) InsertSessionCreationProfile

func (q *Queries) InsertSessionCreationProfile(ctx context.Context, arg InsertSessionCreationProfileParams) error

func (*Queries) InsertSessionDerivation

func (q *Queries) InsertSessionDerivation(ctx context.Context, arg InsertSessionDerivationParams) (int64, error)

func (*Queries) InsertSessionFolder

func (q *Queries) InsertSessionFolder(ctx context.Context, arg InsertSessionFolderParams) error

func (*Queries) InsertSessionInputClearTrace

func (q *Queries) InsertSessionInputClearTrace(ctx context.Context, arg InsertSessionInputClearTraceParams) error

func (*Queries) InsertSessionInputQueueEntry

func (q *Queries) InsertSessionInputQueueEntry(ctx context.Context, arg InsertSessionInputQueueEntryParams) error

func (*Queries) InsertSessionPromptAdmission

func (q *Queries) InsertSessionPromptAdmission(ctx context.Context, arg InsertSessionPromptAdmissionParams) error

func (*Queries) InsertSoulRevision

func (q *Queries) InsertSoulRevision(ctx context.Context, arg InsertSoulRevisionParams) error

func (*Queries) InsertSoulSnapshot

func (q *Queries) InsertSoulSnapshot(ctx context.Context, arg InsertSoulSnapshotParams) (int64, error)

func (*Queries) InsertSubagentWake

func (q *Queries) InsertSubagentWake(ctx context.Context, arg InsertSubagentWakeParams) error

func (*Queries) InsertTask

func (q *Queries) InsertTask(ctx context.Context, arg InsertTaskParams) error

func (*Queries) InsertTaskBlock

func (q *Queries) InsertTaskBlock(ctx context.Context, arg InsertTaskBlockParams) error

func (*Queries) InsertTaskDependency

func (q *Queries) InsertTaskDependency(ctx context.Context, arg InsertTaskDependencyParams) error

func (*Queries) InsertTaskEvent

func (q *Queries) InsertTaskEvent(ctx context.Context, arg InsertTaskEventParams) error

func (*Queries) InsertTaskProfileAgent

func (q *Queries) InsertTaskProfileAgent(ctx context.Context, arg InsertTaskProfileAgentParams) error

func (*Queries) InsertTaskProfileCapability

func (q *Queries) InsertTaskProfileCapability(ctx context.Context, arg InsertTaskProfileCapabilityParams) error

func (*Queries) InsertTaskRun

func (q *Queries) InsertTaskRun(ctx context.Context, arg InsertTaskRunParams) error

func (*Queries) InsertTaskRunIdempotency

func (q *Queries) InsertTaskRunIdempotency(ctx context.Context, arg InsertTaskRunIdempotencyParams) (int64, error)

func (*Queries) InsertTaskRunTerminalCommand

func (q *Queries) InsertTaskRunTerminalCommand(ctx context.Context, arg InsertTaskRunTerminalCommandParams) (int64, error)

func (*Queries) InsertWorkspace

func (q *Queries) InsertWorkspace(ctx context.Context, arg InsertWorkspaceParams) error

func (*Queries) InsertWorkspaceDeletionIntent

func (q *Queries) InsertWorkspaceDeletionIntent(ctx context.Context, arg InsertWorkspaceDeletionIntentParams) (int64, error)

func (*Queries) InsertWorkspaceFolder

func (q *Queries) InsertWorkspaceFolder(ctx context.Context, arg InsertWorkspaceFolderParams) error

func (*Queries) InsertWorktree

func (q *Queries) InsertWorktree(ctx context.Context, arg InsertWorktreeParams) error

func (*Queries) InsertWorktreeExitOperation

func (q *Queries) InsertWorktreeExitOperation(ctx context.Context, arg InsertWorktreeExitOperationParams) error

func (*Queries) IsAttentionWorkspaceMuted

func (q *Queries) IsAttentionWorkspaceMuted(ctx context.Context, arg IsAttentionWorkspaceMutedParams) (bool, error)

func (*Queries) LinkSubagentChild

func (q *Queries) LinkSubagentChild(ctx context.Context, arg LinkSubagentChildParams) (int64, error)

func (*Queries) LinkTaskRunReviewRequest

func (q *Queries) LinkTaskRunReviewRequest(ctx context.Context, arg LinkTaskRunReviewRequestParams) (int64, error)

func (*Queries) ListAcceptedAutomationSuggestionsAllProfiles

func (q *Queries) ListAcceptedAutomationSuggestionsAllProfiles(ctx context.Context) ([]AutomationSuggestion, error)

func (*Queries) ListAcknowledgedAttention

func (q *Queries) ListAcknowledgedAttention(ctx context.Context, arg ListAcknowledgedAttentionParams) ([]string, error)

func (*Queries) ListActiveAppTokenOrigins

func (q *Queries) ListActiveAppTokenOrigins(ctx context.Context) ([]string, error)

func (*Queries) ListActiveGatewayDeviceSessions

func (q *Queries) ListActiveGatewayDeviceSessions(ctx context.Context) ([]GatewayDeviceSession, error)

func (*Queries) ListActiveSessionIDsByWorkspace

func (q *Queries) ListActiveSessionIDsByWorkspace(ctx context.Context, workspaceID string) ([]string, error)

func (*Queries) ListAllExtensionMCPOverrides

func (q *Queries) ListAllExtensionMCPOverrides(ctx context.Context) ([]ExtensionMcpOverride, error)

func (*Queries) ListAllTaskBlocks

func (q *Queries) ListAllTaskBlocks(ctx context.Context, arg ListAllTaskBlocksParams) ([]TaskBlock, error)

func (*Queries) ListAppTokenOrigins

func (q *Queries) ListAppTokenOrigins(ctx context.Context, deviceID string) ([]string, error)

func (*Queries) ListAppTokens

func (q *Queries) ListAppTokens(ctx context.Context, state any) ([]GatewayDeviceSession, error)

func (*Queries) ListApprovalGrants

func (q *Queries) ListApprovalGrants(ctx context.Context, arg ListApprovalGrantsParams) ([]ToolApprovalGrant, error)

func (*Queries) ListAttentionWorkspaceMutes

func (q *Queries) ListAttentionWorkspaceMutes(ctx context.Context, profileID string) ([]string, error)

func (*Queries) ListAutomationJobOverlays

func (q *Queries) ListAutomationJobOverlays(ctx context.Context) ([]AutomationJobOverlay, error)

func (*Queries) ListAutomationSchedulerStates

func (q *Queries) ListAutomationSchedulerStates(ctx context.Context) ([]AutomationSchedulerState, error)

func (*Queries) ListAutomationSuggestions

func (q *Queries) ListAutomationSuggestions(ctx context.Context, arg ListAutomationSuggestionsParams) ([]AutomationSuggestion, error)

func (*Queries) ListAutomationSuggestionsAggregate

func (q *Queries) ListAutomationSuggestionsAggregate(ctx context.Context, arg ListAutomationSuggestionsAggregateParams) ([]AutomationSuggestion, error)

func (*Queries) ListAutomationSuggestionsAllProfiles

func (q *Queries) ListAutomationSuggestionsAllProfiles(ctx context.Context, arg ListAutomationSuggestionsAllProfilesParams) ([]AutomationSuggestion, error)

func (*Queries) ListAutomationTriggerOverlays

func (q *Queries) ListAutomationTriggerOverlays(ctx context.Context) ([]AutomationTriggerOverlay, error)

func (*Queries) ListAutonomyLeaseHandles

func (q *Queries) ListAutonomyLeaseHandles(ctx context.Context, sessionID sql.NullString) ([]ListAutonomyLeaseHandlesRow, error)

func (*Queries) ListAvailableLoopOutputRefs

func (q *Queries) ListAvailableLoopOutputRefs(ctx context.Context, arg ListAvailableLoopOutputRefsParams) ([]string, error)

func (*Queries) ListCmdPalettePins

func (q *Queries) ListCmdPalettePins(ctx context.Context, arg ListCmdPalettePinsParams) ([]ListCmdPalettePinsRow, error)

func (*Queries) ListCmdPaletteQueryHits

func (q *Queries) ListCmdPaletteQueryHits(ctx context.Context, arg ListCmdPaletteQueryHitsParams) ([]ListCmdPaletteQueryHitsRow, error)

func (*Queries) ListCmdPaletteUsage

func (q *Queries) ListCmdPaletteUsage(ctx context.Context, arg ListCmdPaletteUsageParams) ([]ListCmdPaletteUsageRow, error)

func (*Queries) ListDeadEntities

func (q *Queries) ListDeadEntities(ctx context.Context, workspaceID string) ([]DeadEntity, error)

func (*Queries) ListDispatchableSessionInputs

func (q *Queries) ListDispatchableSessionInputs(ctx context.Context, arg ListDispatchableSessionInputsParams) ([]SessionInputQueue, error)

Dispatch-ordered candidates for batching behind an already claimed head; same filter as GetNextDispatchableSessionInput, so the Goal cutoff still bounds the batch.

func (*Queries) ListExpiredTaskBlockCandidates

func (q *Queries) ListExpiredTaskBlockCandidates(ctx context.Context, now sql.NullString) ([]ListExpiredTaskBlockCandidatesRow, error)

func (*Queries) ListExpiredTaskBlockIDs

func (q *Queries) ListExpiredTaskBlockIDs(ctx context.Context, arg ListExpiredTaskBlockIDsParams) ([]string, error)

func (*Queries) ListExpiredTaskRunLeaseIDs

func (q *Queries) ListExpiredTaskRunLeaseIDs(ctx context.Context, arg ListExpiredTaskRunLeaseIDsParams) ([]string, error)

func (*Queries) ListExpirylessLoopEventWaits

func (q *Queries) ListExpirylessLoopEventWaits(ctx context.Context, pageLimit int64) ([]ListExpirylessLoopEventWaitsRow, error)

func (*Queries) ListExtensionEnvBindings

func (q *Queries) ListExtensionEnvBindings(ctx context.Context, arg ListExtensionEnvBindingsParams) ([]ExtensionEnvBinding, error)

func (*Queries) ListExtensionEnvSecretRefsByWorkspace

func (q *Queries) ListExtensionEnvSecretRefsByWorkspace(ctx context.Context, workspaceID string) ([]string, error)

func (*Queries) ListExtensionInputs

func (q *Queries) ListExtensionInputs(ctx context.Context, arg ListExtensionInputsParams) ([]ListExtensionInputsRow, error)

func (*Queries) ListExtensionMCPOverrides

func (q *Queries) ListExtensionMCPOverrides(ctx context.Context, arg ListExtensionMCPOverridesParams) ([]ExtensionMcpOverride, error)

func (*Queries) ListGatewayDevices

func (q *Queries) ListGatewayDevices(ctx context.Context) ([]GatewayDeviceSession, error)

func (*Queries) ListGatewayEndpointStates

func (q *Queries) ListGatewayEndpointStates(ctx context.Context) ([]GatewayEndpointState, error)

func (*Queries) ListGatewayIngressBindings

func (q *Queries) ListGatewayIngressBindings(ctx context.Context) ([]GatewayIngressBinding, error)

func (*Queries) ListGatewayProviderActivations

func (q *Queries) ListGatewayProviderActivations(ctx context.Context) ([]GatewayProviderActivation, error)

func (*Queries) ListGatewaySurfaceExposure

func (q *Queries) ListGatewaySurfaceExposure(ctx context.Context) ([]GatewaySurfaceExposure, error)

func (*Queries) ListLiveLoopTaskRunIDs

func (q *Queries) ListLiveLoopTaskRunIDs(ctx context.Context, arg ListLiveLoopTaskRunIDsParams) ([]string, error)

func (*Queries) ListLoopCatalogAggregates

func (q *Queries) ListLoopCatalogAggregates(ctx context.Context, arg ListLoopCatalogAggregatesParams) ([]ListLoopCatalogAggregatesRow, error)

func (*Queries) ListLoopCatalogLatestRuns

func (q *Queries) ListLoopCatalogLatestRuns(ctx context.Context, arg ListLoopCatalogLatestRunsParams) ([]ListLoopCatalogLatestRunsRow, error)

func (*Queries) ListLoopEffectOutbox

func (q *Queries) ListLoopEffectOutbox(ctx context.Context, arg ListLoopEffectOutboxParams) ([]LoopEffectOutbox, error)

func (*Queries) ListLoopGateDecisions

func (q *Queries) ListLoopGateDecisions(ctx context.Context, arg ListLoopGateDecisionsParams) ([]ListLoopGateDecisionsRow, error)

func (*Queries) ListLoopGateVerdicts

func (q *Queries) ListLoopGateVerdicts(ctx context.Context, arg ListLoopGateVerdictsParams) ([]ListLoopGateVerdictsRow, error)

func (*Queries) ListLoopGenerationOutputs

func (q *Queries) ListLoopGenerationOutputs(ctx context.Context, arg ListLoopGenerationOutputsParams) ([]ListLoopGenerationOutputsRow, error)

func (*Queries) ListLoopGenerations

func (q *Queries) ListLoopGenerations(ctx context.Context, arg ListLoopGenerationsParams) ([]ListLoopGenerationsRow, error)

func (*Queries) ListLoopNodeAttempts

func (q *Queries) ListLoopNodeAttempts(ctx context.Context, arg ListLoopNodeAttemptsParams) ([]LoopNodeAttempt, error)

func (*Queries) ListLoopNodeControls

func (q *Queries) ListLoopNodeControls(ctx context.Context, arg ListLoopNodeControlsParams) ([]LoopNodeControl, error)

func (*Queries) ListLoopNodeWaits

func (q *Queries) ListLoopNodeWaits(ctx context.Context, arg ListLoopNodeWaitsParams) ([]LoopNodeWait, error)

func (*Queries) ListLoopProvenance

func (q *Queries) ListLoopProvenance(ctx context.Context) ([]ListLoopProvenanceRow, error)

func (*Queries) ListLoopReconciliationCandidates

func (q *Queries) ListLoopReconciliationCandidates(ctx context.Context) ([]sql.NullString, error)

func (*Queries) ListLoopRosterOutputs

func (q *Queries) ListLoopRosterOutputs(ctx context.Context, arg ListLoopRosterOutputsParams) ([]ListLoopRosterOutputsRow, error)

func (*Queries) ListLoopRosterRouteCauses

func (q *Queries) ListLoopRosterRouteCauses(ctx context.Context, arg ListLoopRosterRouteCausesParams) ([]ListLoopRosterRouteCausesRow, error)

func (*Queries) ListLoopRouteCauses

func (q *Queries) ListLoopRouteCauses(ctx context.Context, arg ListLoopRouteCausesParams) ([]ListLoopRouteCausesRow, error)

func (*Queries) ListLoopRunEvents

func (q *Queries) ListLoopRunEvents(ctx context.Context, arg ListLoopRunEventsParams) ([]LoopRunEvent, error)

func (*Queries) ListLoopRunEventsBackward

func (q *Queries) ListLoopRunEventsBackward(ctx context.Context, arg ListLoopRunEventsBackwardParams) ([]LoopRunEvent, error)

func (*Queries) ListLoopRunsMissingActiveCoordinator

func (q *Queries) ListLoopRunsMissingActiveCoordinator(ctx context.Context) ([]ListLoopRunsMissingActiveCoordinatorRow, error)

func (*Queries) ListLoopUIAnnotations

func (q *Queries) ListLoopUIAnnotations(ctx context.Context, arg ListLoopUIAnnotationsParams) ([]ListLoopUIAnnotationsRow, error)

func (*Queries) ListMCPAuthTokenRefsByWorkspace

func (q *Queries) ListMCPAuthTokenRefsByWorkspace(ctx context.Context, workspaceID string) ([]ListMCPAuthTokenRefsByWorkspaceRow, error)

func (*Queries) ListMCPAuthTokens

func (q *Queries) ListMCPAuthTokens(ctx context.Context) ([]McpAuthToken, error)

func (*Queries) ListMCPOAuthRegistrationRefsByWorkspace

func (q *Queries) ListMCPOAuthRegistrationRefsByWorkspace(ctx context.Context, workspaceID string) ([]ListMCPOAuthRegistrationRefsByWorkspaceRow, error)

func (*Queries) ListMarketplaceCatalogEntries

func (q *Queries) ListMarketplaceCatalogEntries(ctx context.Context, arg ListMarketplaceCatalogEntriesParams) ([]MarketplaceCatalogEntry, error)

func (*Queries) ListMarketplaceSourceNameRetainers

func (q *Queries) ListMarketplaceSourceNameRetainers(ctx context.Context, arg ListMarketplaceSourceNameRetainersParams) ([]string, error)

func (*Queries) ListModelCatalogOptionValues

func (q *Queries) ListModelCatalogOptionValues(ctx context.Context, arg ListModelCatalogOptionValuesParams) ([]ModelCatalogOptionValue, error)

func (*Queries) ListModelCatalogOptions

func (q *Queries) ListModelCatalogOptions(ctx context.Context, arg ListModelCatalogOptionsParams) ([]ModelCatalogOption, error)

func (*Queries) ListNativeMissingResultSubagents

func (q *Queries) ListNativeMissingResultSubagents(ctx context.Context, arg ListNativeMissingResultSubagentsParams) ([]SessionSubagent, error)

func (*Queries) ListOpenSubagentWakes

func (q *Queries) ListOpenSubagentWakes(ctx context.Context) ([]SessionSubagentWake, error)

func (*Queries) ListOpenTaskBlocks

func (q *Queries) ListOpenTaskBlocks(ctx context.Context, arg ListOpenTaskBlocksParams) ([]TaskBlock, error)

func (*Queries) ListOpenTaskDescendantIDs

func (q *Queries) ListOpenTaskDescendantIDs(ctx context.Context, arg ListOpenTaskDescendantIDsParams) ([]string, error)

func (*Queries) ListOrphanSubagentSessions

func (q *Queries) ListOrphanSubagentSessions(ctx context.Context) ([]string, error)

func (*Queries) ListPendingLoopEffects

func (q *Queries) ListPendingLoopEffects(ctx context.Context, pageLimit int64) ([]ListPendingLoopEffectsRow, error)

func (*Queries) ListPendingReplyWatchesBySender

func (q *Queries) ListPendingReplyWatchesBySender(ctx context.Context, senderSessionID string) ([]SessionPromptReplyWatch, error)

func (*Queries) ListPendingSessionInputClearTraces

func (q *Queries) ListPendingSessionInputClearTraces(ctx context.Context, sessionID string) ([]SessionInputClearTrace, error)

func (*Queries) ListPendingSessionInputs

func (q *Queries) ListPendingSessionInputs(ctx context.Context, arg ListPendingSessionInputsParams) ([]SessionInputQueue, error)

func (*Queries) ListPendingSubagents

func (q *Queries) ListPendingSubagents(ctx context.Context) ([]SessionSubagent, error)

func (*Queries) ListPendingSubagentsByParent

func (q *Queries) ListPendingSubagentsByParent(ctx context.Context, parentID string) ([]SessionSubagent, error)

func (*Queries) ListPendingToolApprovals

func (q *Queries) ListPendingToolApprovals(ctx context.Context) ([]ToolApprovalPending, error)

func (*Queries) ListPreferredTaskRunCapabilities

func (q *Queries) ListPreferredTaskRunCapabilities(ctx context.Context, runIds []string) ([]TaskRunPreferredCapability, error)

func (*Queries) ListQueuedLoopRunsReadyForPromotion

func (q *Queries) ListQueuedLoopRunsReadyForPromotion(ctx context.Context) ([]ListQueuedLoopRunsReadyForPromotionRow, error)

func (*Queries) ListRecoverableWorktrees

func (q *Queries) ListRecoverableWorktrees(ctx context.Context) ([]Worktree, error)

func (*Queries) ListReplyWatches

func (q *Queries) ListReplyWatches(ctx context.Context, arg ListReplyWatchesParams) ([]SessionPromptReplyWatch, error)

func (*Queries) ListRequiredTaskRunCapabilities

func (q *Queries) ListRequiredTaskRunCapabilities(ctx context.Context, runIds []string) ([]TaskRunRequiredCapability, error)

func (*Queries) ListRunReviews

func (q *Queries) ListRunReviews(ctx context.Context, arg ListRunReviewsParams) ([]TaskRunReview, error)

func (*Queries) ListRunStarvation

func (q *Queries) ListRunStarvation(ctx context.Context) ([]TaskRunStarvation, error)

func (*Queries) ListRunningWorktreeExitOperations

func (q *Queries) ListRunningWorktreeExitOperations(ctx context.Context) ([]WorktreeExitOp, error)

func (*Queries) ListSessionContainerMembers

func (q *Queries) ListSessionContainerMembers(ctx context.Context, arg ListSessionContainerMembersParams) ([]string, error)

func (*Queries) ListSessionFolders

func (q *Queries) ListSessionFolders(ctx context.Context, arg ListSessionFoldersParams) ([]ListSessionFoldersRow, error)

func (*Queries) ListSessionHealthByIDs

func (q *Queries) ListSessionHealthByIDs(ctx context.Context, sessionIds []string) ([]SessionHealth, error)

func (*Queries) ListSessionIDs

func (q *Queries) ListSessionIDs(ctx context.Context) ([]string, error)

func (*Queries) ListSessionLoopWork

func (q *Queries) ListSessionLoopWork(ctx context.Context, arg ListSessionLoopWorkParams) ([]ListSessionLoopWorkRow, error)

func (*Queries) ListSessionPlacementsByIDs

func (q *Queries) ListSessionPlacementsByIDs(ctx context.Context, ids any) ([]ListSessionPlacementsByIDsRow, error)

func (*Queries) ListSessionProcessObservations

func (q *Queries) ListSessionProcessObservations(ctx context.Context) ([]SessionProcessObservation, error)

func (*Queries) ListSkillExposuresByCanonicalDir

func (q *Queries) ListSkillExposuresByCanonicalDir(ctx context.Context, canonicalDir string) ([]SkillExposure, error)

func (*Queries) ListSkillExposuresByOwner

func (q *Queries) ListSkillExposuresByOwner(ctx context.Context, arg ListSkillExposuresByOwnerParams) ([]SkillExposure, error)

func (*Queries) ListStaleDispatchingSessionInputs

func (q *Queries) ListStaleDispatchingSessionInputs(ctx context.Context) ([]ListStaleDispatchingSessionInputsRow, error)

Boot recovery: no live turn can own a non-Goal lease left by a previous daemon process.

func (*Queries) ListStaleReservedSubagents

func (q *Queries) ListStaleReservedSubagents(ctx context.Context, createdAt string) ([]SessionSubagent, error)

func (*Queries) ListStoppableGoalCheckpointKeys

func (q *Queries) ListStoppableGoalCheckpointKeys(ctx context.Context, loopRunID string) ([]ListStoppableGoalCheckpointKeysRow, error)

func (*Queries) ListSubagentArchiveFamily

func (q *Queries) ListSubagentArchiveFamily(ctx context.Context, arg ListSubagentArchiveFamilyParams) ([]ListSubagentArchiveFamilyRow, error)

func (*Queries) ListSubagentWakeRows

func (q *Queries) ListSubagentWakeRows(ctx context.Context, wakeMessageID sql.NullString) ([]SessionSubagent, error)

func (*Queries) ListSubagentWakesByParent

func (q *Queries) ListSubagentWakesByParent(ctx context.Context, arg ListSubagentWakesByParentParams) ([]SessionSubagentWake, error)

func (*Queries) ListSubagentWorktreeCleanupPending

func (q *Queries) ListSubagentWorktreeCleanupPending(ctx context.Context) ([]SessionSubagent, error)

func (*Queries) ListSubagentsByParent

func (q *Queries) ListSubagentsByParent(ctx context.Context, arg ListSubagentsByParentParams) ([]SessionSubagent, error)

func (*Queries) ListSubagentsByParentUrgency

func (q *Queries) ListSubagentsByParentUrgency(ctx context.Context, arg ListSubagentsByParentUrgencyParams) ([]SessionSubagent, error)

Most urgent first, matching the clients' display order: waiting, failed, working (a resumed child included), queued, settled; then newest.

func (*Queries) ListSubagentsByWorkspace

func (q *Queries) ListSubagentsByWorkspace(ctx context.Context, arg ListSubagentsByWorkspaceParams) ([]SessionSubagent, error)

func (*Queries) ListTaskDependencies

func (q *Queries) ListTaskDependencies(ctx context.Context, taskID string) ([]TaskDependency, error)

func (*Queries) ListTaskDependents

func (q *Queries) ListTaskDependents(ctx context.Context, dependsOnTaskID string) ([]TaskDependency, error)

func (*Queries) ListTaskEvents

func (q *Queries) ListTaskEvents(ctx context.Context, arg ListTaskEventsParams) ([]ListTaskEventsRow, error)

func (*Queries) ListTaskProfileAgents

func (q *Queries) ListTaskProfileAgents(ctx context.Context, taskID string) ([]ListTaskProfileAgentsRow, error)

func (*Queries) ListTaskProfileCapabilities

func (q *Queries) ListTaskProfileCapabilities(ctx context.Context, taskID string) ([]ListTaskProfileCapabilitiesRow, error)

func (*Queries) ListTaskRunIDsForTask

func (q *Queries) ListTaskRunIDsForTask(ctx context.Context, taskID string) ([]string, error)

func (*Queries) ListTaskRunTerminalCommands

func (q *Queries) ListTaskRunTerminalCommands(ctx context.Context) ([]TaskRunTerminalCommand, error)

func (*Queries) ListTaskRunsByStatus

func (q *Queries) ListTaskRunsByStatus(ctx context.Context, statuses []string) ([]ListTaskRunsByStatusRow, error)

func (*Queries) ListTaskTriageStates

func (q *Queries) ListTaskTriageStates(ctx context.Context, arg ListTaskTriageStatesParams) ([]TaskTriageState, error)

func (*Queries) ListUnfinalizedDelegatedSubagents

func (q *Queries) ListUnfinalizedDelegatedSubagents(ctx context.Context) ([]SessionSubagent, error)

func (*Queries) ListUnfinalizedNativeSubagents

func (q *Queries) ListUnfinalizedNativeSubagents(ctx context.Context) ([]SessionSubagent, error)

func (*Queries) ListWorkspaceArchiveBlockers

func (q *Queries) ListWorkspaceArchiveBlockers(ctx context.Context, workspaceID string) ([]ListWorkspaceArchiveBlockersRow, error)

func (*Queries) ListWorkspaceContainerMembers

func (q *Queries) ListWorkspaceContainerMembers(ctx context.Context, arg ListWorkspaceContainerMembersParams) ([]string, error)

func (*Queries) ListWorkspaceDeletionIntents

func (q *Queries) ListWorkspaceDeletionIntents(ctx context.Context) ([]WorkspaceDeletionIntent, error)

func (*Queries) ListWorkspaceFolders

func (q *Queries) ListWorkspaceFolders(ctx context.Context, profileID string) ([]ListWorkspaceFoldersRow, error)

func (*Queries) ListWorkspacePlacements

func (q *Queries) ListWorkspacePlacements(ctx context.Context, profileID string) ([]ListWorkspacePlacementsRow, error)

func (*Queries) ListWorkspaces

func (q *Queries) ListWorkspaces(ctx context.Context) ([]Workspace, error)

func (*Queries) ListWorktrees

func (q *Queries) ListWorktrees(ctx context.Context, workspaceID string) ([]Worktree, error)

func (*Queries) ListWorktreesAggregate

func (q *Queries) ListWorktreesAggregate(ctx context.Context) ([]Worktree, error)

func (*Queries) LookupApprovalGrant

func (q *Queries) LookupApprovalGrant(ctx context.Context, arg LookupApprovalGrantParams) (ToolApprovalGrant, error)

func (*Queries) LookupRunReviewBySession

func (q *Queries) LookupRunReviewBySession(ctx context.Context, arg LookupRunReviewBySessionParams) (TaskRunReview, error)

func (*Queries) MarkGatewayEndpointUnavailable

func (q *Queries) MarkGatewayEndpointUnavailable(ctx context.Context, arg MarkGatewayEndpointUnavailableParams) (int64, error)

func (*Queries) MarkGoalJudgeAttemptAmbiguous

func (q *Queries) MarkGoalJudgeAttemptAmbiguous(ctx context.Context, arg MarkGoalJudgeAttemptAmbiguousParams) (int64, error)

func (*Queries) MarkGoalRunCleared

func (q *Queries) MarkGoalRunCleared(ctx context.Context, arg MarkGoalRunClearedParams) (int64, error)

func (*Queries) MarkInlineGoalRunCleared

func (q *Queries) MarkInlineGoalRunCleared(ctx context.Context, arg MarkInlineGoalRunClearedParams) (int64, error)

func (*Queries) MarkMarketplaceCatalogStateStale

func (q *Queries) MarkMarketplaceCatalogStateStale(ctx context.Context, arg MarkMarketplaceCatalogStateStaleParams) (int64, error)

func (*Queries) MarkQueuedSessionPromptAdmissionIndeterminate

func (q *Queries) MarkQueuedSessionPromptAdmissionIndeterminate(ctx context.Context, arg MarkQueuedSessionPromptAdmissionIndeterminateParams) (int64, error)

func (*Queries) MarkSessionDerivationChildDeleted

func (q *Queries) MarkSessionDerivationChildDeleted(ctx context.Context, arg MarkSessionDerivationChildDeletedParams) error

func (*Queries) MarkSessionHealthStale

func (q *Queries) MarkSessionHealthStale(ctx context.Context, arg MarkSessionHealthStaleParams) (int64, error)

func (*Queries) MarkSessionInputClearTraceProjected

func (q *Queries) MarkSessionInputClearTraceProjected(ctx context.Context, arg MarkSessionInputClearTraceProjectedParams) error

func (*Queries) MarkSessionInputFailed

func (q *Queries) MarkSessionInputFailed(ctx context.Context, arg MarkSessionInputFailedParams) (int64, error)

func (*Queries) MarkSessionInputSentInTurn

func (q *Queries) MarkSessionInputSentInTurn(ctx context.Context, arg MarkSessionInputSentInTurnParams) (int64, error)

func (*Queries) MarkSessionOrphaned

func (q *Queries) MarkSessionOrphaned(ctx context.Context, arg MarkSessionOrphanedParams) error

func (*Queries) MarkSessionPromptAdmissionIndeterminate

func (q *Queries) MarkSessionPromptAdmissionIndeterminate(ctx context.Context, arg MarkSessionPromptAdmissionIndeterminateParams) (int64, error)

func (*Queries) MarkSubagentFirstPromptAdmitted

func (q *Queries) MarkSubagentFirstPromptAdmitted(ctx context.Context, arg MarkSubagentFirstPromptAdmittedParams) (int64, error)

func (*Queries) MarkSubagentWakeDispatched

func (q *Queries) MarkSubagentWakeDispatched(ctx context.Context, arg MarkSubagentWakeDispatchedParams) (int64, error)

func (*Queries) MarkSubagentWakeSteerRequeued

func (q *Queries) MarkSubagentWakeSteerRequeued(ctx context.Context, arg MarkSubagentWakeSteerRequeuedParams) (int64, error)

func (*Queries) MarkTaskNeedsAttentionIfClear

func (q *Queries) MarkTaskNeedsAttentionIfClear(ctx context.Context, arg MarkTaskNeedsAttentionIfClearParams) (int64, error)

func (*Queries) MarkTaskRunNeedsAttention

func (q *Queries) MarkTaskRunNeedsAttention(ctx context.Context, arg MarkTaskRunNeedsAttentionParams) (int64, error)

func (*Queries) MaxTaskEventSequence

func (q *Queries) MaxTaskEventSequence(ctx context.Context) (int64, error)

func (*Queries) MaxTaskRunAttempt

func (q *Queries) MaxTaskRunAttempt(ctx context.Context, taskID string) (int64, error)

func (*Queries) NextLoopRunEventSequence

func (q *Queries) NextLoopRunEventSequence(ctx context.Context, loopRunID string) (int64, error)

func (*Queries) NextSessionContainerPosition

func (q *Queries) NextSessionContainerPosition(ctx context.Context, arg NextSessionContainerPositionParams) (int64, error)

func (*Queries) NextWorkspaceContainerPosition

func (q *Queries) NextWorkspaceContainerPosition(ctx context.Context, arg NextWorkspaceContainerPositionParams) (int64, error)

func (*Queries) PatchLoopConfig

func (q *Queries) PatchLoopConfig(ctx context.Context, arg PatchLoopConfigParams) error

func (*Queries) PauseTask

func (q *Queries) PauseTask(ctx context.Context, arg PauseTaskParams) (int64, error)

func (*Queries) PeekNextSessionInput

func (q *Queries) PeekNextSessionInput(ctx context.Context, arg PeekNextSessionInputParams) (SessionInputQueue, error)

func (*Queries) PersistGoalQueueTerminal

func (q *Queries) PersistGoalQueueTerminal(ctx context.Context, arg PersistGoalQueueTerminalParams) (int64, error)

func (*Queries) ProjectGoalCheckpointCounts

func (q *Queries) ProjectGoalCheckpointCounts(ctx context.Context, arg ProjectGoalCheckpointCountsParams) error

func (*Queries) ProjectGoalGrantOutput

func (q *Queries) ProjectGoalGrantOutput(ctx context.Context, arg ProjectGoalGrantOutputParams) (int64, error)

func (*Queries) ProjectLoopPauseToGoalCheckpoints

func (q *Queries) ProjectLoopPauseToGoalCheckpoints(ctx context.Context, arg ProjectLoopPauseToGoalCheckpointsParams) error

func (*Queries) PromoteQueuedAgentSessionInputToSteer

func (q *Queries) PromoteQueuedAgentSessionInputToSteer(ctx context.Context, arg PromoteQueuedAgentSessionInputToSteerParams) (int64, error)

Long-turn promotion keeps the row identity (message, event, admission, origin) so reply watches follow it. It never runs while operator input waits, and it respects the per-sender steer slot.

func (*Queries) PruneModelCatalogSourceContexts

func (q *Queries) PruneModelCatalogSourceContexts(ctx context.Context, arg PruneModelCatalogSourceContextsParams) error

func (*Queries) PutApprovalGrant

func (q *Queries) PutApprovalGrant(ctx context.Context, arg PutApprovalGrantParams) (ToolApprovalGrant, error)

func (*Queries) PutCmdPalettePin

func (q *Queries) PutCmdPalettePin(ctx context.Context, arg PutCmdPalettePinParams) error

func (*Queries) PutCmdPaletteQueryHit

func (q *Queries) PutCmdPaletteQueryHit(ctx context.Context, arg PutCmdPaletteQueryHitParams) error

func (*Queries) PutCmdPaletteUsage

func (q *Queries) PutCmdPaletteUsage(ctx context.Context, arg PutCmdPaletteUsageParams) error

func (*Queries) ReactivateGoalOriginBinding

func (q *Queries) ReactivateGoalOriginBinding(ctx context.Context, arg ReactivateGoalOriginBindingParams) (int64, error)

func (*Queries) ReadForgePullRequests

func (q *Queries) ReadForgePullRequests(ctx context.Context, keys any) ([]ForgePullRequest, error)

func (*Queries) ReadLatestGoalSessionCheckpoint

func (q *Queries) ReadLatestGoalSessionCheckpoint(ctx context.Context, loopRunID string) (LoopGoalCheckpoint, error)

func (*Queries) ReadLatestGoalSessionVerdict

func (q *Queries) ReadLatestGoalSessionVerdict(ctx context.Context, loopRunID string) (LoopGoalTurn, error)

func (*Queries) ReadSessionBranches

func (q *Queries) ReadSessionBranches(ctx context.Context, ids any) ([]ReadSessionBranchesRow, error)

func (*Queries) RearmFailedReplyWatch

func (q *Queries) RearmFailedReplyWatch(ctx context.Context, admissionID string) error

func (*Queries) RearmLoopApprovalGate

func (q *Queries) RearmLoopApprovalGate(ctx context.Context, arg RearmLoopApprovalGateParams) (int64, error)

func (*Queries) RebasePreservedSessionInputs

func (q *Queries) RebasePreservedSessionInputs(ctx context.Context, arg RebasePreservedSessionInputsParams) error

func (*Queries) ReconcileLoopSessionCleanup

func (q *Queries) ReconcileLoopSessionCleanup(ctx context.Context, arg ReconcileLoopSessionCleanupParams) error

func (*Queries) ReconcileStoppedSubagentChildActivity

func (q *Queries) ReconcileStoppedSubagentChildActivity(ctx context.Context, now string) ([]SessionSubagent, error)

func (*Queries) RecordAutomationRunDeliveryError

func (q *Queries) RecordAutomationRunDeliveryError(ctx context.Context, arg RecordAutomationRunDeliveryErrorParams) (int64, error)

func (*Queries) RecordGoalDriverAttached

func (q *Queries) RecordGoalDriverAttached(ctx context.Context, arg RecordGoalDriverAttachedParams) (int64, error)

func (*Queries) RecordGoalReportIntent

func (q *Queries) RecordGoalReportIntent(ctx context.Context, arg RecordGoalReportIntentParams) (int64, error)

func (*Queries) RecordLoopGenerationOutputRuntime

func (q *Queries) RecordLoopGenerationOutputRuntime(ctx context.Context, arg RecordLoopGenerationOutputRuntimeParams) (int64, error)

func (*Queries) RecordNotificationCursorError

func (q *Queries) RecordNotificationCursorError(ctx context.Context, arg RecordNotificationCursorErrorParams) error

func (*Queries) RecoverDispatchingToolApprovals

func (q *Queries) RecoverDispatchingToolApprovals(ctx context.Context, executedAt sql.NullInt64) ([]ToolApprovalPending, error)

func (*Queries) RecoverGoalQueueTerminal

func (q *Queries) RecoverGoalQueueTerminal(ctx context.Context, arg RecoverGoalQueueTerminalParams) (int64, error)

func (*Queries) RecoverStagedSessionSteers

func (q *Queries) RecoverStagedSessionSteers(ctx context.Context, now string) (int64, error)

Boot recovery: a steer staged by a previous daemon process never reached its turn. Steers from other sessions (including long-turn promotions) return to after-turn delivery; operator steers become dispatchable again so the ordinary claim delivers them.

func (*Queries) RecoverTaskRunByMarkRunning

func (q *Queries) RecoverTaskRunByMarkRunning(ctx context.Context, arg RecoverTaskRunByMarkRunningParams) (int64, error)

func (*Queries) RecoverTaskRunByRequeue

func (q *Queries) RecoverTaskRunByRequeue(ctx context.Context, arg RecoverTaskRunByRequeueParams) (int64, error)

func (*Queries) RegisterMarketplaceSource

func (q *Queries) RegisterMarketplaceSource(ctx context.Context, arg RegisterMarketplaceSourceParams) error

func (*Queries) RejectPreparedGoalQueueRow

func (q *Queries) RejectPreparedGoalQueueRow(ctx context.Context, arg RejectPreparedGoalQueueRowParams) (int64, error)

func (*Queries) ReleaseSessionInput

func (q *Queries) ReleaseSessionInput(ctx context.Context, arg ReleaseSessionInputParams) (int64, error)

func (*Queries) ReleaseTaskRunTerminalCommand

func (q *Queries) ReleaseTaskRunTerminalCommand(ctx context.Context, arg ReleaseTaskRunTerminalCommandParams) (int64, error)

func (*Queries) RemoveMissingWorktree

func (q *Queries) RemoveMissingWorktree(ctx context.Context, arg RemoveMissingWorktreeParams) (int64, error)

func (*Queries) RenameAppToken

func (q *Queries) RenameAppToken(ctx context.Context, arg RenameAppTokenParams) error

func (*Queries) RenameGatewayDevice

func (q *Queries) RenameGatewayDevice(ctx context.Context, arg RenameGatewayDeviceParams) (GatewayDeviceSession, error)

func (*Queries) RenameGatewayDeviceForActor

func (q *Queries) RenameGatewayDeviceForActor(ctx context.Context, arg RenameGatewayDeviceForActorParams) (GatewayDeviceSession, error)

func (*Queries) RenameSessionFolder

func (q *Queries) RenameSessionFolder(ctx context.Context, arg RenameSessionFolderParams) (int64, error)

func (*Queries) RenameWorkspaceFolder

func (q *Queries) RenameWorkspaceFolder(ctx context.Context, arg RenameWorkspaceFolderParams) (int64, error)

func (*Queries) ReplyWatchAdmission

func (q *Queries) ReplyWatchAdmission(ctx context.Context, id string) (SessionPromptAdmission, error)

func (*Queries) ReplyWatchMessageInputs

func (q *Queries) ReplyWatchMessageInputs(ctx context.Context, arg ReplyWatchMessageInputsParams) ([]SessionInputQueue, error)

func (*Queries) ReplyWatchSenderExists

func (q *Queries) ReplyWatchSenderExists(ctx context.Context, arg ReplyWatchSenderExistsParams) (bool, error)

func (*Queries) RequeueExpiredTaskRunLease

func (q *Queries) RequeueExpiredTaskRunLease(ctx context.Context, arg RequeueExpiredTaskRunLeaseParams) (int64, error)

func (*Queries) RequeueTaskRunLease

func (q *Queries) RequeueTaskRunLease(ctx context.Context, arg RequeueTaskRunLeaseParams) (int64, error)

func (*Queries) ReserveSessionSteer

func (q *Queries) ReserveSessionSteer(ctx context.Context, arg ReserveSessionSteerParams) (int64, error)

func (*Queries) ReserveSubagent

func (q *Queries) ReserveSubagent(ctx context.Context, arg ReserveSubagentParams) (int64, error)

func (*Queries) ResetGoalRecoveryAfterBindingActivation

func (q *Queries) ResetGoalRecoveryAfterBindingActivation(ctx context.Context, arg ResetGoalRecoveryAfterBindingActivationParams) (int64, error)

func (*Queries) ResetNotificationCursor

func (q *Queries) ResetNotificationCursor(ctx context.Context, arg ResetNotificationCursorParams) error

func (*Queries) ResolveActiveGoalOriginAliases

func (q *Queries) ResolveActiveGoalOriginAliases(ctx context.Context, arg ResolveActiveGoalOriginAliasesParams) ([]sql.NullString, error)

func (*Queries) ResolveAutomationSuggestion

func (q *Queries) ResolveAutomationSuggestion(ctx context.Context, arg ResolveAutomationSuggestionParams) (int64, error)

func (*Queries) ResolvePendingToolApproval

func (q *Queries) ResolvePendingToolApproval(ctx context.Context, arg ResolvePendingToolApprovalParams) (ToolApprovalPending, error)

func (*Queries) ResolveSessionSteer

func (q *Queries) ResolveSessionSteer(ctx context.Context, arg ResolveSessionSteerParams) (int64, error)

func (*Queries) ResolveSessionSteerAdmission

func (q *Queries) ResolveSessionSteerAdmission(ctx context.Context, arg ResolveSessionSteerAdmissionParams) (int64, error)

func (*Queries) RestoreUnstartedAutomationReservation

func (q *Queries) RestoreUnstartedAutomationReservation(ctx context.Context, arg RestoreUnstartedAutomationReservationParams) (int64, error)

func (*Queries) ResumeTask

func (q *Queries) ResumeTask(ctx context.Context, arg ResumeTaskParams) (int64, error)

func (*Queries) RetainRevokedGoalTerminal

func (q *Queries) RetainRevokedGoalTerminal(ctx context.Context, arg RetainRevokedGoalTerminalParams) (int64, error)

func (*Queries) RetireGoalBinding

func (q *Queries) RetireGoalBinding(ctx context.Context, arg RetireGoalBindingParams) (int64, error)

func (*Queries) RevertPromotedAgentSessionInput

func (q *Queries) RevertPromotedAgentSessionInput(ctx context.Context, arg RevertPromotedAgentSessionInputParams) (int64, error)

A promotion whose live delivery could not start, or whose injection fell back, returns the message to plain after-turn delivery instead of canceling it, so it never holds the sender's queued-steer slot.

func (*Queries) RevokeAppToken

func (q *Queries) RevokeAppToken(ctx context.Context, arg RevokeAppTokenParams) error

func (*Queries) RevokeApprovalGrant

func (q *Queries) RevokeApprovalGrant(ctx context.Context, arg RevokeApprovalGrantParams) (int64, error)

func (*Queries) RevokeGatewayDevice

func (q *Queries) RevokeGatewayDevice(ctx context.Context, arg RevokeGatewayDeviceParams) (GatewayDeviceSession, error)

func (*Queries) RevokeGatewayDeviceForActor

func (q *Queries) RevokeGatewayDeviceForActor(ctx context.Context, arg RevokeGatewayDeviceForActorParams) (GatewayDeviceSession, error)

func (*Queries) RewriteSubagentWakeInput

func (q *Queries) RewriteSubagentWakeInput(ctx context.Context, arg RewriteSubagentWakeInputParams) (int64, error)

func (*Queries) RollbackAutomationSuggestionAcceptance

func (q *Queries) RollbackAutomationSuggestionAcceptance(ctx context.Context, arg RollbackAutomationSuggestionAcceptanceParams) (int64, error)

func (*Queries) SaveAttentionSnapshot

func (q *Queries) SaveAttentionSnapshot(ctx context.Context, arg SaveAttentionSnapshotParams) error

func (*Queries) SaveSessionBranch

func (q *Queries) SaveSessionBranch(ctx context.Context, arg SaveSessionBranchParams) (int64, error)

func (*Queries) SessionCatalogProfiles

func (q *Queries) SessionCatalogProfiles(ctx context.Context, workspaceID string) ([]string, error)

func (*Queries) SessionMessageRateWindow

func (*Queries) SetAutomationScheduledDeferral

func (q *Queries) SetAutomationScheduledDeferral(ctx context.Context, arg SetAutomationScheduledDeferralParams) (int64, error)

func (*Queries) SetLoopRunPauseState

func (q *Queries) SetLoopRunPauseState(ctx context.Context, arg SetLoopRunPauseStateParams) (int64, error)

func (*Queries) SetMarketplaceSourceConfiguration

func (q *Queries) SetMarketplaceSourceConfiguration(ctx context.Context, revision string) (SetMarketplaceSourceConfigurationRow, error)

func (*Queries) SetSchedulerPaused

func (q *Queries) SetSchedulerPaused(ctx context.Context, arg SetSchedulerPausedParams) error

func (*Queries) SetSchedulerResumed

func (q *Queries) SetSchedulerResumed(ctx context.Context, updatedAt string) error

func (*Queries) SetSessionCreationIdentity

func (q *Queries) SetSessionCreationIdentity(ctx context.Context, arg SetSessionCreationIdentityParams) (int64, error)

func (*Queries) SetSessionFolderPosition

func (q *Queries) SetSessionFolderPosition(ctx context.Context, arg SetSessionFolderPositionParams) error

func (*Queries) SetSubagentFamilyArchived

func (q *Queries) SetSubagentFamilyArchived(ctx context.Context, arg SetSubagentFamilyArchivedParams) error

func (*Queries) SetSubagentWakeInput

func (q *Queries) SetSubagentWakeInput(ctx context.Context, arg SetSubagentWakeInputParams) (int64, error)

func (*Queries) SetSubagentWorktreeCleanup

func (q *Queries) SetSubagentWorktreeCleanup(ctx context.Context, arg SetSubagentWorktreeCleanupParams) (int64, error)

func (*Queries) SetSubagentWorktreeFacts

func (q *Queries) SetSubagentWorktreeFacts(ctx context.Context, arg SetSubagentWorktreeFactsParams) error

func (*Queries) SetSubagentsPending

func (q *Queries) SetSubagentsPending(ctx context.Context, arg SetSubagentsPendingParams) error

func (*Queries) SetTaskCurrentRunProjection

func (q *Queries) SetTaskCurrentRunProjection(ctx context.Context, arg SetTaskCurrentRunProjectionParams) (int64, error)

func (*Queries) SetTaskWakeCreator

func (q *Queries) SetTaskWakeCreator(ctx context.Context, arg SetTaskWakeCreatorParams) (int64, error)

func (*Queries) SetWorkspaceArchived

func (q *Queries) SetWorkspaceArchived(ctx context.Context, arg SetWorkspaceArchivedParams) (int64, error)

func (*Queries) SetWorkspaceFolderPosition

func (q *Queries) SetWorkspaceFolderPosition(ctx context.Context, arg SetWorkspaceFolderPositionParams) error

func (*Queries) SetWorktreeState

func (q *Queries) SetWorktreeState(ctx context.Context, arg SetWorktreeStateParams) (int64, error)

func (*Queries) SettleGoalCompactionCheckpoint

func (q *Queries) SettleGoalCompactionCheckpoint(ctx context.Context, arg SettleGoalCompactionCheckpointParams) (int64, error)

func (*Queries) SettleGoalTurn

func (q *Queries) SettleGoalTurn(ctx context.Context, arg SettleGoalTurnParams) (int64, error)

func (*Queries) SettlePendingSessionSteer

func (q *Queries) SettlePendingSessionSteer(ctx context.Context, arg SettlePendingSessionSteerParams) (int64, error)

func (*Queries) SettleStoppedGoalBindingBeforeActivation

func (q *Queries) SettleStoppedGoalBindingBeforeActivation(ctx context.Context, arg SettleStoppedGoalBindingBeforeActivationParams) (int64, error)

func (*Queries) SettleStoppedGoalBindingCreationForSession

func (q *Queries) SettleStoppedGoalBindingCreationForSession(ctx context.Context, arg SettleStoppedGoalBindingCreationForSessionParams) (int64, error)

func (*Queries) SettleSubagentWake

func (q *Queries) SettleSubagentWake(ctx context.Context, arg SettleSubagentWakeParams) (int64, error)

func (*Queries) SettleSubagentWakeRows

func (q *Queries) SettleSubagentWakeRows(ctx context.Context, arg SettleSubagentWakeRowsParams) ([]SessionSubagent, error)

func (*Queries) ShiftSessionFolders

func (q *Queries) ShiftSessionFolders(ctx context.Context, arg ShiftSessionFoldersParams) error

func (*Queries) ShiftWorkspaceFolders

func (q *Queries) ShiftWorkspaceFolders(ctx context.Context, profileID string) error

func (*Queries) StartGoalCompactionCheckpoint

func (q *Queries) StartGoalCompactionCheckpoint(ctx context.Context, arg StartGoalCompactionCheckpointParams) (int64, error)

func (*Queries) StartGoalWorkCheckpoint

func (q *Queries) StartGoalWorkCheckpoint(ctx context.Context, arg StartGoalWorkCheckpointParams) (int64, error)

func (*Queries) SubagentSummaries

func (q *Queries) SubagentSummaries(ctx context.Context, parentIds any) ([]SubagentSummariesRow, error)

func (*Queries) SumLoopRunTaskTokens

func (q *Queries) SumLoopRunTaskTokens(ctx context.Context, loopRunID sql.NullString) (int64, error)

func (*Queries) SweepExpiredSessionAttachLocks

func (q *Queries) SweepExpiredSessionAttachLocks(ctx context.Context, now string) (int64, error)

func (*Queries) SweepHeartbeatWakeEvents

func (q *Queries) SweepHeartbeatWakeEvents(ctx context.Context, arg SweepHeartbeatWakeEventsParams) (int64, error)

func (*Queries) SweepOrphanedGatewayIngressBindings

func (q *Queries) SweepOrphanedGatewayIngressBindings(ctx context.Context) (int64, error)

func (*Queries) SweepOrphanedLoopOutputBlobs

func (q *Queries) SweepOrphanedLoopOutputBlobs(ctx context.Context) error

func (*Queries) TaskDependencyExists

func (q *Queries) TaskDependencyExists(ctx context.Context, arg TaskDependencyExistsParams) (bool, error)

func (*Queries) TaskWakeEventExists

func (q *Queries) TaskWakeEventExists(ctx context.Context, arg TaskWakeEventExistsParams) (bool, error)

func (*Queries) TerminalizeClaimedGoalRevocation

func (q *Queries) TerminalizeClaimedGoalRevocation(ctx context.Context, arg TerminalizeClaimedGoalRevocationParams) (int64, error)

func (*Queries) TerminalizePreparedGoalRevocation

func (q *Queries) TerminalizePreparedGoalRevocation(ctx context.Context, arg TerminalizePreparedGoalRevocationParams) (int64, error)

func (*Queries) TerminalizeRevokedGoalTurn

func (q *Queries) TerminalizeRevokedGoalTurn(ctx context.Context, arg TerminalizeRevokedGoalTurnParams) (int64, error)

func (*Queries) TerminalizeStoppedGoalCheckpoint

func (q *Queries) TerminalizeStoppedGoalCheckpoint(ctx context.Context, arg TerminalizeStoppedGoalCheckpointParams) (int64, error)

func (*Queries) TombstoneBoundRunMaterialization

func (q *Queries) TombstoneBoundRunMaterialization(ctx context.Context, arg TombstoneBoundRunMaterializationParams) (int64, error)

func (*Queries) TouchAppTokenLastSeen

func (q *Queries) TouchAppTokenLastSeen(ctx context.Context, arg TouchAppTokenLastSeenParams) (int64, error)

func (*Queries) TransitionGatewaySurfaceExposure

func (q *Queries) TransitionGatewaySurfaceExposure(ctx context.Context, arg TransitionGatewaySurfaceExposureParams) (GatewaySurfaceExposure, error)

func (*Queries) TransitionLoopCoordinatorBoundary

func (q *Queries) TransitionLoopCoordinatorBoundary(ctx context.Context, arg TransitionLoopCoordinatorBoundaryParams) (int64, error)

func (*Queries) TransitionTaskRunRunning

func (q *Queries) TransitionTaskRunRunning(ctx context.Context, arg TransitionTaskRunRunningParams) (int64, error)

func (*Queries) TransitionTaskRunStarting

func (q *Queries) TransitionTaskRunStarting(ctx context.Context, arg TransitionTaskRunStartingParams) (int64, error)

func (*Queries) TransitionTerminalTaskRun

func (q *Queries) TransitionTerminalTaskRun(ctx context.Context, arg TransitionTerminalTaskRunParams) (int64, error)

func (*Queries) UpdateAutomationJob

func (q *Queries) UpdateAutomationJob(ctx context.Context, arg UpdateAutomationJobParams) (int64, error)

func (*Queries) UpdateAutomationRun

func (q *Queries) UpdateAutomationRun(ctx context.Context, arg UpdateAutomationRunParams) (int64, error)

func (*Queries) UpdateAutomationTrigger

func (q *Queries) UpdateAutomationTrigger(ctx context.Context, arg UpdateAutomationTriggerParams) (int64, error)

func (*Queries) UpdateExtensionMCPOverride

func (q *Queries) UpdateExtensionMCPOverride(ctx context.Context, arg UpdateExtensionMCPOverrideParams) (int64, error)

func (*Queries) UpdateGatewayProviderObserved

func (q *Queries) UpdateGatewayProviderObserved(ctx context.Context, arg UpdateGatewayProviderObservedParams) (int64, error)

func (*Queries) UpdateGatewaySurfaceObserved

func (q *Queries) UpdateGatewaySurfaceObserved(ctx context.Context, arg UpdateGatewaySurfaceObservedParams) (int64, error)

func (*Queries) UpdateGoalCheckpointAfterTurn

func (q *Queries) UpdateGoalCheckpointAfterTurn(ctx context.Context, arg UpdateGoalCheckpointAfterTurnParams) (int64, error)

func (*Queries) UpdateGoalCheckpointControl

func (q *Queries) UpdateGoalCheckpointControl(ctx context.Context, arg UpdateGoalCheckpointControlParams) (int64, error)

func (*Queries) UpdateGoalCheckpointForReentry

func (q *Queries) UpdateGoalCheckpointForReentry(ctx context.Context, arg UpdateGoalCheckpointForReentryParams) (int64, error)

func (*Queries) UpdateGoalContextUsage

func (q *Queries) UpdateGoalContextUsage(ctx context.Context, arg UpdateGoalContextUsageParams) (int64, error)

func (*Queries) UpdateGoalOutputForReentry

func (q *Queries) UpdateGoalOutputForReentry(ctx context.Context, arg UpdateGoalOutputForReentryParams) (int64, error)

func (*Queries) UpdateGoalPromptOwnerForReentry

func (q *Queries) UpdateGoalPromptOwnerForReentry(ctx context.Context, arg UpdateGoalPromptOwnerForReentryParams) (int64, error)

func (*Queries) UpdateLoopProvenance

func (q *Queries) UpdateLoopProvenance(ctx context.Context, arg UpdateLoopProvenanceParams) (int64, error)

func (*Queries) UpdateLoopRunBest

func (q *Queries) UpdateLoopRunBest(ctx context.Context, arg UpdateLoopRunBestParams) (int64, error)

func (*Queries) UpdateLoopRunGeneration

func (q *Queries) UpdateLoopRunGeneration(ctx context.Context, arg UpdateLoopRunGenerationParams) (int64, error)

func (*Queries) UpdateLoopRunGrantCeiling

func (q *Queries) UpdateLoopRunGrantCeiling(ctx context.Context, arg UpdateLoopRunGrantCeilingParams) error

func (*Queries) UpdateLoopRunNodeTerminal

func (q *Queries) UpdateLoopRunNodeTerminal(ctx context.Context, arg UpdateLoopRunNodeTerminalParams) (int64, error)

func (*Queries) UpdateLoopRunTokens

func (q *Queries) UpdateLoopRunTokens(ctx context.Context, arg UpdateLoopRunTokensParams) (int64, error)

func (*Queries) UpdateNativeSubagentTitle

func (q *Queries) UpdateNativeSubagentTitle(ctx context.Context, arg UpdateNativeSubagentTitleParams) (int64, error)

func (*Queries) UpdateNotificationCursor

func (q *Queries) UpdateNotificationCursor(ctx context.Context, arg UpdateNotificationCursorParams) error

func (*Queries) UpdatePendingWorktree

func (q *Queries) UpdatePendingWorktree(ctx context.Context, arg UpdatePendingWorktreeParams) (int64, error)

func (*Queries) UpdatePreparedGoalCheckpointFence

func (q *Queries) UpdatePreparedGoalCheckpointFence(ctx context.Context, arg UpdatePreparedGoalCheckpointFenceParams) (int64, error)

func (*Queries) UpdatePreparedGoalQueueFence

func (q *Queries) UpdatePreparedGoalQueueFence(ctx context.Context, arg UpdatePreparedGoalQueueFenceParams) (int64, error)

func (*Queries) UpdateRunReviewBinding

func (q *Queries) UpdateRunReviewBinding(ctx context.Context, arg UpdateRunReviewBindingParams) (int64, error)

func (*Queries) UpdateRunReviewVerdict

func (q *Queries) UpdateRunReviewVerdict(ctx context.Context, arg UpdateRunReviewVerdictParams) (int64, error)

func (*Queries) UpdateSessionLineageHierarchy

func (q *Queries) UpdateSessionLineageHierarchy(ctx context.Context, arg UpdateSessionLineageHierarchyParams) (int64, error)

func (*Queries) UpdateSessionSoulSnapshot

func (q *Queries) UpdateSessionSoulSnapshot(ctx context.Context, arg UpdateSessionSoulSnapshotParams) (int64, error)

func (*Queries) UpdateSessionWorktreeBinding

func (q *Queries) UpdateSessionWorktreeBinding(ctx context.Context, arg UpdateSessionWorktreeBindingParams) (int64, error)

func (*Queries) UpdateSubagentChildActivity

func (q *Queries) UpdateSubagentChildActivity(ctx context.Context, arg UpdateSubagentChildActivityParams) (int64, error)

func (*Queries) UpdateSubagentProgress

func (q *Queries) UpdateSubagentProgress(ctx context.Context, arg UpdateSubagentProgressParams) (int64, error)

func (*Queries) UpdateSubagentState

func (q *Queries) UpdateSubagentState(ctx context.Context, arg UpdateSubagentStateParams) (int64, error)

func (*Queries) UpdateTask

func (q *Queries) UpdateTask(ctx context.Context, arg UpdateTaskParams) (int64, error)

func (*Queries) UpdateTaskGrantCeiling

func (q *Queries) UpdateTaskGrantCeiling(ctx context.Context, arg UpdateTaskGrantCeilingParams) error

func (*Queries) UpdateTaskReviewRollup

func (q *Queries) UpdateTaskReviewRollup(ctx context.Context, arg UpdateTaskReviewRollupParams) (int64, error)

func (*Queries) UpdateTaskRunMetadata

func (q *Queries) UpdateTaskRunMetadata(ctx context.Context, arg UpdateTaskRunMetadataParams) (int64, error)

func (*Queries) UpdateTaskStatusChokepoint

func (q *Queries) UpdateTaskStatusChokepoint(ctx context.Context, arg UpdateTaskStatusChokepointParams) (int64, error)

func (*Queries) UpdateToolProcessRecordState

func (q *Queries) UpdateToolProcessRecordState(ctx context.Context, arg UpdateToolProcessRecordStateParams) (int64, error)

func (*Queries) UpdateWorkspace

func (q *Queries) UpdateWorkspace(ctx context.Context, arg UpdateWorkspaceParams) (int64, error)

func (*Queries) UpgradeSubagentWakePolicy

func (q *Queries) UpgradeSubagentWakePolicy(ctx context.Context, arg UpgradeSubagentWakePolicyParams) error

func (*Queries) UpsertAppMetadata

func (q *Queries) UpsertAppMetadata(ctx context.Context, arg UpsertAppMetadataParams) error

func (*Queries) UpsertAutomationJobCatalog

func (q *Queries) UpsertAutomationJobCatalog(ctx context.Context, arg UpsertAutomationJobCatalogParams) error

func (*Queries) UpsertAutomationJobOverlay

func (q *Queries) UpsertAutomationJobOverlay(ctx context.Context, arg UpsertAutomationJobOverlayParams) error

func (*Queries) UpsertAutomationSchedulerState

func (q *Queries) UpsertAutomationSchedulerState(ctx context.Context, arg UpsertAutomationSchedulerStateParams) error

func (*Queries) UpsertAutomationTriggerCatalog

func (q *Queries) UpsertAutomationTriggerCatalog(ctx context.Context, arg UpsertAutomationTriggerCatalogParams) error

func (*Queries) UpsertAutomationTriggerOverlay

func (q *Queries) UpsertAutomationTriggerOverlay(ctx context.Context, arg UpsertAutomationTriggerOverlayParams) error

func (*Queries) UpsertDeadEntity

func (q *Queries) UpsertDeadEntity(ctx context.Context, arg UpsertDeadEntityParams) error

func (*Queries) UpsertExtensionEnvBinding

func (q *Queries) UpsertExtensionEnvBinding(ctx context.Context, arg UpsertExtensionEnvBindingParams) error

func (*Queries) UpsertExtensionInput

func (q *Queries) UpsertExtensionInput(ctx context.Context, arg UpsertExtensionInputParams) error

func (*Queries) UpsertForgePullRequest

func (q *Queries) UpsertForgePullRequest(ctx context.Context, arg UpsertForgePullRequestParams) error

func (*Queries) UpsertGatewayEndpointState

func (q *Queries) UpsertGatewayEndpointState(ctx context.Context, arg UpsertGatewayEndpointStateParams) (GatewayEndpointState, error)

func (*Queries) UpsertGatewayIngressBinding

func (q *Queries) UpsertGatewayIngressBinding(ctx context.Context, arg UpsertGatewayIngressBindingParams) (GatewayIngressBinding, error)

func (*Queries) UpsertGatewayProvider

func (q *Queries) UpsertGatewayProvider(ctx context.Context, arg UpsertGatewayProviderParams) error

func (*Queries) UpsertHeartbeatWakeState

func (q *Queries) UpsertHeartbeatWakeState(ctx context.Context, arg UpsertHeartbeatWakeStateParams) error

func (*Queries) UpsertLoopDefinitionSnapshot

func (q *Queries) UpsertLoopDefinitionSnapshot(ctx context.Context, arg UpsertLoopDefinitionSnapshotParams) (int64, error)

func (*Queries) UpsertLoopGateDecision

func (q *Queries) UpsertLoopGateDecision(ctx context.Context, arg UpsertLoopGateDecisionParams) error

func (*Queries) UpsertMCPAuthToken

func (q *Queries) UpsertMCPAuthToken(ctx context.Context, arg UpsertMCPAuthTokenParams) error

func (*Queries) UpsertMCPOAuthRegistration

func (q *Queries) UpsertMCPOAuthRegistration(ctx context.Context, arg UpsertMCPOAuthRegistrationParams) error

func (*Queries) UpsertMarketplaceCatalogStateFresh

func (q *Queries) UpsertMarketplaceCatalogStateFresh(ctx context.Context, arg UpsertMarketplaceCatalogStateFreshParams) error

func (*Queries) UpsertModelCatalogExecutionContext

func (q *Queries) UpsertModelCatalogExecutionContext(ctx context.Context, arg UpsertModelCatalogExecutionContextParams) error

func (*Queries) UpsertModelCatalogSourceStatus

func (q *Queries) UpsertModelCatalogSourceStatus(ctx context.Context, arg UpsertModelCatalogSourceStatusParams) error

func (*Queries) UpsertRunStarvation

func (q *Queries) UpsertRunStarvation(ctx context.Context, arg UpsertRunStarvationParams) error

func (*Queries) UpsertSession

func (q *Queries) UpsertSession(ctx context.Context, arg UpsertSessionParams) (int64, error)

func (*Queries) UpsertSessionHealth

func (q *Queries) UpsertSessionHealth(ctx context.Context, arg UpsertSessionHealthParams) error

func (*Queries) UpsertSessionPlacement

func (q *Queries) UpsertSessionPlacement(ctx context.Context, arg UpsertSessionPlacementParams) error

func (*Queries) UpsertSessionProcessObservation

func (q *Queries) UpsertSessionProcessObservation(ctx context.Context, arg UpsertSessionProcessObservationParams) error

func (*Queries) UpsertTaskBlockRecurrence

func (q *Queries) UpsertTaskBlockRecurrence(ctx context.Context, arg UpsertTaskBlockRecurrenceParams) error

func (*Queries) UpsertTaskDesignationRollup

func (q *Queries) UpsertTaskDesignationRollup(ctx context.Context, arg UpsertTaskDesignationRollupParams) error

func (*Queries) UpsertTaskExecutionProfile

func (q *Queries) UpsertTaskExecutionProfile(ctx context.Context, arg UpsertTaskExecutionProfileParams) error

func (*Queries) UpsertTaskTriageState

func (q *Queries) UpsertTaskTriageState(ctx context.Context, arg UpsertTaskTriageStateParams) error

func (*Queries) UpsertTokenStats

func (q *Queries) UpsertTokenStats(ctx context.Context, arg UpsertTokenStatsParams) error

func (*Queries) UpsertTokenUsageDaily

func (q *Queries) UpsertTokenUsageDaily(ctx context.Context, arg UpsertTokenUsageDailyParams) error

Cost provenance mismatch (keep identical across total_cost/cost_currency/cost_status/cost_source):

token_usage_daily.cost_status != excluded.cost_status
OR token_usage_daily.cost_source != excluded.cost_source
OR COALESCE(token_usage_daily.cost_currency, '') != COALESCE(excluded.cost_currency, '')
OR float64 overflow on the additive total_cost (mirrors token_stats)

On mismatch: total_cost/cost_currency -> NULL, cost_status -> 'unknown', cost_source -> 'none'.

func (*Queries) UpsertToolProcessRecord

func (q *Queries) UpsertToolProcessRecord(ctx context.Context, arg UpsertToolProcessRecordParams) error

func (*Queries) UpsertVaultSecret

func (q *Queries) UpsertVaultSecret(ctx context.Context, arg UpsertVaultSecretParams) error

func (*Queries) UpsertWorkspacePlacement

func (q *Queries) UpsertWorkspacePlacement(ctx context.Context, arg UpsertWorkspacePlacementParams) error

func (*Queries) UpsertWorktreeStatus

func (q *Queries) UpsertWorktreeStatus(ctx context.Context, arg UpsertWorktreeStatusParams) (int64, error)

func (*Queries) ValidateGoalBudgetDecision

func (q *Queries) ValidateGoalBudgetDecision(ctx context.Context, arg ValidateGoalBudgetDecisionParams) (int64, error)

func (*Queries) ValidateGoalPromptTaskRun

func (q *Queries) ValidateGoalPromptTaskRun(ctx context.Context, arg ValidateGoalPromptTaskRunParams) (int64, error)

func (*Queries) ValidateGoalSessionWorkspace

func (q *Queries) ValidateGoalSessionWorkspace(ctx context.Context, arg ValidateGoalSessionWorkspaceParams) (int64, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

func (*Queries) WorkspaceLayoutTargetExists

func (q *Queries) WorkspaceLayoutTargetExists(ctx context.Context, id string) (bool, error)

type ReactivateGoalOriginBindingParams

type ReactivateGoalOriginBindingParams struct {
	AdoptedGeneration         int64          `json:"adopted_generation"`
	AdoptionAttemptID         sql.NullString `json:"adoption_attempt_id"`
	LoopRunID                 string         `json:"loop_run_id"`
	Handle                    string         `json:"handle"`
	ExpectedAdoptedGeneration int64          `json:"expected_adopted_generation"`
}

type ReadGoalSessionProjectionParams

type ReadGoalSessionProjectionParams struct {
	WorkspaceID     string         `json:"workspace_id"`
	OriginSessionID sql.NullString `json:"origin_session_id"`
}

type ReadGoalSessionProjectionRow

type ReadGoalSessionProjectionRow struct {
	ID                    string         `json:"id"`
	Status                string         `json:"status"`
	PauseRequested        int64          `json:"pause_requested"`
	DefinitionDigest      string         `json:"definition_digest"`
	OriginSessionID       sql.NullString `json:"origin_session_id"`
	GoalContextNudgeRatio float64        `json:"goal_context_nudge_ratio"`
	GoalClearedAt         sql.NullTime   `json:"goal_cleared_at"`
	Quarantined           bool           `json:"quarantined"`
}

type ReadSessionBranchesRow

type ReadSessionBranchesRow struct {
	ID     string `json:"id"`
	Branch string `json:"branch"`
}

type RearmLoopApprovalGateParams

type RearmLoopApprovalGateParams struct {
	LoopRunID     string `json:"loop_run_id"`
	Generation    int64  `json:"generation"`
	NodeID        string `json:"node_id"`
	ItemIndex     int64  `json:"item_index"`
	ExpectedEpoch int64  `json:"expected_epoch"`
}

type RebasePreservedSessionInputsParams

type RebasePreservedSessionInputsParams struct {
	Generation         int64  `json:"generation"`
	SessionID          string `json:"session_id"`
	PreviousGeneration int64  `json:"previous_generation"`
}

type ReconcileLoopSessionCleanupParams

type ReconcileLoopSessionCleanupParams struct {
	SettledFailureCode   sql.NullString `json:"settled_failure_code"`
	UnsettledFailureCode sql.NullString `json:"unsettled_failure_code"`
}

type RecordAutomationRunDeliveryErrorParams

type RecordAutomationRunDeliveryErrorParams struct {
	DeliveryError   sql.NullString `json:"delivery_error"`
	DeliveryErrorAt sql.NullString `json:"delivery_error_at"`
	ID              string         `json:"id"`
}

type RecordGoalDriverAttachedParams

type RecordGoalDriverAttachedParams struct {
	SentAt            string         `json:"sent_at"`
	UpdatedAt         string         `json:"updated_at"`
	ID                string         `json:"id"`
	LoopRunID         sql.NullString `json:"loop_run_id"`
	TaskRunID         string         `json:"task_run_id"`
	PromptID          sql.NullString `json:"prompt_id"`
	OwnerKind         sql.NullString `json:"owner_kind"`
	OwnerEpoch        sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch      sql.NullInt64  `json:"binding_epoch"`
	SessionID         string         `json:"session_id"`
	DispatchTokenHash sql.NullString `json:"dispatch_token_hash"`
}

type RecordGoalReportIntentParams

type RecordGoalReportIntentParams struct {
	ReportPromptID     sql.NullString `json:"report_prompt_id"`
	ReportStatus       sql.NullString `json:"report_status"`
	ReportEvidenceRef  sql.NullString `json:"report_evidence_ref"`
	ReportBindingEpoch sql.NullInt64  `json:"report_binding_epoch"`
	ReportActorKind    sql.NullString `json:"report_actor_kind"`
	ReportActorID      sql.NullString `json:"report_actor_id"`
	ReportRecordedAt   string         `json:"report_recorded_at"`
	UpdatedAt          string         `json:"updated_at"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ControlEpoch       int64          `json:"control_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
	PromptID           sql.NullString `json:"prompt_id"`
}

type RecordLoopGenerationOutputRuntimeParams

type RecordLoopGenerationOutputRuntimeParams struct {
	ResolvedRuntimeJson sql.NullString `json:"resolved_runtime_json"`
	LoopRunID           string         `json:"loop_run_id"`
	TargetGeneration    int64          `json:"target_generation"`
	TargetNodeID        string         `json:"target_node_id"`
	TargetItemIndex     int64          `json:"target_item_index"`
	WorkspaceID         string         `json:"workspace_id"`
}

type RecordNotificationCursorErrorParams

type RecordNotificationCursorErrorParams struct {
	ProfileID   string `json:"profile_id"`
	ScopeKind   string `json:"scope_kind"`
	WorkspaceID string `json:"workspace_id"`
	ConsumerID  string `json:"consumer_id"`
	StreamName  string `json:"stream_name"`
	SubjectID   string `json:"subject_id"`
	LastError   string `json:"last_error"`
	UpdatedAt   string `json:"updated_at"`
}

type RecoverGoalQueueTerminalParams

type RecoverGoalQueueTerminalParams struct {
	Status                 string         `json:"status"`
	TerminalEventStartSeq  sql.NullInt64  `json:"terminal_event_start_seq"`
	TerminalEventEndSeq    sql.NullInt64  `json:"terminal_event_end_seq"`
	TerminalKind           sql.NullString `json:"terminal_kind"`
	TerminalStopReason     sql.NullString `json:"terminal_stop_reason"`
	TerminalDisposition    sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode     sql.NullString `json:"terminal_reason_code"`
	TerminalTokensReported int64          `json:"terminal_tokens_reported"`
	TerminalTokensUsed     sql.NullInt64  `json:"terminal_tokens_used"`
	TerminalAt             string         `json:"terminal_at"`
	ID                     string         `json:"id"`
	LoopRunID              sql.NullString `json:"loop_run_id"`
	TaskRunID              string         `json:"task_run_id"`
	PromptID               sql.NullString `json:"prompt_id"`
	OwnerKind              sql.NullString `json:"owner_kind"`
	OwnerEpoch             sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch           sql.NullInt64  `json:"binding_epoch"`
	SessionID              string         `json:"session_id"`
	DispatchTokenHash      sql.NullString `json:"dispatch_token_hash"`
}

type RecoverTaskRunByMarkRunningParams

type RecoverTaskRunByMarkRunningParams struct {
	StartedAt              sql.NullString `json:"started_at"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type RecoverTaskRunByRequeueParams

type RecoverTaskRunByRequeueParams struct {
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type RegisterMarketplaceSourceParams

type RegisterMarketplaceSourceParams struct {
	Source         string `json:"source"`
	SourceRef      string `json:"source_ref"`
	ConfigRevision string `json:"config_revision"`
	KindOfSource   string `json:"kind_of_source"`
	Enabled        int64  `json:"enabled"`
	Generation     int64  `json:"generation"`
}

type RejectPreparedGoalQueueRowParams

type RejectPreparedGoalQueueRowParams struct {
	TerminalReasonCode sql.NullString `json:"terminal_reason_code"`
	TerminalAt         string         `json:"terminal_at"`
	FailedAt           string         `json:"failed_at"`
	FailureSummary     string         `json:"failure_summary"`
	UpdatedAt          string         `json:"updated_at"`
	ID                 string         `json:"id"`
	LoopRunID          sql.NullString `json:"loop_run_id"`
	PromptID           sql.NullString `json:"prompt_id"`
	TaskRunID          string         `json:"task_run_id"`
	OwnerEpoch         sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
}

type ReleaseSessionInputParams

type ReleaseSessionInputParams struct {
	QueuedStatus      string `json:"queued_status"`
	UpdatedAt         string `json:"updated_at"`
	ID                string `json:"id"`
	SessionID         string `json:"session_id"`
	DispatchingStatus string `json:"dispatching_status"`
}

type ReleaseTaskRunTerminalCommandParams

type ReleaseTaskRunTerminalCommandParams struct {
	CommandID     string `json:"command_id"`
	RunID         string `json:"run_id"`
	TaskID        string `json:"task_id"`
	WorkspaceID   string `json:"workspace_id"`
	ExpectedPhase string `json:"expected_phase"`
}

type RemoveMissingWorktreeParams

type RemoveMissingWorktreeParams struct {
	UpdatedAt   string `json:"updated_at"`
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type RenameAppTokenParams

type RenameAppTokenParams struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type RenameGatewayDeviceForActorParams

type RenameGatewayDeviceForActorParams struct {
	Name       string `json:"name"`
	TargetID   string `json:"target_id"`
	ActorID    string `json:"actor_id"`
	ActorEpoch int64  `json:"actor_epoch"`
}

type RenameGatewayDeviceParams

type RenameGatewayDeviceParams struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type RenameSessionFolderParams

type RenameSessionFolderParams struct {
	Name        string `json:"name"`
	Now         string `json:"now"`
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type RenameWorkspaceFolderParams

type RenameWorkspaceFolderParams struct {
	Name      string `json:"name"`
	Now       string `json:"now"`
	ID        string `json:"id"`
	ProfileID string `json:"profile_id"`
}

type ReplyWatchMessageInputsParams

type ReplyWatchMessageInputsParams struct {
	SessionID string `json:"session_id"`
	MessageID string `json:"message_id"`
}

type ReplyWatchSenderExistsParams

type ReplyWatchSenderExistsParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type RequeueExpiredTaskRunLeaseParams

type RequeueExpiredTaskRunLeaseParams struct {
	QueuedStatus      string         `json:"queued_status"`
	RecoveryIncrement int64          `json:"recovery_increment"`
	ID                string         `json:"id"`
	PreviousStatus    string         `json:"previous_status"`
	SessionID         sql.NullString `json:"session_id"`
	ClaimTokenHash    sql.NullString `json:"claim_token_hash"`
	LeaseUntil        sql.NullString `json:"lease_until"`
}

type RequeueTaskRunLeaseParams

type RequeueTaskRunLeaseParams struct {
	Status string `json:"status"`
	ID     string `json:"id"`
}

type ReserveSessionSteerParams

type ReserveSessionSteerParams struct {
	Now       sql.NullString `json:"now"`
	SessionID string         `json:"session_id"`
	ID        string         `json:"id"`
}

type ReserveSubagentParams

type ReserveSubagentParams struct {
	Isolation              string         `json:"isolation"`
	ID                     string         `json:"id"`
	WorkspaceID            string         `json:"workspace_id"`
	ParentSessionID        string         `json:"parent_session_id"`
	ParentTurnID           string         `json:"parent_turn_id"`
	ParentToolCallID       string         `json:"parent_tool_call_id"`
	ChildSessionID         sql.NullString `json:"child_session_id"`
	Origin                 string         `json:"origin"`
	ProviderToolCallID     string         `json:"provider_tool_call_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	RequestFingerprint     string         `json:"request_fingerprint"`
	Title                  string         `json:"title"`
	Role                   string         `json:"role"`
	TaskChars              int64          `json:"task_chars"`
	PendingTask            sql.NullString `json:"pending_task"`
	RuntimeAgent           string         `json:"runtime_agent"`
	RuntimeProvider        string         `json:"runtime_provider"`
	RuntimeModel           string         `json:"runtime_model"`
	RuntimeReasoningEffort string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed           string         `json:"runtime_speed"`
	Depth                  int64          `json:"depth"`
	Status                 string         `json:"status"`
	WorkState              string         `json:"work_state"`
	Progress               string         `json:"progress"`
	Result                 sql.NullString `json:"result"`
	ResultTruncated        int64          `json:"result_truncated"`
	Error                  sql.NullString `json:"error"`
	WakePolicy             string         `json:"wake_policy"`
	Delivery               string         `json:"delivery"`
	WakeMessageID          sql.NullString `json:"wake_message_id"`
	AcknowledgedTurnID     string         `json:"acknowledged_turn_id"`
	StartedAt              sql.NullString `json:"started_at"`
	SettledAt              sql.NullString `json:"settled_at"`
	CreatedAt              string         `json:"created_at"`
	UpdatedAt              string         `json:"updated_at"`
}

type ResetGoalRecoveryAfterBindingActivationParams

type ResetGoalRecoveryAfterBindingActivationParams struct {
	UpdatedAt    string `json:"updated_at"`
	LoopRunID    string `json:"loop_run_id"`
	Generation   int64  `json:"generation"`
	NodeID       string `json:"node_id"`
	ItemIndex    int64  `json:"item_index"`
	ControlEpoch int64  `json:"control_epoch"`
}

type ResetNotificationCursorParams

type ResetNotificationCursorParams struct {
	ProfileID       string         `json:"profile_id"`
	ScopeKind       string         `json:"scope_kind"`
	WorkspaceID     string         `json:"workspace_id"`
	ConsumerID      string         `json:"consumer_id"`
	StreamName      string         `json:"stream_name"`
	SubjectID       string         `json:"subject_id"`
	LastSequence    int64          `json:"last_sequence"`
	LastDeliveryID  string         `json:"last_delivery_id"`
	LastDeliveredAt sql.NullString `json:"last_delivered_at"`
	UpdatedAt       string         `json:"updated_at"`
}

type ResolveActiveGoalOriginAliasesParams

type ResolveActiveGoalOriginAliasesParams struct {
	WorkspaceID string `json:"workspace_id"`
	SessionID   string `json:"session_id"`
}

type ResolveAutomationSuggestionParams

type ResolveAutomationSuggestionParams struct {
	Status      string         `json:"status"`
	ResolvedAt  sql.NullString `json:"resolved_at"`
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	ID          string         `json:"id"`
}

type ResolvePendingToolApprovalParams

type ResolvePendingToolApprovalParams struct {
	ApprovalStatus string        `json:"approval_status"`
	ResolvedAt     sql.NullInt64 `json:"resolved_at"`
	ApprovalID     string        `json:"approval_id"`
}

type ResolveSessionSteerAdmissionParams

type ResolveSessionSteerAdmissionParams struct {
	Now           sql.NullString `json:"now"`
	SteerDelivery any            `json:"steer_delivery"`
	TargetTurnID  any            `json:"target_turn_id"`
	Delivery      string         `json:"delivery"`
	ID            string         `json:"id"`
	SessionID     string         `json:"session_id"`
}

type ResolveSessionSteerParams

type ResolveSessionSteerParams struct {
	Status        string         `json:"status"`
	SteerDelivery sql.NullString `json:"steer_delivery"`
	SentAt        sql.NullString `json:"sent_at"`
	Now           string         `json:"now"`
	SessionID     string         `json:"session_id"`
	ID            string         `json:"id"`
}

type ResourceRecord

type ResourceRecord struct {
	Kind       string         `json:"kind"`
	ID         string         `json:"id"`
	Version    int64          `json:"version"`
	ScopeKind  string         `json:"scope_kind"`
	ScopeID    sql.NullString `json:"scope_id"`
	OwnerKind  string         `json:"owner_kind"`
	OwnerID    string         `json:"owner_id"`
	SourceKind string         `json:"source_kind"`
	SourceID   string         `json:"source_id"`
	SpecJson   string         `json:"spec_json"`
	CreatedAt  string         `json:"created_at"`
	UpdatedAt  string         `json:"updated_at"`
}

type ResourceSourceState

type ResourceSourceState struct {
	SourceKind          string `json:"source_kind"`
	SourceID            string `json:"source_id"`
	SessionNonce        string `json:"session_nonce"`
	LastSnapshotVersion int64  `json:"last_snapshot_version"`
	UpdatedAt           string `json:"updated_at"`
}

type RestoreUnstartedAutomationReservationParams

type RestoreUnstartedAutomationReservationParams struct {
	RunID  string         `json:"run_id"`
	JobID  sql.NullString `json:"job_id"`
	FireID sql.NullString `json:"fire_id"`
}

type ResumeTaskParams

type ResumeTaskParams struct {
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type RetainRevokedGoalTerminalParams

type RetainRevokedGoalTerminalParams struct {
	EventStartSeq     sql.NullInt64  `json:"event_start_seq"`
	EventEndSeq       sql.NullInt64  `json:"event_end_seq"`
	StopReason        sql.NullString `json:"stop_reason"`
	TokensReported    int64          `json:"tokens_reported"`
	TokensUsed        sql.NullInt64  `json:"tokens_used"`
	UpdatedAt         string         `json:"updated_at"`
	ID                string         `json:"id"`
	DispatchTokenHash sql.NullString `json:"dispatch_token_hash"`
}

type RetireGoalBindingParams

type RetireGoalBindingParams struct {
	State        string `json:"state"`
	ClosedAt     string `json:"closed_at"`
	LoopRunID    string `json:"loop_run_id"`
	Handle       string `json:"handle"`
	BindingEpoch int64  `json:"binding_epoch"`
}

type RevertPromotedAgentSessionInputParams

type RevertPromotedAgentSessionInputParams struct {
	Now       string `json:"now"`
	SessionID string `json:"session_id"`
	ID        string `json:"id"`
}

type RevokeAppTokenParams

type RevokeAppTokenParams struct {
	RevokedAt sql.NullString `json:"revoked_at"`
	ID        string         `json:"id"`
}

type RevokeApprovalGrantParams

type RevokeApprovalGrantParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	ID          string `json:"id"`
}

type RevokeGatewayDeviceForActorParams

type RevokeGatewayDeviceForActorParams struct {
	RevokedAt  sql.NullString `json:"revoked_at"`
	TargetID   string         `json:"target_id"`
	ActorID    string         `json:"actor_id"`
	ActorEpoch int64          `json:"actor_epoch"`
}

type RevokeGatewayDeviceParams

type RevokeGatewayDeviceParams struct {
	RevokedAt sql.NullString `json:"revoked_at"`
	ID        string         `json:"id"`
}

type RewriteSubagentWakeInputParams

type RewriteSubagentWakeInputParams struct {
	Text     string `json:"text"`
	Metadata any    `json:"metadata"`
	Now      string `json:"now"`
	InputID  string `json:"input_id"`
	ParentID string `json:"parent_id"`
}

type RollbackAutomationSuggestionAcceptanceParams

type RollbackAutomationSuggestionAcceptanceParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID sql.NullString `json:"workspace_id"`
	ID          string         `json:"id"`
	ResolvedAt  sql.NullString `json:"resolved_at"`
}

type SaveAttentionSnapshotParams

type SaveAttentionSnapshotParams struct {
	ID            string `json:"id"`
	ProfileID     string `json:"profile_id"`
	ActorKind     string `json:"actor_kind"`
	ActorID       string `json:"actor_id"`
	Population    string `json:"population"`
	OccurrenceIds string `json:"occurrence_ids"`
	ExpiresAt     string `json:"expires_at"`
}

type SaveSessionBranchParams

type SaveSessionBranchParams struct {
	Branch      string `json:"branch"`
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type SchedulerPause

type SchedulerPause struct {
	ID        int64          `json:"id"`
	Paused    int64          `json:"paused"`
	PausedBy  string         `json:"paused_by"`
	PausedAt  sql.NullString `json:"paused_at"`
	Reason    string         `json:"reason"`
	UpdatedAt string         `json:"updated_at"`
}

type Session

type Session struct {
	Branch                   string         `json:"branch"`
	EffectiveWorkspaceAccess string         `json:"effective_workspace_access"`
	ID                       string         `json:"id"`
	ProfileID                string         `json:"profile_id"`
	Name                     sql.NullString `json:"name"`
	AgentName                string         `json:"agent_name"`
	Provider                 string         `json:"provider"`
	Model                    string         `json:"model"`
	ReasoningEffort          string         `json:"reasoning_effort"`
	Speed                    string         `json:"speed"`
	AcpOptionsJson           string         `json:"acp_options_json"`
	SpeedResolutionJson      string         `json:"speed_resolution_json"`
	RuntimeStatus            string         `json:"runtime_status"`
	RuntimeTransition        string         `json:"runtime_transition"`
	RuntimeFailure           string         `json:"runtime_failure"`
	RuntimeGeneration        int64          `json:"runtime_generation"`
	RuntimeRecoveryJson      string         `json:"runtime_recovery_json"`
	SelectedProvider         string         `json:"selected_provider"`
	SelectedModel            string         `json:"selected_model"`
	SelectedReasoningEffort  string         `json:"selected_reasoning_effort"`
	SelectedSpeed            string         `json:"selected_speed"`
	SelectedAcpOptionsJson   string         `json:"selected_acp_options_json"`
	RuntimeSelectionRevision int64          `json:"runtime_selection_revision"`
	WorkspaceID              string         `json:"workspace_id"`
	Scope                    string         `json:"scope"`
	WorktreeID               sql.NullString `json:"worktree_id"`
	SessionType              string         `json:"session_type"`
	State                    string         `json:"state"`
	ArchivedAt               sql.NullString `json:"archived_at"`
	AcpSessionID             sql.NullString `json:"acp_session_id"`
	StopReason               sql.NullString `json:"stop_reason"`
	StopEscalated            bool           `json:"stop_escalated"`
	StopVerificationFailed   bool           `json:"stop_verification_failed"`
	StopDetail               sql.NullString `json:"stop_detail"`
	SubprocessPid            int64          `json:"subprocess_pid"`
	SubprocessStartedAt      sql.NullString `json:"subprocess_started_at"`
	LastUpdateAt             sql.NullString `json:"last_update_at"`
	StallState               string         `json:"stall_state"`
	StallReason              string         `json:"stall_reason"`
	ActivityJson             string         `json:"activity_json"`
	AttachedTo               string         `json:"attached_to"`
	AttachExpiresAt          sql.NullString `json:"attach_expires_at"`
	TranscriptEpoch          int64          `json:"transcript_epoch"`
	PendingPermissionCount   int64          `json:"pending_permission_count"`
	PendingClarifyCount      int64          `json:"pending_clarify_count"`
	AttentionRevision        int64          `json:"attention_revision"`
	LastSettledRevision      int64          `json:"last_settled_revision"`
	LastSeenRevision         int64          `json:"last_seen_revision"`
	LastSeenAt               sql.NullString `json:"last_seen_at"`
	AttentionChangedAt       sql.NullString `json:"attention_changed_at"`
	CreatedAt                string         `json:"created_at"`
	UpdatedAt                string         `json:"updated_at"`
	FailureKind              sql.NullString `json:"failure_kind"`
	FailureSummary           string         `json:"failure_summary"`
	CrashBundlePath          string         `json:"crash_bundle_path"`
	ParentSessionID          sql.NullString `json:"parent_session_id"`
	RootSessionID            sql.NullString `json:"root_session_id"`
	SpawnDepth               int64          `json:"spawn_depth"`
	SpawnRole                sql.NullString `json:"spawn_role"`
	TtlExpiresAt             sql.NullString `json:"ttl_expires_at"`
	AutoStopOnParent         bool           `json:"auto_stop_on_parent"`
	NotifyCreator            bool           `json:"notify_creator"`
	SpawnBudgetJson          string         `json:"spawn_budget_json"`
	PermissionPolicyJson     string         `json:"permission_policy_json"`
	SoulSnapshotID           sql.NullString `json:"soul_snapshot_id"`
	SoulDigest               string         `json:"soul_digest"`
	ParentSoulDigest         string         `json:"parent_soul_digest"`
	InputGeneration          int64          `json:"input_generation"`
	CreationDigest           sql.NullString `json:"creation_digest"`
	PolicySpecDigest         sql.NullString `json:"policy_spec_digest"`
	CreationProfileRef       sql.NullString `json:"creation_profile_ref"`
	LineageKind              string         `json:"lineage_kind"`
	OriginMessageID          sql.NullString `json:"origin_message_id"`
	OriginAgentName          string         `json:"origin_agent_name"`
}

type SessionCreationProfile

type SessionCreationProfile struct {
	ProfileRef  string `json:"profile_ref"`
	ProfileJson string `json:"profile_json"`
	CreatedAt   string `json:"created_at"`
}

type SessionDerivation

type SessionDerivation struct {
	WorkspaceID        string         `json:"workspace_id"`
	IdempotencyKey     string         `json:"idempotency_key"`
	ProfileID          string         `json:"profile_id"`
	RequestFingerprint string         `json:"request_fingerprint"`
	SourceSessionID    string         `json:"source_session_id"`
	ChildSessionID     string         `json:"child_session_id"`
	Kind               string         `json:"kind"`
	OutcomeJson        string         `json:"outcome_json"`
	CreatedAt          string         `json:"created_at"`
	ChildDeletedAt     sql.NullString `json:"child_deleted_at"`
}

type SessionFolder

type SessionFolder struct {
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	Name        string `json:"name"`
	Position    int64  `json:"position"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

type SessionHealth

type SessionHealth struct {
	SessionID           string         `json:"session_id"`
	WorkspaceID         string         `json:"workspace_id"`
	AgentName           string         `json:"agent_name"`
	State               string         `json:"state"`
	Health              string         `json:"health"`
	ActivePrompt        bool           `json:"active_prompt"`
	Attachable          bool           `json:"attachable"`
	EligibleForWake     bool           `json:"eligible_for_wake"`
	IneligibilityReason sql.NullString `json:"ineligibility_reason"`
	LastActivityAt      sql.NullString `json:"last_activity_at"`
	LastPresenceAt      sql.NullString `json:"last_presence_at"`
	LastError           sql.NullString `json:"last_error"`
	UpdatedAt           string         `json:"updated_at"`
}

type SessionInputClearTrace

type SessionInputClearTrace struct {
	EntryID         string         `json:"entry_id"`
	SessionID       string         `json:"session_id"`
	TurnID          string         `json:"turn_id"`
	ActorKind       string         `json:"actor_kind"`
	ActorID         string         `json:"actor_id"`
	QueueGeneration int64          `json:"queue_generation"`
	CreatedAt       string         `json:"created_at"`
	ProjectedAt     sql.NullString `json:"projected_at"`
}

type SessionInputQueue

type SessionInputQueue struct {
	GoalInputBatchMaxRowid   sql.NullInt64  `json:"goal_input_batch_max_rowid"`
	ID                       string         `json:"id"`
	SessionID                string         `json:"session_id"`
	PromptAdmissionID        sql.NullString `json:"prompt_admission_id"`
	MessageID                string         `json:"message_id"`
	IdempotencyKey           string         `json:"idempotency_key"`
	TurnID                   string         `json:"turn_id"`
	TargetTurnID             string         `json:"target_turn_id"`
	EventID                  string         `json:"event_id"`
	Status                   string         `json:"status"`
	Mode                     string         `json:"mode"`
	Delivery                 string         `json:"delivery"`
	SteerDelivery            sql.NullString `json:"steer_delivery"`
	Text                     string         `json:"text"`
	SyntheticPromptJson      sql.NullString `json:"synthetic_prompt_json"`
	SkillInvocationsJson     string         `json:"skill_invocations_json"`
	AttachmentsJson          string         `json:"attachments_json"`
	OriginJson               sql.NullString `json:"origin_json"`
	RuntimeProvider          string         `json:"runtime_provider"`
	RuntimeModel             string         `json:"runtime_model"`
	RuntimeReasoningEffort   string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed             string         `json:"runtime_speed"`
	RuntimeAcpOptionsJson    string         `json:"runtime_acp_options_json"`
	SessionGeneration        int64          `json:"session_generation"`
	TaskRunID                string         `json:"task_run_id"`
	RunGeneration            sql.NullInt64  `json:"run_generation"`
	AttemptCount             int64          `json:"attempt_count"`
	EnqueuedAt               string         `json:"enqueued_at"`
	DispatchStartedAt        sql.NullString `json:"dispatch_started_at"`
	SentAt                   sql.NullString `json:"sent_at"`
	FailedAt                 sql.NullString `json:"failed_at"`
	FailureSummary           string         `json:"failure_summary"`
	CanceledAt               sql.NullString `json:"canceled_at"`
	UpdatedAt                string         `json:"updated_at"`
	LoopRunID                sql.NullString `json:"loop_run_id"`
	OwnerKind                sql.NullString `json:"owner_kind"`
	OwnerEpoch               sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch             sql.NullInt64  `json:"binding_epoch"`
	PromptID                 sql.NullString `json:"prompt_id"`
	PromptKind               sql.NullString `json:"prompt_kind"`
	OperationUsageBaseTokens sql.NullInt64  `json:"operation_usage_base_tokens"`
	PromptAttempt            int64          `json:"prompt_attempt"`
	Dispatchable             int64          `json:"dispatchable"`
	ActivatedAt              sql.NullTime   `json:"activated_at"`
	DispatchTokenHash        sql.NullString `json:"dispatch_token_hash"`
	FenceKind                sql.NullString `json:"fence_kind"`
	FenceDisposition         sql.NullString `json:"fence_disposition"`
	FenceReasonCode          sql.NullString `json:"fence_reason_code"`
	FencedAt                 sql.NullTime   `json:"fenced_at"`
	TerminalEventStartSeq    sql.NullInt64  `json:"terminal_event_start_seq"`
	TerminalEventEndSeq      sql.NullInt64  `json:"terminal_event_end_seq"`
	TerminalKind             sql.NullString `json:"terminal_kind"`
	TerminalStopReason       sql.NullString `json:"terminal_stop_reason"`
	TerminalDisposition      sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode       sql.NullString `json:"terminal_reason_code"`
	TerminalTokensReported   int64          `json:"terminal_tokens_reported"`
	TerminalTokensUsed       sql.NullInt64  `json:"terminal_tokens_used"`
	TerminalAt               sql.NullTime   `json:"terminal_at"`
	Priority                 int64          `json:"priority"`
	OriginClass              string         `json:"origin_class"`
	OriginSessionID          string         `json:"origin_session_id"`
	MentionsJson             string         `json:"mentions_json"`
	HumanIngress             int64          `json:"human_ingress"`
}

type SessionMessageRateWindowParams

type SessionMessageRateWindowParams struct {
	WorkspaceID     string `json:"workspace_id"`
	SessionID       string `json:"session_id"`
	Since           string `json:"since"`
	SenderSessionID string `json:"sender_session_id"`
}

type SessionMessageRateWindowRow

type SessionMessageRateWindowRow struct {
	MessageCount    int64  `json:"message_count"`
	OldestCreatedAt string `json:"oldest_created_at"`
}

type SessionPendingInteraction

type SessionPendingInteraction struct {
	InteractionID     string         `json:"interaction_id"`
	SessionID         string         `json:"session_id"`
	Kind              string         `json:"kind"`
	ProviderRequestID string         `json:"provider_request_id"`
	TurnID            string         `json:"turn_id"`
	Title             string         `json:"title"`
	PayloadJson       string         `json:"payload_json"`
	Status            string         `json:"status"`
	CreatedAt         string         `json:"created_at"`
	ResolvedAt        sql.NullString `json:"resolved_at"`
	Resolution        string         `json:"resolution"`
	ResolvedBy        string         `json:"resolved_by"`
}

type SessionPlacement

type SessionPlacement struct {
	SessionID   string         `json:"session_id"`
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
	Position    int64          `json:"position"`
	UpdatedAt   string         `json:"updated_at"`
}

type SessionProcessObservation

type SessionProcessObservation struct {
	Pid             int64  `json:"pid"`
	StartedAt       string `json:"started_at"`
	KernelToken     string `json:"kernel_token"`
	SessionID       string `json:"session_id"`
	WorkspaceID     string `json:"workspace_id"`
	ProfileID       string `json:"profile_id"`
	SessionName     string `json:"session_name"`
	Pgid            int64  `json:"pgid"`
	FirstSeen       string `json:"first_seen"`
	GroupObservedAt string `json:"group_observed_at"`
	Attribution     string `json:"attribution"`
}

type SessionPromptAdmission

type SessionPromptAdmission struct {
	ID                     string         `json:"id"`
	WorkspaceID            string         `json:"workspace_id"`
	SessionID              string         `json:"session_id"`
	MessageID              string         `json:"message_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	Operation              string         `json:"operation"`
	FingerprintVersion     string         `json:"fingerprint_version"`
	RequestFingerprint     string         `json:"request_fingerprint"`
	State                  string         `json:"state"`
	Mode                   string         `json:"mode"`
	AuthoredText           string         `json:"authored_text"`
	SkillInvocationsJson   string         `json:"skill_invocations_json"`
	AttachmentsJson        string         `json:"attachments_json"`
	OriginJson             sql.NullString `json:"origin_json"`
	RuntimeProvider        string         `json:"runtime_provider"`
	RuntimeModel           string         `json:"runtime_model"`
	RuntimeReasoningEffort string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed           string         `json:"runtime_speed"`
	RuntimeAcpOptionsJson  string         `json:"runtime_acp_options_json"`
	TurnID                 string         `json:"turn_id"`
	EventID                string         `json:"event_id"`
	ResultJson             sql.NullString `json:"result_json"`
	IndeterminateReason    string         `json:"indeterminate_reason"`
	CreatedAt              string         `json:"created_at"`
	DispatchCommittedAt    sql.NullString `json:"dispatch_committed_at"`
	CompletedAt            sql.NullString `json:"completed_at"`
	UpdatedAt              string         `json:"updated_at"`
	MentionsJson           string         `json:"mentions_json"`
	HumanIngress           int64          `json:"human_ingress"`
}

type SessionPromptReplyWatch

type SessionPromptReplyWatch struct {
	ID                string         `json:"id"`
	WorkspaceID       string         `json:"workspace_id"`
	SenderSessionID   string         `json:"sender_session_id"`
	TargetWorkspaceID string         `json:"target_workspace_id"`
	TargetSessionID   string         `json:"target_session_id"`
	MessageID         string         `json:"message_id"`
	AdmissionID       string         `json:"admission_id"`
	TurnID            sql.NullString `json:"turn_id"`
	QueueEntryID      sql.NullString `json:"queue_entry_id"`
	DeliveredInputID  sql.NullString `json:"delivered_input_id"`
	AbandonReason     sql.NullString `json:"abandon_reason"`
	Hop               int64          `json:"hop"`
	State             string         `json:"state"`
	Outcome           sql.NullString `json:"outcome"`
	ReplyText         sql.NullString `json:"reply_text"`
	ReplyTruncated    int64          `json:"reply_truncated"`
	CreatedAt         string         `json:"created_at"`
	FiredAt           sql.NullString `json:"fired_at"`
	DeliveredAt       sql.NullString `json:"delivered_at"`
}

type SessionSubagent

type SessionSubagent struct {
	ID                     string         `json:"id"`
	WorkspaceID            string         `json:"workspace_id"`
	ParentSessionID        string         `json:"parent_session_id"`
	ParentTurnID           string         `json:"parent_turn_id"`
	ParentToolCallID       string         `json:"parent_tool_call_id"`
	ChildSessionID         sql.NullString `json:"child_session_id"`
	Origin                 string         `json:"origin"`
	ProviderToolCallID     string         `json:"provider_tool_call_id"`
	IdempotencyKey         string         `json:"idempotency_key"`
	RequestFingerprint     string         `json:"request_fingerprint"`
	Title                  string         `json:"title"`
	Role                   string         `json:"role"`
	TaskChars              int64          `json:"task_chars"`
	PendingTask            sql.NullString `json:"pending_task"`
	RuntimeAgent           string         `json:"runtime_agent"`
	RuntimeProvider        string         `json:"runtime_provider"`
	RuntimeModel           string         `json:"runtime_model"`
	RuntimeReasoningEffort string         `json:"runtime_reasoning_effort"`
	RuntimeSpeed           string         `json:"runtime_speed"`
	Depth                  int64          `json:"depth"`
	Status                 string         `json:"status"`
	WorkState              string         `json:"work_state"`
	Progress               string         `json:"progress"`
	Result                 sql.NullString `json:"result"`
	ResultTruncated        int64          `json:"result_truncated"`
	Error                  sql.NullString `json:"error"`
	WakePolicy             string         `json:"wake_policy"`
	Delivery               string         `json:"delivery"`
	WakeMessageID          sql.NullString `json:"wake_message_id"`
	AcknowledgedTurnID     string         `json:"acknowledged_turn_id"`
	StartedAt              sql.NullString `json:"started_at"`
	SettledAt              sql.NullString `json:"settled_at"`
	CreatedAt              string         `json:"created_at"`
	UpdatedAt              string         `json:"updated_at"`
	Isolation              string         `json:"isolation"`
	WorktreeID             sql.NullString `json:"worktree_id"`
	WorktreeName           sql.NullString `json:"worktree_name"`
	WorktreeBranch         sql.NullString `json:"worktree_branch"`
	WorktreeBaseRef        sql.NullString `json:"worktree_base_ref"`
	WorktreePath           sql.NullString `json:"worktree_path"`
	WorktreeBaseSha        sql.NullString `json:"worktree_base_sha"`
	WorktreeCleanup        sql.NullString `json:"worktree_cleanup"`
	GitHeadSha             sql.NullString `json:"git_head_sha"`
	GitCommitsAhead        sql.NullInt64  `json:"git_commits_ahead"`
	GitDirtyFiles          sql.NullInt64  `json:"git_dirty_files"`
	GitObservedAt          sql.NullString `json:"git_observed_at"`
	PrStatus               sql.NullString `json:"pr_status"`
	PrUrl                  sql.NullString `json:"pr_url"`
	PrNumber               sql.NullInt64  `json:"pr_number"`
	ChildActivity          string         `json:"child_activity"`
}

type SessionSubagentWake

type SessionSubagentWake struct {
	WakeMessageID   string `json:"wake_message_id"`
	WorkspaceID     string `json:"workspace_id"`
	ParentSessionID string `json:"parent_session_id"`
	State           string `json:"state"`
	Route           string `json:"route"`
	InputEntryID    string `json:"input_entry_id"`
	SteerRequeued   int64  `json:"steer_requeued"`
	Attempts        int64  `json:"attempts"`
	CreatedAt       string `json:"created_at"`
	UpdatedAt       string `json:"updated_at"`
}

type SetAutomationScheduledDeferralParams

type SetAutomationScheduledDeferralParams struct {
	RetryAt      sql.NullString `json:"retry_at"`
	UpdatedAt    string         `json:"updated_at"`
	JobID        string         `json:"job_id"`
	FireID       string         `json:"fire_id"`
	ScheduleHash string         `json:"schedule_hash"`
}

type SetLoopRunPauseStateParams

type SetLoopRunPauseStateParams struct {
	Requested     int64          `json:"requested"`
	ActorKind     sql.NullString `json:"actor_kind"`
	ActorID       sql.NullString `json:"actor_id"`
	RequestedAt   sql.NullTime   `json:"requested_at"`
	WorkspaceID   string         `json:"workspace_id"`
	ID            string         `json:"id"`
	ExpectedPause int64          `json:"expected_pause"`
}

type SetMarketplaceSourceConfigurationRow

type SetMarketplaceSourceConfigurationRow struct {
	Generation int64  `json:"generation"`
	Revision   string `json:"revision"`
}

type SetSchedulerPausedParams

type SetSchedulerPausedParams struct {
	PausedBy  string         `json:"paused_by"`
	PausedAt  sql.NullString `json:"paused_at"`
	Reason    string         `json:"reason"`
	UpdatedAt string         `json:"updated_at"`
}

type SetSessionCreationIdentityParams

type SetSessionCreationIdentityParams struct {
	CreationProfileRef sql.NullString `json:"creation_profile_ref"`
	PolicySpecDigest   sql.NullString `json:"policy_spec_digest"`
	CreationDigest     sql.NullString `json:"creation_digest"`
	ID                 string         `json:"id"`
}

type SetSessionFolderPositionParams

type SetSessionFolderPositionParams struct {
	Position    int64  `json:"position"`
	Now         string `json:"now"`
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type SetSubagentFamilyArchivedParams

type SetSubagentFamilyArchivedParams struct {
	ArchivedAt  sql.NullString `json:"archived_at"`
	Now         string         `json:"now"`
	WorkspaceID string         `json:"workspace_id"`
	Ids         any            `json:"ids"`
}

type SetSubagentWakeInputParams

type SetSubagentWakeInputParams struct {
	Route         string `json:"route"`
	InputEntryID  string `json:"input_entry_id"`
	UpdatedAt     string `json:"updated_at"`
	WakeMessageID string `json:"wake_message_id"`
}

type SetSubagentWorktreeCleanupParams

type SetSubagentWorktreeCleanupParams struct {
	WorktreeCleanup sql.NullString `json:"worktree_cleanup"`
	ID              string         `json:"id"`
}

type SetSubagentWorktreeFactsParams

type SetSubagentWorktreeFactsParams struct {
	GitHeadSha      sql.NullString `json:"git_head_sha"`
	GitCommitsAhead sql.NullInt64  `json:"git_commits_ahead"`
	GitDirtyFiles   sql.NullInt64  `json:"git_dirty_files"`
	GitObservedAt   sql.NullString `json:"git_observed_at"`
	PrStatus        sql.NullString `json:"pr_status"`
	PrUrl           sql.NullString `json:"pr_url"`
	PrNumber        sql.NullInt64  `json:"pr_number"`
	ID              string         `json:"id"`
}

type SetSubagentsPendingParams

type SetSubagentsPendingParams struct {
	UpdatedAt string `json:"updated_at"`
	Ids       any    `json:"ids"`
}

type SetTaskCurrentRunProjectionParams

type SetTaskCurrentRunProjectionParams struct {
	RunID  sql.NullString `json:"run_id"`
	TaskID string         `json:"task_id"`
}

type SetTaskWakeCreatorParams

type SetTaskWakeCreatorParams struct {
	WakeCreator int64  `json:"wake_creator"`
	UpdatedAt   string `json:"updated_at"`
	ID          string `json:"id"`
}

type SetWorkspaceArchivedParams

type SetWorkspaceArchivedParams struct {
	ArchivedAt sql.NullString `json:"archived_at"`
	UpdatedAt  string         `json:"updated_at"`
	ID         string         `json:"id"`
}

type SetWorkspaceFolderPositionParams

type SetWorkspaceFolderPositionParams struct {
	Position  int64  `json:"position"`
	Now       string `json:"now"`
	ID        string `json:"id"`
	ProfileID string `json:"profile_id"`
}

type SetWorktreeStateParams

type SetWorktreeStateParams struct {
	State       string `json:"state"`
	UpdatedAt   string `json:"updated_at"`
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
}

type SettleGoalCompactionCheckpointParams

type SettleGoalCompactionCheckpointParams struct {
	ContextState               string         `json:"context_state"`
	UsageSequence              sql.NullInt64  `json:"usage_sequence"`
	UsagePendingAfterSequence  sql.NullInt64  `json:"usage_pending_after_sequence"`
	CompactionBaselineUsed     sql.NullInt64  `json:"compaction_baseline_used"`
	CompactionRecoveryRequired int64          `json:"compaction_recovery_required"`
	RecoveryStreak             int64          `json:"recovery_streak"`
	ConsumeGrant               any            `json:"consume_grant"`
	UpdatedAt                  string         `json:"updated_at"`
	LoopRunID                  string         `json:"loop_run_id"`
	Generation                 int64          `json:"generation"`
	NodeID                     string         `json:"node_id"`
	ItemIndex                  int64          `json:"item_index"`
	ControlEpoch               int64          `json:"control_epoch"`
	BindingEpoch               sql.NullInt64  `json:"binding_epoch"`
	TaskRunID                  sql.NullString `json:"task_run_id"`
	QueueEntryID               sql.NullString `json:"queue_entry_id"`
	PromptID                   sql.NullString `json:"prompt_id"`
}

type SettleGoalTurnParams

type SettleGoalTurnParams struct {
	ResultStatus   sql.NullString `json:"result_status"`
	StopReason     sql.NullString `json:"stop_reason"`
	ReasonCode     sql.NullString `json:"reason_code"`
	VerdictOutcome sql.NullString `json:"verdict_outcome"`
	BlockingJson   string         `json:"blocking_json"`
	CriteriaJson   string         `json:"criteria_json"`
	WarningsJson   string         `json:"warnings_json"`
	EvidenceRef    sql.NullString `json:"evidence_ref"`
	TokensUsed     sql.NullInt64  `json:"tokens_used"`
	EndedAt        string         `json:"ended_at"`
	LoopRunID      string         `json:"loop_run_id"`
	Generation     int64          `json:"generation"`
	NodeID         string         `json:"node_id"`
	ItemIndex      int64          `json:"item_index"`
	PromptID       string         `json:"prompt_id"`
}

type SettlePendingSessionSteerParams

type SettlePendingSessionSteerParams struct {
	SteerDelivery  sql.NullString `json:"steer_delivery"`
	Now            string         `json:"now"`
	FallbackTurnID string         `json:"fallback_turn_id"`
	SessionID      string         `json:"session_id"`
	ID             string         `json:"id"`
}

type SettleStoppedGoalBindingBeforeActivationParams

type SettleStoppedGoalBindingBeforeActivationParams struct {
	SettledFailureCode   sql.NullString `json:"settled_failure_code"`
	LoopRunID            string         `json:"loop_run_id"`
	Handle               string         `json:"handle"`
	BindingEpoch         int64          `json:"binding_epoch"`
	UnsettledFailureCode sql.NullString `json:"unsettled_failure_code"`
}

type SettleStoppedGoalBindingCreationForSessionParams

type SettleStoppedGoalBindingCreationForSessionParams struct {
	SettledFailureCode   sql.NullString `json:"settled_failure_code"`
	LoopRunID            string         `json:"loop_run_id"`
	Handle               string         `json:"handle"`
	BindingEpoch         int64          `json:"binding_epoch"`
	SessionID            string         `json:"session_id"`
	UnsettledFailureCode sql.NullString `json:"unsettled_failure_code"`
}

type SettleSubagentWakeParams

type SettleSubagentWakeParams struct {
	State         string `json:"state"`
	UpdatedAt     string `json:"updated_at"`
	WakeMessageID string `json:"wake_message_id"`
}

type SettleSubagentWakeRowsParams

type SettleSubagentWakeRowsParams struct {
	Delivery string `json:"delivery"`
	WakeID   string `json:"wake_id"`
	Now      string `json:"now"`
}

type ShiftSessionFoldersParams

type ShiftSessionFoldersParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
}

type SkillExposure

type SkillExposure struct {
	ID           int64          `json:"id"`
	SkillName    string         `json:"skill_name"`
	CanonicalDir string         `json:"canonical_dir"`
	TargetSlug   string         `json:"target_slug"`
	LinkPath     string         `json:"link_path"`
	LinkTarget   string         `json:"link_target"`
	OwnerScope   string         `json:"owner_scope"`
	WorkspaceID  sql.NullString `json:"workspace_id"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type StartGoalCompactionCheckpointParams

type StartGoalCompactionCheckpointParams struct {
	UpdatedAt    string         `json:"updated_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	TaskRunID    sql.NullString `json:"task_run_id"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	PromptID     sql.NullString `json:"prompt_id"`
}

type StartGoalWorkCheckpointParams

type StartGoalWorkCheckpointParams struct {
	TurnsUsed    int64          `json:"turns_used"`
	UpdatedAt    string         `json:"updated_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	TaskRunID    sql.NullString `json:"task_run_id"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	PromptID     sql.NullString `json:"prompt_id"`
}

type SubagentSummariesRow

type SubagentSummariesRow struct {
	ParentSessionID string          `json:"parent_session_id"`
	Total           int64           `json:"total"`
	Live            sql.NullFloat64 `json:"live"`
	Failed          sql.NullFloat64 `json:"failed"`
	Resumed         sql.NullFloat64 `json:"resumed"`
	Attention       sql.NullFloat64 `json:"attention"`
}

type SweepHeartbeatWakeEventsParams

type SweepHeartbeatWakeEventsParams struct {
	Cutoff   string `json:"cutoff"`
	RowLimit int64  `json:"row_limit"`
}

type Task

type Task struct {
	GrantCeiling          string         `json:"grant_ceiling"`
	ID                    string         `json:"id"`
	ProfileID             string         `json:"profile_id"`
	Identifier            sql.NullString `json:"identifier"`
	Scope                 string         `json:"scope"`
	WorkspaceID           sql.NullString `json:"workspace_id"`
	ParentTaskID          sql.NullString `json:"parent_task_id"`
	Title                 string         `json:"title"`
	Description           sql.NullString `json:"description"`
	Priority              string         `json:"priority"`
	MaxAttempts           int64          `json:"max_attempts"`
	Status                string         `json:"status"`
	ApprovalPolicy        string         `json:"approval_policy"`
	ApprovalState         string         `json:"approval_state"`
	OwnerKind             sql.NullString `json:"owner_kind"`
	OwnerRef              sql.NullString `json:"owner_ref"`
	CreatedByKind         string         `json:"created_by_kind"`
	CreatedByRef          string         `json:"created_by_ref"`
	OriginKind            string         `json:"origin_kind"`
	OriginRef             string         `json:"origin_ref"`
	CreatedAt             string         `json:"created_at"`
	UpdatedAt             string         `json:"updated_at"`
	ClosedAt              sql.NullString `json:"closed_at"`
	MetadataJson          sql.NullString `json:"metadata_json"`
	CurrentRunID          sql.NullString `json:"current_run_id"`
	Paused                int64          `json:"paused"`
	PausedBy              string         `json:"paused_by"`
	PausedAt              sql.NullString `json:"paused_at"`
	PausedReason          string         `json:"paused_reason"`
	MaxRuntimeSeconds     int64          `json:"max_runtime_seconds"`
	SpawnFailureCount     int64          `json:"spawn_failure_count"`
	LastSpawnError        string         `json:"last_spawn_error"`
	ReviewPolicy          string         `json:"review_policy"`
	ReviewMaxRounds       int64          `json:"review_max_rounds"`
	ReviewRound           int64          `json:"review_round"`
	LastReviewID          sql.NullString `json:"last_review_id"`
	LastReviewOutcome     sql.NullString `json:"last_review_outcome"`
	ReviewCircuitOpenedAt sql.NullString `json:"review_circuit_opened_at"`
	ReviewCircuitReason   sql.NullString `json:"review_circuit_reason"`
	AutoEnqueueOnReady    int64          `json:"auto_enqueue_on_ready"`
	NeedsAttentionReason  sql.NullString `json:"needs_attention_reason"`
	NeedsAttentionAt      sql.NullString `json:"needs_attention_at"`
	NeedsAttentionByKind  sql.NullString `json:"needs_attention_by_kind"`
	NeedsAttentionByRef   sql.NullString `json:"needs_attention_by_ref"`
	WakeCreator           int64          `json:"wake_creator"`
}

type TaskBlock

type TaskBlock struct {
	ID            string         `json:"id"`
	WorkspaceID   sql.NullString `json:"workspace_id"`
	TaskID        string         `json:"task_id"`
	Kind          string         `json:"kind"`
	Reason        string         `json:"reason"`
	DetailsJson   sql.NullString `json:"details_json"`
	CreatedByKind string         `json:"created_by_kind"`
	CreatedByRef  string         `json:"created_by_ref"`
	CreatedAt     string         `json:"created_at"`
	ExpiresAt     sql.NullString `json:"expires_at"`
	ClearedAt     sql.NullString `json:"cleared_at"`
	ClearedByKind sql.NullString `json:"cleared_by_kind"`
	ClearedByRef  sql.NullString `json:"cleared_by_ref"`
	ClearNote     sql.NullString `json:"clear_note"`
}

type TaskBlockRecurrence

type TaskBlockRecurrence struct {
	TaskID    string `json:"task_id"`
	Kind      string `json:"kind"`
	Count     int64  `json:"count"`
	UpdatedAt string `json:"updated_at"`
}

type TaskDependency

type TaskDependency struct {
	TaskID          string `json:"task_id"`
	DependsOnTaskID string `json:"depends_on_task_id"`
	Kind            string `json:"kind"`
	CreatedAt       string `json:"created_at"`
}

type TaskDependencyExistsParams

type TaskDependencyExistsParams struct {
	TaskID          string `json:"task_id"`
	DependsOnTaskID string `json:"depends_on_task_id"`
	Kind            string `json:"kind"`
}

type TaskDesignationRollup

type TaskDesignationRollup struct {
	DesignationGroupID string `json:"designation_group_id"`
	TaskID             string `json:"task_id"`
	SummaryJson        string `json:"summary_json"`
	CreatedAt          string `json:"created_at"`
}

type TaskEvent

type TaskEvent struct {
	ID          string         `json:"id"`
	EventSeq    int64          `json:"event_seq"`
	TaskID      string         `json:"task_id"`
	RunID       sql.NullString `json:"run_id"`
	EventType   string         `json:"event_type"`
	ActorKind   string         `json:"actor_kind"`
	ActorID     string         `json:"actor_id"`
	OriginKind  string         `json:"origin_kind"`
	OriginRef   string         `json:"origin_ref"`
	PayloadJson sql.NullString `json:"payload_json"`
	Timestamp   string         `json:"timestamp"`
}

type TaskExecutionProfile

type TaskExecutionProfile struct {
	TaskID                string `json:"task_id"`
	CoordinatorMode       string `json:"coordinator_mode"`
	CoordinatorAgentName  string `json:"coordinator_agent_name"`
	CoordinatorProvider   string `json:"coordinator_provider"`
	CoordinatorModel      string `json:"coordinator_model"`
	CoordinatorGuidance   string `json:"coordinator_guidance"`
	WorkerMode            string `json:"worker_mode"`
	WorkerAgentName       string `json:"worker_agent_name"`
	WorkerProvider        string `json:"worker_provider"`
	WorkerModel           string `json:"worker_model"`
	WorkerReasoningEffort string `json:"worker_reasoning_effort"`
	WorkerSpeed           string `json:"worker_speed"`
	WorkerAcpOptionsJson  string `json:"worker_acp_options_json"`
	ReviewAgentName       string `json:"review_agent_name"`
	ReviewProvider        string `json:"review_provider"`
	ReviewModel           string `json:"review_model"`
	ReviewReasoningEffort string `json:"review_reasoning_effort"`
	ReviewSpeed           string `json:"review_speed"`
	ReviewAcpOptionsJson  string `json:"review_acp_options_json"`
	WorktreeMode          string `json:"worktree_mode"`
	WorktreeRef           string `json:"worktree_ref"`
	CreatedAt             string `json:"created_at"`
	UpdatedAt             string `json:"updated_at"`
	RuntimeMode           string `json:"runtime_mode"`
}

type TaskProfileAgent

type TaskProfileAgent struct {
	TaskID     string `json:"task_id"`
	Role       string `json:"role"`
	Preference string `json:"preference"`
	AgentName  string `json:"agent_name"`
}

type TaskProfileCapability

type TaskProfileCapability struct {
	TaskID       string `json:"task_id"`
	Role         string `json:"role"`
	Preference   string `json:"preference"`
	CapabilityID string `json:"capability_id"`
}

type TaskRun

type TaskRun struct {
	ID                      string         `json:"id"`
	TaskID                  string         `json:"task_id"`
	WorkspaceID             sql.NullString `json:"workspace_id"`
	WorktreeID              sql.NullString `json:"worktree_id"`
	Status                  string         `json:"status"`
	Attempt                 int64          `json:"attempt"`
	RecoveryCount           int64          `json:"recovery_count"`
	PreviousRunID           sql.NullString `json:"previous_run_id"`
	FailureKind             string         `json:"failure_kind"`
	ClaimedByKind           sql.NullString `json:"claimed_by_kind"`
	ClaimedByRef            sql.NullString `json:"claimed_by_ref"`
	SessionID               sql.NullString `json:"session_id"`
	OriginKind              string         `json:"origin_kind"`
	OriginRef               string         `json:"origin_ref"`
	IdempotencyKey          sql.NullString `json:"idempotency_key"`
	DesignationGroupID      string         `json:"designation_group_id"`
	ResolvedWorktreeMode    string         `json:"resolved_worktree_mode"`
	ResolvedWorktreeRef     string         `json:"resolved_worktree_ref"`
	QueuedAt                string         `json:"queued_at"`
	ClaimedAt               sql.NullString `json:"claimed_at"`
	StartedAt               sql.NullString `json:"started_at"`
	EndedAt                 sql.NullString `json:"ended_at"`
	Error                   sql.NullString `json:"error"`
	MetadataJson            sql.NullString `json:"metadata_json"`
	ResultJson              sql.NullString `json:"result_json"`
	Summary                 string         `json:"summary"`
	ClaimedAgentName        string         `json:"claimed_agent_name"`
	TerminalizedBySessionID string         `json:"terminalized_by_session_id"`
	TerminalizedByAgentName string         `json:"terminalized_by_agent_name"`
	TerminalizedByActorKind string         `json:"terminalized_by_actor_kind"`
	TerminalizedByActorRef  string         `json:"terminalized_by_actor_ref"`
	ReviewRequired          bool           `json:"review_required"`
	ReviewRequestRound      int64          `json:"review_request_round"`
	ReviewPolicySnapshot    string         `json:"review_policy_snapshot"`
	ReviewRequestID         sql.NullString `json:"review_request_id"`
	ParentRunID             sql.NullString `json:"parent_run_id"`
	ReviewID                sql.NullString `json:"review_id"`
	ReviewRound             int64          `json:"review_round"`
	ContinuationReason      string         `json:"continuation_reason"`
	MissingWorkJson         string         `json:"missing_work_json"`
	NextRoundGuidance       string         `json:"next_round_guidance"`
	ClaimToken              sql.NullString `json:"claim_token"`
	ClaimTokenHash          sql.NullString `json:"claim_token_hash"`
	LeaseUntil              sql.NullString `json:"lease_until"`
	HeartbeatAt             sql.NullString `json:"heartbeat_at"`
	RunKind                 string         `json:"run_kind"`
	LoopRunID               sql.NullString `json:"loop_run_id"`
	TokensUsed              int64          `json:"tokens_used"`
}

type TaskRunIdempotency

type TaskRunIdempotency struct {
	IdempotencyKey string `json:"idempotency_key"`
	OriginKind     string `json:"origin_kind"`
	OriginRef      string `json:"origin_ref"`
	RunID          string `json:"run_id"`
	CreatedAt      string `json:"created_at"`
}

type TaskRunPreferredCapability

type TaskRunPreferredCapability struct {
	RunID        string `json:"run_id"`
	CapabilityID string `json:"capability_id"`
}

type TaskRunRequiredCapability

type TaskRunRequiredCapability struct {
	RunID        string `json:"run_id"`
	CapabilityID string `json:"capability_id"`
}

type TaskRunReview

type TaskRunReview struct {
	ReviewID          string          `json:"review_id"`
	TaskID            string          `json:"task_id"`
	RunID             string          `json:"run_id"`
	ParentReviewID    sql.NullString  `json:"parent_review_id"`
	Policy            string          `json:"policy"`
	ReviewRound       int64           `json:"review_round"`
	Attempt           int64           `json:"attempt"`
	Status            string          `json:"status"`
	Outcome           sql.NullString  `json:"outcome"`
	Confidence        sql.NullFloat64 `json:"confidence"`
	Reason            string          `json:"reason"`
	DeliveryID        sql.NullString  `json:"delivery_id"`
	MissingWorkJson   string          `json:"missing_work_json"`
	NextRoundGuidance string          `json:"next_round_guidance"`
	ReviewText        string          `json:"review_text"`
	ReviewerSessionID sql.NullString  `json:"reviewer_session_id"`
	ReviewerAgentName string          `json:"reviewer_agent_name"`
	ReviewedByKind    string          `json:"reviewed_by_kind"`
	ReviewedByRef     string          `json:"reviewed_by_ref"`
	RequestedAt       string          `json:"requested_at"`
	RoutedAt          sql.NullString  `json:"routed_at"`
	StartedAt         sql.NullString  `json:"started_at"`
	ReviewedAt        sql.NullString  `json:"reviewed_at"`
	DeadlineAt        sql.NullString  `json:"deadline_at"`
	CreatedAt         string          `json:"created_at"`
	UpdatedAt         string          `json:"updated_at"`
}

type TaskRunStarvation

type TaskRunStarvation struct {
	RunID            string         `json:"run_id"`
	WakeCount        int64          `json:"wake_count"`
	FirstStarvedAt   string         `json:"first_starved_at"`
	LastWakeAt       sql.NullString `json:"last_wake_at"`
	EscalationTier   int64          `json:"escalation_tier"`
	SpawnRequestedAt sql.NullString `json:"spawn_requested_at"`
	StarvedEventAt   sql.NullString `json:"starved_event_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type TaskRunTerminalCommand

type TaskRunTerminalCommand struct {
	CommandID            string         `json:"command_id"`
	RunID                string         `json:"run_id"`
	TaskID               string         `json:"task_id"`
	WorkspaceID          string         `json:"workspace_id"`
	Kind                 string         `json:"kind"`
	Phase                string         `json:"phase"`
	SourceStatus         string         `json:"source_status"`
	SourceSessionID      string         `json:"source_session_id"`
	SourceClaimTokenHash string         `json:"source_claim_token_hash"`
	SourceLeaseUntil     sql.NullString `json:"source_lease_until"`
	IntentJson           string         `json:"intent_json"`
	ActorJson            string         `json:"actor_json"`
	CommandAt            string         `json:"command_at"`
	AdmittedAt           string         `json:"admitted_at"`
	UpdatedAt            string         `json:"updated_at"`
}

type TaskTriageState

type TaskTriageState struct {
	TaskID             string         `json:"task_id"`
	ActorKind          string         `json:"actor_kind"`
	ActorID            string         `json:"actor_id"`
	IsRead             bool           `json:"is_read"`
	Archived           bool           `json:"archived"`
	Dismissed          bool           `json:"dismissed"`
	LastSeenActivityAt sql.NullString `json:"last_seen_activity_at"`
	UpdatedAt          string         `json:"updated_at"`
}

type TaskWakeEventExistsParams

type TaskWakeEventExistsParams struct {
	TaskID      string         `json:"task_id"`
	WakeEventID sql.NullString `json:"wake_event_id"`
}

type TerminalizeClaimedGoalRevocationParams

type TerminalizeClaimedGoalRevocationParams struct {
	TerminalReasonCode sql.NullString `json:"terminal_reason_code"`
	TerminalAt         string         `json:"terminal_at"`
	FailedAt           string         `json:"failed_at"`
	FailureSummary     string         `json:"failure_summary"`
	UpdatedAt          string         `json:"updated_at"`
	ID                 string         `json:"id"`
	LoopRunID          sql.NullString `json:"loop_run_id"`
	TaskRunID          string         `json:"task_run_id"`
	PromptID           sql.NullString `json:"prompt_id"`
	OwnerKind          sql.NullString `json:"owner_kind"`
	OwnerEpoch         sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
}

type TerminalizePreparedGoalRevocationParams

type TerminalizePreparedGoalRevocationParams struct {
	TerminalDisposition sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode  sql.NullString `json:"terminal_reason_code"`
	TerminalAt          string         `json:"terminal_at"`
	CanceledAt          string         `json:"canceled_at"`
	UpdatedAt           string         `json:"updated_at"`
	ID                  string         `json:"id"`
	LoopRunID           sql.NullString `json:"loop_run_id"`
	TaskRunID           string         `json:"task_run_id"`
	PromptID            sql.NullString `json:"prompt_id"`
	OwnerKind           sql.NullString `json:"owner_kind"`
	OwnerEpoch          sql.NullInt64  `json:"owner_epoch"`
	BindingEpoch        sql.NullInt64  `json:"binding_epoch"`
}

type TerminalizeRevokedGoalTurnParams

type TerminalizeRevokedGoalTurnParams struct {
	ResultStatus sql.NullString `json:"result_status"`
	StopReason   sql.NullString `json:"stop_reason"`
	ReasonCode   sql.NullString `json:"reason_code"`
	TokensUsed   sql.NullInt64  `json:"tokens_used"`
	EndedAt      string         `json:"ended_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	PromptID     string         `json:"prompt_id"`
	BindingEpoch int64          `json:"binding_epoch"`
}

type TerminalizeStoppedGoalCheckpointParams

type TerminalizeStoppedGoalCheckpointParams struct {
	ControlCause       sql.NullString `json:"control_cause"`
	ControlActorKind   sql.NullString `json:"control_actor_kind"`
	ControlActorID     sql.NullString `json:"control_actor_id"`
	ControlRequestedAt string         `json:"control_requested_at"`
	UpdatedAt          string         `json:"updated_at"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ControlEpoch       int64          `json:"control_epoch"`
	ExpectedPhase      string         `json:"expected_phase"`
}

type TokenStat

type TokenStat struct {
	CacheReadTokens  sql.NullInt64   `json:"cache_read_tokens"`
	CacheWriteTokens sql.NullInt64   `json:"cache_write_tokens"`
	ID               string          `json:"id"`
	SessionID        string          `json:"session_id"`
	AgentName        string          `json:"agent_name"`
	InputTokens      sql.NullInt64   `json:"input_tokens"`
	OutputTokens     sql.NullInt64   `json:"output_tokens"`
	TotalTokens      sql.NullInt64   `json:"total_tokens"`
	TotalCost        sql.NullFloat64 `json:"total_cost"`
	CostCurrency     sql.NullString  `json:"cost_currency"`
	CostStatus       string          `json:"cost_status"`
	CostSource       string          `json:"cost_source"`
	TurnCount        int64           `json:"turn_count"`
	UpdatedAt        string          `json:"updated_at"`
}

type TokenUsageDaily

type TokenUsageDaily struct {
	Day          string          `json:"day"`
	ProfileID    string          `json:"profile_id"`
	WorkspaceID  string          `json:"workspace_id"`
	AgentName    string          `json:"agent_name"`
	InputTokens  int64           `json:"input_tokens"`
	OutputTokens int64           `json:"output_tokens"`
	TotalTokens  int64           `json:"total_tokens"`
	TotalCost    sql.NullFloat64 `json:"total_cost"`
	CostCurrency sql.NullString  `json:"cost_currency"`
	CostStatus   string          `json:"cost_status"`
	CostSource   string          `json:"cost_source"`
	TurnCount    int64           `json:"turn_count"`
	UpdatedAt    string          `json:"updated_at"`
}

type TombstoneBoundRunMaterializationParams

type TombstoneBoundRunMaterializationParams struct {
	UpdatedAt   string `json:"updated_at"`
	WorkspaceID string `json:"workspace_id"`
	WorktreeID  string `json:"worktree_id"`
	RunID       string `json:"run_id"`
}

type ToolApprovalGrant

type ToolApprovalGrant struct {
	ID          string `json:"id"`
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	AgentName   string `json:"agent_name"`
	ToolID      string `json:"tool_id"`
	InputDigest string `json:"input_digest"`
	Decision    string `json:"decision"`
	CreatedAt   string `json:"created_at"`
	LastUsedAt  string `json:"last_used_at"`
}

type ToolApprovalPending

type ToolApprovalPending struct {
	ApprovalID      string         `json:"approval_id"`
	ProfileID       string         `json:"profile_id"`
	WorkspaceID     sql.NullString `json:"workspace_id"`
	InvocationID    string         `json:"invocation_id"`
	TargetKind      string         `json:"target_kind"`
	ToolID          sql.NullString `json:"tool_id"`
	TargetJson      string         `json:"target_json"`
	CommandID       sql.NullString `json:"command_id"`
	ArgsJson        string         `json:"args_json"`
	ApprovalStatus  string         `json:"approval_status"`
	ExecutionStatus sql.NullString `json:"execution_status"`
	ResultJson      sql.NullString `json:"result_json"`
	ErrorJson       sql.NullString `json:"error_json"`
	RequestedAt     int64          `json:"requested_at"`
	ExpiresAt       int64          `json:"expires_at"`
	ResolvedAt      sql.NullInt64  `json:"resolved_at"`
	ExecutedAt      sql.NullInt64  `json:"executed_at"`
	ResumeFence     int64          `json:"resume_fence"`
}

type ToolProcess

type ToolProcess struct {
	ID             string         `json:"id"`
	Source         string         `json:"source"`
	SessionID      string         `json:"session_id"`
	TurnID         string         `json:"turn_id"`
	ToolCallID     string         `json:"tool_call_id"`
	TerminalID     string         `json:"terminal_id"`
	ExtensionName  string         `json:"extension_name"`
	HookName       string         `json:"hook_name"`
	Pid            int64          `json:"pid"`
	ProcessGroupID int64          `json:"process_group_id"`
	Command        string         `json:"command"`
	ArgsJson       string         `json:"args_json"`
	Cwd            string         `json:"cwd"`
	StartedAt      sql.NullString `json:"started_at"`
	StartedByPid   int64          `json:"started_by_pid"`
	State          string         `json:"state"`
	ExitCode       sql.NullInt64  `json:"exit_code"`
	Error          string         `json:"error"`
	CreatedAt      string         `json:"created_at"`
	UpdatedAt      string         `json:"updated_at"`
	CompletedAt    sql.NullString `json:"completed_at"`
}

type TouchAppTokenLastSeenParams

type TouchAppTokenLastSeenParams struct {
	LastSeenAt  sql.NullString `json:"last_seen_at"`
	ID          string         `json:"id"`
	RevokeEpoch int64          `json:"revoke_epoch"`
}

type TransitionGatewayProviderActivationParams

type TransitionGatewayProviderActivationParams struct {
	ProviderName       string `json:"provider_name"`
	Tier               string `json:"tier"`
	DesiredState       string `json:"desired_state"`
	ExpectedGeneration int64  `json:"expected_generation"`
}

type TransitionGatewaySurfaceExposureParams

type TransitionGatewaySurfaceExposureParams struct {
	Surface            string         `json:"surface"`
	Tier               string         `json:"tier"`
	DesiredState       string         `json:"desired_state"`
	ExpectedGeneration int64          `json:"expected_generation"`
	ConsentedAt        sql.NullString `json:"consented_at"`
}

type TransitionLoopCoordinatorBoundaryParams

type TransitionLoopCoordinatorBoundaryParams struct {
	ToStatus            string `json:"to_status"`
	Generation          int64  `json:"generation"`
	NeedsApprovalStatus string `json:"needs_approval_status"`
	CompletionPartial   any    `json:"completion_partial"`
	CompletedAt         string `json:"completed_at"`
	ID                  string `json:"id"`
	FromStatus          string `json:"from_status"`
}

type TransitionTaskRunRunningParams

type TransitionTaskRunRunningParams struct {
	StartedAt              sql.NullString `json:"started_at"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type TransitionTaskRunStartingParams

type TransitionTaskRunStartingParams struct {
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type TransitionTerminalTaskRunParams

type TransitionTerminalTaskRunParams struct {
	Status                 string         `json:"status"`
	EndedAt                sql.NullString `json:"ended_at"`
	Error                  sql.NullString `json:"error"`
	ResultJson             sql.NullString `json:"result_json"`
	ID                     string         `json:"id"`
	ExpectedTaskID         sql.NullString `json:"expected_task_id"`
	ExpectedWorkspaceID    sql.NullString `json:"expected_workspace_id"`
	ExpectedStatus         string         `json:"expected_status"`
	ExpectedSessionID      sql.NullString `json:"expected_session_id"`
	ExpectedClaimTokenHash sql.NullString `json:"expected_claim_token_hash"`
	ExpectedLeaseUntil     sql.NullString `json:"expected_lease_until"`
}

type UpdateAutomationJobParams

type UpdateAutomationJobParams struct {
	Operator         bool           `json:"operator"`
	GrantCeiling     string         `json:"grant_ceiling"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Schedule         sql.NullString `json:"schedule"`
	Task             sql.NullString `json:"task"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	UpdatedAt        string         `json:"updated_at"`
	ID               string         `json:"id"`
}

type UpdateAutomationRunParams

type UpdateAutomationRunParams struct {
	JobID           sql.NullString `json:"job_id"`
	TriggerID       sql.NullString `json:"trigger_id"`
	SessionID       sql.NullString `json:"session_id"`
	TaskID          sql.NullString `json:"task_id"`
	TaskRunID       sql.NullString `json:"task_run_id"`
	FireID          sql.NullString `json:"fire_id"`
	Status          string         `json:"status"`
	Attempt         int64          `json:"attempt"`
	ScheduledAt     sql.NullString `json:"scheduled_at"`
	StartedAt       sql.NullString `json:"started_at"`
	EndedAt         sql.NullString `json:"ended_at"`
	Error           sql.NullString `json:"error"`
	DeliveryError   sql.NullString `json:"delivery_error"`
	DeliveryErrorAt sql.NullString `json:"delivery_error_at"`
	LoopRunID       sql.NullString `json:"loop_run_id"`
	MetadataJson    string         `json:"metadata_json"`
	ID              string         `json:"id"`
}

type UpdateAutomationTriggerParams

type UpdateAutomationTriggerParams struct {
	Operator         bool           `json:"operator"`
	GrantCeiling     string         `json:"grant_ceiling"`
	Scope            string         `json:"scope"`
	Name             string         `json:"name"`
	AgentName        string         `json:"agent_name"`
	WorkspaceID      sql.NullString `json:"workspace_id"`
	Prompt           string         `json:"prompt"`
	Event            string         `json:"event"`
	Filter           sql.NullString `json:"filter"`
	Enabled          bool           `json:"enabled"`
	Retry            string         `json:"retry"`
	FireLimit        string         `json:"fire_limit"`
	Source           string         `json:"source"`
	WebhookID        sql.NullString `json:"webhook_id"`
	EndpointSlug     sql.NullString `json:"endpoint_slug"`
	WebhookSecretRef sql.NullString `json:"webhook_secret_ref"`
	TargetKind       string         `json:"target_kind"`
	LoopWorkspaceID  sql.NullString `json:"loop_workspace_id"`
	LoopName         sql.NullString `json:"loop_name"`
	LoopInputs       sql.NullString `json:"loop_inputs"`
	LoopInputMapping sql.NullString `json:"loop_input_mapping"`
	UpdatedAt        string         `json:"updated_at"`
	ID               string         `json:"id"`
}

type UpdateExtensionMCPOverrideParams

type UpdateExtensionMCPOverrideParams struct {
	EnvJson     string `json:"env_json"`
	HeadersJson string `json:"headers_json"`
	Url         string `json:"url"`
	UpdatedAt   string `json:"updated_at"`
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	Server      string `json:"server"`
}

type UpdateGatewayProviderObservedParams

type UpdateGatewayProviderObservedParams struct {
	ObservedState      string         `json:"observed_state"`
	LastHealthAt       sql.NullString `json:"last_health_at"`
	LastError          sql.NullString `json:"last_error"`
	ProviderName       string         `json:"provider_name"`
	Tier               string         `json:"tier"`
	ExpectedGeneration int64          `json:"expected_generation"`
}

type UpdateGatewaySurfaceObservedParams

type UpdateGatewaySurfaceObservedParams struct {
	ObservedState      string `json:"observed_state"`
	Surface            string `json:"surface"`
	Tier               string `json:"tier"`
	ExpectedGeneration int64  `json:"expected_generation"`
}

type UpdateGoalCheckpointAfterTurnParams

type UpdateGoalCheckpointAfterTurnParams struct {
	Phase              string         `json:"phase"`
	GoalStatus         string         `json:"goal_status"`
	ControlCause       sql.NullString `json:"control_cause"`
	BrokenStreak       int64          `json:"broken_streak"`
	RecoveryStreak     int64          `json:"recovery_streak"`
	ControlActorKind   sql.NullString `json:"control_actor_kind"`
	ControlActorID     sql.NullString `json:"control_actor_id"`
	ControlRequestedAt sql.NullString `json:"control_requested_at"`
	ConsumeGrant       any            `json:"consume_grant"`
	UpdatedAt          string         `json:"updated_at"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ControlEpoch       int64          `json:"control_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
	TaskRunID          sql.NullString `json:"task_run_id"`
	QueueEntryID       sql.NullString `json:"queue_entry_id"`
	PromptID           sql.NullString `json:"prompt_id"`
}

type UpdateGoalCheckpointControlParams

type UpdateGoalCheckpointControlParams struct {
	Phase              string         `json:"phase"`
	GoalStatus         string         `json:"goal_status"`
	ControlCause       sql.NullString `json:"control_cause"`
	ControlActorKind   sql.NullString `json:"control_actor_kind"`
	ControlActorID     sql.NullString `json:"control_actor_id"`
	ControlRequestedAt string         `json:"control_requested_at"`
	UpdatedAt          string         `json:"updated_at"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ControlEpoch       int64          `json:"control_epoch"`
	BindingEpoch       sql.NullInt64  `json:"binding_epoch"`
	ExpectedPhase      string         `json:"expected_phase"`
	TaskRunID          sql.NullString `json:"task_run_id"`
	QueueEntryID       sql.NullString `json:"queue_entry_id"`
	PromptID           sql.NullString `json:"prompt_id"`
}

type UpdateGoalCheckpointForReentryParams

type UpdateGoalCheckpointForReentryParams struct {
	NextControlEpoch     int64          `json:"next_control_epoch"`
	Phase                string         `json:"phase"`
	TurnLimit            int64          `json:"turn_limit"`
	SuccessorTaskRunID   sql.NullString `json:"successor_task_run_id"`
	ClearOperation       any            `json:"clear_operation"`
	ControlGrantID       int64          `json:"control_grant_id"`
	ControlGrantKind     sql.NullString `json:"control_grant_kind"`
	ControlGrantCause    sql.NullString `json:"control_grant_cause"`
	ControlGrantTurn     sql.NullInt64  `json:"control_grant_turn"`
	ControlGrantScope    sql.NullString `json:"control_grant_scope"`
	ControlGrantConsumed int64          `json:"control_grant_consumed"`
	UpdatedAt            string         `json:"updated_at"`
	LoopRunID            string         `json:"loop_run_id"`
	Generation           int64          `json:"generation"`
	NodeID               string         `json:"node_id"`
	ItemIndex            int64          `json:"item_index"`
	ExpectedControlEpoch int64          `json:"expected_control_epoch"`
	ExpectedTaskRunID    sql.NullString `json:"expected_task_run_id"`
}

type UpdateGoalContextUsageParams

type UpdateGoalContextUsageParams struct {
	ContextState               string         `json:"context_state"`
	UsageSequence              sql.NullInt64  `json:"usage_sequence"`
	UsagePendingAfterSequence  sql.NullInt64  `json:"usage_pending_after_sequence"`
	CompactionBaselineUsed     sql.NullInt64  `json:"compaction_baseline_used"`
	CompactionRecoveryRequired int64          `json:"compaction_recovery_required"`
	RecoveryStreak             int64          `json:"recovery_streak"`
	UpdatedAt                  string         `json:"updated_at"`
	LoopRunID                  string         `json:"loop_run_id"`
	Generation                 int64          `json:"generation"`
	NodeID                     string         `json:"node_id"`
	ItemIndex                  int64          `json:"item_index"`
	ControlEpoch               int64          `json:"control_epoch"`
	BindingEpoch               sql.NullInt64  `json:"binding_epoch"`
	Phase                      string         `json:"phase"`
	SessionID                  sql.NullString `json:"session_id"`
	BindingHandle              sql.NullString `json:"binding_handle"`
}

type UpdateGoalOutputForReentryParams

type UpdateGoalOutputForReentryParams struct {
	SuccessorTaskRunID sql.NullString `json:"successor_task_run_id"`
	GoalTurnsUsed      sql.NullInt64  `json:"goal_turns_used"`
	GoalTurnLimit      sql.NullInt64  `json:"goal_turn_limit"`
	LoopRunID          string         `json:"loop_run_id"`
	Generation         int64          `json:"generation"`
	NodeID             string         `json:"node_id"`
	ItemIndex          int64          `json:"item_index"`
	ExpectedStatus     string         `json:"expected_status"`
	ExpectedTaskRunID  sql.NullString `json:"expected_task_run_id"`
}

type UpdateGoalPromptOwnerForReentryParams

type UpdateGoalPromptOwnerForReentryParams struct {
	SuccessorTaskRunID string         `json:"successor_task_run_id"`
	NextOwnerEpoch     sql.NullInt64  `json:"next_owner_epoch"`
	ClearControlFence  any            `json:"clear_control_fence"`
	UpdatedAt          string         `json:"updated_at"`
	ID                 string         `json:"id"`
	LoopRunID          sql.NullString `json:"loop_run_id"`
	PromptID           sql.NullString `json:"prompt_id"`
	ExpectedOwnerEpoch sql.NullInt64  `json:"expected_owner_epoch"`
	ExpectedTaskRunID  string         `json:"expected_task_run_id"`
}

type UpdateLoopProvenanceParams

type UpdateLoopProvenanceParams struct {
	Metadata         sql.NullString `json:"metadata"`
	ID               string         `json:"id"`
	PreviousMetadata sql.NullString `json:"previous_metadata"`
}

type UpdateLoopRunBestParams

type UpdateLoopRunBestParams struct {
	BestGeneration sql.NullInt64   `json:"best_generation"`
	BestScore      sql.NullFloat64 `json:"best_score"`
	LoopRunID      string          `json:"loop_run_id"`
	WorkspaceID    string          `json:"workspace_id"`
}

type UpdateLoopRunGenerationParams

type UpdateLoopRunGenerationParams struct {
	Generation int64  `json:"generation"`
	ID         string `json:"id"`
}

type UpdateLoopRunGrantCeilingParams

type UpdateLoopRunGrantCeilingParams struct {
	Operator bool   `json:"operator"`
	Ceiling  string `json:"ceiling"`
	ID       string `json:"id"`
}

type UpdateLoopRunNodeTerminalParams

type UpdateLoopRunNodeTerminalParams struct {
	TerminalAt string `json:"terminal_at"`
	ID         string `json:"id"`
}

type UpdateLoopRunTokensParams

type UpdateLoopRunTokensParams struct {
	TokensUsed int64  `json:"tokens_used"`
	ID         string `json:"id"`
}

type UpdateNativeSubagentTitleParams

type UpdateNativeSubagentTitleParams struct {
	Title     string `json:"title"`
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type UpdateNotificationCursorParams

type UpdateNotificationCursorParams struct {
	LastSequence    int64          `json:"last_sequence"`
	LastDeliveryID  string         `json:"last_delivery_id"`
	LastDeliveredAt sql.NullString `json:"last_delivered_at"`
	UpdatedAt       string         `json:"updated_at"`
	ConsumerID      string         `json:"consumer_id"`
	ProfileID       string         `json:"profile_id"`
	ScopeKind       string         `json:"scope_kind"`
	WorkspaceID     string         `json:"workspace_id"`
	StreamName      string         `json:"stream_name"`
	SubjectID       string         `json:"subject_id"`
}

type UpdatePendingWorktreeParams

type UpdatePendingWorktreeParams struct {
	PendingPhase  string `json:"pending_phase"`
	Branch        string `json:"branch"`
	GitDir        string `json:"git_dir"`
	BaseRef       string `json:"base_ref"`
	CreatedBranch int64  `json:"created_branch"`
	RunNamespace  string `json:"run_namespace"`
	CreatedHead   string `json:"created_head"`
	UpdatedAt     string `json:"updated_at"`
	WorkspaceID   string `json:"workspace_id"`
	WorktreeID    string `json:"worktree_id"`
}

type UpdatePreparedGoalCheckpointFenceParams

type UpdatePreparedGoalCheckpointFenceParams struct {
	Phase        string         `json:"phase"`
	GoalStatus   string         `json:"goal_status"`
	ControlCause sql.NullString `json:"control_cause"`
	UpdatedAt    string         `json:"updated_at"`
	LoopRunID    string         `json:"loop_run_id"`
	Generation   int64          `json:"generation"`
	NodeID       string         `json:"node_id"`
	ItemIndex    int64          `json:"item_index"`
	ControlEpoch int64          `json:"control_epoch"`
	BindingEpoch sql.NullInt64  `json:"binding_epoch"`
	QueueEntryID sql.NullString `json:"queue_entry_id"`
	PromptID     sql.NullString `json:"prompt_id"`
}

type UpdatePreparedGoalQueueFenceParams

type UpdatePreparedGoalQueueFenceParams struct {
	Status              string         `json:"status"`
	FenceKind           sql.NullString `json:"fence_kind"`
	FenceDisposition    sql.NullString `json:"fence_disposition"`
	FenceReasonCode     sql.NullString `json:"fence_reason_code"`
	FencedAt            string         `json:"fenced_at"`
	Grantable           any            `json:"grantable"`
	TerminalKind        sql.NullString `json:"terminal_kind"`
	TerminalDisposition sql.NullString `json:"terminal_disposition"`
	TerminalReasonCode  sql.NullString `json:"terminal_reason_code"`
	TerminalAt          string         `json:"terminal_at"`
	CanceledAt          string         `json:"canceled_at"`
	UpdatedAt           string         `json:"updated_at"`
	ID                  string         `json:"id"`
	LoopRunID           sql.NullString `json:"loop_run_id"`
	PromptID            sql.NullString `json:"prompt_id"`
	OwnerEpoch          sql.NullInt64  `json:"owner_epoch"`
}

type UpdateRunReviewBindingParams

type UpdateRunReviewBindingParams struct {
	Status            string         `json:"status"`
	ReviewerSessionID sql.NullString `json:"reviewer_session_id"`
	ReviewerAgentName string         `json:"reviewer_agent_name"`
	StartedAt         sql.NullString `json:"started_at"`
	UpdatedAt         string         `json:"updated_at"`
	ReviewID          string         `json:"review_id"`
}

type UpdateRunReviewVerdictParams

type UpdateRunReviewVerdictParams struct {
	Status            string          `json:"status"`
	Outcome           sql.NullString  `json:"outcome"`
	Confidence        sql.NullFloat64 `json:"confidence"`
	Reason            string          `json:"reason"`
	DeliveryID        sql.NullString  `json:"delivery_id"`
	MissingWorkJson   string          `json:"missing_work_json"`
	NextRoundGuidance string          `json:"next_round_guidance"`
	ReviewText        string          `json:"review_text"`
	ReviewedByKind    string          `json:"reviewed_by_kind"`
	ReviewedByRef     string          `json:"reviewed_by_ref"`
	ReviewedAt        sql.NullString  `json:"reviewed_at"`
	UpdatedAt         string          `json:"updated_at"`
	ReviewID          string          `json:"review_id"`
}

type UpdateSessionLineageHierarchyParams

type UpdateSessionLineageHierarchyParams struct {
	ParentSessionID  sql.NullString `json:"parent_session_id"`
	RootSessionID    sql.NullString `json:"root_session_id"`
	SpawnDepth       int64          `json:"spawn_depth"`
	LineageKind      string         `json:"lineage_kind"`
	AutoStopOnParent bool           `json:"auto_stop_on_parent"`
	UpdatedAt        string         `json:"updated_at"`
	WorkspaceID      string         `json:"workspace_id"`
	ID               string         `json:"id"`
}

type UpdateSessionSoulSnapshotParams

type UpdateSessionSoulSnapshotParams struct {
	SoulSnapshotID   sql.NullString `json:"soul_snapshot_id"`
	SoulDigest       string         `json:"soul_digest"`
	ParentSoulDigest string         `json:"parent_soul_digest"`
	UpdatedAt        string         `json:"updated_at"`
	ID               string         `json:"id"`
}

type UpdateSessionWorktreeBindingParams

type UpdateSessionWorktreeBindingParams struct {
	WorktreeID         sql.NullString `json:"worktree_id"`
	UpdatedAt          string         `json:"updated_at"`
	ID                 string         `json:"id"`
	WorkspaceID        string         `json:"workspace_id"`
	ProfileID          string         `json:"profile_id"`
	ExpectedWorktreeID sql.NullString `json:"expected_worktree_id"`
	RecoverAccepted    any            `json:"recover_accepted"`
}

type UpdateSubagentChildActivityParams

type UpdateSubagentChildActivityParams struct {
	ChildActivity string `json:"child_activity"`
	Now           string `json:"now"`
	ID            string `json:"id"`
}

type UpdateSubagentProgressParams

type UpdateSubagentProgressParams struct {
	Progress  string `json:"progress"`
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type UpdateSubagentStateParams

type UpdateSubagentStateParams struct {
	Status    string `json:"status"`
	WorkState string `json:"work_state"`
	Now       string `json:"now"`
	ID        string `json:"id"`
}

type UpdateTaskGrantCeilingParams

type UpdateTaskGrantCeilingParams struct {
	Operator bool   `json:"operator"`
	Ceiling  string `json:"ceiling"`
	ID       string `json:"id"`
}

type UpdateTaskParams

type UpdateTaskParams struct {
	GrantCeiling         string         `json:"grant_ceiling"`
	Identifier           sql.NullString `json:"identifier"`
	Scope                string         `json:"scope"`
	WorkspaceID          sql.NullString `json:"workspace_id"`
	ParentTaskID         sql.NullString `json:"parent_task_id"`
	Title                string         `json:"title"`
	Description          sql.NullString `json:"description"`
	Priority             string         `json:"priority"`
	MaxAttempts          int64          `json:"max_attempts"`
	AutoEnqueueOnReady   int64          `json:"auto_enqueue_on_ready"`
	ApprovalPolicy       string         `json:"approval_policy"`
	ApprovalState        string         `json:"approval_state"`
	OwnerKind            sql.NullString `json:"owner_kind"`
	OwnerRef             sql.NullString `json:"owner_ref"`
	CreatedByKind        string         `json:"created_by_kind"`
	CreatedByRef         string         `json:"created_by_ref"`
	OriginKind           string         `json:"origin_kind"`
	OriginRef            string         `json:"origin_ref"`
	CreatedAt            string         `json:"created_at"`
	UpdatedAt            string         `json:"updated_at"`
	ClosedAt             sql.NullString `json:"closed_at"`
	Paused               int64          `json:"paused"`
	PausedBy             string         `json:"paused_by"`
	PausedAt             sql.NullString `json:"paused_at"`
	PausedReason         string         `json:"paused_reason"`
	NeedsAttentionReason sql.NullString `json:"needs_attention_reason"`
	NeedsAttentionAt     sql.NullString `json:"needs_attention_at"`
	NeedsAttentionByKind sql.NullString `json:"needs_attention_by_kind"`
	NeedsAttentionByRef  sql.NullString `json:"needs_attention_by_ref"`
	WakeCreator          int64          `json:"wake_creator"`
	MetadataJson         sql.NullString `json:"metadata_json"`
	ID                   string         `json:"id"`
}

type UpdateTaskReviewRollupParams

type UpdateTaskReviewRollupParams struct {
	ReviewRound           int64          `json:"review_round"`
	LastReviewID          sql.NullString `json:"last_review_id"`
	LastReviewOutcome     sql.NullString `json:"last_review_outcome"`
	ReviewCircuitOpenedAt sql.NullString `json:"review_circuit_opened_at"`
	ReviewCircuitReason   sql.NullString `json:"review_circuit_reason"`
	UpdatedAt             string         `json:"updated_at"`
	ID                    string         `json:"id"`
}

type UpdateTaskRunMetadataParams

type UpdateTaskRunMetadataParams struct {
	MetadataJson         sql.NullString `json:"metadata_json"`
	ID                   string         `json:"id"`
	ExpectedMetadataJson sql.NullString `json:"expected_metadata_json"`
}

type UpdateTaskStatusChokepointParams

type UpdateTaskStatusChokepointParams struct {
	ToStatus   string `json:"to_status"`
	ID         string `json:"id"`
	FromStatus string `json:"from_status"`
}

type UpdateToolProcessRecordStateParams

type UpdateToolProcessRecordStateParams struct {
	State       string         `json:"state"`
	ExitCode    sql.NullInt64  `json:"exit_code"`
	Error       string         `json:"error"`
	UpdatedAt   string         `json:"updated_at"`
	CompletedAt sql.NullString `json:"completed_at"`
	ID          string         `json:"id"`
}

type UpdateWorkspaceParams

type UpdateWorkspaceParams struct {
	RootDir      string         `json:"root_dir"`
	AddDirs      string         `json:"add_dirs"`
	Name         string         `json:"name"`
	DefaultAgent sql.NullString `json:"default_agent"`
	UpdatedAt    string         `json:"updated_at"`
	ID           string         `json:"id"`
}

type UpgradeSubagentWakePolicyParams

type UpgradeSubagentWakePolicyParams struct {
	UpdatedAt string `json:"updated_at"`
	ID        string `json:"id"`
}

type UpsertAppMetadataParams

type UpsertAppMetadataParams struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	UpdatedAt string `json:"updated_at"`
}

type UpsertAutomationJobCatalogParams

type UpsertAutomationJobCatalogParams struct {
	JobID                  string `json:"job_id"`
	Target                 string `json:"target"`
	Scope                  string `json:"scope"`
	WorkspaceID            string `json:"workspace_id"`
	Source                 string `json:"source"`
	SourceRank             int64  `json:"source_rank"`
	Name                   string `json:"name"`
	LoopName               string `json:"loop_name"`
	Enabled                bool   `json:"enabled"`
	SearchName             string `json:"search_name"`
	SearchAgentName        string `json:"search_agent_name"`
	SearchPrompt           string `json:"search_prompt"`
	SearchScope            string `json:"search_scope"`
	SearchSource           string `json:"search_source"`
	SearchScheduleMode     string `json:"search_schedule_mode"`
	SearchScheduleExpr     string `json:"search_schedule_expr"`
	SearchScheduleInterval string `json:"search_schedule_interval"`
	SearchScheduleTime     string `json:"search_schedule_time"`
}

type UpsertAutomationJobOverlayParams

type UpsertAutomationJobOverlayParams struct {
	JobID           string `json:"job_id"`
	EnabledOverride bool   `json:"enabled_override"`
	UpdatedAt       string `json:"updated_at"`
}

type UpsertAutomationSchedulerStateParams

type UpsertAutomationSchedulerStateParams struct {
	JobID                     string         `json:"job_id"`
	DeferredUntil             sql.NullString `json:"deferred_until"`
	NextRunAt                 sql.NullString `json:"next_run_at"`
	LastRunAt                 sql.NullString `json:"last_run_at"`
	LastScheduledAt           sql.NullString `json:"last_scheduled_at"`
	LastFireID                string         `json:"last_fire_id"`
	ScheduleHash              string         `json:"schedule_hash"`
	CatchUpPolicy             string         `json:"catch_up_policy"`
	MisfireGraceSeconds       int64          `json:"misfire_grace_seconds"`
	ConsecutiveResumeFailures int64          `json:"consecutive_resume_failures"`
	LastMisfireAt             sql.NullString `json:"last_misfire_at"`
	MisfireCount              int64          `json:"misfire_count"`
	UpdatedAt                 string         `json:"updated_at"`
}

type UpsertAutomationTriggerCatalogParams

type UpsertAutomationTriggerCatalogParams struct {
	TriggerID          string `json:"trigger_id"`
	Target             string `json:"target"`
	Scope              string `json:"scope"`
	WorkspaceID        string `json:"workspace_id"`
	Event              string `json:"event"`
	Source             string `json:"source"`
	SourceRank         int64  `json:"source_rank"`
	Name               string `json:"name"`
	LoopName           string `json:"loop_name"`
	Enabled            bool   `json:"enabled"`
	SearchName         string `json:"search_name"`
	SearchAgentName    string `json:"search_agent_name"`
	SearchPrompt       string `json:"search_prompt"`
	SearchScope        string `json:"search_scope"`
	SearchSource       string `json:"search_source"`
	SearchEvent        string `json:"search_event"`
	SearchEndpointSlug string `json:"search_endpoint_slug"`
	SearchWebhookID    string `json:"search_webhook_id"`
}

type UpsertAutomationTriggerOverlayParams

type UpsertAutomationTriggerOverlayParams struct {
	TriggerID       string `json:"trigger_id"`
	EnabledOverride bool   `json:"enabled_override"`
	UpdatedAt       string `json:"updated_at"`
}

type UpsertDeadEntityParams

type UpsertDeadEntityParams struct {
	ProfileID   string `json:"profile_id"`
	WorkspaceID string `json:"workspace_id"`
	Kind        string `json:"kind"`
	EntityID    string `json:"entity_id"`
	Reason      string `json:"reason"`
	MarkedAt    string `json:"marked_at"`
}

type UpsertExtensionEnvBindingParams

type UpsertExtensionEnvBindingParams struct {
	ExtensionName string `json:"extension_name"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
	EnvName       string `json:"env_name"`
	SecretRef     string `json:"secret_ref"`
	InputID       string `json:"input_id"`
	Active        int64  `json:"active"`
	McpServer     string `json:"mcp_server"`
	HeaderName    string `json:"header_name"`
	Kind          string `json:"kind"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

type UpsertExtensionInputParams

type UpsertExtensionInputParams struct {
	Extension   string `json:"extension"`
	Profile     string `json:"profile"`
	WorkspaceID string `json:"workspace_id"`
	InputID     string `json:"input_id"`
	Type        string `json:"type"`
	ValueJson   string `json:"value_json"`
	Active      int64  `json:"active"`
	UpdatedAt   string `json:"updated_at"`
}

type UpsertForgePullRequestParams

type UpsertForgePullRequestParams struct {
	WorkspaceID       string         `json:"workspace_id"`
	RepoKey           string         `json:"repo_key"`
	Branch            string         `json:"branch"`
	Provider          string         `json:"provider"`
	PrNumber          sql.NullInt64  `json:"pr_number"`
	PrUrl             string         `json:"pr_url"`
	PrState           sql.NullString `json:"pr_state"`
	Merged            sql.NullInt64  `json:"merged"`
	Draft             sql.NullInt64  `json:"draft"`
	HeadSha           string         `json:"head_sha"`
	BaseRef           string         `json:"base_ref"`
	ChecksState       string         `json:"checks_state"`
	ChecksPassed      int64          `json:"checks_passed"`
	ChecksFailed      int64          `json:"checks_failed"`
	ChecksPending     int64          `json:"checks_pending"`
	ChecksFailedNames string         `json:"checks_failed_names"`
	ReviewDecision    string         `json:"review_decision"`
	Mergeable         string         `json:"mergeable"`
	PrUpdatedAt       sql.NullString `json:"pr_updated_at"`
	ObservedAt        sql.NullString `json:"observed_at"`
	LookupState       string         `json:"lookup_state"`
	LookupCause       string         `json:"lookup_cause"`
	AttemptAt         sql.NullString `json:"attempt_at"`
	FailureCount      int64          `json:"failure_count"`
	RetryAfter        sql.NullString `json:"retry_after"`
}

type UpsertGatewayEndpointStateParams

type UpsertGatewayEndpointStateParams struct {
	Tier        string `json:"tier"`
	EndpointUrl string `json:"endpoint_url"`
	UpdatedAt   string `json:"updated_at"`
}

type UpsertGatewayIngressBindingParams

type UpsertGatewayIngressBindingParams struct {
	SubjectKind        string         `json:"subject_kind"`
	SubjectID          string         `json:"subject_id"`
	ScopeKind          string         `json:"scope_kind"`
	WorkspaceID        sql.NullString `json:"workspace_id"`
	EndpointGeneration int64          `json:"endpoint_generation"`
	ConfirmedAt        string         `json:"confirmed_at"`
}

type UpsertGatewayProviderParams

type UpsertGatewayProviderParams struct {
	Name            string         `json:"name"`
	InstallSource   string         `json:"install_source"`
	DigestConfirmed sql.NullString `json:"digest_confirmed"`
	ConfirmedAt     sql.NullString `json:"confirmed_at"`
}

type UpsertHeartbeatWakeStateParams

type UpsertHeartbeatWakeStateParams struct {
	WorkspaceID      string         `json:"workspace_id"`
	AgentName        string         `json:"agent_name"`
	SessionID        string         `json:"session_id"`
	PolicySnapshotID sql.NullString `json:"policy_snapshot_id"`
	LastWakeAt       sql.NullString `json:"last_wake_at"`
	NextAllowedAt    sql.NullString `json:"next_allowed_at"`
	CoalescedCount   int64          `json:"coalesced_count"`
	LastResult       string         `json:"last_result"`
	LastReason       sql.NullString `json:"last_reason"`
	UpdatedAt        string         `json:"updated_at"`
}

type UpsertLoopDefinitionSnapshotParams

type UpsertLoopDefinitionSnapshotParams struct {
	ProfileID         string `json:"profile_id"`
	WorkspaceID       string `json:"workspace_id"`
	DefinitionDigest  string `json:"definition_digest"`
	DefinitionVersion int64  `json:"definition_version"`
	DefinitionJson    string `json:"definition_json"`
	ByteSize          int64  `json:"byte_size"`
	CreatedAt         string `json:"created_at"`
	LastUsedAt        string `json:"last_used_at"`
}

type UpsertLoopGateDecisionParams

type UpsertLoopGateDecisionParams struct {
	WorkspaceID string `json:"workspace_id"`
	LoopRunID   string `json:"loop_run_id"`
	Generation  int64  `json:"generation"`
	GateID      string `json:"gate_id"`
	CriterionID string `json:"criterion_id"`
	Decision    string `json:"decision"`
	ActorKind   string `json:"actor_kind"`
	ActorRef    string `json:"actor_ref"`
	OriginKind  string `json:"origin_kind"`
	OriginRef   string `json:"origin_ref"`
	Note        string `json:"note"`
	DecidedAt   string `json:"decided_at"`
}

type UpsertMCPAuthTokenParams

type UpsertMCPAuthTokenParams struct {
	Scope                 string         `json:"scope"`
	WorkspaceID           string         `json:"workspace_id"`
	Owner                 string         `json:"owner"`
	ServerName            string         `json:"server_name"`
	DefinitionFingerprint string         `json:"definition_fingerprint"`
	Issuer                string         `json:"issuer"`
	ClientID              string         `json:"client_id"`
	ScopesJson            string         `json:"scopes_json"`
	AccessTokenRef        string         `json:"access_token_ref"`
	RefreshTokenRef       string         `json:"refresh_token_ref"`
	TokenType             string         `json:"token_type"`
	ExpiresAt             sql.NullString `json:"expires_at"`
	ObtainedAt            string         `json:"obtained_at"`
	UpdatedAt             string         `json:"updated_at"`
}

type UpsertMCPOAuthRegistrationParams

type UpsertMCPOAuthRegistrationParams struct {
	Scope                      string         `json:"scope"`
	WorkspaceID                string         `json:"workspace_id"`
	Owner                      string         `json:"owner"`
	ServerName                 string         `json:"server_name"`
	DefinitionFingerprint      string         `json:"definition_fingerprint"`
	ResourceUrl                string         `json:"resource_url"`
	Issuer                     string         `json:"issuer"`
	ClientID                   string         `json:"client_id"`
	TokenEndpointAuthMethod    string         `json:"token_endpoint_auth_method"`
	ClientSecretRef            string         `json:"client_secret_ref"`
	RegistrationAccessTokenRef string         `json:"registration_access_token_ref"`
	RegistrationClientUri      string         `json:"registration_client_uri"`
	ClientIDIssuedAt           sql.NullString `json:"client_id_issued_at"`
	ClientSecretExpiresAt      sql.NullString `json:"client_secret_expires_at"`
	RedirectUri                string         `json:"redirect_uri"`
	ScopesJson                 string         `json:"scopes_json"`
	UpdatedAt                  string         `json:"updated_at"`
}

type UpsertMarketplaceCatalogStateFreshParams

type UpsertMarketplaceCatalogStateFreshParams struct {
	Source          string         `json:"source"`
	ManifestVersion int64          `json:"manifest_version"`
	GeneratedAt     sql.NullString `json:"generated_at"`
	FetchedAt       string         `json:"fetched_at"`
	Revision        string         `json:"revision"`
	Generation      int64          `json:"generation"`
	Plugins         int64          `json:"plugins"`
	Installable     int64          `json:"installable"`
	SourceRef       string         `json:"source_ref"`
	DocumentDigest  string         `json:"document_digest"`
	DiagnosticsJson string         `json:"diagnostics_json"`
	KindOfSource    string         `json:"kind_of_source"`
	DocumentPath    string         `json:"document_path"`
	Owner           string         `json:"owner"`
}

type UpsertModelCatalogExecutionContextParams

type UpsertModelCatalogExecutionContextParams struct {
	ContextID          string `json:"context_id"`
	Scope              string `json:"scope"`
	ProfileID          string `json:"profile_id"`
	WorkspaceID        string `json:"workspace_id"`
	CommandFingerprint string `json:"command_fingerprint"`
}

type UpsertModelCatalogSourceStatusParams

type UpsertModelCatalogSourceStatusParams struct {
	ContextID     string `json:"context_id"`
	SourceID      string `json:"source_id"`
	ProviderID    string `json:"provider_id"`
	SourceKind    string `json:"source_kind"`
	Priority      int64  `json:"priority"`
	RefreshState  string `json:"refresh_state"`
	LastRefreshAt string `json:"last_refresh_at"`
	NextRefreshAt string `json:"next_refresh_at"`
	LastSuccessAt string `json:"last_success_at"`
	LastError     string `json:"last_error"`
	RowCount      int64  `json:"row_count"`
	Stale         int64  `json:"stale"`
}

type UpsertRunStarvationParams

type UpsertRunStarvationParams struct {
	RunID            string         `json:"run_id"`
	WakeCount        int64          `json:"wake_count"`
	FirstStarvedAt   string         `json:"first_starved_at"`
	LastWakeAt       sql.NullString `json:"last_wake_at"`
	EscalationTier   int64          `json:"escalation_tier"`
	SpawnRequestedAt sql.NullString `json:"spawn_requested_at"`
	StarvedEventAt   sql.NullString `json:"starved_event_at"`
	UpdatedAt        string         `json:"updated_at"`
}

type UpsertSessionHealthParams

type UpsertSessionHealthParams struct {
	SessionID           string         `json:"session_id"`
	WorkspaceID         string         `json:"workspace_id"`
	AgentName           string         `json:"agent_name"`
	State               string         `json:"state"`
	Health              string         `json:"health"`
	ActivePrompt        bool           `json:"active_prompt"`
	Attachable          bool           `json:"attachable"`
	EligibleForWake     bool           `json:"eligible_for_wake"`
	IneligibilityReason sql.NullString `json:"ineligibility_reason"`
	LastActivityAt      sql.NullString `json:"last_activity_at"`
	LastPresenceAt      sql.NullString `json:"last_presence_at"`
	LastError           sql.NullString `json:"last_error"`
	UpdatedAt           string         `json:"updated_at"`
}

type UpsertSessionParams

type UpsertSessionParams struct {
	EffectiveWorkspaceAccess string         `json:"effective_workspace_access"`
	ProfileID                string         `json:"profile_id"`
	ID                       string         `json:"id"`
	Name                     sql.NullString `json:"name"`
	AgentName                string         `json:"agent_name"`
	Provider                 string         `json:"provider"`
	Model                    string         `json:"model"`
	ReasoningEffort          string         `json:"reasoning_effort"`
	Speed                    string         `json:"speed"`
	AcpOptionsJson           string         `json:"acp_options_json"`
	SpeedResolutionJson      string         `json:"speed_resolution_json"`
	RuntimeStatus            string         `json:"runtime_status"`
	RuntimeTransition        string         `json:"runtime_transition"`
	RuntimeFailure           string         `json:"runtime_failure"`
	RuntimeGeneration        int64          `json:"runtime_generation"`
	RuntimeRecoveryJson      string         `json:"runtime_recovery_json"`
	SelectedProvider         string         `json:"selected_provider"`
	SelectedModel            string         `json:"selected_model"`
	SelectedReasoningEffort  string         `json:"selected_reasoning_effort"`
	SelectedSpeed            string         `json:"selected_speed"`
	SelectedAcpOptionsJson   string         `json:"selected_acp_options_json"`
	RuntimeSelectionRevision int64          `json:"runtime_selection_revision"`
	WorkspaceID              string         `json:"workspace_id"`
	WorktreeID               sql.NullString `json:"worktree_id"`
	SessionType              string         `json:"session_type"`
	State                    string         `json:"state"`
	ParentSessionID          sql.NullString `json:"parent_session_id"`
	RootSessionID            sql.NullString `json:"root_session_id"`
	SpawnDepth               int64          `json:"spawn_depth"`
	SpawnRole                sql.NullString `json:"spawn_role"`
	TtlExpiresAt             sql.NullString `json:"ttl_expires_at"`
	AutoStopOnParent         bool           `json:"auto_stop_on_parent"`
	NotifyCreator            bool           `json:"notify_creator"`
	SpawnBudgetJson          string         `json:"spawn_budget_json"`
	PermissionPolicyJson     string         `json:"permission_policy_json"`
	LineageKind              string         `json:"lineage_kind"`
	OriginMessageID          sql.NullString `json:"origin_message_id"`
	OriginAgentName          string         `json:"origin_agent_name"`
	AcpSessionID             sql.NullString `json:"acp_session_id"`
	StopReason               sql.NullString `json:"stop_reason"`
	StopEscalated            bool           `json:"stop_escalated"`
	StopVerificationFailed   bool           `json:"stop_verification_failed"`
	StopDetail               sql.NullString `json:"stop_detail"`
	FailureKind              sql.NullString `json:"failure_kind"`
	FailureSummary           string         `json:"failure_summary"`
	CrashBundlePath          string         `json:"crash_bundle_path"`
	SubprocessPid            int64          `json:"subprocess_pid"`
	SubprocessStartedAt      sql.NullString `json:"subprocess_started_at"`
	LastUpdateAt             sql.NullString `json:"last_update_at"`
	StallState               string         `json:"stall_state"`
	StallReason              string         `json:"stall_reason"`
	ActivityJson             string         `json:"activity_json"`
	TranscriptEpoch          int64          `json:"transcript_epoch"`
	SoulSnapshotID           sql.NullString `json:"soul_snapshot_id"`
	SoulDigest               string         `json:"soul_digest"`
	ParentSoulDigest         string         `json:"parent_soul_digest"`
	CreatedAt                string         `json:"created_at"`
	UpdatedAt                string         `json:"updated_at"`
}

type UpsertSessionPlacementParams

type UpsertSessionPlacementParams struct {
	SessionID   string         `json:"session_id"`
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
	Position    int64          `json:"position"`
	Now         string         `json:"now"`
}

type UpsertSessionProcessObservationParams

type UpsertSessionProcessObservationParams struct {
	Pid             int64  `json:"pid"`
	StartedAt       string `json:"started_at"`
	SessionID       string `json:"session_id"`
	WorkspaceID     string `json:"workspace_id"`
	ProfileID       string `json:"profile_id"`
	SessionName     string `json:"session_name"`
	Pgid            int64  `json:"pgid"`
	FirstSeen       string `json:"first_seen"`
	GroupObservedAt string `json:"group_observed_at"`
	Attribution     string `json:"attribution"`
	KernelToken     string `json:"kernel_token"`
}

type UpsertTaskBlockRecurrenceParams

type UpsertTaskBlockRecurrenceParams struct {
	TaskID    string `json:"task_id"`
	Kind      string `json:"kind"`
	Count     int64  `json:"count"`
	UpdatedAt string `json:"updated_at"`
}

type UpsertTaskDesignationRollupParams

type UpsertTaskDesignationRollupParams struct {
	DesignationGroupID string `json:"designation_group_id"`
	TaskID             string `json:"task_id"`
	SummaryJson        string `json:"summary_json"`
	CreatedAt          string `json:"created_at"`
}

type UpsertTaskExecutionProfileParams

type UpsertTaskExecutionProfileParams struct {
	TaskID                string `json:"task_id"`
	CoordinatorMode       string `json:"coordinator_mode"`
	CoordinatorAgentName  string `json:"coordinator_agent_name"`
	CoordinatorProvider   string `json:"coordinator_provider"`
	CoordinatorModel      string `json:"coordinator_model"`
	CoordinatorGuidance   string `json:"coordinator_guidance"`
	WorkerMode            string `json:"worker_mode"`
	WorkerAgentName       string `json:"worker_agent_name"`
	WorkerProvider        string `json:"worker_provider"`
	WorkerModel           string `json:"worker_model"`
	WorkerReasoningEffort string `json:"worker_reasoning_effort"`
	WorkerSpeed           string `json:"worker_speed"`
	WorkerAcpOptionsJson  string `json:"worker_acp_options_json"`
	ReviewAgentName       string `json:"review_agent_name"`
	ReviewProvider        string `json:"review_provider"`
	ReviewModel           string `json:"review_model"`
	ReviewReasoningEffort string `json:"review_reasoning_effort"`
	ReviewSpeed           string `json:"review_speed"`
	ReviewAcpOptionsJson  string `json:"review_acp_options_json"`
	WorktreeMode          string `json:"worktree_mode"`
	WorktreeRef           string `json:"worktree_ref"`
	RuntimeMode           string `json:"runtime_mode"`
	CreatedAt             string `json:"created_at"`
	UpdatedAt             string `json:"updated_at"`
}

type UpsertTaskTriageStateParams

type UpsertTaskTriageStateParams struct {
	TaskID             string         `json:"task_id"`
	ActorKind          string         `json:"actor_kind"`
	ActorID            string         `json:"actor_id"`
	IsRead             bool           `json:"is_read"`
	Archived           bool           `json:"archived"`
	Dismissed          bool           `json:"dismissed"`
	LastSeenActivityAt sql.NullString `json:"last_seen_activity_at"`
	UpdatedAt          string         `json:"updated_at"`
}

type UpsertTokenStatsParams

type UpsertTokenStatsParams struct {
	CacheReadTokens  sql.NullInt64   `json:"cache_read_tokens"`
	CacheWriteTokens sql.NullInt64   `json:"cache_write_tokens"`
	ID               string          `json:"id"`
	SessionID        string          `json:"session_id"`
	AgentName        string          `json:"agent_name"`
	InputTokens      sql.NullInt64   `json:"input_tokens"`
	OutputTokens     sql.NullInt64   `json:"output_tokens"`
	TotalTokens      sql.NullInt64   `json:"total_tokens"`
	TotalCost        sql.NullFloat64 `json:"total_cost"`
	CostCurrency     sql.NullString  `json:"cost_currency"`
	CostStatus       string          `json:"cost_status"`
	CostSource       string          `json:"cost_source"`
	TurnCount        int64           `json:"turn_count"`
	UpdatedAt        string          `json:"updated_at"`
}

type UpsertTokenUsageDailyParams

type UpsertTokenUsageDailyParams struct {
	ProfileID    string          `json:"profile_id"`
	Day          string          `json:"day"`
	WorkspaceID  string          `json:"workspace_id"`
	AgentName    string          `json:"agent_name"`
	InputTokens  int64           `json:"input_tokens"`
	OutputTokens int64           `json:"output_tokens"`
	TotalTokens  int64           `json:"total_tokens"`
	TotalCost    sql.NullFloat64 `json:"total_cost"`
	CostCurrency sql.NullString  `json:"cost_currency"`
	CostStatus   string          `json:"cost_status"`
	CostSource   string          `json:"cost_source"`
	TurnCount    int64           `json:"turn_count"`
	UpdatedAt    string          `json:"updated_at"`
}

type UpsertToolProcessRecordParams

type UpsertToolProcessRecordParams struct {
	ID             string         `json:"id"`
	Source         string         `json:"source"`
	SessionID      string         `json:"session_id"`
	TurnID         string         `json:"turn_id"`
	ToolCallID     string         `json:"tool_call_id"`
	TerminalID     string         `json:"terminal_id"`
	ExtensionName  string         `json:"extension_name"`
	HookName       string         `json:"hook_name"`
	Pid            int64          `json:"pid"`
	ProcessGroupID int64          `json:"process_group_id"`
	Command        string         `json:"command"`
	ArgsJson       string         `json:"args_json"`
	Cwd            string         `json:"cwd"`
	StartedAt      sql.NullString `json:"started_at"`
	StartedByPid   int64          `json:"started_by_pid"`
	State          string         `json:"state"`
	ExitCode       sql.NullInt64  `json:"exit_code"`
	Error          string         `json:"error"`
	CreatedAt      string         `json:"created_at"`
	UpdatedAt      string         `json:"updated_at"`
	CompletedAt    sql.NullString `json:"completed_at"`
}

type UpsertVaultSecretParams

type UpsertVaultSecretParams struct {
	Ref            string `json:"ref"`
	Kind           string `json:"kind"`
	EncryptedValue string `json:"encrypted_value"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
}

type UpsertWorkspacePlacementParams

type UpsertWorkspacePlacementParams struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
	Position    int64          `json:"position"`
	Now         string         `json:"now"`
}

type UpsertWorktreeStatusParams

type UpsertWorktreeStatusParams struct {
	Branch      sql.NullString `json:"branch"`
	Detached    sql.NullInt64  `json:"detached"`
	HeadSha     sql.NullString `json:"head_sha"`
	DirtyFiles  sql.NullInt64  `json:"dirty_files"`
	Insertions  sql.NullInt64  `json:"insertions"`
	Deletions   sql.NullInt64  `json:"deletions"`
	HasUpstream sql.NullInt64  `json:"has_upstream"`
	Ahead       sql.NullInt64  `json:"ahead"`
	Behind      sql.NullInt64  `json:"behind"`
	ReadError   string         `json:"read_error"`
	RefreshedAt sql.NullString `json:"refreshed_at"`
	WorkspaceID string         `json:"workspace_id"`
	WorktreeID  string         `json:"worktree_id"`
}

type UserScopeMigration

type UserScopeMigration struct {
	SourceWorkspaceID     string         `json:"source_workspace_id"`
	SourceRoot            string         `json:"source_root"`
	Disposition           string         `json:"disposition"`
	ProfileIds            string         `json:"profile_ids"`
	SqlDoneAt             sql.NullString `json:"sql_done_at"`
	JournalState          string         `json:"journal_state"`
	LayoutState           string         `json:"layout_state"`
	RegistrationRemovedAt sql.NullString `json:"registration_removed_at"`
}

type UserScopeMigrationArchive

type UserScopeMigrationArchive struct {
	SourceWorkspaceID string `json:"source_workspace_id"`
	TableName         string `json:"table_name"`
	RowJson           string `json:"row_json"`
	Reason            string `json:"reason"`
	ArchivedAt        string `json:"archived_at"`
}

type ValidateGoalBudgetDecisionParams

type ValidateGoalBudgetDecisionParams struct {
	BudgetVersion int64  `json:"budget_version"`
	ValidUntil    string `json:"valid_until"`
	ID            string `json:"id"`
}

type ValidateGoalPromptTaskRunParams

type ValidateGoalPromptTaskRunParams struct {
	ID        string         `json:"id"`
	LoopRunID sql.NullString `json:"loop_run_id"`
}

type ValidateGoalSessionWorkspaceParams

type ValidateGoalSessionWorkspaceParams struct {
	ID          string `json:"id"`
	WorkspaceID string `json:"workspace_id"`
}

type VaultSecret

type VaultSecret struct {
	Ref            string `json:"ref"`
	Kind           string `json:"kind"`
	EncryptedValue string `json:"encrypted_value"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
}

type Workspace

type Workspace struct {
	ID           string         `json:"id"`
	RootDir      string         `json:"root_dir"`
	AddDirs      string         `json:"add_dirs"`
	Name         string         `json:"name"`
	DefaultAgent sql.NullString `json:"default_agent"`
	ArchivedAt   sql.NullString `json:"archived_at"`
	CreatedAt    string         `json:"created_at"`
	UpdatedAt    string         `json:"updated_at"`
}

type WorkspaceDeletionIntent

type WorkspaceDeletionIntent struct {
	WorkspaceID  string         `json:"workspace_id"`
	RootDir      string         `json:"root_dir"`
	AddDirs      string         `json:"add_dirs"`
	Name         string         `json:"name"`
	DefaultAgent sql.NullString `json:"default_agent"`
	CreatedAt    string         `json:"created_at"`
	UpdatedAt    string         `json:"updated_at"`
	RequestedAt  string         `json:"requested_at"`
}

type WorkspaceFolder

type WorkspaceFolder struct {
	ID        string `json:"id"`
	ProfileID string `json:"profile_id"`
	Name      string `json:"name"`
	Position  int64  `json:"position"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type WorkspaceNameAlias

type WorkspaceNameAlias struct {
	OldName     string `json:"old_name"`
	WorkspaceID string `json:"workspace_id"`
	CreatedAt   string `json:"created_at"`
}

type WorkspacePlacement

type WorkspacePlacement struct {
	ProfileID   string         `json:"profile_id"`
	WorkspaceID string         `json:"workspace_id"`
	FolderID    sql.NullString `json:"folder_id"`
	Position    int64          `json:"position"`
	UpdatedAt   string         `json:"updated_at"`
}

type Worktree

type Worktree struct {
	ID            string `json:"id"`
	ProfileID     string `json:"profile_id"`
	WorkspaceID   string `json:"workspace_id"`
	Name          string `json:"name"`
	Branch        string `json:"branch"`
	Path          string `json:"path"`
	GitDir        string `json:"git_dir"`
	State         string `json:"state"`
	PendingPhase  string `json:"pending_phase"`
	Origin        string `json:"origin"`
	SetupState    string `json:"setup_state"`
	SetupError    string `json:"setup_error"`
	BaseRef       string `json:"base_ref"`
	CreatedBranch int64  `json:"created_branch"`
	RunNamespace  string `json:"run_namespace"`
	CreatedHead   string `json:"created_head"`
	RunID         string `json:"run_id"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

type WorktreeExitOp

type WorktreeExitOp struct {
	OpID        string         `json:"op_id"`
	WorkspaceID string         `json:"workspace_id"`
	WorktreeID  string         `json:"worktree_id"`
	Action      string         `json:"action"`
	State       string         `json:"state"`
	StartedAt   string         `json:"started_at"`
	FinishedAt  sql.NullString `json:"finished_at"`
}

type WorktreeForgeStatusLegacy

type WorktreeForgeStatusLegacy struct {
	WorktreeID string         `json:"worktree_id"`
	Provider   string         `json:"provider"`
	PrNumber   sql.NullInt64  `json:"pr_number"`
	PrState    sql.NullString `json:"pr_state"`
	PrUrl      string         `json:"pr_url"`
	Merged     sql.NullInt64  `json:"merged"`
	FetchedAt  sql.NullString `json:"fetched_at"`
}

type WorktreeStatus

type WorktreeStatus struct {
	WorktreeID  string         `json:"worktree_id"`
	Branch      sql.NullString `json:"branch"`
	Detached    sql.NullInt64  `json:"detached"`
	HeadSha     sql.NullString `json:"head_sha"`
	DirtyFiles  sql.NullInt64  `json:"dirty_files"`
	Insertions  sql.NullInt64  `json:"insertions"`
	Deletions   sql.NullInt64  `json:"deletions"`
	HasUpstream sql.NullInt64  `json:"has_upstream"`
	Ahead       sql.NullInt64  `json:"ahead"`
	Behind      sql.NullInt64  `json:"behind"`
	ReadError   string         `json:"read_error"`
	RefreshedAt sql.NullString `json:"refreshed_at"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL