generated

package
v0.0.0-...-ad859cb Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func FixtureBackupEntryJSON_Edge

func FixtureBackupEntryJSON_Edge() map[string]any

func FixtureBackupEntryJSON_Populated

func FixtureBackupEntryJSON_Populated() map[string]any

func FixtureBackupEntryJSON_ZeroValue

func FixtureBackupEntryJSON_ZeroValue() map[string]any

func FixtureDevicePairedJSON_Edge

func FixtureDevicePairedJSON_Edge() map[string]any

func FixtureDevicePairedJSON_Populated

func FixtureDevicePairedJSON_Populated() map[string]any

func FixtureDevicePairedJSON_ZeroValue

func FixtureDevicePairedJSON_ZeroValue() map[string]any

func FixtureDevicePendingJSON_Edge

func FixtureDevicePendingJSON_Edge() map[string]any

func FixtureDevicePendingJSON_Populated

func FixtureDevicePendingJSON_Populated() map[string]any

func FixtureDevicePendingJSON_ZeroValue

func FixtureDevicePendingJSON_ZeroValue() map[string]any

func FixtureDoctorIssueJSON_Edge

func FixtureDoctorIssueJSON_Edge() map[string]any

FixtureDoctorIssueJSON_Edge — low severity, no optional fields.

func FixtureDoctorIssueJSON_Populated

func FixtureDoctorIssueJSON_Populated() map[string]any

FixtureDoctorIssueJSON_Populated — returns a raw JSON map matching DoctorIssue schema. Used in raw-JSON contract tests since there is no named Go type for DoctorIssue.

func FixtureDoctorIssueJSON_ZeroValue

func FixtureDoctorIssueJSON_ZeroValue() map[string]any

FixtureDoctorIssueJSON_ZeroValue — empty map → missing all required fields.

Types

type AboutResponse

type AboutResponse struct {
	// Arch CPU architecture (GOARCH).
	Arch string `json:"arch"`

	// FrameAncestorsFallback True when frame-ancestors is in fallback ('*') mode — the host is bound to 0.0.0.0/[::] and public_url is not set, degrading T-04 defence. The SPA can show a warning banner when this is true.
	FrameAncestorsFallback bool `json:"frame_ancestors_fallback"`

	// GoVersion Go runtime version string.
	GoVersion string `json:"go_version"`

	// Os Operating system (GOOS).
	Os string `json:"os"`

	// Pid Gateway process ID.
	Pid int `json:"pid"`

	// PreviewListenerEnabled Whether the iframe preview listener is currently bound and serving requests. Absent on old gateway versions (treat as true when absent).
	PreviewListenerEnabled bool `json:"preview_listener_enabled"`

	// PreviewOrigin Fully-qualified HTTPS origin operators set via gateway.preview_origin (e.g. "https://preview.acme.com"). Absent when not configured; the SPA constructs the origin from preview_port in that case.
	PreviewOrigin *string `json:"preview_origin,omitempty"`

	// PreviewPort Port the preview listener is bound on (FR-009). Default is gateway.port + 1.
	PreviewPort int `json:"preview_port"`

	// Uptime Human-readable uptime string.
	Uptime string `json:"uptime"`

	// UptimeSeconds Process uptime in seconds.
	UptimeSeconds int `json:"uptime_seconds"`

	// Version Omnipus gateway version string.
	Version string `json:"version"`

	// WarmupTimeoutSeconds Dev-server warmup timeout from config.
	WarmupTimeoutSeconds int `json:"warmup_timeout_seconds"`
}

AboutResponse Gateway metadata returned by GET /api/v1/about.

type ActivityEvent

type ActivityEvent struct {
	// AgentId ID of the agent involved in the event (absent for system events).
	AgentId *string `json:"agent_id,omitempty"`

	// AgentName Display name of the agent involved (absent for system events).
	AgentName *string `json:"agent_name,omitempty"`

	// Id Opaque event identifier derived from the source entity. E.g. "session-<uuid>", "task-c-<id>", "task-u-<id>".
	Id string `json:"id"`

	// Summary Human-readable one-line summary of the event (e.g. session title, task title).
	Summary *string `json:"summary,omitempty"`

	// Timestamp RFC3339 UTC timestamp when the event occurred.
	Timestamp time.Time `json:"timestamp"`

	// Type Event category. "session_start" = new session began. "task_created" = a task was created. "task_updated" = a task completed or changed status.
	Type ActivityEventType `json:"type"`
}

ActivityEvent A single activity event as returned by GET /activity. Events represent notable runtime occurrences (session starts, task lifecycle changes) from the last 24 hours, returned in reverse-chronological order (max 50 entries).

type ActivityEventType

type ActivityEventType string

ActivityEventType Event category. "session_start" = new session began. "task_created" = a task was created. "task_updated" = a task completed or changed status.

const (
	ActivityEventTypeSessionStart ActivityEventType = "session_start"
	ActivityEventTypeTaskCreated  ActivityEventType = "task_created"
	ActivityEventTypeTaskUpdated  ActivityEventType = "task_updated"
)

Defines values for ActivityEventType.

func (ActivityEventType) Valid

func (e ActivityEventType) Valid() bool

Valid indicates whether the value is a known member of the ActivityEventType enum.

type ActivityEventsResponse

type ActivityEventsResponse struct {
	// Events Activity events (reverse-chronological, max 50, last 24 hours).
	Events []struct {
		// AgentId ID of the agent involved in the event (absent for system events).
		AgentId *string `json:"agent_id,omitempty"`

		// AgentName Display name of the agent involved (absent for system events).
		AgentName *string `json:"agent_name,omitempty"`

		// Id Opaque event identifier derived from the source entity. E.g. "session-<uuid>", "task-c-<id>", "task-u-<id>".
		Id string `json:"id"`

		// Summary Human-readable one-line summary of the event (e.g. session title, task title).
		Summary *string `json:"summary,omitempty"`

		// Timestamp RFC3339 UTC timestamp when the event occurred.
		Timestamp time.Time `json:"timestamp"`

		// Type Event category. "session_start" = new session began. "task_created" = a task was created. "task_updated" = a task completed or changed status.
		Type ActivityEventsResponseEventsType `json:"type"`
	} `json:"events"`

	// Warning Present when a non-fatal error occurred while collecting events (e.g. a session store was unreadable). The response is still returned.
	Warning *string `json:"warning,omitempty"`
}

ActivityEventsResponse Response from GET /api/v1/activity when partial data is available with a warning. Returned instead of a plain ActivityEvent array when a session read error occurred.

type ActivityEventsResponseEventsType

type ActivityEventsResponseEventsType string

ActivityEventsResponseEventsType Event category. "session_start" = new session began. "task_created" = a task was created. "task_updated" = a task completed or changed status.

const (
	ActivityEventsResponseEventsTypeSessionStart ActivityEventsResponseEventsType = "session_start"
	ActivityEventsResponseEventsTypeTaskCreated  ActivityEventsResponseEventsType = "task_created"
	ActivityEventsResponseEventsTypeTaskUpdated  ActivityEventsResponseEventsType = "task_updated"
)

Defines values for ActivityEventsResponseEventsType.

func (ActivityEventsResponseEventsType) Valid

Valid indicates whether the value is a known member of the ActivityEventsResponseEventsType enum.

type AddMcpServerJSONRequestBody

type AddMcpServerJSONRequestBody = McpServerCreate

AddMcpServerJSONRequestBody defines body for AddMcpServer for application/json ContentType.

type Agent

type Agent struct {
	// Color Hex color code for agent avatar display (e.g. "#D4AF37").
	Color *string `json:"color,omitempty"`

	// Default Whether this agent is the global default that handles inbound messages with no more-specific routing rule. At most one agent is default.
	Default *bool `json:"default,omitempty"`

	// Description Short description of the agent's purpose.
	Description *string `json:"description,omitempty"`

	// FallbackModels Ordered list of fallback model IDs tried when the primary model returns an error. Each entry may be a bare model name or "provider/model" format.
	FallbackModels *[]string `json:"fallback_models,omitempty"`

	// Heartbeat Contents of HEARTBEAT.md — periodic background instructions. Empty string when not set. Always present on detail responses (never null).
	Heartbeat string `json:"heartbeat"`

	// HeartbeatEnabled Whether the HEARTBEAT.md periodic instruction loop is active for this agent.
	HeartbeatEnabled bool `json:"heartbeat_enabled"`

	// HeartbeatInterval Interval in seconds between heartbeat passes.
	HeartbeatInterval int `json:"heartbeat_interval"`

	// Icon Phosphor icon name for agent avatar (e.g. "Robot", "Octopus").
	Icon *string `json:"icon,omitempty"`

	// Id Unique agent identifier. UUID for custom agents; well-known strings for core agents (e.g. "jim").
	Id string `json:"id"`

	// Instructions Body of AGENT.md (everything after the closing frontmatter delimiter) — additional runtime instructions. Empty string when not set. Always present on detail responses (never null).
	Instructions string `json:"instructions"`

	// Locked When true, name, description, soul, heartbeat, and instructions are immutable via the PUT /agents/{id} endpoint. Core agents are always locked.
	Locked bool `json:"locked"`

	// MaxToolIterations Maximum number of tool calls allowed per turn. Inherited from agents.defaults.max_tool_iterations when not overridden.
	MaxToolIterations int `json:"max_tool_iterations"`

	// Model Model name string used for LLM calls (resolved from defaults when not explicitly set on the agent). May be "provider/model" format for OpenRouter.
	Model *string `json:"model,omitempty"`

	// ModelParams LLM sampling parameters applied to an agent's requests. When absent, the provider defaults are used.
	ModelParams *struct {
		// MaxTokens Maximum tokens to generate per turn.
		MaxTokens *int `json:"max_tokens,omitempty"`

		// Temperature Sampling temperature (0.0 – 2.0). Lower = more deterministic.
		Temperature *float64 `json:"temperature,omitempty"`

		// TopP Nucleus sampling probability mass. 1.0 disables nucleus sampling.
		TopP *float64 `json:"top_p,omitempty"`
	} `json:"model_params,omitempty"`

	// Name Human-readable display name.
	Name string `json:"name"`

	// RateLimits Per-agent rate-limit overrides. When use_global_defaults is true the global policy applies and per-agent overrides are ignored.
	RateLimits *struct {
		// MaxCostPerDay Maximum USD cost per day for this agent. Absent = no per-agent cap.
		MaxCostPerDay *float64 `json:"max_cost_per_day,omitempty"`

		// MaxLlmCallsPerHour Maximum LLM API calls per hour for this agent. Absent = no per-agent cap.
		MaxLlmCallsPerHour *int `json:"max_llm_calls_per_hour,omitempty"`

		// MaxToolCallsPerMinute Maximum tool calls per minute for this agent. Absent = no per-agent cap.
		MaxToolCallsPerMinute *int `json:"max_tool_calls_per_minute,omitempty"`

		// UseGlobalDefaults When true, global rate limits are used and per-agent overrides are ignored.
		UseGlobalDefaults *bool `json:"use_global_defaults,omitempty"`
	} `json:"rate_limits,omitempty"`

	// SandboxProfile Kernel sandbox profile applied to this agent's tool calls. "workspace" = Landlock to workspace dir only. "workspace+net" = Landlock + network access. "host" = read-only host filesystem access. "off" = god-mode (requires --allow-god-mode at gateway boot).
	SandboxProfile *AgentSandboxProfile `json:"sandbox_profile,omitempty"`

	// ShellPolicy Per-agent shell command deny-pattern configuration.
	ShellPolicy *struct {
		// CustomDenyPatterns Additional Go regexp patterns to block in shell commands.
		CustomDenyPatterns *[]string `json:"custom_deny_patterns,omitempty"`

		// EnableDenyPatterns Enable pattern-based shell command blocking.
		EnableDenyPatterns *bool `json:"enable_deny_patterns,omitempty"`
	} `json:"shell_policy,omitempty"`

	// Skills List of skill IDs granted to this agent. Only skills in this list are available during this agent's runs. When no skills are granted the field is omitted entirely from the response (the backend does not emit an empty array). Absence of the field and an empty array are semantically identical (opt-in, default none).
	Skills *[]string `json:"skills,omitempty"`

	// Soul Contents of SOUL.md — the agent's system prompt. Empty string for locked core agents (prompt is compiled in, not exposed via API). Empty string for draft agents (no SOUL.md written yet). Always present (never null).
	Soul string `json:"soul"`

	// Stats Aggregate runtime statistics for an agent. Absent on the Agent object when no sessions have been run.
	Stats *struct {
		// LastActive RFC3339 timestamp of the last turn completed by this agent.
		LastActive *time.Time `json:"last_active,omitempty"`

		// TotalCost Lifetime USD cost across all sessions.
		TotalCost float64 `json:"total_cost"`

		// TotalSessions Lifetime count of sessions created for this agent.
		TotalSessions int `json:"total_sessions"`

		// TotalTokens Lifetime token count across all sessions.
		TotalTokens int `json:"total_tokens"`
	} `json:"stats,omitempty"`

	// Status Current runtime status. "active" = agent is processing a turn. "idle" = ready and waiting. "draft" = SOUL.md is empty (no prompt written yet). "error" is a frontend-added possibility not emitted by the backend today.
	Status AgentStatus `json:"status"`

	// SteeringMode Tool execution steering strategy. "one-at-a-time" = approve each tool call individually. Other values are provider-specific. Defaults to "one-at-a-time".
	SteeringMode string `json:"steering_mode"`

	// TimeoutSeconds Maximum seconds a single agent turn may run before being interrupted. Inherited from agents.defaults.timeout_seconds when not overridden per-agent.
	TimeoutSeconds int `json:"timeout_seconds"`

	// ToolFeedback When true, tool results are echoed back to the LLM as user messages (tool feedback loop enabled).
	ToolFeedback bool `json:"tool_feedback"`

	// ToolsCfg Per-agent tool configuration governing which builtin tools are accessible and which MCP servers are bound (config.AgentToolsCfg on the Go side, AgentToolsCfg interface in src/lib/api.ts).
	ToolsCfg *struct {
		// Builtin Controls builtin tool visibility for this agent.
		Builtin *struct {
			// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.
			DefaultPolicy *AgentToolsCfgBuiltinDefaultPolicy `json:"default_policy,omitempty"`

			// Policies Per-tool policy overrides. Keys are tool names or glob patterns (e.g. "system.*", "workspace.shell"). Values are one of "allow", "ask", "deny".
			Policies *map[string]AgentToolsCfgBuiltinPolicies `json:"policies,omitempty"`
		} `json:"builtin,omitempty"`

		// Mcp MCP server bindings for this agent.
		Mcp *struct {
			// Servers List of MCP server bindings.
			Servers *[]struct {
				// Id MCP server identifier as registered in config.json.
				Id string `json:"id"`

				// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
				Tools *[]string `json:"tools,omitempty"`
			} `json:"servers,omitempty"`
		} `json:"mcp,omitempty"`
	} `json:"tools_cfg,omitempty"`

	// Type Agent classification. "core" = compiled-in identity locked agent. "custom" = user-defined agent. "system" = legacy operator-supplied entry (config.AgentTypeSystem survives in the API contract for backwards compatibility but SeedConfig does NOT create these — they only appear if config.json contains one).
	Type AgentType `json:"type"`

	// Warning Non-fatal advisory (e.g. config reload failed after create/update).
	Warning *string `json:"warning,omitempty"`
}

Agent An agent configuration object as returned by GET /agents and GET /agents/{id}. Maps to the Go agentResponse struct and the TypeScript Agent interface in src/lib/api.ts. Core (locked) agents suppress soul/instructions in list responses and forbid identity mutations via PUT.

func FixtureAgent_Edge

func FixtureAgent_Edge() Agent

func FixtureAgent_Populated

func FixtureAgent_Populated() Agent

func FixtureAgent_ZeroValue

func FixtureAgent_ZeroValue() Agent

type AgentCreateRequest

type AgentCreateRequest struct {
	// Color Hex color code for the agent avatar.
	Color *string `json:"color,omitempty"`

	// Description Short description of the agent's purpose.
	Description *string `json:"description,omitempty"`

	// FallbackModels Ordered list of fallback model IDs tried when the primary model returns an error. Each entry may be a bare model name or "provider/model" format.
	FallbackModels *[]string `json:"fallback_models,omitempty"`

	// Icon Phosphor icon name for the agent avatar.
	Icon *string `json:"icon,omitempty"`

	// Model Model name for LLM calls. When omitted, the global agents.defaults.model_name is used.
	Model *string `json:"model,omitempty"`

	// ModelParams LLM sampling parameters applied to this agent's requests.
	ModelParams *struct {
		// MaxTokens Maximum tokens to generate per turn.
		MaxTokens *int `json:"max_tokens,omitempty"`

		// Temperature Sampling temperature (0.0 – 2.0). Lower = more deterministic.
		Temperature *float64 `json:"temperature,omitempty"`

		// TopP Nucleus sampling probability mass. 1.0 disables nucleus sampling.
		TopP *float64 `json:"top_p,omitempty"`
	} `json:"model_params,omitempty"`

	// Name Display name for the new agent.
	Name string `json:"name"`

	// RateLimits Per-agent rate-limit overrides. When use_global_defaults is true the global policy applies.
	RateLimits *struct {
		// MaxCostPerDay Maximum USD cost per day for this agent. Absent = no per-agent cap.
		MaxCostPerDay *float64 `json:"max_cost_per_day,omitempty"`

		// MaxLlmCallsPerHour Maximum LLM API calls per hour for this agent. Absent = no per-agent cap.
		MaxLlmCallsPerHour *int `json:"max_llm_calls_per_hour,omitempty"`

		// MaxToolCallsPerMinute Maximum tool calls per minute for this agent. Absent = no per-agent cap.
		MaxToolCallsPerMinute *int `json:"max_tool_calls_per_minute,omitempty"`

		// UseGlobalDefaults When true, global rate limits are used and per-agent overrides are ignored.
		UseGlobalDefaults *bool `json:"use_global_defaults,omitempty"`
	} `json:"rate_limits,omitempty"`

	// Skills Initial list of skill IDs granted to this agent. An empty list (or absent field) means no skills are granted (opt-in, default none).
	Skills *[]string `json:"skills,omitempty"`

	// ToolsCfg Per-agent tool configuration governing which builtin tools are accessible and which MCP servers are bound (config.AgentToolsCfg on the Go side, AgentToolsCfg interface in src/lib/api.ts).
	ToolsCfg *struct {
		// Builtin Controls builtin tool visibility for this agent.
		Builtin *struct {
			// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.
			DefaultPolicy *AgentCreateRequestToolsCfgBuiltinDefaultPolicy `json:"default_policy,omitempty"`

			// Policies Per-tool policy overrides. Keys are tool names or glob patterns (e.g. "system.*", "workspace.shell"). Values are one of "allow", "ask", "deny".
			Policies *map[string]AgentCreateRequestToolsCfgBuiltinPolicies `json:"policies,omitempty"`
		} `json:"builtin,omitempty"`

		// Mcp MCP server bindings for this agent.
		Mcp *struct {
			// Servers List of MCP server bindings.
			Servers *[]struct {
				// Id MCP server identifier as registered in config.json.
				Id string `json:"id"`

				// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
				Tools *[]string `json:"tools,omitempty"`
			} `json:"servers,omitempty"`
		} `json:"mcp,omitempty"`
	} `json:"tools_cfg,omitempty"`
}

AgentCreateRequest Body for POST /agents. Creates a new custom agent. A UUID is assigned by the server. The agent starts in "draft" status (no SOUL.md written yet).

type AgentCreateRequestToolsCfgBuiltinDefaultPolicy

type AgentCreateRequestToolsCfgBuiltinDefaultPolicy string

AgentCreateRequestToolsCfgBuiltinDefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.

const (
	AgentCreateRequestToolsCfgBuiltinDefaultPolicyAllow AgentCreateRequestToolsCfgBuiltinDefaultPolicy = "allow"
	AgentCreateRequestToolsCfgBuiltinDefaultPolicyAsk   AgentCreateRequestToolsCfgBuiltinDefaultPolicy = "ask"
	AgentCreateRequestToolsCfgBuiltinDefaultPolicyDeny  AgentCreateRequestToolsCfgBuiltinDefaultPolicy = "deny"
)

Defines values for AgentCreateRequestToolsCfgBuiltinDefaultPolicy.

func (AgentCreateRequestToolsCfgBuiltinDefaultPolicy) Valid

Valid indicates whether the value is a known member of the AgentCreateRequestToolsCfgBuiltinDefaultPolicy enum.

type AgentCreateRequestToolsCfgBuiltinPolicies

type AgentCreateRequestToolsCfgBuiltinPolicies string

AgentCreateRequestToolsCfgBuiltinPolicies defines model for AgentCreateRequest.ToolsCfg.Builtin.Policies.

const (
	AgentCreateRequestToolsCfgBuiltinPoliciesAllow AgentCreateRequestToolsCfgBuiltinPolicies = "allow"
	AgentCreateRequestToolsCfgBuiltinPoliciesAsk   AgentCreateRequestToolsCfgBuiltinPolicies = "ask"
	AgentCreateRequestToolsCfgBuiltinPoliciesDeny  AgentCreateRequestToolsCfgBuiltinPolicies = "deny"
)

Defines values for AgentCreateRequestToolsCfgBuiltinPolicies.

func (AgentCreateRequestToolsCfgBuiltinPolicies) Valid

Valid indicates whether the value is a known member of the AgentCreateRequestToolsCfgBuiltinPolicies enum.

type AgentModelParams

type AgentModelParams struct {
	// MaxTokens Maximum tokens to generate per turn.
	MaxTokens *int `json:"max_tokens,omitempty"`

	// Temperature Sampling temperature (0.0 – 2.0). Lower = more deterministic.
	Temperature *float64 `json:"temperature,omitempty"`

	// TopP Nucleus sampling probability mass. 1.0 disables nucleus sampling.
	TopP *float64 `json:"top_p,omitempty"`
}

AgentModelParams LLM sampling parameters applied to an agent's requests. When absent, the provider defaults are used.

type AgentOwnerUpdateResponse

type AgentOwnerUpdateResponse struct {
	// AgentId The agent whose ownership was changed.
	AgentId string `json:"agent_id"`

	// OwnerUsername The username of the new owner.
	OwnerUsername string `json:"owner_username"`

	// Success True when ownership was successfully updated.
	Success bool `json:"success"`
}

AgentOwnerUpdateResponse Response from PATCH /api/v1/agents/{id}/ownership. Confirms the ownership change.

func FixtureAgentOwnerUpdateResponse_Edge

func FixtureAgentOwnerUpdateResponse_Edge() AgentOwnerUpdateResponse

func FixtureAgentOwnerUpdateResponse_Populated

func FixtureAgentOwnerUpdateResponse_Populated() AgentOwnerUpdateResponse

func FixtureAgentOwnerUpdateResponse_ZeroValue

func FixtureAgentOwnerUpdateResponse_ZeroValue() AgentOwnerUpdateResponse

type AgentOwnershipUpdateRequest

type AgentOwnershipUpdateRequest struct {
	// OwnerUsername Username of the new owner. Empty string clears ownership (requires X-Confirm-Demote: 1 header to prevent accidents).
	OwnerUsername *string `json:"owner_username,omitempty"`
}

AgentOwnershipUpdateRequest Request body for PATCH /api/v1/agents/{id}/ownership. Updates the owner_username field on a custom agent. Admin-only. System and core agents cannot have an owner assigned. Clearing the owner (empty string) requires the X-Confirm-Demote: 1 header.

type AgentRateLimits

type AgentRateLimits struct {
	// MaxCostPerDay Maximum USD cost per day for this agent. Absent = no per-agent cap.
	MaxCostPerDay *float64 `json:"max_cost_per_day,omitempty"`

	// MaxLlmCallsPerHour Maximum LLM API calls per hour for this agent. Absent = no per-agent cap.
	MaxLlmCallsPerHour *int `json:"max_llm_calls_per_hour,omitempty"`

	// MaxToolCallsPerMinute Maximum tool calls per minute for this agent. Absent = no per-agent cap.
	MaxToolCallsPerMinute *int `json:"max_tool_calls_per_minute,omitempty"`

	// UseGlobalDefaults When true, global rate limits are used and per-agent overrides are ignored.
	UseGlobalDefaults *bool `json:"use_global_defaults,omitempty"`
}

AgentRateLimits Per-agent rate-limit overrides. When use_global_defaults is true the global policy applies and per-agent overrides are ignored.

type AgentSandboxProfile

type AgentSandboxProfile string

AgentSandboxProfile Kernel sandbox profile applied to this agent's tool calls. "workspace" = Landlock to workspace dir only. "workspace+net" = Landlock + network access. "host" = read-only host filesystem access. "off" = god-mode (requires --allow-god-mode at gateway boot).

const (
	AgentSandboxProfileHost         AgentSandboxProfile = "host"
	AgentSandboxProfileOff          AgentSandboxProfile = "off"
	AgentSandboxProfileWorkspace    AgentSandboxProfile = "workspace"
	AgentSandboxProfileWorkspaceNet AgentSandboxProfile = "workspace+net"
)

Defines values for AgentSandboxProfile.

func (AgentSandboxProfile) Valid

func (e AgentSandboxProfile) Valid() bool

Valid indicates whether the value is a known member of the AgentSandboxProfile enum.

type AgentSession

type AgentSession struct {
	// CreatedAt RFC3339 creation timestamp.
	CreatedAt time.Time `json:"created_at"`

	// Id Session identifier.
	Id string `json:"id"`

	// Title Session title.
	Title string `json:"title"`

	// UpdatedAt RFC3339 last-update timestamp.
	UpdatedAt time.Time `json:"updated_at"`
}

AgentSession Minimal session summary as returned by GET /agents/{id}/sessions. Maps to the AgentSession interface in src/lib/api.ts. This is the same underlying session.UnifiedMeta object, but the SPA consumes it through the AgentSession interface which reads id, title, created_at, and updated_at directly.

type AgentShellPolicy

type AgentShellPolicy struct {
	// CustomDenyPatterns Additional Go regexp patterns to block in shell commands.
	CustomDenyPatterns *[]string `json:"custom_deny_patterns,omitempty"`

	// EnableDenyPatterns Enable pattern-based shell command blocking.
	EnableDenyPatterns *bool `json:"enable_deny_patterns,omitempty"`
}

AgentShellPolicy Per-agent shell command deny-pattern configuration.

type AgentStats

type AgentStats struct {
	// LastActive RFC3339 timestamp of the last turn completed by this agent.
	LastActive *time.Time `json:"last_active,omitempty"`

	// TotalCost Lifetime USD cost across all sessions.
	TotalCost float64 `json:"total_cost"`

	// TotalSessions Lifetime count of sessions created for this agent.
	TotalSessions int `json:"total_sessions"`

	// TotalTokens Lifetime token count across all sessions.
	TotalTokens int `json:"total_tokens"`
}

AgentStats Aggregate runtime statistics for an agent. Absent on the Agent object when no sessions have been run.

type AgentStatus

type AgentStatus string

AgentStatus Current runtime status. "active" = agent is processing a turn. "idle" = ready and waiting. "draft" = SOUL.md is empty (no prompt written yet). "error" is a frontend-added possibility not emitted by the backend today.

const (
	AgentStatusActive AgentStatus = "active"
	AgentStatusDraft  AgentStatus = "draft"
	AgentStatusError  AgentStatus = "error"
	AgentStatusIdle   AgentStatus = "idle"
)

Defines values for AgentStatus.

func (AgentStatus) Valid

func (e AgentStatus) Valid() bool

Valid indicates whether the value is a known member of the AgentStatus enum.

type AgentSwitchedFrame

type AgentSwitchedFrame struct {
	AgentId   *string `json:"agent_id,omitempty"`
	Message   *string `json:"message,omitempty"`
	SessionId string  `json:"session_id"`
	Type      string  `json:"type"`
}

AgentSwitchedFrame — Server → client active agent changed.

func FixtureAgentSwitchedFrame_Populated

func FixtureAgentSwitchedFrame_Populated() AgentSwitchedFrame

func FixtureAgentSwitchedFrame_ZeroValue

func FixtureAgentSwitchedFrame_ZeroValue() AgentSwitchedFrame

type AgentToolEntry

type AgentToolEntry struct {
	// ConfiguredPolicy The policy as written in the agent's config (before fence application).
	ConfiguredPolicy AgentToolEntryConfiguredPolicy `json:"configured_policy"`

	// EffectivePolicy The policy actually enforced at LLM-call time after fence and global policy overrides are applied.
	EffectivePolicy AgentToolEntryEffectivePolicy `json:"effective_policy"`

	// FenceApplied True when the tool requires admin approval (RequiresAdminAsk=true), the agent type is "custom", and the configured policy was "allow" but was downgraded to "ask" by the admin-ask fence (FR-061).
	FenceApplied bool `json:"fence_applied"`

	// Name Canonical tool name.
	Name string `json:"name"`

	// RequiresAdminAsk True when the tool's RequiresAdminAsk() returns true — the tool always needs an admin to approve its use.
	RequiresAdminAsk bool `json:"requires_admin_ask"`
}

AgentToolEntry Per-tool entry returned by GET /api/v1/agents/{id}/tools (FR-086, MAJ-008). Exposes both the configured policy and the effective (post-fence) policy so the SPA can display policy downgrades.

type AgentToolEntryConfiguredPolicy

type AgentToolEntryConfiguredPolicy string

AgentToolEntryConfiguredPolicy The policy as written in the agent's config (before fence application).

const (
	AgentToolEntryConfiguredPolicyAllow AgentToolEntryConfiguredPolicy = "allow"
	AgentToolEntryConfiguredPolicyAsk   AgentToolEntryConfiguredPolicy = "ask"
	AgentToolEntryConfiguredPolicyDeny  AgentToolEntryConfiguredPolicy = "deny"
)

Defines values for AgentToolEntryConfiguredPolicy.

func (AgentToolEntryConfiguredPolicy) Valid

Valid indicates whether the value is a known member of the AgentToolEntryConfiguredPolicy enum.

type AgentToolEntryEffectivePolicy

type AgentToolEntryEffectivePolicy string

AgentToolEntryEffectivePolicy The policy actually enforced at LLM-call time after fence and global policy overrides are applied.

const (
	AgentToolEntryEffectivePolicyAllow AgentToolEntryEffectivePolicy = "allow"
	AgentToolEntryEffectivePolicyAsk   AgentToolEntryEffectivePolicy = "ask"
	AgentToolEntryEffectivePolicyDeny  AgentToolEntryEffectivePolicy = "deny"
)

Defines values for AgentToolEntryEffectivePolicy.

func (AgentToolEntryEffectivePolicy) Valid

Valid indicates whether the value is a known member of the AgentToolEntryEffectivePolicy enum.

type AgentToolsCfg

type AgentToolsCfg struct {
	// Builtin Controls builtin tool visibility for this agent.
	Builtin *struct {
		// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.
		DefaultPolicy *AgentToolsCfgBuiltinDefaultPolicy `json:"default_policy,omitempty"`

		// Policies Per-tool policy overrides. Keys are tool names or glob patterns (e.g. "system.*", "workspace.shell"). Values are one of "allow", "ask", "deny".
		Policies *map[string]AgentToolsCfgBuiltinPolicies `json:"policies,omitempty"`
	} `json:"builtin,omitempty"`

	// Mcp MCP server bindings for this agent.
	Mcp *struct {
		// Servers List of MCP server bindings.
		Servers *[]struct {
			// Id MCP server identifier as registered in config.json.
			Id string `json:"id"`

			// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
			Tools *[]string `json:"tools,omitempty"`
		} `json:"servers,omitempty"`
	} `json:"mcp,omitempty"`
}

AgentToolsCfg Per-agent tool configuration governing which builtin tools are accessible and which MCP servers are bound (config.AgentToolsCfg on the Go side, AgentToolsCfg interface in src/lib/api.ts).

type AgentToolsCfgBuiltinDefaultPolicy

type AgentToolsCfgBuiltinDefaultPolicy string

AgentToolsCfgBuiltinDefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.

const (
	AgentToolsCfgBuiltinDefaultPolicyAllow AgentToolsCfgBuiltinDefaultPolicy = "allow"
	AgentToolsCfgBuiltinDefaultPolicyAsk   AgentToolsCfgBuiltinDefaultPolicy = "ask"
	AgentToolsCfgBuiltinDefaultPolicyDeny  AgentToolsCfgBuiltinDefaultPolicy = "deny"
)

Defines values for AgentToolsCfgBuiltinDefaultPolicy.

func (AgentToolsCfgBuiltinDefaultPolicy) Valid

Valid indicates whether the value is a known member of the AgentToolsCfgBuiltinDefaultPolicy enum.

type AgentToolsCfgBuiltinPolicies

type AgentToolsCfgBuiltinPolicies string

AgentToolsCfgBuiltinPolicies defines model for Agent.ToolsCfg.Builtin.Policies.

const (
	AgentToolsCfgBuiltinPoliciesAllow AgentToolsCfgBuiltinPolicies = "allow"
	AgentToolsCfgBuiltinPoliciesAsk   AgentToolsCfgBuiltinPolicies = "ask"
	AgentToolsCfgBuiltinPoliciesDeny  AgentToolsCfgBuiltinPolicies = "deny"
)

Defines values for AgentToolsCfgBuiltinPolicies.

func (AgentToolsCfgBuiltinPolicies) Valid

Valid indicates whether the value is a known member of the AgentToolsCfgBuiltinPolicies enum.

type AgentToolsResponse

type AgentToolsResponse struct {
	// AgentType Agent classification: "core", "system", or "custom". Informs the UI whether policy editing is allowed.
	AgentType *AgentToolsResponseAgentType `json:"agent_type,omitempty"`

	// Config Per-agent tool configuration governing which builtin tools are accessible and which MCP servers are bound (config.AgentToolsCfg on the Go side, AgentToolsCfg interface in src/lib/api.ts).
	Config struct {
		// Builtin Controls builtin tool visibility for this agent.
		Builtin *struct {
			// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.
			DefaultPolicy *AgentToolsResponseConfigBuiltinDefaultPolicy `json:"default_policy,omitempty"`

			// Policies Per-tool policy overrides. Keys are tool names or glob patterns (e.g. "system.*", "workspace.shell"). Values are one of "allow", "ask", "deny".
			Policies *map[string]AgentToolsResponseConfigBuiltinPolicies `json:"policies,omitempty"`
		} `json:"builtin,omitempty"`

		// Mcp MCP server bindings for this agent.
		Mcp *struct {
			// Servers List of MCP server bindings.
			Servers *[]struct {
				// Id MCP server identifier as registered in config.json.
				Id string `json:"id"`

				// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
				Tools *[]string `json:"tools,omitempty"`
			} `json:"servers,omitempty"`
		} `json:"mcp,omitempty"`
	} `json:"config"`

	// Tools Per-tool effective policy entries.
	Tools []struct {
		// ConfiguredPolicy The policy as written in the agent's config (before fence application).
		ConfiguredPolicy AgentToolsResponseToolsConfiguredPolicy `json:"configured_policy"`

		// EffectivePolicy The policy actually enforced at LLM-call time after fence and global policy overrides are applied.
		EffectivePolicy AgentToolsResponseToolsEffectivePolicy `json:"effective_policy"`

		// FenceApplied True when the tool requires admin approval (RequiresAdminAsk=true), the agent type is "custom", and the configured policy was "allow" but was downgraded to "ask" by the admin-ask fence (FR-061).
		FenceApplied bool `json:"fence_applied"`

		// Name Canonical tool name.
		Name string `json:"name"`

		// RequiresAdminAsk True when the tool's RequiresAdminAsk() returns true — the tool always needs an admin to approve its use.
		RequiresAdminAsk bool `json:"requires_admin_ask"`
	} `json:"tools"`
}

AgentToolsResponse Response from GET /api/v1/agents/{id}/tools and PUT /api/v1/agents/{id}/tools. Returns the agent's tool policy configuration plus the effective per-tool policy list.

func FixtureAgentToolsResponse_Edge

func FixtureAgentToolsResponse_Edge() AgentToolsResponse

func FixtureAgentToolsResponse_Populated

func FixtureAgentToolsResponse_Populated() AgentToolsResponse

func FixtureAgentToolsResponse_ZeroValue

func FixtureAgentToolsResponse_ZeroValue() AgentToolsResponse

type AgentToolsResponseAgentType

type AgentToolsResponseAgentType string

AgentToolsResponseAgentType Agent classification: "core", "system", or "custom". Informs the UI whether policy editing is allowed.

const (
	AgentToolsResponseAgentTypeCore   AgentToolsResponseAgentType = "core"
	AgentToolsResponseAgentTypeCustom AgentToolsResponseAgentType = "custom"
	AgentToolsResponseAgentTypeSystem AgentToolsResponseAgentType = "system"
)

Defines values for AgentToolsResponseAgentType.

func (AgentToolsResponseAgentType) Valid

Valid indicates whether the value is a known member of the AgentToolsResponseAgentType enum.

type AgentToolsResponseConfigBuiltinDefaultPolicy

type AgentToolsResponseConfigBuiltinDefaultPolicy string

AgentToolsResponseConfigBuiltinDefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.

const (
	AgentToolsResponseConfigBuiltinDefaultPolicyAllow AgentToolsResponseConfigBuiltinDefaultPolicy = "allow"
	AgentToolsResponseConfigBuiltinDefaultPolicyAsk   AgentToolsResponseConfigBuiltinDefaultPolicy = "ask"
	AgentToolsResponseConfigBuiltinDefaultPolicyDeny  AgentToolsResponseConfigBuiltinDefaultPolicy = "deny"
)

Defines values for AgentToolsResponseConfigBuiltinDefaultPolicy.

func (AgentToolsResponseConfigBuiltinDefaultPolicy) Valid

Valid indicates whether the value is a known member of the AgentToolsResponseConfigBuiltinDefaultPolicy enum.

type AgentToolsResponseConfigBuiltinPolicies

type AgentToolsResponseConfigBuiltinPolicies string

AgentToolsResponseConfigBuiltinPolicies defines model for AgentToolsResponse.Config.Builtin.Policies.

const (
	AgentToolsResponseConfigBuiltinPoliciesAllow AgentToolsResponseConfigBuiltinPolicies = "allow"
	AgentToolsResponseConfigBuiltinPoliciesAsk   AgentToolsResponseConfigBuiltinPolicies = "ask"
	AgentToolsResponseConfigBuiltinPoliciesDeny  AgentToolsResponseConfigBuiltinPolicies = "deny"
)

Defines values for AgentToolsResponseConfigBuiltinPolicies.

func (AgentToolsResponseConfigBuiltinPolicies) Valid

Valid indicates whether the value is a known member of the AgentToolsResponseConfigBuiltinPolicies enum.

type AgentToolsResponseToolsConfiguredPolicy

type AgentToolsResponseToolsConfiguredPolicy string

AgentToolsResponseToolsConfiguredPolicy The policy as written in the agent's config (before fence application).

const (
	AgentToolsResponseToolsConfiguredPolicyAllow AgentToolsResponseToolsConfiguredPolicy = "allow"
	AgentToolsResponseToolsConfiguredPolicyAsk   AgentToolsResponseToolsConfiguredPolicy = "ask"
	AgentToolsResponseToolsConfiguredPolicyDeny  AgentToolsResponseToolsConfiguredPolicy = "deny"
)

Defines values for AgentToolsResponseToolsConfiguredPolicy.

func (AgentToolsResponseToolsConfiguredPolicy) Valid

Valid indicates whether the value is a known member of the AgentToolsResponseToolsConfiguredPolicy enum.

type AgentToolsResponseToolsEffectivePolicy

type AgentToolsResponseToolsEffectivePolicy string

AgentToolsResponseToolsEffectivePolicy The policy actually enforced at LLM-call time after fence and global policy overrides are applied.

const (
	AgentToolsResponseToolsEffectivePolicyAllow AgentToolsResponseToolsEffectivePolicy = "allow"
	AgentToolsResponseToolsEffectivePolicyAsk   AgentToolsResponseToolsEffectivePolicy = "ask"
	AgentToolsResponseToolsEffectivePolicyDeny  AgentToolsResponseToolsEffectivePolicy = "deny"
)

Defines values for AgentToolsResponseToolsEffectivePolicy.

func (AgentToolsResponseToolsEffectivePolicy) Valid

Valid indicates whether the value is a known member of the AgentToolsResponseToolsEffectivePolicy enum.

type AgentToolsUpdateRequest

type AgentToolsUpdateRequest struct {
	// Builtin Builtin tool policy configuration for this agent.
	Builtin *struct {
		// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Defaults to "allow" when omitted.
		DefaultPolicy *AgentToolsUpdateRequestBuiltinDefaultPolicy `json:"default_policy,omitempty"`

		// Mode Legacy format: "explicit" builds a deny-all policy with allow entries for each name in visible[]. "inherit" sets default_policy=allow. Ignored when default_policy is present.
		Mode *AgentToolsUpdateRequestBuiltinMode `json:"mode,omitempty"`

		// Policies Per-tool policy overrides. Keys are canonical tool names or glob patterns (e.g. "system.*"). Values are "allow", "ask", or "deny".
		Policies *map[string]AgentToolsUpdateRequestBuiltinPolicies `json:"policies,omitempty"`

		// Visible Legacy format: tool names to allow when mode="explicit". Ignored when default_policy is present.
		Visible *[]string `json:"visible,omitempty"`
	} `json:"builtin,omitempty"`

	// Mcp MCP server bindings for this agent.
	Mcp *struct {
		// Servers List of MCP server bindings.
		Servers *[]struct {
			// Id MCP server identifier as registered in config.json.
			Id string `json:"id"`

			// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
			Tools *[]string `json:"tools,omitempty"`
		} `json:"servers,omitempty"`
	} `json:"mcp,omitempty"`
}

AgentToolsUpdateRequest Request body for PUT /api/v1/agents/{id}/tools. Replaces the agent's tool policy configuration. Supports both the current policy format (builtin.default_policy + builtin.policies) and the legacy explicit/inherit mode format (builtin.mode + builtin.visible) for backward compatibility. Legacy fields are converted to policy format server-side before persisting.

type AgentToolsUpdateRequestBuiltinDefaultPolicy

type AgentToolsUpdateRequestBuiltinDefaultPolicy string

AgentToolsUpdateRequestBuiltinDefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Defaults to "allow" when omitted.

const (
	AgentToolsUpdateRequestBuiltinDefaultPolicyAllow AgentToolsUpdateRequestBuiltinDefaultPolicy = "allow"
	AgentToolsUpdateRequestBuiltinDefaultPolicyAsk   AgentToolsUpdateRequestBuiltinDefaultPolicy = "ask"
	AgentToolsUpdateRequestBuiltinDefaultPolicyDeny  AgentToolsUpdateRequestBuiltinDefaultPolicy = "deny"
)

Defines values for AgentToolsUpdateRequestBuiltinDefaultPolicy.

func (AgentToolsUpdateRequestBuiltinDefaultPolicy) Valid

Valid indicates whether the value is a known member of the AgentToolsUpdateRequestBuiltinDefaultPolicy enum.

type AgentToolsUpdateRequestBuiltinMode

type AgentToolsUpdateRequestBuiltinMode string

AgentToolsUpdateRequestBuiltinMode Legacy format: "explicit" builds a deny-all policy with allow entries for each name in visible[]. "inherit" sets default_policy=allow. Ignored when default_policy is present.

const (
	Explicit AgentToolsUpdateRequestBuiltinMode = "explicit"
	Inherit  AgentToolsUpdateRequestBuiltinMode = "inherit"
)

Defines values for AgentToolsUpdateRequestBuiltinMode.

func (AgentToolsUpdateRequestBuiltinMode) Valid

Valid indicates whether the value is a known member of the AgentToolsUpdateRequestBuiltinMode enum.

type AgentToolsUpdateRequestBuiltinPolicies

type AgentToolsUpdateRequestBuiltinPolicies string

AgentToolsUpdateRequestBuiltinPolicies defines model for AgentToolsUpdateRequest.Builtin.Policies.

const (
	AgentToolsUpdateRequestBuiltinPoliciesAllow AgentToolsUpdateRequestBuiltinPolicies = "allow"
	AgentToolsUpdateRequestBuiltinPoliciesAsk   AgentToolsUpdateRequestBuiltinPolicies = "ask"
	AgentToolsUpdateRequestBuiltinPoliciesDeny  AgentToolsUpdateRequestBuiltinPolicies = "deny"
)

Defines values for AgentToolsUpdateRequestBuiltinPolicies.

func (AgentToolsUpdateRequestBuiltinPolicies) Valid

Valid indicates whether the value is a known member of the AgentToolsUpdateRequestBuiltinPolicies enum.

type AgentType

type AgentType string

AgentType Agent classification. "core" = compiled-in identity locked agent. "custom" = user-defined agent. "system" = legacy operator-supplied entry (config.AgentTypeSystem survives in the API contract for backwards compatibility but SeedConfig does NOT create these — they only appear if config.json contains one).

const (
	AgentTypeCore   AgentType = "core"
	AgentTypeCustom AgentType = "custom"
	AgentTypeSystem AgentType = "system"
)

Defines values for AgentType.

func (AgentType) Valid

func (e AgentType) Valid() bool

Valid indicates whether the value is a known member of the AgentType enum.

type AgentUpdateRequest

type AgentUpdateRequest struct {
	// Color Hex color code for agent avatar display (e.g. "#D4AF37").
	Color *string `json:"color,omitempty"`

	// Default Whether this agent is the global default that handles inbound messages with no more-specific routing rule. At most one agent is default. Omitting this field leaves the flag unchanged.
	Default *bool `json:"default,omitempty"`

	// Description New description. Rejected on locked agents. Empty string removes it.
	Description *string `json:"description,omitempty"`

	// FallbackModels Ordered list of fallback model IDs tried when the primary model returns an error. Each entry may be a bare model name or "provider/model" format.
	FallbackModels *[]string `json:"fallback_models,omitempty"`

	// Heartbeat New HEARTBEAT.md content. Rejected on locked agents. Writing this triggers a config reload.
	Heartbeat *string `json:"heartbeat,omitempty"`

	// HeartbeatEnabled Enable/disable heartbeat loop. Allowed on all agents.
	HeartbeatEnabled *bool `json:"heartbeat_enabled,omitempty"`

	// HeartbeatInterval New heartbeat interval in seconds. Allowed on all agents.
	HeartbeatInterval *int `json:"heartbeat_interval,omitempty"`

	// Icon Phosphor icon name for agent avatar (e.g. "Robot", "Octopus").
	Icon *string `json:"icon,omitempty"`

	// Instructions New AGENT.md body (after frontmatter). Rejected on locked agents. Writing this triggers a config reload.
	Instructions *string `json:"instructions,omitempty"`

	// MaxToolIterations New maximum tool calls per turn. Allowed on all agents.
	MaxToolIterations *int `json:"max_tool_iterations,omitempty"`

	// Model New model name. Allowed on all agents.
	Model *string `json:"model,omitempty"`

	// ModelParams LLM sampling parameters applied to this agent's requests.
	ModelParams *struct {
		// MaxTokens Maximum tokens to generate per turn.
		MaxTokens *int `json:"max_tokens,omitempty"`

		// Temperature Sampling temperature (0.0 – 2.0). Lower = more deterministic.
		Temperature *float64 `json:"temperature,omitempty"`

		// TopP Nucleus sampling probability mass. 1.0 disables nucleus sampling.
		TopP *float64 `json:"top_p,omitempty"`
	} `json:"model_params,omitempty"`

	// Name New display name. Rejected on locked agents.
	Name *string `json:"name,omitempty"`

	// RateLimits Per-agent rate-limit overrides. When use_global_defaults is true the global policy applies.
	RateLimits *struct {
		// MaxCostPerDay Maximum USD cost per day for this agent. Absent = no per-agent cap.
		MaxCostPerDay *float64 `json:"max_cost_per_day,omitempty"`

		// MaxLlmCallsPerHour Maximum LLM API calls per hour for this agent. Absent = no per-agent cap.
		MaxLlmCallsPerHour *int `json:"max_llm_calls_per_hour,omitempty"`

		// MaxToolCallsPerMinute Maximum tool calls per minute for this agent. Absent = no per-agent cap.
		MaxToolCallsPerMinute *int `json:"max_tool_calls_per_minute,omitempty"`

		// UseGlobalDefaults When true, global rate limits are used and per-agent overrides are ignored.
		UseGlobalDefaults *bool `json:"use_global_defaults,omitempty"`
	} `json:"rate_limits,omitempty"`

	// SandboxProfile New sandbox profile. "off" requires --allow-god-mode at gateway boot (403 otherwise).
	SandboxProfile *AgentUpdateRequestSandboxProfile `json:"sandbox_profile,omitempty"`

	// ShellPolicy Per-agent shell command deny-pattern configuration.
	ShellPolicy *struct {
		// CustomDenyPatterns Must each be valid Go regexp patterns (400 on invalid regexp).
		CustomDenyPatterns *[]string `json:"custom_deny_patterns,omitempty"`
		EnableDenyPatterns *bool     `json:"enable_deny_patterns,omitempty"`
	} `json:"shell_policy,omitempty"`

	// Skills Replace the agent's skill list. Only the skill IDs in this list will be granted; omitting this field leaves the existing list unchanged. Send an empty array to remove all skills.
	Skills *[]string `json:"skills,omitempty"`

	// Soul New SOUL.md content (agent system prompt). Rejected on locked agents. Writing this triggers a config reload.
	Soul *string `json:"soul,omitempty"`

	// SteeringMode New steering mode. Allowed on all agents.
	SteeringMode *string `json:"steering_mode,omitempty"`

	// TimeoutSeconds New timeout in seconds per turn. Allowed on all agents.
	TimeoutSeconds *int `json:"timeout_seconds,omitempty"`

	// ToolFeedback Enable/disable tool feedback loop. Allowed on all agents.
	ToolFeedback *bool `json:"tool_feedback,omitempty"`

	// ToolsCfg Per-agent tool configuration governing which builtin tools are accessible and which MCP servers are bound (config.AgentToolsCfg on the Go side, AgentToolsCfg interface in src/lib/api.ts).
	ToolsCfg *struct {
		// Builtin Controls builtin tool visibility for this agent.
		Builtin *struct {
			// DefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.
			DefaultPolicy *AgentUpdateRequestToolsCfgBuiltinDefaultPolicy `json:"default_policy,omitempty"`

			// Policies Per-tool policy overrides. Keys are tool names or glob patterns (e.g. "system.*", "workspace.shell"). Values are one of "allow", "ask", "deny".
			Policies *map[string]AgentUpdateRequestToolsCfgBuiltinPolicies `json:"policies,omitempty"`
		} `json:"builtin,omitempty"`

		// Mcp MCP server bindings for this agent.
		Mcp *struct {
			// Servers List of MCP server bindings.
			Servers *[]struct {
				// Id MCP server identifier as registered in config.json.
				Id string `json:"id"`

				// Tools Specific tool names to expose from this server. When absent, all tools from the server are available.
				Tools *[]string `json:"tools,omitempty"`
			} `json:"servers,omitempty"`
		} `json:"mcp,omitempty"`
	} `json:"tools_cfg,omitempty"`
}

AgentUpdateRequest Body for PUT /agents/{id}. All fields are optional — only provided fields are updated. Locked (core) agents reject mutations to name, description, soul, heartbeat, instructions. model, timeout_seconds, max_tool_iterations, steering_mode, tool_feedback, heartbeat_enabled, and heartbeat_interval may be updated on locked agents. At least one field must be present (minProperties: 1) — empty patches are rejected 400.

type AgentUpdateRequestSandboxProfile

type AgentUpdateRequestSandboxProfile string

AgentUpdateRequestSandboxProfile New sandbox profile. "off" requires --allow-god-mode at gateway boot (403 otherwise).

const (
	AgentUpdateRequestSandboxProfileHost         AgentUpdateRequestSandboxProfile = "host"
	AgentUpdateRequestSandboxProfileOff          AgentUpdateRequestSandboxProfile = "off"
	AgentUpdateRequestSandboxProfileWorkspace    AgentUpdateRequestSandboxProfile = "workspace"
	AgentUpdateRequestSandboxProfileWorkspaceNet AgentUpdateRequestSandboxProfile = "workspace+net"
)

Defines values for AgentUpdateRequestSandboxProfile.

func (AgentUpdateRequestSandboxProfile) Valid

Valid indicates whether the value is a known member of the AgentUpdateRequestSandboxProfile enum.

type AgentUpdateRequestToolsCfgBuiltinDefaultPolicy

type AgentUpdateRequestToolsCfgBuiltinDefaultPolicy string

AgentUpdateRequestToolsCfgBuiltinDefaultPolicy Fallback policy applied to any builtin tool not listed in policies. Custom agents are seeded with default_policy=allow and a system.*=deny entry to enforce the privilege rail.

const (
	AgentUpdateRequestToolsCfgBuiltinDefaultPolicyAllow AgentUpdateRequestToolsCfgBuiltinDefaultPolicy = "allow"
	AgentUpdateRequestToolsCfgBuiltinDefaultPolicyAsk   AgentUpdateRequestToolsCfgBuiltinDefaultPolicy = "ask"
	AgentUpdateRequestToolsCfgBuiltinDefaultPolicyDeny  AgentUpdateRequestToolsCfgBuiltinDefaultPolicy = "deny"
)

Defines values for AgentUpdateRequestToolsCfgBuiltinDefaultPolicy.

func (AgentUpdateRequestToolsCfgBuiltinDefaultPolicy) Valid

Valid indicates whether the value is a known member of the AgentUpdateRequestToolsCfgBuiltinDefaultPolicy enum.

type AgentUpdateRequestToolsCfgBuiltinPolicies

type AgentUpdateRequestToolsCfgBuiltinPolicies string

AgentUpdateRequestToolsCfgBuiltinPolicies defines model for AgentUpdateRequest.ToolsCfg.Builtin.Policies.

const (
	AgentUpdateRequestToolsCfgBuiltinPoliciesAllow AgentUpdateRequestToolsCfgBuiltinPolicies = "allow"
	AgentUpdateRequestToolsCfgBuiltinPoliciesAsk   AgentUpdateRequestToolsCfgBuiltinPolicies = "ask"
	AgentUpdateRequestToolsCfgBuiltinPoliciesDeny  AgentUpdateRequestToolsCfgBuiltinPolicies = "deny"
)

Defines values for AgentUpdateRequestToolsCfgBuiltinPolicies.

func (AgentUpdateRequestToolsCfgBuiltinPolicies) Valid

Valid indicates whether the value is a known member of the AgentUpdateRequestToolsCfgBuiltinPolicies enum.

type AppState

type AppState struct {
	// DevModeBypass True when gateway.dev_mode_bypass is enabled. Read-only — cannot be set via this endpoint. The SPA uses this to hide controls that are inoperative when bypass is active.
	DevModeBypass *bool `json:"dev_mode_bypass,omitempty"`

	// GodModeAvailable True when the sandbox mode is "off" (no kernel enforcement). Indicates the gateway is running without sandbox protection.
	GodModeAvailable *bool `json:"god_mode_available,omitempty"`

	// GodModeOptedIn True when the operator has explicitly opted into god mode (sandbox=off). Distinct from god_mode_available to allow UI differentiation.
	GodModeOptedIn *bool `json:"god_mode_opted_in,omitempty"`

	// LastDoctorRun RFC3339 timestamp of the last health-check run. Absent if never run.
	LastDoctorRun *time.Time `json:"last_doctor_run,omitempty"`

	// LastDoctorScore Score from the last health-check run (0–100, integer). Absent if never run.
	LastDoctorScore *int `json:"last_doctor_score,omitempty"`

	// OnboardingComplete Whether the first-run onboarding wizard has been completed.
	OnboardingComplete bool `json:"onboarding_complete"`
}

AppState Application state returned by GET /api/v1/state. Reflects whether onboarding has been completed and optional diagnostic metadata.

func FixtureAppState_Edge

func FixtureAppState_Edge() AppState

FixtureAppState_Edge — onboarding not complete, god mode available and opted in.

func FixtureAppState_Populated

func FixtureAppState_Populated() AppState

func FixtureAppState_ZeroValue

func FixtureAppState_ZeroValue() AppState

FixtureAppState_ZeroValue — Go zero value. Expected: PASS — onboarding_complete is the only required field, and bool zero value (false) is a valid boolean (not an absent value). This is one of the few types where ZeroValue passes.

type AppStatePatchRequest

type AppStatePatchRequest struct {
	// OnboardingComplete Mark onboarding as complete. Must be true — false is rejected with 400.
	OnboardingComplete *bool `json:"onboarding_complete,omitempty"`
}

AppStatePatchRequest Request body for PATCH /api/v1/state. Partial update to application state. Currently only supports marking onboarding as complete (onboarding_complete must be true — setting it to false is rejected 400).

type AttachSessionFrame

type AttachSessionFrame struct {
	SessionId string `json:"session_id"`
	// ISO 8601 timestamp of the most recent frame the SPA has already processed. Server replays only frames with timestamp > this value. Used to keep reconnect replay traffic O(missed window) instead of O(full session history).
	Since *string `json:"since,omitempty"`
	Type  string  `json:"type"`
}

AttachSessionFrame — Client → server request to attach to an existing session. When `since` is provided, the server skips replay frames whose timestamp <= `since`, sending only frames the SPA has not yet seen. Omitting `since` requests a full replay (legacy behaviour).

func FixtureAttachSessionFrame_Edge

func FixtureAttachSessionFrame_Edge() AttachSessionFrame

FixtureAttachSessionFrame_Edge — unicode session ID at a reasonable length.

func FixtureAttachSessionFrame_Populated

func FixtureAttachSessionFrame_Populated() AttachSessionFrame

func FixtureAttachSessionFrame_ZeroValue

func FixtureAttachSessionFrame_ZeroValue() AttachSessionFrame

FixtureAttachSessionFrame_ZeroValue — Go zero values. Expected: FAIL because type="" and session_id="" (both required, minLength:1).

type Attachment

type Attachment struct {
	// MimeType MIME type of the attachment.
	MimeType string `json:"mime_type"`

	// Path Relative path within the session workspace.
	Path string `json:"path"`

	// Size File size in bytes.
	Size int64 `json:"size"`

	// Type Attachment category. Aligned with MediaPart.type enum.
	Type AttachmentType `json:"type"`
}

Attachment File attachment associated with a transcript entry.

type AttachmentType

type AttachmentType string

AttachmentType Attachment category. Aligned with MediaPart.type enum.

const (
	AttachmentTypeAudio AttachmentType = "audio"
	AttachmentTypeFile  AttachmentType = "file"
	AttachmentTypeImage AttachmentType = "image"
	AttachmentTypeVideo AttachmentType = "video"
)

Defines values for AttachmentType.

func (AttachmentType) Valid

func (e AttachmentType) Valid() bool

Valid indicates whether the value is a known member of the AttachmentType enum.

type AuditEntry

type AuditEntry struct {
	// AgentId ID of the agent that triggered the event. May be absent.
	AgentId *string `json:"agent_id,omitempty"`

	// Command Command string when the event is an exec event. May be absent.
	Command *string `json:"command,omitempty"`

	// Decision Outcome of the event evaluation. One of: allow, deny, error. May be absent for informational events.
	Decision *AuditEntryDecision `json:"decision,omitempty"`

	// Details Event-specific metadata. Structure varies by event type.
	Details *map[string]interface{} `json:"details,omitempty"`

	// Event Event type identifier. Well-known values: tool_call, exec, file_op, llm_call, policy_eval, rate_limit, ssrf, startup, shutdown. Custom values are permitted for extensibility — must match ^[a-z_]+$ (lowercase letters and underscores only).
	Event string `json:"event"`

	// Parameters Tool call parameters or other event-specific key-value pairs.
	Parameters *map[string]interface{} `json:"parameters,omitempty"`

	// PolicyRule Policy rule that produced this decision. May be absent.
	PolicyRule *string `json:"policy_rule,omitempty"`

	// SessionId Session ID associated with the event. May be absent.
	SessionId *string `json:"session_id,omitempty"`

	// Timestamp ISO 8601 UTC timestamp of when the event was recorded.
	Timestamp time.Time `json:"timestamp"`

	// Tool Tool name when the event is a tool call. May be absent.
	Tool *string `json:"tool,omitempty"`
}

AuditEntry A single audit log record from the JSONL audit log file (~/.omnipus/system/audit.jsonl). Matches the Go pkg/audit.Entry struct.

type AuditEntryDecision

type AuditEntryDecision string

AuditEntryDecision Outcome of the event evaluation. One of: allow, deny, error. May be absent for informational events.

const (
	AuditEntryDecisionAllow AuditEntryDecision = "allow"
	AuditEntryDecisionDeny  AuditEntryDecision = "deny"
	AuditEntryDecisionError AuditEntryDecision = "error"
)

Defines values for AuditEntryDecision.

func (AuditEntryDecision) Valid

func (e AuditEntryDecision) Valid() bool

Valid indicates whether the value is a known member of the AuditEntryDecision enum.

type AuditLogToggle

type AuditLogToggle struct {
	// Enabled Whether audit logging is currently enabled.
	Enabled bool `json:"enabled"`
}

AuditLogToggle Audit log enable/disable state returned by GET /api/v1/security/audit-log. Note: this endpoint controls whether audit logging is enabled at all. GET /api/v1/audit-log (distinct path) returns the actual audit entries.

type AuditLogToggleRequest

type AuditLogToggleRequest struct {
	// Enabled Whether audit logging should be enabled.
	Enabled bool `json:"enabled"`
}

AuditLogToggleRequest Request body for PUT /api/v1/security/audit-log. Enables or disables audit logging.

func FixtureAuditLogToggleRequest_Edge

func FixtureAuditLogToggleRequest_Edge() AuditLogToggleRequest

func FixtureAuditLogToggleRequest_Populated

func FixtureAuditLogToggleRequest_Populated() AuditLogToggleRequest

func FixtureAuditLogToggleRequest_ZeroValue

func FixtureAuditLogToggleRequest_ZeroValue() AuditLogToggleRequest

type AuditLogUpdateResponse

type AuditLogUpdateResponse struct {
	// AppliedEnabled The audit log enabled state currently active (before restart takes effect). This is the old value — the new value will take effect after restart.
	AppliedEnabled bool `json:"applied_enabled"`

	// RequiresRestart Always true — changing the audit log enabled state requires a restart to swap file handles.
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`
}

AuditLogUpdateResponse Response from PUT /api/v1/security/audit-log. Returns save status and the previously active state (restart required to apply).

func FixtureAuditLogUpdateResponse_Edge

func FixtureAuditLogUpdateResponse_Edge() AuditLogUpdateResponse

func FixtureAuditLogUpdateResponse_Populated

func FixtureAuditLogUpdateResponse_Populated() AuditLogUpdateResponse

func FixtureAuditLogUpdateResponse_ZeroValue

func FixtureAuditLogUpdateResponse_ZeroValue() AuditLogUpdateResponse

type AuthFrame

type AuthFrame struct {
	// Bearer token from /api/v1/auth/login. Format is "omnipus_" + 64 hex chars.
	Token string `json:"token"`
	Type  string `json:"type"`
}

AuthFrame — Client → server authentication frame.

func FixtureAuthFrame_Edge

func FixtureAuthFrame_Edge() AuthFrame

FixtureAuthFrame_Edge — valid token using all-f hex digits. Updated from "x" (single char, no longer valid) because pattern now requires "^omnipus_[a-f0-9]{64}$" — token must be exactly the omnipus_ prefix + 64 hex chars.

func FixtureAuthFrame_Populated

func FixtureAuthFrame_Populated() AuthFrame

func FixtureAuthFrame_ZeroValue

func FixtureAuthFrame_ZeroValue() AuthFrame

FixtureAuthFrame_ZeroValue — Go zero values. Expected: FAIL because type="" and token="" (both required; fails minLength and pattern).

type BackupCreateResponse

type BackupCreateResponse struct {
	// CreatedAt RFC3339 timestamp when the backup was created.
	CreatedAt time.Time `json:"created_at"`

	// Path Absolute path to the backup file.
	Path string `json:"path"`

	// SizeBytes Size of the backup file in bytes.
	SizeBytes int64 `json:"size_bytes"`
}

BackupCreateResponse Response from POST /api/v1/backup. Returns the path, size, and creation time of the new backup archive.

func FixtureBackupCreateResponse_Edge

func FixtureBackupCreateResponse_Edge() BackupCreateResponse

func FixtureBackupCreateResponse_Populated

func FixtureBackupCreateResponse_Populated() BackupCreateResponse

func FixtureBackupCreateResponse_ZeroValue

func FixtureBackupCreateResponse_ZeroValue() BackupCreateResponse

type BackupEntry

type BackupEntry struct {
	// CreatedAt RFC3339 timestamp when the backup was created.
	CreatedAt time.Time `json:"created_at"`

	// Filename Backup archive filename (e.g. "omnipus-backup-2026-05-16.tar.gz").
	Filename string `json:"filename"`

	// SizeBytes Archive size in bytes.
	SizeBytes int64 `json:"size_bytes"`
}

BackupEntry A single backup archive entry returned by GET /api/v1/backups.

type BearerToken

type BearerToken = string

BearerToken Canonical opaque bearer token format used by Omnipus. The prefix "omnipus_" (8 characters) followed by 64 lowercase hex characters (32 random bytes), giving a total length of 72 characters. Used in Authorization headers, WS AuthFrame, and rotate-token responses.

type CallMcpToolJSONRequestBody

type CallMcpToolJSONRequestBody = McpToolCallRequest

CallMcpToolJSONRequestBody defines body for CallMcpTool for application/json ContentType.

type CancelFrame

type CancelFrame struct {
	SessionId string `json:"session_id"`
	Type      string `json:"type"`
}

CancelFrame — Client → server cancel in-progress turn.

func FixtureCancelFrame_Edge

func FixtureCancelFrame_Edge() CancelFrame

FixtureCancelFrame_Edge — session_id with special chars (valid).

func FixtureCancelFrame_Populated

func FixtureCancelFrame_Populated() CancelFrame

func FixtureCancelFrame_ZeroValue

func FixtureCancelFrame_ZeroValue() CancelFrame

FixtureCancelFrame_ZeroValue — Go zero values. Expected: FAIL because type="" and session_id="" (both required, minLength:1).

type CancelStageFrame

type CancelStageFrame struct {
	SessionId string `json:"session_id"`
	Stage     string `json:"stage"`
	Type      string `json:"type"`
}

CancelStageFrame — Server → client cancel progress notification (B3). stage MUST be one of three values — SPA validates via isValidFrame() and drops invalid stages.

func FixtureCancelStageFrame_Populated

func FixtureCancelStageFrame_Populated() CancelStageFrame

func FixtureCancelStageFrame_ZeroValue

func FixtureCancelStageFrame_ZeroValue() CancelStageFrame

type ChangePasswordJSONRequestBody

type ChangePasswordJSONRequestBody = ChangePasswordRequest

ChangePasswordJSONRequestBody defines body for ChangePassword for application/json ContentType.

type ChangePasswordRequest

type ChangePasswordRequest struct {
	// CurrentPassword The user's current password for verification. Maximum 72 characters (bcrypt limit).
	CurrentPassword string `json:"current_password"`

	// NewPassword The new password. Minimum 8 characters, maximum 72 (bcrypt limit).
	NewPassword string `json:"new_password"`
}

ChangePasswordRequest Body for POST /auth/change-password. Changes the authenticated user's own password.

type ChangeUserRoleJSONRequestBody

type ChangeUserRoleJSONRequestBody = UserRoleChangeRequest

ChangeUserRoleJSONRequestBody defines body for ChangeUserRole for application/json ContentType.

type ChannelConfigureRequest

type ChannelConfigureRequest struct {
	// AppId Application ID (used by Slack, Discord).
	AppId *string `json:"app_id,omitempty"`

	// AppSecret Application secret / signing secret.
	AppSecret *string `json:"app_secret,omitempty"`

	// BotToken Alias for token used by some channels.
	BotToken *string `json:"bot_token,omitempty"`

	// Token Channel authentication token (e.g. Telegram bot token, Discord bot token).
	Token *string `json:"token,omitempty"`

	// WebhookSecret HMAC secret for verifying incoming webhook payloads.
	WebhookSecret        *string                `json:"webhook_secret,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ChannelConfigureRequest Request body for PUT /api/v1/channels/{id}/configure. Merges the supplied fields into the channel's config section. The "enabled" field is reserved and silently removed — use the separate enable/disable endpoints instead. Field names and value types are channel-specific; unknown fields are stored as-is and passed through to the channel implementation.

func (ChannelConfigureRequest) Get

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

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

func (ChannelConfigureRequest) MarshalJSON

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

Override default JSON handling for ChannelConfigureRequest to handle AdditionalProperties

func (*ChannelConfigureRequest) Set

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

Setter for additional properties for ChannelConfigureRequest

func (*ChannelConfigureRequest) UnmarshalJSON

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

Override default JSON handling for ChannelConfigureRequest to handle AdditionalProperties

type ChannelEnabledResponse

type ChannelEnabledResponse struct {
	// Enabled Whether the channel is now enabled.
	Enabled bool `json:"enabled"`

	// Id Stable identifier for a built-in channel.
	Id ChannelEnabledResponseId `json:"id"`
}

ChannelEnabledResponse Response from PUT /api/v1/channels/{id}/enable and PUT /api/v1/channels/{id}/disable. Returns the channel ID and its new enabled state.

func FixtureChannelEnabledResponse_Edge

func FixtureChannelEnabledResponse_Edge() ChannelEnabledResponse

func FixtureChannelEnabledResponse_Populated

func FixtureChannelEnabledResponse_Populated() ChannelEnabledResponse

func FixtureChannelEnabledResponse_ZeroValue

func FixtureChannelEnabledResponse_ZeroValue() ChannelEnabledResponse

type ChannelEnabledResponseId

type ChannelEnabledResponseId string

ChannelEnabledResponseId Stable identifier for a built-in channel.

const (
	ChannelEnabledResponseIdDingtalk   ChannelEnabledResponseId = "dingtalk"
	ChannelEnabledResponseIdDiscord    ChannelEnabledResponseId = "discord"
	ChannelEnabledResponseIdFeishu     ChannelEnabledResponseId = "feishu"
	ChannelEnabledResponseIdGoogleChat ChannelEnabledResponseId = "google-chat"
	ChannelEnabledResponseIdIrc        ChannelEnabledResponseId = "irc"
	ChannelEnabledResponseIdLine       ChannelEnabledResponseId = "line"
	ChannelEnabledResponseIdMatrix     ChannelEnabledResponseId = "matrix"
	ChannelEnabledResponseIdQq         ChannelEnabledResponseId = "qq"
	ChannelEnabledResponseIdSlack      ChannelEnabledResponseId = "slack"
	ChannelEnabledResponseIdTelegram   ChannelEnabledResponseId = "telegram"
	ChannelEnabledResponseIdWebchat    ChannelEnabledResponseId = "webchat"
	ChannelEnabledResponseIdWecom      ChannelEnabledResponseId = "wecom"
	ChannelEnabledResponseIdWeixin     ChannelEnabledResponseId = "weixin"
	ChannelEnabledResponseIdWhatsapp   ChannelEnabledResponseId = "whatsapp"
)

Defines values for ChannelEnabledResponseId.

func (ChannelEnabledResponseId) Valid

func (e ChannelEnabledResponseId) Valid() bool

Valid indicates whether the value is a known member of the ChannelEnabledResponseId enum.

type ChannelEntry

type ChannelEntry struct {
	// Degraded True when the channel is enabled in config but failed to construct at runtime (e.g. native WhatsApp requested on a build without it, or an invalid credential). The channel is NOT serving despite enabled=true.
	Degraded *bool `json:"degraded,omitempty"`

	// DegradedReason Human-readable reason the channel is degraded. Present only when degraded is true.
	DegradedReason *string `json:"degraded_reason,omitempty"`

	// Description Short description of the channel.
	Description string `json:"description"`

	// Enabled Whether this channel is currently enabled.
	Enabled bool `json:"enabled"`

	// Id Stable identifier for a built-in channel.
	Id ChannelEntryId `json:"id"`

	// Name Human-readable channel name.
	Name string `json:"name"`

	// NativeAvailable WhatsApp only: whether the native (whatsmeow) transport is compiled into this binary. False on a lite build or an architecture where it is excluded. Omitted for channels to which it does not apply. When false, clients MUST NOT offer native mode (the QR pairing flow cannot work).
	NativeAvailable *bool `json:"native_available,omitempty"`

	// Transport Transport mechanism used by this channel.
	Transport ChannelEntryTransport `json:"transport"`
}

ChannelEntry A communication channel entry returned by GET /api/v1/channels.

type ChannelEntryId

type ChannelEntryId string

ChannelEntryId Stable identifier for a built-in channel.

const (
	ChannelEntryIdDingtalk   ChannelEntryId = "dingtalk"
	ChannelEntryIdDiscord    ChannelEntryId = "discord"
	ChannelEntryIdFeishu     ChannelEntryId = "feishu"
	ChannelEntryIdGoogleChat ChannelEntryId = "google-chat"
	ChannelEntryIdIrc        ChannelEntryId = "irc"
	ChannelEntryIdLine       ChannelEntryId = "line"
	ChannelEntryIdMatrix     ChannelEntryId = "matrix"
	ChannelEntryIdQq         ChannelEntryId = "qq"
	ChannelEntryIdSlack      ChannelEntryId = "slack"
	ChannelEntryIdTelegram   ChannelEntryId = "telegram"
	ChannelEntryIdWebchat    ChannelEntryId = "webchat"
	ChannelEntryIdWecom      ChannelEntryId = "wecom"
	ChannelEntryIdWeixin     ChannelEntryId = "weixin"
	ChannelEntryIdWhatsapp   ChannelEntryId = "whatsapp"
)

Defines values for ChannelEntryId.

func (ChannelEntryId) Valid

func (e ChannelEntryId) Valid() bool

Valid indicates whether the value is a known member of the ChannelEntryId enum.

type ChannelEntryTransport

type ChannelEntryTransport string

ChannelEntryTransport Transport mechanism used by this channel.

const (
	ChannelEntryTransportBridge    ChannelEntryTransport = "bridge"
	ChannelEntryTransportHttp      ChannelEntryTransport = "http"
	ChannelEntryTransportNative    ChannelEntryTransport = "native"
	ChannelEntryTransportSerial    ChannelEntryTransport = "serial"
	ChannelEntryTransportTcp       ChannelEntryTransport = "tcp"
	ChannelEntryTransportWebhook   ChannelEntryTransport = "webhook"
	ChannelEntryTransportWebsocket ChannelEntryTransport = "websocket"
)

Defines values for ChannelEntryTransport.

func (ChannelEntryTransport) Valid

func (e ChannelEntryTransport) Valid() bool

Valid indicates whether the value is a known member of the ChannelEntryTransport enum.

type ChannelId

type ChannelId string

ChannelId Stable identifier for a built-in channel.

const (
	Dingtalk   ChannelId = "dingtalk"
	Discord    ChannelId = "discord"
	Feishu     ChannelId = "feishu"
	GoogleChat ChannelId = "google-chat"
	Irc        ChannelId = "irc"
	Line       ChannelId = "line"
	Matrix     ChannelId = "matrix"
	Qq         ChannelId = "qq"
	Slack      ChannelId = "slack"
	Telegram   ChannelId = "telegram"
	Webchat    ChannelId = "webchat"
	Wecom      ChannelId = "wecom"
	Weixin     ChannelId = "weixin"
	Whatsapp   ChannelId = "whatsapp"
)

Defines values for ChannelId.

func (ChannelId) Valid

func (e ChannelId) Valid() bool

Valid indicates whether the value is a known member of the ChannelId enum.

type ChannelRouting

type ChannelRouting struct {
	// DefaultAgentId ID of the agent that handles this channel's inbound messages. Omitted or empty means fall back to the global default agent.
	DefaultAgentId *string `json:"default_agent_id,omitempty"`
}

ChannelRouting Routing configuration for a single communication channel. Controls which agent handles inbound messages arriving on this channel.

type ChannelTestResponse

type ChannelTestResponse struct {
	// Message Human-readable description of the test result.
	Message string `json:"message"`

	// Success True when all required credential fields are present.
	Success bool `json:"success"`
}

ChannelTestResponse Response from POST /api/v1/channels/{id}/test. Returns whether required credentials are configured.

func FixtureChannelTestResponse_Edge

func FixtureChannelTestResponse_Edge() ChannelTestResponse

func FixtureChannelTestResponse_Populated

func FixtureChannelTestResponse_Populated() ChannelTestResponse

func FixtureChannelTestResponse_ZeroValue

func FixtureChannelTestResponse_ZeroValue() ChannelTestResponse

type ClearAllSessions200JSONResponseBodyStatus

type ClearAllSessions200JSONResponseBodyStatus string

ClearAllSessions200JSONResponseBodyStatus defines parameters for ClearAllSessions.

const (
	Cleared ClearAllSessions200JSONResponseBodyStatus = "cleared"
)

Defines values for ClearAllSessions200JSONResponseBodyStatus.

func (ClearAllSessions200JSONResponseBodyStatus) Valid

Valid indicates whether the value is a known member of the ClearAllSessions200JSONResponseBodyStatus enum.

type CompleteOnboardingJSONRequestBody

type CompleteOnboardingJSONRequestBody = OnboardingCompleteRequest

CompleteOnboardingJSONRequestBody defines body for CompleteOnboarding for application/json ContentType.

type ConfigureChannelJSONBody

type ConfigureChannelJSONBody map[string]interface{}

ConfigureChannelJSONBody defines parameters for ConfigureChannel.

type ConfigureChannelJSONRequestBody

type ConfigureChannelJSONRequestBody ConfigureChannelJSONBody

ConfigureChannelJSONRequestBody defines body for ConfigureChannel for application/json ContentType.

type CreateAgentJSONRequestBody

type CreateAgentJSONRequestBody = AgentCreateRequest

CreateAgentJSONRequestBody defines body for CreateAgent for application/json ContentType.

type CreateScheduleJSONRequestBody

type CreateScheduleJSONRequestBody = ScheduleCreate

CreateScheduleJSONRequestBody defines body for CreateSchedule for application/json ContentType.

type CreateSessionJSONRequestBody

type CreateSessionJSONRequestBody = SessionCreateRequest

CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.

type CreateTaskJSONRequestBody

type CreateTaskJSONRequestBody = TaskCreateRequest

CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody = UserCreateRequest

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CredentialSetRequest

type CredentialSetRequest struct {
	// Key Credential key name.
	Key string `json:"key"`

	// Value Credential value (stored encrypted).
	Value string `json:"value"`
}

CredentialSetRequest Request body for POST /api/v1/credentials. Stores an encrypted credential. The key must be non-empty; the value is stored AES-256-GCM encrypted.

type DeleteCredential200JSONResponseBodyStatus

type DeleteCredential200JSONResponseBodyStatus string

DeleteCredential200JSONResponseBodyStatus defines parameters for DeleteCredential.

const (
	Removed DeleteCredential200JSONResponseBodyStatus = "removed"
)

Defines values for DeleteCredential200JSONResponseBodyStatus.

func (DeleteCredential200JSONResponseBodyStatus) Valid

Valid indicates whether the value is a known member of the DeleteCredential200JSONResponseBodyStatus enum.

type DevicePaired

type DevicePaired struct {
	// DeviceId Unique device identifier.
	DeviceId string `json:"device_id"`

	// DeviceName Human-readable device name.
	DeviceName string `json:"device_name"`

	// Fingerprint Cryptographic fingerprint of the device's public key.
	Fingerprint string `json:"fingerprint"`

	// LastSeenAt RFC3339 timestamp of the last authenticated request from this device.
	LastSeenAt time.Time `json:"last_seen_at"`

	// PairedAt RFC3339 timestamp when the device was paired.
	PairedAt time.Time `json:"paired_at"`

	// Status Whether this device's access is currently active or revoked.
	Status DevicePairedStatus `json:"status"`
}

DevicePaired A device that has been successfully paired. Returned as part of the DevicesResponse from GET /api/v1/devices.

type DevicePairedStatus

type DevicePairedStatus string

DevicePairedStatus Whether this device's access is currently active or revoked.

const (
	DevicePairedStatusActive  DevicePairedStatus = "active"
	DevicePairedStatusRevoked DevicePairedStatus = "revoked"
)

Defines values for DevicePairedStatus.

func (DevicePairedStatus) Valid

func (e DevicePairedStatus) Valid() bool

Valid indicates whether the value is a known member of the DevicePairedStatus enum.

type DevicePairingRequestFrame

type DevicePairingRequestFrame struct {
	DeviceId    string  `json:"device_id"`
	DeviceName  *string `json:"device_name,omitempty"`
	Fingerprint *string `json:"fingerprint,omitempty"`
	PairingCode *string `json:"pairing_code,omitempty"`
	SessionId   *string `json:"session_id,omitempty"`
	Type        string  `json:"type"`
}

DevicePairingRequestFrame — Server → client device pairing request needs admin approval.

func FixtureDevicePairingRequestFrame_Populated

func FixtureDevicePairingRequestFrame_Populated() DevicePairingRequestFrame

func FixtureDevicePairingRequestFrame_ZeroValue

func FixtureDevicePairingRequestFrame_ZeroValue() DevicePairingRequestFrame

type DevicePairingResponseFrame

type DevicePairingResponseFrame struct {
	Decision string `json:"decision"`
	DeviceId string `json:"device_id"`
	Type     string `json:"type"`
}

DevicePairingResponseFrame — Client → server device pairing decision.

func FixtureDevicePairingResponseFrame_Edge

func FixtureDevicePairingResponseFrame_Edge() DevicePairingResponseFrame

FixtureDevicePairingResponseFrame_Edge — reject decision (other valid enum value).

func FixtureDevicePairingResponseFrame_Populated

func FixtureDevicePairingResponseFrame_Populated() DevicePairingResponseFrame

func FixtureDevicePairingResponseFrame_ZeroValue

func FixtureDevicePairingResponseFrame_ZeroValue() DevicePairingResponseFrame

FixtureDevicePairingResponseFrame_ZeroValue — Go zero values. Expected: FAIL because type="", device_id="", decision="" (none match enum).

type DevicePending

type DevicePending struct {
	// CreatedAt RFC3339 timestamp when the pairing request was created.
	CreatedAt time.Time `json:"created_at"`

	// DeviceId Unique device identifier.
	DeviceId string `json:"device_id"`

	// DeviceName Human-readable device name provided during pairing.
	DeviceName string `json:"device_name"`

	// ExpiresAt RFC3339 timestamp when the pairing request expires.
	ExpiresAt time.Time `json:"expires_at"`

	// Fingerprint Cryptographic fingerprint of the device's public key.
	Fingerprint string `json:"fingerprint"`

	// PairingCode Short human-readable pairing code displayed to the user.
	PairingCode string `json:"pairing_code"`
}

DevicePending A device pairing request that has not yet been approved. Returned as part of the DevicesResponse from GET /api/v1/devices.

type DevicesResponse

type DevicesResponse struct {
	// Paired Devices that have been successfully paired. Capped at 100.
	Paired []struct {
		// DeviceId Unique device identifier.
		DeviceId string `json:"device_id"`

		// DeviceName Human-readable device name.
		DeviceName string `json:"device_name"`

		// Fingerprint Cryptographic fingerprint of the device's public key.
		Fingerprint string `json:"fingerprint"`

		// LastSeenAt RFC3339 timestamp of the last authenticated request from this device.
		LastSeenAt time.Time `json:"last_seen_at"`

		// PairedAt RFC3339 timestamp when the device was paired.
		PairedAt time.Time `json:"paired_at"`

		// Status Whether this device's access is currently active or revoked.
		Status DevicesResponsePairedStatus `json:"status"`
	} `json:"paired"`

	// Pending Pairing requests awaiting approval. Capped at 100.
	Pending []struct {
		// CreatedAt RFC3339 timestamp when the pairing request was created.
		CreatedAt time.Time `json:"created_at"`

		// DeviceId Unique device identifier.
		DeviceId string `json:"device_id"`

		// DeviceName Human-readable device name provided during pairing.
		DeviceName string `json:"device_name"`

		// ExpiresAt RFC3339 timestamp when the pairing request expires.
		ExpiresAt time.Time `json:"expires_at"`

		// Fingerprint Cryptographic fingerprint of the device's public key.
		Fingerprint string `json:"fingerprint"`

		// PairingCode Short human-readable pairing code displayed to the user.
		PairingCode string `json:"pairing_code"`
	} `json:"pending"`
}

DevicesResponse Response from GET /api/v1/devices. Lists both pending pairing requests and already-paired devices.

func FixtureDevicesResponse_Edge

func FixtureDevicesResponse_Edge() DevicesResponse

FixtureDevicesResponse_Edge — empty arrays (no devices) — valid, common state.

func FixtureDevicesResponse_Populated

func FixtureDevicesResponse_Populated() DevicesResponse

func FixtureDevicesResponse_ZeroValue

func FixtureDevicesResponse_ZeroValue() DevicesResponse

FixtureDevicesResponse_ZeroValue — Go zero values. Expected: FAIL because pending=nil and paired=nil (both marshal to null, schema requires type: array for both fields).

type DevicesResponsePairedStatus

type DevicesResponsePairedStatus string

DevicesResponsePairedStatus Whether this device's access is currently active or revoked.

const (
	DevicesResponsePairedStatusActive  DevicesResponsePairedStatus = "active"
	DevicesResponsePairedStatusRevoked DevicesResponsePairedStatus = "revoked"
)

Defines values for DevicesResponsePairedStatus.

func (DevicesResponsePairedStatus) Valid

Valid indicates whether the value is a known member of the DevicesResponsePairedStatus enum.

type DoctorIssue

type DoctorIssue struct {
	// ActionLabel Display label for the action link.
	ActionLabel *string `json:"action_label,omitempty"`

	// ActionLink Optional URL or SPA route to navigate to for remediation.
	ActionLink *string `json:"action_link,omitempty"`

	// Description Full description of the issue and its impact.
	Description string `json:"description"`

	// Id Unique identifier for this issue type.
	Id string `json:"id"`

	// Recommendation Recommended remediation action.
	Recommendation string `json:"recommendation"`

	// Severity Issue severity level.
	Severity DoctorIssueSeverity `json:"severity"`

	// Title Short human-readable title for the issue.
	Title string `json:"title"`
}

DoctorIssue A single health-check finding returned as part of a DoctorResult. Each issue has a severity, a human-readable title and description, and an optional actionable link.

type DoctorIssueSeverity

type DoctorIssueSeverity string

DoctorIssueSeverity Issue severity level.

const (
	DoctorIssueSeverityHigh   DoctorIssueSeverity = "high"
	DoctorIssueSeverityLow    DoctorIssueSeverity = "low"
	DoctorIssueSeverityMedium DoctorIssueSeverity = "medium"
)

Defines values for DoctorIssueSeverity.

func (DoctorIssueSeverity) Valid

func (e DoctorIssueSeverity) Valid() bool

Valid indicates whether the value is a known member of the DoctorIssueSeverity enum.

type DoctorResult

type DoctorResult struct {
	// CheckedAt RFC3339 timestamp when this health check was run.
	CheckedAt time.Time `json:"checked_at"`

	// Issues List of health-check findings. Empty when score is 100. Capped at 100 to bound response size.
	Issues []struct {
		// ActionLabel Display label for the action link.
		ActionLabel *string `json:"action_label,omitempty"`

		// ActionLink Optional URL or SPA route to navigate to for remediation.
		ActionLink *string `json:"action_link,omitempty"`

		// Description Full description of the issue and its impact.
		Description string `json:"description"`

		// Id Unique identifier for this issue type.
		Id string `json:"id"`

		// Recommendation Recommended remediation action.
		Recommendation string `json:"recommendation"`

		// Severity Issue severity level.
		Severity DoctorResultIssuesSeverity `json:"severity"`

		// Title Short human-readable title for the issue.
		Title string `json:"title"`
	} `json:"issues"`

	// Score Overall health score (0 = critical issues; 100 = fully healthy).
	Score int `json:"score"`
}

DoctorResult Health-check result returned by GET /api/v1/doctor and POST /api/v1/doctor. Contains an overall score and a list of individual findings.

func FixtureDoctorResult_Edge

func FixtureDoctorResult_Edge() DoctorResult

FixtureDoctorResult_Edge — perfect score, empty issues (valid), unicode checked_at.

func FixtureDoctorResult_NilIssues

func FixtureDoctorResult_NilIssues() DoctorResult

FixtureDoctorResult_NilIssues — issues nil → JSON null → schema violation.

func FixtureDoctorResult_Populated

func FixtureDoctorResult_Populated() DoctorResult

func FixtureDoctorResult_ZeroValue

func FixtureDoctorResult_ZeroValue() DoctorResult

FixtureDoctorResult_ZeroValue — Go zero values. Expected: FAIL because score=0 (valid; minimum:0), but checked_at=time.Time{} marshals to "0001-01-01T00:00:00Z" (valid RFC3339). The issues slice nil → JSON null → FAIL because issues is required type:array.

type DoctorResultIssuesSeverity

type DoctorResultIssuesSeverity string

DoctorResultIssuesSeverity Issue severity level.

const (
	DoctorResultIssuesSeverityHigh   DoctorResultIssuesSeverity = "high"
	DoctorResultIssuesSeverityLow    DoctorResultIssuesSeverity = "low"
	DoctorResultIssuesSeverityMedium DoctorResultIssuesSeverity = "medium"
)

Defines values for DoctorResultIssuesSeverity.

func (DoctorResultIssuesSeverity) Valid

func (e DoctorResultIssuesSeverity) Valid() bool

Valid indicates whether the value is a known member of the DoctorResultIssuesSeverity enum.

type DoneFrame

type DoneFrame struct {
	SessionId string     `json:"session_id"`
	Stats     *DoneStats `json:"stats,omitempty"`
	Type      string     `json:"type"`
}

DoneFrame — Server → client turn complete.

func FixtureDoneFrame_Edge

func FixtureDoneFrame_Edge() DoneFrame

func FixtureDoneFrame_NoStats

func FixtureDoneFrame_NoStats() DoneFrame

func FixtureDoneFrame_Populated

func FixtureDoneFrame_Populated() DoneFrame

func FixtureDoneFrame_ZeroValue

func FixtureDoneFrame_ZeroValue() DoneFrame

type DoneStats

type DoneStats struct {
	Cost                     *float64 `json:"cost,omitempty"`
	DuplicateToolCallIdCount *float64 `json:"duplicate_tool_call_id_count,omitempty"`
	DurationMs               *float64 `json:"duration_ms,omitempty"`
	FramesEmitted            *float64 `json:"frames_emitted,omitempty"`
	OrphanCount              *float64 `json:"orphan_count,omitempty"`
	ReplayError              *bool    `json:"replay_error,omitempty"`
	Tokens                   *float64 `json:"tokens,omitempty"`
	TokensDropped            *float64 `json:"tokens_dropped,omitempty"`
	TruncatedResultCount     *float64 `json:"truncated_result_count,omitempty"`
}

DoneStats — Per-turn statistics in a done frame. additionalProperties are allowed for replay extras (frames_emitted, orphan_count, etc.).

type ErrorFrame

type ErrorFrame struct {
	Message   string  `json:"message"`
	SessionId *string `json:"session_id,omitempty"`
	Type      string  `json:"type"`
}

ErrorFrame — Server → client error notification.

func FixtureErrorFrame_Edge

func FixtureErrorFrame_Edge() ErrorFrame

func FixtureErrorFrame_Populated

func FixtureErrorFrame_Populated() ErrorFrame

func FixtureErrorFrame_ZeroValue

func FixtureErrorFrame_ZeroValue() ErrorFrame

type ErrorResponse

type ErrorResponse struct {
	// Code Machine-readable error code for programmatic branching (e.g. "csrf_missing", "rate_limited").
	Code *string `json:"code,omitempty"`

	// Details Optional structured details about the error.
	Details *map[string]interface{} `json:"details,omitempty"`

	// Error Human-readable error message.
	Error string `json:"error"`
}

ErrorResponse Standard error envelope returned by all non-2xx responses.

type ExecAllowlist

type ExecAllowlist struct {
	// AllowedBinaries Ordered list of allowed binary name patterns evaluated on every exec call. Patterns are trimmed, deduplicated, and validated server-side. Empty array = block all exec calls.
	AllowedBinaries []string `json:"allowed_binaries"`

	// Approval Approval mode for exec calls. Reflects config.tools.exec.approval. Only present in GET responses.
	Approval *string `json:"approval,omitempty"`

	// RestartRequired True in PUT responses — the in-memory agent loop uses the previous allowlist until the gateway restarts (SEC-12).
	RestartRequired *bool `json:"restart_required,omitempty"`
}

ExecAllowlist Exec binary allowlist configuration for GET/PUT /api/v1/security/exec-allowlist (SEC-05).

type ExecApprovalExpiredFrame

type ExecApprovalExpiredFrame struct {
	Id        string  `json:"id"`
	Message   *string `json:"message,omitempty"`
	SessionId string  `json:"session_id"`
	Type      string  `json:"type"`
}

ExecApprovalExpiredFrame — Server → client exec approval request timed out.

func FixtureExecApprovalExpiredFrame_Edge

func FixtureExecApprovalExpiredFrame_Edge() ExecApprovalExpiredFrame

FixtureExecApprovalExpiredFrame_Edge — no message (optional), short IDs.

func FixtureExecApprovalExpiredFrame_Populated

func FixtureExecApprovalExpiredFrame_Populated() ExecApprovalExpiredFrame

func FixtureExecApprovalExpiredFrame_ZeroValue

func FixtureExecApprovalExpiredFrame_ZeroValue() ExecApprovalExpiredFrame

FixtureExecApprovalExpiredFrame_ZeroValue — Go zero values. Expected: FAIL because type="" (const: exec_approval_expired), id="", session_id="".

type ExecApprovalRequestFrame

type ExecApprovalRequestFrame struct {
	// Tool name used as primary display string in the approval modal.
	Command       string  `json:"command"`
	Id            string  `json:"id"`
	MatchedPolicy *string `json:"matched_policy,omitempty"`
	// Human-readable approval request message.
	Message *string `json:"message,omitempty"`
	// Tool invocation arguments. May be absent for parameter-less tools.
	Params    map[string]any `json:"params,omitempty"`
	SessionId string         `json:"session_id"`
	// Structured tool name (same value as command).
	Tool       *string `json:"tool,omitempty"`
	Type       string  `json:"type"`
	WorkingDir *string `json:"working_dir,omitempty"`
}

ExecApprovalRequestFrame — Server → client exec approval needed. The `command` field carries the tool name for display. Optional `tool` and `params` carry structured tool call information.

func FixtureExecApprovalRequestFrame_Populated

func FixtureExecApprovalRequestFrame_Populated() ExecApprovalRequestFrame

func FixtureExecApprovalRequestFrame_ZeroValue

func FixtureExecApprovalRequestFrame_ZeroValue() ExecApprovalRequestFrame

type ExecApprovalResponseAckFrame

type ExecApprovalResponseAckFrame struct {
	Id        *string `json:"id,omitempty"`
	SessionId *string `json:"session_id,omitempty"`
	Type      string  `json:"type"`
}

ExecApprovalResponseAckFrame — Server → client exec approval response acknowledged.

func FixtureExecApprovalResponseAckFrame_Populated

func FixtureExecApprovalResponseAckFrame_Populated() ExecApprovalResponseAckFrame

func FixtureExecApprovalResponseAckFrame_ZeroValue

func FixtureExecApprovalResponseAckFrame_ZeroValue() ExecApprovalResponseAckFrame

type ExecApprovalResponseFrame

type ExecApprovalResponseFrame struct {
	Decision string `json:"decision"`
	Id       string `json:"id"`
	Type     string `json:"type"`
}

ExecApprovalResponseFrame — Client → server exec approval decision.

func FixtureExecApprovalResponseFrame_Edge

func FixtureExecApprovalResponseFrame_Edge() ExecApprovalResponseFrame

FixtureExecApprovalResponseFrame_Edge — deny decision (other valid enum value).

func FixtureExecApprovalResponseFrame_Populated

func FixtureExecApprovalResponseFrame_Populated() ExecApprovalResponseFrame

func FixtureExecApprovalResponseFrame_ZeroValue

func FixtureExecApprovalResponseFrame_ZeroValue() ExecApprovalResponseFrame

FixtureExecApprovalResponseFrame_ZeroValue — Go zero values. Expected: FAIL because type="", id="" (minLength:1), decision="" (not in enum).

type ExecProxyStatus

type ExecProxyStatus struct {
	// Address Bound address in "host:port" format. Present only when running is true. Backend handler enforces this invariant; OpenAPI 3.0.3 cannot express conditional required fields.
	Address *string `json:"address,omitempty"`

	// Enabled Whether the exec proxy is configured to run (cfg.Tools.Exec.EnableProxy).
	Enabled bool `json:"enabled"`

	// Running Whether the proxy listener is currently bound and running.
	Running bool `json:"running"`
}

ExecProxyStatus Runtime state of the exec SSRF proxy returned by GET /api/v1/security/exec-proxy-status (SEC-28).

type GatewayStatus

type GatewayStatus struct {
	// AgentCount Total number of configured agents (core + custom), including the implicit system agent.
	AgentCount int `json:"agent_count"`

	// ChannelCount Number of enabled channels including the always-available webchat channel.
	ChannelCount int `json:"channel_count"`

	// DailyCost Aggregate USD cost accrued today across all agents. Zero when cost tracking is disabled.
	DailyCost float64 `json:"daily_cost"`

	// Online Always true when the gateway is reachable and the agent loop is running.
	Online bool `json:"online"`

	// Version Gateway binary version string (e.g. "0.1.0" or the git short-sha for dev builds).
	Version *string `json:"version,omitempty"`
}

GatewayStatus Gateway runtime status as returned by GET /status (polled by the frontend StatusBar every 15 seconds). Summarises the number of configured agents and channels plus a daily cost accumulator.

type GlobalToolPolicies

type GlobalToolPolicies struct {
	// DefaultPolicy Default policy for any tool not listed in policies.
	DefaultPolicy GlobalToolPoliciesDefaultPolicy `json:"default_policy"`

	// Policies Per-tool policy overrides. Keys are canonical tool names; values are the policy to apply. Never null — empty object when no overrides are configured.
	Policies map[string]GlobalToolPoliciesPolicies `json:"policies"`
}

GlobalToolPolicies Global tool policy configuration returned by GET /api/v1/security/tool-policies and accepted by PUT /api/v1/security/tool-policies.

type GlobalToolPoliciesDefaultPolicy

type GlobalToolPoliciesDefaultPolicy string

GlobalToolPoliciesDefaultPolicy Default policy for any tool not listed in policies.

const (
	GlobalToolPoliciesDefaultPolicyAllow GlobalToolPoliciesDefaultPolicy = "allow"
	GlobalToolPoliciesDefaultPolicyAsk   GlobalToolPoliciesDefaultPolicy = "ask"
	GlobalToolPoliciesDefaultPolicyDeny  GlobalToolPoliciesDefaultPolicy = "deny"
)

Defines values for GlobalToolPoliciesDefaultPolicy.

func (GlobalToolPoliciesDefaultPolicy) Valid

Valid indicates whether the value is a known member of the GlobalToolPoliciesDefaultPolicy enum.

type GlobalToolPoliciesPolicies

type GlobalToolPoliciesPolicies string

GlobalToolPoliciesPolicies defines model for GlobalToolPolicies.Policies.

const (
	GlobalToolPoliciesPoliciesAllow GlobalToolPoliciesPolicies = "allow"
	GlobalToolPoliciesPoliciesAsk   GlobalToolPoliciesPolicies = "ask"
	GlobalToolPoliciesPoliciesDeny  GlobalToolPoliciesPolicies = "deny"
)

Defines values for GlobalToolPoliciesPolicies.

func (GlobalToolPoliciesPolicies) Valid

func (e GlobalToolPoliciesPolicies) Valid() bool

Valid indicates whether the value is a known member of the GlobalToolPoliciesPolicies enum.

type HealthResponse

type HealthResponse struct {
	// Status Always "ok" when the gateway is healthy.
	Status HealthResponseStatus `json:"status"`
}

HealthResponse Response from GET /health. Returns HTTP 200 when the gateway is up. No authentication required.

func FixtureHealthResponse_Populated

func FixtureHealthResponse_Populated() HealthResponse

func FixtureHealthResponse_ZeroValue

func FixtureHealthResponse_ZeroValue() HealthResponse

type HealthResponseStatus

type HealthResponseStatus string

HealthResponseStatus Always "ok" when the gateway is healthy.

const (
	HealthResponseStatusOk HealthResponseStatus = "ok"
)

Defines values for HealthResponseStatus.

func (HealthResponseStatus) Valid

func (e HealthResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the HealthResponseStatus enum.

type InstallSkillJSONRequestBody

type InstallSkillJSONRequestBody = SkillInstallRequest

InstallSkillJSONRequestBody defines body for InstallSkill for application/json ContentType.

type ListSessions200JSONResponseBody

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

ListSessions200JSONResponseBody defines parameters for ListSessions.

func (ListSessions200JSONResponseBody) AsListSessions200JSONResponseBody0

func (t ListSessions200JSONResponseBody) AsListSessions200JSONResponseBody0() (ListSessions200JSONResponseBody0, error)

AsListSessions200JSONResponseBody0 returns the union data inside the ListSessions200JSONResponseBody as a ListSessions200JSONResponseBody0

func (ListSessions200JSONResponseBody) AsListSessions200JSONResponseBody1

func (t ListSessions200JSONResponseBody) AsListSessions200JSONResponseBody1() (ListSessions200JSONResponseBody1, error)

AsListSessions200JSONResponseBody1 returns the union data inside the ListSessions200JSONResponseBody as a ListSessions200JSONResponseBody1

func (*ListSessions200JSONResponseBody) FromListSessions200JSONResponseBody0

func (t *ListSessions200JSONResponseBody) FromListSessions200JSONResponseBody0(v ListSessions200JSONResponseBody0) error

FromListSessions200JSONResponseBody0 overwrites any union data inside the ListSessions200JSONResponseBody as the provided ListSessions200JSONResponseBody0

func (*ListSessions200JSONResponseBody) FromListSessions200JSONResponseBody1

func (t *ListSessions200JSONResponseBody) FromListSessions200JSONResponseBody1(v ListSessions200JSONResponseBody1) error

FromListSessions200JSONResponseBody1 overwrites any union data inside the ListSessions200JSONResponseBody as the provided ListSessions200JSONResponseBody1

func (ListSessions200JSONResponseBody) MarshalJSON

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

func (*ListSessions200JSONResponseBody) MergeListSessions200JSONResponseBody0

func (t *ListSessions200JSONResponseBody) MergeListSessions200JSONResponseBody0(v ListSessions200JSONResponseBody0) error

MergeListSessions200JSONResponseBody0 performs a merge with any union data inside the ListSessions200JSONResponseBody, using the provided ListSessions200JSONResponseBody0

func (*ListSessions200JSONResponseBody) MergeListSessions200JSONResponseBody1

func (t *ListSessions200JSONResponseBody) MergeListSessions200JSONResponseBody1(v ListSessions200JSONResponseBody1) error

MergeListSessions200JSONResponseBody1 performs a merge with any union data inside the ListSessions200JSONResponseBody, using the provided ListSessions200JSONResponseBody1

func (*ListSessions200JSONResponseBody) UnmarshalJSON

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

type ListSessions200JSONResponseBody0

type ListSessions200JSONResponseBody0 = []Session

ListSessions200JSONResponseBody0 defines parameters for ListSessions.

type ListSessions200JSONResponseBody1

type ListSessions200JSONResponseBody1 struct {
	// PartialErrors Opaque error tokens (agent ID + sanitized reason).
	PartialErrors []string  `json:"partial_errors"`
	Sessions      []Session `json:"sessions"`
}

ListSessions200JSONResponseBody1 defines parameters for ListSessions.

type ListSessionsParams

type ListSessionsParams struct {
	// AgentId Filter by agent ID.
	AgentId *string `form:"agent_id,omitempty" json:"agent_id,omitempty"`

	// Type Filter by session type.
	Type *ListSessionsParamsType `form:"type,omitempty" json:"type,omitempty"`
}

ListSessionsParams defines parameters for ListSessions.

type ListSessionsParamsType

type ListSessionsParamsType string

ListSessionsParamsType defines parameters for ListSessions.

const (
	ListSessionsParamsTypeChannel ListSessionsParamsType = "channel"
	ListSessionsParamsTypeChat    ListSessionsParamsType = "chat"
	ListSessionsParamsTypeTask    ListSessionsParamsType = "task"
)

Defines values for ListSessionsParamsType.

func (ListSessionsParamsType) Valid

func (e ListSessionsParamsType) Valid() bool

Valid indicates whether the value is a known member of the ListSessionsParamsType enum.

type ListTasksParams

type ListTasksParams struct {
	// Status Filter tasks by status.
	Status *ListTasksParamsStatus `form:"status,omitempty" json:"status,omitempty"`
}

ListTasksParams defines parameters for ListTasks.

type ListTasksParamsStatus

type ListTasksParamsStatus string

ListTasksParamsStatus defines parameters for ListTasks.

const (
	ListTasksParamsStatusAssigned  ListTasksParamsStatus = "assigned"
	ListTasksParamsStatusCompleted ListTasksParamsStatus = "completed"
	ListTasksParamsStatusFailed    ListTasksParamsStatus = "failed"
	ListTasksParamsStatusQueued    ListTasksParamsStatus = "queued"
	ListTasksParamsStatusRunning   ListTasksParamsStatus = "running"
)

Defines values for ListTasksParamsStatus.

func (ListTasksParamsStatus) Valid

func (e ListTasksParamsStatus) Valid() bool

Valid indicates whether the value is a known member of the ListTasksParamsStatus enum.

type LoginJSONRequestBody

type LoginJSONRequestBody = LoginRequest

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginRequest

type LoginRequest struct {
	// Password The user's password. Maximum 72 characters (bcrypt limit).
	Password string `json:"password"`

	// Username The user's login name.
	Username string `json:"username"`
}

LoginRequest Credentials for authenticating an existing user.

type LoginResponse

type LoginResponse struct {
	// Role RBAC role of the authenticated user.
	Role LoginResponseRole `json:"role"`

	// Token Canonical opaque bearer token format used by Omnipus. The prefix "omnipus_" (8 characters) followed by 64 lowercase hex characters (32 random bytes), giving a total length of 72 characters. Used in Authorization headers, WS AuthFrame, and rotate-token responses.
	Token string `json:"token"`

	// Username The authenticated user's login name.
	Username string `json:"username"`

	// Warning Non-fatal advisory message. Present on onboarding/complete when the credential store is locked and the API key was stored in plaintext.
	Warning *string `json:"warning,omitempty"`
}

LoginResponse Returned on successful login, register-admin, or onboarding/complete. Contains the bearer token to use in subsequent Authorization headers, the role of the authenticated user, and the username.

func FixtureLoginResponse_Edge

func FixtureLoginResponse_Edge() LoginResponse

func FixtureLoginResponse_Populated

func FixtureLoginResponse_Populated() LoginResponse

func FixtureLoginResponse_ZeroValue

func FixtureLoginResponse_ZeroValue() LoginResponse

type LoginResponseRole

type LoginResponseRole string

LoginResponseRole RBAC role of the authenticated user.

const (
	LoginResponseRoleAdmin LoginResponseRole = "admin"
	LoginResponseRoleUser  LoginResponseRole = "user"
)

Defines values for LoginResponseRole.

func (LoginResponseRole) Valid

func (e LoginResponseRole) Valid() bool

Valid indicates whether the value is a known member of the LoginResponseRole enum.

type MarshalErrorResult

type MarshalErrorResult struct {
	MarshalError string `json:"_marshal_error"`
}

MarshalErrorResult — Sentinel for tool results that failed json.Marshal.

type McpServer

type McpServer struct {
	// Id Unique MCP server identifier.
	Id string `json:"id"`

	// Name Human-readable server name.
	Name string `json:"name"`

	// Status Current connection status of the MCP server.
	Status McpServerStatus `json:"status"`

	// ToolCount Number of tools exposed by this server.
	ToolCount int `json:"tool_count"`

	// Tools List of tool names exposed by this server. Absent when tool_count is 0 or when the server has not yet enumerated its tools.
	Tools *[]string `json:"tools,omitempty"`

	// Transport Transport mechanism used by this MCP server. "stdio" for local process-based servers, "sse" or "http" for remote HTTP-based servers.
	Transport McpServerTransport `json:"transport"`
}

McpServer An MCP server entry as returned by GET /mcp-servers and POST /mcp-servers.

func FixtureMcpServer_Edge

func FixtureMcpServer_Edge() McpServer

FixtureMcpServer_Edge — disconnected server, empty tools list, SSE transport.

func FixtureMcpServer_NilToolsAllowed

func FixtureMcpServer_NilToolsAllowed() McpServer

FixtureMcpServer_NilToolsAllowed — tools is optional; omitting it is valid. This is NOT the bug pattern (nil tools is optional per schema, not required).

func FixtureMcpServer_Populated

func FixtureMcpServer_Populated() McpServer

func FixtureMcpServer_ZeroValue

func FixtureMcpServer_ZeroValue() McpServer

FixtureMcpServer_ZeroValue — Go zero values. Expected: FAIL because id="", name="", transport="" (not in enum), status="" (not in enum), tool_count=0 (valid — minimum: 0).

type McpServerCreate

type McpServerCreate struct {
	// Args Command-line arguments to pass to the server process. Only applicable for stdio transport.
	Args *[]string `json:"args,omitempty"`

	// Command Command to start the MCP server process. Required when transport is "stdio". Must be omitted or empty when transport is "sse" or "http".
	Command *string `json:"command,omitempty"`

	// Env Environment variable overrides passed to the MCP server process. Only applicable for stdio transport. Each key-value pair is injected into the server process environment at startup.
	Env *map[string]string `json:"env,omitempty"`

	// Name Human-readable server name.
	Name string `json:"name"`

	// Transport Transport mechanism to use for this MCP server. Use "stdio" for local process-based servers, "sse" or "http" for remote HTTP-based servers (both are handled identically by the gateway).
	Transport McpServerCreateTransport `json:"transport"`

	// Url Endpoint URL for remote MCP servers. Required when transport is "sse" or "http". Must be an https:// URL, or http:// for loopback addresses only (localhost, 127.x.x.x, or ::1). Any other http:// URL is rejected with 422 by both the SPA and the backend. Must be omitted when transport is "stdio".
	Url *string `json:"url,omitempty"`
}

McpServerCreate Request body for POST /mcp-servers. Adds a new MCP server to the gateway config. For stdio transport, `command` is required. For sse/http transport, `url` is required. Exactly one of `command` or `url` must be supplied depending on the transport.

func FixtureMcpServerCreate_Edge

func FixtureMcpServerCreate_Edge() McpServerCreate

FixtureMcpServerCreate_Edge — no args (optional), SSE transport with URL, unicode name.

func FixtureMcpServerCreate_Populated

func FixtureMcpServerCreate_Populated() McpServerCreate

func FixtureMcpServerCreate_ZeroValue

func FixtureMcpServerCreate_ZeroValue() McpServerCreate

FixtureMcpServerCreate_ZeroValue — Go zero values. Expected: FAIL because name="", command="", transport="" (not in enum).

type McpServerCreateTransport

type McpServerCreateTransport string

McpServerCreateTransport Transport mechanism to use for this MCP server. Use "stdio" for local process-based servers, "sse" or "http" for remote HTTP-based servers (both are handled identically by the gateway).

const (
	Http  McpServerCreateTransport = "http"
	Sse   McpServerCreateTransport = "sse"
	Stdio McpServerCreateTransport = "stdio"
)

Defines values for McpServerCreateTransport.

func (McpServerCreateTransport) Valid

func (e McpServerCreateTransport) Valid() bool

Valid indicates whether the value is a known member of the McpServerCreateTransport enum.

type McpServerStatus

type McpServerStatus string

McpServerStatus Current connection status of the MCP server.

const (
	McpServerStatusConnected    McpServerStatus = "connected"
	McpServerStatusDisconnected McpServerStatus = "disconnected"
	McpServerStatusError        McpServerStatus = "error"
)

Defines values for McpServerStatus.

func (McpServerStatus) Valid

func (e McpServerStatus) Valid() bool

Valid indicates whether the value is a known member of the McpServerStatus enum.

type McpServerToolsResponse

type McpServerToolsResponse struct {
	// Tools List of tool names exposed by the MCP server.
	Tools []string `json:"tools"`
}

McpServerToolsResponse Response from GET /mcp-servers/{id}/tools. Returns the list of tool names exposed by a specific MCP server.

type McpServerTransport

type McpServerTransport string

McpServerTransport Transport mechanism used by this MCP server. "stdio" for local process-based servers, "sse" or "http" for remote HTTP-based servers.

const (
	McpServerTransportHttp  McpServerTransport = "http"
	McpServerTransportSse   McpServerTransport = "sse"
	McpServerTransportStdio McpServerTransport = "stdio"
)

Defines values for McpServerTransport.

func (McpServerTransport) Valid

func (e McpServerTransport) Valid() bool

Valid indicates whether the value is a known member of the McpServerTransport enum.

type McpToolCallRequest

type McpToolCallRequest struct {
	// Arguments Key-value arguments to pass to the tool. Shape is tool-specific.
	Arguments *map[string]interface{} `json:"arguments,omitempty"`

	// ServerId The MCP server ID to invoke the tool on.
	ServerId string `json:"server_id"`

	// ToolName The name of the tool to call on the MCP server.
	ToolName string `json:"tool_name"`
}

McpToolCallRequest Request body for POST /api/v1/tools/mcp. Invokes a tool on a specific MCP server by name, passing optional arguments.

type McpToolCallResponse

type McpToolCallResponse struct {
	// Error Error message if the tool call failed on the MCP server side. Only present when the call returned an error result.
	Error *string `json:"error,omitempty"`

	// Result The tool's return value. Shape is tool-specific; may be any JSON type.
	Result interface{} `json:"result"`
}

McpToolCallResponse Response from POST /api/v1/tools/mcp. Contains the result returned by the MCP server tool.

type McpToolsListResponse

type McpToolsListResponse = []McpToolsListResponse_Item

McpToolsListResponse Response from GET /api/v1/tools/mcp. Returns all configured MCP servers with their status for the agent tool picker UI.

type McpToolsListResponse_Item

type McpToolsListResponse_Item struct {
	// Args Arguments passed to the MCP server command.
	Args *[]string `json:"args,omitempty"`

	// Command The command used to start the MCP server.
	Command *string `json:"command,omitempty"`

	// Enabled Whether the MCP server is currently enabled.
	Enabled bool `json:"enabled"`

	// Id Unique MCP server identifier (same as the config key name).
	Id string `json:"id"`

	// Name Display name for the MCP server.
	Name                 string                 `json:"name"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

McpToolsListResponse_Item defines model for McpToolsListResponse.Item.

func (McpToolsListResponse_Item) Get

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

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

func (McpToolsListResponse_Item) MarshalJSON

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

Override default JSON handling for McpToolsListResponse_Item to handle AdditionalProperties

func (*McpToolsListResponse_Item) Set

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

Setter for additional properties for McpToolsListResponse_Item

func (*McpToolsListResponse_Item) UnmarshalJSON

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

Override default JSON handling for McpToolsListResponse_Item to handle AdditionalProperties

type MeInfo

type MeInfo struct {
	// Role RBAC role of the current authenticated user.
	Role MeInfoRole `json:"role"`
}

MeInfo Response from GET /api/v1/me. Returns the authenticated user's role, used for RBAC gating in the SPA.

func FixtureMeInfo_Edge

func FixtureMeInfo_Edge() MeInfo

FixtureMeInfo_Edge — user role (the other enum value).

func FixtureMeInfo_Populated

func FixtureMeInfo_Populated() MeInfo

func FixtureMeInfo_ZeroValue

func FixtureMeInfo_ZeroValue() MeInfo

FixtureMeInfo_ZeroValue — Go zero value. Expected: FAIL because role="" (not in enum [admin, user]).

type MeInfoRole

type MeInfoRole string

MeInfoRole RBAC role of the current authenticated user.

const (
	MeInfoRoleAdmin MeInfoRole = "admin"
	MeInfoRoleUser  MeInfoRole = "user"
)

Defines values for MeInfoRole.

func (MeInfoRole) Valid

func (e MeInfoRole) Valid() bool

Valid indicates whether the value is a known member of the MeInfoRole enum.

type MediaFrame

type MediaFrame struct {
	Parts     []MediaPart `json:"parts"`
	SessionId string      `json:"session_id"`
	Type      string      `json:"type"`
}

MediaFrame — Server → client media attachments. parts MUST be a non-empty array (never null) — nil-safety contract to prevent parts.map() crash.

func FixtureMediaFrame_Edge

func FixtureMediaFrame_Edge() MediaFrame

FixtureMediaFrame_Edge — multiple parts with various filenames.

func FixtureMediaFrame_NilParts

func FixtureMediaFrame_NilParts() MediaFrame

FixtureMediaFrame_NilParts — parts is nil — this must FAIL validation.

func FixtureMediaFrame_Populated

func FixtureMediaFrame_Populated() MediaFrame

func FixtureMediaFrame_ZeroValue

func FixtureMediaFrame_ZeroValue() MediaFrame

FixtureMediaFrame_ZeroValue — Go zero values. Expected: FAIL because type="", session_id="", parts=nil (marshals to null).

type MediaPart

type MediaPart struct {
	Caption     *string `json:"caption,omitempty"`
	ContentType string  `json:"content_type"`
	Filename    string  `json:"filename"`
	Type        string  `json:"type"`
	Url         string  `json:"url"`
}

MediaPart — One media attachment.

type Message

type Message struct {
	// AgentId ID of the agent that produced this entry (FR-002). Always present.
	AgentId string `json:"agent_id"`

	// Attachments File attachments associated with this message.
	Attachments *[]struct {
		// MimeType MIME type of the attachment.
		MimeType string `json:"mime_type"`

		// Path Relative path within the session workspace.
		Path string `json:"path"`

		// Size File size in bytes.
		Size int64 `json:"size"`

		// Type Attachment category. Aligned with MediaPart.type enum.
		Type MessageAttachmentsType `json:"type"`
	} `json:"attachments,omitempty"`

	// CancelMethod How the cancel was applied — present only on type="turn_canceled" entries (FR-15). "graceful" lets the in-flight tool finish; "hard" interrupts immediately.
	CancelMethod *MessageCancelMethod `json:"cancel_method,omitempty"`

	// CanceledByChannel Channel that originated the cancel request — present only on type="turn_canceled" entries (FR-15).
	CanceledByChannel *string `json:"canceled_by_channel,omitempty"`

	// CanceledByUser Username of the actor who triggered the cancel — present only on type="turn_canceled" entries (FR-15).
	CanceledByUser *string `json:"canceled_by_user,omitempty"`

	// Content Raw markdown/text content of the message.
	Content *string `json:"content,omitempty"`

	// Cost USD cost for this entry. Absent when zero.
	Cost *float64 `json:"cost,omitempty"`

	// DescendantsCanceled IDs of descendant turns that were canceled in cascade — present only on type="turn_canceled" entries (FR-6a).
	DescendantsCanceled *[]string `json:"descendants_canceled,omitempty"`

	// Id Unique message identifier.
	Id string `json:"id"`

	// MessagesCompacted Number of messages compacted (present only on compaction entries).
	MessagesCompacted *int `json:"messages_compacted,omitempty"`

	// Role Author role. Absent on compaction entries.
	Role *MessageRole `json:"role,omitempty"`

	// Status Completion status of this message turn.
	Status *MessageStatus `json:"status,omitempty"`

	// Summary Compaction summary text (present only on type=compaction entries).
	Summary *string `json:"summary,omitempty"`

	// Timestamp RFC3339 timestamp when this entry was recorded.
	Timestamp time.Time `json:"timestamp"`

	// Tokens Token count for this entry (input + output). Absent when zero.
	Tokens *int `json:"tokens,omitempty"`

	// ToolCalls Tool invocations made during this message turn.
	ToolCalls *[]struct {
		// DurationMs Elapsed time in milliseconds. Absent when still running.
		DurationMs *int64 `json:"duration_ms,omitempty"`

		// Id Unique tool call identifier (ToolCallID type on the Go side).
		Id string `json:"id"`

		// Parameters Input parameters passed to the tool.
		Parameters *map[string]interface{} `json:"parameters,omitempty"`

		// ParentToolCallId Parent tool call ID for nested subagent tool invocations.
		ParentToolCallId *string `json:"parent_tool_call_id,omitempty"`

		// Result Return value from the tool. Shape is tool-specific.
		Result *map[string]interface{} `json:"result,omitempty"`

		// Status Outcome of the tool call.
		Status MessageToolCallsStatus `json:"status"`

		// Tool Tool name as registered in the tool registry (e.g. "workspace.shell", "web_search").
		Tool string `json:"tool"`
	} `json:"tool_calls,omitempty"`

	// Truncated Set to true on the last assistant entry when a turn is canceled mid-stream (FR-14). Only present when true. The SPA renders an "(interrupted)" suffix on the bubble when this is set.
	Truncated *bool `json:"truncated,omitempty"`

	// TurnId Turn identifier — present only on type="turn_canceled" entries (FR-15). Identifies the turn that was canceled.
	TurnId *string `json:"turn_id,omitempty"`

	// Type Entry classification. Absent or empty means "message" (backwards compatible). "compaction" entries summarize pruned context; "system" entries are internal markers; "tool_call" entries record tool invocations; "turn_canceled" entries mark a turn that was canceled mid-stream (FR-15). The Go-side EntryType constant set is the source of truth (`pkg/session/daypartition.go`).
	Type *MessageType `json:"type,omitempty"`
}

Message A single transcript entry (session.TranscriptEntry on the Go side). Maps to the Message interface in src/lib/api.ts. The SPA reads this from GET /sessions/{id}/messages.

type MessageAttachmentsType

type MessageAttachmentsType string

MessageAttachmentsType Attachment category. Aligned with MediaPart.type enum.

const (
	MessageAttachmentsTypeAudio MessageAttachmentsType = "audio"
	MessageAttachmentsTypeFile  MessageAttachmentsType = "file"
	MessageAttachmentsTypeImage MessageAttachmentsType = "image"
	MessageAttachmentsTypeVideo MessageAttachmentsType = "video"
)

Defines values for MessageAttachmentsType.

func (MessageAttachmentsType) Valid

func (e MessageAttachmentsType) Valid() bool

Valid indicates whether the value is a known member of the MessageAttachmentsType enum.

type MessageCancelMethod

type MessageCancelMethod string

MessageCancelMethod How the cancel was applied — present only on type="turn_canceled" entries (FR-15). "graceful" lets the in-flight tool finish; "hard" interrupts immediately.

const (
	MessageCancelMethodGraceful MessageCancelMethod = "graceful"
	MessageCancelMethodHard     MessageCancelMethod = "hard"
)

Defines values for MessageCancelMethod.

func (MessageCancelMethod) Valid

func (e MessageCancelMethod) Valid() bool

Valid indicates whether the value is a known member of the MessageCancelMethod enum.

type MessageFrame

type MessageFrame struct {
	AgentId *string `json:"agent_id,omitempty"`
	Content string  `json:"content"`
	// Optional media:// refs for files the user attached to this message (e.g. images uploaded via POST /api/v1/upload). The server threads each ref into the LLM content array as a multimodal content block so the agent can see the attachment. Empty or omitted for text-only messages.
	Media     []string `json:"media,omitempty"`
	SessionId *string  `json:"session_id,omitempty"`
	Type      string   `json:"type"`
}

MessageFrame — Client → server user chat message. Omit session_id to start a new session; include to continue an existing one.

func FixtureMessageFrame_Edge

func FixtureMessageFrame_Edge() MessageFrame

FixtureMessageFrame_Edge — new session (no session_id), max-length-ish content.

func FixtureMessageFrame_Populated

func FixtureMessageFrame_Populated() MessageFrame

func FixtureMessageFrame_ZeroValue

func FixtureMessageFrame_ZeroValue() MessageFrame

FixtureMessageFrame_ZeroValue — Go zero values. Expected: FAIL because type="" and content="" (content has minLength:1).

type MessageRole

type MessageRole string

MessageRole Author role. Absent on compaction entries.

const (
	MessageRoleAssistant MessageRole = "assistant"
	MessageRoleSystem    MessageRole = "system"
	MessageRoleUser      MessageRole = "user"
)

Defines values for MessageRole.

func (MessageRole) Valid

func (e MessageRole) Valid() bool

Valid indicates whether the value is a known member of the MessageRole enum.

type MessageStatus

type MessageStatus string

MessageStatus Completion status of this message turn.

const (
	MessageStatusError       MessageStatus = "error"
	MessageStatusInterrupted MessageStatus = "interrupted"
	MessageStatusOk          MessageStatus = "ok"
)

Defines values for MessageStatus.

func (MessageStatus) Valid

func (e MessageStatus) Valid() bool

Valid indicates whether the value is a known member of the MessageStatus enum.

type MessageToolCallsStatus

type MessageToolCallsStatus string

MessageToolCallsStatus Outcome of the tool call.

const (
	MessageToolCallsStatusCancelled MessageToolCallsStatus = "cancelled"
	MessageToolCallsStatusDenied    MessageToolCallsStatus = "denied"
	MessageToolCallsStatusError     MessageToolCallsStatus = "error"
	MessageToolCallsStatusPending   MessageToolCallsStatus = "pending"
	MessageToolCallsStatusRunning   MessageToolCallsStatus = "running"
	MessageToolCallsStatusSuccess   MessageToolCallsStatus = "success"
)

Defines values for MessageToolCallsStatus.

func (MessageToolCallsStatus) Valid

func (e MessageToolCallsStatus) Valid() bool

Valid indicates whether the value is a known member of the MessageToolCallsStatus enum.

type MessageType

type MessageType string

MessageType Entry classification. Absent or empty means "message" (backwards compatible). "compaction" entries summarize pruned context; "system" entries are internal markers; "tool_call" entries record tool invocations; "turn_canceled" entries mark a turn that was canceled mid-stream (FR-15). The Go-side EntryType constant set is the source of truth (`pkg/session/daypartition.go`).

const (
	MessageTypeCompaction   MessageType = "compaction"
	MessageTypeMessage      MessageType = "message"
	MessageTypeSystem       MessageType = "system"
	MessageTypeToolCall     MessageType = "tool_call"
	MessageTypeTurnCanceled MessageType = "turn_canceled"
)

Defines values for MessageType.

func (MessageType) Valid

func (e MessageType) Valid() bool

Valid indicates whether the value is a known member of the MessageType enum.

type N400BadRequest

type N400BadRequest = ErrorResponse

N400BadRequest Standard error envelope returned by all non-2xx responses.

type N401Unauthorized

type N401Unauthorized = ErrorResponse

N401Unauthorized Standard error envelope returned by all non-2xx responses.

type N403Forbidden

type N403Forbidden = ErrorResponse

N403Forbidden Standard error envelope returned by all non-2xx responses.

type N404NotFound

type N404NotFound = ErrorResponse

N404NotFound Standard error envelope returned by all non-2xx responses.

type N409Conflict

type N409Conflict = ErrorResponse

N409Conflict Standard error envelope returned by all non-2xx responses.

type N422UnprocessableEntity

type N422UnprocessableEntity = ErrorResponse

N422UnprocessableEntity Standard error envelope returned by all non-2xx responses.

type N429TooManyRequests

type N429TooManyRequests = ErrorResponse

N429TooManyRequests Standard error envelope returned by all non-2xx responses.

type N500InternalServerError

type N500InternalServerError = ErrorResponse

N500InternalServerError Standard error envelope returned by all non-2xx responses.

type N503ServiceUnavailable

type N503ServiceUnavailable = ErrorResponse

N503ServiceUnavailable Standard error envelope returned by all non-2xx responses.

type Notification

type Notification struct {
	// AgentId The agent the notification concerns.
	AgentId *string `json:"agent_id,omitempty"`

	// Body Optional detail (e.g. the failure reason).
	Body        *string `json:"body,omitempty"`
	CreatedAtMs int64   `json:"created_at_ms"`
	Id          string  `json:"id"`

	// Read Per-user read state.
	Read bool `json:"read"`

	// ScheduleId Click-through target when the notification concerns a schedule.
	ScheduleId *string `json:"schedule_id,omitempty"`

	// SessionId Click-through target when the notification concerns a run's session.
	SessionId *string              `json:"session_id,omitempty"`
	Severity  NotificationSeverity `json:"severity"`
	Title     string               `json:"title"`

	// Type The event class. Extensible; consumers must tolerate unknown values.
	Type NotificationType `json:"type"`

	// UpdatedAtMs Set when a coalesced notification is updated (e.g. repeated schedule failure).
	UpdatedAtMs *int64 `json:"updated_at_ms,omitempty"`
}

Notification A user-facing notification (#264) surfaced in the header notification center. Currently raised on scheduled-run failures, but the type is open for future sources. Coalesced per source where noted (e.g. one item per schedule, updated).

type NotificationFrame

type NotificationFrame struct {
	AgentId          *string `json:"agent_id,omitempty"`
	Body             *string `json:"body,omitempty"`
	CreatedAtMs      int     `json:"created_at_ms"`
	Id               string  `json:"id"`
	NotificationType string  `json:"notification_type"`
	Read             bool    `json:"read"`
	ScheduleId       *string `json:"schedule_id,omitempty"`
	SessionId        *string `json:"session_id,omitempty"`
	Severity         string  `json:"severity"`
	Title            string  `json:"title"`
	Type             string  `json:"type"`
}

NotificationFrame — Server → client. A notification raised for the recipient user (e.g. a scheduled run failed). Delivered only to that user's connections; the SPA adds it to the header notification center (#264).

type NotificationList

type NotificationList struct {
	// Notifications Newest first.
	Notifications []struct {
		// AgentId The agent the notification concerns.
		AgentId *string `json:"agent_id,omitempty"`

		// Body Optional detail (e.g. the failure reason).
		Body        *string `json:"body,omitempty"`
		CreatedAtMs int64   `json:"created_at_ms"`
		Id          string  `json:"id"`

		// Read Per-user read state.
		Read bool `json:"read"`

		// ScheduleId Click-through target when the notification concerns a schedule.
		ScheduleId *string `json:"schedule_id,omitempty"`

		// SessionId Click-through target when the notification concerns a run's session.
		SessionId *string                               `json:"session_id,omitempty"`
		Severity  NotificationListNotificationsSeverity `json:"severity"`
		Title     string                                `json:"title"`

		// Type The event class. Extensible; consumers must tolerate unknown values.
		Type NotificationListNotificationsType `json:"type"`

		// UpdatedAtMs Set when a coalesced notification is updated (e.g. repeated schedule failure).
		UpdatedAtMs *int64 `json:"updated_at_ms,omitempty"`
	} `json:"notifications"`

	// UnreadCount Number of unread notifications for the badge.
	UnreadCount int `json:"unread_count"`
}

NotificationList The authenticated user's notifications plus the unread count (#264).

type NotificationListNotificationsSeverity

type NotificationListNotificationsSeverity string

NotificationListNotificationsSeverity defines model for NotificationList.Notifications.Severity.

const (
	NotificationListNotificationsSeverityError   NotificationListNotificationsSeverity = "error"
	NotificationListNotificationsSeverityInfo    NotificationListNotificationsSeverity = "info"
	NotificationListNotificationsSeverityWarning NotificationListNotificationsSeverity = "warning"
)

Defines values for NotificationListNotificationsSeverity.

func (NotificationListNotificationsSeverity) Valid

Valid indicates whether the value is a known member of the NotificationListNotificationsSeverity enum.

type NotificationListNotificationsType

type NotificationListNotificationsType string

NotificationListNotificationsType The event class. Extensible; consumers must tolerate unknown values.

const (
	NotificationListNotificationsTypeScheduleFailed NotificationListNotificationsType = "schedule_failed"
)

Defines values for NotificationListNotificationsType.

func (NotificationListNotificationsType) Valid

Valid indicates whether the value is a known member of the NotificationListNotificationsType enum.

type NotificationSeverity

type NotificationSeverity string

NotificationSeverity defines model for Notification.Severity.

const (
	NotificationSeverityError   NotificationSeverity = "error"
	NotificationSeverityInfo    NotificationSeverity = "info"
	NotificationSeverityWarning NotificationSeverity = "warning"
)

Defines values for NotificationSeverity.

func (NotificationSeverity) Valid

func (e NotificationSeverity) Valid() bool

Valid indicates whether the value is a known member of the NotificationSeverity enum.

type NotificationType

type NotificationType string

NotificationType The event class. Extensible; consumers must tolerate unknown values.

const (
	NotificationTypeScheduleFailed NotificationType = "schedule_failed"
)

Defines values for NotificationType.

func (NotificationType) Valid

func (e NotificationType) Valid() bool

Valid indicates whether the value is a known member of the NotificationType enum.

type OnboardingCompleteRequest

type OnboardingCompleteRequest struct {
	// Admin Initial admin account credentials.
	Admin struct {
		// Password Admin password. Minimum 8 characters.
		Password string `json:"password"`

		// Username Admin login name.
		Username string `json:"username"`
	} `json:"admin"`

	// Provider LLM provider configuration to persist.
	Provider struct {
		// ApiKey API key for the provider. Stored encrypted (AES-256-GCM) in credentials.json.
		ApiKey string `json:"api_key"`

		// Id Provider protocol identifier (e.g. "anthropic", "openai", "openrouter", "gemini"). Must be a known protocol; unknown values are rejected with 400.
		Id string `json:"id"`

		// Model Default model to use for this provider. When omitted, a sensible default is chosen per provider (e.g. "claude-sonnet-4-6" for anthropic, "gpt-4o" for openai).
		Model *string `json:"model,omitempty"`
	} `json:"provider"`
}

OnboardingCompleteRequest Body for POST /onboarding/complete. Atomically sets up the first LLM provider and creates the initial admin account. CSRF-exempt (no cookie exists at this point).

type OnboardingCompleteResponse

type OnboardingCompleteResponse struct {
	// Role RBAC role of the authenticated user.
	Role OnboardingCompleteResponseRole `json:"role"`

	// Token Canonical opaque bearer token format used by Omnipus. The prefix "omnipus_" (8 characters) followed by 64 lowercase hex characters (32 random bytes), giving a total length of 72 characters. Used in Authorization headers, WS AuthFrame, and rotate-token responses.
	Token string `json:"token"`

	// Username The authenticated user's login name.
	Username string `json:"username"`

	// Warning Non-fatal advisory message. Present on onboarding/complete when the credential store is locked and the API key was stored in plaintext.
	Warning *string `json:"warning,omitempty"`
}

OnboardingCompleteResponse Returned on successful login, register-admin, or onboarding/complete. Contains the bearer token to use in subsequent Authorization headers, the role of the authenticated user, and the username.

type OnboardingCompleteResponseRole

type OnboardingCompleteResponseRole string

OnboardingCompleteResponseRole RBAC role of the authenticated user.

const (
	OnboardingCompleteResponseRoleAdmin OnboardingCompleteResponseRole = "admin"
	OnboardingCompleteResponseRoleUser  OnboardingCompleteResponseRole = "user"
)

Defines values for OnboardingCompleteResponseRole.

func (OnboardingCompleteResponseRole) Valid

Valid indicates whether the value is a known member of the OnboardingCompleteResponseRole enum.

type OnboardingStatusResponse

type OnboardingStatusResponse struct {
	// OnboardingComplete True when onboarding has been successfully marked as complete.
	OnboardingComplete bool `json:"onboarding_complete"`
}

OnboardingStatusResponse Response from PATCH /api/v1/state when marking onboarding complete. Confirms that onboarding has been completed.

type OperationResult

type OperationResult struct {
	// Error Human-readable error message. Present only when success=false.
	Error *string `json:"error,omitempty"`

	// Success True when the operation succeeded.
	Success bool `json:"success"`
}

OperationResult Generic success/failure envelope for simple admin operations. Used by endpoints that perform an action and return only whether it succeeded.

func FixtureOperationResult_Edge

func FixtureOperationResult_Edge() OperationResult

func FixtureOperationResult_Populated

func FixtureOperationResult_Populated() OperationResult

func FixtureOperationResult_ZeroValue

func FixtureOperationResult_ZeroValue() OperationResult

type PatchAgentOwnershipJSONRequestBody

type PatchAgentOwnershipJSONRequestBody = AgentOwnershipUpdateRequest

PatchAgentOwnershipJSONRequestBody defines body for PatchAgentOwnership for application/json ContentType.

type PatchAppStateJSONRequestBody

type PatchAppStateJSONRequestBody = AppStatePatchRequest

PatchAppStateJSONRequestBody defines body for PatchAppState for application/json ContentType.

type PendingRestartEntry

type PendingRestartEntry struct {
	// AppliedValue Value currently applied to the running process (boot-time snapshot).
	AppliedValue interface{} `json:"applied_value"`

	// Key Dotted config key path (e.g. "sandbox.mode", "gateway.port"). Only RestartGatedKeys appear here — hot-reload keys never appear.
	Key string `json:"key"`

	// PersistedValue Value currently on disk (what will be applied after restart).
	PersistedValue interface{} `json:"persisted_value"`
}

PendingRestartEntry A single config key that has been written to disk but not yet applied — the running value diverges from the persisted value. Returned in the array from GET /api/v1/config/pending-restart.

type PingFrame

type PingFrame struct {
	Type string `json:"type"`
}

PingFrame — Client → server heartbeat.

func FixturePingFrame_Edge

func FixturePingFrame_Edge() PingFrame

FixturePingFrame_Edge is the same as Populated — PingFrame has only one field. The edge case is that even a frame with no payload beyond type is valid.

func FixturePingFrame_Populated

func FixturePingFrame_Populated() PingFrame

func FixturePingFrame_ZeroValue

func FixturePingFrame_ZeroValue() PingFrame

FixturePingFrame_ZeroValue — Go zero values. Expected: FAIL because type="" (const: "ping" requires the literal value "ping").

type PongFrame

type PongFrame struct {
	Type string `json:"type"`
}

PongFrame — Server → client heartbeat acknowledgement. Emitted in response to every client PingFrame so the SPA's "any frame received recently" liveness check observes a server frame during idle and does not force-close after 60 s of silence.

type PostChatJSONRequestBody

type PostChatJSONRequestBody = SseChatRequest

PostChatJSONRequestBody defines body for PostChat for application/json ContentType.

type PostToolApprovalJSONRequestBody

type PostToolApprovalJSONRequestBody = ToolApprovalActionRequest

PostToolApprovalJSONRequestBody defines body for PostToolApproval for application/json ContentType.

type ProbeProviderJSONRequestBody

type ProbeProviderJSONRequestBody = ProbeProviderRequest

ProbeProviderJSONRequestBody defines body for ProbeProvider for application/json ContentType.

type ProbeProviderRequest

type ProbeProviderRequest struct {
	// ApiKey API key to test against the provider.
	ApiKey string `json:"api_key"`

	// Endpoint Optional override for the provider's API base URL. When omitted, the server uses the provider's well-known default endpoint.
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Provider protocol identifier. Must be one of the recognized protocol names that Omnipus can connect to. Validated server-side against the known protocol registry (pkg/providers.IsKnownProtocol).
	Id ProbeProviderRequestId `json:"id"`
}

ProbeProviderRequest Body for POST /onboarding/probe-provider. Tests an API key against a provider and returns available models. Non-persistent — nothing is written to disk. CSRF-exempt. Returns 409 once onboarding is complete.

type ProbeProviderRequestId

type ProbeProviderRequestId string

ProbeProviderRequestId Provider protocol identifier. Must be one of the recognized protocol names that Omnipus can connect to. Validated server-side against the known protocol registry (pkg/providers.IsKnownProtocol).

const (
	AlibabaCoding          ProbeProviderRequestId = "alibaba-coding"
	AlibabaCodingAnthropic ProbeProviderRequestId = "alibaba-coding-anthropic"
	Anthropic              ProbeProviderRequestId = "anthropic"
	AnthropicMessages      ProbeProviderRequestId = "anthropic-messages"
	Antigravity            ProbeProviderRequestId = "antigravity"
	Avian                  ProbeProviderRequestId = "avian"
	Azure                  ProbeProviderRequestId = "azure"
	AzureOpenai            ProbeProviderRequestId = "azure-openai"
	Bedrock                ProbeProviderRequestId = "bedrock"
	Cerebras               ProbeProviderRequestId = "cerebras"
	ClaudeCli              ProbeProviderRequestId = "claude-cli"
	Claudecli              ProbeProviderRequestId = "claudecli"
	CodexCli               ProbeProviderRequestId = "codex-cli"
	Codexcli               ProbeProviderRequestId = "codexcli"
	CodingPlan             ProbeProviderRequestId = "coding-plan"
	CodingPlanAnthropic    ProbeProviderRequestId = "coding-plan-anthropic"
	Copilot                ProbeProviderRequestId = "copilot"
	DashscopeIntl          ProbeProviderRequestId = "dashscope-intl"
	DashscopeUs            ProbeProviderRequestId = "dashscope-us"
	Deepseek               ProbeProviderRequestId = "deepseek"
	Gemini                 ProbeProviderRequestId = "gemini"
	GithubCopilot          ProbeProviderRequestId = "github-copilot"
	Google                 ProbeProviderRequestId = "google"
	Groq                   ProbeProviderRequestId = "groq"
	Litellm                ProbeProviderRequestId = "litellm"
	Longcat                ProbeProviderRequestId = "longcat"
	Mimo                   ProbeProviderRequestId = "mimo"
	Minimax                ProbeProviderRequestId = "minimax"
	Mistral                ProbeProviderRequestId = "mistral"
	Modelscope             ProbeProviderRequestId = "modelscope"
	Moonshot               ProbeProviderRequestId = "moonshot"
	Novita                 ProbeProviderRequestId = "novita"
	Nvidia                 ProbeProviderRequestId = "nvidia"
	Ollama                 ProbeProviderRequestId = "ollama"
	Openai                 ProbeProviderRequestId = "openai"
	Openrouter             ProbeProviderRequestId = "openrouter"
	Qwen                   ProbeProviderRequestId = "qwen"
	QwenCoding             ProbeProviderRequestId = "qwen-coding"
	QwenInternational      ProbeProviderRequestId = "qwen-international"
	QwenIntl               ProbeProviderRequestId = "qwen-intl"
	QwenUs                 ProbeProviderRequestId = "qwen-us"
	Shengsuanyun           ProbeProviderRequestId = "shengsuanyun"
	Vivgrid                ProbeProviderRequestId = "vivgrid"
	Vllm                   ProbeProviderRequestId = "vllm"
	Volcengine             ProbeProviderRequestId = "volcengine"
	Zhipu                  ProbeProviderRequestId = "zhipu"
)

Defines values for ProbeProviderRequestId.

func (ProbeProviderRequestId) Valid

func (e ProbeProviderRequestId) Valid() bool

Valid indicates whether the value is a known member of the ProbeProviderRequestId enum.

type ProbeProviderResponse

type ProbeProviderResponse struct {
	// Error Human-readable error from the upstream provider. Present only when success=false.
	Error *string `json:"error,omitempty"`

	// Models List of model IDs returned by the provider. Present only when success=true.
	Models *[]string `json:"models,omitempty"`

	// Success Whether the provider accepted the API key.
	Success bool `json:"success"`
}

ProbeProviderResponse Response from POST /onboarding/probe-provider. Always HTTP 200. success=true means the API key was accepted; success=false means the upstream rejected it (the error field explains why).

type PromptGuardResponse

type PromptGuardResponse struct {
	// Level Current prompt injection detection strictness level.
	Level PromptGuardResponseLevel `json:"level"`

	// RequiresRestart Always false — prompt guard is hot-reloaded.
	RequiresRestart bool `json:"requires_restart"`
}

PromptGuardResponse Prompt injection guard level returned by GET /api/v1/security/prompt-guard.

type PromptGuardResponseLevel

type PromptGuardResponseLevel string

PromptGuardResponseLevel Current prompt injection detection strictness level.

const (
	PromptGuardResponseLevelHigh   PromptGuardResponseLevel = "high"
	PromptGuardResponseLevelLow    PromptGuardResponseLevel = "low"
	PromptGuardResponseLevelMedium PromptGuardResponseLevel = "medium"
)

Defines values for PromptGuardResponseLevel.

func (PromptGuardResponseLevel) Valid

func (e PromptGuardResponseLevel) Valid() bool

Valid indicates whether the value is a known member of the PromptGuardResponseLevel enum.

type PromptGuardUpdateRequest

type PromptGuardUpdateRequest struct {
	// Level New prompt injection detection strictness level.
	Level PromptGuardUpdateRequestLevel `json:"level"`
}

PromptGuardUpdateRequest Request body for PUT /api/v1/security/prompt-guard. Updates the prompt injection detection strictness level.

func FixturePromptGuardUpdateRequest_Edge

func FixturePromptGuardUpdateRequest_Edge() PromptGuardUpdateRequest

func FixturePromptGuardUpdateRequest_Populated

func FixturePromptGuardUpdateRequest_Populated() PromptGuardUpdateRequest

func FixturePromptGuardUpdateRequest_ZeroValue

func FixturePromptGuardUpdateRequest_ZeroValue() PromptGuardUpdateRequest

type PromptGuardUpdateRequestLevel

type PromptGuardUpdateRequestLevel string

PromptGuardUpdateRequestLevel New prompt injection detection strictness level.

const (
	PromptGuardUpdateRequestLevelHigh   PromptGuardUpdateRequestLevel = "high"
	PromptGuardUpdateRequestLevelLow    PromptGuardUpdateRequestLevel = "low"
	PromptGuardUpdateRequestLevelMedium PromptGuardUpdateRequestLevel = "medium"
)

Defines values for PromptGuardUpdateRequestLevel.

func (PromptGuardUpdateRequestLevel) Valid

Valid indicates whether the value is a known member of the PromptGuardUpdateRequestLevel enum.

type PromptGuardUpdateResponse

type PromptGuardUpdateResponse struct {
	// AppliedLevel The prompt guard level now active.
	AppliedLevel PromptGuardUpdateResponseAppliedLevel `json:"applied_level"`

	// RequiresRestart False when hot-reload succeeded. True when hot-reload failed (warning will be present).
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`

	// Warning Present when hot-reload failed — config is saved but restart is required.
	Warning *string `json:"warning,omitempty"`
}

PromptGuardUpdateResponse Response from PUT /api/v1/security/prompt-guard. Returns save status and the currently active level.

func FixturePromptGuardUpdateResponse_Edge

func FixturePromptGuardUpdateResponse_Edge() PromptGuardUpdateResponse

func FixturePromptGuardUpdateResponse_Populated

func FixturePromptGuardUpdateResponse_Populated() PromptGuardUpdateResponse

func FixturePromptGuardUpdateResponse_ZeroValue

func FixturePromptGuardUpdateResponse_ZeroValue() PromptGuardUpdateResponse

type PromptGuardUpdateResponseAppliedLevel

type PromptGuardUpdateResponseAppliedLevel string

PromptGuardUpdateResponseAppliedLevel The prompt guard level now active.

Defines values for PromptGuardUpdateResponseAppliedLevel.

func (PromptGuardUpdateResponseAppliedLevel) Valid

Valid indicates whether the value is a known member of the PromptGuardUpdateResponseAppliedLevel enum.

type Provider

type Provider struct {
	// DisplayName Branded display name for UI presentation (e.g. "OpenRouter", "Anthropic"). Falls back to name when absent.
	DisplayName *string `json:"display_name,omitempty"`

	// Error Fatal error message when status is "error". Absent for connected/disconnected providers.
	Error *string `json:"error,omitempty"`

	// HasApiKey True when the provider has a stored API key in credentials. The key itself is never returned. Absent on legacy entries that predate this field — treat as false when absent.
	HasApiKey *bool `json:"has_api_key,omitempty"`

	// Id Provider identifier (e.g. "anthropic", "openai", "openrouter").
	Id string `json:"id"`

	// Models Alphabetically sorted list of model IDs available from this provider, fetched from the upstream /models endpoint when an API key is present. Empty array when the upstream fetch fails or no key is configured.
	Models []string `json:"models"`

	// Name Human-readable provider name (may be the same as id for unknown providers).
	Name string `json:"name"`

	// Status "connected" when at least one API key is configured for this provider. "disconnected" when no key is available or on the fallback default entry. "error" when the provider is configured but the upstream returned a non-retryable error.
	Status ProviderStatus `json:"status"`

	// Warning Non-fatal advisory message (e.g. "could not fetch upstream model list: ..."). Absent when there are no warnings.
	Warning *string `json:"warning,omitempty"`
}

Provider A single LLM provider entry as returned by GET /providers and PUT /providers/{id}. Describes the provider's connection status, the resolved model list, and any non-fatal warnings encountered when fetching the upstream model catalogue.

type ProviderStatus

type ProviderStatus string

ProviderStatus "connected" when at least one API key is configured for this provider. "disconnected" when no key is available or on the fallback default entry. "error" when the provider is configured but the upstream returned a non-retryable error.

const (
	ProviderStatusConnected    ProviderStatus = "connected"
	ProviderStatusDisconnected ProviderStatus = "disconnected"
	ProviderStatusError        ProviderStatus = "error"
)

Defines values for ProviderStatus.

func (ProviderStatus) Valid

func (e ProviderStatus) Valid() bool

Valid indicates whether the value is a known member of the ProviderStatus enum.

type ProviderUpdateRequest

type ProviderUpdateRequest struct {
	// ApiKey API key for the provider. Stored encrypted (AES-256-GCM) in credentials.json. Required when adding a new provider; optional when updating an existing one (omit to leave the current key unchanged).
	ApiKey *string `json:"api_key,omitempty"`

	// Model Default model to use for this provider. Defaults to "default" when not specified on new providers.
	Model *string `json:"model,omitempty"`
}

ProviderUpdateRequest Request body for PUT /api/v1/providers/{id}. Adds or updates an LLM provider configuration. On new providers, api_key is required. On existing providers, api_key may be omitted to keep the current key.

type PutUserContextJSONRequestBody

type PutUserContextJSONRequestBody = UserContextRequest

PutUserContextJSONRequestBody defines body for PutUserContext for application/json ContentType.

type RateLimitConfig

type RateLimitConfig struct {
	// DailyCostCap Maximum allowed daily LLM cost in USD. 0 = unlimited. Only present in GET responses (mapped from daily_cost_cap_usd).
	DailyCostCap *float64 `json:"daily_cost_cap,omitempty"`

	// DailyCostCapUsd Maximum allowed daily LLM cost in USD. 0 = unlimited. Used in PUT request body.
	DailyCostCapUsd *float64 `json:"daily_cost_cap_usd,omitempty"`

	// DailyCostUsd Current cumulative LLM spending for today (UTC). Only present in GET responses.
	DailyCostUsd *float64 `json:"daily_cost_usd,omitempty"`

	// Enabled True when any rate limit cap is configured. Derived from whether any limit field is non-zero. Only present in GET responses.
	Enabled *bool `json:"enabled,omitempty"`

	// MaxAgentLlmCallsPerHour Maximum LLM API calls per agent per hour. 0 = unlimited.
	MaxAgentLlmCallsPerHour *int64 `json:"max_agent_llm_calls_per_hour,omitempty"`

	// MaxAgentToolCallsPerMinute Maximum tool calls per agent per minute. 0 = unlimited.
	MaxAgentToolCallsPerMinute *int64 `json:"max_agent_tool_calls_per_minute,omitempty"`
}

RateLimitConfig Rate limit configuration returned by GET /api/v1/security/rate-limits and accepted by PUT /api/v1/security/rate-limits.

type RateLimitFrame

type RateLimitFrame struct {
	AgentId           *string `json:"agent_id,omitempty"`
	PolicyRule        string  `json:"policy_rule"`
	Resource          string  `json:"resource"`
	RetryAfterSeconds float64 `json:"retry_after_seconds"`
	Scope             string  `json:"scope"`
	SessionId         string  `json:"session_id"`
	Tool              *string `json:"tool,omitempty"`
	Type              string  `json:"type"`
}

RateLimitFrame — Server → client rate limit applied (SEC-26).

func FixtureRateLimitFrame_Populated

func FixtureRateLimitFrame_Populated() RateLimitFrame

func FixtureRateLimitFrame_ZeroValue

func FixtureRateLimitFrame_ZeroValue() RateLimitFrame

type RateLimitsResponse

type RateLimitsResponse struct {
	// DailyCostCap Configured daily cost cap in USD. 0 means unlimited.
	DailyCostCap float64 `json:"daily_cost_cap"`

	// DailyCostUsd Live daily LLM cost accumulated so far today.
	DailyCostUsd float64 `json:"daily_cost_usd"`
	Enabled      bool    `json:"enabled"`

	// MaxAgentLlmCallsPerHour Maximum LLM calls per hour across all agents. 0 means unlimited.
	MaxAgentLlmCallsPerHour int64 `json:"max_agent_llm_calls_per_hour"`

	// MaxAgentToolCallsPerMinute Maximum tool calls per minute across all agents. 0 means unlimited.
	MaxAgentToolCallsPerMinute int64 `json:"max_agent_tool_calls_per_minute"`
}

RateLimitsResponse Response from GET /api/v1/security/rate-limits. Returns the current rate-limit configuration and the live daily LLM cost.

func FixtureRateLimitsResponse_Edge

func FixtureRateLimitsResponse_Edge() RateLimitsResponse

func FixtureRateLimitsResponse_Populated

func FixtureRateLimitsResponse_Populated() RateLimitsResponse

func FixtureRateLimitsResponse_ZeroValue

func FixtureRateLimitsResponse_ZeroValue() RateLimitsResponse

type RateLimitsUpdateRequest

type RateLimitsUpdateRequest struct {
	// DailyCostCapUsd Daily cost cap in USD. 0 = unlimited.
	DailyCostCapUsd *float64 `json:"daily_cost_cap_usd,omitempty"`

	// MaxAgentLlmCallsPerHour Maximum LLM calls per hour. 0 = unlimited.
	MaxAgentLlmCallsPerHour *int64 `json:"max_agent_llm_calls_per_hour,omitempty"`

	// MaxAgentToolCallsPerMinute Maximum tool calls per minute. 0 = unlimited.
	MaxAgentToolCallsPerMinute *int64 `json:"max_agent_tool_calls_per_minute,omitempty"`
}

RateLimitsUpdateRequest Request body for PUT /api/v1/security/rate-limits. Partial update — any subset of the three cap fields. Strict type validation rejects JSON strings in numeric fields, floats in integer fields, negative values, NaN/Inf, and overflow. Changes are hot-reloaded.

func FixtureRateLimitsUpdateRequest_Edge

func FixtureRateLimitsUpdateRequest_Edge() RateLimitsUpdateRequest

func FixtureRateLimitsUpdateRequest_Populated

func FixtureRateLimitsUpdateRequest_Populated() RateLimitsUpdateRequest

func FixtureRateLimitsUpdateRequest_ZeroValue

func FixtureRateLimitsUpdateRequest_ZeroValue() RateLimitsUpdateRequest

type RateLimitsUpdateResponse

type RateLimitsUpdateResponse struct {
	// Applied The effective configuration after the update. Present only when hot-reload succeeded.
	Applied *struct {
		// DailyCostCapUsd Applied daily cost cap in USD.
		DailyCostCapUsd *float64 `json:"daily_cost_cap_usd,omitempty"`

		// MaxAgentLlmCallsPerHour Applied LLM calls per hour limit.
		MaxAgentLlmCallsPerHour *int64 `json:"max_agent_llm_calls_per_hour,omitempty"`

		// MaxAgentToolCallsPerMinute Applied tool calls per minute limit.
		MaxAgentToolCallsPerMinute *int64 `json:"max_agent_tool_calls_per_minute,omitempty"`
	} `json:"applied,omitempty"`

	// RequiresRestart Always false for rate limits — they are hot-reloaded. Set to true when hot-reload failed (warning will be present).
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`

	// Warning Present when hot-reload failed — config is saved but restart is required.
	Warning *string `json:"warning,omitempty"`
}

RateLimitsUpdateResponse Response from PUT /api/v1/security/rate-limits. Returns save status and the applied configuration.

func FixtureRateLimitsUpdateResponse_Edge

func FixtureRateLimitsUpdateResponse_Edge() RateLimitsUpdateResponse

func FixtureRateLimitsUpdateResponse_Populated

func FixtureRateLimitsUpdateResponse_Populated() RateLimitsUpdateResponse

func FixtureRateLimitsUpdateResponse_ZeroValue

func FixtureRateLimitsUpdateResponse_ZeroValue() RateLimitsUpdateResponse

type RegisterAdminJSONRequestBody

type RegisterAdminJSONRequestBody = RegisterAdminRequest

RegisterAdminJSONRequestBody defines body for RegisterAdmin for application/json ContentType.

type RegisterAdminRequest

type RegisterAdminRequest struct {
	// Password Password for the new admin account. Minimum 8 characters, maximum 72 (bcrypt limit).
	Password string `json:"password"`

	// Username Must start with an alphanumeric character and contain only letters, digits, dots, dashes, and underscores. Length 2-63 characters.
	Username string `json:"username"`
}

RegisterAdminRequest Body for POST /auth/register-admin. Creates the first admin user (fails 409 if one already exists).

type RenameSessionJSONRequestBody

type RenameSessionJSONRequestBody = SessionRenameRequest

RenameSessionJSONRequestBody defines body for RenameSession for application/json ContentType.

type ReplayMessageFrame

type ReplayMessageFrame struct {
	AgentId   *string `json:"agent_id,omitempty"`
	Content   string  `json:"content"`
	Id        *string `json:"id,omitempty"`
	Role      string  `json:"role"`
	SessionId string  `json:"session_id"`
	Timestamp *string `json:"timestamp,omitempty"`
	Type      string  `json:"type"`
}

ReplayMessageFrame — Server → client replayed transcript entry.

func FixtureReplayMessageFrame_Populated

func FixtureReplayMessageFrame_Populated() ReplayMessageFrame

func FixtureReplayMessageFrame_ZeroValue

func FixtureReplayMessageFrame_ZeroValue() ReplayMessageFrame

type ReplayWarningFrame

type ReplayWarningFrame struct {
	Message   string              `json:"message"`
	SessionId string              `json:"session_id"`
	Stats     *ReplayWarningStats `json:"stats,omitempty"`
	Type      string              `json:"type"`
}

ReplayWarningFrame — Server → client duplicate tool_call_ids detected.

func FixtureReplayWarningFrame_Populated

func FixtureReplayWarningFrame_Populated() ReplayWarningFrame

func FixtureReplayWarningFrame_ZeroValue

func FixtureReplayWarningFrame_ZeroValue() ReplayWarningFrame

type ReplayWarningStats

type ReplayWarningStats struct {
	DuplicateToolCallIdCount *int `json:"duplicate_tool_call_id_count,omitempty"`
}

ReplayWarningStats — Diagnostic counters in a ReplayWarningFrame.

type ResetUserPasswordJSONRequestBody

type ResetUserPasswordJSONRequestBody = UserResetPasswordRequest

ResetUserPasswordJSONRequestBody defines body for ResetUserPassword for application/json ContentType.

type RestoreBackup200JSONResponseBodyStatus

type RestoreBackup200JSONResponseBodyStatus string

RestoreBackup200JSONResponseBodyStatus defines parameters for RestoreBackup.

const (
	Restored RestoreBackup200JSONResponseBodyStatus = "restored"
)

Defines values for RestoreBackup200JSONResponseBodyStatus.

func (RestoreBackup200JSONResponseBodyStatus) Valid

Valid indicates whether the value is a known member of the RestoreBackup200JSONResponseBodyStatus enum.

type RestoreBackupJSONRequestBody

type RestoreBackupJSONRequestBody = RestoreBackupRequest

RestoreBackupJSONRequestBody defines body for RestoreBackup for application/json ContentType.

type RestoreBackupRequest

type RestoreBackupRequest struct {
	// Filename Name of the backup file (without path). Must not contain path separators or traversal sequences. Must end with .tar.gz.
	Filename string `json:"filename"`
}

RestoreBackupRequest Request body for POST /api/v1/restore. Extracts a backup tar.gz archive over ~/.omnipus/, skipping config.json to preserve current settings.

type RetentionConfig

type RetentionConfig struct {
	// Disabled When true, retention sweeps are disabled and session logs are kept forever.
	Disabled *bool `json:"disabled,omitempty"`

	// SessionDays Number of days to retain session logs. 0 means use the system default (90 days). Only present when a custom retention period is set.
	SessionDays *int `json:"session_days,omitempty"`
}

RetentionConfig Session log retention configuration returned by GET /api/v1/security/retention.

type RetentionSweepResult

type RetentionSweepResult struct {
	// Removed Number of session directories removed during the sweep.
	Removed int `json:"removed"`

	// SkippedReason Present when the sweep was skipped without removing anything. Currently only "disabled" (retention is configured as disabled).
	SkippedReason *string `json:"skipped_reason,omitempty"`
}

RetentionSweepResult Result of a POST /api/v1/security/retention/sweep on-demand sweep operation.

type RetentionUpdateRequest

type RetentionUpdateRequest struct {
	// Disabled When true, retention sweeps are disabled and session logs are kept forever. Strings ("true"/"false") and numbers are rejected with 400.
	Disabled *bool `json:"disabled,omitempty"`

	// SessionDays Number of days to retain session logs. 0 means use the system default (90 days). Floats and strings are rejected with 400.
	SessionDays *int `json:"session_days,omitempty"`
}

RetentionUpdateRequest Request body for PUT /api/v1/security/retention. Partial update — any subset of the two retention fields. Strict type validation rejects JSON strings for session_days, floats with fractional parts for session_days, and non-boolean values for disabled. An empty body {} is accepted as a no-op.

type RetentionUpdateResponse

type RetentionUpdateResponse struct {
	// Disabled When true, retention sweeps are disabled and session logs are kept forever.
	Disabled bool `json:"disabled"`

	// RequiresRestart Always false — retention config is hot-reloaded.
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`

	// SessionDays Number of days to retain session logs. 0 = system default (90 days).
	SessionDays int `json:"session_days"`
}

RetentionUpdateResponse Response from PUT /api/v1/security/retention. Returns save status and the currently active retention settings.

func FixtureRetentionUpdateResponse_Edge

func FixtureRetentionUpdateResponse_Edge() RetentionUpdateResponse

func FixtureRetentionUpdateResponse_Populated

func FixtureRetentionUpdateResponse_Populated() RetentionUpdateResponse

func FixtureRetentionUpdateResponse_ZeroValue

func FixtureRetentionUpdateResponse_ZeroValue() RetentionUpdateResponse

type RotateTokenResponse

type RotateTokenResponse struct {
	// Token Canonical opaque bearer token format used by Omnipus. The prefix "omnipus_" (8 characters) followed by 64 lowercase hex characters (32 random bytes), giving a total length of 72 characters. Used in Authorization headers, WS AuthFrame, and rotate-token responses.
	Token string `json:"token"`
}

RotateTokenResponse Response from POST /api/v1/config/gateway/rotate-token. Returns the newly generated bearer token. The caller must immediately update any stored token references — the previous token is no longer valid once the gateway processes the next request with the new token active.

type SandboxConfig

type SandboxConfig struct {
	// AllowNetworkOutbound Whether outbound network access is permitted from the sandbox.
	AllowNetworkOutbound *bool `json:"allow_network_outbound,omitempty"`

	// AllowedPaths File system paths the sandboxed process may access. Empty array means use only default allowed paths.
	AllowedPaths *[]string `json:"allowed_paths,omitempty"`

	// AppliedMode The mode the gateway is currently enforcing. Differs from `mode` when the operator saved a change but has not restarted yet.
	AppliedMode *string `json:"applied_mode,omitempty"`

	// DefaultProfile Global fallback sandbox profile applied to new custom agents that do not pick their own profile. Empty string means use hardcoded default.
	DefaultProfile *SandboxConfigDefaultProfile `json:"default_profile,omitempty"`

	// Mode Configured sandbox enforcement mode.
	Mode *SandboxConfigMode `json:"mode,omitempty"`

	// RequiresRestart Present in PUT responses. True when the change requires a gateway restart to take effect (mode, allowed_paths, default_profile).
	RequiresRestart *bool `json:"requires_restart,omitempty"`

	// Saved Present in PUT responses. Always true on success.
	Saved *bool `json:"saved,omitempty"`

	// ShellDenyPatterns Global fallback shell command deny-list (regex entries). Per-agent custom patterns extend this list.
	ShellDenyPatterns *[]string `json:"shell_deny_patterns,omitempty"`

	// Ssrf Nested SSRF config block for backward-compatible clients.
	Ssrf *struct {
		AllowInternal *[]string `json:"allow_internal,omitempty"`
		Enabled       *bool     `json:"enabled,omitempty"`
	} `json:"ssrf,omitempty"`

	// SsrfAllowInternal IP addresses, hostnames, or CIDR ranges that are allowed to receive outbound requests even when SSRF protection is enabled. Empty array means block all internal addresses.
	SsrfAllowInternal *[]string `json:"ssrf_allow_internal,omitempty"`

	// SsrfEnabled Whether SSRF (server-side request forgery) protection is active.
	SsrfEnabled *bool `json:"ssrf_enabled,omitempty"`
}

SandboxConfig Sandbox configuration returned by GET /api/v1/security/sandbox-config and as part of PUT /api/v1/security/sandbox-config responses.

type SandboxConfigDefaultProfile

type SandboxConfigDefaultProfile string

SandboxConfigDefaultProfile Global fallback sandbox profile applied to new custom agents that do not pick their own profile. Empty string means use hardcoded default.

const (
	SandboxConfigDefaultProfileEmpty        SandboxConfigDefaultProfile = ""
	SandboxConfigDefaultProfileHost         SandboxConfigDefaultProfile = "host"
	SandboxConfigDefaultProfileNone         SandboxConfigDefaultProfile = "none"
	SandboxConfigDefaultProfileOff          SandboxConfigDefaultProfile = "off"
	SandboxConfigDefaultProfileWorkspace    SandboxConfigDefaultProfile = "workspace"
	SandboxConfigDefaultProfileWorkspaceNet SandboxConfigDefaultProfile = "workspace+net"
)

Defines values for SandboxConfigDefaultProfile.

func (SandboxConfigDefaultProfile) Valid

Valid indicates whether the value is a known member of the SandboxConfigDefaultProfile enum.

type SandboxConfigMode

type SandboxConfigMode string

SandboxConfigMode Configured sandbox enforcement mode.

const (
	SandboxConfigModeEnforce    SandboxConfigMode = "enforce"
	SandboxConfigModeOff        SandboxConfigMode = "off"
	SandboxConfigModePermissive SandboxConfigMode = "permissive"
)

Defines values for SandboxConfigMode.

func (SandboxConfigMode) Valid

func (e SandboxConfigMode) Valid() bool

Valid indicates whether the value is a known member of the SandboxConfigMode enum.

type SandboxConfigUpdate

type SandboxConfigUpdate struct {
	// AllowNetworkOutbound Allow agent tool calls to make outbound network connections.
	AllowNetworkOutbound *bool `json:"allow_network_outbound,omitempty"`

	// AllowedPaths List of host filesystem paths the agent is allowed to read/write. Restart-gated. Must be absolute paths; empty list clears all exceptions.
	AllowedPaths *[]string `json:"allowed_paths,omitempty"`

	// DefaultProfile Default sandbox profile applied to new custom agents that do not pick their own profile. Restart-gated. Empty string means "inherit global default".
	DefaultProfile *SandboxConfigUpdateDefaultProfile `json:"default_profile,omitempty"`

	// Mode Kernel sandbox enforcement mode. "off" = no kernel enforcement (god-mode). "permissive" = log violations but allow. "enforce" = block violations. Restart-gated.
	Mode *SandboxConfigUpdateMode `json:"mode,omitempty"`

	// ShellDenyPatterns Global fallback list of Go regexp patterns to block in shell commands. Per-agent custom_deny_patterns extend this list. Hot-reloaded.
	ShellDenyPatterns *[]string `json:"shell_deny_patterns,omitempty"`

	// Ssrf Nested SSRF configuration sub-object. Flat fields take precedence.
	Ssrf *struct {
		// AllowInternal CIDR ranges or IP addresses the agent may reach despite SSRF blocking.
		AllowInternal *[]string `json:"allow_internal,omitempty"`
	} `json:"ssrf,omitempty"`

	// SsrfAllowInternal Flat version of ssrf.allow_internal. Takes precedence when both are present. CIDR ranges or IP addresses the agent may reach despite SSRF blocking.
	SsrfAllowInternal *[]string `json:"ssrf_allow_internal,omitempty"`

	// SsrfEnabled Enable SSRF (server-side request forgery) protection for HTTP tool calls.
	SsrfEnabled *bool `json:"ssrf_enabled,omitempty"`
}

SandboxConfigUpdate Partial-update body for PUT /security/sandbox-config. All fields are optional — only fields present in the request are updated. At least one field must be supplied (the server returns 400 otherwise). Flat fields take precedence over nested equivalents when both are present in the same request body. mode, allowed_paths, and default_profile are restart-gated (the response includes requires_restart=true when any of these change). ssrf.allow_internal and shell_deny_patterns are hot-reloaded.

type SandboxConfigUpdateDefaultProfile

type SandboxConfigUpdateDefaultProfile string

SandboxConfigUpdateDefaultProfile Default sandbox profile applied to new custom agents that do not pick their own profile. Restart-gated. Empty string means "inherit global default".

const (
	SandboxConfigUpdateDefaultProfileEmpty        SandboxConfigUpdateDefaultProfile = ""
	SandboxConfigUpdateDefaultProfileHost         SandboxConfigUpdateDefaultProfile = "host"
	SandboxConfigUpdateDefaultProfileNone         SandboxConfigUpdateDefaultProfile = "none"
	SandboxConfigUpdateDefaultProfileOff          SandboxConfigUpdateDefaultProfile = "off"
	SandboxConfigUpdateDefaultProfileWorkspace    SandboxConfigUpdateDefaultProfile = "workspace"
	SandboxConfigUpdateDefaultProfileWorkspaceNet SandboxConfigUpdateDefaultProfile = "workspace+net"
)

Defines values for SandboxConfigUpdateDefaultProfile.

func (SandboxConfigUpdateDefaultProfile) Valid

Valid indicates whether the value is a known member of the SandboxConfigUpdateDefaultProfile enum.

type SandboxConfigUpdateMode

type SandboxConfigUpdateMode string

SandboxConfigUpdateMode Kernel sandbox enforcement mode. "off" = no kernel enforcement (god-mode). "permissive" = log violations but allow. "enforce" = block violations. Restart-gated.

const (
	SandboxConfigUpdateModeEnforce    SandboxConfigUpdateMode = "enforce"
	SandboxConfigUpdateModeOff        SandboxConfigUpdateMode = "off"
	SandboxConfigUpdateModePermissive SandboxConfigUpdateMode = "permissive"
)

Defines values for SandboxConfigUpdateMode.

func (SandboxConfigUpdateMode) Valid

func (e SandboxConfigUpdateMode) Valid() bool

Valid indicates whether the value is a known member of the SandboxConfigUpdateMode enum.

type SandboxStatus

type SandboxStatus struct {
	// AbiVersion Landlock ABI version. Present on Linux with Landlock support.
	AbiVersion *int `json:"abi_version,omitempty"`

	// AuditOnly True when the sandbox is in permissive (audit-only) mode — policy violations are logged but not blocked.
	AuditOnly *bool `json:"audit_only,omitempty"`

	// Available Whether the backend is available on this platform.
	Available bool `json:"available"`

	// Backend Name of the active sandbox backend.
	Backend string `json:"backend"`

	// BindPortsCount Number of bind-port allow-list rules installed by the kernel. Zero on FallbackBackend, Mode=Off, or Landlock ABI < 4.
	BindPortsCount int `json:"bind_ports_count"`

	// BlockedSyscalls List of syscall names blocked by seccomp (when active).
	BlockedSyscalls *[]string `json:"blocked_syscalls,omitempty"`

	// DisabledBy Reason the sandbox is disabled, if applicable. E.g. "config" or "kernel".
	DisabledBy *string `json:"disabled_by,omitempty"`

	// IssueRef Set when a known kernel incompatibility is flagged. Do NOT hard-code the literal issue number in the SPA.
	IssueRef *string `json:"issue_ref,omitempty"`

	// KernelLevel Whether the backend can enforce at the kernel level. True for Landlock on Linux 5.13+. False for the fallback (app-level) backend.
	KernelLevel bool `json:"kernel_level"`

	// LandlockEnforced Whether Landlock file-system access rules are enforced.
	LandlockEnforced *bool `json:"landlock_enforced,omitempty"`

	// LandlockFeatures Landlock feature flags active on this kernel.
	LandlockFeatures *[]string `json:"landlock_features,omitempty"`

	// Mode Current sandbox enforcement mode (from ApplyState).
	Mode *string `json:"mode,omitempty"`

	// Notes Human-readable notes about the sandbox state or limitations.
	Notes *[]string `json:"notes,omitempty"`

	// PolicyApplied Whether kernel-level enforcement is actually live on this process. A kernel-capable backend may not have policy applied if Apply() was not called yet (e.g. sandbox mode is off).
	PolicyApplied bool `json:"policy_applied"`

	// SeccompEnabled Whether seccomp BPF filtering is currently active.
	SeccompEnabled bool `json:"seccomp_enabled"`

	// SeccompEnforced Whether seccomp syscall filtering is enforced.
	SeccompEnforced *bool `json:"seccomp_enforced,omitempty"`
}

SandboxStatus Runtime sandbox backend status returned by GET /api/v1/security/sandbox-status.

type Schedule

type Schedule struct {
	// Channel Channel for deliver=true sends and the run's outbound context.
	Channel *string `json:"channel,omitempty"`

	// ChatId Chat/peer id within the channel for deliver=true sends.
	ChatId      *string `json:"chat_id,omitempty"`
	CreatedAtMs int64   `json:"created_at_ms"`

	// CreatedBy Username that created the schedule (for notification routing).
	CreatedBy *string `json:"created_by,omitempty"`

	// Deliver true = send the message straight to the channel (no agent turn); false = the owning agent processes it (autonomy).
	Deliver bool `json:"deliver"`

	// Enabled When false, the scheduler does not fire it (paused).
	Enabled bool `json:"enabled"`

	// Id Stable schedule id (the underlying cron job id).
	Id string `json:"id"`

	// Message The instruction delivered to the agent (deliver=false) or sent to the channel (deliver=true).
	Message string `json:"message"`
	Name    string `json:"name"`

	// OwnerAgentId The agent that runs this schedule. Pinned; never falls back to the default agent.
	OwnerAgentId string `json:"owner_agent_id"`

	// Runs The most recent runs (newest first), capped at 20.
	Runs *[]struct {
		// DurationMs Wall-clock duration of the run in milliseconds.
		DurationMs *int64 `json:"duration_ms,omitempty"`

		// Error Failure reason when status is error or timeout.
		Error *string `json:"error,omitempty"`

		// RanAtMs Unix epoch milliseconds when the run started.
		RanAtMs int64 `json:"ran_at_ms"`

		// SessionId The scheduled session this run executed in (links to the transcript).
		SessionId *string `json:"session_id,omitempty"`

		// Status ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.
		Status ScheduleRunsStatus `json:"status"`
	} `json:"runs,omitempty"`

	// SessionId For continue/main modes, the persistent session id this schedule runs in.
	SessionId *string `json:"session_id,omitempty"`

	// SessionMode isolated=fresh scheduled session per run; continue=persistent per-schedule session; main=owner's reserved main session.
	SessionMode ScheduleSessionMode `json:"session_mode"`

	// State Runtime state of a schedule (#264). All fields are server-maintained.
	State struct {
		// ConsecutiveFailures Number of consecutive failed runs; resets to 0 after a success.
		ConsecutiveFailures *int `json:"consecutive_failures,omitempty"`

		// LastError Error from the most recent failed run.
		LastError *string `json:"last_error,omitempty"`

		// LastRunAtMs Unix epoch milliseconds of the most recent run.
		LastRunAtMs *int64 `json:"last_run_at_ms,omitempty"`

		// LastStatus Status of the most recent run (ok/error/skipped/timeout), empty if never run.
		LastStatus *string `json:"last_status,omitempty"`

		// NextRunAtMs Unix epoch milliseconds of the next computed run, if enabled.
		NextRunAtMs *int64 `json:"next_run_at_ms,omitempty"`

		// Running True while a run of this schedule is currently in progress (overlap guard).
		Running *bool `json:"running,omitempty"`
	} `json:"state"`

	// TimeoutSeconds Per-run deadline in seconds; 0 means use the global schedules.run_timeout_seconds default.
	TimeoutSeconds int `json:"timeout_seconds"`

	// Trigger When a schedule fires (#264). Exactly one of cron_expr / every_ms / at_ms is meaningful, selected by kind: cron (cron expression), every (fixed interval), at (one-shot at a unix-ms instant).
	Trigger struct {
		// AtMs Unix epoch milliseconds for a one-shot run. Required when kind=at.
		AtMs *int64 `json:"at_ms,omitempty"`

		// CronExpr Cron expression (5/6 fields). Required when kind=cron.
		CronExpr *string `json:"cron_expr,omitempty"`

		// EveryMs Interval in milliseconds. Required when kind=every.
		EveryMs *int64              `json:"every_ms,omitempty"`
		Kind    ScheduleTriggerKind `json:"kind"`
	} `json:"trigger"`
	UpdatedAtMs int64 `json:"updated_at_ms"`
}

Schedule A scheduled instruction for an agent (#264) — the wire projection of a cron job. When it fires, the owning agent runs the message in the chosen session mode under guardrails. Read model returned by the /schedules endpoints.

type ScheduleCreate

type ScheduleCreate struct {
	Channel *string `json:"channel,omitempty"`
	ChatId  *string `json:"chat_id,omitempty"`

	// Deliver Default false (agent processes it).
	Deliver *bool `json:"deliver,omitempty"`

	// Enabled Default true.
	Enabled      *bool  `json:"enabled,omitempty"`
	Message      string `json:"message"`
	Name         string `json:"name"`
	OwnerAgentId string `json:"owner_agent_id"`

	// SessionMode Default isolated.
	SessionMode *ScheduleCreateSessionMode `json:"session_mode,omitempty"`

	// TimeoutSeconds Per-run deadline; default 0 = use the global default.
	TimeoutSeconds *int `json:"timeout_seconds,omitempty"`

	// Trigger When a schedule fires (#264). Exactly one of cron_expr / every_ms / at_ms is meaningful, selected by kind: cron (cron expression), every (fixed interval), at (one-shot at a unix-ms instant).
	Trigger struct {
		// AtMs Unix epoch milliseconds for a one-shot run. Required when kind=at.
		AtMs *int64 `json:"at_ms,omitempty"`

		// CronExpr Cron expression (5/6 fields). Required when kind=cron.
		CronExpr *string `json:"cron_expr,omitempty"`

		// EveryMs Interval in milliseconds. Required when kind=every.
		EveryMs *int64                    `json:"every_ms,omitempty"`
		Kind    ScheduleCreateTriggerKind `json:"kind"`
	} `json:"trigger"`
}

ScheduleCreate Request body to create a schedule (#264). The owner must be an agent the caller is permitted to use (AuthorizeAgentAccess). Omitted optional fields take their documented defaults.

type ScheduleCreateSessionMode

type ScheduleCreateSessionMode string

ScheduleCreateSessionMode Default isolated.

const (
	ScheduleCreateSessionModeContinue ScheduleCreateSessionMode = "continue"
	ScheduleCreateSessionModeIsolated ScheduleCreateSessionMode = "isolated"
	ScheduleCreateSessionModeMain     ScheduleCreateSessionMode = "main"
)

Defines values for ScheduleCreateSessionMode.

func (ScheduleCreateSessionMode) Valid

func (e ScheduleCreateSessionMode) Valid() bool

Valid indicates whether the value is a known member of the ScheduleCreateSessionMode enum.

type ScheduleCreateTriggerKind

type ScheduleCreateTriggerKind string

ScheduleCreateTriggerKind defines model for ScheduleCreate.Trigger.Kind.

const (
	ScheduleCreateTriggerKindAt    ScheduleCreateTriggerKind = "at"
	ScheduleCreateTriggerKindCron  ScheduleCreateTriggerKind = "cron"
	ScheduleCreateTriggerKindEvery ScheduleCreateTriggerKind = "every"
)

Defines values for ScheduleCreateTriggerKind.

func (ScheduleCreateTriggerKind) Valid

func (e ScheduleCreateTriggerKind) Valid() bool

Valid indicates whether the value is a known member of the ScheduleCreateTriggerKind enum.

type ScheduleList

type ScheduleList struct {
	Schedules []struct {
		// Channel Channel for deliver=true sends and the run's outbound context.
		Channel *string `json:"channel,omitempty"`

		// ChatId Chat/peer id within the channel for deliver=true sends.
		ChatId      *string `json:"chat_id,omitempty"`
		CreatedAtMs int64   `json:"created_at_ms"`

		// CreatedBy Username that created the schedule (for notification routing).
		CreatedBy *string `json:"created_by,omitempty"`

		// Deliver true = send the message straight to the channel (no agent turn); false = the owning agent processes it (autonomy).
		Deliver bool `json:"deliver"`

		// Enabled When false, the scheduler does not fire it (paused).
		Enabled bool `json:"enabled"`

		// Id Stable schedule id (the underlying cron job id).
		Id string `json:"id"`

		// Message The instruction delivered to the agent (deliver=false) or sent to the channel (deliver=true).
		Message string `json:"message"`
		Name    string `json:"name"`

		// OwnerAgentId The agent that runs this schedule. Pinned; never falls back to the default agent.
		OwnerAgentId string `json:"owner_agent_id"`

		// Runs The most recent runs (newest first), capped at 20.
		Runs *[]struct {
			// DurationMs Wall-clock duration of the run in milliseconds.
			DurationMs *int64 `json:"duration_ms,omitempty"`

			// Error Failure reason when status is error or timeout.
			Error *string `json:"error,omitempty"`

			// RanAtMs Unix epoch milliseconds when the run started.
			RanAtMs int64 `json:"ran_at_ms"`

			// SessionId The scheduled session this run executed in (links to the transcript).
			SessionId *string `json:"session_id,omitempty"`

			// Status ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.
			Status ScheduleListSchedulesRunsStatus `json:"status"`
		} `json:"runs,omitempty"`

		// SessionId For continue/main modes, the persistent session id this schedule runs in.
		SessionId *string `json:"session_id,omitempty"`

		// SessionMode isolated=fresh scheduled session per run; continue=persistent per-schedule session; main=owner's reserved main session.
		SessionMode ScheduleListSchedulesSessionMode `json:"session_mode"`

		// State Runtime state of a schedule (#264). All fields are server-maintained.
		State struct {
			// ConsecutiveFailures Number of consecutive failed runs; resets to 0 after a success.
			ConsecutiveFailures *int `json:"consecutive_failures,omitempty"`

			// LastError Error from the most recent failed run.
			LastError *string `json:"last_error,omitempty"`

			// LastRunAtMs Unix epoch milliseconds of the most recent run.
			LastRunAtMs *int64 `json:"last_run_at_ms,omitempty"`

			// LastStatus Status of the most recent run (ok/error/skipped/timeout), empty if never run.
			LastStatus *string `json:"last_status,omitempty"`

			// NextRunAtMs Unix epoch milliseconds of the next computed run, if enabled.
			NextRunAtMs *int64 `json:"next_run_at_ms,omitempty"`

			// Running True while a run of this schedule is currently in progress (overlap guard).
			Running *bool `json:"running,omitempty"`
		} `json:"state"`

		// TimeoutSeconds Per-run deadline in seconds; 0 means use the global schedules.run_timeout_seconds default.
		TimeoutSeconds int `json:"timeout_seconds"`

		// Trigger When a schedule fires (#264). Exactly one of cron_expr / every_ms / at_ms is meaningful, selected by kind: cron (cron expression), every (fixed interval), at (one-shot at a unix-ms instant).
		Trigger struct {
			// AtMs Unix epoch milliseconds for a one-shot run. Required when kind=at.
			AtMs *int64 `json:"at_ms,omitempty"`

			// CronExpr Cron expression (5/6 fields). Required when kind=cron.
			CronExpr *string `json:"cron_expr,omitempty"`

			// EveryMs Interval in milliseconds. Required when kind=every.
			EveryMs *int64                           `json:"every_ms,omitempty"`
			Kind    ScheduleListSchedulesTriggerKind `json:"kind"`
		} `json:"trigger"`
		UpdatedAtMs int64 `json:"updated_at_ms"`
	} `json:"schedules"`
}

ScheduleList List of schedules (#264).

type ScheduleListSchedulesRunsStatus

type ScheduleListSchedulesRunsStatus string

ScheduleListSchedulesRunsStatus ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.

const (
	ScheduleListSchedulesRunsStatusError   ScheduleListSchedulesRunsStatus = "error"
	ScheduleListSchedulesRunsStatusOk      ScheduleListSchedulesRunsStatus = "ok"
	ScheduleListSchedulesRunsStatusSkipped ScheduleListSchedulesRunsStatus = "skipped"
	ScheduleListSchedulesRunsStatusTimeout ScheduleListSchedulesRunsStatus = "timeout"
)

Defines values for ScheduleListSchedulesRunsStatus.

func (ScheduleListSchedulesRunsStatus) Valid

Valid indicates whether the value is a known member of the ScheduleListSchedulesRunsStatus enum.

type ScheduleListSchedulesSessionMode

type ScheduleListSchedulesSessionMode string

ScheduleListSchedulesSessionMode isolated=fresh scheduled session per run; continue=persistent per-schedule session; main=owner's reserved main session.

const (
	ScheduleListSchedulesSessionModeContinue ScheduleListSchedulesSessionMode = "continue"
	ScheduleListSchedulesSessionModeIsolated ScheduleListSchedulesSessionMode = "isolated"
	ScheduleListSchedulesSessionModeMain     ScheduleListSchedulesSessionMode = "main"
)

Defines values for ScheduleListSchedulesSessionMode.

func (ScheduleListSchedulesSessionMode) Valid

Valid indicates whether the value is a known member of the ScheduleListSchedulesSessionMode enum.

type ScheduleListSchedulesTriggerKind

type ScheduleListSchedulesTriggerKind string

ScheduleListSchedulesTriggerKind defines model for ScheduleList.Schedules.Trigger.Kind.

const (
	ScheduleListSchedulesTriggerKindAt    ScheduleListSchedulesTriggerKind = "at"
	ScheduleListSchedulesTriggerKindCron  ScheduleListSchedulesTriggerKind = "cron"
	ScheduleListSchedulesTriggerKindEvery ScheduleListSchedulesTriggerKind = "every"
)

Defines values for ScheduleListSchedulesTriggerKind.

func (ScheduleListSchedulesTriggerKind) Valid

Valid indicates whether the value is a known member of the ScheduleListSchedulesTriggerKind enum.

type ScheduleRunRecord

type ScheduleRunRecord struct {
	// DurationMs Wall-clock duration of the run in milliseconds.
	DurationMs *int64 `json:"duration_ms,omitempty"`

	// Error Failure reason when status is error or timeout.
	Error *string `json:"error,omitempty"`

	// RanAtMs Unix epoch milliseconds when the run started.
	RanAtMs int64 `json:"ran_at_ms"`

	// SessionId The scheduled session this run executed in (links to the transcript).
	SessionId *string `json:"session_id,omitempty"`

	// Status ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.
	Status ScheduleRunRecordStatus `json:"status"`
}

ScheduleRunRecord One execution of a schedule (#264). The last 20 are retained inline on a Schedule; full history is reachable via the linked session_id.

type ScheduleRunRecordStatus

type ScheduleRunRecordStatus string

ScheduleRunRecordStatus ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.

const (
	ScheduleRunRecordStatusError   ScheduleRunRecordStatus = "error"
	ScheduleRunRecordStatusOk      ScheduleRunRecordStatus = "ok"
	ScheduleRunRecordStatusSkipped ScheduleRunRecordStatus = "skipped"
	ScheduleRunRecordStatusTimeout ScheduleRunRecordStatus = "timeout"
)

Defines values for ScheduleRunRecordStatus.

func (ScheduleRunRecordStatus) Valid

func (e ScheduleRunRecordStatus) Valid() bool

Valid indicates whether the value is a known member of the ScheduleRunRecordStatus enum.

type ScheduleRunResult

type ScheduleRunResult struct {
	Error      *string `json:"error,omitempty"`
	ScheduleId string  `json:"schedule_id"`

	// SessionId The session the run executed in, when one was created.
	SessionId *string `json:"session_id,omitempty"`

	// Status skipped when the schedule's previous run is still in progress or the lane is full.
	Status ScheduleRunResultStatus `json:"status"`
}

ScheduleRunResult Result of a run-now request (#264).

type ScheduleRunResultStatus

type ScheduleRunResultStatus string

ScheduleRunResultStatus skipped when the schedule's previous run is still in progress or the lane is full.

const (
	ScheduleRunResultStatusError   ScheduleRunResultStatus = "error"
	ScheduleRunResultStatusOk      ScheduleRunResultStatus = "ok"
	ScheduleRunResultStatusSkipped ScheduleRunResultStatus = "skipped"
	ScheduleRunResultStatusTimeout ScheduleRunResultStatus = "timeout"
)

Defines values for ScheduleRunResultStatus.

func (ScheduleRunResultStatus) Valid

func (e ScheduleRunResultStatus) Valid() bool

Valid indicates whether the value is a known member of the ScheduleRunResultStatus enum.

type ScheduleRunsStatus

type ScheduleRunsStatus string

ScheduleRunsStatus ok=succeeded, error=failed, skipped=overlap/cap, timeout=deadline aborted.

const (
	ScheduleRunsStatusError   ScheduleRunsStatus = "error"
	ScheduleRunsStatusOk      ScheduleRunsStatus = "ok"
	ScheduleRunsStatusSkipped ScheduleRunsStatus = "skipped"
	ScheduleRunsStatusTimeout ScheduleRunsStatus = "timeout"
)

Defines values for ScheduleRunsStatus.

func (ScheduleRunsStatus) Valid

func (e ScheduleRunsStatus) Valid() bool

Valid indicates whether the value is a known member of the ScheduleRunsStatus enum.

type ScheduleSessionMode

type ScheduleSessionMode string

ScheduleSessionMode isolated=fresh scheduled session per run; continue=persistent per-schedule session; main=owner's reserved main session.

const (
	ScheduleSessionModeContinue ScheduleSessionMode = "continue"
	ScheduleSessionModeIsolated ScheduleSessionMode = "isolated"
	ScheduleSessionModeMain     ScheduleSessionMode = "main"
)

Defines values for ScheduleSessionMode.

func (ScheduleSessionMode) Valid

func (e ScheduleSessionMode) Valid() bool

Valid indicates whether the value is a known member of the ScheduleSessionMode enum.

type ScheduleState

type ScheduleState struct {
	// ConsecutiveFailures Number of consecutive failed runs; resets to 0 after a success.
	ConsecutiveFailures *int `json:"consecutive_failures,omitempty"`

	// LastError Error from the most recent failed run.
	LastError *string `json:"last_error,omitempty"`

	// LastRunAtMs Unix epoch milliseconds of the most recent run.
	LastRunAtMs *int64 `json:"last_run_at_ms,omitempty"`

	// LastStatus Status of the most recent run (ok/error/skipped/timeout), empty if never run.
	LastStatus *string `json:"last_status,omitempty"`

	// NextRunAtMs Unix epoch milliseconds of the next computed run, if enabled.
	NextRunAtMs *int64 `json:"next_run_at_ms,omitempty"`

	// Running True while a run of this schedule is currently in progress (overlap guard).
	Running *bool `json:"running,omitempty"`
}

ScheduleState Runtime state of a schedule (#264). All fields are server-maintained.

type ScheduleTrigger

type ScheduleTrigger struct {
	// AtMs Unix epoch milliseconds for a one-shot run. Required when kind=at.
	AtMs *int64 `json:"at_ms,omitempty"`

	// CronExpr Cron expression (5/6 fields). Required when kind=cron.
	CronExpr *string `json:"cron_expr,omitempty"`

	// EveryMs Interval in milliseconds. Required when kind=every.
	EveryMs *int64              `json:"every_ms,omitempty"`
	Kind    ScheduleTriggerKind `json:"kind"`
}

ScheduleTrigger When a schedule fires (#264). Exactly one of cron_expr / every_ms / at_ms is meaningful, selected by kind: cron (cron expression), every (fixed interval), at (one-shot at a unix-ms instant).

type ScheduleTriggerKind

type ScheduleTriggerKind string

ScheduleTriggerKind defines model for Schedule.Trigger.Kind.

const (
	ScheduleTriggerKindAt    ScheduleTriggerKind = "at"
	ScheduleTriggerKindCron  ScheduleTriggerKind = "cron"
	ScheduleTriggerKindEvery ScheduleTriggerKind = "every"
)

Defines values for ScheduleTriggerKind.

func (ScheduleTriggerKind) Valid

func (e ScheduleTriggerKind) Valid() bool

Valid indicates whether the value is a known member of the ScheduleTriggerKind enum.

type ScheduleUpdate

type ScheduleUpdate struct {
	Channel        *string                    `json:"channel,omitempty"`
	ChatId         *string                    `json:"chat_id,omitempty"`
	Deliver        *bool                      `json:"deliver,omitempty"`
	Enabled        *bool                      `json:"enabled,omitempty"`
	Message        *string                    `json:"message,omitempty"`
	Name           *string                    `json:"name,omitempty"`
	OwnerAgentId   *string                    `json:"owner_agent_id,omitempty"`
	SessionMode    *ScheduleUpdateSessionMode `json:"session_mode,omitempty"`
	TimeoutSeconds *int                       `json:"timeout_seconds,omitempty"`

	// Trigger When a schedule fires (#264). Exactly one of cron_expr / every_ms / at_ms is meaningful, selected by kind: cron (cron expression), every (fixed interval), at (one-shot at a unix-ms instant).
	Trigger *struct {
		// AtMs Unix epoch milliseconds for a one-shot run. Required when kind=at.
		AtMs *int64 `json:"at_ms,omitempty"`

		// CronExpr Cron expression (5/6 fields). Required when kind=cron.
		CronExpr *string `json:"cron_expr,omitempty"`

		// EveryMs Interval in milliseconds. Required when kind=every.
		EveryMs *int64                    `json:"every_ms,omitempty"`
		Kind    ScheduleUpdateTriggerKind `json:"kind"`
	} `json:"trigger,omitempty"`
}

ScheduleUpdate Request body to update a schedule (#264). All fields optional; only provided fields are changed. Changing owner_agent_id is re-authorized.

type ScheduleUpdateSessionMode

type ScheduleUpdateSessionMode string

ScheduleUpdateSessionMode defines model for ScheduleUpdate.SessionMode.

const (
	ScheduleUpdateSessionModeContinue ScheduleUpdateSessionMode = "continue"
	ScheduleUpdateSessionModeIsolated ScheduleUpdateSessionMode = "isolated"
	ScheduleUpdateSessionModeMain     ScheduleUpdateSessionMode = "main"
)

Defines values for ScheduleUpdateSessionMode.

func (ScheduleUpdateSessionMode) Valid

func (e ScheduleUpdateSessionMode) Valid() bool

Valid indicates whether the value is a known member of the ScheduleUpdateSessionMode enum.

type ScheduleUpdateTriggerKind

type ScheduleUpdateTriggerKind string

ScheduleUpdateTriggerKind defines model for ScheduleUpdate.Trigger.Kind.

const (
	ScheduleUpdateTriggerKindAt    ScheduleUpdateTriggerKind = "at"
	ScheduleUpdateTriggerKindCron  ScheduleUpdateTriggerKind = "cron"
	ScheduleUpdateTriggerKindEvery ScheduleUpdateTriggerKind = "every"
)

Defines values for ScheduleUpdateTriggerKind.

func (ScheduleUpdateTriggerKind) Valid

func (e ScheduleUpdateTriggerKind) Valid() bool

Valid indicates whether the value is a known member of the ScheduleUpdateTriggerKind enum.

type Session

type Session struct {
	// ActiveAgentId The agent ID currently handling this session (multi-agent sessions only).
	ActiveAgentId *string `json:"active_agent_id,omitempty"`

	// AgentId ID of the primary agent that owns this session.
	AgentId string `json:"agent_id"`

	// AgentIds All agent IDs that have participated in this session (multi-agent sessions). For legacy single-agent sessions this field is absent; callers should fall back to [agent_id] when agent_ids is undefined.
	AgentIds *[]string `json:"agent_ids,omitempty"`

	// Channel Channel identifier that initiated this session (e.g. "webchat", "telegram"). Always present (may be empty string for legacy sessions).
	Channel string `json:"channel"`

	// CompactionSummaries Per-agent compaction summaries (multi-agent sessions only).
	CompactionSummaries *map[string]string `json:"compaction_summaries,omitempty"`

	// CreatedAt RFC3339 timestamp when the session was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique session identifier (UUID).
	Id string `json:"id"`

	// LastCompactionSummary Summary of the last context compaction pass (present only when compaction has occurred).
	LastCompactionSummary *string `json:"last_compaction_summary,omitempty"`

	// Model LLM model name used in this session (may be empty for legacy sessions).
	Model *string `json:"model,omitempty"`

	// Partitions List of JSONL partition file names (e.g. ["2026-05-16.jsonl"]). Always present as an array (may be empty for new sessions with no messages). One partition per day, so 3650 covers ~10 years of daily partitions.
	Partitions []string `json:"partitions"`

	// ProjectId Associated project ID (optional, future v0.3 feature).
	ProjectId *string `json:"project_id,omitempty"`

	// Provider Provider identifier (e.g. "anthropic", "openai") for this session.
	Provider *string `json:"provider,omitempty"`

	// Stats Aggregated statistics for a session transcript.
	Stats struct {
		// Cost Total USD cost for this session (based on provider pricing).
		Cost float64 `json:"cost"`

		// MessageCount Number of transcript entries in this session.
		MessageCount int `json:"message_count"`

		// TokensIn Total input tokens consumed across all messages in this session.
		TokensIn int `json:"tokens_in"`

		// TokensOut Total output tokens generated across all messages in this session.
		TokensOut int `json:"tokens_out"`

		// TokensTotal Sum of tokens_in and tokens_out.
		TokensTotal int `json:"tokens_total"`

		// ToolCalls Total number of tool calls made in this session.
		ToolCalls int `json:"tool_calls"`
	} `json:"stats"`

	// Status Current lifecycle status of the session.
	Status SessionStatus `json:"status"`

	// TaskId Associated task ID when this session was created to service a task.
	TaskId *string `json:"task_id,omitempty"`

	// Title Human-readable session title. May be auto-generated or user-renamed.
	Title string `json:"title"`

	// Type Session classification. Legacy sessions without a type field are treated as "chat" by the SPA via rawToSession(). Defaults to "chat" on creation.
	Type *SessionType `json:"type,omitempty"`

	// UpdatedAt RFC3339 timestamp of the last modification to session metadata or transcript.
	UpdatedAt time.Time `json:"updated_at"`
}

Session Session metadata object (maps to session.UnifiedMeta + session.SessionMeta). Returned in list and detail endpoints. The SPA maps this through rawToSession() which reads stats.message_count, stats.tokens_total, and stats.cost.

func FixtureSession_Edge

func FixtureSession_Edge() Session

func FixtureSession_Populated

func FixtureSession_Populated() Session

func FixtureSession_ZeroValue

func FixtureSession_ZeroValue() Session

FixtureSession_ZeroValue — Go zero values. Expected: FAIL because required fields (id, agent_id, title, status, etc.) are "". Also: created_at/updated_at are time.Time{} which marshals to "0001-01-01T00:00:00Z" (technically valid RFC3339 but wrong per the "reasonable year" assertion).

type SessionCloseAckFrame

type SessionCloseAckFrame struct {
	Id        *string `json:"id,omitempty"`
	SessionId string  `json:"session_id"`
	Type      string  `json:"type"`
}

SessionCloseAckFrame — Server → client session close acknowledged.

func FixtureSessionCloseAckFrame_Populated

func FixtureSessionCloseAckFrame_Populated() SessionCloseAckFrame

func FixtureSessionCloseAckFrame_ZeroValue

func FixtureSessionCloseAckFrame_ZeroValue() SessionCloseAckFrame

type SessionCloseFrame

type SessionCloseFrame struct {
	SessionId string `json:"session_id"`
	Type      string `json:"type"`
}

SessionCloseFrame — Client → server explicit session close request.

func FixtureSessionCloseFrame_Edge

func FixtureSessionCloseFrame_Edge() SessionCloseFrame

FixtureSessionCloseFrame_Edge — long session_id (valid).

func FixtureSessionCloseFrame_Populated

func FixtureSessionCloseFrame_Populated() SessionCloseFrame

func FixtureSessionCloseFrame_ZeroValue

func FixtureSessionCloseFrame_ZeroValue() SessionCloseFrame

FixtureSessionCloseFrame_ZeroValue — Go zero values. Expected: FAIL because type="" (const: session_close), session_id="" (minLength: 1).

type SessionCreateRequest

type SessionCreateRequest struct {
	// AgentId Agent ID that will own this session. Defaults to "main" when omitted. Must reference an existing agent (400 if not found).
	AgentId *string `json:"agent_id,omitempty"`

	// Type Session type. Defaults to "chat" when omitted.
	Type *SessionCreateRequestType `json:"type,omitempty"`
}

SessionCreateRequest Body for POST /sessions. Creates a new session for an agent.

type SessionCreateRequestType

type SessionCreateRequestType string

SessionCreateRequestType Session type. Defaults to "chat" when omitted.

const (
	SessionCreateRequestTypeChannel SessionCreateRequestType = "channel"
	SessionCreateRequestTypeChat    SessionCreateRequestType = "chat"
	SessionCreateRequestTypeTask    SessionCreateRequestType = "task"
)

Defines values for SessionCreateRequestType.

func (SessionCreateRequestType) Valid

func (e SessionCreateRequestType) Valid() bool

Valid indicates whether the value is a known member of the SessionCreateRequestType enum.

type SessionDetail

type SessionDetail struct {
	// AgentRemoved True when the agent that owned this session has been deleted from the config. Used by the SPA to display a banner informing the user that the original agent no longer exists. Absent (or false) in the common case.
	AgentRemoved *bool `json:"agent_removed,omitempty"`

	// Messages Ordered list of transcript entries for this session. Capped at 100000 messages to bound response payload size.
	Messages []struct {
		// AgentId ID of the agent that produced this entry (FR-002). Always present.
		AgentId string `json:"agent_id"`

		// Attachments File attachments associated with this message.
		Attachments *[]struct {
			// MimeType MIME type of the attachment.
			MimeType string `json:"mime_type"`

			// Path Relative path within the session workspace.
			Path string `json:"path"`

			// Size File size in bytes.
			Size int64 `json:"size"`

			// Type Attachment category. Aligned with MediaPart.type enum.
			Type SessionDetailMessagesAttachmentsType `json:"type"`
		} `json:"attachments,omitempty"`

		// CancelMethod How the cancel was applied — present only on type="turn_canceled" entries (FR-15). "graceful" lets the in-flight tool finish; "hard" interrupts immediately.
		CancelMethod *SessionDetailMessagesCancelMethod `json:"cancel_method,omitempty"`

		// CanceledByChannel Channel that originated the cancel request — present only on type="turn_canceled" entries (FR-15).
		CanceledByChannel *string `json:"canceled_by_channel,omitempty"`

		// CanceledByUser Username of the actor who triggered the cancel — present only on type="turn_canceled" entries (FR-15).
		CanceledByUser *string `json:"canceled_by_user,omitempty"`

		// Content Raw markdown/text content of the message.
		Content *string `json:"content,omitempty"`

		// Cost USD cost for this entry. Absent when zero.
		Cost *float64 `json:"cost,omitempty"`

		// DescendantsCanceled IDs of descendant turns that were canceled in cascade — present only on type="turn_canceled" entries (FR-6a).
		DescendantsCanceled *[]string `json:"descendants_canceled,omitempty"`

		// Id Unique message identifier.
		Id string `json:"id"`

		// MessagesCompacted Number of messages compacted (present only on compaction entries).
		MessagesCompacted *int `json:"messages_compacted,omitempty"`

		// Role Author role. Absent on compaction entries.
		Role *SessionDetailMessagesRole `json:"role,omitempty"`

		// Status Completion status of this message turn.
		Status *SessionDetailMessagesStatus `json:"status,omitempty"`

		// Summary Compaction summary text (present only on type=compaction entries).
		Summary *string `json:"summary,omitempty"`

		// Timestamp RFC3339 timestamp when this entry was recorded.
		Timestamp time.Time `json:"timestamp"`

		// Tokens Token count for this entry (input + output). Absent when zero.
		Tokens *int `json:"tokens,omitempty"`

		// ToolCalls Tool invocations made during this message turn.
		ToolCalls *[]struct {
			// DurationMs Elapsed time in milliseconds. Absent when still running.
			DurationMs *int64 `json:"duration_ms,omitempty"`

			// Id Unique tool call identifier (ToolCallID type on the Go side).
			Id string `json:"id"`

			// Parameters Input parameters passed to the tool.
			Parameters *map[string]interface{} `json:"parameters,omitempty"`

			// ParentToolCallId Parent tool call ID for nested subagent tool invocations.
			ParentToolCallId *string `json:"parent_tool_call_id,omitempty"`

			// Result Return value from the tool. Shape is tool-specific.
			Result *map[string]interface{} `json:"result,omitempty"`

			// Status Outcome of the tool call.
			Status SessionDetailMessagesToolCallsStatus `json:"status"`

			// Tool Tool name as registered in the tool registry (e.g. "workspace.shell", "web_search").
			Tool string `json:"tool"`
		} `json:"tool_calls,omitempty"`

		// Truncated Set to true on the last assistant entry when a turn is canceled mid-stream (FR-14). Only present when true. The SPA renders an "(interrupted)" suffix on the bubble when this is set.
		Truncated *bool `json:"truncated,omitempty"`

		// TurnId Turn identifier — present only on type="turn_canceled" entries (FR-15). Identifies the turn that was canceled.
		TurnId *string `json:"turn_id,omitempty"`

		// Type Entry classification. Absent or empty means "message" (backwards compatible). "compaction" entries summarize pruned context; "system" entries are internal markers; "tool_call" entries record tool invocations; "turn_canceled" entries mark a turn that was canceled mid-stream (FR-15). The Go-side EntryType constant set is the source of truth (`pkg/session/daypartition.go`).
		Type *SessionDetailMessagesType `json:"type,omitempty"`
	} `json:"messages"`

	// Session Session metadata object (maps to session.UnifiedMeta + session.SessionMeta). Returned in list and detail endpoints. The SPA maps this through rawToSession() which reads stats.message_count, stats.tokens_total, and stats.cost.
	Session struct {
		// ActiveAgentId The agent ID currently handling this session (multi-agent sessions only).
		ActiveAgentId *string `json:"active_agent_id,omitempty"`

		// AgentId ID of the primary agent that owns this session.
		AgentId string `json:"agent_id"`

		// AgentIds All agent IDs that have participated in this session (multi-agent sessions). For legacy single-agent sessions this field is absent; callers should fall back to [agent_id] when agent_ids is undefined.
		AgentIds *[]string `json:"agent_ids,omitempty"`

		// Channel Channel identifier that initiated this session (e.g. "webchat", "telegram"). Always present (may be empty string for legacy sessions).
		Channel string `json:"channel"`

		// CompactionSummaries Per-agent compaction summaries (multi-agent sessions only).
		CompactionSummaries *map[string]string `json:"compaction_summaries,omitempty"`

		// CreatedAt RFC3339 timestamp when the session was created.
		CreatedAt time.Time `json:"created_at"`

		// Id Unique session identifier (UUID).
		Id string `json:"id"`

		// LastCompactionSummary Summary of the last context compaction pass (present only when compaction has occurred).
		LastCompactionSummary *string `json:"last_compaction_summary,omitempty"`

		// Model LLM model name used in this session (may be empty for legacy sessions).
		Model *string `json:"model,omitempty"`

		// Partitions List of JSONL partition file names (e.g. ["2026-05-16.jsonl"]). Always present as an array (may be empty for new sessions with no messages). One partition per day, so 3650 covers ~10 years of daily partitions.
		Partitions []string `json:"partitions"`

		// ProjectId Associated project ID (optional, future v0.3 feature).
		ProjectId *string `json:"project_id,omitempty"`

		// Provider Provider identifier (e.g. "anthropic", "openai") for this session.
		Provider *string `json:"provider,omitempty"`

		// Stats Aggregated statistics for a session transcript.
		Stats struct {
			// Cost Total USD cost for this session (based on provider pricing).
			Cost float64 `json:"cost"`

			// MessageCount Number of transcript entries in this session.
			MessageCount int `json:"message_count"`

			// TokensIn Total input tokens consumed across all messages in this session.
			TokensIn int `json:"tokens_in"`

			// TokensOut Total output tokens generated across all messages in this session.
			TokensOut int `json:"tokens_out"`

			// TokensTotal Sum of tokens_in and tokens_out.
			TokensTotal int `json:"tokens_total"`

			// ToolCalls Total number of tool calls made in this session.
			ToolCalls int `json:"tool_calls"`
		} `json:"stats"`

		// Status Current lifecycle status of the session.
		Status SessionDetailSessionStatus `json:"status"`

		// TaskId Associated task ID when this session was created to service a task.
		TaskId *string `json:"task_id,omitempty"`

		// Title Human-readable session title. May be auto-generated or user-renamed.
		Title string `json:"title"`

		// Type Session classification. Legacy sessions without a type field are treated as "chat" by the SPA via rawToSession(). Defaults to "chat" on creation.
		Type *SessionDetailSessionType `json:"type,omitempty"`

		// UpdatedAt RFC3339 timestamp of the last modification to session metadata or transcript.
		UpdatedAt time.Time `json:"updated_at"`
	} `json:"session"`
}

SessionDetail Full session detail as returned by GET /sessions/{id}. Contains the session metadata plus the complete ordered transcript.

type SessionDetailMessagesAttachmentsType

type SessionDetailMessagesAttachmentsType string

SessionDetailMessagesAttachmentsType Attachment category. Aligned with MediaPart.type enum.

Defines values for SessionDetailMessagesAttachmentsType.

func (SessionDetailMessagesAttachmentsType) Valid

Valid indicates whether the value is a known member of the SessionDetailMessagesAttachmentsType enum.

type SessionDetailMessagesCancelMethod

type SessionDetailMessagesCancelMethod string

SessionDetailMessagesCancelMethod How the cancel was applied — present only on type="turn_canceled" entries (FR-15). "graceful" lets the in-flight tool finish; "hard" interrupts immediately.

const (
	SessionDetailMessagesCancelMethodGraceful SessionDetailMessagesCancelMethod = "graceful"
	SessionDetailMessagesCancelMethodHard     SessionDetailMessagesCancelMethod = "hard"
)

Defines values for SessionDetailMessagesCancelMethod.

func (SessionDetailMessagesCancelMethod) Valid

Valid indicates whether the value is a known member of the SessionDetailMessagesCancelMethod enum.

type SessionDetailMessagesRole

type SessionDetailMessagesRole string

SessionDetailMessagesRole Author role. Absent on compaction entries.

const (
	SessionDetailMessagesRoleAssistant SessionDetailMessagesRole = "assistant"
	SessionDetailMessagesRoleSystem    SessionDetailMessagesRole = "system"
	SessionDetailMessagesRoleUser      SessionDetailMessagesRole = "user"
)

Defines values for SessionDetailMessagesRole.

func (SessionDetailMessagesRole) Valid

func (e SessionDetailMessagesRole) Valid() bool

Valid indicates whether the value is a known member of the SessionDetailMessagesRole enum.

type SessionDetailMessagesStatus

type SessionDetailMessagesStatus string

SessionDetailMessagesStatus Completion status of this message turn.

const (
	SessionDetailMessagesStatusError       SessionDetailMessagesStatus = "error"
	SessionDetailMessagesStatusInterrupted SessionDetailMessagesStatus = "interrupted"
	SessionDetailMessagesStatusOk          SessionDetailMessagesStatus = "ok"
)

Defines values for SessionDetailMessagesStatus.

func (SessionDetailMessagesStatus) Valid

Valid indicates whether the value is a known member of the SessionDetailMessagesStatus enum.

type SessionDetailMessagesToolCallsStatus

type SessionDetailMessagesToolCallsStatus string

SessionDetailMessagesToolCallsStatus Outcome of the tool call.

const (
	SessionDetailMessagesToolCallsStatusCancelled SessionDetailMessagesToolCallsStatus = "cancelled"
	SessionDetailMessagesToolCallsStatusDenied    SessionDetailMessagesToolCallsStatus = "denied"
	SessionDetailMessagesToolCallsStatusError     SessionDetailMessagesToolCallsStatus = "error"
	SessionDetailMessagesToolCallsStatusPending   SessionDetailMessagesToolCallsStatus = "pending"
	SessionDetailMessagesToolCallsStatusRunning   SessionDetailMessagesToolCallsStatus = "running"
	SessionDetailMessagesToolCallsStatusSuccess   SessionDetailMessagesToolCallsStatus = "success"
)

Defines values for SessionDetailMessagesToolCallsStatus.

func (SessionDetailMessagesToolCallsStatus) Valid

Valid indicates whether the value is a known member of the SessionDetailMessagesToolCallsStatus enum.

type SessionDetailMessagesType

type SessionDetailMessagesType string

SessionDetailMessagesType Entry classification. Absent or empty means "message" (backwards compatible). "compaction" entries summarize pruned context; "system" entries are internal markers; "tool_call" entries record tool invocations; "turn_canceled" entries mark a turn that was canceled mid-stream (FR-15). The Go-side EntryType constant set is the source of truth (`pkg/session/daypartition.go`).

const (
	SessionDetailMessagesTypeCompaction   SessionDetailMessagesType = "compaction"
	SessionDetailMessagesTypeMessage      SessionDetailMessagesType = "message"
	SessionDetailMessagesTypeSystem       SessionDetailMessagesType = "system"
	SessionDetailMessagesTypeToolCall     SessionDetailMessagesType = "tool_call"
	SessionDetailMessagesTypeTurnCanceled SessionDetailMessagesType = "turn_canceled"
)

Defines values for SessionDetailMessagesType.

func (SessionDetailMessagesType) Valid

func (e SessionDetailMessagesType) Valid() bool

Valid indicates whether the value is a known member of the SessionDetailMessagesType enum.

type SessionDetailSessionStatus

type SessionDetailSessionStatus string

SessionDetailSessionStatus Current lifecycle status of the session.

const (
	SessionDetailSessionStatusActive      SessionDetailSessionStatus = "active"
	SessionDetailSessionStatusArchived    SessionDetailSessionStatus = "archived"
	SessionDetailSessionStatusInterrupted SessionDetailSessionStatus = "interrupted"
)

Defines values for SessionDetailSessionStatus.

func (SessionDetailSessionStatus) Valid

func (e SessionDetailSessionStatus) Valid() bool

Valid indicates whether the value is a known member of the SessionDetailSessionStatus enum.

type SessionDetailSessionType

type SessionDetailSessionType string

SessionDetailSessionType Session classification. Legacy sessions without a type field are treated as "chat" by the SPA via rawToSession(). Defaults to "chat" on creation.

const (
	SessionDetailSessionTypeChannel SessionDetailSessionType = "channel"
	SessionDetailSessionTypeChat    SessionDetailSessionType = "chat"
	SessionDetailSessionTypeTask    SessionDetailSessionType = "task"
)

Defines values for SessionDetailSessionType.

func (SessionDetailSessionType) Valid

func (e SessionDetailSessionType) Valid() bool

Valid indicates whether the value is a known member of the SessionDetailSessionType enum.

type SessionRenameRequest

type SessionRenameRequest struct {
	// Title New title for the session.
	Title string `json:"title"`
}

SessionRenameRequest Body for PUT /sessions/{id}. Renames a session.

type SessionScopeRequest

type SessionScopeRequest struct {
	// DmScope New DM session scoping strategy. Must be exactly one of the four canonical values. Changes are saved to disk immediately but require a gateway restart to apply (requires_restart will be true in the response).
	DmScope SessionScopeRequestDmScope `json:"dm_scope"`
}

SessionScopeRequest Body for PUT /security/session-scope. Updates the DM session scoping strategy.

type SessionScopeRequestDmScope

type SessionScopeRequestDmScope string

SessionScopeRequestDmScope New DM session scoping strategy. Must be exactly one of the four canonical values. Changes are saved to disk immediately but require a gateway restart to apply (requires_restart will be true in the response).

const (
	SessionScopeRequestDmScopeMain                  SessionScopeRequestDmScope = "main"
	SessionScopeRequestDmScopePerAccountChannelPeer SessionScopeRequestDmScope = "per-account-channel-peer"
	SessionScopeRequestDmScopePerChannelPeer        SessionScopeRequestDmScope = "per-channel-peer"
	SessionScopeRequestDmScopePerPeer               SessionScopeRequestDmScope = "per-peer"
)

Defines values for SessionScopeRequestDmScope.

func (SessionScopeRequestDmScope) Valid

func (e SessionScopeRequestDmScope) Valid() bool

Valid indicates whether the value is a known member of the SessionScopeRequestDmScope enum.

type SessionScopeResponse

type SessionScopeResponse struct {
	// DmScope Current DM session scoping strategy. Controls how incoming direct messages are routed to session threads. Changes require a gateway restart to take effect.
	DmScope SessionScopeResponseDmScope `json:"dm_scope"`
}

SessionScopeResponse Response from GET /security/session-scope.

type SessionScopeResponseDmScope

type SessionScopeResponseDmScope string

SessionScopeResponseDmScope Current DM session scoping strategy. Controls how incoming direct messages are routed to session threads. Changes require a gateway restart to take effect.

const (
	SessionScopeResponseDmScopeMain                  SessionScopeResponseDmScope = "main"
	SessionScopeResponseDmScopePerAccountChannelPeer SessionScopeResponseDmScope = "per-account-channel-peer"
	SessionScopeResponseDmScopePerChannelPeer        SessionScopeResponseDmScope = "per-channel-peer"
	SessionScopeResponseDmScopePerPeer               SessionScopeResponseDmScope = "per-peer"
)

Defines values for SessionScopeResponseDmScope.

func (SessionScopeResponseDmScope) Valid

Valid indicates whether the value is a known member of the SessionScopeResponseDmScope enum.

type SessionScopeUpdateResponse

type SessionScopeUpdateResponse struct {
	// AppliedDmScope The dm_scope currently active (the value before restart takes effect).
	AppliedDmScope string `json:"applied_dm_scope"`

	// RequiresRestart Always true — session routing requires a gateway restart to take effect.
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`

	// Warning Present when hot-reload failed — config is saved but restart is required.
	Warning *string `json:"warning,omitempty"`
}

SessionScopeUpdateResponse Response from PUT /api/v1/security/session-scope. Returns save status and the currently active scope (before restart).

func FixtureSessionScopeUpdateResponse_Edge

func FixtureSessionScopeUpdateResponse_Edge() SessionScopeUpdateResponse

func FixtureSessionScopeUpdateResponse_Populated

func FixtureSessionScopeUpdateResponse_Populated() SessionScopeUpdateResponse

func FixtureSessionScopeUpdateResponse_ZeroValue

func FixtureSessionScopeUpdateResponse_ZeroValue() SessionScopeUpdateResponse

type SessionStartedFrame

type SessionStartedFrame struct {
	AgentId   *string `json:"agent_id,omitempty"`
	SessionId string  `json:"session_id"`
	Type      string  `json:"type"`
}

SessionStartedFrame — Server → client new session minted.

func FixtureSessionStartedFrame_Populated

func FixtureSessionStartedFrame_Populated() SessionStartedFrame

func FixtureSessionStartedFrame_ZeroValue

func FixtureSessionStartedFrame_ZeroValue() SessionStartedFrame

type SessionStateFrame

type SessionStateFrame struct {
	EmittedAt string `json:"emitted_at"`
	// Always array, never null. Capped at 1000.
	PendingApprovals []SessionStatePendingApproval `json:"pending_approvals"`
	Type             string                        `json:"type"`
	UserId           string                        `json:"user_id"`
}

SessionStateFrame — Server → client reconnect approval snapshot (FR-052, FR-073, FR-081). pending_approvals MUST be an array (never null). Backend coerces nil → []. SPA calls pending_approvals.map() — null crashes at render time.

func FixtureSessionStateFrame_Edge

func FixtureSessionStateFrame_Edge() SessionStateFrame

FixtureSessionStateFrame_Edge — multiple approvals, unicode user ID.

func FixtureSessionStateFrame_EmptyApprovals

func FixtureSessionStateFrame_EmptyApprovals() SessionStateFrame

FixtureSessionStateFrame_EmptyApprovals — valid: empty but non-nil slice. This is the common case when no approvals are pending.

func FixtureSessionStateFrame_Populated

func FixtureSessionStateFrame_Populated() SessionStateFrame

func FixtureSessionStateFrame_ZeroValue

func FixtureSessionStateFrame_ZeroValue() SessionStateFrame

FixtureSessionStateFrame_ZeroValue — Go zero values. Expected: FAIL because type="", user_id="", pending_approvals=nil (marshals to null), emitted_at="" (not a valid date-time).

type SessionStatePendingApproval

type SessionStatePendingApproval struct {
	AgentId     string `json:"agent_id"`
	ApprovalId  string `json:"approval_id"`
	ExpiresInMs int    `json:"expires_in_ms"`
	SessionId   string `json:"session_id"`
	ToolName    string `json:"tool_name"`
}

SessionStatePendingApproval — One pending approval entry in a SessionStateFrame.

type SessionStats

type SessionStats struct {
	// Cost Total USD cost for this session (based on provider pricing).
	Cost float64 `json:"cost"`

	// MessageCount Number of transcript entries in this session.
	MessageCount int `json:"message_count"`

	// TokensIn Total input tokens consumed across all messages in this session.
	TokensIn int `json:"tokens_in"`

	// TokensOut Total output tokens generated across all messages in this session.
	TokensOut int `json:"tokens_out"`

	// TokensTotal Sum of tokens_in and tokens_out.
	TokensTotal int `json:"tokens_total"`

	// ToolCalls Total number of tool calls made in this session.
	ToolCalls int `json:"tool_calls"`
}

SessionStats Aggregated statistics for a session transcript.

type SessionStatus

type SessionStatus string

SessionStatus Current lifecycle status of the session.

const (
	SessionStatusActive      SessionStatus = "active"
	SessionStatusArchived    SessionStatus = "archived"
	SessionStatusInterrupted SessionStatus = "interrupted"
)

Defines values for SessionStatus.

func (SessionStatus) Valid

func (e SessionStatus) Valid() bool

Valid indicates whether the value is a known member of the SessionStatus enum.

type SessionType

type SessionType string

SessionType Session classification. Legacy sessions without a type field are treated as "chat" by the SPA via rawToSession(). Defaults to "chat" on creation.

const (
	SessionTypeChannel SessionType = "channel"
	SessionTypeChat    SessionType = "chat"
	SessionTypeTask    SessionType = "task"
)

Defines values for SessionType.

func (SessionType) Valid

func (e SessionType) Valid() bool

Valid indicates whether the value is a known member of the SessionType enum.

type SetChannelRoutingJSONRequestBody

type SetChannelRoutingJSONRequestBody = ChannelRouting

SetChannelRoutingJSONRequestBody defines body for SetChannelRouting for application/json ContentType.

type SetCredentialJSONRequestBody

type SetCredentialJSONRequestBody = CredentialSetRequest

SetCredentialJSONRequestBody defines body for SetCredential for application/json ContentType.

type Skill

type Skill struct {
	// AgentAssignment ID of the agent this skill is assigned to, when the skill is bound to a specific agent rather than globally available. Absent for globally assigned skills.
	AgentAssignment *string `json:"agent_assignment,omitempty"`

	// Author Skill author or publisher name.
	Author *string `json:"author,omitempty"`

	// Description Short description of what the skill does.
	Description *string `json:"description,omitempty"`

	// Id Unique skill identifier (typically the skill directory name or npm package name).
	Id string `json:"id"`

	// Name Human-readable skill name.
	Name string `json:"name"`

	// Status "active" when the skill is loaded and its tools are available to agents. "disabled" when the skill has been installed but deactivated. "inactive" when the skill is installed but not currently activated. "error" when the skill failed to load (malformed SKILL.md, missing dependency, etc.).
	Status SkillStatus `json:"status"`

	// Verified True when the skill has been verified by the Omnipus team. Unverified skills require explicit trust grant before use.
	Verified bool `json:"verified"`

	// Version Semantic version string (e.g. "1.2.3"). Must follow semver format.
	Version string `json:"version"`
}

Skill A single installed skill as returned by GET /skills. Skills are SKILL.md/package bundles loaded from ~/.omnipus/skills/ that extend agent capabilities. Each skill has an ID, version, and human-readable metadata.

type SkillInstallRequest

type SkillInstallRequest struct {
	// Name Skill name to install from the ClawHub registry.
	Name string `json:"name"`
}

SkillInstallRequest Request body for POST /api/v1/skills/install. Installs a skill from the ClawHub registry by name.

type SkillStatus

type SkillStatus string

SkillStatus "active" when the skill is loaded and its tools are available to agents. "disabled" when the skill has been installed but deactivated. "inactive" when the skill is installed but not currently activated. "error" when the skill failed to load (malformed SKILL.md, missing dependency, etc.).

const (
	SkillStatusActive   SkillStatus = "active"
	SkillStatusDisabled SkillStatus = "disabled"
	SkillStatusError    SkillStatus = "error"
	SkillStatusInactive SkillStatus = "inactive"
)

Defines values for SkillStatus.

func (SkillStatus) Valid

func (e SkillStatus) Valid() bool

Valid indicates whether the value is a known member of the SkillStatus enum.

type SkillTrustResponse

type SkillTrustResponse struct {
	// Level Current skill trust level. Controls how unverified community skills are handled.
	Level SkillTrustResponseLevel `json:"level"`
}

SkillTrustResponse Skill trust level returned by GET /api/v1/security/skill-trust.

type SkillTrustResponseLevel

type SkillTrustResponseLevel string

SkillTrustResponseLevel Current skill trust level. Controls how unverified community skills are handled.

const (
	SkillTrustResponseLevelAllowAll        SkillTrustResponseLevel = "allow_all"
	SkillTrustResponseLevelBlockUnverified SkillTrustResponseLevel = "block_unverified"
	SkillTrustResponseLevelWarnUnverified  SkillTrustResponseLevel = "warn_unverified"
)

Defines values for SkillTrustResponseLevel.

func (SkillTrustResponseLevel) Valid

func (e SkillTrustResponseLevel) Valid() bool

Valid indicates whether the value is a known member of the SkillTrustResponseLevel enum.

type SkillTrustUpdateRequest

type SkillTrustUpdateRequest struct {
	// Level New skill trust level.
	Level SkillTrustUpdateRequestLevel `json:"level"`
}

SkillTrustUpdateRequest Request body for PUT /api/v1/security/skill-trust. Updates the skill trust level; controls how unverified community skills are handled.

func FixtureSkillTrustUpdateRequest_Edge

func FixtureSkillTrustUpdateRequest_Edge() SkillTrustUpdateRequest

func FixtureSkillTrustUpdateRequest_Populated

func FixtureSkillTrustUpdateRequest_Populated() SkillTrustUpdateRequest

func FixtureSkillTrustUpdateRequest_ZeroValue

func FixtureSkillTrustUpdateRequest_ZeroValue() SkillTrustUpdateRequest

type SkillTrustUpdateRequestLevel

type SkillTrustUpdateRequestLevel string

SkillTrustUpdateRequestLevel New skill trust level.

const (
	SkillTrustUpdateRequestLevelAllowAll        SkillTrustUpdateRequestLevel = "allow_all"
	SkillTrustUpdateRequestLevelBlockUnverified SkillTrustUpdateRequestLevel = "block_unverified"
	SkillTrustUpdateRequestLevelWarnUnverified  SkillTrustUpdateRequestLevel = "warn_unverified"
)

Defines values for SkillTrustUpdateRequestLevel.

func (SkillTrustUpdateRequestLevel) Valid

Valid indicates whether the value is a known member of the SkillTrustUpdateRequestLevel enum.

type SkillTrustUpdateResponse

type SkillTrustUpdateResponse struct {
	// AppliedLevel The skill trust level now active.
	AppliedLevel SkillTrustUpdateResponseAppliedLevel `json:"applied_level"`

	// RequiresRestart Always false — skill trust is hot-reloaded.
	RequiresRestart bool `json:"requires_restart"`

	// Saved True when the configuration was successfully persisted to disk.
	Saved bool `json:"saved"`

	// Warning Present when allow_all is selected — warns that hash verification is disabled.
	Warning *string `json:"warning,omitempty"`
}

SkillTrustUpdateResponse Response from PUT /api/v1/security/skill-trust. Returns save status and the now-active skill trust level.

func FixtureSkillTrustUpdateResponse_Edge

func FixtureSkillTrustUpdateResponse_Edge() SkillTrustUpdateResponse

func FixtureSkillTrustUpdateResponse_Populated

func FixtureSkillTrustUpdateResponse_Populated() SkillTrustUpdateResponse

func FixtureSkillTrustUpdateResponse_ZeroValue

func FixtureSkillTrustUpdateResponse_ZeroValue() SkillTrustUpdateResponse

type SkillTrustUpdateResponseAppliedLevel

type SkillTrustUpdateResponseAppliedLevel string

SkillTrustUpdateResponseAppliedLevel The skill trust level now active.

const (
	AllowAll        SkillTrustUpdateResponseAppliedLevel = "allow_all"
	BlockUnverified SkillTrustUpdateResponseAppliedLevel = "block_unverified"
	WarnUnverified  SkillTrustUpdateResponseAppliedLevel = "warn_unverified"
)

Defines values for SkillTrustUpdateResponseAppliedLevel.

func (SkillTrustUpdateResponseAppliedLevel) Valid

Valid indicates whether the value is a known member of the SkillTrustUpdateResponseAppliedLevel enum.

type SseChatRequest

type SseChatRequest struct {
	// Message The user message to send to the agent. Must not be empty.
	Message string `json:"message"`
}

SseChatRequest Request body for POST /api/v1/chat (SSE streaming endpoint). Sends a user message to the agent and streams the response via Server-Sent Events.

type StorageStats

type StorageStats struct {
	// MemoryEntryCount Total number of memory entries across all agent stores.
	MemoryEntryCount int `json:"memory_entry_count"`

	// OldestSessionDate RFC3339 timestamp of the oldest session. Absent when no sessions exist.
	OldestSessionDate *time.Time `json:"oldest_session_date,omitempty"`

	// SessionCount Total number of sessions across all agent stores.
	SessionCount int `json:"session_count"`

	// Warnings Non-fatal errors encountered while collecting stats (e.g. unreadable agent stores). The response is still returned when warnings are present.
	Warnings *[]string `json:"warnings,omitempty"`

	// WorkspaceSizeBytes Total size in bytes of all agent workspace directories.
	WorkspaceSizeBytes int64 `json:"workspace_size_bytes"`
}

StorageStats Storage statistics returned by GET /api/v1/storage/stats. Reports session count, workspace disk usage, memory entry count, and any non-fatal warnings encountered while collecting the stats.

func FixtureStorageStats_Edge

func FixtureStorageStats_Edge() StorageStats

FixtureStorageStats_Edge — no sessions, no memory, multiple warnings.

func FixtureStorageStats_NilWarningsAllowed

func FixtureStorageStats_NilWarningsAllowed() StorageStats

FixtureStorageStats_NilWarningsAllowed — warnings is optional; nil is valid.

func FixtureStorageStats_Populated

func FixtureStorageStats_Populated() StorageStats

func FixtureStorageStats_ZeroValue

func FixtureStorageStats_ZeroValue() StorageStats

FixtureStorageStats_ZeroValue — Go zero values. Expected: PASS — all required fields (workspace_size_bytes, session_count, memory_entry_count) are integers with zero as a valid value (minimum: 0). Zero value is a legitimate "empty system" state.

type SubagentEndFrame

type SubagentEndFrame struct {
	AgentId      *string `json:"agent_id,omitempty"`
	DurationMs   *int    `json:"duration_ms,omitempty"`
	FinalResult  *string `json:"final_result,omitempty"`
	Message      *string `json:"message,omitempty"`
	ParentCallId *string `json:"parent_call_id,omitempty"`
	Reason       *string `json:"reason,omitempty"`
	SessionId    string  `json:"session_id"`
	SpanId       string  `json:"span_id"`
	Status       string  `json:"status"`
	Type         string  `json:"type"`
}

SubagentEndFrame — Server → client subagent span closed (FR-H-004). status MUST be one of the five allowed values — the SPA drops frames with invalid status (W4-6).

func FixtureSubagentEndFrame_Populated

func FixtureSubagentEndFrame_Populated() SubagentEndFrame

func FixtureSubagentEndFrame_ZeroValue

func FixtureSubagentEndFrame_ZeroValue() SubagentEndFrame

type SubagentStartFrame

type SubagentStartFrame struct {
	AgentId      *string `json:"agent_id,omitempty"`
	ParentCallId string  `json:"parent_call_id"`
	SessionId    string  `json:"session_id"`
	SpanId       string  `json:"span_id"`
	TaskLabel    string  `json:"task_label"`
	Type         string  `json:"type"`
}

SubagentStartFrame — Server → client subagent span opened (FR-H-004).

func FixtureSubagentStartFrame_Populated

func FixtureSubagentStartFrame_Populated() SubagentStartFrame

func FixtureSubagentStartFrame_ZeroValue

func FixtureSubagentStartFrame_ZeroValue() SubagentStartFrame

type SystemOverloadFrame

type SystemOverloadFrame struct {
	Message   *string `json:"message,omitempty"`
	SessionId string  `json:"session_id"`
	Type      string  `json:"type"`
}

SystemOverloadFrame — Server → client system at capacity (FR-016, MAJ-009).

func FixtureSystemOverloadFrame_Populated

func FixtureSystemOverloadFrame_Populated() SystemOverloadFrame

func FixtureSystemOverloadFrame_ZeroValue

func FixtureSystemOverloadFrame_ZeroValue() SystemOverloadFrame

type Task

type Task struct {
	// AgentId ID of the agent assigned to this task. Absent when unassigned.
	AgentId *string `json:"agent_id,omitempty"`

	// AgentName Display name of the assigned agent. Absent when unassigned.
	AgentName *string `json:"agent_name,omitempty"`

	// Artifacts Paths to output files or artifact references produced by the task.
	Artifacts *[]string `json:"artifacts,omitempty"`

	// CompletedAt RFC3339 timestamp when the task completed or failed. Absent while running.
	CompletedAt *time.Time `json:"completed_at,omitempty"`

	// CreatedAt RFC3339 timestamp when the task was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// CreatedBy Username of the user who created the task.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id Unique task identifier (UUID).
	Id string `json:"id"`

	// ParentTaskId ID of the parent task (for subtasks). Absent on top-level tasks.
	ParentTaskId *string `json:"parent_task_id,omitempty"`

	// Priority Task priority (higher = more urgent). Default is 0.
	Priority int `json:"priority"`

	// Prompt Full task description / prompt given to the agent.
	Prompt string `json:"prompt"`

	// Result Text result produced by the agent on completion. Absent while running.
	Result *string `json:"result,omitempty"`

	// SessionId Session ID created when the task was started.
	SessionId *string `json:"session_id,omitempty"`

	// StartedAt RFC3339 timestamp when the task was started. Absent until started.
	StartedAt *time.Time `json:"started_at,omitempty"`

	// Status Current lifecycle status of the task.
	Status TaskStatus `json:"status"`

	// Title Human-readable task title.
	Title string `json:"title"`

	// TriggerType How the task was triggered.
	TriggerType TaskTriggerType `json:"trigger_type"`
}

Task A task record as returned by GET /tasks, GET /tasks/{id}/subtasks, and POST /tasks. Maps to the task.Task struct on the Go side.

func FixtureTask_Edge

func FixtureTask_Edge() Task

FixtureTask_Edge — queued task, no agent, unicode title, max priority.

func FixtureTask_Populated

func FixtureTask_Populated() Task

func FixtureTask_ZeroValue

func FixtureTask_ZeroValue() Task

FixtureTask_ZeroValue — Go zero values. Expected: FAIL because id="", title="", prompt="", status="" (not in enum), trigger_type="" (not in enum), priority=0 (valid — minimum: 0).

type TaskAcceptedResponse

type TaskAcceptedResponse struct {
	// Status Acceptance status. Always "accepted".
	Status TaskAcceptedResponseStatus `json:"status"`

	// TaskId The ID of the task that was accepted for execution.
	TaskId string `json:"task_id"`
}

TaskAcceptedResponse Response from POST /api/v1/tasks/{id}/start (HTTP 202 Accepted). Confirms that the task has been queued for execution.

func FixtureTaskAcceptedResponse_Edge

func FixtureTaskAcceptedResponse_Edge() TaskAcceptedResponse

func FixtureTaskAcceptedResponse_Populated

func FixtureTaskAcceptedResponse_Populated() TaskAcceptedResponse

func FixtureTaskAcceptedResponse_ZeroValue

func FixtureTaskAcceptedResponse_ZeroValue() TaskAcceptedResponse

type TaskAcceptedResponseStatus

type TaskAcceptedResponseStatus string

TaskAcceptedResponseStatus Acceptance status. Always "accepted".

const (
	Accepted TaskAcceptedResponseStatus = "accepted"
)

Defines values for TaskAcceptedResponseStatus.

func (TaskAcceptedResponseStatus) Valid

func (e TaskAcceptedResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the TaskAcceptedResponseStatus enum.

type TaskCreateRequest

type TaskCreateRequest struct {
	// AgentId Agent to assign the task to.
	AgentId *string `json:"agent_id,omitempty"`

	// Description Backward-compat alias for prompt.
	Description *string `json:"description,omitempty"`

	// Name Backward-compat alias for title.
	Name *string `json:"name,omitempty"`

	// ParentTaskId Parent task ID (for creating subtasks).
	ParentTaskId *string `json:"parent_task_id,omitempty"`

	// Priority Task priority (higher = more urgent). Defaults to 3.
	Priority *int `json:"priority,omitempty"`

	// Prompt Task description / prompt for the agent.
	Prompt *string `json:"prompt,omitempty"`

	// Title Task title.
	Title string `json:"title"`

	// TriggerType How the task was triggered. Defaults to "manual".
	TriggerType *TaskCreateRequestTriggerType `json:"trigger_type,omitempty"`
}

TaskCreateRequest Request body for POST /api/v1/tasks. Creates a new task. The fields name/description are backward-compat aliases for title/prompt.

type TaskCreateRequestTriggerType

type TaskCreateRequestTriggerType string

TaskCreateRequestTriggerType How the task was triggered. Defaults to "manual".

const (
	TaskCreateRequestTriggerTypeEvent  TaskCreateRequestTriggerType = "event"
	TaskCreateRequestTriggerTypeManual TaskCreateRequestTriggerType = "manual"
	TaskCreateRequestTriggerTypeTime   TaskCreateRequestTriggerType = "time"
)

Defines values for TaskCreateRequestTriggerType.

func (TaskCreateRequestTriggerType) Valid

Valid indicates whether the value is a known member of the TaskCreateRequestTriggerType enum.

type TaskStatus

type TaskStatus string

TaskStatus Current lifecycle status of the task.

const (
	TaskStatusAssigned  TaskStatus = "assigned"
	TaskStatusCompleted TaskStatus = "completed"
	TaskStatusFailed    TaskStatus = "failed"
	TaskStatusQueued    TaskStatus = "queued"
	TaskStatusRunning   TaskStatus = "running"
)

Defines values for TaskStatus.

func (TaskStatus) Valid

func (e TaskStatus) Valid() bool

Valid indicates whether the value is a known member of the TaskStatus enum.

type TaskStatusChangedFrame

type TaskStatusChangedFrame struct {
	AgentId   *string `json:"agent_id,omitempty"`
	SessionId string  `json:"session_id"`
	Status    string  `json:"status"`
	TaskId    string  `json:"task_id"`
	Type      string  `json:"type"`
}

TaskStatusChangedFrame — Server → client task status updated.

func FixtureTaskStatusChangedFrame_Populated

func FixtureTaskStatusChangedFrame_Populated() TaskStatusChangedFrame

func FixtureTaskStatusChangedFrame_ZeroValue

func FixtureTaskStatusChangedFrame_ZeroValue() TaskStatusChangedFrame

type TaskTriggerType

type TaskTriggerType string

TaskTriggerType How the task was triggered.

const (
	TaskTriggerTypeEvent  TaskTriggerType = "event"
	TaskTriggerTypeManual TaskTriggerType = "manual"
	TaskTriggerTypeTime   TaskTriggerType = "time"
)

Defines values for TaskTriggerType.

func (TaskTriggerType) Valid

func (e TaskTriggerType) Valid() bool

Valid indicates whether the value is a known member of the TaskTriggerType enum.

type TaskUpdateRequest

type TaskUpdateRequest struct {
	// AgentId Agent to re-assign the task to.
	AgentId *string `json:"agent_id,omitempty"`

	// Artifacts List of artifact paths produced by the task.
	Artifacts *[]string `json:"artifacts,omitempty"`

	// CompletedAt When the task completed execution.
	CompletedAt *time.Time `json:"completed_at,omitempty"`

	// Description Backward-compat alias for result.
	Description *string `json:"description,omitempty"`

	// Name Backward-compat alias for title.
	Name *string `json:"name,omitempty"`

	// Priority New task priority.
	Priority *int `json:"priority,omitempty"`

	// Result Task result or output summary.
	Result *string `json:"result,omitempty"`

	// StartedAt When the task started execution.
	StartedAt *time.Time `json:"started_at,omitempty"`

	// Status New task status.
	Status *TaskUpdateRequestStatus `json:"status,omitempty"`

	// Title New task title.
	Title *string `json:"title,omitempty"`
}

TaskUpdateRequest Request body for PUT /api/v1/tasks/{id}. Updates fields on an existing task. All fields are optional — only provided fields are updated. The fields name/description are backward-compat aliases for title/result.

type TaskUpdateRequestStatus

type TaskUpdateRequestStatus string

TaskUpdateRequestStatus New task status.

const (
	TaskUpdateRequestStatusAssigned  TaskUpdateRequestStatus = "assigned"
	TaskUpdateRequestStatusCompleted TaskUpdateRequestStatus = "completed"
	TaskUpdateRequestStatusFailed    TaskUpdateRequestStatus = "failed"
	TaskUpdateRequestStatusQueued    TaskUpdateRequestStatus = "queued"
	TaskUpdateRequestStatusRunning   TaskUpdateRequestStatus = "running"
)

Defines values for TaskUpdateRequestStatus.

func (TaskUpdateRequestStatus) Valid

func (e TaskUpdateRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the TaskUpdateRequestStatus enum.

type TokenFrame

type TokenFrame struct {
	Content   string `json:"content"`
	SessionId string `json:"session_id"`
	Type      string `json:"type"`
}

TokenFrame — Server → client partial LLM response token.

func FixtureTokenFrame_Edge

func FixtureTokenFrame_Edge() TokenFrame

func FixtureTokenFrame_Populated

func FixtureTokenFrame_Populated() TokenFrame

func FixtureTokenFrame_ZeroValue

func FixtureTokenFrame_ZeroValue() TokenFrame

type ToolApprovalActionRequest

type ToolApprovalActionRequest struct {
	// Action Action to take on this approval.
	Action ToolApprovalActionRequestAction `json:"action"`
}

ToolApprovalActionRequest Request body for POST /api/v1/tool-approvals/{approval_id}. Resolves a pending tool call approval by approving, denying, or cancelling it. For tools with RequiresAdminAsk=true the caller must hold the admin role (FR-015).

type ToolApprovalActionRequestAction

type ToolApprovalActionRequestAction string

ToolApprovalActionRequestAction Action to take on this approval.

const (
	ToolApprovalActionRequestActionApprove ToolApprovalActionRequestAction = "approve"
	ToolApprovalActionRequestActionCancel  ToolApprovalActionRequestAction = "cancel"
	ToolApprovalActionRequestActionDeny    ToolApprovalActionRequestAction = "deny"
)

Defines values for ToolApprovalActionRequestAction.

func (ToolApprovalActionRequestAction) Valid

Valid indicates whether the value is a known member of the ToolApprovalActionRequestAction enum.

type ToolApprovalRequiredFrame

type ToolApprovalRequiredFrame struct {
	AgentId    string `json:"agent_id"`
	ApprovalId string `json:"approval_id"`
	// Tool invocation arguments. Always object, never null. Required + object type so the Phase 4 contract test catches any nil regression.
	Args        map[string]any `json:"args"`
	ExpiresInMs int            `json:"expires_in_ms"`
	SessionId   string         `json:"session_id"`
	ToolCallId  string         `json:"tool_call_id"`
	ToolName    string         `json:"tool_name"`
	TurnId      string         `json:"turn_id"`
	Type        string         `json:"type"`
}

ToolApprovalRequiredFrame — Server → client tool approval needed (FR-011, FR-082). CRITICAL: args MUST be object (never null). Backend coerces nil → {}. SPA calls Object.keys(args) — null crashes at render time (Ava-chat bug).

func FixtureToolApprovalRequiredFrame_Edge

func FixtureToolApprovalRequiredFrame_Edge() ToolApprovalRequiredFrame

FixtureToolApprovalRequiredFrame_Edge — unicode tool name, empty args object (valid), large expires_in_ms.

func FixtureToolApprovalRequiredFrame_NilArgs

func FixtureToolApprovalRequiredFrame_NilArgs() ToolApprovalRequiredFrame

FixtureToolApprovalRequiredFrame_NilArgs — the exact state that caused the Ava-chat crash. args is nil → marshals to "args":null → schema rejects because type: object, not nullable.

func FixtureToolApprovalRequiredFrame_Populated

func FixtureToolApprovalRequiredFrame_Populated() ToolApprovalRequiredFrame

func FixtureToolApprovalRequiredFrame_ZeroValue

func FixtureToolApprovalRequiredFrame_ZeroValue() ToolApprovalRequiredFrame

FixtureToolApprovalRequiredFrame_ZeroValue — Go zero values. Expected behavior: should FAIL JSON schema validation because:

  • type is "" (schema requires const "tool_approval_required")
  • approval_id is "" (minLength: 1)
  • args is nil (marshals to null, schema requires type: object)
  • other minLength:1 fields are ""

type ToolApprovalResponse

type ToolApprovalResponse struct {
	// Action The action that was applied.
	Action ToolApprovalResponseAction `json:"action"`

	// ApprovalId The approval ID that was resolved.
	ApprovalId string `json:"approval_id"`

	// Status Result status. Always "ok" when the action was accepted.
	Status ToolApprovalResponseStatus `json:"status"`
}

ToolApprovalResponse Response from POST /api/v1/tool-approvals/{approval_id}. Confirms that the approval action was processed.

func FixtureToolApprovalResponse_Edge

func FixtureToolApprovalResponse_Edge() ToolApprovalResponse

func FixtureToolApprovalResponse_Populated

func FixtureToolApprovalResponse_Populated() ToolApprovalResponse

func FixtureToolApprovalResponse_ZeroValue

func FixtureToolApprovalResponse_ZeroValue() ToolApprovalResponse

type ToolApprovalResponseAction

type ToolApprovalResponseAction string

ToolApprovalResponseAction The action that was applied.

const (
	ToolApprovalResponseActionApprove ToolApprovalResponseAction = "approve"
	ToolApprovalResponseActionCancel  ToolApprovalResponseAction = "cancel"
	ToolApprovalResponseActionDeny    ToolApprovalResponseAction = "deny"
)

Defines values for ToolApprovalResponseAction.

func (ToolApprovalResponseAction) Valid

func (e ToolApprovalResponseAction) Valid() bool

Valid indicates whether the value is a known member of the ToolApprovalResponseAction enum.

type ToolApprovalResponseStatus

type ToolApprovalResponseStatus string

ToolApprovalResponseStatus Result status. Always "ok" when the action was accepted.

const (
	Ok ToolApprovalResponseStatus = "ok"
)

Defines values for ToolApprovalResponseStatus.

func (ToolApprovalResponseStatus) Valid

func (e ToolApprovalResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the ToolApprovalResponseStatus enum.

type ToolCall

type ToolCall struct {
	// DurationMs Elapsed time in milliseconds. Absent when still running.
	DurationMs *int64 `json:"duration_ms,omitempty"`

	// Id Unique tool call identifier (ToolCallID type on the Go side).
	Id string `json:"id"`

	// Parameters Input parameters passed to the tool.
	Parameters *map[string]interface{} `json:"parameters,omitempty"`

	// ParentToolCallId Parent tool call ID for nested subagent tool invocations.
	ParentToolCallId *string `json:"parent_tool_call_id,omitempty"`

	// Result Return value from the tool. Shape is tool-specific.
	Result *map[string]interface{} `json:"result,omitempty"`

	// Status Outcome of the tool call.
	Status ToolCallStatus `json:"status"`

	// Tool Tool name as registered in the tool registry (e.g. "workspace.shell", "web_search").
	Tool string `json:"tool"`
}

ToolCall A single tool invocation recorded in a transcript entry. Maps to session.ToolCall on the Go side and ToolCall interface in src/lib/api.ts.

type ToolCallResultFrame

type ToolCallResultFrame struct {
	AgentId      *string `json:"agent_id,omitempty"`
	CallId       string  `json:"call_id"`
	DurationMs   *int    `json:"duration_ms,omitempty"`
	Error        *string `json:"error,omitempty"`
	ParentCallId *string `json:"parent_call_id,omitempty"`
	// Tool return value. Any JSON type or null (null is the contract for error frames). Sentinels TruncatedResult, MarshalErrorResult, and ToolResultRef are alternative shapes.
	Result    any    `json:"result"`
	SessionId string `json:"session_id"`
	Status    string `json:"status"`
	Tool      string `json:"tool"`
	Type      string `json:"type"`
}

ToolCallResultFrame — Server → client tool execution completed.

func FixtureToolCallResultFrame_Edge

func FixtureToolCallResultFrame_Edge() ToolCallResultFrame

func FixtureToolCallResultFrame_Error

func FixtureToolCallResultFrame_Error() ToolCallResultFrame

func FixtureToolCallResultFrame_Populated

func FixtureToolCallResultFrame_Populated() ToolCallResultFrame

func FixtureToolCallResultFrame_ZeroValue

func FixtureToolCallResultFrame_ZeroValue() ToolCallResultFrame

type ToolCallStartFrame

type ToolCallStartFrame struct {
	AgentId *string `json:"agent_id,omitempty"`
	CallId  string  `json:"call_id"`
	// Tool arguments. Always object, never null.
	Params       map[string]any `json:"params"`
	ParentCallId *string        `json:"parent_call_id,omitempty"`
	SessionId    string         `json:"session_id"`
	Tool         string         `json:"tool"`
	Type         string         `json:"type"`
}

ToolCallStartFrame — Server → client tool execution started. params MUST be object (never null) — nil-safety contract to prevent Object.keys(params) crash.

func FixtureToolCallStartFrame_Edge

func FixtureToolCallStartFrame_Edge() ToolCallStartFrame

FixtureToolCallStartFrame_Edge — no-parameter tool, no parent call.

func FixtureToolCallStartFrame_NilParams

func FixtureToolCallStartFrame_NilParams() ToolCallStartFrame

FixtureToolCallStartFrame_NilParams — params is nil — this must FAIL validation.

func FixtureToolCallStartFrame_Populated

func FixtureToolCallStartFrame_Populated() ToolCallStartFrame

func FixtureToolCallStartFrame_ZeroValue

func FixtureToolCallStartFrame_ZeroValue() ToolCallStartFrame

FixtureToolCallStartFrame_ZeroValue — Go zero values. Expected: FAIL because type="", session_id="", tool="", call_id="", params=nil.

type ToolCallStatus

type ToolCallStatus string

ToolCallStatus Outcome of the tool call.

const (
	ToolCallStatusCancelled ToolCallStatus = "cancelled"
	ToolCallStatusDenied    ToolCallStatus = "denied"
	ToolCallStatusError     ToolCallStatus = "error"
	ToolCallStatusPending   ToolCallStatus = "pending"
	ToolCallStatusRunning   ToolCallStatus = "running"
	ToolCallStatusSuccess   ToolCallStatus = "success"
)

Defines values for ToolCallStatus.

func (ToolCallStatus) Valid

func (e ToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the ToolCallStatus enum.

type ToolPolicy

type ToolPolicy string

ToolPolicy A policy value governing whether a tool call is allowed, requires approval, or is denied.

const (
	Allow ToolPolicy = "allow"
	Ask   ToolPolicy = "ask"
	Deny  ToolPolicy = "deny"
)

Defines values for ToolPolicy.

func (ToolPolicy) Valid

func (e ToolPolicy) Valid() bool

Valid indicates whether the value is a known member of the ToolPolicy enum.

type ToolRegistryEntry

type ToolRegistryEntry struct {
	// Category Tool category prefix derived from the tool name (e.g. "workspace", "browser", "system") or "general".
	Category string `json:"category"`

	// Description Human-readable description of what the tool does.
	Description string `json:"description"`

	// Name Canonical tool name (e.g. "workspace.shell", "browser.navigate").
	Name string `json:"name"`

	// Scope Tool visibility scope.
	Scope ToolRegistryEntryScope `json:"scope"`

	// Source Origin of the tool registration. "builtin" = compiled-in Go tool; "mcp" = MCP server tool.
	Source ToolRegistryEntrySource `json:"source"`
}

ToolRegistryEntry A single entry in the central tool registry snapshot returned by GET /api/v1/tools (FR-027).

type ToolRegistryEntryScope

type ToolRegistryEntryScope string

ToolRegistryEntryScope Tool visibility scope.

const (
	ToolRegistryEntryScopeCore    ToolRegistryEntryScope = "core"
	ToolRegistryEntryScopeGeneral ToolRegistryEntryScope = "general"
	ToolRegistryEntryScopeSystem  ToolRegistryEntryScope = "system"
)

Defines values for ToolRegistryEntryScope.

func (ToolRegistryEntryScope) Valid

func (e ToolRegistryEntryScope) Valid() bool

Valid indicates whether the value is a known member of the ToolRegistryEntryScope enum.

type ToolRegistryEntrySource

type ToolRegistryEntrySource string

ToolRegistryEntrySource Origin of the tool registration. "builtin" = compiled-in Go tool; "mcp" = MCP server tool.

const (
	Builtin ToolRegistryEntrySource = "builtin"
	Mcp     ToolRegistryEntrySource = "mcp"
)

Defines values for ToolRegistryEntrySource.

func (ToolRegistryEntrySource) Valid

func (e ToolRegistryEntrySource) Valid() bool

Valid indicates whether the value is a known member of the ToolRegistryEntrySource enum.

type ToolResultRef

type ToolResultRef struct {
	IsRef             bool   `json:"_ref"`
	OriginalSizeBytes int    `json:"original_size_bytes"`
	Preview           string `json:"preview"`
	Ref               string `json:"ref"`
}

ToolResultRef — Sentinel for tool results > 50 KiB but <= 1 MiB whose full body is preserved server-side. SPA fetches via GET /api/v1/tool-results/{ref}.

type TruncatedResult

type TruncatedResult struct {
	Truncated         bool   `json:"_truncated"`
	OriginalSizeBytes int    `json:"original_size_bytes"`
	Preview           string `json:"preview"`
}

TruncatedResult — Sentinel for tool results exceeding 1 MiB (FR-I-011).

type UpdateAgentJSONRequestBody

type UpdateAgentJSONRequestBody = AgentUpdateRequest

UpdateAgentJSONRequestBody defines body for UpdateAgent for application/json ContentType.

type UpdateAgentToolsJSONRequestBody

type UpdateAgentToolsJSONRequestBody = AgentToolsUpdateRequest

UpdateAgentToolsJSONRequestBody defines body for UpdateAgentTools for application/json ContentType.

type UpdateAuditLogToggleJSONRequestBody

type UpdateAuditLogToggleJSONRequestBody = AuditLogToggleRequest

UpdateAuditLogToggleJSONRequestBody defines body for UpdateAuditLogToggle for application/json ContentType.

type UpdateExecAllowlistJSONBody

type UpdateExecAllowlistJSONBody struct {
	// AllowedBinaries List of allowed binary name patterns.
	AllowedBinaries []string `json:"allowed_binaries"`
}

UpdateExecAllowlistJSONBody defines parameters for UpdateExecAllowlist.

type UpdateExecAllowlistJSONRequestBody

type UpdateExecAllowlistJSONRequestBody UpdateExecAllowlistJSONBody

UpdateExecAllowlistJSONRequestBody defines body for UpdateExecAllowlist for application/json ContentType.

type UpdateGlobalToolPoliciesJSONRequestBody

type UpdateGlobalToolPoliciesJSONRequestBody = GlobalToolPolicies

UpdateGlobalToolPoliciesJSONRequestBody defines body for UpdateGlobalToolPolicies for application/json ContentType.

type UpdatePromptGuardJSONRequestBody

type UpdatePromptGuardJSONRequestBody = PromptGuardUpdateRequest

UpdatePromptGuardJSONRequestBody defines body for UpdatePromptGuard for application/json ContentType.

type UpdateProviderJSONRequestBody

type UpdateProviderJSONRequestBody = ProviderUpdateRequest

UpdateProviderJSONRequestBody defines body for UpdateProvider for application/json ContentType.

type UpdateRateLimitsJSONRequestBody

type UpdateRateLimitsJSONRequestBody = RateLimitsUpdateRequest

UpdateRateLimitsJSONRequestBody defines body for UpdateRateLimits for application/json ContentType.

type UpdateRetentionJSONRequestBody

type UpdateRetentionJSONRequestBody = RetentionConfig

UpdateRetentionJSONRequestBody defines body for UpdateRetention for application/json ContentType.

type UpdateSandboxConfigJSONRequestBody

type UpdateSandboxConfigJSONRequestBody = SandboxConfigUpdate

UpdateSandboxConfigJSONRequestBody defines body for UpdateSandboxConfig for application/json ContentType.

type UpdateScheduleJSONRequestBody

type UpdateScheduleJSONRequestBody = ScheduleUpdate

UpdateScheduleJSONRequestBody defines body for UpdateSchedule for application/json ContentType.

type UpdateSessionScopeJSONRequestBody

type UpdateSessionScopeJSONRequestBody = SessionScopeRequest

UpdateSessionScopeJSONRequestBody defines body for UpdateSessionScope for application/json ContentType.

type UpdateSkillTrustJSONRequestBody

type UpdateSkillTrustJSONRequestBody = SkillTrustUpdateRequest

UpdateSkillTrustJSONRequestBody defines body for UpdateSkillTrust for application/json ContentType.

type UpdateTaskJSONRequestBody

type UpdateTaskJSONRequestBody = TaskUpdateRequest

UpdateTaskJSONRequestBody defines body for UpdateTask for application/json ContentType.

type UploadFilesMultipartBody

type UploadFilesMultipartBody struct {
	// Files One or more files to upload.
	Files *[]openapi_types.File `json:"files,omitempty"`

	// SessionId Session ID (alternative to query parameter).
	SessionId *string `json:"session_id,omitempty"`
}

UploadFilesMultipartBody defines parameters for UploadFiles.

type UploadFilesMultipartRequestBody

type UploadFilesMultipartRequestBody UploadFilesMultipartBody

UploadFilesMultipartRequestBody defines body for UploadFiles for multipart/form-data ContentType.

type UploadFilesParams

type UploadFilesParams struct {
	// SessionId Session ID to associate the uploaded files with. May also be supplied as a multipart form field.
	SessionId *string `form:"session_id,omitempty" json:"session_id,omitempty"`
}

UploadFilesParams defines parameters for UploadFiles.

type UploadFilesResponse

type UploadFilesResponse struct {
	// Files Uploaded file metadata entries.
	Files []UploadedFile `json:"files"`
}

UploadFilesResponse Response from POST /api/v1/upload (HTTP 201). Returns the list of uploaded files with their metadata.

func FixtureUploadFilesResponse_Edge

func FixtureUploadFilesResponse_Edge() UploadFilesResponse

func FixtureUploadFilesResponse_Populated

func FixtureUploadFilesResponse_Populated() UploadFilesResponse

func FixtureUploadFilesResponse_ZeroValue

func FixtureUploadFilesResponse_ZeroValue() UploadFilesResponse

type UploadedFile

type UploadedFile struct {
	// ContentType Detected MIME type of the uploaded file.
	ContentType string `json:"content_type"`

	// Name Sanitised filename as stored on disk.
	Name string `json:"name"`

	// Path Relative path within the uploads directory for constructing a download URL. Format: "uploads/{session_id}/{filename}".
	Path string `json:"path"`

	// Ref media:// ref registered for this file in the media store. Present when the server could register the file (always, for now). The SPA echoes this ref back in the message frame's "media" array so the agent loop can thread the file into the LLM content array as a multimodal content block. Empty if registration failed (the file is still downloadable via path).
	Ref *string `json:"ref,omitempty"`

	// Size File size in bytes.
	Size int64 `json:"size"`
}

UploadedFile Metadata for a single successfully uploaded file, as returned in the POST /upload response body's "files" array. Callers use the path field to construct the /api/v1/uploads/{session_id}/{filename} download URL.

type User

type User struct {
	// HasActiveToken True when the user's token_hash is non-empty (i.e. a bearer token is currently issued).
	HasActiveToken bool `json:"has_active_token"`

	// HasPassword True when the user's password_hash is non-empty (i.e. a password has been set).
	HasPassword bool `json:"has_password"`

	// Role RBAC role. Case-sensitive.
	Role UserRole `json:"role"`

	// Username Login name. Immutable after creation.
	Username string `json:"username"`
}

User Represents a gateway user account as returned by GET /users and POST /users. Password hashes and token hashes are NEVER included in responses — only the boolean presence flags are exposed.

func FixtureUser_Edge

func FixtureUser_Edge() User

func FixtureUser_Populated

func FixtureUser_Populated() User

func FixtureUser_ZeroValue

func FixtureUser_ZeroValue() User

type UserContextRequest

type UserContextRequest struct {
	// Content Full replacement content for USER.md. May be empty to clear the file. Maximum 262144 bytes (256 KB). The underlying filesystem write via fileutil.WriteFileAtomic provides the physical limit; this schema constraint enforces a reasonable upper bound at the API layer.
	Content string `json:"content"`
}

UserContextRequest Request body for PUT /api/v1/user-context. Replaces the entire content of USER.md in the default workspace. Passing an empty string clears the file.

type UserContextResponse

type UserContextResponse struct {
	// Content Current content of USER.md. Empty string when the file does not exist or has not been set yet.
	Content string `json:"content"`
}

UserContextResponse Response from GET /api/v1/user-context and PUT /api/v1/user-context. Returns the current content of USER.md in the default workspace. An empty string means the file does not exist or has not been written yet.

type UserCreateRequest

type UserCreateRequest struct {
	// Password Initial password. Minimum 8 characters, maximum 72 (bcrypt limit).
	Password string `json:"password"`

	// Role RBAC role. Case-sensitive; exactly "admin" or "user".
	Role UserCreateRequestRole `json:"role"`

	// Username Must start with an alphanumeric and contain only letters, digits, dots, dashes, and underscores. Length 2-63 characters.
	Username string `json:"username"`
}

UserCreateRequest Body for POST /users. Creates a new user account. Admin-only.

type UserCreateRequestRole

type UserCreateRequestRole string

UserCreateRequestRole RBAC role. Case-sensitive; exactly "admin" or "user".

const (
	UserCreateRequestRoleAdmin UserCreateRequestRole = "admin"
	UserCreateRequestRoleUser  UserCreateRequestRole = "user"
)

Defines values for UserCreateRequestRole.

func (UserCreateRequestRole) Valid

func (e UserCreateRequestRole) Valid() bool

Valid indicates whether the value is a known member of the UserCreateRequestRole enum.

type UserCreateResponse

type UserCreateResponse struct {
	// RequiresRestart Present and true when config was saved to disk but the in-memory hot-reload failed. The gateway must be restarted for the user to be able to log in.
	RequiresRestart *bool `json:"requires_restart,omitempty"`

	// Role The created user's RBAC role.
	Role UserCreateResponseRole `json:"role"`

	// Username The created user's login name.
	Username string `json:"username"`

	// Warning Human-readable explanation when requires_restart is true.
	Warning *string `json:"warning,omitempty"`
}

UserCreateResponse Returned with HTTP 201 on successful POST /users. Contains the new user's identity fields. No token is issued — the user must log in explicitly.

type UserCreateResponseRole

type UserCreateResponseRole string

UserCreateResponseRole The created user's RBAC role.

const (
	UserCreateResponseRoleAdmin UserCreateResponseRole = "admin"
	UserCreateResponseRoleUser  UserCreateResponseRole = "user"
)

Defines values for UserCreateResponseRole.

func (UserCreateResponseRole) Valid

func (e UserCreateResponseRole) Valid() bool

Valid indicates whether the value is a known member of the UserCreateResponseRole enum.

type UserDeleteResponse

type UserDeleteResponse struct {
	// Deleted Always true on success.
	Deleted bool `json:"deleted"`

	// RequiresRestart Present and true when hot-reload failed after the deletion.
	RequiresRestart *bool `json:"requires_restart,omitempty"`

	// Username The deleted user's login name.
	Username string `json:"username"`

	// Warning Human-readable explanation when requires_restart is true.
	Warning *string `json:"warning,omitempty"`
}

UserDeleteResponse Returned on successful DELETE /users/{username}.

type UserResetPasswordRequest

type UserResetPasswordRequest struct {
	// Password New password for the target user. Minimum 8 characters, maximum 72 (bcrypt limit).
	Password string `json:"password"`
}

UserResetPasswordRequest Body for PUT /users/{username}/password. Admin resets another user's password. This is NOT the self-change-password endpoint — that is POST /auth/change-password. After a successful reset the target user's bearer token is also invalidated, requiring them to log in again with the new password.

type UserResetPasswordResponse

type UserResetPasswordResponse struct {
	// PasswordReset Always true on success.
	PasswordReset bool `json:"password_reset"`

	// RequiresRestart Present and true when hot-reload failed after the password reset.
	RequiresRestart *bool `json:"requires_restart,omitempty"`

	// Username The affected user's login name.
	Username string `json:"username"`

	// Warning Human-readable explanation when requires_restart is true.
	Warning *string `json:"warning,omitempty"`
}

UserResetPasswordResponse Returned on successful PUT /users/{username}/password.

type UserRole

type UserRole string

UserRole RBAC role. Case-sensitive.

const (
	UserRoleAdmin UserRole = "admin"
	UserRoleUser  UserRole = "user"
)

Defines values for UserRole.

func (UserRole) Valid

func (e UserRole) Valid() bool

Valid indicates whether the value is a known member of the UserRole enum.

type UserRoleChangeRequest

type UserRoleChangeRequest struct {
	// Role New role. Case-sensitive; exactly "admin" or "user".
	Role UserRoleChangeRequestRole `json:"role"`
}

UserRoleChangeRequest Body for PATCH /users/{username}/role. Changes a user's RBAC role. Admin-only.

type UserRoleChangeRequestRole

type UserRoleChangeRequestRole string

UserRoleChangeRequestRole New role. Case-sensitive; exactly "admin" or "user".

const (
	UserRoleChangeRequestRoleAdmin UserRoleChangeRequestRole = "admin"
	UserRoleChangeRequestRoleUser  UserRoleChangeRequestRole = "user"
)

Defines values for UserRoleChangeRequestRole.

func (UserRoleChangeRequestRole) Valid

func (e UserRoleChangeRequestRole) Valid() bool

Valid indicates whether the value is a known member of the UserRoleChangeRequestRole enum.

type UserRoleChangeResponse

type UserRoleChangeResponse struct {
	// RequiresRestart Present and true when hot-reload failed after the role change.
	RequiresRestart *bool `json:"requires_restart,omitempty"`

	// Role The new role.
	Role UserRoleChangeResponseRole `json:"role"`

	// Username The affected user's login name.
	Username string `json:"username"`

	// Warning Human-readable explanation when requires_restart is true.
	Warning *string `json:"warning,omitempty"`
}

UserRoleChangeResponse Returned on successful PATCH /users/{username}/role.

type UserRoleChangeResponseRole

type UserRoleChangeResponseRole string

UserRoleChangeResponseRole The new role.

const (
	UserRoleChangeResponseRoleAdmin UserRoleChangeResponseRole = "admin"
	UserRoleChangeResponseRoleUser  UserRoleChangeResponseRole = "user"
)

Defines values for UserRoleChangeResponseRole.

func (UserRoleChangeResponseRole) Valid

func (e UserRoleChangeResponseRole) Valid() bool

Valid indicates whether the value is a known member of the UserRoleChangeResponseRole enum.

type ValidateTokenResponse

type ValidateTokenResponse struct {
	// Role The RBAC role of the authenticated user.
	Role ValidateTokenResponseRole `json:"role"`

	// Username The authenticated user's login name.
	Username string `json:"username"`
}

ValidateTokenResponse Response from GET /api/v1/auth/validate. Confirms the current bearer token is valid and returns the associated user's role.

func FixtureValidateTokenResponse_Edge

func FixtureValidateTokenResponse_Edge() ValidateTokenResponse

FixtureValidateTokenResponse_Edge — user role, unicode username.

func FixtureValidateTokenResponse_Populated

func FixtureValidateTokenResponse_Populated() ValidateTokenResponse

func FixtureValidateTokenResponse_ZeroValue

func FixtureValidateTokenResponse_ZeroValue() ValidateTokenResponse

FixtureValidateTokenResponse_ZeroValue — Go zero values. Expected: FAIL because username="", role="" (not in enum [admin, user]).

type ValidateTokenResponseRole

type ValidateTokenResponseRole string

ValidateTokenResponseRole The RBAC role of the authenticated user.

const (
	ValidateTokenResponseRoleAdmin ValidateTokenResponseRole = "admin"
	ValidateTokenResponseRoleUser  ValidateTokenResponseRole = "user"
)

Defines values for ValidateTokenResponseRole.

func (ValidateTokenResponseRole) Valid

func (e ValidateTokenResponseRole) Valid() bool

Valid indicates whether the value is a known member of the ValidateTokenResponseRole enum.

type VersionResponse

type VersionResponse struct {
	// BuildSha VCS revision SHA embedded at build time via debug.ReadBuildInfo(). Value is "dev" when built outside a version-controlled tree or when vcs.revision is not set (e.g. go run). Otherwise a 7-40 character lowercase hex SHA.
	BuildSha string `json:"build_sha"`

	// Version Omnipus gateway version string (e.g. "0.1.0"). Must follow semver format.
	Version string `json:"version"`
}

VersionResponse Response from GET /api/v1/version. Returns build identity information. Used by the frontend to detect version drift and show "New version available" prompts (issue #110). No authentication required.

type WhatsAppPairingFrame

type WhatsAppPairingFrame struct {
	ChannelId string  `json:"channel_id"`
	Message   *string `json:"message,omitempty"`
	Qr        *string `json:"qr,omitempty"`
	Status    string  `json:"status"`
	Type      string  `json:"type"`
}

WhatsAppPairingFrame — Server → client WhatsApp native/QR pairing update (QR code + live status) so the SPA can pair in-browser without the gateway terminal (#283).

type WhatsAppPairingSubscribeFrame

type WhatsAppPairingSubscribeFrame struct {
	Active    bool   `json:"active"`
	ChannelId string `json:"channel_id"`
	Type      string `json:"type"`
}

WhatsAppPairingSubscribeFrame — Client → server. Registers or clears this connection's interest in a channel's whatsapp_pairing frames so the QR is delivered only to the operator viewing that channel's pairing UI (#283).

type WsFrameType

type WsFrameType string

WsFrameType — Enum of all WebSocket frame type discriminator strings.

const (
	WsFrameTypeAuth                     WsFrameType = "auth"
	WsFrameTypeMessage                  WsFrameType = "message"
	WsFrameTypeCancel                   WsFrameType = "cancel"
	WsFrameTypeExecApprovalResponse     WsFrameType = "exec_approval_response"
	WsFrameTypePing                     WsFrameType = "ping"
	WsFrameTypeAttachSession            WsFrameType = "attach_session"
	WsFrameTypeDevicePairingResponse    WsFrameType = "device_pairing_response"
	WsFrameTypeSessionClose             WsFrameType = "session_close"
	WsFrameTypeSessionStarted           WsFrameType = "session_started"
	WsFrameTypeToken                    WsFrameType = "token"
	WsFrameTypeDone                     WsFrameType = "done"
	WsFrameTypeError                    WsFrameType = "error"
	WsFrameTypeToolCallStart            WsFrameType = "tool_call_start"
	WsFrameTypeToolCallResult           WsFrameType = "tool_call_result"
	WsFrameTypeSubagentStart            WsFrameType = "subagent_start"
	WsFrameTypeSubagentEnd              WsFrameType = "subagent_end"
	WsFrameTypeExecApprovalRequest      WsFrameType = "exec_approval_request"
	WsFrameTypeExecApprovalExpired      WsFrameType = "exec_approval_expired"
	WsFrameTypeTaskStatusChanged        WsFrameType = "task_status_changed"
	WsFrameTypeReplayMessage            WsFrameType = "replay_message"
	WsFrameTypeRateLimit                WsFrameType = "rate_limit"
	WsFrameTypeMedia                    WsFrameType = "media"
	WsFrameTypeAgentSwitched            WsFrameType = "agent_switched"
	WsFrameTypeToolApprovalRequired     WsFrameType = "tool_approval_required"
	WsFrameTypeSessionState             WsFrameType = "session_state"
	WsFrameTypeSystemOverload           WsFrameType = "system_overload"
	WsFrameTypeReplayWarning            WsFrameType = "replay_warning"
	WsFrameTypeCancelStage              WsFrameType = "cancel_stage"
	WsFrameTypePong                     WsFrameType = "pong"
	WsFrameTypeSessionCloseAck          WsFrameType = "session_close_ack"
	WsFrameTypeExecApprovalResponseAck  WsFrameType = "exec_approval_response_ack"
	WsFrameTypeDevicePairingRequest     WsFrameType = "device_pairing_request"
	WsFrameTypeWhatsappPairing          WsFrameType = "whatsapp_pairing"
	WsFrameTypeWhatsappPairingSubscribe WsFrameType = "whatsapp_pairing_subscribe"
	WsFrameTypeNotification             WsFrameType = "notification"
)

Defines values for WsFrameType.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL