api

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCommentRequest

type AddCommentRequest struct {
	// AnchorContent Plain-text snapshot of the selected range, used to re-anchor the comment after file edits. `None` if not provided.
	AnchorContent *string `json:"anchor_content,omitempty"`

	// Body The comment text.
	Body string `json:"body"`

	// EndIndex 0-based absolute character offset (exclusive) within the file where the anchor range ends.
	EndIndex int `json:"end_index"`

	// Path File path relative to workspace root, e.g. `"src/App.tsx"`.
	Path string `json:"path"`

	// StartIndex 0-based absolute character offset (inclusive) within the file where the anchor range begins.
	StartIndex int `json:"start_index"`
}

AddCommentRequest Request body for `POST /sessions/{id}/comments`.

type AddCommentV1SessionsSessionIDCommentsPostJSONRequestBody

type AddCommentV1SessionsSessionIDCommentsPostJSONRequestBody = AddCommentRequest

AddCommentV1SessionsSessionIDCommentsPostJSONRequestBody defines body for AddCommentV1SessionsSessionIDCommentsPost for application/json ContentType.

type AgentObject

type AgentObject struct {
	// Builtin Whether this is a server-*seeded* built-in agent (deterministic, name-derived id) as opposed to an operator/user-registered template (random id, e.g. via `omnigent server --agent`) or a session-scoped upload. The Web UI's new-session picker uses this to decide whether a same-named `omnigent run` upload may shadow the catalog entry: seeded built-ins are protected, while a user-registered template is superseded by a newer same-named upload. Always `False` for session-scoped agents.
	Builtin *bool `json:"builtin,omitempty"`

	// CreatedAt Unix epoch timestamp of creation.
	CreatedAt int `json:"created_at"`

	// Description Optional free-text description of the agent's purpose.
	Description *string `json:"description,omitempty"`

	// Harness The agent's harness/kind, e.g. `"codex"`, `"codex-native"`, or `"claude-native"` for `executor.type: omnigent` agents, otherwise the executor type (`"claude_sdk"`, `"agents_sdk"`). `None` when the bundle cannot be loaded. Lets the Web UI Add Agent picker recognise an agent's kind (Codex vs Claude) without hardcoding by name slug.
	Harness *string `json:"harness,omitempty"`

	// ID Unique agent identifier, e.g. `"ag_abc123"`.
	ID string `json:"id"`

	// MCPServers MCP servers the agent is connected to (secret fields omitted). Empty list when the spec declares no MCP servers or when the bundle cannot be loaded.
	MCPServers []MCPServerSummary `json:"mcp_servers,omitempty"`

	// MCPServersEditable Whether the MCP list can be edited through the session UI. Built-in template agents are read-only; session-scoped uploaded agents are editable.
	MCPServersEditable *bool `json:"mcp_servers_editable,omitempty"`

	// Name Human-readable agent name, e.g. `"research-agent"`.
	Name string `json:"name"`

	// Object Fixed resource type, always `"agent"`.
	Object *string `json:"object,omitempty"`

	// Policies Guardrails policies declared on the agent. Each entry summarises the policy name, type, and phases. Empty list when the spec declares no policies or when the bundle cannot be loaded.
	Policies []PolicySummary `json:"policies,omitempty"`

	// Skills Skills bundled in the agent spec (`skills/<dir>/SKILL.md`). Lets the Web UI's new-session composer offer a slash-command menu before a session (and its runner) exists. Host-discovered skills are runner-owned, so they are NOT listed here — the session snapshot's `skills` field carries the merged set once a runner is bound. Empty list when the spec bundles no skills or when the bundle cannot be loaded.
	Skills []SkillSummary `json:"skills,omitempty"`

	// Terminals Terminal names declared in the spec's `terminals:` block, in declaration order, e.g. `["shell"]`. The Web UI gates its "new terminal" affordance on this list (creation is only offered for agents with terminal access) and offers these names as the launchable choices. Empty list when the spec declares no terminals or when the bundle cannot be loaded.
	Terminals []string `json:"terminals,omitempty"`

	// UpdatedAt Unix epoch timestamp of the last update, or `None` if never updated.
	UpdatedAt *int `json:"updated_at,omitempty"`

	// Version Monotonic version counter. Starts at 1, incremented on each update.
	Version *int `json:"version,omitempty"`
}

AgentObject API representation of a registered agent.

type AutomaticSessionRenameRequest

type AutomaticSessionRenameRequest struct {
	Title string `json:"title"`
}

AutomaticSessionRenameRequest Request body for the current-agent automatic rename endpoint.

type AutomaticSessionRenameResponse

type AutomaticSessionRenameResponse struct {
	Reason  *string `json:"reason,omitempty"`
	Renamed bool    `json:"renamed"`
	Title   *string `json:"title,omitempty"`
}

AutomaticSessionRenameResponse Result of a conditional automatic session rename.

type AutomaticallyRenameSessionV1SessionsSessionIDAutoTitlePostJSONRequestBody

type AutomaticallyRenameSessionV1SessionsSessionIDAutoTitlePostJSONRequestBody = AutomaticSessionRenameRequest

AutomaticallyRenameSessionV1SessionsSessionIDAutoTitlePostJSONRequestBody defines body for AutomaticallyRenameSessionV1SessionsSessionIDAutoTitlePost for application/json ContentType.

type BodyUpdateSessionAgentV1SessionsSessionIDAgentPut

type BodyUpdateSessionAgentV1SessionsSessionIDAgentPut struct {
	Bundle openapi_types.File `json:"bundle"`
}

BodyUpdateSessionAgentV1SessionsSessionIDAgentPut defines model for Body_update_session_agent_v1_sessions__session_id__agent_put.

type BodyUploadSessionFileV1SessionsSessionIDResourcesFilesPost

type BodyUploadSessionFileV1SessionsSessionIDResourcesFilesPost struct {
	File openapi_types.File `json:"file"`
}

BodyUploadSessionFileV1SessionsSessionIDResourcesFilesPost defines model for Body_upload_session_file_v1_sessions__session_id__resources_files_post.

type BrandingInfo

type BrandingInfo struct {
	AppName   *string           `json:"app_name"`
	Heading   *string           `json:"heading"`
	Logos     BrandingLogosInfo `json:"logos"`
	PoweredBy bool              `json:"powered_by"`
}

BrandingInfo defines model for BrandingInfo.

type BrandingLogosInfo

type BrandingLogosInfo struct {
	Favicon *string `json:"favicon"`
	Loading *string `json:"loading"`
	Main    *string `json:"main"`
}

BrandingLogosInfo defines model for BrandingLogosInfo.

type BrowserActionRequestEvent

type BrowserActionRequestEvent struct {
	// Action The browser action to perform — the `browser_` tool name with the prefix stripped, e.g. `"navigate"`, `"snapshot"`, `"click"`, `"type"`, `"screenshot"`.
	Action string `json:"action"`

	// ActionID Unique correlation id for this request, e.g. `"baction_abc123"`. Echoed on the claim and result routes.
	ActionID string `json:"action_id"`

	// Args Action arguments forwarded from the tool call, e.g. `{"url": "https://example.com"}`.
	Args           map[string]interface{} `json:"args"`
	SequenceNumber *int                   `json:"sequence_number,omitempty"`

	// Type Always `"browser.action_request"`.
	Type string `json:"type"`
}

BrowserActionRequestEvent Request that the desktop renderer perform one browser action.

Emitted by the server `POST /v1/sessions/{id}/browser/action_request` route when a runner-side `browser_*` tool dispatch needs the Omnigent desktop app's embedded browser to act. The event fans out on the session stream to every subscribed renderer; each renderer first POSTs `/browser/action_claim/{action_id}` and only the winning claimant executes the action and POSTs the result back to `/browser/action_result/{action_id}`. The claim lease prevents double execution when more than one renderer is subscribed.

type CancelledEvent

type CancelledEvent struct {
	// Response The final response object with `status="cancelled"`.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.cancelled"`.
	Type string `json:"type"`
}

CancelledEvent Terminal event for a turn cancelled before completion.

type ChildSessionList

type ChildSessionList struct {
	Data    []ChildSessionSummary `json:"data,omitempty"`
	FirstID *string               `json:"first_id,omitempty"`
	HasMore *bool                 `json:"has_more,omitempty"`
	LastID  *string               `json:"last_id,omitempty"`
	Object  *string               `json:"object,omitempty"`
}

ChildSessionList Paginated list of child sessions; `data` is a page of `ChildSessionSummary`.

type ChildSessionSummary

type ChildSessionSummary struct {
	// AgentID Agent id recorded on the latest task, e.g. `"ag_abc123"`. `None` if the child has no tasks yet (rare — `_spawn_one` creates a task atomically with the conversation).
	AgentID *string `json:"agent_id,omitempty"`

	// AgentName Agent type recorded on the latest task, e.g. `"researcher"`. Mirrors the `tool` prefix in `title` and is provided alongside it because the title is a denormalized string while `agent_name` is the durable per-task value.
	AgentName *string `json:"agent_name,omitempty"`

	// Busy `True` when the child's session loop is live. Mirrors the algorithm used by `GET /v1/sessions/{id}` to compute `status`: read the live in-memory cache first (`"running"`/`"waiting"` → busy), and fall back to the latest task's status on cache miss (`"queued"` / `"in_progress"` → busy). For NO_DBOS sessions the tasks table is not populated during active runs, so the cache consult is what keeps the rail's "Working" badge correct.
	Busy *bool `json:"busy,omitempty"`

	// CreatedAt Unix epoch timestamp of child creation.
	CreatedAt int `json:"created_at"`

	// CurrentTaskID Latest task id for the child (newest by `created_at`), e.g. `"task_abc123"`. `None` if no tasks exist.
	CurrentTaskID *string `json:"current_task_id,omitempty"`

	// CurrentTaskStatus Status of the latest task, e.g. `"completed"`, `"in_progress"`, `"failed"`. `None` if no tasks exist.
	CurrentTaskStatus *string `json:"current_task_status,omitempty"`

	// ID Child conversation/session identifier, e.g. `"conv_child123"`.
	ID string `json:"id"`

	// Kind Conversation kind discriminator, always `"sub_agent"` for rows surfaced by this endpoint.
	Kind *string `json:"kind,omitempty"`

	// Labels Session-scoped guardrails labels on the child conversation (mirrors `ConversationObject.labels`).
	Labels map[string]string `json:"labels,omitempty"`

	// LastMessagePreview Single-line preview of the most recent message item in the child's conversation, truncated to ~150 chars with a trailing ellipsis when longer. `None` when the child has no message items yet (rare — the spawn tool immediately commits a user message). Lets the UI render a real-time "what's the sub-agent saying right now" line without fetching the child's full item history.
	LastMessagePreview *string `json:"last_message_preview,omitempty"`

	// LastTaskError Error details from the child's most recent failed run, e.g. `{"code": "required_terminal_exited", "message": "..."}`. `None` when the child has no durable failure detail. This is the typed projection of runner-owned failure labels; clients should not parse those labels directly.
	LastTaskError map[string]string `json:"last_task_error,omitempty"`

	// Object Fixed resource type, always `"child_session"`.
	Object *string `json:"object,omitempty"`

	// ParentSessionID Parent conversation id (echo of the route's `session_id` path parameter), e.g. `"conv_parent987"`. Stable join key for clients that cache child rows across multiple parents.
	ParentSessionID string `json:"parent_session_id"`

	// PendingElicitationsCount Number of approval / input prompts the child is currently blocked on, read from the server's `omnigent.runtime.pending_elicitations` index. `> 0` means the sub-agent is parked awaiting user input — the Agents rail renders an "awaiting input" badge so a fanned-out sub-agent that needs attention is visible without opening its chat. Mirrors `SessionListItem.pending_elicitations_count`.
	PendingElicitationsCount *int `json:"pending_elicitations_count,omitempty"`

	// RoutedModel Model this sub-agent runs on when one was pinned for it, e.g. `"databricks-claude-opus-4-8"`. Read from the child's `model_override` — the field intelligent routing writes when it picks a model for a spawned child. `None` when the child inherits the parent/spec model.
	RoutedModel *string `json:"routed_model,omitempty"`

	// RoutingDecisionID Identifier of the routing decision that produced `routed_model`, mirroring `RoutingDecisionData.decision_id`. Read from the child's `omnigent.routing.decision_id` label, stamped when routing pins the model. `None` when the child was not routed.
	RoutingDecisionID *string `json:"routing_decision_id,omitempty"`

	// SessionName Sub-agent instance name, the suffix of `title` after the first `":"`, e.g. `"auth"`. `None` if `title` is `None` or missing a colon.
	SessionName *string `json:"session_name,omitempty"`
	TaskSummary *string `json:"task_summary,omitempty"`

	// Title Sub-agent title, `"{agent_type}:{session_name}"` as written by `omnigent.tools.builtins.spawn._spawn_one`, e.g. `"researcher:auth"`. `None` only for legacy / malformed rows; the spawn path always sets it.
	Title *string `json:"title,omitempty"`

	// Tool UI-facing sub-agent label. For Omnigent-spawned children this is derived from the prefix of `title` before the first `":"`, e.g. `"researcher"`. For Codex-native children this is the Codex-assigned `agent_nickname` when available, then `agent_role`, then `"Codex"`. Falls back to the raw title for legacy / malformed rows; `None` only when `title` itself is `None` or empty.
	Tool *string `json:"tool,omitempty"`

	// UpdatedAt Unix epoch timestamp of the child's most recent update.
	UpdatedAt int `json:"updated_at"`
}

ChildSessionSummary Summary of a sub-agent (child) session under a parent session.

Powers `GET /v1/sessions/{id}/child_sessions`. Lets the web / REPL debug surface enumerate sub-agent calls spawned from a parent session without parsing parent `function_call_output` JSON handles (the legacy TUI Ctrl+O path). The endpoint is the canonical "historical truth" source; the existing transient `session.created` SSE event handles live incremental updates.

Fields are derived from the child `Conversation` plus its latest `Task` (newest by `created_at`).

type ClearCodexGoalResponse

type ClearCodexGoalResponse struct {
	// Cleared `True` when Codex removed an existing goal; `False` when no goal was present.
	Cleared bool `json:"cleared"`
}

ClearCodexGoalResponse Response body for `DELETE /v1/sessions/{id}/codex_goal`.

type ClientTaskCancelEvent

type ClientTaskCancelEvent struct {
	// CallID Synthetic `call_id` the SDK uses to reconcile the local task; `None` when no pending tool call row exists for the task.
	CallID         *string `json:"call_id,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// TaskID Identifier of the client-side task being cancelled, e.g. `"resp_async_abc"`.
	TaskID string `json:"task_id"`

	// Type Always `"response.client_task.cancel"`.
	Type string `json:"type"`
}

ClientTaskCancelEvent Server-side request that the client cancel a tunneled tool call.

Emitted by `omnigent/runtime/workflow.py` when a parent cancellation needs to propagate to a long-running async client tool. Wire shape matches `workflow.py:4258-4266`.

type CodexGoalObject

type CodexGoalObject struct {
	// CreatedAt Unix timestamp when the goal was created, e.g. `1776272400`. `None` when not provided by Codex.
	CreatedAt *int `json:"created_at,omitempty"`

	// Objective Goal objective text, e.g. `"Finish the migration and keep tests green"`.
	Objective string `json:"objective"`

	// Status Raw Codex goal lifecycle status, e.g. `"active"`.
	Status string `json:"status"`

	// ThreadID Codex app-server thread id, e.g. `"thr_123"`.
	ThreadID string `json:"thread_id"`

	// TimeUsedSeconds Wall-clock seconds spent on this goal, e.g. `60`.
	TimeUsedSeconds int `json:"time_used_seconds"`

	// TokenBudget Optional token budget, e.g. `40000`. `None` means no explicit budget is set.
	TokenBudget *int `json:"token_budget,omitempty"`

	// TokensUsed Tokens spent while pursuing this goal, e.g. `1024`.
	TokensUsed int `json:"tokens_used"`

	// UpdatedAt Unix timestamp when the goal was last updated, e.g. `1776272460`. `None` when not provided by Codex.
	UpdatedAt *int `json:"updated_at,omitempty"`
}

CodexGoalObject Current Codex goal state for a Codex-native session.

Mirrors Codex app-server's `ThreadGoal` shape using Omnigent's snake-case API convention. `created_at` and `updated_at` are optional because older app-server documentation examples omit them even though the current protocol includes them.

type CodexGoalResponse

type CodexGoalResponse struct {
	// Goal Current goal state, or `None` when the session has no persisted Codex goal.
	Goal *CodexGoalObject `json:"goal"`
}

CodexGoalResponse Response body for reading or setting a Codex-native session goal.

type CompactionCompletedEvent

type CompactionCompletedEvent struct {
	CompactedMessages []map[string]interface{} `json:"compacted_messages,omitempty"`
	SequenceNumber    *int                     `json:"sequence_number,omitempty"`

	// Summary Text summary of the compacted conversation, or `None` for server-side compaction (already persisted).
	Summary *string `json:"summary,omitempty"`

	// SummaryModel Model used for summarization, or `None` if truncation-based or server-side.
	SummaryModel *string `json:"summary_model,omitempty"`

	// TotalTokens Tiktoken estimate of the post-compaction message context size, e.g. `8421`. Used by clients to update the context-ring immediately without waiting for the next `response.completed` usage report. `None` when token counting is unavailable.
	TotalTokens *int `json:"total_tokens,omitempty"`

	// Type Always `"response.compaction.completed"`.
	Type string `json:"type"`
}

CompactionCompletedEvent Conversation history compaction has finished.

Emitted after compaction completes — either by the server after `compact_conversation_now()` (explicit `/compact`), or by a harness that compacted its own internal context. Clients that rendered a "Compacting…" spinner on `CompactionInProgressEvent` should upgrade it to the permanent "Conversation compacted" marker on this event.

When emitted by a harness, `summary` and `summary_model` are populated so the runner can persist a compaction item for session resume. When emitted by the server's explicit `/compact` path, those fields are `None`.

type CompactionData

type CompactionData struct {
	CompactedMessages []map[string]interface{} `json:"compacted_messages,omitempty"`

	// LastItemID The item ID (inclusive) of the last conversation item covered by this summary, e.g. `"msg_abc123"`. Items at positions <= this item are summarized and do not need to be loaded for prompt construction.
	LastItemID string `json:"last_item_id"`

	// Model The model used to generate the summary, e.g. `"openai/gpt-4o"`.
	Model *string `json:"model,omitempty"`

	// Summary The LLM-generated summary text covering all conversation items up through `last_item_id`, e.g. `"User asked to analyze a dataset. Agent loaded data.csv and computed statistics."`.
	Summary string `json:"summary"`

	// TokenCount Approximate token count of the summary text, for budget tracking, e.g. `342`.
	TokenCount int  `json:"token_count"`
	WindowID   *int `json:"window_id,omitempty"`
}

CompactionData Data payload for a compaction summary item.

Stored as a conversation item of `type="compaction"`. The summary covers all items from the start of the conversation (or the previous compaction item) through the item identified by `last_item_id`.

type CompactionFailedEvent

type CompactionFailedEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// Type Always `"response.compaction.failed"`.
	Type string `json:"type"`
}

CompactionFailedEvent Conversation history compaction failed.

Emitted by `omnigent/server/routes/sessions.py` when `compact_conversation_now()` raises. Clients that rendered a "Compacting…" spinner on `CompactionInProgressEvent` should dismiss it without leaving a permanent marker, since the conversation history was not modified.

type CompactionInProgressEvent

type CompactionInProgressEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// Type Always `"response.compaction.in_progress"`.
	Type string `json:"type"`
}

CompactionInProgressEvent Conversation history is being compacted.

Emitted by `omnigent/runtime/compaction.py` while a compaction step runs so clients can render a "summarizing history…" indicator. Wire shape matches `compaction.py:765`.

type CompletedEvent

type CompletedEvent struct {
	// Response The final response object with `status="completed"`.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.completed"`.
	Type string `json:"type"`
}

CompletedEvent Terminal event for a successfully completed turn.

Carries the final `omnigent.server.schemas.ResponseObject`.

type ConversationDeleted

type ConversationDeleted struct {
	// Deleted Always `True`.
	Deleted *bool `json:"deleted,omitempty"`

	// ID ID of the deleted conversation, e.g. `"conv_abc123"`.
	ID string `json:"id"`

	// Object Fixed resource type, always `"conversation.deleted"`.
	Object *string `json:"object,omitempty"`
}

ConversationDeleted Confirmation payload returned after deleting a conversation.

type ConversationItem

type ConversationItem struct {
	// CreatedAt Unix epoch timestamp of creation.
	CreatedAt int `json:"created_at"`

	// CreatedBy Identity of the human actor who authored this item, or `None` for agent/tool/system items and single-user mode. Lets owner and collaborator messages be distinguished.
	CreatedBy *string `json:"created_by,omitempty"`

	// Data The typed data payload (MessageData, etc.).
	Data json.RawMessage `json:"data"`

	// ID Store-assigned item ID, e.g. `"msg_abc123"`.
	ID string `json:"id"`

	// ResponseID The task/response ID this item belongs to.
	ResponseID string `json:"response_id"`

	// Status Item status, e.g. `"completed"`.
	Status string `json:"status"`

	// Type Item type, e.g. `"message"`, `"function_call"`.
	Type string `json:"type"`
}

ConversationItem A persisted item with a store-assigned ID.

type ConversationRef

type ConversationRef struct {
	// ID Conversation identifier, e.g. `"conv_abc123"`.
	ID string `json:"id"`
}

ConversationRef Lightweight reference to a conversation, used in request and response bodies where only the conversation ID is needed.

type CopyFilesRequest

type CopyFilesRequest struct {
	// FileIds Non-empty, unique ids of the source-owned files to copy, e.g. `["file_abc123"]`.
	FileIds []string `json:"file_ids"`

	// SourceSessionID Session that owns the source files, e.g. `"conv_parent"`. Must be a strict ancestor of the destination.
	SourceSessionID string `json:"source_session_id"`
}

CopyFilesRequest Request to copy files from a lineage ancestor into a session.

The destination session is the path parameter; `source_session_id` must be a STRICT ancestor of the destination up its `parent_conversation_id` chain (spawn lineage) — the destination may not name itself as the source. The copy creates new child-scoped rows — it does not grant cross-session read access.

type CopySessionFilesV1SessionsSessionIDResourcesFilesCopyPostJSONRequestBody

type CopySessionFilesV1SessionsSessionIDResourcesFilesCopyPostJSONRequestBody = CopyFilesRequest

CopySessionFilesV1SessionsSessionIDResourcesFilesCopyPostJSONRequestBody defines body for CopySessionFilesV1SessionsSessionIDResourcesFilesCopyPost for application/json ContentType.

type CreateDefaultPolicyRequest

type CreateDefaultPolicyRequest struct {
	// FactoryParams Optional dict of kwargs passed to the handler when it is a factory function. Only valid for `type="python"`, e.g. `{"limit": 10}`.
	FactoryParams map[string]interface{} `json:"factory_params,omitempty"`

	// Handler Dotted import path (python) or HTTPS URL (url), e.g. `"github_mcp_policy.block_non_misc_push"` or `"https://example.com/policies/eval"`.
	Handler string `json:"handler"`

	// Name Human-readable policy name. Must be globally unique, e.g. `"block_non_feature_branch_push"`.
	Name string `json:"name"`

	// Type Handler discriminator: `"python"`, `"url"`,
	Type string `json:"type"`
}

CreateDefaultPolicyRequest Request body for `POST /v1/policies`.

type CreateDirectoryRequest

type CreateDirectoryRequest struct {
	// Path Absolute path of the directory to create on the host machine, e.g. `"/Users/corey/projects/new-app"`, or a tilde-prefixed path (`"~/scratch"`) the host expands against its own process owner. Missing parents are created.
	Path string `json:"path"`
}

CreateDirectoryRequest Request body for `POST /v1/hosts/{host_id}/directories`.

type CreateHostDirectoryV1HostsHostIDDirectoriesPostJSONRequestBody

type CreateHostDirectoryV1HostsHostIDDirectoriesPostJSONRequestBody = CreateDirectoryRequest

CreateHostDirectoryV1HostsHostIDDirectoriesPostJSONRequestBody defines body for CreateHostDirectoryV1HostsHostIDDirectoriesPost for application/json ContentType.

type CreateMcpServerV1SessionsSessionIDAgentMcpServersPostJSONRequestBody

type CreateMcpServerV1SessionsSessionIDAgentMcpServersPostJSONRequestBody = UpsertMCPServerRequest

CreateMcpServerV1SessionsSessionIDAgentMcpServersPostJSONRequestBody defines body for CreateMcpServerV1SessionsSessionIDAgentMcpServersPost for application/json ContentType.

type CreatePolicyV1PoliciesPostJSONRequestBody

type CreatePolicyV1PoliciesPostJSONRequestBody = CreateDefaultPolicyRequest

CreatePolicyV1PoliciesPostJSONRequestBody defines body for CreatePolicyV1PoliciesPost for application/json ContentType.

type CreatePolicyV1SessionsSessionIDPoliciesPostJSONRequestBody

type CreatePolicyV1SessionsSessionIDPoliciesPostJSONRequestBody = CreateSessionPolicyRequest

CreatePolicyV1SessionsSessionIDPoliciesPostJSONRequestBody defines body for CreatePolicyV1SessionsSessionIDPoliciesPost for application/json ContentType.

type CreateProjectRequest

type CreateProjectRequest struct {
	// Config Optional default session settings (opaque JSON object). Omitted / empty stores no defaults.
	Config map[string]interface{} `json:"config,omitempty"`

	// Name Human-readable project name. Trimmed; must be non-empty and at most 100 characters; unique among the caller's projects.
	Name string `json:"name"`
}

CreateProjectRequest Request body for `POST /v1/projects`.

type CreateProjectV1ProjectsPostJSONRequestBody

type CreateProjectV1ProjectsPostJSONRequestBody = CreateProjectRequest

CreateProjectV1ProjectsPostJSONRequestBody defines body for CreateProjectV1ProjectsPost for application/json ContentType.

type CreateSessionPolicyRequest

type CreateSessionPolicyRequest struct {
	// FactoryParams Optional dict of kwargs passed to the handler when it is a factory function. Only valid for `type="python"`, e.g. `{"limit": 10}`.
	FactoryParams map[string]interface{} `json:"factory_params,omitempty"`

	// Handler Dotted import path (python) or HTTPS URL (url), e.g. `"github_mcp_policy.block_non_misc_push"` or `"https://example.com/policies/eval"`.
	Handler string `json:"handler"`

	// Name Human-readable policy name. Must be unique within the session, e.g. `"block_non_feature_branch_push"`.
	Name string `json:"name"`

	// Type Handler discriminator: `"python"` or `"url"`.
	Type string `json:"type"`
}

CreateSessionPolicyRequest Request body for `POST /v1/sessions/{session_id}/policies`.

type CreatedEvent

type CreatedEvent struct {
	// Response The newly-allocated response object.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.created"`.
	Type string `json:"type"`
}

CreatedEvent Initial event emitted at the start of every streaming response.

Carries the freshly-allocated `omnigent.server.schemas.ResponseObject` (status will be `"queued"` or `"in_progress"` depending on whether the task started immediately).

type DailyCost

type DailyCost struct {
	CostUSD *float64 `json:"cost_usd,omitempty"`
	Day     string   `json:"day"`
}

DailyCost One day's LLM spend for the daily timeline chart.

type DeleteSessionV1SessionsSessionIDDeleteParams

type DeleteSessionV1SessionsSessionIDDeleteParams struct {
	// DeleteBranch Opt-in git cleanup, as a query param (`?delete_branch=true`). When `True` and the session has a server-created worktree (`git_branch` set), the host removes the worktree directory and deletes its branch (`git worktree remove --force` then `git branch -D`). Ignored for sessions with no worktree. Best-effort: a cleanup failure does not block the delete. Defaults to `False` (worktree and branch left untouched). See designs/SESSION_GIT_WORKTREE.md.
	DeleteBranch *bool `form:"delete_branch,omitempty" json:"delete_branch,omitempty"`
}

DeleteSessionV1SessionsSessionIDDeleteParams defines parameters for DeleteSessionV1SessionsSessionIDDelete.

type ElicitationRequestEvent

type ElicitationRequestEvent struct {
	// ElicitationID Unique correlation id for this request — appears in the consumer's approval event payload, e.g. `"elicit_abc123"`.
	ElicitationID string `json:"elicitation_id"`

	// Method MCP method literal — always `"elicitation/create"` (the value of `_MCP_ELICITATION_METHOD` in `omnigent/runtime/policies/approval.py`).
	Method *string `json:"method,omitempty"`

	// Params The MCP-shaped params block carrying the prompt and (form-mode only) the requested schema.
	Params         ElicitationRequestParams `json:"params"`
	SequenceNumber *int                     `json:"sequence_number,omitempty"`

	// Type Always `"response.elicitation_request"`.
	Type string `json:"type"`
}

ElicitationRequestEvent Synchronous request for a decision from upstream.

Emitted by Omnigent (or, under the new contract, by a harness) when the LLM / a tool / a policy needs a verdict before proceeding. The consumer replies via `POST /v1/sessions/{session_id}/events` with `type == "approval"` and `omnigent.server.schemas.ElicitationResult` fields in `data`. This preserves MCP request/reply correlation by id without threading elicitations through PATCH.

Wire shape matches the existing emit at `omnigent/runtime/policies/approval.py:175`.

type ElicitationRequestParams

type ElicitationRequestParams struct {
	// ContentPreview Truncated preview of the underlying request payload (≤1024 chars in current AP), for the consumer's renderer.
	ContentPreview *string `json:"content_preview,omitempty"`

	// Message Human-readable prompt the consumer renders, e.g. `"Approve running 'rm -rf /tmp/cache'?"`.
	Message string `json:"message"`

	// Mode MCP-standard discriminator. `"form"` collects structured input via `requestedSchema`; `"url"` directs upstream to an external URL for OAuth / out-of-band interaction.
	Mode *string `json:"mode,omitempty"`

	// Phase Omnigent policy-engine phase the elicitation belongs to, e.g. `"pre_tool_use"`.
	Phase *string `json:"phase,omitempty"`

	// PolicyName Omnigent policy that triggered the elicitation, e.g. `"approve_shell_commands"`.
	PolicyName *string `json:"policy_name,omitempty"`

	// RequestedSchema JSON-Schema dict for form mode (or `None` for url mode). camelCase preserved per MCP spec, e.g. `{"type": "object", "properties": {"approve": {"type": "boolean"}}}`.
	RequestedSchema map[string]interface{} `json:"requestedSchema,omitempty"`

	// TargetSessionID AP session whose resolve endpoint owns this elicitation, e.g. `"conv_child123"`. Present when a child/sub-agent prompt is mirrored into an ancestor stream; `None` means resolve against the current session.
	TargetSessionID *string `json:"target_session_id,omitempty"`

	// URL External URL for url mode (or `None` for form mode), e.g. `"https://oauth.example.com/authorize?..."`.
	URL                  *string                `json:"url,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ElicitationRequestParams Inner `params` block of a `ElicitationRequestEvent`.

The standard fields (`mode`, `message`, `requestedSchema`, `url`) mirror MCP's `ElicitRequestFormParams` / `ElicitRequestUrlParams` byte-for-byte (Principle 8 — adopt MCP's wire shape verbatim where it overlaps). The AP-specific extensions (`phase`, `policy_name`, `content_preview`, `target_session_id`) carry policy-engine context and mirrored-child routing for the consumer's renderer; MCP's `extra="allow"` config permits them under the same params block. Wire shape matches `omnigent/runtime/policies/approval.py:175`.

func (ElicitationRequestParams) Get added in v0.2.1

func (a ElicitationRequestParams) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ElicitationRequestParams. Returns the specified element and whether it was found

func (ElicitationRequestParams) MarshalJSON added in v0.2.1

func (a ElicitationRequestParams) MarshalJSON() ([]byte, error)

Override default JSON handling for ElicitationRequestParams to handle AdditionalProperties

func (*ElicitationRequestParams) Set added in v0.2.1

func (a *ElicitationRequestParams) Set(fieldName string, value interface{})

Setter for additional properties for ElicitationRequestParams

func (*ElicitationRequestParams) UnmarshalJSON added in v0.2.1

func (a *ElicitationRequestParams) UnmarshalJSON(b []byte) error

Override default JSON handling for ElicitationRequestParams to handle AdditionalProperties

type ElicitationResolvedEvent

type ElicitationResolvedEvent struct {
	// ElicitationID Correlation id of the elicitation being cleared, e.g. `"elicit_abc123"`. Must match the id of a prior `ElicitationRequestEvent`.
	ElicitationID  string `json:"elicitation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"response.elicitation_resolved"`.
	Type string `json:"type"`
}

ElicitationResolvedEvent Signal that a previously-published elicitation is no longer outstanding, even though no UI `approval` verdict was delivered through `POST /v1/sessions/{id}/events`.

Emitted by the runner when its own `_pending_approvals` Future is popped without a verdict (the runner's wait timed out, the turn was cancelled, the harness exited) so the AP server's `omnigent.runtime.pending_elicitations` index can decrement the sidebar badge in lockstep with the underlying awaiter's lifecycle. Without this signal, the AP server has no way to learn that the prompt is dead and the badge stays stuck.

Idempotent on the consumer side: the Omnigent server's index decrement is a no-op when the id isn't tracked, so the runner can fire-and-forget on every Future cleanup.

type ErrorData

type ErrorData struct {
	// Code Stable error classifier, e.g. `"native_terminal_start_failed"`.
	Code string `json:"code"`

	// Message Human-readable error message, e.g. `"Native Codex requires the 'codex' CLI on PATH."`.
	Message string `json:"message"`

	// Source Error source, e.g. `"execution"`.
	Source string `json:"source"`
}

ErrorData Data for a persisted error banner item.

These items mirror `response.error` events so clients can render the same error banner after reconnect / refresh. They are listed in `NON_CONTENT_ITEM_TYPES` because they are operator-visible transcript metadata, not content the next agent turn should receive.

type ErrorDetail

type ErrorDetail struct {
	// Cause Optional one/two-sentence explanation of why it failed. Paired with `title`.
	Cause *string `json:"cause,omitempty"`

	// Code Error code string, e.g. `"server_error"`, `"invalid_input"`.
	Code string `json:"code"`

	// Message Human-readable error description. Always populated; older clients render this verbatim.
	Message string `json:"message"`

	// Remediation Optional concrete next step to fix it, e.g. a command to run. `None` when there is no single clear fix.
	Remediation *string `json:"remediation,omitempty"`

	// Title Optional short headline naming what went wrong, e.g. `"Claude Code can't run as root"`. Present when the runner recognized the failure (see `omnigent.runner.launch_failure`); lets the UI show a clear card title instead of the raw `code`.
	Title *string `json:"title,omitempty"`
}

ErrorDetail Machine-readable error information attached to a failed response.

type ErrorEvent

type ErrorEvent struct {
	// Error Classified error description.
	Error          RetryErrorDetail `json:"error"`
	SequenceNumber *int             `json:"sequence_number,omitempty"`

	// Source Origin of the error — `"llm"` for LLM-call failures, `"execution"` for timeouts, `"tool"` for tool failures (currently emitted by retry exhaustion paths).
	Source string `json:"source"`

	// ToolName Tool identifier when `source == "tool"`; `None` for the other sources.
	ToolName *string `json:"tool_name,omitempty"`

	// Type Always `"response.error"`.
	Type string `json:"type"`
}

ErrorEvent Non-recoverable error reported during the turn.

Emitted from multiple sites in `omnigent/runtime/workflow.py` — terminal LLM failures (`_emit_llm_error_event`), execution timeouts (`_handle_execution_timeout`), and the agent-loop catch-all (`except Exception`). Wire shape matches those emits.

type FailedEvent

type FailedEvent struct {
	// Response The final response object with `status="failed"` and `error` populated.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.failed"`.
	Type string `json:"type"`
}

FailedEvent Terminal event for a turn that ended with an error.

Carries the final `omnigent.server.schemas.ResponseObject` whose `error` field describes the failure.

type ForkSessionV1SessionsSourceIDForkPostJSONRequestBody

type ForkSessionV1SessionsSourceIDForkPostJSONRequestBody = SessionForkRequest

ForkSessionV1SessionsSourceIDForkPostJSONRequestBody defines body for ForkSessionV1SessionsSourceIDForkPost for application/json ContentType.

type FunctionCallData

type FunctionCallData struct {
	// Arguments JSON-encoded arguments string.
	Arguments string `json:"arguments"`

	// CallID Unique call identifier from the LLM, e.g. `"call_abc123"`.
	CallID string `json:"call_id"`
	Model  string `json:"model"`

	// Name Tool function name, e.g. `"search.web"`.
	Name string `json:"name"`
}

FunctionCallData Data for a function_call item.

**Parameters**

- `agent` — Agent name. Serialized as `"model"` in JSON.

type FunctionCallOutputData

type FunctionCallOutputData struct {
	// CallID The call_id this output corresponds to, e.g. `"call_abc123"`.
	CallID string `json:"call_id"`

	// Output The tool's string result.
	Output string `json:"output"`
}

FunctionCallOutputData Data for a function_call_output item.

type GetSessionV1SessionsSessionIDGetParams

type GetSessionV1SessionsSessionIDGetParams struct {
	// IncludeItems When `False`, skip the committed-items read and return `items=[]`. The web chat surface passes `False` because it hydrates the transcript via the paginated `GET /sessions/{id}/items` endpoint in parallel and never reads the snapshot's copy; the items read is the single most expensive step of the snapshot build.
	IncludeItems *bool `form:"include_items,omitempty" json:"include_items,omitempty"`

	// IncludeLiveness When `False`, skip the runner/host liveness lookup and return `runner_online`/`host_online` as `None`. The web chat surface passes `False` because it sources liveness from the `/health` poll and the WS stream, not the snapshot.
	IncludeLiveness *bool `form:"include_liveness,omitempty" json:"include_liveness,omitempty"`

	// RefreshState When `True`, refresh runner-derived snapshot overlays from the live session instead of serving stale AP-process caches. Browser reload/bind requests use this to recover from fixed bugs without restarting the AP server.
	RefreshState *bool `form:"refresh_state,omitempty" json:"refresh_state,omitempty"`
}

GetSessionV1SessionsSessionIDGetParams defines parameters for GetSessionV1SessionsSessionIDGet.

type GrantPermissionRequest

type GrantPermissionRequest struct {
	// Level Numeric permission level: `1` = read, `2` = edit, `3` = manage.
	Level int `json:"level"`

	// UserID The user to grant access to, e.g. `"alice@example.com"` or `"__public__"` for public read access.
	UserID string `json:"user_id"`
}

GrantPermissionRequest Request body for `PUT /v1/sessions/{id}/permissions`.

type GrantPermissionV1SessionsSessionIDPermissionsPutJSONRequestBody

type GrantPermissionV1SessionsSessionIDPermissionsPutJSONRequestBody = GrantPermissionRequest

GrantPermissionV1SessionsSessionIDPermissionsPutJSONRequestBody defines body for GrantPermissionV1SessionsSessionIDPermissionsPut for application/json ContentType.

type HTTPValidationError

type HTTPValidationError struct {
	Detail []ValidationError `json:"detail,omitempty"`
}

HTTPValidationError defines model for HTTPValidationError.

type HealthHealthGetParams

type HealthHealthGetParams struct {
	// SessionID Optional single session id, e.g. `"conv_abc123"`.
	SessionID *string `form:"session_id,omitempty" json:"session_id,omitempty"`

	// SessionIds Optional comma-separated session ids for batch lookup, e.g. `"conv_abc,conv_def,conv_ghi"`.
	SessionIds *string `form:"session_ids,omitempty" json:"session_ids,omitempty"`
}

HealthHealthGetParams defines parameters for HealthHealthGet.

type HeartbeatEvent

type HeartbeatEvent struct {
	// LastEventSeq Sequence number of the last non- heartbeat event seen on the same stream, e.g. `42`. `None` before any user-visible event has fired (first heartbeat of the turn, before deltas land), or when the producer chose not to populate it.
	LastEventSeq   *int `json:"last_event_seq,omitempty"`
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// ServerTime ISO 8601 UTC timestamp at emission, e.g. `"2026-04-27T15:30:00Z"`. `None` when the producer chose not to populate it (legacy emitters).
	ServerTime *string `json:"server_time,omitempty"`

	// Type Always `"response.heartbeat"`.
	Type string `json:"type"`
}

HeartbeatEvent Keepalive event emitted on a fixed cadence during streaming.

Lets consumers detect stalled producers via missed-interval timing. Cadence is set by `_HEARTBEAT_INTERVAL_S` in `omnigent/runtime/workflow.py` (15 seconds at the time of writing). Wire shape matches the existing emit at `omnigent/runtime/workflow.py:4636-4639`.

Per `designs/SERVER_HARNESS_CONTRACT.md` §Heartbeats, the event MAY carry timing metadata so consumers can do richer dead-detection than "did anything arrive":

  • `server_time` is the producer's wall-clock at emission, letting consumers detect clock drift between producer and consumer.
  • `last_event_seq` is the `sequence_number` of the most recent NON-heartbeat event (or `None` when this is the first heartbeat before any user-visible event), letting consumers detect dropped events on reconnect.

Both fields are optional on the wire (`None` round-trips as omitted) so older AP→harness pairs that pre-date the field addition still parse cleanly.

type ImportItemInput

type ImportItemInput struct {
	Data       map[string]interface{} `json:"data"`
	ResponseID string                 `json:"response_id"`
	Type       string                 `json:"type"`
}

ImportItemInput One normalized existing Omnigent item received from the CLI.

type ImportSessionRequest

type ImportSessionRequest struct {
	ExternalSessionID string            `json:"external_session_id"`
	Force             *bool             `json:"force,omitempty"`
	Items             []ImportItemInput `json:"items"`
	Source            string            `json:"source"`
	Workspace         *string           `json:"workspace,omitempty"`
}

ImportSessionRequest Request body for importing one local harness session.

type ImportSessionResponse

type ImportSessionResponse struct {
	ItemCount int    `json:"item_count"`
	SessionID string `json:"session_id"`
	Status    string `json:"status"`
}

ImportSessionResponse Result of importing or locating one source session.

type ImportSessionV1ImportsPostJSONRequestBody

type ImportSessionV1ImportsPostJSONRequestBody = ImportSessionRequest

ImportSessionV1ImportsPostJSONRequestBody defines body for ImportSessionV1ImportsPost for application/json ContentType.

type InProgressEvent

type InProgressEvent struct {
	// Response The response object with `status="in_progress"`.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.in_progress"`.
	Type string `json:"type"`
}

InProgressEvent Event emitted once the task transitions to in-progress.

Always follows `response.created` (and `response.queued` for background tasks).

type IncompleteDetails

type IncompleteDetails struct {
	// Reason Reason the response stopped early, e.g. `"max_output_tokens"`, `"max_tool_calls"`.
	Reason string `json:"reason"`
}

IncompleteDetails Details explaining why a response is incomplete.

type IncompleteEvent

type IncompleteEvent struct {
	// Response The final response object with `status="incomplete"` and `incomplete_details` populated describing the reason.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.incomplete"`.
	Type string `json:"type"`
}

IncompleteEvent Terminal event for a turn that ended without completing (e.g. hit the iteration cap or token budget).

type LaunchRunnerRequest

type LaunchRunnerRequest struct {
	// Git Optional git worktree options. In create mode the server creates a worktree for a new branch off `workspace` on the host and binds the runner to it (the fork-resume path; mirrors `POST /v1/sessions`). In bind mode (`existing_worktree=True`) `workspace` already IS a worktree — no worktree is created; `branch_name` is recorded as the session's `git_branch` for display and opt-in cleanup. `None` binds `workspace` directly. `host_id` is always present (it is in the path), so no host check is needed here.
	Git *SessionGitOptions `json:"git,omitempty"`

	// SessionID Session to bind the new runner to, e.g. `"conv_abc123"`.
	SessionID string `json:"session_id"`

	// Workspace Absolute path on the host machine to use as the runner's working directory, e.g. `"/Users/corey/projects/frontend"`. When `git` is set, this is interpreted as the source repository directory and the runner starts in the created worktree instead.
	Workspace string `json:"workspace"`
}

LaunchRunnerRequest Request body for `POST /v1/hosts/{host_id}/runners`.

type LaunchRunnerV1HostsHostIDRunnersPostJSONRequestBody

type LaunchRunnerV1HostsHostIDRunnersPostJSONRequestBody = LaunchRunnerRequest

LaunchRunnerV1HostsHostIDRunnersPostJSONRequestBody defines body for LaunchRunnerV1HostsHostIDRunnersPost for application/json ContentType.

type ListBuiltinAgentsV1AgentsGetParams

type ListBuiltinAgentsV1AgentsGetParams struct {
	// Limit Maximum number of agents to return (1-1000).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor — return agents after this id.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor — return agents before this id.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort order, `"asc"` or `"desc"`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

ListBuiltinAgentsV1AgentsGetParams defines parameters for ListBuiltinAgentsV1AgentsGet.

type ListChildSessionsV1SessionsSessionIDChildSessionsGetParams

type ListChildSessionsV1SessionsSessionIDChildSessionsGetParams struct {
	// Limit Maximum number of children to return (1-1000, default 20 — sub-agent fan-out is typically sparse compared to conversation items).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor — return children whose id appears after this one in sort order, e.g. `"conv_child123"`.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor — return children before this one.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort direction, `"desc"` (newest-first, default) or `"asc"`. Sort column is `created_at`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`

	// Tool When set, only return children whose title starts with this agent type (the segment before the `":"`). Combined with `session_name` to form the exact title `"{tool}:{session_name}"` for server-side filtering.
	Tool *string `form:"tool,omitempty" json:"tool,omitempty"`

	// SessionName When set alongside `tool`, only return children whose title matches `"{tool}:{session_name}"` exactly.
	SessionName *string `form:"session_name,omitempty" json:"session_name,omitempty"`
}

ListChildSessionsV1SessionsSessionIDChildSessionsGetParams defines parameters for ListChildSessionsV1SessionsSessionIDChildSessionsGet.

type ListCommentsV1SessionsSessionIDCommentsGetParams

type ListCommentsV1SessionsSessionIDCommentsGetParams struct {
	// Path When provided, only return comments for this file, e.g. `"src/App.tsx"`.
	Path *string `form:"path,omitempty" json:"path,omitempty"`
}

ListCommentsV1SessionsSessionIDCommentsGetParams defines parameters for ListCommentsV1SessionsSessionIDCommentsGet.

type ListEnvironmentRootV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemGetParams

type ListEnvironmentRootV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemGetParams struct {
	// Limit Maximum number of entries to return (1-1000, default 20).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor entry id for forward pagination.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor entry id for backward pagination.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort order, `"asc"` or `"desc"`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

ListEnvironmentRootV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemGetParams defines parameters for ListEnvironmentRootV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemGet.

type ListHostFilesystemRootV1HostsHostIDFilesystemGetParams

type ListHostFilesystemRootV1HostsHostIDFilesystemGetParams struct {
	// Limit Max entries per page.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Optional forward pagination cursor (entry path), e.g. `"/Users/corey/projects/m"`.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Optional backward pagination cursor.
	Before *string `form:"before,omitempty" json:"before,omitempty"`
}

ListHostFilesystemRootV1HostsHostIDFilesystemGetParams defines parameters for ListHostFilesystemRootV1HostsHostIDFilesystemGet.

type ListHostFilesystemV1HostsHostIDFilesystemPathGetParams

type ListHostFilesystemV1HostsHostIDFilesystemPathGetParams struct {
	// Limit Max entries per page.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Optional forward pagination cursor.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Optional backward pagination cursor.
	Before *string `form:"before,omitempty" json:"before,omitempty"`
}

ListHostFilesystemV1HostsHostIDFilesystemPathGetParams defines parameters for ListHostFilesystemV1HostsHostIDFilesystemPathGet.

type ListHostWorktreesV1HostsHostIDWorktreesGetParams

type ListHostWorktreesV1HostsHostIDWorktreesGetParams struct {
	// Path Absolute path inside the repo on the host to list worktrees for, e.g. `"/Users/alice/myrepo"`.
	Path string `form:"path" json:"path"`
}

ListHostWorktreesV1HostsHostIDWorktreesGetParams defines parameters for ListHostWorktreesV1HostsHostIDWorktreesGet.

type ListPermissionsV1SessionsSessionIDPermissionsGetParams

type ListPermissionsV1SessionsSessionIDPermissionsGetParams struct {
	// Limit Max grants to return (1–1000, default 100).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor: user_id to start after
	After *string `form:"after,omitempty" json:"after,omitempty"`
}

ListPermissionsV1SessionsSessionIDPermissionsGetParams defines parameters for ListPermissionsV1SessionsSessionIDPermissionsGet.

type ListSessionFilesV1SessionsSessionIDResourcesFilesGetParams

type ListSessionFilesV1SessionsSessionIDResourcesFilesGetParams struct {
	// Limit Maximum number of files to return.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor file ID for forward pagination.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor file ID for backward pagination.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort direction, `"desc"` or `"asc"`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

ListSessionFilesV1SessionsSessionIDResourcesFilesGetParams defines parameters for ListSessionFilesV1SessionsSessionIDResourcesFilesGet.

type ListSessionItemsV1SessionsSessionIDItemsGetParams

type ListSessionItemsV1SessionsSessionIDItemsGetParams struct {
	// Limit Maximum number of items to return (1-1000, default 100).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor — return items after this item ID, e.g. `"msg_abc123"`.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor — return items before this item ID.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort order, `"asc"` (chronological, default) or `"desc"`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

ListSessionItemsV1SessionsSessionIDItemsGetParams defines parameters for ListSessionItemsV1SessionsSessionIDItemsGet.

type ListSessionResourcesV1SessionsSessionIDResourcesGetParams

type ListSessionResourcesV1SessionsSessionIDResourcesGetParams struct {
	// Type Optional resource-type filter, e.g. `"environment"` / `"terminal"` / `"file"`. Forwarded to the runner (its registry applies it) and honored by the local-registry fallback and the file-store merge below.
	Type *string `form:"type,omitempty" json:"type,omitempty"`
}

ListSessionResourcesV1SessionsSessionIDResourcesGetParams defines parameters for ListSessionResourcesV1SessionsSessionIDResourcesGet.

type ListSessionsV1SessionsGetParams

type ListSessionsV1SessionsGetParams struct {
	// Limit Maximum number of sessions to return (1-1000, default 20).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor — return sessions after this session ID in sort order, e.g. `"conv_abc123"`.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor — return sessions before this session ID.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// AgentID When set, only return sessions bound to this agent, e.g. `"ag_abc123"`. `None` returns sessions across all agents.
	AgentID *string `form:"agent_id,omitempty" json:"agent_id,omitempty"`

	// AgentName When set, only return sessions whose bound agent row has this name. This intentionally includes session-scoped agents that share a name but have distinct bundles. `None` disables the filter.
	AgentName *string `form:"agent_name,omitempty" json:"agent_name,omitempty"`

	// Order Sort direction, `"desc"` (newest-first) or `"asc"` (oldest-first).
	Order *string `form:"order,omitempty" json:"order,omitempty"`

	// SortBy Column to sort on, `"created_at"` or `"updated_at"`.
	SortBy *string `form:"sort_by,omitempty" json:"sort_by,omitempty"`

	// SearchQuery Case-insensitive substring filter on the session title or conversation content. `None` or empty string disables the filter. A session matches if its title contains the query or any of its conversation items' text does. Powers the sidebar's session search.
	SearchQuery *string `form:"search_query,omitempty" json:"search_query,omitempty"`

	// IncludeArchived When `False` (default), archived sessions are omitted. When `True`, archived sessions are returned alongside active ones (the sidebar groups them into an "Archived" section). Powers the sidebar's "Show archived" toggle.
	IncludeArchived *bool `form:"include_archived,omitempty" json:"include_archived,omitempty"`

	// Kind Conversation kind to return. `"default"` (the default) returns only top-level user-initiated sessions — the sidebar's view. `"sub_agent"` returns only sub-agent child sessions. `"any"` returns both; this lets the new-session agent picker discover agents that are only bound to sub-agent sessions (e.g. ones uploaded via `sys_session_create`).
	Kind    *string `form:"kind,omitempty" json:"kind,omitempty"`
	Project *string `form:"project,omitempty" json:"project,omitempty"`

	// Pinned When `True`, return only sessions the user has pinned (the `omnigent.pinned` label). Lets the sidebar enumerate pinned sessions that fall outside the loaded pagination window. `False` (default) disables it.
	Pinned *bool `form:"pinned,omitempty" json:"pinned,omitempty"`
}

ListSessionsV1SessionsGetParams defines parameters for ListSessionsV1SessionsGet.

type MCPServerStartup

type MCPServerStartup struct {
	// Error Failure detail when `status == "failed"`, e.g. `"handshaking with MCP server failed"`. `None` otherwise.
	Error *string `json:"error,omitempty"`

	// Status Latest startup state reported by the harness, mirroring Codex's `McpServerStartupState` enum.
	Status string `json:"status"`
}

MCPServerStartup One MCP server's startup state within a `session.mcp_startup` event.

type MCPServerSummary

type MCPServerSummary struct {
	// Args Command-line arguments for `transport="stdio"` servers, e.g. `["mcp-server-github"]`. Empty list when unset.
	Args []string `json:"args,omitempty"`

	// Command Executable path for `transport="stdio"` servers, e.g. `"uvx"`. `None` for http servers.
	Command *string `json:"command,omitempty"`

	// Description Optional free-text description from the spec, e.g. `"GitHub MCP server"`. `None` when unset.
	Description *string `json:"description,omitempty"`

	// Headers HTTP headers for `transport="http"` servers. Values are always `"[REDACTED]"`; only the key names are exposed.
	Headers map[string]string `json:"headers,omitempty"`

	// Name Server name as declared in the agent spec, e.g. `"github"`.
	Name string `json:"name"`

	// Transport Transport type — `"stdio"` or `"http"`.
	Transport string `json:"transport"`

	// URL HTTP(S) endpoint URL for `transport="http"` servers, e.g. `"https://mcp.example.com/sse"`. `None` for stdio servers.
	URL *string `json:"url,omitempty"`
}

MCPServerSummary Safe subset of an MCP server's configuration for API exposure.

Header values are redacted (`"[REDACTED]"`) so callers can see which headers are configured without leaking the actual secrets. `env` is still fully excluded.

type MessageData

type MessageData struct {
	// Content Heterogeneous content blocks, e.g. `[{"type": "input_text", "text": "Hello"}]`.
	Content []map[string]interface{} `json:"content"`

	// Interrupted `True` when an assistant message is a durable partial response from an interrupted external-native turn, e.g. Codex `turn/completed` with status `"interrupted"`. Defaults to `False` and is omitted from serialized payloads in that case.
	Interrupted *bool `json:"interrupted,omitempty"`

	// IsMeta `True` for durable context that must be replayed to agents but hidden from user-facing transcripts, e.g. injected skill instructions. Defaults to `False` and is omitted from serialized payloads in that case.
	IsMeta *bool   `json:"is_meta,omitempty"`
	Model  *string `json:"model,omitempty"`

	// Role `"user"` or `"assistant"`.
	Role string `json:"role"`
}

MessageData Data for a message item (user or assistant).

**Parameters**

- `agent` — Agent name (required for assistant messages, absent for user). Serialized as `"model"` in JSON.

type MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

type MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0 = string

MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0 defines parameters for MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost.

type MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

type MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1 = int

MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1 defines parameters for MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost.

type MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties

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

MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties defines parameters for MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost.

func (MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) AsMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

AsMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0 returns the union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties as a MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

func (MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) AsMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

AsMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1 returns the union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties as a MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

func (*MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) FromMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

FromMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0 overwrites any union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties as the provided MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

func (*MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) FromMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

FromMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1 overwrites any union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties as the provided MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

func (MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) MarshalJSON

func (*MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) MergeMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

MergeMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0 performs a merge with any union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties, using the provided MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody0

func (*MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) MergeMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

MergeMintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1 performs a merge with any union data inside the MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties, using the provided MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody1

func (*MintRunnerOwnerTokenV1RunnersRunnerIDTokenPost200JSONResponseBody_AdditionalProperties) UnmarshalJSON

type ModelUsage

type ModelUsage struct {
	// CacheCreationInputTokens Cumulative tokens written to the prompt cache, e.g. `2000`. `None` when not recorded.
	CacheCreationInputTokens *int `json:"cache_creation_input_tokens,omitempty"`

	// CacheReadInputTokens Cumulative tokens read from the prompt cache, e.g. `8000`. `None` when not recorded.
	CacheReadInputTokens *int `json:"cache_read_input_tokens,omitempty"`

	// InputTokens Cumulative non-cached input (prompt) tokens for this model over the subtree, e.g. `12000`. `None` when not recorded.
	InputTokens *int `json:"input_tokens,omitempty"`

	// OutputTokens Cumulative output (completion) tokens, e.g. `3400`. `None` when not recorded.
	OutputTokens *int `json:"output_tokens,omitempty"`

	// TotalCostUSD Cumulative USD spend attributed to this model, e.g. `0.42`. Present **only when this model's turns were priced** (same "priced ⟺ key present" contract as the session total); `None` when the model is unpriced, so the sum of priced per-model costs equals the session `total_cost_usd`.
	TotalCostUSD *float64 `json:"total_cost_usd,omitempty"`

	// TotalTokens Cumulative total tokens (counts cache buckets too, as the harness reports), e.g. `15400`. `None` when not recorded.
	TotalTokens *int `json:"total_tokens,omitempty"`
}

ModelUsage Cumulative token/cost usage attributed to a single LLM model.

One value in the `usage_by_model` map on `SessionResponse` / `SessionUsageEvent`, keyed by the raw harness-reported model id (e.g. `"claude-sonnet-4-6"`, `"databricks-gpt-5-5"`). Counts are summed over the session's subtree (itself + sub-agent descendants), so a parent folds in sub-agents that ran a different model. Token buckets mirror the flat per-session breakdown.

type NativeModelOption

type NativeModelOption struct {
	DefaultReasoningEffort    *string                       `json:"defaultReasoningEffort,omitempty"`
	DisplayName               *string                       `json:"displayName,omitempty"`
	ID                        string                        `json:"id"`
	IsDefault                 *bool                         `json:"isDefault,omitempty"`
	Model                     *string                       `json:"model,omitempty"`
	SupportedReasoningEfforts []NativeReasoningEffortOption `json:"supportedReasoningEfforts,omitempty"`
}

NativeModelOption One runner-owned native model-picker row.

type NativeReasoningEffortOption

type NativeReasoningEffortOption struct {
	Description     *string `json:"description,omitempty"`
	ReasoningEffort string  `json:"reasoningEffort"`
}

NativeReasoningEffortOption Reasoning-effort metadata advertised by a native model catalog.

type NativeToolData

type NativeToolData struct {
	// Item The raw dict from the Responses API output, e.g. `{"type": "web_search_call", "id": "ws_abc", "status": "completed", "action": {...}}`.
	Item map[string]interface{} `json:"item"`
}

NativeToolData A provider-native tool output item (e.g. `web_search_call`).

These are executed server-side by the LLM provider and returned as opaque dicts. Agent-plane persists and replays them so the LLM sees its own tool results on subsequent iterations.

type OutputFileDoneEvent

type OutputFileDoneEvent struct {
	// ContentType MIME content type if the annotation supplied one, e.g. `"application/pdf"`. `None` otherwise.
	ContentType *string `json:"content_type,omitempty"`

	// FileID Identifier of the materialized file, e.g. `"file_abc123"`.
	FileID string `json:"file_id"`

	// Filename Original filename if the annotation supplied one, e.g. `"report.pdf"`. `None` otherwise.
	Filename       *string `json:"filename,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// Type Always `"response.output_file.done"`.
	Type string `json:"type"`
}

OutputFileDoneEvent A streamed file output completed materializing.

Emitted by `_emit_file_annotation_events` in `omnigent/runtime/workflow.py` once per file annotation in the assistant's output. `filename` and `content_type` are only populated when the originating annotation carried them.

type OutputItemDoneEvent

type OutputItemDoneEvent struct {
	// Item The completed item dict. Heterogeneous and item-type-specific; see `omnigent/entities/conversation.py` for the per-type `*Data` shapes that drive serialization. Example for a function_call item: `{"id": "fc_abc123", "type": "function_call", "status": "action_required", "name": "search.web", "arguments": "{\"q\": \"foo\"}", "call_id": "call_xyz"}`.
	Item           map[string]interface{} `json:"item"`
	SequenceNumber *int                   `json:"sequence_number,omitempty"`

	// Type Always `"response.output_item.done"`.
	Type string `json:"type"`
}

OutputItemDoneEvent A conversation output item completed during the turn.

Carries any item type the conversation persists (message, function_call, function_call_output, reasoning, compaction, native_tool, …). The `item` payload's wire shape merges common fields (`id`, `type`, `status`) with the type-specific data fields — it is NOT nested as `{type, data}`.

type OutputTextDeltaEvent

type OutputTextDeltaEvent struct {
	// Delta The text fragment for this chunk, e.g. `"Hello"`.
	Delta string `json:"delta"`

	// Final Optional provider completion marker for the message.
	Final *bool `json:"final,omitempty"`

	// Index 0-based chunk order within the message, e.g. `3`. Used to suppress repeated chunks; `None` for in-process streaming.
	Index *int `json:"index,omitempty"`

	// MessageID For native terminal streaming, the provider's stable per-message id, e.g. `"2ca51d97-2f0f-493a-aed7-85a5b56c5747"`. `None` for ordinary in-process task streaming, where deltas group by the active response.
	MessageID      *string `json:"message_id,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// Type Always `"response.output_text.delta"`.
	Type string `json:"type"`
}

OutputTextDeltaEvent Incremental assistant-text token emitted during streaming.

Wire shape matches the existing raw-dict emit at `omnigent/runtime/workflow.py:1352-1356`.

type PaginatedList

type PaginatedList struct {
	// Data Page of results. Items are heterogeneous (`ResponseObject`, `ConversationObject`, `FileObject`, or dicts) and list is invariant, so no single concrete type satisfies all callers.
	Data []interface{} `json:"data,omitempty"`

	// FirstID ID of the first item in the page, or `None` if the page is empty, e.g. `"resp_abc123"`.
	FirstID *string `json:"first_id,omitempty"`

	// HasMore Whether more items exist beyond this page.
	HasMore *bool `json:"has_more,omitempty"`

	// LastID ID of the last item in the page, or `None` if the page is empty, e.g. `"resp_xyz789"`.
	LastID *string `json:"last_id,omitempty"`

	// Object Fixed resource type, always `"list"`.
	Object *string `json:"object,omitempty"`
}

PaginatedList A paginated list response following cursor-based pagination.

type PermissionObject

type PermissionObject struct {
	// ConversationID The session, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Level Numeric permission level (1=read, 2=edit, 3=manage).
	Level int `json:"level"`

	// UserID The grantee, e.g. `"alice@example.com"`.
	UserID string `json:"user_id"`
}

PermissionObject API representation of a session permission grant.

type PolicyDeniedEvent

type PolicyDeniedEvent struct {
	// ConversationID Session/conversation id the DENY applies to, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Phase The policy phase the DENY landed on, e.g. `"tool_call"`.
	Phase *string `json:"phase,omitempty"`

	// Reason Human-readable deny reason from the deciding policy, e.g. `"Blocked by policy."`.
	Reason         *string `json:"reason,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// Type Always `"response.policy_denied"`.
	Type string `json:"type"`
}

PolicyDeniedEvent Signal that a policy DENY was enforced on a native harness turn.

A native harness (Claude Code, Codex, ...) routes each tool call and prompt through Omnigent's policy engine via the vendor command-hook (`POST /v1/sessions/{id}/policies/evaluate`). The DENY verdict is returned synchronously to that hook, so unlike the SDK/wrap path there is no stream-visible signal that a native action was blocked — only the *effect* (the blocked tool never runs). This event surfaces the decision itself on the session stream so observers (the web UI, the capability bench) can see a native DENY as a positive signal rather than infer it from an absence.

Fire-and-forget and observational: it does not gate the turn (the hook response already did that) and carries no correlation id.

type PolicySummary

type PolicySummary struct {
	// Description Short detail string about the policy implementation. For function policies: the callable dotted path. For prompt policies: the first line of the prompt. `None` when not available.
	Description *string `json:"description,omitempty"`

	// Name Policy name as declared in the agent spec, e.g. `"block_long_sleep"`.
	Name string `json:"name"`

	// On List of phase selectors the policy fires on, e.g. `["tool_call"]` or `["request", "response"]`.
	On []string `json:"on"`

	// Type Policy type discriminator — `"function"` or `"prompt"`.
	Type string `json:"type"`
}

PolicySummary Safe subset of a policy's spec for API exposure.

Exposes the policy name, type, and phases so the UI can display which guardrails are active on an agent. The full policy body (prompt text, callable path, label conditions) is intentionally excluded — this is a summary for display, not a full spec.

type PresenceViewer

type PresenceViewer struct {
	// Idle Whether every stream the user holds reports an idle (backgrounded) tab. The web greys idle viewers' avatars.
	Idle *bool `json:"idle,omitempty"`

	// JoinedAt ISO 8601 UTC timestamp of when the user joined, e.g. `"2026-06-10T17:00:00Z"`. Stable across reconnects within the server's leave-grace window.
	JoinedAt string `json:"joined_at"`

	// UserID The viewer's authenticated identity, e.g. `"alice@example.com"`. Never the reserved single-user `"local"` sentinel — presence only tracks distinct human actors (see `attribution_user`).
	UserID string `json:"user_id"`
}

PresenceViewer One user currently viewing a session (holding its SSE stream open).

type PutReadStateV1SessionsSessionIDReadStatePutJSONRequestBody

type PutReadStateV1SessionsSessionIDReadStatePutJSONRequestBody = ReadStatePutRequest

PutReadStateV1SessionsSessionIDReadStatePutJSONRequestBody defines body for PutReadStateV1SessionsSessionIDReadStatePut for application/json ContentType.

type QueuedEvent

type QueuedEvent struct {
	// Response The response object with `status="queued"`.
	Response       ResponseObject `json:"response"`
	SequenceNumber *int           `json:"sequence_number,omitempty"`

	// Type Always `"response.queued"`.
	Type string `json:"type"`
}

QueuedEvent Optional event emitted between `created` and `in_progress` for background tasks that are queued before they start.

Foreground streaming responses skip this event.

type ReadOrListEnvironmentPathV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemRelativePathGetParams

type ReadOrListEnvironmentPathV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemRelativePathGetParams struct {
	// Limit Maximum number of entries to return for directory listings (1-1000, default 20). Ignored for file reads.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor entry id for forward pagination.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Before Cursor entry id for backward pagination.
	Before *string `form:"before,omitempty" json:"before,omitempty"`

	// Order Sort order, `"asc"` or `"desc"`.
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

ReadOrListEnvironmentPathV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemRelativePathGetParams defines parameters for ReadOrListEnvironmentPathV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDFilesystemRelativePathGet.

type ReadStatePutRequest

type ReadStatePutRequest struct {
	// LastSeen Wall-clock baseline in seconds, e.g. `1717000000`. Marking seen sets this to "now"; marking unread pins it to `updated_at - 1` so the row reads unseen.
	LastSeen int `json:"last_seen"`

	// Unread Whether this session is explicitly flagged unread for the caller.
	Unread bool `json:"unread"`
}

ReadStatePutRequest Request body for `PUT /v1/sessions/{session_id}/read-state`.

Sets the *calling user's* read tracking for one session. Mirrors the two values the web client keeps per session: a "last seen" wall-clock baseline (seconds since epoch) and an explicit "marked unread" override. The unread dot shows when `updated_at > last_seen` and the session is finished; `unread` separately pins the override so the thread the user is *viewing* (or a running one) still surfaces the dot where the automatic "seen" logic would otherwise suppress it.

type ReasoningData

type ReasoningData struct {
	// Content Raw reasoning content blocks, or `None` if redacted.
	Content []map[string]string `json:"content,omitempty"`

	// EncryptedContent Encrypted reasoning content, or `None`.
	EncryptedContent *string `json:"encrypted_content,omitempty"`
	Model            string  `json:"model"`

	// Summary Summary text blocks, e.g. `[{"type": "summary_text", "text": "..."}]`.
	Summary []map[string]string `json:"summary"`
}

ReasoningData Data for a reasoning item.

**Parameters**

- `agent` — Agent name. Serialized as `"model"` in JSON.

type ReasoningStartedEvent

type ReasoningStartedEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// Type Always `"response.reasoning.started"`.
	Type string `json:"type"`
}

ReasoningStartedEvent Marker emitted once when a reasoning block begins.

Fired even when the reasoning content itself is encrypted / redacted (so no delta events follow), letting clients render a "thinking…" indicator regardless of provider verification status. Wire shape matches `omnigent/runtime/workflow.py:1350`.

type ReasoningSummaryTextDeltaEvent

type ReasoningSummaryTextDeltaEvent struct {
	// Delta The summary text fragment, e.g. `"Will use the search tool to gather context."`.
	Delta          string `json:"delta"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"response.reasoning_summary_text.delta"`.
	Type string `json:"type"`
}

ReasoningSummaryTextDeltaEvent Incremental reasoning-summary token.

Emitted when `reasoning.summary` is configured on the request. Wire shape matches `omnigent/runtime/workflow.py:1370-1373`.

type ReasoningTextDeltaEvent

type ReasoningTextDeltaEvent struct {
	// Delta The reasoning text fragment, e.g. `"Considering the user's intent..."`.
	Delta          string `json:"delta"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"response.reasoning_text.delta"`.
	Type string `json:"type"`
}

ReasoningTextDeltaEvent Incremental reasoning-text token (full chain-of-thought).

Only emitted by providers that surface reasoning content (e.g. OpenAI o-series with appropriate verification). Wire shape matches `omnigent/runtime/workflow.py:1358-1364`.

type ResourceEventData

type ResourceEventData struct {
	// EventType The SSE event type literal, e.g. `"session.resource.created"` or `"session.resource.deleted"`.
	EventType string `json:"event_type"`

	// Resource Full resource object dict for `created` events. `None` for `deleted` events.
	Resource map[string]interface{} `json:"resource,omitempty"`

	// ResourceID Opaque id of the affected resource, e.g. `"terminal_bash_s1"` or `"file_abc123"`.
	ResourceID string `json:"resource_id"`

	// ResourceType Kind of resource, e.g. `"terminal"`, `"file"`, `"environment"`.
	ResourceType string `json:"resource_type"`
}

ResourceEventData Data payload for a persisted resource lifecycle event.

These items are written to the conversation store when a session resource is created or deleted, so reconnecting clients can discover resource history without replaying the live SSE stream. The agent loop filters them out of the LLM's message context (they are metadata, not conversation content).

type ResponseObject

type ResponseObject struct {
	// Background Whether this response was created as a background task.
	Background *bool `json:"background,omitempty"`

	// CompletedAt Unix epoch timestamp of completion, or `None` if not yet complete.
	CompletedAt *int `json:"completed_at,omitempty"`

	// Conversation Reference to the owning conversation.
	Conversation *ConversationRef `json:"conversation,omitempty"`

	// CreatedAt Unix epoch timestamp of creation.
	CreatedAt int `json:"created_at"`

	// Error Error details if the response failed.
	Error *ErrorDetail `json:"error,omitempty"`

	// ID Unique response identifier, e.g. `"resp_abc123"`.
	ID string `json:"id"`

	// IncompleteDetails Details if the response is incomplete (e.g. hit token limit).
	IncompleteDetails *IncompleteDetails `json:"incomplete_details,omitempty"`

	// Instructions Per-request system instructions override, or `None`.
	Instructions *string `json:"instructions,omitempty"`

	// Model Agent name that produced this response, e.g. `"research-agent"`.
	Model string `json:"model"`

	// Object Fixed resource type, always `"response"`.
	Object *string `json:"object,omitempty"`

	// Output Heterogeneous output items (messages, reasoning, function_calls) serialized as dicts; shape varies by item type. Empty for non-completed responses.
	Output []map[string]interface{} `json:"output,omitempty"`

	// PreviousResponseID ID of the prior response in the conversation thread, or `None` for the first turn.
	PreviousResponseID *string `json:"previous_response_id,omitempty"`

	// Reasoning Reasoning configuration, e.g. `{"effort": "medium"}`.
	Reasoning map[string]string `json:"reasoning,omitempty"`

	// Status Lifecycle status, one of `"queued"`, `"in_progress"`, `"completed"`, `"failed"`, `"incomplete"`, `"cancelled"`.
	Status string `json:"status"`

	// Store Whether this response is persisted. Always `True`.
	Store *bool `json:"store,omitempty"`

	// Usage Token usage statistics, or `None` if not yet available.
	Usage *Usage `json:"usage,omitempty"`
}

ResponseObject API representation of a response (task execution result).

type RetryErrorDetail

type RetryErrorDetail struct {
	// Code Stable error classifier, e.g. `"timeout"`, `"rate_limit"`.
	Code string `json:"code"`

	// Detail Optional provider-specific structured fields (e.g. `{"status_code": 429, "retry_after": 5}`); `None` when the classifier had no extra context.
	Detail map[string]interface{} `json:"detail,omitempty"`

	// Message Human-readable summary, e.g. `"Connection timed out after 30s"`.
	Message string `json:"message"`
}

RetryErrorDetail Error block carried by `RetryEvent` and `ErrorEvent`.

Mirrors the shape that `llm_retry.py` and `tool_retry.py` emit today — flat `code` / `message` plus an optional `detail` for provider-specific structured fields.

type RetryEvent

type RetryEvent struct {
	// Attempt 1-based count of the upcoming attempt (i.e. attempt that will run AFTER this delay), e.g. `2` for the first retry.
	Attempt int `json:"attempt"`

	// DelaySeconds Seconds the producer will sleep before retrying, rounded to two decimals, e.g. `1.5`.
	DelaySeconds float64 `json:"delay_seconds"`

	// Error Classified error description for the failure being retried.
	Error RetryErrorDetail `json:"error"`

	// MaxAttempts Total tries allowed by the retry policy, e.g. `3`. Lets clients render "attempt 2 of 3".
	MaxAttempts    int  `json:"max_attempts"`
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// Source Origin of the retried failure — `"llm"` for LLM-call retries, `"tool"` for tool-call retries.
	Source string `json:"source"`

	// ToolName Tool identifier when `source == "tool"`, e.g. `"search.web"`. `None` for LLM retries.
	ToolName *string `json:"tool_name,omitempty"`

	// Type Always `"response.retry"`.
	Type string `json:"type"`
}

RetryEvent A retryable failure was caught and a retry is scheduled.

Emitted by `omnigent/runtime/llm_retry.py` (LLM calls) and `omnigent/runtime/tool_retry.py` (tool calls) before sleeping for the backoff delay. Wire shape matches `llm_retry.py:329-340` and `tool_retry.py:168-180`.

type RoutingDecisionData

type RoutingDecisionData struct {
	Agent *string `json:"agent,omitempty"`

	// Applied `True` when the brain actually ran on `model` this turn (optimize mode, no user pin); `False` when the router only WOULD have picked it (advise/shadow mode, or a user model pin won) — the UI renders "would have picked".
	Applied bool `json:"applied"`

	// AttemptedOverride Model the spawning agent asked for and the router overrode, e.g. `"databricks-gpt-5-5"` — an LLM-supplied `args.model` on a child session, or a native spawn's own `requested_model`. `None` when nothing was asked for, or when the router's pick names the same arm as the ask.
	AttemptedOverride *string `json:"attempted_override,omitempty"`

	// DecisionID Router decision identifier, e.g. `"3f1c…"`. Correlates the transcript item with the routing telemetry event and the child-sessions API row. `None` for decisions made before decision ids existed.
	DecisionID *string `json:"decision_id,omitempty"`

	// Harness Harness the decision applies to, e.g. `"claude-native"` or `"codex"`. `None` when the decision picked a model only (no harness dimension).
	Harness *string `json:"harness,omitempty"`

	// Model The concrete brain model the router chose, e.g. `"databricks-claude-opus-4-8"`.
	Model string `json:"model"`

	// Rationale The router's one-line explanation, shown as muted secondary text, e.g. `"Multi-file refactor needs deep reasoning."`.
	Rationale string `json:"rationale"`

	// RawModel The router-vocabulary pick before resolution to a servable catalog id, e.g. `"gpt-5-6-sol"`. `None` when the pick needed no resolution.
	RawModel *string `json:"raw_model,omitempty"`

	// RouterSource Which router produced the decision — `"databricks-aigw"` for the external AI-Gateway `task_v1` service, `"oss-llm"` for the built-in judge. Deliberately a plain `str` rather than a `Literal`: a source added later must still round-trip through stored rows and the wire instead of failing validation. `None` on rows written before the field existed.
	RouterSource *string `json:"router_source,omitempty"`

	// Scope What the decision governs — `"session"` (auto-harness session routing), `"turn"` (per-turn routing), `"child_session"` (an Omnigent-spawned sub-agent) or `"native_subagent"` (a Task / `spawn_agent` spawn routed inside the harness). Defaults to `"turn"` so rows persisted before this field deserialize.
	Scope *string `json:"scope,omitempty"`
}

RoutingDecisionData Data payload for an intelligent model-router decision item.

Emitted by the server-side smart routing path at the START of an advised turn and persisted as a display-only transcript item so the model the router chose shows in the conversation flow the moment the turn begins. Listed in `NON_CONTENT_ITEM_TYPES` so the agent loop's history filter skips it — the brain never sees (or answers) its own router note. The runner's harness-input builder also drops every non message/function_call type, a second guarantee it stays out of the model's context.

type RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

type RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0 = string

RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0 defines parameters for RunnerStatusV1RunnersRunnerIDStatusGet.

type RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

type RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1 = bool

RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1 defines parameters for RunnerStatusV1RunnersRunnerIDStatusGet.

type RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties

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

RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties defines parameters for RunnerStatusV1RunnersRunnerIDStatusGet.

func (RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) AsRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

AsRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0 returns the union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties as a RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

func (RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) AsRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

AsRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1 returns the union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties as a RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

func (*RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) FromRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

FromRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0 overwrites any union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties as the provided RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

func (*RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) FromRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

FromRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1 overwrites any union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties as the provided RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

func (RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) MarshalJSON

func (*RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) MergeRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

MergeRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0 performs a merge with any union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties, using the provided RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody0

func (*RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) MergeRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

MergeRunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1 performs a merge with any union data inside the RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties, using the provided RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody1

func (*RunnerStatusV1RunnersRunnerIDStatusGet200JSONResponseBody_AdditionalProperties) UnmarshalJSON

type SandboxStatus

type SandboxStatus struct {
	// Error Failure detail when `stage == "failed"`, e.g. `"managed sandbox launch failed: spend limit reached"`. `None` otherwise.
	Error *string `json:"error,omitempty"`

	// Stage Current launch stage, e.g. `"provisioning"` — one of `SandboxLaunchStage`, in pipeline order: `provisioning` (creating the sandbox) → `cloning` (cloning the repository workspace; skipped when the session has none) → `starting` (starting the in-sandbox host) → `connecting` (launching the agent runner) → `ready` / `failed`.
	Stage string `json:"stage"`
}

SandboxStatus Managed-sandbox launch progress for a `host_type="managed"` session.

Carried on the session snapshot only while the session's background sandbox launch is in flight or has failed; `None` for sessions without a managed launch and once the launch succeeds (the session then looks like any host-bound session).

type SearchEnvironmentFilesUnderV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchPathGetParams

type SearchEnvironmentFilesUnderV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchPathGetParams struct {
	// Q Case-insensitive search substring.
	Q string `form:"q" json:"q"`

	// Include Comma-separated include globs.
	Include *string `form:"include,omitempty" json:"include,omitempty"`

	// Exclude Comma-separated exclude globs.
	Exclude *string `form:"exclude,omitempty" json:"exclude,omitempty"`

	// Limit Maximum number of results (1-500, default 500).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

SearchEnvironmentFilesUnderV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchPathGetParams defines parameters for SearchEnvironmentFilesUnderV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchPathGet.

type SearchEnvironmentFilesV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchGetParams

type SearchEnvironmentFilesV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchGetParams struct {
	// Q Case-insensitive search substring, e.g. `"test.md"`. Must contain at least one non-whitespace character.
	Q string `form:"q" json:"q"`

	// Include Comma-separated glob patterns scoping which files are returned, e.g. `"*.ts,src/**"`.
	Include *string `form:"include,omitempty" json:"include,omitempty"`

	// Exclude Comma-separated glob patterns for files to drop, e.g. `"**/node_modules,*.test.ts"`.
	Exclude *string `form:"exclude,omitempty" json:"exclude,omitempty"`

	// Limit Maximum number of results (1-500, default 500).
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

SearchEnvironmentFilesV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchGetParams defines parameters for SearchEnvironmentFilesV1SessionsSessionIDResourcesEnvironmentsEnvironmentIDSearchGet.

type SendCommentsRequest

type SendCommentsRequest struct {
	// CommentIds IDs of comments to send.
	CommentIds []string `json:"comment_ids"`

	// Instruction Optional custom instruction prefix; defaults to the standard "Please address the following file review comments." header.
	Instruction *string `json:"instruction,omitempty"`
}

SendCommentsRequest Request body for `POST .../comments/send`.

type SendToAgentV1SessionsSessionIDCommentsSendPostJSONRequestBody

type SendToAgentV1SessionsSessionIDCommentsSendPostJSONRequestBody = SendCommentsRequest

SendToAgentV1SessionsSessionIDCommentsSendPostJSONRequestBody defines body for SendToAgentV1SessionsSessionIDCommentsSendPost for application/json ContentType.

type ServerInfoResponse

type ServerInfoResponse struct {
	AccountsEnabled         bool                    `json:"accounts_enabled"`
	Branding                BrandingInfo            `json:"branding"`
	DatabricksFeatures      bool                    `json:"databricks_features"`
	DictationAvailable      bool                    `json:"dictation_available"`
	Features                map[string]bool         `json:"features"`
	HarnessInstallEnabled   bool                    `json:"harness_install_enabled"`
	InstallableHarnesses    []string                `json:"installable_harnesses"`
	LoginURL                *string                 `json:"login_url"`
	ManagedSandboxesEnabled bool                    `json:"managed_sandboxes_enabled"`
	NeedsSetup              bool                    `json:"needs_setup"`
	PublicSharingEnabled    bool                    `json:"public_sharing_enabled"`
	SandboxProvider         *string                 `json:"sandbox_provider"`
	SandboxProviders        []string                `json:"sandbox_providers"`
	ServerVersion           string                  `json:"server_version"`
	SharingMode             string                  `json:"sharing_mode"`
	SingleUser              bool                    `json:"single_user"`
	SmartRoutingEnabled     bool                    `json:"smart_routing_enabled"`
	SmartRoutingSources     SmartRoutingSourcesInfo `json:"smart_routing_sources"`
}

ServerInfoResponse defines model for ServerInfoResponse.

type ServerStreamEvent

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

ServerStreamEvent defines model for ServerStreamEvent.

func (ServerStreamEvent) AsBrowserActionRequestEvent

func (t ServerStreamEvent) AsBrowserActionRequestEvent() (BrowserActionRequestEvent, error)

AsBrowserActionRequestEvent returns the union data inside the ServerStreamEvent as a BrowserActionRequestEvent

func (ServerStreamEvent) AsCancelledEvent

func (t ServerStreamEvent) AsCancelledEvent() (CancelledEvent, error)

AsCancelledEvent returns the union data inside the ServerStreamEvent as a CancelledEvent

func (ServerStreamEvent) AsClientTaskCancelEvent

func (t ServerStreamEvent) AsClientTaskCancelEvent() (ClientTaskCancelEvent, error)

AsClientTaskCancelEvent returns the union data inside the ServerStreamEvent as a ClientTaskCancelEvent

func (ServerStreamEvent) AsCompactionCompletedEvent

func (t ServerStreamEvent) AsCompactionCompletedEvent() (CompactionCompletedEvent, error)

AsCompactionCompletedEvent returns the union data inside the ServerStreamEvent as a CompactionCompletedEvent

func (ServerStreamEvent) AsCompactionFailedEvent

func (t ServerStreamEvent) AsCompactionFailedEvent() (CompactionFailedEvent, error)

AsCompactionFailedEvent returns the union data inside the ServerStreamEvent as a CompactionFailedEvent

func (ServerStreamEvent) AsCompactionInProgressEvent

func (t ServerStreamEvent) AsCompactionInProgressEvent() (CompactionInProgressEvent, error)

AsCompactionInProgressEvent returns the union data inside the ServerStreamEvent as a CompactionInProgressEvent

func (ServerStreamEvent) AsCompletedEvent

func (t ServerStreamEvent) AsCompletedEvent() (CompletedEvent, error)

AsCompletedEvent returns the union data inside the ServerStreamEvent as a CompletedEvent

func (ServerStreamEvent) AsCreatedEvent

func (t ServerStreamEvent) AsCreatedEvent() (CreatedEvent, error)

AsCreatedEvent returns the union data inside the ServerStreamEvent as a CreatedEvent

func (ServerStreamEvent) AsElicitationRequestEvent

func (t ServerStreamEvent) AsElicitationRequestEvent() (ElicitationRequestEvent, error)

AsElicitationRequestEvent returns the union data inside the ServerStreamEvent as a ElicitationRequestEvent

func (ServerStreamEvent) AsElicitationResolvedEvent

func (t ServerStreamEvent) AsElicitationResolvedEvent() (ElicitationResolvedEvent, error)

AsElicitationResolvedEvent returns the union data inside the ServerStreamEvent as a ElicitationResolvedEvent

func (ServerStreamEvent) AsErrorEvent

func (t ServerStreamEvent) AsErrorEvent() (ErrorEvent, error)

AsErrorEvent returns the union data inside the ServerStreamEvent as a ErrorEvent

func (ServerStreamEvent) AsFailedEvent

func (t ServerStreamEvent) AsFailedEvent() (FailedEvent, error)

AsFailedEvent returns the union data inside the ServerStreamEvent as a FailedEvent

func (ServerStreamEvent) AsHeartbeatEvent

func (t ServerStreamEvent) AsHeartbeatEvent() (HeartbeatEvent, error)

AsHeartbeatEvent returns the union data inside the ServerStreamEvent as a HeartbeatEvent

func (ServerStreamEvent) AsInProgressEvent

func (t ServerStreamEvent) AsInProgressEvent() (InProgressEvent, error)

AsInProgressEvent returns the union data inside the ServerStreamEvent as a InProgressEvent

func (ServerStreamEvent) AsIncompleteEvent

func (t ServerStreamEvent) AsIncompleteEvent() (IncompleteEvent, error)

AsIncompleteEvent returns the union data inside the ServerStreamEvent as a IncompleteEvent

func (ServerStreamEvent) AsOutputFileDoneEvent

func (t ServerStreamEvent) AsOutputFileDoneEvent() (OutputFileDoneEvent, error)

AsOutputFileDoneEvent returns the union data inside the ServerStreamEvent as a OutputFileDoneEvent

func (ServerStreamEvent) AsOutputItemDoneEvent

func (t ServerStreamEvent) AsOutputItemDoneEvent() (OutputItemDoneEvent, error)

AsOutputItemDoneEvent returns the union data inside the ServerStreamEvent as a OutputItemDoneEvent

func (ServerStreamEvent) AsOutputTextDeltaEvent

func (t ServerStreamEvent) AsOutputTextDeltaEvent() (OutputTextDeltaEvent, error)

AsOutputTextDeltaEvent returns the union data inside the ServerStreamEvent as a OutputTextDeltaEvent

func (ServerStreamEvent) AsPolicyDeniedEvent

func (t ServerStreamEvent) AsPolicyDeniedEvent() (PolicyDeniedEvent, error)

AsPolicyDeniedEvent returns the union data inside the ServerStreamEvent as a PolicyDeniedEvent

func (ServerStreamEvent) AsQueuedEvent

func (t ServerStreamEvent) AsQueuedEvent() (QueuedEvent, error)

AsQueuedEvent returns the union data inside the ServerStreamEvent as a QueuedEvent

func (ServerStreamEvent) AsReasoningStartedEvent

func (t ServerStreamEvent) AsReasoningStartedEvent() (ReasoningStartedEvent, error)

AsReasoningStartedEvent returns the union data inside the ServerStreamEvent as a ReasoningStartedEvent

func (ServerStreamEvent) AsReasoningSummaryTextDeltaEvent

func (t ServerStreamEvent) AsReasoningSummaryTextDeltaEvent() (ReasoningSummaryTextDeltaEvent, error)

AsReasoningSummaryTextDeltaEvent returns the union data inside the ServerStreamEvent as a ReasoningSummaryTextDeltaEvent

func (ServerStreamEvent) AsReasoningTextDeltaEvent

func (t ServerStreamEvent) AsReasoningTextDeltaEvent() (ReasoningTextDeltaEvent, error)

AsReasoningTextDeltaEvent returns the union data inside the ServerStreamEvent as a ReasoningTextDeltaEvent

func (ServerStreamEvent) AsRetryEvent

func (t ServerStreamEvent) AsRetryEvent() (RetryEvent, error)

AsRetryEvent returns the union data inside the ServerStreamEvent as a RetryEvent

func (ServerStreamEvent) AsSessionAgentChangedEvent

func (t ServerStreamEvent) AsSessionAgentChangedEvent() (SessionAgentChangedEvent, error)

AsSessionAgentChangedEvent returns the union data inside the ServerStreamEvent as a SessionAgentChangedEvent

func (ServerStreamEvent) AsSessionChangedFilesInvalidatedEvent

func (t ServerStreamEvent) AsSessionChangedFilesInvalidatedEvent() (SessionChangedFilesInvalidatedEvent, error)

AsSessionChangedFilesInvalidatedEvent returns the union data inside the ServerStreamEvent as a SessionChangedFilesInvalidatedEvent

func (ServerStreamEvent) AsSessionChildSessionUpdatedEvent

func (t ServerStreamEvent) AsSessionChildSessionUpdatedEvent() (SessionChildSessionUpdatedEvent, error)

AsSessionChildSessionUpdatedEvent returns the union data inside the ServerStreamEvent as a SessionChildSessionUpdatedEvent

func (ServerStreamEvent) AsSessionCollaborationModeEvent

func (t ServerStreamEvent) AsSessionCollaborationModeEvent() (SessionCollaborationModeEvent, error)

AsSessionCollaborationModeEvent returns the union data inside the ServerStreamEvent as a SessionCollaborationModeEvent

func (ServerStreamEvent) AsSessionCreatedEvent

func (t ServerStreamEvent) AsSessionCreatedEvent() (SessionCreatedEvent, error)

AsSessionCreatedEvent returns the union data inside the ServerStreamEvent as a SessionCreatedEvent

func (ServerStreamEvent) AsSessionHeartbeatEvent

func (t ServerStreamEvent) AsSessionHeartbeatEvent() (SessionHeartbeatEvent, error)

AsSessionHeartbeatEvent returns the union data inside the ServerStreamEvent as a SessionHeartbeatEvent

func (ServerStreamEvent) AsSessionInputConsumedEvent

func (t ServerStreamEvent) AsSessionInputConsumedEvent() (SessionInputConsumedEvent, error)

AsSessionInputConsumedEvent returns the union data inside the ServerStreamEvent as a SessionInputConsumedEvent

func (ServerStreamEvent) AsSessionInterruptedEvent

func (t ServerStreamEvent) AsSessionInterruptedEvent() (SessionInterruptedEvent, error)

AsSessionInterruptedEvent returns the union data inside the ServerStreamEvent as a SessionInterruptedEvent

func (ServerStreamEvent) AsSessionMCPStartupEvent

func (t ServerStreamEvent) AsSessionMCPStartupEvent() (SessionMCPStartupEvent, error)

AsSessionMCPStartupEvent returns the union data inside the ServerStreamEvent as a SessionMCPStartupEvent

func (ServerStreamEvent) AsSessionModelEvent

func (t ServerStreamEvent) AsSessionModelEvent() (SessionModelEvent, error)

AsSessionModelEvent returns the union data inside the ServerStreamEvent as a SessionModelEvent

func (ServerStreamEvent) AsSessionModelOptionsEvent

func (t ServerStreamEvent) AsSessionModelOptionsEvent() (SessionModelOptionsEvent, error)

AsSessionModelOptionsEvent returns the union data inside the ServerStreamEvent as a SessionModelOptionsEvent

func (ServerStreamEvent) AsSessionPresenceEvent

func (t ServerStreamEvent) AsSessionPresenceEvent() (SessionPresenceEvent, error)

AsSessionPresenceEvent returns the union data inside the ServerStreamEvent as a SessionPresenceEvent

func (ServerStreamEvent) AsSessionReasoningEffortEvent

func (t ServerStreamEvent) AsSessionReasoningEffortEvent() (SessionReasoningEffortEvent, error)

AsSessionReasoningEffortEvent returns the union data inside the ServerStreamEvent as a SessionReasoningEffortEvent

func (ServerStreamEvent) AsSessionResourceCreatedEvent

func (t ServerStreamEvent) AsSessionResourceCreatedEvent() (SessionResourceCreatedEvent, error)

AsSessionResourceCreatedEvent returns the union data inside the ServerStreamEvent as a SessionResourceCreatedEvent

func (ServerStreamEvent) AsSessionResourceDeletedEvent

func (t ServerStreamEvent) AsSessionResourceDeletedEvent() (SessionResourceDeletedEvent, error)

AsSessionResourceDeletedEvent returns the union data inside the ServerStreamEvent as a SessionResourceDeletedEvent

func (ServerStreamEvent) AsSessionSandboxStatusEvent

func (t ServerStreamEvent) AsSessionSandboxStatusEvent() (SessionSandboxStatusEvent, error)

AsSessionSandboxStatusEvent returns the union data inside the ServerStreamEvent as a SessionSandboxStatusEvent

func (ServerStreamEvent) AsSessionSkillsEvent

func (t ServerStreamEvent) AsSessionSkillsEvent() (SessionSkillsEvent, error)

AsSessionSkillsEvent returns the union data inside the ServerStreamEvent as a SessionSkillsEvent

func (ServerStreamEvent) AsSessionStatusEvent

func (t ServerStreamEvent) AsSessionStatusEvent() (SessionStatusEvent, error)

AsSessionStatusEvent returns the union data inside the ServerStreamEvent as a SessionStatusEvent

func (ServerStreamEvent) AsSessionSupersededEvent

func (t ServerStreamEvent) AsSessionSupersededEvent() (SessionSupersededEvent, error)

AsSessionSupersededEvent returns the union data inside the ServerStreamEvent as a SessionSupersededEvent

func (ServerStreamEvent) AsSessionTerminalActivityEvent

func (t ServerStreamEvent) AsSessionTerminalActivityEvent() (SessionTerminalActivityEvent, error)

AsSessionTerminalActivityEvent returns the union data inside the ServerStreamEvent as a SessionTerminalActivityEvent

func (ServerStreamEvent) AsSessionTerminalPendingEvent

func (t ServerStreamEvent) AsSessionTerminalPendingEvent() (SessionTerminalPendingEvent, error)

AsSessionTerminalPendingEvent returns the union data inside the ServerStreamEvent as a SessionTerminalPendingEvent

func (ServerStreamEvent) AsSessionTodosEvent

func (t ServerStreamEvent) AsSessionTodosEvent() (SessionTodosEvent, error)

AsSessionTodosEvent returns the union data inside the ServerStreamEvent as a SessionTodosEvent

func (ServerStreamEvent) AsSessionUsageEvent

func (t ServerStreamEvent) AsSessionUsageEvent() (SessionUsageEvent, error)

AsSessionUsageEvent returns the union data inside the ServerStreamEvent as a SessionUsageEvent

func (ServerStreamEvent) AsToolOutputDeltaEvent

func (t ServerStreamEvent) AsToolOutputDeltaEvent() (ToolOutputDeltaEvent, error)

AsToolOutputDeltaEvent returns the union data inside the ServerStreamEvent as a ToolOutputDeltaEvent

func (ServerStreamEvent) AsTurnCancelledEvent

func (t ServerStreamEvent) AsTurnCancelledEvent() (TurnCancelledEvent, error)

AsTurnCancelledEvent returns the union data inside the ServerStreamEvent as a TurnCancelledEvent

func (ServerStreamEvent) AsTurnCompletedEvent

func (t ServerStreamEvent) AsTurnCompletedEvent() (TurnCompletedEvent, error)

AsTurnCompletedEvent returns the union data inside the ServerStreamEvent as a TurnCompletedEvent

func (ServerStreamEvent) AsTurnFailedEvent

func (t ServerStreamEvent) AsTurnFailedEvent() (TurnFailedEvent, error)

AsTurnFailedEvent returns the union data inside the ServerStreamEvent as a TurnFailedEvent

func (ServerStreamEvent) AsTurnStartedEvent

func (t ServerStreamEvent) AsTurnStartedEvent() (TurnStartedEvent, error)

AsTurnStartedEvent returns the union data inside the ServerStreamEvent as a TurnStartedEvent

func (ServerStreamEvent) Discriminator

func (t ServerStreamEvent) Discriminator() (string, error)

func (*ServerStreamEvent) FromBrowserActionRequestEvent

func (t *ServerStreamEvent) FromBrowserActionRequestEvent(v BrowserActionRequestEvent) error

FromBrowserActionRequestEvent overwrites any union data inside the ServerStreamEvent as the provided BrowserActionRequestEvent

func (*ServerStreamEvent) FromCancelledEvent

func (t *ServerStreamEvent) FromCancelledEvent(v CancelledEvent) error

FromCancelledEvent overwrites any union data inside the ServerStreamEvent as the provided CancelledEvent

func (*ServerStreamEvent) FromClientTaskCancelEvent

func (t *ServerStreamEvent) FromClientTaskCancelEvent(v ClientTaskCancelEvent) error

FromClientTaskCancelEvent overwrites any union data inside the ServerStreamEvent as the provided ClientTaskCancelEvent

func (*ServerStreamEvent) FromCompactionCompletedEvent

func (t *ServerStreamEvent) FromCompactionCompletedEvent(v CompactionCompletedEvent) error

FromCompactionCompletedEvent overwrites any union data inside the ServerStreamEvent as the provided CompactionCompletedEvent

func (*ServerStreamEvent) FromCompactionFailedEvent

func (t *ServerStreamEvent) FromCompactionFailedEvent(v CompactionFailedEvent) error

FromCompactionFailedEvent overwrites any union data inside the ServerStreamEvent as the provided CompactionFailedEvent

func (*ServerStreamEvent) FromCompactionInProgressEvent

func (t *ServerStreamEvent) FromCompactionInProgressEvent(v CompactionInProgressEvent) error

FromCompactionInProgressEvent overwrites any union data inside the ServerStreamEvent as the provided CompactionInProgressEvent

func (*ServerStreamEvent) FromCompletedEvent

func (t *ServerStreamEvent) FromCompletedEvent(v CompletedEvent) error

FromCompletedEvent overwrites any union data inside the ServerStreamEvent as the provided CompletedEvent

func (*ServerStreamEvent) FromCreatedEvent

func (t *ServerStreamEvent) FromCreatedEvent(v CreatedEvent) error

FromCreatedEvent overwrites any union data inside the ServerStreamEvent as the provided CreatedEvent

func (*ServerStreamEvent) FromElicitationRequestEvent

func (t *ServerStreamEvent) FromElicitationRequestEvent(v ElicitationRequestEvent) error

FromElicitationRequestEvent overwrites any union data inside the ServerStreamEvent as the provided ElicitationRequestEvent

func (*ServerStreamEvent) FromElicitationResolvedEvent

func (t *ServerStreamEvent) FromElicitationResolvedEvent(v ElicitationResolvedEvent) error

FromElicitationResolvedEvent overwrites any union data inside the ServerStreamEvent as the provided ElicitationResolvedEvent

func (*ServerStreamEvent) FromErrorEvent

func (t *ServerStreamEvent) FromErrorEvent(v ErrorEvent) error

FromErrorEvent overwrites any union data inside the ServerStreamEvent as the provided ErrorEvent

func (*ServerStreamEvent) FromFailedEvent

func (t *ServerStreamEvent) FromFailedEvent(v FailedEvent) error

FromFailedEvent overwrites any union data inside the ServerStreamEvent as the provided FailedEvent

func (*ServerStreamEvent) FromHeartbeatEvent

func (t *ServerStreamEvent) FromHeartbeatEvent(v HeartbeatEvent) error

FromHeartbeatEvent overwrites any union data inside the ServerStreamEvent as the provided HeartbeatEvent

func (*ServerStreamEvent) FromInProgressEvent

func (t *ServerStreamEvent) FromInProgressEvent(v InProgressEvent) error

FromInProgressEvent overwrites any union data inside the ServerStreamEvent as the provided InProgressEvent

func (*ServerStreamEvent) FromIncompleteEvent

func (t *ServerStreamEvent) FromIncompleteEvent(v IncompleteEvent) error

FromIncompleteEvent overwrites any union data inside the ServerStreamEvent as the provided IncompleteEvent

func (*ServerStreamEvent) FromOutputFileDoneEvent

func (t *ServerStreamEvent) FromOutputFileDoneEvent(v OutputFileDoneEvent) error

FromOutputFileDoneEvent overwrites any union data inside the ServerStreamEvent as the provided OutputFileDoneEvent

func (*ServerStreamEvent) FromOutputItemDoneEvent

func (t *ServerStreamEvent) FromOutputItemDoneEvent(v OutputItemDoneEvent) error

FromOutputItemDoneEvent overwrites any union data inside the ServerStreamEvent as the provided OutputItemDoneEvent

func (*ServerStreamEvent) FromOutputTextDeltaEvent

func (t *ServerStreamEvent) FromOutputTextDeltaEvent(v OutputTextDeltaEvent) error

FromOutputTextDeltaEvent overwrites any union data inside the ServerStreamEvent as the provided OutputTextDeltaEvent

func (*ServerStreamEvent) FromPolicyDeniedEvent

func (t *ServerStreamEvent) FromPolicyDeniedEvent(v PolicyDeniedEvent) error

FromPolicyDeniedEvent overwrites any union data inside the ServerStreamEvent as the provided PolicyDeniedEvent

func (*ServerStreamEvent) FromQueuedEvent

func (t *ServerStreamEvent) FromQueuedEvent(v QueuedEvent) error

FromQueuedEvent overwrites any union data inside the ServerStreamEvent as the provided QueuedEvent

func (*ServerStreamEvent) FromReasoningStartedEvent

func (t *ServerStreamEvent) FromReasoningStartedEvent(v ReasoningStartedEvent) error

FromReasoningStartedEvent overwrites any union data inside the ServerStreamEvent as the provided ReasoningStartedEvent

func (*ServerStreamEvent) FromReasoningSummaryTextDeltaEvent

func (t *ServerStreamEvent) FromReasoningSummaryTextDeltaEvent(v ReasoningSummaryTextDeltaEvent) error

FromReasoningSummaryTextDeltaEvent overwrites any union data inside the ServerStreamEvent as the provided ReasoningSummaryTextDeltaEvent

func (*ServerStreamEvent) FromReasoningTextDeltaEvent

func (t *ServerStreamEvent) FromReasoningTextDeltaEvent(v ReasoningTextDeltaEvent) error

FromReasoningTextDeltaEvent overwrites any union data inside the ServerStreamEvent as the provided ReasoningTextDeltaEvent

func (*ServerStreamEvent) FromRetryEvent

func (t *ServerStreamEvent) FromRetryEvent(v RetryEvent) error

FromRetryEvent overwrites any union data inside the ServerStreamEvent as the provided RetryEvent

func (*ServerStreamEvent) FromSessionAgentChangedEvent

func (t *ServerStreamEvent) FromSessionAgentChangedEvent(v SessionAgentChangedEvent) error

FromSessionAgentChangedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionAgentChangedEvent

func (*ServerStreamEvent) FromSessionChangedFilesInvalidatedEvent

func (t *ServerStreamEvent) FromSessionChangedFilesInvalidatedEvent(v SessionChangedFilesInvalidatedEvent) error

FromSessionChangedFilesInvalidatedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionChangedFilesInvalidatedEvent

func (*ServerStreamEvent) FromSessionChildSessionUpdatedEvent

func (t *ServerStreamEvent) FromSessionChildSessionUpdatedEvent(v SessionChildSessionUpdatedEvent) error

FromSessionChildSessionUpdatedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionChildSessionUpdatedEvent

func (*ServerStreamEvent) FromSessionCollaborationModeEvent

func (t *ServerStreamEvent) FromSessionCollaborationModeEvent(v SessionCollaborationModeEvent) error

FromSessionCollaborationModeEvent overwrites any union data inside the ServerStreamEvent as the provided SessionCollaborationModeEvent

func (*ServerStreamEvent) FromSessionCreatedEvent

func (t *ServerStreamEvent) FromSessionCreatedEvent(v SessionCreatedEvent) error

FromSessionCreatedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionCreatedEvent

func (*ServerStreamEvent) FromSessionHeartbeatEvent

func (t *ServerStreamEvent) FromSessionHeartbeatEvent(v SessionHeartbeatEvent) error

FromSessionHeartbeatEvent overwrites any union data inside the ServerStreamEvent as the provided SessionHeartbeatEvent

func (*ServerStreamEvent) FromSessionInputConsumedEvent

func (t *ServerStreamEvent) FromSessionInputConsumedEvent(v SessionInputConsumedEvent) error

FromSessionInputConsumedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionInputConsumedEvent

func (*ServerStreamEvent) FromSessionInterruptedEvent

func (t *ServerStreamEvent) FromSessionInterruptedEvent(v SessionInterruptedEvent) error

FromSessionInterruptedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionInterruptedEvent

func (*ServerStreamEvent) FromSessionMCPStartupEvent

func (t *ServerStreamEvent) FromSessionMCPStartupEvent(v SessionMCPStartupEvent) error

FromSessionMCPStartupEvent overwrites any union data inside the ServerStreamEvent as the provided SessionMCPStartupEvent

func (*ServerStreamEvent) FromSessionModelEvent

func (t *ServerStreamEvent) FromSessionModelEvent(v SessionModelEvent) error

FromSessionModelEvent overwrites any union data inside the ServerStreamEvent as the provided SessionModelEvent

func (*ServerStreamEvent) FromSessionModelOptionsEvent

func (t *ServerStreamEvent) FromSessionModelOptionsEvent(v SessionModelOptionsEvent) error

FromSessionModelOptionsEvent overwrites any union data inside the ServerStreamEvent as the provided SessionModelOptionsEvent

func (*ServerStreamEvent) FromSessionPresenceEvent

func (t *ServerStreamEvent) FromSessionPresenceEvent(v SessionPresenceEvent) error

FromSessionPresenceEvent overwrites any union data inside the ServerStreamEvent as the provided SessionPresenceEvent

func (*ServerStreamEvent) FromSessionReasoningEffortEvent

func (t *ServerStreamEvent) FromSessionReasoningEffortEvent(v SessionReasoningEffortEvent) error

FromSessionReasoningEffortEvent overwrites any union data inside the ServerStreamEvent as the provided SessionReasoningEffortEvent

func (*ServerStreamEvent) FromSessionResourceCreatedEvent

func (t *ServerStreamEvent) FromSessionResourceCreatedEvent(v SessionResourceCreatedEvent) error

FromSessionResourceCreatedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionResourceCreatedEvent

func (*ServerStreamEvent) FromSessionResourceDeletedEvent

func (t *ServerStreamEvent) FromSessionResourceDeletedEvent(v SessionResourceDeletedEvent) error

FromSessionResourceDeletedEvent overwrites any union data inside the ServerStreamEvent as the provided SessionResourceDeletedEvent

func (*ServerStreamEvent) FromSessionSandboxStatusEvent

func (t *ServerStreamEvent) FromSessionSandboxStatusEvent(v SessionSandboxStatusEvent) error

FromSessionSandboxStatusEvent overwrites any union data inside the ServerStreamEvent as the provided SessionSandboxStatusEvent

func (*ServerStreamEvent) FromSessionSkillsEvent

func (t *ServerStreamEvent) FromSessionSkillsEvent(v SessionSkillsEvent) error

FromSessionSkillsEvent overwrites any union data inside the ServerStreamEvent as the provided SessionSkillsEvent

func (*ServerStreamEvent) FromSessionStatusEvent

func (t *ServerStreamEvent) FromSessionStatusEvent(v SessionStatusEvent) error

FromSessionStatusEvent overwrites any union data inside the ServerStreamEvent as the provided SessionStatusEvent

func (*ServerStreamEvent) FromSessionSupersededEvent

func (t *ServerStreamEvent) FromSessionSupersededEvent(v SessionSupersededEvent) error

FromSessionSupersededEvent overwrites any union data inside the ServerStreamEvent as the provided SessionSupersededEvent

func (*ServerStreamEvent) FromSessionTerminalActivityEvent

func (t *ServerStreamEvent) FromSessionTerminalActivityEvent(v SessionTerminalActivityEvent) error

FromSessionTerminalActivityEvent overwrites any union data inside the ServerStreamEvent as the provided SessionTerminalActivityEvent

func (*ServerStreamEvent) FromSessionTerminalPendingEvent

func (t *ServerStreamEvent) FromSessionTerminalPendingEvent(v SessionTerminalPendingEvent) error

FromSessionTerminalPendingEvent overwrites any union data inside the ServerStreamEvent as the provided SessionTerminalPendingEvent

func (*ServerStreamEvent) FromSessionTodosEvent

func (t *ServerStreamEvent) FromSessionTodosEvent(v SessionTodosEvent) error

FromSessionTodosEvent overwrites any union data inside the ServerStreamEvent as the provided SessionTodosEvent

func (*ServerStreamEvent) FromSessionUsageEvent

func (t *ServerStreamEvent) FromSessionUsageEvent(v SessionUsageEvent) error

FromSessionUsageEvent overwrites any union data inside the ServerStreamEvent as the provided SessionUsageEvent

func (*ServerStreamEvent) FromToolOutputDeltaEvent

func (t *ServerStreamEvent) FromToolOutputDeltaEvent(v ToolOutputDeltaEvent) error

FromToolOutputDeltaEvent overwrites any union data inside the ServerStreamEvent as the provided ToolOutputDeltaEvent

func (*ServerStreamEvent) FromTurnCancelledEvent

func (t *ServerStreamEvent) FromTurnCancelledEvent(v TurnCancelledEvent) error

FromTurnCancelledEvent overwrites any union data inside the ServerStreamEvent as the provided TurnCancelledEvent

func (*ServerStreamEvent) FromTurnCompletedEvent

func (t *ServerStreamEvent) FromTurnCompletedEvent(v TurnCompletedEvent) error

FromTurnCompletedEvent overwrites any union data inside the ServerStreamEvent as the provided TurnCompletedEvent

func (*ServerStreamEvent) FromTurnFailedEvent

func (t *ServerStreamEvent) FromTurnFailedEvent(v TurnFailedEvent) error

FromTurnFailedEvent overwrites any union data inside the ServerStreamEvent as the provided TurnFailedEvent

func (*ServerStreamEvent) FromTurnStartedEvent

func (t *ServerStreamEvent) FromTurnStartedEvent(v TurnStartedEvent) error

FromTurnStartedEvent overwrites any union data inside the ServerStreamEvent as the provided TurnStartedEvent

func (ServerStreamEvent) MarshalJSON

func (t ServerStreamEvent) MarshalJSON() ([]byte, error)

func (*ServerStreamEvent) MergeBrowserActionRequestEvent

func (t *ServerStreamEvent) MergeBrowserActionRequestEvent(v BrowserActionRequestEvent) error

MergeBrowserActionRequestEvent performs a merge with any union data inside the ServerStreamEvent, using the provided BrowserActionRequestEvent

func (*ServerStreamEvent) MergeCancelledEvent

func (t *ServerStreamEvent) MergeCancelledEvent(v CancelledEvent) error

MergeCancelledEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CancelledEvent

func (*ServerStreamEvent) MergeClientTaskCancelEvent

func (t *ServerStreamEvent) MergeClientTaskCancelEvent(v ClientTaskCancelEvent) error

MergeClientTaskCancelEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ClientTaskCancelEvent

func (*ServerStreamEvent) MergeCompactionCompletedEvent

func (t *ServerStreamEvent) MergeCompactionCompletedEvent(v CompactionCompletedEvent) error

MergeCompactionCompletedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CompactionCompletedEvent

func (*ServerStreamEvent) MergeCompactionFailedEvent

func (t *ServerStreamEvent) MergeCompactionFailedEvent(v CompactionFailedEvent) error

MergeCompactionFailedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CompactionFailedEvent

func (*ServerStreamEvent) MergeCompactionInProgressEvent

func (t *ServerStreamEvent) MergeCompactionInProgressEvent(v CompactionInProgressEvent) error

MergeCompactionInProgressEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CompactionInProgressEvent

func (*ServerStreamEvent) MergeCompletedEvent

func (t *ServerStreamEvent) MergeCompletedEvent(v CompletedEvent) error

MergeCompletedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CompletedEvent

func (*ServerStreamEvent) MergeCreatedEvent

func (t *ServerStreamEvent) MergeCreatedEvent(v CreatedEvent) error

MergeCreatedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided CreatedEvent

func (*ServerStreamEvent) MergeElicitationRequestEvent

func (t *ServerStreamEvent) MergeElicitationRequestEvent(v ElicitationRequestEvent) error

MergeElicitationRequestEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ElicitationRequestEvent

func (*ServerStreamEvent) MergeElicitationResolvedEvent

func (t *ServerStreamEvent) MergeElicitationResolvedEvent(v ElicitationResolvedEvent) error

MergeElicitationResolvedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ElicitationResolvedEvent

func (*ServerStreamEvent) MergeErrorEvent

func (t *ServerStreamEvent) MergeErrorEvent(v ErrorEvent) error

MergeErrorEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ErrorEvent

func (*ServerStreamEvent) MergeFailedEvent

func (t *ServerStreamEvent) MergeFailedEvent(v FailedEvent) error

MergeFailedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided FailedEvent

func (*ServerStreamEvent) MergeHeartbeatEvent

func (t *ServerStreamEvent) MergeHeartbeatEvent(v HeartbeatEvent) error

MergeHeartbeatEvent performs a merge with any union data inside the ServerStreamEvent, using the provided HeartbeatEvent

func (*ServerStreamEvent) MergeInProgressEvent

func (t *ServerStreamEvent) MergeInProgressEvent(v InProgressEvent) error

MergeInProgressEvent performs a merge with any union data inside the ServerStreamEvent, using the provided InProgressEvent

func (*ServerStreamEvent) MergeIncompleteEvent

func (t *ServerStreamEvent) MergeIncompleteEvent(v IncompleteEvent) error

MergeIncompleteEvent performs a merge with any union data inside the ServerStreamEvent, using the provided IncompleteEvent

func (*ServerStreamEvent) MergeOutputFileDoneEvent

func (t *ServerStreamEvent) MergeOutputFileDoneEvent(v OutputFileDoneEvent) error

MergeOutputFileDoneEvent performs a merge with any union data inside the ServerStreamEvent, using the provided OutputFileDoneEvent

func (*ServerStreamEvent) MergeOutputItemDoneEvent

func (t *ServerStreamEvent) MergeOutputItemDoneEvent(v OutputItemDoneEvent) error

MergeOutputItemDoneEvent performs a merge with any union data inside the ServerStreamEvent, using the provided OutputItemDoneEvent

func (*ServerStreamEvent) MergeOutputTextDeltaEvent

func (t *ServerStreamEvent) MergeOutputTextDeltaEvent(v OutputTextDeltaEvent) error

MergeOutputTextDeltaEvent performs a merge with any union data inside the ServerStreamEvent, using the provided OutputTextDeltaEvent

func (*ServerStreamEvent) MergePolicyDeniedEvent

func (t *ServerStreamEvent) MergePolicyDeniedEvent(v PolicyDeniedEvent) error

MergePolicyDeniedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided PolicyDeniedEvent

func (*ServerStreamEvent) MergeQueuedEvent

func (t *ServerStreamEvent) MergeQueuedEvent(v QueuedEvent) error

MergeQueuedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided QueuedEvent

func (*ServerStreamEvent) MergeReasoningStartedEvent

func (t *ServerStreamEvent) MergeReasoningStartedEvent(v ReasoningStartedEvent) error

MergeReasoningStartedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ReasoningStartedEvent

func (*ServerStreamEvent) MergeReasoningSummaryTextDeltaEvent

func (t *ServerStreamEvent) MergeReasoningSummaryTextDeltaEvent(v ReasoningSummaryTextDeltaEvent) error

MergeReasoningSummaryTextDeltaEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ReasoningSummaryTextDeltaEvent

func (*ServerStreamEvent) MergeReasoningTextDeltaEvent

func (t *ServerStreamEvent) MergeReasoningTextDeltaEvent(v ReasoningTextDeltaEvent) error

MergeReasoningTextDeltaEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ReasoningTextDeltaEvent

func (*ServerStreamEvent) MergeRetryEvent

func (t *ServerStreamEvent) MergeRetryEvent(v RetryEvent) error

MergeRetryEvent performs a merge with any union data inside the ServerStreamEvent, using the provided RetryEvent

func (*ServerStreamEvent) MergeSessionAgentChangedEvent

func (t *ServerStreamEvent) MergeSessionAgentChangedEvent(v SessionAgentChangedEvent) error

MergeSessionAgentChangedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionAgentChangedEvent

func (*ServerStreamEvent) MergeSessionChangedFilesInvalidatedEvent

func (t *ServerStreamEvent) MergeSessionChangedFilesInvalidatedEvent(v SessionChangedFilesInvalidatedEvent) error

MergeSessionChangedFilesInvalidatedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionChangedFilesInvalidatedEvent

func (*ServerStreamEvent) MergeSessionChildSessionUpdatedEvent

func (t *ServerStreamEvent) MergeSessionChildSessionUpdatedEvent(v SessionChildSessionUpdatedEvent) error

MergeSessionChildSessionUpdatedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionChildSessionUpdatedEvent

func (*ServerStreamEvent) MergeSessionCollaborationModeEvent

func (t *ServerStreamEvent) MergeSessionCollaborationModeEvent(v SessionCollaborationModeEvent) error

MergeSessionCollaborationModeEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionCollaborationModeEvent

func (*ServerStreamEvent) MergeSessionCreatedEvent

func (t *ServerStreamEvent) MergeSessionCreatedEvent(v SessionCreatedEvent) error

MergeSessionCreatedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionCreatedEvent

func (*ServerStreamEvent) MergeSessionHeartbeatEvent

func (t *ServerStreamEvent) MergeSessionHeartbeatEvent(v SessionHeartbeatEvent) error

MergeSessionHeartbeatEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionHeartbeatEvent

func (*ServerStreamEvent) MergeSessionInputConsumedEvent

func (t *ServerStreamEvent) MergeSessionInputConsumedEvent(v SessionInputConsumedEvent) error

MergeSessionInputConsumedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionInputConsumedEvent

func (*ServerStreamEvent) MergeSessionInterruptedEvent

func (t *ServerStreamEvent) MergeSessionInterruptedEvent(v SessionInterruptedEvent) error

MergeSessionInterruptedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionInterruptedEvent

func (*ServerStreamEvent) MergeSessionMCPStartupEvent

func (t *ServerStreamEvent) MergeSessionMCPStartupEvent(v SessionMCPStartupEvent) error

MergeSessionMCPStartupEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionMCPStartupEvent

func (*ServerStreamEvent) MergeSessionModelEvent

func (t *ServerStreamEvent) MergeSessionModelEvent(v SessionModelEvent) error

MergeSessionModelEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionModelEvent

func (*ServerStreamEvent) MergeSessionModelOptionsEvent

func (t *ServerStreamEvent) MergeSessionModelOptionsEvent(v SessionModelOptionsEvent) error

MergeSessionModelOptionsEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionModelOptionsEvent

func (*ServerStreamEvent) MergeSessionPresenceEvent

func (t *ServerStreamEvent) MergeSessionPresenceEvent(v SessionPresenceEvent) error

MergeSessionPresenceEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionPresenceEvent

func (*ServerStreamEvent) MergeSessionReasoningEffortEvent

func (t *ServerStreamEvent) MergeSessionReasoningEffortEvent(v SessionReasoningEffortEvent) error

MergeSessionReasoningEffortEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionReasoningEffortEvent

func (*ServerStreamEvent) MergeSessionResourceCreatedEvent

func (t *ServerStreamEvent) MergeSessionResourceCreatedEvent(v SessionResourceCreatedEvent) error

MergeSessionResourceCreatedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionResourceCreatedEvent

func (*ServerStreamEvent) MergeSessionResourceDeletedEvent

func (t *ServerStreamEvent) MergeSessionResourceDeletedEvent(v SessionResourceDeletedEvent) error

MergeSessionResourceDeletedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionResourceDeletedEvent

func (*ServerStreamEvent) MergeSessionSandboxStatusEvent

func (t *ServerStreamEvent) MergeSessionSandboxStatusEvent(v SessionSandboxStatusEvent) error

MergeSessionSandboxStatusEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionSandboxStatusEvent

func (*ServerStreamEvent) MergeSessionSkillsEvent

func (t *ServerStreamEvent) MergeSessionSkillsEvent(v SessionSkillsEvent) error

MergeSessionSkillsEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionSkillsEvent

func (*ServerStreamEvent) MergeSessionStatusEvent

func (t *ServerStreamEvent) MergeSessionStatusEvent(v SessionStatusEvent) error

MergeSessionStatusEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionStatusEvent

func (*ServerStreamEvent) MergeSessionSupersededEvent

func (t *ServerStreamEvent) MergeSessionSupersededEvent(v SessionSupersededEvent) error

MergeSessionSupersededEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionSupersededEvent

func (*ServerStreamEvent) MergeSessionTerminalActivityEvent

func (t *ServerStreamEvent) MergeSessionTerminalActivityEvent(v SessionTerminalActivityEvent) error

MergeSessionTerminalActivityEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionTerminalActivityEvent

func (*ServerStreamEvent) MergeSessionTerminalPendingEvent

func (t *ServerStreamEvent) MergeSessionTerminalPendingEvent(v SessionTerminalPendingEvent) error

MergeSessionTerminalPendingEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionTerminalPendingEvent

func (*ServerStreamEvent) MergeSessionTodosEvent

func (t *ServerStreamEvent) MergeSessionTodosEvent(v SessionTodosEvent) error

MergeSessionTodosEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionTodosEvent

func (*ServerStreamEvent) MergeSessionUsageEvent

func (t *ServerStreamEvent) MergeSessionUsageEvent(v SessionUsageEvent) error

MergeSessionUsageEvent performs a merge with any union data inside the ServerStreamEvent, using the provided SessionUsageEvent

func (*ServerStreamEvent) MergeToolOutputDeltaEvent

func (t *ServerStreamEvent) MergeToolOutputDeltaEvent(v ToolOutputDeltaEvent) error

MergeToolOutputDeltaEvent performs a merge with any union data inside the ServerStreamEvent, using the provided ToolOutputDeltaEvent

func (*ServerStreamEvent) MergeTurnCancelledEvent

func (t *ServerStreamEvent) MergeTurnCancelledEvent(v TurnCancelledEvent) error

MergeTurnCancelledEvent performs a merge with any union data inside the ServerStreamEvent, using the provided TurnCancelledEvent

func (*ServerStreamEvent) MergeTurnCompletedEvent

func (t *ServerStreamEvent) MergeTurnCompletedEvent(v TurnCompletedEvent) error

MergeTurnCompletedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided TurnCompletedEvent

func (*ServerStreamEvent) MergeTurnFailedEvent

func (t *ServerStreamEvent) MergeTurnFailedEvent(v TurnFailedEvent) error

MergeTurnFailedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided TurnFailedEvent

func (*ServerStreamEvent) MergeTurnStartedEvent

func (t *ServerStreamEvent) MergeTurnStartedEvent(v TurnStartedEvent) error

MergeTurnStartedEvent performs a merge with any union data inside the ServerStreamEvent, using the provided TurnStartedEvent

func (*ServerStreamEvent) UnmarshalJSON

func (t *ServerStreamEvent) UnmarshalJSON(b []byte) error

func (ServerStreamEvent) ValueByDiscriminator

func (t ServerStreamEvent) ValueByDiscriminator() (interface{}, error)

type SessionAgentChangedEvent

type SessionAgentChangedEvent struct {
	// AgentID The session-scoped clone now bound to the session, e.g. `"ag_abc123"`.
	AgentID string `json:"agent_id"`

	// AgentName Display name of the agent the session now runs, e.g. `"claude-native-ui"`. Deliberately the clean target-agent name — not the clone row's `"… (switch ag_…)"` disambiguation name — because clients render it verbatim. Category: **transient** (SSE-only). The switch is persisted on the conversation row, so on reconnect clients read the new binding from the session snapshot rather than from a replayed event.
	AgentName string `json:"agent_name"`

	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.agent_changed"`.
	Type string `json:"type"`
}

SessionAgentChangedEvent Bound-agent change on a live session.

Emitted by the switch-agent route after the session's agent binding is rewritten in place. Connected clients re-derive their cached session state (harness presentation labels, bound agent id/name) from a fresh snapshot — the chat UI's native-vs-SDK message lifecycle depends on those labels, so a stale cache drops the first post-switch message (it reappears only when the transcript round-trip lands).

type SessionChangedFilesInvalidatedEvent

type SessionChangedFilesInvalidatedEvent struct {
	// EnvironmentID Environment whose changes were invalidated, e.g. `"default"`.
	EnvironmentID  *string `json:"environment_id,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// SessionID Owning session/conversation id.
	SessionID string `json:"session_id"`

	// Type Always `"session.changed_files.invalidated"`.
	Type string `json:"type"`
}

SessionChangedFilesInvalidatedEvent The session's changed-files list may have changed — refetch it.

A coarse "something changed" signal (per-file events aren't available for git-mode workspaces) emitted by the runner after a file-mutating tool. The web treats it as a refetch trigger for the changed-files panel; transient (not persisted — the REST list is source of truth).

type SessionChildSessionUpdatedEvent

type SessionChildSessionUpdatedEvent struct {
	// Child A PARTIAL `ChildSessionSummary` — the snapshot-on-connect sends the full summary, while live runner deltas carry only the fields that changed (a status delta omits `last_message_preview`; a preview delta carries only it). The web merges present fields over the cached row, so the payload is an open dict rather than the strict model.
	Child map[string]interface{} `json:"child"`

	// ChildSessionID The child session id, e.g. `"conv_child_abc123"`.
	ChildSessionID string `json:"child_session_id"`

	// ConversationID The PARENT (carrier) session id.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.child_session.updated"`.
	Type string `json:"type"`
}

SessionChildSessionUpdatedEvent A child (sub-agent) session's status changed — pushed to the PARENT.

Lets the parent's resource rail update a child's status without polling `GET …/child_sessions`. Carries the full `ChildSessionSummary` so the web patches its cache directly.

type SessionCollaborationModeEvent

type SessionCollaborationModeEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Mode The active collaboration mode string, e.g. `"plan"` or `"default"`. Category: **transient** (SSE-only). The server also writes `omnigent.codex_native.collaboration_mode` on the conversation labels, so reconnect clients restore the same state from the session snapshot.
	Mode           string `json:"mode"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.collaboration_mode"`.
	Type string `json:"type"`
}

SessionCollaborationModeEvent Active collaboration-mode update from a Codex-native session.

Emitted after the web UI toggles Codex collaboration mode, and after the Codex forwarder observes a `thread/settings/updated` notification from the native Codex TUI. Lets connected clients show a clear Plan-mode indicator without a reload.

type SessionCreatedEvent

type SessionCreatedEvent struct {
	// AgentID Registered agent id the child runs as, e.g. `"agent_xyz"`. `None` is permitted only for legacy spawn paths that did not record an agent id; new code MUST set it.
	AgentID *string `json:"agent_id,omitempty"`

	// ChildSessionID The newly-created child session id, e.g. `"conv_child456"`. Same as `conversation_id` on the child's own stream when consumers pivot to it.
	ChildSessionID string `json:"child_session_id"`

	// ConversationID The PARENT session/conversation id — this event rides the parent's stream, e.g. `"conv_parent123"`.
	ConversationID string `json:"conversation_id"`

	// ParentSessionID Echo of `conversation_id` for consumers that key on a dedicated "parent" field rather than the carrier `conversation_id`. Always equal to `conversation_id`; included for forward-compat with clients that may relay these events across stream boundaries. Category: **transient** (SSE-only). The corresponding durable record of "a child session exists" lives in the conversation store as the child conversation row itself (`parent_conversation_id` foreign key) and the parent's tunneled `function_call` item — reconnecting clients discover children by walking the parent's persisted history, not by replaying this event.
	ParentSessionID *string `json:"parent_session_id,omitempty"`
	SequenceNumber  *int    `json:"sequence_number,omitempty"`

	// Type Always `"session.created"`.
	Type string `json:"type"`
}

SessionCreatedEvent A child (sub-agent) session was spawned from this session.

Emitted by `omnigent/tools/builtins/spawn.py:_spawn_one` onto the **parent** session's conversation stream after the child conversation row is created and the child task has been started. Per the session-rearchitecture spec §3 ("Event types and direction") and §7 ("Flow: client interacts with sub-agent"), this lets clients watching the parent session's SSE subscribe directly to the child's stream without polling history for the tunneled `function_call` item.

The wire shape is FLAT (not enveloped): `{"type": "session.created", "conversation_id": <parent>, "child_session_id": <child>, "agent_id": <agent or None>, "parent_session_id": <parent>, "sequence_number": null}`.

The existing tunneled `function_call` ConversationItem (carried inside `OutputItemDoneEvent`) is retained for compatibility — clients that don't yet implement the "subscribe to child stream" pattern can keep rendering sub- agent calls from the parent's persistent history.

type SessionForkRequest

type SessionForkRequest struct {
	// AgentID Built-in agent to bind the fork to, switching it away from the source's agent/harness (e.g. fork a Claude session into a Codex one, or a Claude-SDK session into Claude Code). When `None`, the fork keeps the source's agent. Must be a built-in agent (one listed by `GET /v1/agents`).
	AgentID *string `json:"agent_id,omitempty"`

	// Title Title for the forked session. When `None`, the server derives `"Fork of <source_title>"`.
	Title *string `json:"title,omitempty"`

	// UpToResponseID Truncation point for the copied history, e.g. `"resp_abc123"`. When set, only items up to and including the last item of that response are copied — items after it are dropped from the fork. When `None` (default), the full history is copied.
	UpToResponseID *string `json:"up_to_response_id,omitempty"`
}

SessionForkRequest Request body for `POST /v1/sessions/{source_id}/fork`.

Creates a deep copy of an existing session's items into a new session. All fields are optional.

type SessionGitOptions

type SessionGitOptions struct {
	// BaseBranch Optional base ref to branch from, e.g. `"main"` or `"origin/main"`. `None` branches from the source repository's current `HEAD`. Create mode only — invalid with `existing_worktree`.
	BaseBranch *string `json:"base_branch,omitempty"`

	// BranchName In create mode, the new branch to create and check out, e.g. `"feature/login"`. In bind mode, the branch already checked out in the existing worktree. Validated against git ref-format rules; invalid names fail with `invalid_input`.
	BranchName string `json:"branch_name"`

	// ExistingWorktree When `True`, bind to the pre-existing worktree at `workspace` instead of creating one (see above).
	ExistingWorktree *bool `json:"existing_worktree,omitempty"`
}

SessionGitOptions Git worktree options for `POST /v1/sessions`.

Requires `host_id` to be set (and therefore `workspace`, which is interpreted as the source repository directory). Two modes, selected by `existing_worktree`:

  • **create** (default): the server creates a git worktree on the host for a new branch and starts the runner in that worktree instead of the picked directory.
  • **bind** (`existing_worktree=True`): `workspace` already IS a pre-existing worktree; no worktree is created. `branch_name` is recorded as the session's `git_branch` for display and opt-in cleanup, and `base_branch` must not be set.

See designs/SESSION_GIT_WORKTREE.md.

type SessionHeartbeatEvent

type SessionHeartbeatEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// ServerTime ISO 8601 UTC timestamp at emission, e.g. `"2026-05-25T10:30:00Z"`. `None` when the producer chose not to populate it.
	ServerTime *string `json:"server_time,omitempty"`

	// Type Always `"session.heartbeat"`.
	Type string `json:"type"`
}

SessionHeartbeatEvent Idle-stream keepalive on `GET /v1/sessions/{id}/stream`.

Emitted by the session-stream route on a fixed cadence whenever the underlying publish queue has been quiet (no turn in flight, no resource events). Distinct from `HeartbeatEvent` (`response.heartbeat`), which is per-turn and is driven by the runtime workflow while a response is producing output.

Why this exists: the session stream stays open across many turns and through idle periods (waiting for the user to type). Without a periodic emit, intermediate proxies, OS-level sockets, and the client's SSE read-timeout can leave a half-open stream undetected for minutes after a network event (laptop sleep, Wi-Fi handoff). The heartbeat puts a regular byte on the wire so the client's read-timeout and the server's `request.is_disconnected()` check both fire promptly.

Consumers MAY ignore the payload entirely (the bytes crossing the wire are sufficient). The optional `server_time` mirrors `HeartbeatEvent` for symmetry and debugging.

type SessionInputConsumedEvent

type SessionInputConsumedEvent struct {
	// Data The decoded queued-item payload — see `SessionInputConsumedPayload`.
	Data           SessionInputConsumedPayload `json:"data"`
	SequenceNumber *int                        `json:"sequence_number,omitempty"`

	// Type Always `"session.input.consumed"`.
	Type string `json:"type"`
}

SessionInputConsumedEvent A queued input item was materialized into conversation history.

Emitted by `POST /v1/sessions/{id}/events` once per accepted input item at the moment it is persisted into conversation history (either onto a steered active turn or as the seed item of a freshly-started one). Wire shape uses the NESTED envelope: `{"type": "session.input.consumed", "data": <SessionInputConsumedPayload>, "sequence_number": null}`.

The event name is **provisional** — it may be renamed in a future revision. Consumers should reference `SessionInputConsumedEvent` (or its `type` literal) rather than hardcoding the wire string.

type SessionInputConsumedPayload

type SessionInputConsumedPayload struct {
	// ClearedPendingID When this consumed message drains a `omnigent.runtime.pending_inputs` entry (a native- terminal web message round-tripping back from the transcript), the drained entry's id, e.g. `"pending_a1b2c3"`. Lets a client drop the matching optimistic bubble by id instead of by position. `None` for non-native messages and for messages that matched no pending entry (e.g. typed directly in the TUI).
	ClearedPendingID *string `json:"cleared_pending_id,omitempty"`

	// CreatedBy Email of the human actor who posted the item, e.g. `"alice@example.com"`. `None` for agent/tool/system items and single-user mode. Mirrors `ConversationItem.to_api_dict` for live attribution.
	CreatedBy *string `json:"created_by,omitempty"`

	// Data Decoded item payload, e.g. `{"role": "user", "content": [{"type": "input_text", "text": "Hello"}]}`. Heterogeneous and `type`-specific.
	Data map[string]interface{} `json:"data"`

	// ItemID Stable identifier of the conversation item just persisted, e.g. `"item_abc123"`.
	ItemID string `json:"item_id"`

	// Type The item type discriminator — `"message"` for user messages, `"function_call_output"` for tool results, etc. Mirrors `omnigent.server.schemas.SessionEventInput`'s `type` field.
	Type string `json:"type"`
}

SessionInputConsumedPayload Inner payload of a `SessionInputConsumedEvent`.

Emitted by the sessions route handler at the moment a client input is persisted into `conversation_items`. Carries the persisted-item shape so clients can render the input (e.g. the user's message bubble) at the moment of acceptance.

type SessionInterruptedEvent

type SessionInterruptedEvent struct {
	// Data The interrupt metadata — see `SessionInterruptedPayload`.
	Data           SessionInterruptedPayload `json:"data"`
	SequenceNumber *int                      `json:"sequence_number,omitempty"`

	// Type Always `"session.interrupted"`.
	Type string `json:"type"`
}

SessionInterruptedEvent User-triggered cancel reached the loop.

Emitted by `_publish_interrupted` in `omnigent/server/routes/sessions.py` when a client posts a `{"type": "interrupt"}` to `POST /v1/sessions/{id}/events`. Co-emitted with `IncompleteEvent` (with the underlying response carrying `incomplete_details.reason == "user_interrupt"`) so off-the- shelf Responses parsers still close cleanly. Wire shape uses the NESTED envelope verbatim from the existing emit site.

type SessionInterruptedPayload

type SessionInterruptedPayload struct {
	// RequestedAt Unix epoch seconds when the interrupt request reached the server, e.g. `1704067200`.
	RequestedAt int `json:"requested_at"`

	// ResponseID Optional active response id for terminal-backed integrations, e.g. `"codex_turn_abc123"`.
	ResponseID *string `json:"response_id,omitempty"`
}

SessionInterruptedPayload Inner payload of a `SessionInterruptedEvent`.

Built by `_publish_interrupted` in `omnigent/server/routes/sessions.py`.

type SessionLabelsResponse

type SessionLabelsResponse struct {
	// ID Session identifier, e.g. `"conv_abc123"`.
	ID string `json:"id"`

	// Labels Session-scoped guardrails labels. Empty dict when no labels have been written.
	Labels map[string]string `json:"labels,omitempty"`
}

SessionLabelsResponse Lightweight response body for `GET /v1/sessions/{id}/labels`.

type SessionList

type SessionList struct {
	Data    []SessionListItem `json:"data,omitempty"`
	FirstID *string           `json:"first_id,omitempty"`
	HasMore *bool             `json:"has_more,omitempty"`
	LastID  *string           `json:"last_id,omitempty"`
	Object  *string           `json:"object,omitempty"`
}

SessionList Paginated list of sessions; `data` is a page of `SessionListItem`.

type SessionListItem

type SessionListItem struct {
	// AgentID Durable identifier of the bound agent.
	AgentID string `json:"agent_id"`

	// AgentName Human-readable name of the bound agent, e.g. `"research-agent"`. `None` when the agent row cannot be found.
	AgentName *string `json:"agent_name,omitempty"`

	// Archived Whether the session is archived. Archived sessions are returned by `GET /v1/sessions` only when the request passes `include_archived=true`; the sidebar groups them into a dedicated "Archived" section. `False` for normal sessions.
	Archived *bool `json:"archived,omitempty"`

	// CommentsCount Total number of review comments (any status) on this session. Together with `comments_updated_at` it forms a change fingerprint: an add or edit bumps the timestamp, a delete changes the count, so the web client can invalidate its cached comment list when either field changes in a `WS /v1/sessions/updates` frame. `0` when the session has no comments or the server has no comment store wired.
	CommentsCount *int `json:"comments_count,omitempty"`

	// CommentsUpdatedAt Unix epoch **microseconds** of the most recently mutated comment on this session (max `updated_at` across its comments). Microsecond precision keeps back-to-back mutations within one second distinguishable while staying an exact integer in JavaScript; clients only compare it for change. `None` when the session has no comments or the server has no comment store wired.
	CommentsUpdatedAt *int `json:"comments_updated_at,omitempty"`

	// CreatedAt Unix epoch seconds of creation.
	CreatedAt int `json:"created_at"`

	// ExternalSessionID Runtime-native session id this conversation wraps, e.g. a Claude Code session uuid for `omnigent claude` sessions. `None` for regular AP-only conversations. Lets the sidebar / picker render a runtime badge without a follow-up GET.
	ExternalSessionID *string `json:"external_session_id,omitempty"`

	// GitBranch Git branch checked out in the session's worktree, e.g. `"feature/login"`. Set only when the session was created with a server-created git worktree; `None` otherwise. The Web UI uses a non-`None` value to offer the "delete local branch" cleanup checkbox on session delete. See designs/SESSION_GIT_WORKTREE.md.
	GitBranch *string `json:"git_branch,omitempty"`

	// HostID Host that launched the runner for this session.
	HostID *string `json:"host_id,omitempty"`

	// HostOnline Whether the session's host tunnel is live (status online and fresh within the host liveness TTL). `None` when the session has no `host_id` (CLI/local). Distinguishes "runner down but host can relaunch" from "host offline" for the open-session view; not used by the sidebar.
	HostOnline *bool `json:"host_online,omitempty"`

	// ID Session/conversation identifier, e.g. `"conv_abc123"`.
	ID string `json:"id"`

	// Labels Session-scoped guardrails labels.
	Labels map[string]string `json:"labels,omitempty"`

	// Owner The user_id of the session owner, or `None` when permissions are disabled. Included so the sidebar can display the owner without a separate API call.
	Owner           *string `json:"owner,omitempty"`
	ParentSessionID *string `json:"parent_session_id,omitempty"`

	// PendingElicitationsCount Number of approval prompts currently waiting on this session. Powers the sidebar's "needs attention" badge so a user with several sessions running can tell which ones are blocked on them without opening each chat. Sourced from the Omnigent server's in-memory `omnigent.runtime.pending_elicitations` index, which mirrors every `response.elicitation_request` event passing through `session_stream` and decrements when a verdict is dispatched. `0` when the session has no outstanding elicitations.
	PendingElicitationsCount *int `json:"pending_elicitations_count,omitempty"`

	// PermissionLevel The requesting user's numeric permission level on this session: `1` = read, `2` = edit, `3` = manage. `None` when permissions are disabled.
	PermissionLevel *int    `json:"permission_level,omitempty"`
	ProjectID       *string `json:"project_id,omitempty"`

	// ReasoningEffort Per-session reasoning-effort hint.
	ReasoningEffort *string `json:"reasoning_effort,omitempty"`

	// RunnerID Runner currently bound to the session.
	RunnerID *string `json:"runner_id,omitempty"`

	// RunnerOnline Strict runner liveness — `True` iff a runner tunnel is currently registered for this session. Matches `GET /health`'s `runner_online` value. Strict: a dead runner on a live host reads `False` here (no host-relaunch optimism folded in), unlike the legacy conflated value. `None` when the server has no runner liveness lookup wired.
	RunnerOnline *bool `json:"runner_online,omitempty"`

	// SearchSnippet Excerpt of the chat content that matched the request's `search_query`, centered on the match with `…` marking elided ends, so the search UI can show *where* a session matched in its body. Present whenever the query hit an item body (even if the title also matched); `None` on non-search reads and when only the title matched.
	SearchSnippet *string `json:"search_snippet,omitempty"`

	// Status Derived session lifecycle status.
	Status string `json:"status"`

	// Title Optional human-readable title.
	Title *string `json:"title,omitempty"`

	// UpdatedAt Unix epoch seconds of last update.
	UpdatedAt int `json:"updated_at"`

	// ViewerLastSeen The *requesting user's* "last seen" wall-clock baseline in seconds for this session, or `None` when they have never seen it. Per-viewer (built from the server's in-memory per-user read-state, written by `PUT /v1/sessions/{id}/read-state`); the unread dot shows when `updated_at > viewer_last_seen` and the session is finished. In-memory only — resets on a server restart.
	ViewerLastSeen *int `json:"viewer_last_seen,omitempty"`

	// ViewerUnread Whether the *requesting user* explicitly marked this session unread. Per-viewer; lifts the active-row dot suppression on the client. `False` by default.
	ViewerUnread *bool `json:"viewer_unread,omitempty"`

	// Workspace Absolute path on disk where the runner cd's, e.g. `"/Users/corey/universe/src/foo"`. `None` for sessions that haven't been bound to a host workspace.
	Workspace *string `json:"workspace,omitempty"`
}

SessionListItem Lightweight session summary for `GET /v1/sessions` list responses.

Same shape as `SessionResponse` minus `items`.

type SessionMCPStartupEvent

type SessionMCPStartupEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Servers Latest per-server startup map, e.g. `{"safe": {"status": "starting", "error": None}}`. Category: **transient** (SSE + snapshot cache). Not persisted; a client connecting mid-startup seeds from the session snapshot's `mcp_startup` field and updates live off this event.
	Servers map[string]MCPServerStartup `json:"servers"`

	// Type Always `"session.mcp_startup"`.
	Type string `json:"type"`
}

SessionMCPStartupEvent Per-MCP-server startup progress for a native harness session.

A codex-native session brings up its configured MCP servers when its Codex thread starts; slow or failing servers previously left the web session looking hung with no signal. The native forwarder mirrors Codex's `mcpServer/startupStatus/updated` notifications as `external_mcp_startup` posts, republished here so the web UI can show which servers are still starting and which failed or were cancelled.

type SessionModelEvent

type SessionModelEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Model Tier alias the session is now on, e.g. `"opus"` — Claude Code's version-agnostic alias, matching the picker's vocabulary (not a pinned `"claude-opus-4-8"` id). Category: **transient** (SSE-only). The server also writes `model_override` on the conversation, so on reconnect clients restore the selection from the snapshot's `model_override` rather than from a replayed event.
	Model          string `json:"model"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.model"`.
	Type string `json:"type"`
}

SessionModelEvent Active-model update from a terminal-backed integration.

Emitted after an `external_model_change` POST from the `omnigent claude` transcript forwarder when the model is switched inside the Claude Code terminal (a `/model` command or the in-TUI picker). Lets the web model picker reflect a TUI-side switch without a reload.

type SessionModelOptionsEvent

type SessionModelOptionsEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`. Category: **transient** (SSE-only). On reconnect, clients seed Native model / effort controls from the session snapshot.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.model_options"`.
	Type string `json:"type"`
}

SessionModelOptionsEvent Signal that a native session's model catalog has resolved.

Model options are fetched from the bound runner and cached on the session snapshot. The initial snapshot can return an empty list while this background fetch is in flight; this event tells connected clients to re-read the snapshot and apply its now-populated `model_options`.

Carries no payload beyond the conversation id. The snapshot's `model_options` field remains the source of truth.

type SessionPresenceEvent

type SessionPresenceEvent struct {
	// ConversationID The conversation whose stream delivered this event — the root or a sub-agent conversation, e.g. `"conv_abc123"`. Matches the streamed conversation (not necessarily the tree's root) so clients can guard events by the conversation they are viewing.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.presence"`.
	Type string `json:"type"`

	// Viewers All users currently viewing any conversation in the session tree (including the receiving user — the web filters self out for display), ordered by join time.
	Viewers []PresenceViewer `json:"viewers"`
}

SessionPresenceEvent The session's viewer list changed — full state, not a delta.

Emitted on `GET /v1/sessions/{id}/stream` whenever a user joins, leaves (after the server-side grace window absorbs reconnect churn), or flips their idle aggregate, and once to each newly-connected stream as a snapshot-on-connect. Every event carries the COMPLETE viewer list so clients replace their state wholesale — missed events self-heal on the next event or reconnect. Viewers are scoped to the session *tree* (the root conversation and every sub-agent conversation under it), so a user on a sub-agent page and a user on the root page appear in each other's lists. See `omnigent/server/presence.py` and `designs/UI/PRESENCE.md`.

type SessionProjectSummary

type SessionProjectSummary struct {
	// ID First-class project id when one exists, or `None` for a label-only project not yet promoted to the `projects` table.
	ID *string `json:"id,omitempty"`

	// Name Project name (the folder's display name and union key).
	Name string `json:"name"`
}

SessionProjectSummary One entry of `GET /v1/sessions/projects` — a sidebar project folder.

Dual-read union of first-class projects and legacy `omni_project` label-projects, keyed by name.

type SessionReasoningEffortEvent

type SessionReasoningEffortEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// ReasoningEffort Reasoning effort now active for the session, e.g. `"medium"`, or `None` when Codex cleared to its default. Category: **transient** (SSE-only). The server also writes `reasoning_effort` on the conversation, so on reconnect clients restore the selection from the session snapshot rather than from a replayed event.
	ReasoningEffort *string `json:"reasoning_effort,omitempty"`
	SequenceNumber  *int    `json:"sequence_number,omitempty"`

	// Type Always `"session.reasoning_effort"`.
	Type string `json:"type"`
}

SessionReasoningEffortEvent Active reasoning-effort update from a terminal-backed integration.

Emitted after an `external_reasoning_effort_change` POST from a native terminal forwarder when the user changes the thinking level inside the terminal UI. Lets the web effort picker reflect a TUI-side switch without a reload.

type SessionResourceCreatedEvent

type SessionResourceCreatedEvent struct {
	// Resource The newly created resource object.
	Resource       map[string]interface{} `json:"resource"`
	SequenceNumber *int                   `json:"sequence_number,omitempty"`

	// Type Always `"session.resource.created"`.
	Type string `json:"type"`
}

SessionResourceCreatedEvent A session resource was created.

Emitted when a terminal is launched, a file is uploaded, or any other resource is materialized under a session. Wire shape is FLAT: `{"type": "session.resource.created", "resource": <SessionResourceObject-like dict>}`.

type SessionResourceDeletedEvent

type SessionResourceDeletedEvent struct {
	// ResourceID Opaque id of the deleted resource.
	ResourceID string `json:"resource_id"`

	// ResourceType Type of the deleted resource, e.g. `"terminal"`, `"file"`.
	ResourceType   string `json:"resource_type"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// SessionID Owning session/conversation id.
	SessionID string `json:"session_id"`

	// Type Always `"session.resource.deleted"`.
	Type string `json:"type"`
}

SessionResourceDeletedEvent A session resource was deleted.

Emitted when a terminal is closed, a file is deleted, or any other resource is removed from a session.

type SessionResourceObject

type SessionResourceObject struct {
	// Environment For terminal resources, the environment id the terminal actually runs in. Omitted for non-terminal resources.
	Environment *string `json:"environment,omitempty"`

	// ID Opaque resource identifier, e.g. `"default"` or `"terminal_bash_s1"`.
	ID string `json:"id"`

	// Metadata Resource-type-specific metadata.
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// Name Human-readable display name. Not required to be globally unique.
	Name string `json:"name"`

	// Object Fixed resource type, always `"session.resource"`.
	Object string `json:"object"`

	// SessionID Owning session/conversation id.
	SessionID string `json:"session_id"`

	// Type Resource kind, initially `"environment"`, `"terminal"`, or `"file"`.
	Type string `json:"type"`
}

SessionResourceObject API representation of a session-scoped resource handle.

type SessionResourcePaginatedList

type SessionResourcePaginatedList struct {
	Data    []SessionResourceObject `json:"data,omitempty"`
	FirstID *string                 `json:"first_id,omitempty"`
	HasMore *bool                   `json:"has_more,omitempty"`
	LastID  *string                 `json:"last_id,omitempty"`
	Object  *string                 `json:"object,omitempty"`
}

SessionResourcePaginatedList Public paginated list of session resources.

type SessionResponse

type SessionResponse struct {
	// ActiveResponseID Response id of the turn currently in flight, or `None` when the session is idle. Sourced from the server's `_session_active_response_cache` at snapshot build time so a client connecting mid-turn can reopen a streaming `activeResponse` — the SSE stream is snapshot + live tail with no replay, so the turn-start `running` edge that carried this id is not re-sent on reconnect. Today only native-terminal forwarders (claude-native) stamp a turn id on their status edges; other harnesses leave this `None`.
	ActiveResponseID *string `json:"active_response_id,omitempty"`

	// AgentID Durable identifier of the bound agent, e.g. `"ag_abc123"`. Stable across renames of the agent.
	AgentID string `json:"agent_id"`

	// AgentName Human-readable name of the bound agent, e.g. `"research-agent"`. Loaded from the agent row at snapshot-build time. `None` when the agent row cannot be found (deleted or orphaned session).
	AgentName *string `json:"agent_name,omitempty"`

	// Archived Whether the session is archived. Archived sessions are hidden from the default sidebar listing and surface only behind the "Show archived" toggle. `False` for normal sessions. Toggled via `PATCH /v1/sessions/{id}`.
	Archived *bool `json:"archived,omitempty"`

	// BackgroundTaskCount Background shells (claude-native) still running as of the last status edge, so a reload re-shows "N shells still running" even though the session has settled to `"idle"`. `None` (the default / omitted) when no shells are tracked.
	BackgroundTaskCount *int `json:"background_task_count,omitempty"`

	// ContextWindow The model's context window size in tokens as looked up server-side from litellm's registry (or from the `AP_CONTEXT_WINDOW_OVERRIDE` env var), e.g. `200_000`. `None` when the model is not in litellm's registry and no override is set.
	ContextWindow *int `json:"context_window,omitempty"`

	// CostControlModeOverride Per-session cost-control switch: `"on"` activates the spec's configured cost-control mode, `"off"` disables cost control for this session. `None` means no override is active (the spec default applies). Set at create time or via `PATCH /v1/sessions/{id}` (the web "Cost Optimized" toggle); read by the cost-control advisor pipeline.
	CostControlModeOverride *string `json:"cost_control_mode_override,omitempty"`

	// CreatedAt Unix epoch seconds of creation.
	CreatedAt int `json:"created_at"`

	// ExternalSessionID Runtime-native session id this conversation wraps, e.g. a Claude Code session uuid for `omnigent claude` sessions. `None` for regular AP-only conversations. Populated by the wrapper bridge.
	ExternalSessionID *string `json:"external_session_id,omitempty"`

	// GitBranch Git branch checked out in the session's worktree, e.g. `"feature/login"`. Set only when the session was created with a server-created git worktree; `None` otherwise. The Web UI uses a non-`None` value to offer the "delete local branch" cleanup checkbox on session delete. See designs/SESSION_GIT_WORKTREE.md.
	GitBranch *string `json:"git_branch,omitempty"`

	// Harness The bound agent's canonical harness, e.g. `"claude-sdk"` or `"openai-agents"`. Lets the client render the active credential for the correct provider family instead of inferring it from the model string (which is wrong when the agent declares no model). `None` when the agent cannot be looked up.
	Harness *string `json:"harness,omitempty"`

	// HostID Host that launched (or should launch) the runner for this session, e.g. `"host_a1b2c3d4..."`. `None` for CLI-initiated sessions.
	HostID *string `json:"host_id,omitempty"`

	// HostOnline Whether the session's host tunnel is live (status online and fresh within the host liveness TTL). `None` when the session has no `host_id` (CLI/local). Used only to choose what the open view shows when `runner_online` is `False` — host alive ⇒ "send a message to wake the runner"; host dead ⇒ "reconnect / fork". Never participates in the reachability decision.
	HostOnline *bool `json:"host_online,omitempty"`

	// HostResumable Whether this session is bound to a dormant managed host the server can wake in place (its provider sets `SandboxLauncher.can_resume`). The open view reads it only when `host_online` is `False`, to split a confirmed host-down into a recoverable "asleep" state (send a message — the relaunch path resumes the sandbox) versus the terminal `host_offline` dead-end (reconnect from your machine / fork). `False` for non-managed or non-resumable hosts.
	HostResumable *bool `json:"host_resumable,omitempty"`

	// ID Unique session identifier (also the underlying conversation ID), e.g. `"conv_abc123"`.
	ID string `json:"id"`

	// Items Committed conversation items in chronological order. Empty for a freshly created session.
	Items []ConversationItem `json:"items,omitempty"`
	Kind  *string            `json:"kind,omitempty"`

	// Labels Session-scoped guardrails labels. Empty dict when no labels have been written.
	Labels map[string]string `json:"labels,omitempty"`

	// LastTaskError Error details from the most recently failed task. Only present when `status == "failed"` and the task stored an error. Lets clients display the failure reason on historical load without relying on the transient `response.error` SSE event (which may have been emitted before the web client subscribed). Format mirrors the `RetryErrorDetail` SSE shape: `{"code": "executor_error", "message": "..."}`. `None` in all other cases.
	LastTaskError map[string]string `json:"last_task_error,omitempty"`

	// LastTotalTokens Total token count (input + output) from the most recently completed task's `usage`, e.g. `45231`. `None` when no task has completed yet. Lets clients seed their context-ring on conversation resume without waiting for the next `response.completed` SSE event.
	LastTotalTokens *int `json:"last_total_tokens,omitempty"`

	// LLMModel The LLM model identifier from the bound agent's spec, e.g. `"anthropic/claude-sonnet-4-6"`. `None` when the agent has no explicit `llm:` block or the agent cannot be looked up.
	LLMModel   *string                     `json:"llm_model,omitempty"`
	MCPStartup map[string]MCPServerStartup `json:"mcp_startup,omitempty"`

	// ModelOptions Runner-owned model-picker options for native sessions. Claude supplies launch-time gateway aliases; Codex includes each model's supported reasoning efforts. Empty while unavailable.
	ModelOptions []NativeModelOption `json:"model_options,omitempty"`

	// ModelOverride Per-session LLM model override, e.g. `"claude-opus-4-7"`. `None` means no override is active (the agent's `llm_model` applies). Set via `PATCH /v1/sessions/{id}` or the REPL's `/model` command; both write the same column so the web UI and the TUI stay in sync.
	ModelOverride *string `json:"model_override,omitempty"`

	// ParentSessionID For sub-agent sessions, the parent conversation's id, e.g. `"conv_parent987"`. `None` for top-level sessions. Lets clients identify a session as a child and link back to its parent without an extra round-trip — the same conversation row exposes this via `parent_conversation_id` internally.
	ParentSessionID *string `json:"parent_session_id,omitempty"`

	// PendingElicitations Outstanding approval prompts on this session at the moment the snapshot was built — the original `response.elicitation_request` event dicts. Lets the UI render the ApprovalCard on cold load, since the live SSE stream has no replay and a prompt emitted before the user opened the chat would otherwise vanish. Empty list when no prompts are outstanding. Sourced from the Omnigent server's in-memory `omnigent.runtime.pending_elicitations` index.
	PendingElicitations []map[string]interface{} `json:"pending_elicitations,omitempty"`

	// PendingInputs Un-consumed web-composer user messages on native-terminal (claude-native / codex-native) sessions at snapshot time, each `{"pending_id", "content"}`. Native sessions don't persist a web message at POST time (the transcript forwarder is the single writer), so a client that posted then navigated away / rebound would lose its optimistic bubble; replaying these re-hydrates it. Empty list otherwise. Sourced from the in-memory `omnigent.runtime.pending_inputs` index.
	PendingInputs []map[string]interface{} `json:"pending_inputs,omitempty"`

	// PermissionLevel The requesting user's numeric permission level on this session: `1` = read, `2` = edit, `3` = manage. `None` when permissions are disabled (single-user mode without a permission store).
	PermissionLevel *int    `json:"permission_level,omitempty"`
	ProjectID       *string `json:"project_id,omitempty"`

	// ReasoningEffort Per-session reasoning-effort hint. Accepted metadata values are `"none"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, and `"max"`. Provider-specific support is validated when a turn executes. `None` means use the agent default.
	ReasoningEffort *string `json:"reasoning_effort,omitempty"`

	// RootConversationID The id of this session's spawn-tree root, e.g. `"conv_root1"`. Equals `id` for top-level sessions; for sub-agents it points at the top-level ancestor. Lets orchestration tools (e.g. `sys_session_close`) confirm a target shares the caller's spawn tree over the REST path. `None` only when the underlying row predates the `root_conversation_id` column (not expected post-migration).
	RootConversationID *string `json:"root_conversation_id,omitempty"`

	// RunnerID Runner currently bound to this session, e.g. `"runner_abc123"`. `None` until a client binds one via `PATCH /v1/sessions/{id}`.
	RunnerID *string `json:"runner_id,omitempty"`

	// RunnerOnline Strict runner liveness — `True` iff a runner tunnel is currently registered for this session. This is the sole reachability signal: `True` means the client can chat normally. It does **not** fold in host-relaunch optimism (a dead runner on a live host reads `False` here, not `True`) — the open-session view pairs it with `host_online` to decide what to show. `None` when the server has no runner liveness lookup wired.
	RunnerOnline *bool `json:"runner_online,omitempty"`

	// SandboxStatus Managed-sandbox launch progress while the session's background sandbox launch is in flight or has failed — see `SandboxStatus`. `None` for sessions without a managed launch and once the launch succeeds. Sourced from the Omnigent server's in-memory `_session_sandbox_status_cache` at snapshot build time, so a client opening the session mid-launch sees the current stage.
	SandboxStatus *SandboxStatus `json:"sandbox_status,omitempty"`

	// Skills Skills the bound agent has access to — the merged result of the agent spec's bundled `skills` and the host-scope skills discovered along the agent workdir / `~/.claude/skills/` (subject to the spec's `skills_filter`). Mirrors what the TUI passes to the runner at startup. Empty list when the agent spec cannot be loaded, or when bundled + host discovery yields nothing.
	Skills []SkillSummary `json:"skills,omitempty"`

	// Status Session lifecycle status. One of `"idle"` (no loop running), `"running"` (loop executing), `"waiting"` (loop parked on background work / sub-agents), or `"failed"` (terminal failure). Current read paths collapse `"waiting"` -> `"running"` before building this snapshot; the literal stays a superset of what the runtime can produce so a server that forwards the raw status never 500s on serialization.
	Status string `json:"status"`

	// SubAgentName For sub-agent sessions, the sub-agent type name within the parent's spec tree, e.g. `"summarizer"`. `None` for top-level sessions.
	SubAgentName *string `json:"sub_agent_name,omitempty"`

	// SubagentRoutingOverride Per-session subagent-routing switch, two-state: `"on"` routes subagent spawns, and `"off"` or `None` (unset) both leave them unrouted — the in-session "Subagent routing" row renders either as "Default". `None` on a row created before this became explicit inherits nothing. Stamped `"on"` at create for Smart Routing sessions; also set via `PATCH /v1/sessions/{id}`.
	SubagentRoutingOverride *string `json:"subagent_routing_override,omitempty"`

	// TerminalLaunchArgs Pass-through CLI args the native terminal wrapper (claude / codex) was launched with, e.g. `["--dangerously-skip-permissions"]`. `None` for non-native sessions or a native session launched with none. Lets the launcher reproduce the command on resume.
	TerminalLaunchArgs []string `json:"terminal_launch_args,omitempty"`

	// TerminalPending `True` while the runner is auto-creating a terminal-first session's terminal (claude-native / codex-native), so the Web UI shows a spinner on the Terminal pill instead of a silent greyed-out button. Cleared to `False` once the terminal lands or auto-create fails; from then on the client relies purely on whether a terminal resource exists. Sourced from the Omnigent server's in-memory `_session_terminal_pending_cache` at snapshot build time, so a client connecting mid-spin-up still sees the spinner.
	TerminalPending *bool `json:"terminal_pending,omitempty"`

	// Title Optional human-readable title, e.g. `"debugging auth flow"`. `None` when unset.
	Title *string `json:"title,omitempty"`

	// Todos Current Claude Code todo list items for `omnigent claude` sessions, as raw dicts from Claude's todo JSON file. Each dict has `content`, `status`, and `activeForm` keys. Empty list for non-claude-native sessions or when no todos have been reported yet. Sourced from the Omnigent server's in-memory `_session_todos_cache`.
	Todos []map[string]interface{} `json:"todos,omitempty"`

	// TotalCostUSD Cumulative LLM spend for this session in USD, e.g. `0.42`. `None` when the session is **unpriced** — no turn has been priced yet (the model is absent from the pricing catalog, or no usage has been recorded) — so clients render "—" rather than a misleading `$0.00`. Server-computed (cache-aware for relay/codex, exact billing for claude-native), the same total the cost-budget policy gates on. Lets clients seed their cost indicator on resume without waiting for the next `session.usage` SSE event.
	TotalCostUSD *float64 `json:"total_cost_usd,omitempty"`

	// UpdatedAt Unix epoch timestamp of the last persisted session activity. Advances when conversation items are appended and on session metadata edits (rename, agent switch, archive); a mid-stall rename therefore resets the clock, so an orchestrator treating this as a pure item-append heartbeat should account for that. Can be compared across snapshots independently of lifecycle status.
	UpdatedAt *int `json:"updated_at,omitempty"`

	// UsageByModel Per-model breakdown of the same subtree usage, keyed by the raw harness model id, e.g. `{"claude-sonnet-4-6": ModelUsage(input_tokens=12000, ...)}`. `None` when no per-model usage has been recorded (older sessions recorded before this field existed, or before the first turn). Lets the UI show which models a session spent its tokens / budget on.
	UsageByModel map[string]ModelUsage `json:"usage_by_model,omitempty"`

	// Workspace Absolute path on disk where the runner cd's, e.g. `"/Users/corey/universe/src/foo"`. Set when the session was bound to a host workspace at create-time, or when the CLI captured `os.getcwd()` at session-create. Always `None` when not yet validated against a host. When a git worktree was created for the session, this is the worktree directory path.
	Workspace *string `json:"workspace,omitempty"`
}

SessionResponse API representation of a session.

Returned by `POST /v1/sessions`, `GET /v1/sessions/{id}`, and `PATCH /v1/sessions/{id}`.

type SessionSandboxStatusEvent

type SessionSandboxStatusEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Error Failure detail when `stage == "failed"`, e.g. `"managed sandbox launch failed: spend limit reached"`. `None` otherwise. Category: **transient** (SSE-only). On reconnect, clients seed the progress indicator from the session snapshot's `sandbox_status` field, which is populated by `_session_sandbox_status_cache` at snapshot build time.
	Error          *string `json:"error,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// Stage The launch stage just entered, e.g. `"provisioning"` — see `SandboxStatus` for the full pipeline order.
	Stage string `json:"stage"`

	// Type Always `"session.sandbox_status"`.
	Type string `json:"type"`
}

SessionSandboxStatusEvent Managed-sandbox launch progress for a `host_type="managed"` session.

A managed create returns before its sandbox exists; the Omnigent server emits this event as the background launch pipeline advances so the Web UI can show live provisioning progress on the session page instead of a silent dead chat: sandbox provision → repository clone → host startup → runner connect → ready, or a terminal failure with the reason.

type SessionSkillsEvent

type SessionSkillsEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`. Category: **transient** (SSE-only). On reconnect, clients seed the menu from the session snapshot's `skills` field, which is populated by the runner-skills cache at snapshot build time.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"session.skills"`.
	Type string `json:"type"`
}

SessionSkillsEvent Signal that a session's runner-owned skills have resolved.

Skills are discovered against the bound runner's filesystem and fetched off the session-snapshot hot path: the snapshot kicks a single background fetch (`_load_runner_skills` in `omnigent/server/routes/sessions.py`) and serves `[]` until it lands. This event fires the moment that background fetch populates the per-session skills cache, so a connected web client can re-read the snapshot and fill its slash-command menu instead of waiting for the next bind.

Carries no payload beyond the conversation id — it is a "skills are ready, re-read the snapshot" nudge, mirroring the invalidate-then-refetch shape used by `SessionChangedFilesInvalidatedEvent`. The snapshot's `skills` field (now cache-backed) stays the source of truth.

type SessionStatusEvent

type SessionStatusEvent struct {
	BackgroundTaskCount *int `json:"background_task_count,omitempty"`

	// BlockedOn Short human phrase naming what a still-`running` session is parked on, e.g. `"permission prompt"` or `"dialog open"`. Set by terminal-backed integrations whose agent can block on a dialog the web UI does not mirror, so the client can say *why* nothing is moving instead of showing a bare spinner. `None` whenever the session is not parked. Unrelated to the `waiting` status above, which means the turn has ended and only background work remains. Category: **transient** (SSE-only). Status is rederived on reconnect from the cached last-relayed turn lifecycle event or by re-querying the runner; not persisted by the runtime.
	BlockedOn *string `json:"blocked_on,omitempty"`

	// ConversationID The conversation/session identifier whose status changed, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Error Machine-readable failure detail, present only when `status == "failed"`. Carries the message the runner attached when a turn died — most importantly a SETUP-phase failure (spec resolution, spawn-env build) that ends the turn before any `response.failed` event is emitted. `None` for every non-failed transition. Clients render `error.message` as the terminal error line; without it a setup failure shows as a silent end.
	Error *ErrorDetail `json:"error,omitempty"`

	// ResponseID Optional active response id for terminal-backed integrations, e.g. `"codex_turn_abc123"`. Clients use it to associate coarse session status edges with the assistant bubble they describe. `None` for ordinary in-process runtime edges.
	ResponseID     *string `json:"response_id,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// Status New session status. `"launching"` (session or child task created, but no concrete harness start observed), `"idle"` (no loop running), `"running"` (loop executing), `"waiting"` (parent turn parked on the async-work drain), or `"failed"` (terminal failure).
	Status string `json:"status"`

	// Type Always `"session.status"`.
	Type string `json:"type"`
}

SessionStatusEvent Session lifecycle status transition.

Emitted by the runtime / session route handler at every transition between `launching` / `running` / `waiting` / `idle` / `failed`. Wire shape is FLAT (not enveloped): `{"type": "session.status", "conversation_id": "...", "status": "...", "sequence_number": null}`.

The `waiting` value is emitted by the runtime's parent agent loop when it parks on the `async_work_complete` drain (`_drain_async_completions(block_for_one=True)` in `omnigent/runtime/workflow.py`) — i.e. while the parent turn is suspended waiting for background tools or sub-agents to complete. Per the session-rearchitecture spec §3 ("Event types and direction"), `waiting` is the session-status companion of the spec's `turn.waiting` transient — clients should render the session as actively blocked-on-async-work, distinct from `running`. When the drain wakes (a child completed), the runtime emits a follow-up `running` to resume.

type SessionSupersededEvent

type SessionSupersededEvent struct {
	// ConversationID The superseded (old) conversation id this event rides the stream of, e.g. `"conv_old"`.
	ConversationID string `json:"conversation_id"`

	// Reason Why the session was superseded. Currently always `"clear"` (a Claude Code `/clear`); kept as a field so the client can branch on future supersession causes.
	Reason         *string `json:"reason,omitempty"`
	SequenceNumber *int    `json:"sequence_number,omitempty"`

	// TargetConversationID The conversation to follow to, e.g. `"conv_new"`.
	TargetConversationID string `json:"target_conversation_id"`

	// Type Always `"session.superseded"`.
	Type string `json:"type"`
}

SessionSupersededEvent This conversation was superseded by another and clients should follow to it.

Emitted by `_publish_session_superseded` in `omnigent/server/routes/sessions.py` when the claude-native forwarder rotates a session away on a Claude `/clear` (the old conversation keeps its history but the live terminal moves to a fresh conversation — see `_post_clear_supersession` in `omnigent/claude_native_forwarder.py`). A client actively viewing the superseded conversation auto-redirects to `target_conversation_id`.

Category: **transient** (SSE-only), live-only by design. There is no SSE replay: a client that connects after the rotation does not get this event. The durable counterpart is the persisted notice message appended to the old conversation (a `message` item linking to the new conversation), which a reloading client renders instead of being force-redirected.

The wire shape is FLAT (not enveloped): `{"type": "session.superseded", "conversation_id": <old>, "target_conversation_id": <new>, "reason": "clear"}`.

type SessionSwitchAgentRequest

type SessionSwitchAgentRequest struct {
	// AgentID Built-in agent to switch the session to, e.g. `"ag_builtin_codex"`. Must be a built-in agent (one listed by `GET /v1/agents`) and different from the session's current agent.
	AgentID string `json:"agent_id"`
}

SessionSwitchAgentRequest Request body for `POST /v1/sessions/{id}/switch-agent`.

Rebinds an existing session in place to a different agent/harness, keeping the same session (transcript, comments, files, workspace). Unlike fork, no new session is created.

type SessionTerminalActivityEvent

type SessionTerminalActivityEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// SessionID Owning session/conversation id.
	SessionID string `json:"session_id"`

	// TerminalID Opaque terminal resource id, e.g. `"terminal_zsh_s1"`.
	TerminalID string `json:"terminal_id"`

	// Type Always `"session.terminal.activity"`.
	Type string `json:"type"`
}

SessionTerminalActivityEvent A terminal's pane produced output (runner-determined activity pulse).

Powers the web "active" badge for any terminal without a client PTY attach — the runner's per-terminal pane watcher emits this when the pane content changes. Transient (a live pulse; not persisted, not in the connect snapshot).

type SessionTerminalPendingEvent

type SessionTerminalPendingEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`

	// Pending `True` while the terminal is being created; `False` once it lands or auto-create fails. Category: **transient** (SSE-only). On reconnect, clients seed the spinner from the session snapshot's `terminal_pending` field, which is populated by `_session_terminal_pending_cache` at snapshot build time.
	Pending        bool `json:"pending"`
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// Type Always `"session.terminal_pending"`.
	Type string `json:"type"`
}

SessionTerminalPendingEvent Terminal spin-up status for a terminal-first session.

Two sources emit this event:

  1. The Omnigent server at `POST /v1/sessions` for host-launched terminal-first sessions — the earliest possible point, before the runner even starts, so the spinner appears immediately on session create rather than after the runner boots.
  2. The Omnigent relay when the runner's `session.terminal_pending` frame arrives — covers non-host-launched sessions (e.g. server-dispatched sub-agents) and carries the authoritative `pending=False` clear emitted by the runner's `finally` block.

Together they allow web to show a spinner on the Terminal pill while the backend boots the terminal instead of a silent greyed-out button, and to distinguish "still starting up" from "no terminal" (killed or never created).

type SessionTodosEvent

type SessionTodosEvent struct {
	// ConversationID Session identifier, e.g. `"conv_abc123"`.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Todos Current todo items read from Claude's todo file. Each entry is a raw dict with `content` (str), `status` (`"pending"` | `"in_progress"` | `"completed"`), and `activeForm` (str, the gerund form) keys, e.g. `[{"content": "Fix the bug", "status": "in_progress", "activeForm": "Fixing the bug"}]`. Category: **transient** (SSE-only). On reconnect, clients seed the panel from the session snapshot's `todos` field, which is populated by `_session_todos_cache` at snapshot build time.
	Todos []map[string]interface{} `json:"todos"`

	// Type Always `"session.todos"`.
	Type string `json:"type"`
}

SessionTodosEvent Todo-list update from a Claude Code terminal-backed session.

Emitted after an `external_session_todos` POST from the `omnigent claude` transcript forwarder, which captures todo updates via `PostToolUse`/`TodoWrite` hook events from Claude Code and forwards them to the Omnigent server. Lets web render a live todo panel in the right column without polling.

type SessionUsage

type SessionUsage struct {
	AgentName *string `json:"agent_name,omitempty"`

	// CostUSD Authoritative cumulative USD spend for this session's subtree.
	CostUSD *float64 `json:"cost_usd,omitempty"`

	// CreatedAt Unix epoch seconds of creation.
	CreatedAt int     `json:"created_at"`
	Harness   *string `json:"harness,omitempty"`

	// ID Session/conversation identifier, e.g. `"conv_abc123"`.
	ID       string  `json:"id"`
	LLMModel *string `json:"llm_model,omitempty"`

	// Models Per-model recorded cost, keyed by the raw harness model id (e.g. `{"claude-opus-4-8": 14.03}`). Empty when no per-model cost was recorded. May not sum to `cost_usd` (see above).
	Models         map[string]float64 `json:"models,omitempty"`
	OtherHarnesses []string           `json:"other_harnesses,omitempty"`

	// Title Optional human-readable title.
	Title *string `json:"title,omitempty"`

	// UpdatedAt Unix epoch seconds of last activity.
	UpdatedAt int `json:"updated_at"`
}

SessionUsage One session's rolled-up LLM spend for the `GET /v1/usage` report.

`cost_usd` is the subtree total — the session plus every sub-agent it spawned — read from `session_usage` via `omnigent.runtime.policies.builder.load_session_usage`. It is the authoritative session figure (the same value the web session sidebar shows as "Session cost" and the daily rollup records).

`models` is the per-model cost breakdown, mirroring the web session sidebar's per-model list. Deliberately **not guaranteed to sum to `cost_usd`**: native harnesses report a single cumulative session total and the server attributes it to the currently-active model, so on a session that switched models mid-run each model's bucket is a snapshot of the running total rather than that model's own spend. The header `cost_usd` stays authoritative; the per-model values are shown faithfully as recorded (same convention as the web UI).

type SessionUsageEvent

type SessionUsageEvent struct {
	// ContextTokens `input + cache_creation + cache_read` from the latest assistant `message.usage`. `None` on a window-only broadcast.
	ContextTokens *int `json:"context_tokens,omitempty"`

	// ContextWindow Resolved window in tokens (e.g. 200_000 normally, 1_000_000 with `opus[1m]` / `sonnet[1m]`). `None` on a tokens-only broadcast.
	ContextWindow *int `json:"context_window,omitempty"`

	// ConversationID Session identifier.
	ConversationID string `json:"conversation_id"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// TotalCostUSD Cumulative session spend in USD after this update, e.g. `0.42` — the server-computed total the cost-budget policy gates on. Present **only when the session is priced**; omitted (`None`, stripped by `exclude_none`) when unpriced or on a broadcast that carries no cost change, so the client keeps its prior value (the snapshot seeds the initial "—" for an unpriced session). Once a session is priced the total only grows, so it never reverts to unpriced.
	TotalCostUSD *float64 `json:"total_cost_usd,omitempty"`

	// Type Always `"session.usage"`.
	Type string `json:"type"`

	// UsageByModel Per-model breakdown of the same subtree usage after this update, keyed by raw harness model id, e.g. `{"claude-sonnet-4-6": ModelUsage(input_tokens=12000, ...)}`. `None` (stripped by `exclude_none`) on a broadcast that carries no per-model change, so the client keeps its cached map. Category: **transient** (SSE-only). On reconnect, clients seed the ring from the session snapshot's `last_total_tokens` and `context_window`, the cost indicator from `total_cost_usd`, and the per-model token breakdown from `usage_by_model`.
	UsageByModel map[string]ModelUsage `json:"usage_by_model,omitempty"`
}

SessionUsageEvent Token-usage update from a terminal-backed integration.

Emitted after an `external_session_usage` POST from an out-of-AP runtime (e.g. the `omnigent claude` transcript forwarder). Either field may be absent; clients should leave cached values untouched for missing fields.

type SetCodexGoalRequest

type SetCodexGoalRequest struct {
	// Objective Goal objective text, e.g. `"Finish the migration and keep tests green"`. Must be non-empty after trimming and no longer than 4000 characters, matching Codex app-server's goal contract.
	Objective string `json:"objective"`

	// Status Optional user-selected goal status. `"active"` starts or resumes the goal, and `"paused"` stores it paused. Omit this field to preserve Codex's current lifecycle state.
	Status *string `json:"status,omitempty"`

	// TokenBudget Optional positive token budget, e.g. `40000`. Explicit JSON `null` clears the Codex goal budget; omitting the field leaves it absent from the forwarded request.
	TokenBudget *int `json:"token_budget,omitempty"`
}

SetCodexGoalRequest Request body for `PUT /v1/sessions/{id}/codex_goal`.

type SetCodexGoalV1SessionsSessionIDCodexGoalPutJSONRequestBody

type SetCodexGoalV1SessionsSessionIDCodexGoalPutJSONRequestBody = SetCodexGoalRequest

SetCodexGoalV1SessionsSessionIDCodexGoalPutJSONRequestBody defines body for SetCodexGoalV1SessionsSessionIDCodexGoalPut for application/json ContentType.

type SetSharingRequest

type SetSharingRequest struct {
	PublicSharing *bool   `json:"public_sharing,omitempty"`
	SharingMode   *string `json:"sharing_mode,omitempty"`
}

SetSharingRequest Body for `PUT /v1/sharing`.

Both fields are optional so an admin can update either setting independently; at least one must be present.

type SetSharingV1SharingPutJSONRequestBody

type SetSharingV1SharingPutJSONRequestBody = SetSharingRequest

SetSharingV1SharingPutJSONRequestBody defines body for SetSharingV1SharingPut for application/json ContentType.

type SkillSummary

type SkillSummary struct {
	// Description One-line summary from the SKILL.md frontmatter, e.g. `"Triage open GitHub issues in the repo."`.
	Description string `json:"description"`

	// Name Skill identifier as parsed from the SKILL.md frontmatter, e.g. `"triage-issues"`. Lowercase kebab-case.
	Name string `json:"name"`
}

SkillSummary Safe subset of a discovered skill for API exposure.

Surfaces the skill name and one-line description so clients (e.g. the web composer's slash-command menu) can list which skills the session has access to. The full skill `content` is intentionally omitted — it's only loaded server-side when the harness invokes the skill, and it can be large.

type SlashCommandData

type SlashCommandData struct {
	// Arguments Raw `<command-args>` text. Empty when none.
	Arguments string `json:"arguments"`

	// Kind `"skill"` for plugin/Skill invocations, `"command"` for surfaced CLI built-ins (`/effort`, `/clear`, `/compact`, `/model`, `/ultrareview`). The web renderer uses this to pick the prefix label and icon. Defaults to `"skill"` so persisted items predating this field deserialize without backfill.
	Kind  *string `json:"kind,omitempty"`
	Model string  `json:"model"`

	// Name Command name with leading `/` stripped, e.g. `"dev-productivity:simplify"`.
	Name string `json:"name"`

	// Output `<local-command-stdout>` text when present, else `None` (the common case — Skills act via the next assistant turn, not stdout).
	Output *string `json:"output,omitempty"`
}

SlashCommandData Data payload for a slash-command invocation observed in a harness transcript (today: Claude Code's embedded TUI).

Listed in `NON_CONTENT_ITEM_TYPES` so the agent loop's history filter skips it — a downstream LLM never sees this as a phantom tool call. Field names mirror `function_call` so the web renderer can reuse the tool-card layout.

**Parameters**

- `agent` — Harness/agent name, e.g. `"claude-native-ui"`. Serialized as `"model"` for parity with other items.

type SmartRoutingSourcesInfo

type SmartRoutingSourcesInfo struct {
	External bool `json:"external"`
	Oss      bool `json:"oss"`
}

SmartRoutingSourcesInfo defines model for SmartRoutingSourcesInfo.

type StoreHarnessCredentialRequest

type StoreHarnessCredentialRequest struct {
	// BaseURL The gateway base URL, required for `kind="gateway"`.
	BaseURL *string `json:"base_url,omitempty"`

	// DefaultModel Optional family default model id to pin.
	DefaultModel *string `json:"default_model,omitempty"`

	// EnvVar For `kind="adopt"`, the host env var to reference.
	EnvVar *string `json:"env_var,omitempty"`

	// Kind `"key"` (a vendor API key), `"gateway"` (a compatible proxy at `base_url`), or `"adopt"` (reference host env `env_var`).
	Kind string `json:"kind"`

	// Secret The API key / gateway token for `key` / `gateway`; `None` for `adopt`.
	Secret *string `json:"secret,omitempty"`

	// WireAPI Optional OpenAI wire protocol (`"chat"` / `"responses"`).
	WireAPI *string `json:"wire_api,omitempty"`
}

StoreHarnessCredentialRequest Request body for `POST /v1/hosts/{id}/harnesses/{harness}/credential`.

Carries the credential in the body (never the URL). The secret field is optional so the `adopt` kind — which references an existing host env var by name rather than sending a value — can omit it.

type StoreHostHarnessCredentialV1HostsHostIDHarnessesHarnessCredentialPostJSONRequestBody

type StoreHostHarnessCredentialV1HostsHostIDHarnessesHarnessCredentialPostJSONRequestBody = StoreHarnessCredentialRequest

StoreHostHarnessCredentialV1HostsHostIDHarnessesHarnessCredentialPostJSONRequestBody defines body for StoreHostHarnessCredentialV1HostsHostIDHarnessesHarnessCredentialPost for application/json ContentType.

type StreamSessionV1SessionsSessionIDStreamGetParams

type StreamSessionV1SessionsSessionIDStreamGetParams struct {
	// Idle Presence idle flag computed by the web client at connect time (tab backgrounded ≥ its debounce). An idle *flip* mid-view arrives as a reconnect carrying the new value — there is no separate update endpoint.
	Idle *bool `form:"idle,omitempty" json:"idle,omitempty"`
}

StreamSessionV1SessionsSessionIDStreamGetParams defines parameters for StreamSessionV1SessionsSessionIDStreamGet.

type SwitchSessionAgentV1SessionsSessionIDSwitchAgentPostJSONRequestBody

type SwitchSessionAgentV1SessionsSessionIDSwitchAgentPostJSONRequestBody = SessionSwitchAgentRequest

SwitchSessionAgentV1SessionsSessionIDSwitchAgentPostJSONRequestBody defines body for SwitchSessionAgentV1SessionsSessionIDSwitchAgentPost for application/json ContentType.

type TerminalCommandData

type TerminalCommandData struct {
	// Input The raw command string, e.g. `"pwd"`. Present when `kind="input"`, `None` otherwise.
	Input *string `json:"input,omitempty"`

	// Kind `"input"` for the command text, `"output"` for the combined stdout/stderr result.
	Kind string `json:"kind"`

	// Stderr Captured stderr text. Present when `kind="output"`, `None` otherwise.
	Stderr *string `json:"stderr,omitempty"`

	// Stdout Captured stdout text. Present when `kind="output"`, `None` otherwise.
	Stdout *string `json:"stdout,omitempty"`
}

TerminalCommandData Data payload for a runner-side terminal command (`!cmd`) observed in a harness transcript (today: Claude Code's embedded TUI).

Listed in `NON_CONTENT_ITEM_TYPES` so the agent loop never injects this as phantom content into the LLM's message history.

Claude Code writes two sibling transcript records per `!cmd` invocation: one `<bash-input>` record and one combined `<bash-stdout>`/`<bash-stderr>` record. Each maps to one `terminal_command` item with `kind="input"` or `kind="output"` respectively.

type ToolOutputDeltaEvent

type ToolOutputDeltaEvent struct {
	// CallID Function-call correlation id.
	CallID string `json:"call_id"`

	// Delta Command stdout/stderr fragment.
	Delta          string `json:"delta"`
	SequenceNumber *int   `json:"sequence_number,omitempty"`

	// Type Always `"response.function_call_output.delta"`.
	Type string `json:"type"`
}

ToolOutputDeltaEvent Incremental output from an in-progress function call.

type TurnCancelledEvent

type TurnCancelledEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// SessionID Session/conversation identifier, e.g. `"conv_abc123"`.
	SessionID string `json:"session_id"`

	// Type Fixed literal `"turn.cancelled"`.
	Type string `json:"type"`
}

TurnCancelledEvent Emitted when a turn is interrupted by the user or system.

type TurnCompletedEvent

type TurnCompletedEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// SessionID Session/conversation identifier, e.g. `"conv_abc123"`.
	SessionID string `json:"session_id"`

	// Type Fixed literal `"turn.completed"`.
	Type string `json:"type"`
}

TurnCompletedEvent Emitted when a turn finishes successfully with no pending work.

type TurnFailedEvent

type TurnFailedEvent struct {
	// Error Error details, e.g. `{"message": "LLM timeout", "type": "TimeoutError"}`.
	Error          map[string]interface{} `json:"error,omitempty"`
	SequenceNumber *int                   `json:"sequence_number,omitempty"`

	// SessionID Session/conversation identifier, e.g. `"conv_abc123"`.
	SessionID string `json:"session_id"`

	// Type Fixed literal `"turn.failed"`.
	Type string `json:"type"`
}

TurnFailedEvent Emitted when a turn fails due to an LLM error, timeout, or crash.

type TurnStartedEvent

type TurnStartedEvent struct {
	SequenceNumber *int `json:"sequence_number,omitempty"`

	// SessionID Session/conversation identifier, e.g. `"conv_abc123"`.
	SessionID string `json:"session_id"`

	// Type Fixed literal `"turn.started"`.
	Type string `json:"type"`
}

TurnStartedEvent Emitted when the runner starts a new turn for a session.

type UpdateCodexGoalStatusRequest

type UpdateCodexGoalStatusRequest struct {
	// Status Target Codex goal status, either `"paused"` or `"active"`.
	Status string `json:"status"`
}

UpdateCodexGoalStatusRequest Request body for `PATCH /v1/sessions/{id}/codex_goal/status`.

Codex app-server represents pause/resume as `thread/goal/set` status updates. Omnigent exposes the two user-driven transitions explicitly: `"paused"` pauses an active goal, and `"active"` resumes a paused, blocked, or usage-limited goal.

type UpdateCodexGoalStatusV1SessionsSessionIDCodexGoalStatusPatchJSONRequestBody

type UpdateCodexGoalStatusV1SessionsSessionIDCodexGoalStatusPatchJSONRequestBody = UpdateCodexGoalStatusRequest

UpdateCodexGoalStatusV1SessionsSessionIDCodexGoalStatusPatchJSONRequestBody defines body for UpdateCodexGoalStatusV1SessionsSessionIDCodexGoalStatusPatch for application/json ContentType.

type UpdateCommentRequest

type UpdateCommentRequest struct {
	// Body New comment body. `None` leaves it unchanged.
	Body *string `json:"body,omitempty"`

	// Status New status, e.g. `"addressed"`. `None` leaves it unchanged.
	Status *string `json:"status,omitempty"`
}

UpdateCommentRequest Request body for `PATCH /sessions/{id}/comments/{comment_id}`.

type UpdateCommentV1SessionsSessionIDCommentsCommentIDPatchJSONRequestBody

type UpdateCommentV1SessionsSessionIDCommentsCommentIDPatchJSONRequestBody = UpdateCommentRequest

UpdateCommentV1SessionsSessionIDCommentsCommentIDPatchJSONRequestBody defines body for UpdateCommentV1SessionsSessionIDCommentsCommentIDPatch for application/json ContentType.

type UpdateDefaultPolicyRequest

type UpdateDefaultPolicyRequest struct {
	// Enabled New enabled flag. `None` leaves it unchanged.
	Enabled *bool `json:"enabled,omitempty"`

	// Handler New handler path or URL. `None` leaves it unchanged.
	Handler *string `json:"handler,omitempty"`

	// Name New policy name. `None` leaves it unchanged.
	Name *string `json:"name,omitempty"`
}

UpdateDefaultPolicyRequest Request body for `PATCH /v1/policies/{policy_id}`.

All fields are optional; `None` fields are left unchanged. Unknown fields (including `type`, which is immutable) are rejected with `422`.

type UpdateMcpServerV1SessionsSessionIDAgentMcpServersServerNamePutJSONRequestBody

type UpdateMcpServerV1SessionsSessionIDAgentMcpServersServerNamePutJSONRequestBody = UpsertMCPServerRequest

UpdateMcpServerV1SessionsSessionIDAgentMcpServersServerNamePutJSONRequestBody defines body for UpdateMcpServerV1SessionsSessionIDAgentMcpServersServerNamePut for application/json ContentType.

type UpdatePolicyV1PoliciesPolicyIDPatchJSONRequestBody

type UpdatePolicyV1PoliciesPolicyIDPatchJSONRequestBody = UpdateDefaultPolicyRequest

UpdatePolicyV1PoliciesPolicyIDPatchJSONRequestBody defines body for UpdatePolicyV1PoliciesPolicyIDPatch for application/json ContentType.

type UpdatePolicyV1SessionsSessionIDPoliciesPolicyIDPatchJSONRequestBody

type UpdatePolicyV1SessionsSessionIDPoliciesPolicyIDPatchJSONRequestBody = UpdateSessionPolicyRequest

UpdatePolicyV1SessionsSessionIDPoliciesPolicyIDPatchJSONRequestBody defines body for UpdatePolicyV1SessionsSessionIDPoliciesPolicyIDPatch for application/json ContentType.

type UpdateProjectRequest

type UpdateProjectRequest struct {
	// Config New config object to replace the stored one. `None` leaves it unchanged; an empty object `{}` clears the stored defaults.
	Config map[string]interface{} `json:"config,omitempty"`

	// Name New project name. `None` leaves it unchanged; otherwise trimmed, non-empty, at most 100 characters.
	Name *string `json:"name,omitempty"`
}

UpdateProjectRequest Request body for `PATCH /v1/projects/{project_id}`.

All fields optional; `None` leaves a field unchanged.

type UpdateProjectV1ProjectsProjectIDPatchJSONRequestBody

type UpdateProjectV1ProjectsProjectIDPatchJSONRequestBody = UpdateProjectRequest

UpdateProjectV1ProjectsProjectIDPatchJSONRequestBody defines body for UpdateProjectV1ProjectsProjectIDPatch for application/json ContentType.

type UpdateSessionAgentV1SessionsSessionIDAgentPutMultipartRequestBody

type UpdateSessionAgentV1SessionsSessionIDAgentPutMultipartRequestBody = BodyUpdateSessionAgentV1SessionsSessionIDAgentPut

UpdateSessionAgentV1SessionsSessionIDAgentPutMultipartRequestBody defines body for UpdateSessionAgentV1SessionsSessionIDAgentPut for multipart/form-data ContentType.

type UpdateSessionPolicyRequest

type UpdateSessionPolicyRequest struct {
	// Enabled New enabled flag. `None` leaves it unchanged.
	Enabled *bool `json:"enabled,omitempty"`

	// Handler New handler path or URL. `None` leaves it unchanged.
	Handler *string `json:"handler,omitempty"`

	// Name New policy name. `None` leaves it unchanged.
	Name *string `json:"name,omitempty"`
}

UpdateSessionPolicyRequest Request body for `PATCH /v1/sessions/{session_id}/policies/{policy_id}`.

All fields are optional; `None` fields are left unchanged. Unknown fields (including `type`, which is immutable) are rejected with `422`.

type UpdateSessionRequest

type UpdateSessionRequest struct {
	// Archived New archived state. `True` archives (hides the session from the default sidebar listing), `False` unarchives, `None` leaves unchanged. Owner-only (unlike `title`, which needs only edit access).
	Archived *bool `json:"archived,omitempty"`

	// CollaborationMode Codex-native collaboration-mode string. `"plan"` enters Plan mode and `"default"` returns to Default mode for subsequent Codex turns. Only valid for sessions stamped with the codex-native wrapper label. Omitted leaves unchanged.
	CollaborationMode *string `json:"collaboration_mode,omitempty"`

	// CostControlModeOverride Per-session cost-control switch: `"on"` activates the spec's configured cost-control mode, `"off"` disables cost control for this session. Explicit JSON `null` clears the override back to the spec default; omitting the field leaves it unchanged (`"off"` is a real value here, so the field's *presence* — not a clear alias — is the clear signal, unlike `model_override`).
	CostControlModeOverride *string `json:"cost_control_mode_override,omitempty"`

	// ExternalSessionID Runtime-native session id captured by a wrapper bridge (e.g. Claude Code's session uuid for `omnigent claude` sessions). Idempotent on same-value writes; the server rejects attempts to overwrite an already-set different value with `invalid_input` to surface programmer errors. `None` leaves unchanged.
	ExternalSessionID *string `json:"external_session_id,omitempty"`

	// Labels Guardrails labels to upsert. Merges with existing labels; keys not present are left untouched.
	Labels map[string]string `json:"labels,omitempty"`

	// ModelOverride Per-session LLM model override, e.g. `"claude-opus-4-7"`. The value is forwarded as-is to the executor at turn start; the server does not enumerate valid models. Clear aliases such as `"default"`, `"off"`, or `"reset"` remove the override (matching the REPL's `/model` semantics). `None` leaves unchanged.
	ModelOverride *string `json:"model_override,omitempty"`

	// ProjectID File this session into a first-class project (see `designs/PROJECTS_PRD.md`). A non-empty id moves the session into that project; the empty string `""` unfiles it. **Omitting** the field leaves membership unchanged; an explicit `null` is rejected (400) so it can't silently unfile. Owner-only: because projects are owner-private, only the session owner may file it, and only into a project they own — the server verifies both. Independent of the legacy `omni_project` label, which is set via `labels`.
	ProjectID *string `json:"project_id,omitempty"`

	// ReasoningEffort Per-session reasoning-effort hint. Accepted metadata values are `"none"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, and `"max"`. Provider-specific support is validated when a turn executes. Clear aliases such as `"default"` remove the session override. `None` leaves unchanged.
	ReasoningEffort *string `json:"reasoning_effort,omitempty"`

	// RunnerID Identifier of a registered runner, e.g. `"runner_abc123"`. `None` leaves runner binding unchanged.
	RunnerID *string `json:"runner_id,omitempty"`

	// Silent When `True`, persist metadata changes but skip the runner-side side effects — specifically the native `/effort` / `/model` / Codex collaboration-mode forwards into the live runtime. Used by automatic bind-time handoffs (web's sticky-pref apply on session switch, the REPL's pre-create `/model` snapshot) where injecting a visible slash command into a freshly-spawned pane would render as an unexpected "Command model X" item before the user has sent anything. Default `False` preserves the user-driven picker / `/model` behaviour where the live forward IS the desired feedback.
	Silent *bool `json:"silent,omitempty"`

	// SubagentRoutingOverride Per-session subagent-routing switch: `"on"` routes subagent spawns, `"off"` leaves them unrouted. Explicit JSON `null` clears the override, which lands the session on Default (the same behavior as `"off"` — nothing is inherited); omitting the field leaves it unchanged (same presence-is-the-clear-signal rule as `cost_control_mode_override`). Effective on the next spawn, so it can be changed at any point in a session.
	SubagentRoutingOverride *string `json:"subagent_routing_override,omitempty"`

	// TerminalLaunchArgs Per-session native-terminal pass-through args, e.g. `["--dangerously-skip-permissions"]`. A list (including `[]`) replaces the stored value wholesale — resume is last-write-wins, never an append. Bounds (count / length) are validated server-side. `None` leaves unchanged.
	TerminalLaunchArgs []string `json:"terminal_launch_args,omitempty"`

	// Title New title, e.g. `"debugging auth flow"`. `None` leaves unchanged.
	Title *string `json:"title,omitempty"`
}

UpdateSessionRequest Request body for `PATCH /v1/sessions/{id}`.

The Alpha runner-state pivot makes this endpoint the mutable session affinity primitive when `runner_id` is provided. The server validates that the runner is online, then replaces `conversations.runner_id`. Existing session metadata updates remain supported for clients that update title, labels, or reasoning effort through the sessions API.

type UpdateSessionV1SessionsSessionIDPatchJSONRequestBody

type UpdateSessionV1SessionsSessionIDPatchJSONRequestBody = UpdateSessionRequest

UpdateSessionV1SessionsSessionIDPatchJSONRequestBody defines body for UpdateSessionV1SessionsSessionIDPatch for application/json ContentType.

type UploadSessionFileV1SessionsSessionIDResourcesFilesPostMultipartRequestBody

type UploadSessionFileV1SessionsSessionIDResourcesFilesPostMultipartRequestBody = BodyUploadSessionFileV1SessionsSessionIDResourcesFilesPost

UploadSessionFileV1SessionsSessionIDResourcesFilesPostMultipartRequestBody defines body for UploadSessionFileV1SessionsSessionIDResourcesFilesPost for multipart/form-data ContentType.

type UpsertMCPServerRequest

type UpsertMCPServerRequest struct {
	Args        []string          `json:"args,omitempty"`
	Command     *string           `json:"command,omitempty"`
	Description *string           `json:"description,omitempty"`
	Headers     map[string]string `json:"headers,omitempty"`
	Name        string            `json:"name"`
	Transport   string            `json:"transport"`
	URL         *string           `json:"url,omitempty"`
}

UpsertMCPServerRequest Request body for creating or updating a session agent MCP server.

`env` is still excluded. `headers` is accepted for HTTP servers; when omitted, existing headers in the bundle are preserved unchanged.

type Usage

type Usage struct {
	// CacheCreationInputTokens Prompt tokens written to the provider prompt cache (cache creation), billed at a premium rate. Like `cache_read_input_tokens`, this is separate from `input_tokens`; `0` when not reported.
	CacheCreationInputTokens *int `json:"cache_creation_input_tokens,omitempty"`

	// CacheReadInputTokens Prompt tokens served from a provider prompt cache (cache hit), billed at a reduced rate. Reported by Anthropic-style providers as a count *separate* from `input_tokens` (which carries only the non-cached portion); `0` when the provider does not break out cache usage. Consumed by the cache-aware server-side cost path.
	CacheReadInputTokens *int `json:"cache_read_input_tokens,omitempty"`

	// ContextTokens Context-fill estimate for the next turn — set only by executors that make multiple LLM sub-calls per turn (e.g. `openai-agents`). For single-call executors this is absent and `total_tokens` serves the same purpose. The toolbar context ring and `/context` command use this field when present, falling back to `total_tokens`.
	ContextTokens *int `json:"context_tokens,omitempty"`

	// CostUSD Authoritative per-turn cost in USD reported directly by the harness/provider (e.g. GitHub Copilot's AI-credit total). When present, the server-side cost path uses it in preference to the catalog token-price estimate; `None` when the harness doesn't report a cost (the common case, where cost is computed from token counts x catalog pricing).
	CostUSD *float64 `json:"cost_usd,omitempty"`

	// InputTokens Number of input (prompt) tokens consumed.
	InputTokens *int `json:"input_tokens,omitempty"`

	// Model The LLM model the harness actually used for this turn, e.g. `"claude-opus-4-8"` or `"databricks-gpt-5-5"`. Reported by relay executors so the server-side cost path can price the turn even when the agent spec pins no `llm.model` (e.g. supervisors that delegate / use the harness default). `None` when the executor doesn't report it; the cost path then falls back to the session override / spec model.
	Model *string `json:"model,omitempty"`

	// OutputTokens Number of output (completion) tokens generated.
	OutputTokens *int `json:"output_tokens,omitempty"`

	// OutputTokensDetails Breakdown of output token usage (e.g. reasoning tokens).
	OutputTokensDetails *UsageDetails `json:"output_tokens_details,omitempty"`

	// TotalTokens Sum of input and output tokens across all LLM sub-calls for this turn (billing total).
	TotalTokens *int `json:"total_tokens,omitempty"`
}

Usage Token usage statistics for a response.

type UsageDetails

type UsageDetails struct {
	// ReasoningTokens Number of tokens consumed by chain-of-thought reasoning.
	ReasoningTokens *int `json:"reasoning_tokens,omitempty"`
}

UsageDetails Breakdown of output token usage.

type UsageReport

type UsageReport struct {
	// CostLast30D Total spend over the last 30 UTC days (incl. today).
	CostLast30D *float64 `json:"cost_last_30d,omitempty"`

	// CostLast7D Total spend over the last 7 UTC days (incl. today).
	CostLast7D *float64 `json:"cost_last_7d,omitempty"`

	// CostToday Total spend on the current UTC day.
	CostToday  *float64    `json:"cost_today,omitempty"`
	DailyCosts []DailyCost `json:"daily_costs,omitempty"`
	Object     *string     `json:"object,omitempty"`

	// Sessions Per-session detail, newest activity first.
	Sessions []SessionUsage `json:"sessions,omitempty"`

	// TotalCostUSD All-time total spend from the daily rollup.
	TotalCostUSD *float64 `json:"total_cost_usd,omitempty"`
}

UsageReport Aggregated LLM usage for the calling user, powering `omni usage`.

The cost summary is sourced from the per-user daily-cost rollup (`user_daily_cost`), which attributes spend to the UTC calendar day it occurred on. Windows are therefore calendar-day buckets summed back from today — `cost_today` / `cost_last_7d` / `cost_last_30d` — not rolling wall-clock hours, so a weeks-old session touched today is not counted wholly in "today".

The `sessions` list is a separate detail view built from each session's cumulative `session_usage` (newest activity first), so the summary and the per-session list come from different sources and are not guaranteed to tie out to the cent (the summary counts every priced turn ever recorded for the user; the list only covers the user's currently-listed top-level sessions).

type ValidationError

type ValidationError struct {
	Ctx   map[string]interface{}     `json:"ctx,omitempty"`
	Input interface{}                `json:"input,omitempty"`
	Loc   []ValidationError_Loc_Item `json:"loc"`
	Msg   string                     `json:"msg"`
	Type  string                     `json:"type"`
}

ValidationError defines model for ValidationError.

type ValidationErrorLoc0

type ValidationErrorLoc0 = string

ValidationErrorLoc0 defines model for ValidationError.Loc.0.

type ValidationErrorLoc1

type ValidationErrorLoc1 = int

ValidationErrorLoc1 defines model for ValidationError.Loc.1.

type ValidationError_Loc_Item

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

ValidationError_Loc_Item defines model for ValidationError.loc.Item.

func (ValidationError_Loc_Item) AsValidationErrorLoc0

func (t ValidationError_Loc_Item) AsValidationErrorLoc0() (ValidationErrorLoc0, error)

AsValidationErrorLoc0 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc0

func (ValidationError_Loc_Item) AsValidationErrorLoc1

func (t ValidationError_Loc_Item) AsValidationErrorLoc1() (ValidationErrorLoc1, error)

AsValidationErrorLoc1 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc1

func (*ValidationError_Loc_Item) FromValidationErrorLoc0

func (t *ValidationError_Loc_Item) FromValidationErrorLoc0(v ValidationErrorLoc0) error

FromValidationErrorLoc0 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc0

func (*ValidationError_Loc_Item) FromValidationErrorLoc1

func (t *ValidationError_Loc_Item) FromValidationErrorLoc1(v ValidationErrorLoc1) error

FromValidationErrorLoc1 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc1

func (ValidationError_Loc_Item) MarshalJSON

func (t ValidationError_Loc_Item) MarshalJSON() ([]byte, error)

func (*ValidationError_Loc_Item) MergeValidationErrorLoc0

func (t *ValidationError_Loc_Item) MergeValidationErrorLoc0(v ValidationErrorLoc0) error

MergeValidationErrorLoc0 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc0

func (*ValidationError_Loc_Item) MergeValidationErrorLoc1

func (t *ValidationError_Loc_Item) MergeValidationErrorLoc1(v ValidationErrorLoc1) error

MergeValidationErrorLoc1 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc1

func (*ValidationError_Loc_Item) UnmarshalJSON

func (t *ValidationError_Loc_Item) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL